;命令前置条件:鼠标选中文字
MButton:: ;鼠标中键激发事件
Send, ^c ;复制选中的文字
clipwait ;等待复制完成
Click ;在点击鼠标中键的地方模拟左键点击
Send, ^v ;粘贴
TrayTip, clipboard, %clipboard%, 20, 16
return
----------------------
#space::
Click
return
*#p::MouseMove, 0, -10, 0, R ; Win+UpArrow hotk
*#n::MouseMove, 0, 10, 0, R ; Win+DownArrow => Movewnward
*#b::MouseMove, -10, 0, 0, R ; Win+LeftArrow => Move cursor
*#f::MouseMove, 10, 0, 0, R ; Win+RightArrow => Move cursor to
2008-12-13
2008-11-27
mingle
2008-11-25
看不懂翻译就看看原版
图中红色框是读书时的疑点(因为会上人员大都读过陈皓的C++ 虚函数表解析,也做了实验证明,大家了解到目前microsoft的编译器是不会将Base2::mumble()放大那个位置的.)
如果(对C++中虚表不太了解)
{
可以参考:陈皓专栏:http://blog.csdn.net/haoel/archive/2007/12/18/1948051.aspx
}
书中讲到关于编译器为支持多重继承下的虚函数的传统做法:
翻译如下:
后来看了一下英文版:对应段落如下:
With the advent of runtime linkers in support of dynamic shared libraries, the linking of symbolic names can be extremely slow梪p to 1 ms per name, for example, on a SparcStation 10. To better accommodate the performance of the runtime linker, the Sun compiler concatenates the multi-ple virtual tables into one. The pointers to the secondary virtual tables are generated by adding an offset to the name of the primary table. Under this strategy, each class has only one named virtual table. "For code used on a number of Sun projects [the speedup] was quite noticeable.
看完以后恍然大悟.
连锁一词用的不好, 连接更合适.
另外"连锁为一个"后的冒号改为句号更合适一些,更易懂一些.
====================================
读书会回忆:怪不得今天LT跟SGG说暗语大家听不懂.暗语大概如下:
LT:"是冒号还是逗号?"
SGG:"是句号".
XY:"枯藤老树昏鸦, 小桥流水人家".
2008-11-23
还记得emacs不?
周未没事,突然一想如果visual studio下用emacs的快捷键, 不是很好?
果然搜到一个工具,很好用.
http://xkeymacs.sourceforge.net/archive/xkeymacs317.msi
果然搜到一个工具,很好用.
http://xkeymacs.sourceforge.net/archive/xkeymacs317.msi
2008-10-12
python 中动态执行 JavaScript代码
this post is obviously out of date, so now you should try https://code.google.com/p/pyv8/
这个帖子已经明显过时了,你应该试试https://code.google.com/p/pyv8/
-------------------------
以前因为写了这段代码, 刷了一下google adsense的链接, 结果google不让我用adsense了.
因为google adsense中javascript代码应该是通过混淆的,当时分析没有找到头绪,就找到了spidermonkey.
这段代码主要是在python中通过spidermonkey类库, 动态执行混淆后的javascript,找到真正链接.
from spidermonkey import Runtime import time, urllib2, httplib, random, re import urllister def get(): httplib.HTTPConnection.debuglevel = 1 baseurl = 'http://pagead2.googlesyndication.com' dt = str(int(time.time() * 1000)) print 'start sleep...' time.sleep(random.randint(0, 9)) print dt, 'end sleep...' url = 'http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-6581680843370427&dt=' + dt + '&lmt=1156579898&format=468x60_as&output=html&url=http%3A%2F%2Flocalhost%2Ftest.html&color_bg=F6F6F6&color_text=9E5205&color_link=B8A80D&color_url=B8A80D&color_border=9E5205&ad_type=text&cc=100&u_h=800&u_w=1280&u_ah=779&u_aw=1280&u_cd=24&u_tz=480&u_his=1&u_java=true&u_nplug=9&u_nmime=91' request = urllib2.Request(url) request.add_header('USer-Agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5') opener = urllib2.build_opener() conn = opener.open(request) html = conn.read() conn.close() print html regex = re.compile(r'function jcc\(a\).*function ha\(a\).*?jcc\(a\).*?\}') m = regex.search(html) if m is not None: func = m.group(0) func = re.sub(r'pha=document\.getElementById\(a\)', 'phahref=a', func) print func func = re.sub(r'pha\.href', 'phahref', func) print func func = re.sub(r"a=='aw0'", 'a == a', func) print func else: pass parser = urllister.URLLister() parser.feed(html) parser.close() href = baseurl + parser.href[0] javascript = func + ' href="' + href + '"; ha(href); print (href);' print javascript rt = Runtime() cx = rt.new_context() f = cx.eval_script(javascript) s = cx.get_global("phahref"); print s request = urllib2.Request(s) request.add_header('USer-Agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5') opener = urllib2.build_opener() conn = opener.open(request) html = conn.read() conn.close() if __name__ == '__main__': import thread import analy for i in range(20): print get thread.start_new_thread(analy.get, ()) print i
-->
参考网址:
http://wwwsearch.sourceforge.net/python-spidermonkey/
http://pypi.python.org/pypi/python-spidermonkey/0.0.1a
Subscribe to:
Posts (Atom)