2012年1月29日
感人的卡農
小女孩 :Why am i different from others?
街頭提琴家:Why... do you have to be like others.... ?
Music is a visible thing.
Close your eyes. You will see.
Blogger加上facebook的讚按鈕
Facebook Social plugins
步驟請參閱 在Blogger嵌入Facebook的讚(Like)按鈕 | 哲生博客 Jason Blog:
我是將底下的Scrip加在<div class='post-footer-line post-footer-line-2'> 這裡</div>
步驟請參閱 在Blogger嵌入Facebook的讚(Like)按鈕 | 哲生博客 Jason Blog:
我是將底下的Scrip加在<div class='post-footer-line post-footer-line-2'> 這裡</div>
<script> document.write('<iframe src="http://www.facebook.com/plugins/like.php?href=<data:post.url/>&layout=standard&show_faces=false&width=450&action=like&font=verdana&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:40px"></iframe>'); </script>
2012年1月28日
2012年1月24日
2012年1月21日
2012年1月16日
2012年1月13日
Android: node.js 5行程式碼寫個HttpServer !!!
node.js:
建構在Chrome's JavaScript runtime上,可以極容易地寫出快速,可擴展的網路程式。事件導向,非同步式,不獨占式 I/O處理,使它輕量而有效率,適合即時且資料集中式應用的分散式處理。
Android上使用node.js!
Projects, Applications, and Companies Using Node
建構在Chrome's JavaScript runtime上,可以極容易地寫出快速,可擴展的網路程式。事件導向,非同步式,不獨占式 I/O處理,使它輕量而有效率,適合即時且資料集中式應用的分散式處理。
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n'); }).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
anode:Android上使用node.js!
Projects, Applications, and Companies Using Node
2012年1月12日
Android : adb shell am 命令列啟動Activity或傳送Intent
例如:
//啟動瀏覽器,打開目標網址
adb shell am -a android.intent.action.VIEW -d http://www.google.com
adb shell am broadcast -a org.meshpoint.anode.START -e cmdline /data/tmp/hello.js
//撥打電話,號碼是123456789
adb shell am start -a android.intent.action.CALL -d tel:123456789
am start -a android.intent.action.CALL -d tel:123456789
Starting: Intent { action=android.intent.action.CALL data=tel:123456789}
//啟動瀏覽器,打開目標網址
adb shell am -a android.intent.action.VIEW -d http://www.google.com
adb shell am broadcast -a org.meshpoint.anode.START -e cmdline /data/tmp/hello.js
//撥打電話,號碼是123456789
adb shell am start -a android.intent.action.CALL -d tel:123456789
am start -a android.intent.action.CALL -d tel:123456789
Starting: Intent { action=android.intent.action.CALL data=tel:123456789}
Androd: Box2D 可做出憤怒鳥的物理引擎...
box2d - A 2D Physics Engine for Games
JBox2d - a 2d Java physics engine, a port of the C++ Box2d engine
JBox2d - a 2d Java physics engine, a port of the C++ Box2d engine
- JBox2D提供給Java的一個剛體物體引擎程式庫
- 不提供圖形支援,必須自己加上繪圖部份。
drojdjou/J3D
用Html5的Canvas來作圖形...
這裡有教學...
box2dweb - Box2DFlash port to javascript
把WebGL用JavaScript再包起來方便使用,不過目前Android上的瀏覽器似乎只有Mobile FireFox支援WebGL。
Box2D & JavaScript tutorials by Seth Ladd | CreativeJS:用Html5的Canvas來作圖形...
這裡有教學...
box2dweb - Box2DFlash port to javascript
底下的Live Demo真是神奇!
Android: libgdx 跨平台的遊戲開發程式庫
libgdx - Android/desktop game development framework
- libgdx 跨平台的遊戲開發程式庫,用Java和JNI當需要高效率時。
- 開發桌上遊戲和Android將沒有差別,將底層OpenGL間的差別封包起來。
- 應用程式可以完全在桌機測試和開發,只需6行程式碼就可以在Android上執行。
- 在桌機環境中開發,可以用如HotSwap的工具節省開發時程
2012年1月6日
2012年1月4日
2012年1月3日
2011年12月20日
2011年12月18日
Android: 檢查SD卡可用容量MB
public boolean isAvaiableSpace(float sizeMB){
if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){
String sdcard =Environment.getExternalStorageDirectory().getPath();
StatFs statFs =new StatFs(sdcard);
long blockSize=statFs.getBlockSize();
long ablocks =statFs.getAvailableBlocks();
float available=(float)((ablocks*blockSize)/(1024*1024));
if (sizeMB > available)
return false;
else
return true;
}
return false;
}
2011年12月14日
Java: 刪除整個目錄(子目錄和檔案)
public boolean deleteDir(File dir) {
if (dir.isDirectory()) {
File[] files = dir.listFiles();
for (int i=0;i<files.length;i++) {
if (!deleteDir(files[i]))
return false;
}
}
//目錄現在清空了可以刪除
return dir.delete();
}
Progressive Education Why It’s Hard to Beat, But Also Hard to Find: 進步教育部份筆記
Progressive Education
Why It’s Hard to Beat, But Also Hard to Find (By Alfie Kohn)
進步教育本身並無一個固定的定義,這似乎和它反對一致性和標準化的聲譽相符。任何兩個自認了解此"傳統"的教育工作者,也可能會以不同的角度來看待,或者至少會對哪些是最重要的有爭議.
和多位進步教育工作者交談後,其實你會開始注意到某些弔詭:有些人專注於個別學生的獨特需要,而有些人強調學習者社群的重要,有些人形容學習為一個過程,旅程比目的地重要,而另一些認為學習任務應該導致可共享的真實產物。
它是什麼?
Why It’s Hard to Beat, But Also Hard to Find (By Alfie Kohn)
進步教育本身並無一個固定的定義,這似乎和它反對一致性和標準化的聲譽相符。任何兩個自認了解此"傳統"的教育工作者,也可能會以不同的角度來看待,或者至少會對哪些是最重要的有爭議.
和多位進步教育工作者交談後,其實你會開始注意到某些弔詭:有些人專注於個別學生的獨特需要,而有些人強調學習者社群的重要,有些人形容學習為一個過程,旅程比目的地重要,而另一些認為學習任務應該導致可共享的真實產物。
它是什麼?
2011年12月13日
牛頓手稿數位化 Cambridge Digital Library - University of Cambridge
Cambridge Digital Library - University of Cambridge:
"Cambridge University Library contains evidence of some of the greatest ideas and discoveries over two millennia. We want to make our collections accessible to anyone, anywhere in the world with an internet connection and a thirst for knowledge." —Anne Jarvis, University Librarian
Explore the British Library here:
"Cambridge University Library contains evidence of some of the greatest ideas and discoveries over two millennia. We want to make our collections accessible to anyone, anywhere in the world with an internet connection and a thirst for knowledge." —Anne Jarvis, University Librarian
Explore the British Library here:
訂閱:
文章 (Atom)