//Image a = Toolkit.getDefaultToolkit().getImage("123.jpeg");
//本來這樣寫畫不出來
Image a = Toolkit.getDefaultToolkit().getImage(getClass().getResource("123.jpeg"));
g.drawImage(a, 100, 100, 100, 100, this);
//Image a = Toolkit.getDefaultToolkit().getImage("123.jpeg");
//本來這樣寫畫不出來
Image a = Toolkit.getDefaultToolkit().getImage(getClass().getResource("123.jpeg"));
g.drawImage(a, 100, 100, 100, 100, this);
節錄http://www.wretch.cc/blog/KENGI/14015056
1. start a DOS box
2. make a temp directory, for example, c:\temp
3. change directory to where you've downloaded WS Tech Preview
4. extract the .msi installer from the .exe by running the following command in DOS
當您使用「Windows 修復主控台」時,可以在沒有啟動 Windows 圖形介面的情況下,取得 NTFS、FAT 及 FAT32 磁碟區的限制存取。您可以在「Windows 修復主控台」中執行下列操作:
需為專案環境
點選 專案選項→參數→連結器
加入 "libws2_32.a"
(通常在 C:\Dev-Cpp\lib\libws2_32.a)
/*
** WS2TCPIP.H - WinSock2 Extension for TCP/IP protocols
**
** This file contains TCP/IP specific information for use
** by WinSock2 compatible applications.
在Dev C++ 編譯 WinSock 產生以下的error:
[Linker error] undefined reference to `WSAStartup@8'
[Linker error] undefined reference to `socket@12'
[Linker error] undefined reference to `WSACleanup@0'
[Linker error] undefined reference to `htons@4'
math library comprises a standard set of mathematical functions, such as trigonometric functions (sin, cos, tan, asin, acos, etc.), exponentiation and logarithms (exp, log, log10), rounding functions (floor, ceil), max, min, plus a variable pi. ^´ to work as the exponentiation operator.math.randomseed(os.time())
math.random(10000)-----------------------1~10000
function list_iter (t)----------------------------------factory(工廠?)
local i = 0
local n = table.getn(t)--------------------------回傳總元素個數
return function ()--------------------------------無名氏函式(Closure)
筆記模式
================================================
lexical scoping(查翻譯是:詞法作用域)
When a function is written enclosed in another function, it has full access to local variables from the enclosing function.
簡單說就是函數中還有函數。
這篇文章受密碼保護,請輸入密碼後查看內容。