Pages

2011年10月18日星期二

Have a look VS take a look

Are both grammatically correct?If yes, which one will be better?
Have a look / Take a look

Indeed(確實) they are, but I detect a very slight difference: take suggests more effort on the part of the looker.

Example:
[Two people are sitting at a table, each reading different newspapers. One sees an article that would interest the other.]
Have a look at this.

[Two people are sitting at separate tables, at opposite ends of a room. The one who says
Take a look at this
knows that he's asking the other person to get up and walk across the room.]

參考網址: http://www.usingenglish.com/forum/ask-teacher/29883-have-look-take-look.html
http://englishwizard.mysinablog.com/index.php?op=ViewArticle&articleId=1777130

2009年11月27日星期五

Tactile Switch觸摸開關

Tactile Switch觸摸開關
http://www.ladyada.net/learn/arduino/lesson5.html
http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=tactile+switch

http://www.cpu.com.tw/kh/sw/tach/tach.html

2009年7月18日星期六

自 製 砂 砲

砂泡原料易得,砂子佔99%,其他為少量酒精、硝酸、銀鹽等,工藝如下:
  1. 洗砂:將普通的河砂或建築黃砂用篩子篩好,保持砂子粒度在14-16度之間,清水洗凈,曬乾備用。

  2. 配葯:準確稱取1份銀鹽、7份硝酸、10份酒精,混合後稍微加熱,即有白色沉澱生成,將沉澱 物洗乾凈以備用。

  3. 和葯:將配好的葯倒入120份砂子中,慢慢充分拌勻,等自然風乾。

  4. 包裝:將薄頁紙裁成小蔆形片,把風乾的砂子置於紙片上包裝成蝌蚪形狀。

  5. 檢驗:砂砲顆料大小要均勻,每粒重約0.25剋。安全繫數保證在:從50釐米高自己落到地上不炸響。爆響率要求:以150厘米高自己落下能全部炸響,檢驗合格後,即可裝箱。
我們在傢裏就可以製作這種翫具,具體製作方法是:
  • 設備:天秤、三角燒盃、量筒、濾紙、平底鍋、噴霧器、手套、護眼鏡、漏斗

  • 材料:硝痠銀1克 (1份)、硝酸3毫升 (7份)、150克砂 (120份)、酒精10毫升(10份)、清水20毫升。
生產工藝:
  1. 先往三個燒盃內放入 1份硝酸銀,接着加入20毫升清水,輕輕搖至其溶解
  2. 再加入3毫升硝酸和10毫升酒精,搖勻。
  3. 將裝有凍水的平底鍋放置火上,把配好原料的三角燒盃放放鍋內加熱,待三角燒盃內的液體煮沸時,將燒盃取出,待其自然冷卻
  4. 冷卻後開始過濾,把濾紙放在漏斗上,一邊過濾一邊用清水沖洗,
  5. 然後用軟毛筆將濾紙上的白色餬狀晶體掃入粗砂中(粗砂應噴濕,切記),輕輕拌勻
  6. 拌勻後即可用紙包裝成蝌蚪狀,6個砂料為一包,或每包包入0.23-0.25克葯砂,

注意:

嚴禁使用金屬棒或其他硬物壓撞白色晶體及拌好的葯砂,

包粒過程中如砂子較乾,一定要噴入適量的水,使其潮濕,

每次配葯不能超過3克硝酸銀

2009年7月14日星期二

自 製 火 箭 噴 嘴

材料

好多時煙花火箭會因為噴嘴耐不住高溫,而導致試射失敗,
所以製作噴嘴的材料十分重要

  1. 紙黏士
    做火箭噴嘴可以用紙黏士,因為紙黏士耐熱防火(可抵禦900度高溫),同時重量輕,尤其適合製作火箭及其他對重量十分敏感的煙花。用時不用加水。

  2. 凝結泥土貓砂(CLUMPING CLAY CAT LITTER):一定要買含火山泥(bentonite clay)成份那種。貓砂遇到水份(尿液)會凝結成一團,便於剷走。用時不用加水。

  3. 快乾水泥:幾分鐘就乾那種。用時要加水。

製作過程, 請睇片:

How to ram a clay plug for fireworks

2009年7月4日星期六

點 整 煙 花 引

材料:毛冷(貓玩那種)、打火機白電油

1.剪一截毛冷
2.倒出白電油(不用太多,剛好夠查衡毛冷就得)
3.將白電油查衡整條毛冷
4.等毛冷曬乾/風乾

還有另一方法

2009年6月17日星期三

黑 火 藥

材料:
  1. 硝酸鉀 potassium nitrate (別名:硝石 saltpeter)
    可到 九龍城 啟德道 或 其他化工源料舖有售.二十元一磅左右. (別買多,免人懷疑)
    65% (eg:65g)

  2. 炭 clarcoal
    超市有售
    20% (eg:20g)

  3. 硫磺 sulfur
    藥房有售
    15% (eg:15g)

  4. 熱水 少許
唔想煩可以當是 15匙羹 硝酸鉀 / 3匙羹 炭 / 2匙羹 硫磺

各材料比率以重量計算
  1. 先將三種材料分別倒在各器皿裡(最好用瓷碗).

  2. 用硬物(瓷匙)把各材料磨致極幼粉狀.

  3. 加小許熱水落硝酸鉀使其剛好濕透再攪勻.

  4. 把磨好的硫磺和炭一齊倒進硝酸鉀,然後把其攪致全呈深灰色(約數分鍾).

  5. 最後把這些混合物放在太陽下曬乾(最好)或室內陰乾.

這些灰色的粉末就是火藥了.

有片睇How to make fast black powder or gun powder

How to Make Fast Black Powder - The most popular videos are a click away

  • 74.64p_11.85s_13.51c = best ratio
  • 75p_10s_15c = industry standard
  • 古代中國人: 1硝 2硫 3 炭,但注意不是1:2:3!
    說的是一硝,二硫,三碳 (1斤=16兩)
    正確比例:75%硝酸鉀:10%硫磺:15%木炭粉 (標準配方哦~)

2009年4月21日星期二

php image manipulation

Create a thumbnail

function createThumbnail($img, $imgPath, $suffix, $newWidth, $newHeight, $quality)
{
// Open the original image.
$original = imagecreatefromjpeg("$imgPath/$img") or die("Error Opening original");
list($width, $height, $type, $attr) = getimagesize("$imgPath/$img");

// Resample the image.
$tempImg = imagecreatetruecolor($newWidth, $newHeight) or die("Cant create temp image");
imagecopyresized($tempImg, $original, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height) or die("Cant resize copy");

// Create the new file name.
$newNameE = explode(".", $img);
$newName = . $newNameE[0] .. $suffix .‘.’. $newNameE[1] .;

// Save the image.
imagejpeg($tempImg, "$imgPath/$newName", $quality) or die("Cant save image");

// Clean up.
imagedestroy($original);
imagedestroy($tempImg);
return true;
}
?>

Rotate

function rotateImage($img, $imgPath, $suffix, $degrees, $quality, $save)
{
// Open the original image.
$original = imagecreatefromjpeg("$imgPath/$img") or die("Error Opening original");
list($width, $height, $type, $attr) = getimagesize("$imgPath/$img");

// Resample the image.
$tempImg = imagecreatetruecolor($width, $height) or die("Cant create temp image");
imagecopyresized($tempImg, $original, 0, 0, 0, 0, $width, $height, $width, $height) or die("Cant resize copy");

// Rotate the image.
$rotate = imagerotate($original, $degrees, 0);

// Save.
if($save)
{
// Create the new file name.
$newNameE = explode(".", $img);
$newName = . $newNameE[0] .. $suffix .‘.’. $newNameE[1] .;

// Save the image.
imagejpeg($rotate, "$imgPath/$newName", $quality) or die("Cant save image");
}

// Clean up.
imagedestroy($original);
imagedestroy($tempImg);
return true;
}

?>

Resize

function resizeImage($img, $imgPath, $suffix, $by, $quality)
{
// Open the original image.
$original = imagecreatefromjpeg("$imgPath/$img") or die("Error Opening original ($imgPath/$img)");
list($width, $height, $type, $attr) = getimagesize("$imgPath/$img");

// Determine new width and height.
$newWidth = ($width/$by);
$newHeight = ($height/$by);

// Resample the image.
$tempImg = imagecreatetruecolor($newWidth, $newHeight) or die("Cant create temp image");
imagecopyresized($tempImg, $original, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height) or die("Cant resize copy");

// Create the new file name.
$newNameE = explode(".", $img);
$newName = . $newNameE[0] .. $suffix .‘.’. $newNameE[1] .;

// Save the image.
imagejpeg($tempImg, "$imgPath/$newName", $quality) or die("Cant save image");

// Clean up.
imagedestroy($original);
imagedestroy($tempImg);
return true;
}

?>

Reduce

function reduceImage($img, $imgPath, $suffix, $quality)
{
// Open the original image.
$original = imagecreatefromjpeg("$imgPath/$img") or die("Error Opening original ($imgPath/$img)");
list($width, $height, $type, $attr) = getimagesize("$imgPath/$img");

// Resample the image.
$tempImg = imagecreatetruecolor($width, $height) or die("Cant create temp image");
imagecopyresized($tempImg, $original, 0, 0, 0, 0, $width, $height, $width, $height) or die("Cant resize copy");

// Create the new file name.
$newNameE = explode(".", $img);
$newName = . $newNameE[0] .. $suffix .‘.’. $newNameE[1] .;

// Save the image.
imagejpeg($tempImg, "$imgPath/$newName", $quality) or die("Cant save image");

// Clean up.
imagedestroy($original);
imagedestroy($tempImg);
return true;
}

?>

The simple instructions I used for the examples

$thumb = createThumbnail($img, $imgPath, "-thumb", 120, 100, 100);
$rotate = rotateImage($img, $imgPath, "-rotated", 270, 100, 1);
$resize = resizeImage($img, $imgPath, "-resized", 2, 100);
$reduce = reduceImage($img, $imgPath, "-reduced", 70);
?>

Those are the function calls i used to create the images linked to below.

createThumbnail variables
image file
image file path
suffix to append to the name before the .jpg
thumbnail width
thumbnail height
thumbnail quality

rotateImage variables
image file
image file path
suffix to append to the name before the .jpg
degrees to rotate (anticlockwise i think) by
image quality
save or not (if you wanted to output to a temp to preview, i dont use it, so leave as 1

resize variables
image file
image file path
suffix to append to the name before the .jpg
resize by (i used 2 which i thought was half.. not so hot on the maths)
image quality

reduce variables
image file
image file path
suffix to append to the name before the .jpg
quality (100 best, 0 worst… Duhh).

Here are the links to my examples
Original File (904k (1840×1232))
Thumbnail (16k (120×100))
Resized and Reduced (24k (368×246))


ref: http://nodstrum.com/2006/12/09/image-manipulation-using-php/#more-7

2009年4月16日星期四

電腦跑得太慢, 有何妙法?

電腦跑得太慢, 有何妙法?

灌軟體也能輕鬆清除系統垃圾檔案(加強版)+發揮你網路應有的速度!! 是否注意到你的電腦系統磁盤的可用空間正在一天天在減少呢?是不是動作一天比一天遲緩呢?


在Windows在安裝和使用過程中都會產生相當多的垃圾文件,包括臨時文件(如:*.tmp、*._mp)日誌文件(*.log)、臨時幫助文件(*.gid)、磁盤檢查文件(*.chk)、臨時備份文件(如:*.old、*.bak)以及其他臨時文件。特別是如果一段時間不清理IE的臨時文件夾「Temporary Internet Files」,其中的緩存文件有時會佔用上百MB的磁盤空間。這些LJ文件不僅僅浪費了寶貴的磁盤空間,嚴重時還會使系統運行慢如蝸牛。現在就讓我們一起來快速清除系統垃圾吧!!

下面是步驟很簡單就兩步!

打開「記事本」,把下面的字複製進去,點「另存為」,把文件名定為「清除系統垃圾.bat」就完成,記住後副檔名一定要是.bat,好ok了!你的垃圾清除器就這樣製作成功了!雙擊它就能很快地清理垃圾文件,大約一分鐘不到。

@echo off
echo 正在清除系統垃圾檔案中,請稍候......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
DEL /S /F /Q "%systemroot%\Temp\*.*"
DEL /S /F /Q "%AllUsersProfile%\「開始」功能表\程式集\Windows Messenger.lnk"
RD /S /Q %windir%\temp & md %windir%\temp
RD /S /Q "%userprofile%\Local Settings\Temp"
MD "%userprofile%\Local Settings\Temp"
RD /S /Q "%systemdrive%\Program Files\Temp"
MD "%systemdrive%\Program Files\Temp"
RD /S /Q "%systemdrive%\d"
net user aspnet /delete
echo 清除系統垃圾檔案完成!!
echo. & pause

==============================
複製上面的字

以後只要雙擊運行該文件,當屏幕提示「清除系統垃圾完成!就還你一個「苗條」的系統了!!到時候再看看你的電腦,是不是急速如飛呢?

電腦當了不用重灌

電腦當了不用重灌

有時候,會因為某些不明原因造成無法進入Windows系統中,甚至連安全模式都沒辦法起動。
若你的硬碟資料都還在的話,那可以利用scanreg這個登錄檔程式,讓你的系統恢復至幾天前的模樣......

操作方式如下:
1當開機進入Windows之前,按[F8]
2選擇[5.Cmmand prompt only]項
3出現C:\\>後,輸入scanreg /restore
4選擇一個日期檔,注意日期盡量是電腦未死當機前的日期,輕輕地按下ENTER.....就可恢愎原貌

2009年4月1日星期三

幫xp減肥

咁簡單啦...

首先....關閉 "系統還原" 及 關閉 "分頁檔案"

再來...刪除以下的檔案

C:\WINDOWS\Driver Cache\i386 (刪除入便所有檔案)

C:\WINDOWS\system32\dllcache (刪除入便所有檔案)

C:\WINDOWS\ime (只係保留要用的輸入法,刪除唔要的檔案)

C:\WINDOWS\Help (刪除入便所有檔案)

刪除左以上的野...應該都清左唔少出來嫁啦..