上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: 转自:http://www.cnblogs.com/rzhang/archive/2011/12/29/python-html-parsing.html Python里常用的网页解析库有BeautifulSoup和lxml.html,其中前者可能更知名一点吧,熊猫开始也是使用的BeautifulSoup,但是发现它实在有几个问题绕不过去,因此最后采用的还是lxml: 1. B... 阅读全文
posted @ 2015-08-14 23:52 aprial 阅读(1503) 评论(0) 推荐(0) 编辑
摘要: import sys def pstack(depth = 0): frame = sys._getframe(depth) cnt = 0 while frame: print "###", cnt, frame.f_code.co_name, frame.f_code.co_filename, frame.f_lineno fra... 阅读全文
posted @ 2015-08-12 23:16 aprial 阅读(1280) 评论(0) 推荐(0) 编辑
摘要: 如果32位系统OFP的注册表路径是 HKEY_LOCAL_MACHINE\SOFTWARE\Bohemia Interactive\ 那么在64系统里就应该是 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Bohemia Interactive\ 多了一级Wow6432Node 阅读全文
posted @ 2015-08-07 21:54 aprial 阅读(377) 评论(0) 推荐(0) 编辑
摘要: import lxml.etree as et xml=""" apple pear strawberry blueberry starfruit mango peach """ tree=et.fromstring(xml) for bad in tree.xpath("//fruit[@state='rotten']"): ... 阅读全文
posted @ 2015-07-29 13:32 aprial 阅读(169) 评论(0) 推荐(0) 编辑
摘要: def myYield2(): for i in range(3): yield '2222 i am in myYield2', 'i = ', i def myYield(): for i in range(10): yield '0000 i am in myYield', 'i = ', i for j in myY... 阅读全文
posted @ 2015-07-27 19:13 aprial 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 转自: http://blog.csdn.net/lyq19870515/article/details/9450275 获取焦点事件: text.addListener(SWT.FocusIn, new Listener() { public void handleEvent(Event e) { // 处理得到焦点的事件 ... 阅读全文
posted @ 2015-07-23 22:35 aprial 阅读(1494) 评论(0) 推荐(0) 编辑
摘要: IsDisposed 获取指示操作窗口控件是否已被释放的值。 HelloSWT.java文件内容如下: package edu.ch4; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Text; import org.eclipse.sw... 阅读全文
posted @ 2015-07-22 22:44 aprial 阅读(768) 评论(0) 推荐(0) 编辑
摘要: package cn.apr.chart; import java.net.*; import java.io.*; import java.util.*; public class ChatServer { /** * @param args * m_threads是一个Vector静态变量,维护所有Ser... 阅读全文
posted @ 2015-07-21 08:34 aprial 阅读(478) 评论(0) 推荐(0) 编辑
摘要: // 将msg送回对应的Applet public void write(String msg) { synchronized (msg) { try { m_out.writeUTF(msg); } catch (IOException e) { } ... 阅读全文
posted @ 2015-07-19 22:58 aprial 阅读(320) 评论(0) 推荐(0) 编辑
摘要: syso 然后:alt+ /(就是问号键) 阅读全文
posted @ 2015-07-19 11:04 aprial 阅读(1088) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页