2011年12月6日 星期二

Python wxpython

#!/usr/local/bin/python2.7-32
# -*- coding: utf-8 -*-
import wx
app = wx.PySimpleApp()
frame = wx.Frame(None, -1, u"DREAM")
frame.Show(True)
app.MainLoop()

  • 使用者介面 
    1. html(Gmail檔案拖拉)//GUI (cross platform)
  • 傳遞方式
    1. 多檔案
    2. Ftp/Socket
  • 後端 Server

2011年7月22日 星期五

Python 初見

之前在摸 Google App Engine 看到了Python 但是一直沒時間去理它


後來看看 pypy 感覺或許是個很有趣的語言


雖然執行速度 由上一篇可想而知,他的賣點應該不是速度


"There's only one way to do one thing" 的 Python 
"There's MORE THAN one way to do one thing" 的 Perl。


優點到底是啥? 阿災... 有興趣可以看他簡介吧 


想這麼多不如實際來寫個程式就可以體驗差別



2011 執行速度比較 C++ Java Perl PHP Python Ruby1.9 Ruby1.8

單純數字加:
C++ > JAVA > PHP > Ruby1.9 > Perl > Python > Ruby1.8

字串連接:
C++ > JAVA > Perl > PHP >Python >  Ruby1.9 > Ruby1.8

2011年7月17日 星期日

Cmd 視窗隱藏

killGGC改成自己的bat名稱
把以下內容存成 .vbs檔
DIM objShell
set objShell=wscript.createObject("wscript.shell")
iReturn=objShell.Run("cmd.exe /C killGGC.bat", 0, TRUE)
C++ 編譯 -mwindows

Bat 小程式

最近玩的遊戲,感覺輔助程式越來越多,自己覺得也很雜

造成桌面亂就算了,還要每個都要執行

拿來練習寫bat好了。

預計可能由簡單到複雜寫幾個版本吧


2011年7月16日 星期六

cmd 實用指令

test.exe <input.txt> out.txt
text.exe 內容:
int main() {
    char ch[100] ="\0";
    cin >> ch ;
    cout << ch ;
}
input.txt: (丟入scanf的內容)
XDDD

執行(cmd) >> test.exe <input.txt> out.txt
產生:out.txt
XDDD