SICP, 1.8, page17
#!/usr/bin/env racket
#lang racket
(define (root-iter guess x)
(if (good guess x)
guess
(root-iter (improved guess x) x)))
(define (good y x)
(< (abs (- (* y y y) x)) 0.001))
(define (improved y x)
(/ (+ (/ x y y) (+ y y)) 3))
(define (root x)
(root-iter 1 x))
(root 30000.001)
activate application "SystemUIServer" tell application "System Events" tell process "SystemUIServer" set x to item 3 of menu bar items of menu bar 1 tell x click click menu item "Connect Cisco VPN" of front menu delay 3 keystroke token keystroke return end tell end tell end tell
set tokens to "" tell application "System Events" to tell process "SofToken II" tell application "SofToken II" to activate delay 1 keystroke "***" delay 1 repeat 10 times keystroke return set token to the clipboard set tokens to tokens & "\r" & token delay 1 end repeat end tell tokens
刷新DNS sudo dscacheutil -flushcache
Set VSOCK_CONFED = "no" in /etc/vmware/config
via http://resalxh.wordpress.com/2010/09/09/vmware-player-3-1-1-on-ubuntu-10-10-maverick-meerkat/
from python cookbook. How to check a variable is String or not.
如果它走路像鸭子,叫声也像鸭子,那么对于我们而言,就可以认为它是鸭子了。
3 functions are borrowed from Here.
as subject.
simply wrap it with threading.