Zack Notes
Tools for Kid's Coding
Written by Zack Saturday, 21 August 2010 13:21
ကြၽန္ေတာ္တို႔ေတြ Programming ကို ေသခ်ာတတ္ေျမာက္ဖို႔ အေရးၾကီးတဲ့ အရာေတြက
Thinking ေတြ၊ Concept ေတြပဲ ျဖစ္ပါတယ္။ အဲဒါေတြကို ေသခ်ာမသိပဲအာဂုံေဆာင္
ေနမယ္ဆိုရင္ေတာ့တကယ္လက္ေတြ႔မွာ အသုံးမဝင္တဲ့ အျပင္ ဒုကၡ ေရာက္သြားႏိုင္တဲ့
အေနအထား ရွိပါတယ္။ ဒါကလည္း ေလ့လာသင္ယူ သူေတြကိုပဲ အျပစ္ေျပာလို႕ မရ
ဘူးလို႕ ထင္ပါတယ္။ ကြၽန္ေတာ္ Programming ကိုစလုပ္တဲ့ ၂၀၀၁/၀၂ ေလာက္တုန္း
ကဆရာေျပာ လိုက္တဲ့ lopping ေတြ၊ IF-ELSE ေတြကို ေလ့က်င့္ဖို႔ resource ဆိုလို႕
စာရြက္ေလာက္သာ ကိုယ့္မွာ ရွိေနတာကိုး။ ဒါေၾကာင့္ လည္းစိတ္မဝင္စားသူေတြ အဖို႔ စာေမးပြဲေအာင္ေရး အတြက္ အာဂုံေဆာင္
အဆင့္မွာပဲ ဆုံးခန္းတိုင္ သြားတာေတြကို ကြၽန္ေတာ္ေတြ႔ဖူးပါတယ္။ Programming ရဲ႕ Thinking ေတြ Conpect ေတြ Mathematical
and Momputational ideas ေတြ ကို အလြယ္တကူရဖို႔ Tools ေတြ၊ Resource ေတြကို တကယ္ပဲ
မရွိေတာ့ဘူးလား??? ရွိတာေပါ့ဗ်ာ ![]()
ကြၽန္ေတာ္တို႔ေတြ အေၾကာင္း အမ်ိဳးမ်ိဳးေၾကာင့္ မသိခဲ့ မသုံးႏိုင္ခဲ့တာေတြ ကိုေျပာမေနေတာ့ပဲ ေနာက္မ်ိဳးဆက္ေတြ သိျပီး သုံးႏိုင္ေအာင္
လုပ္တာ ေပးၾကတာေပါ့ဗ်ာ။ အေနာက္ႏိုင္ငံေတြမွာ ၈ႏွစ္ အထက္ကေလးေတြကို Programming သင္ၾကားရာမွာ သုံးတဲ့ Tools ေတြ
အေၾကာင္းကို မိတ္ဆက္ေပးခ်င္ပါတယ္။ ကြၽန္ေတာ္ Tools ေတြအေၾကာင္းကို မစခင္ Microsoft's K-12 Computer Science
Academic Relations Manager ျဖစ္တဲ့ Alfred Thompson ရဲ႕ အဆိုေလးကို အရင္ဖတ္ၾကည့္ ေစခ်င္ပါတယ္။
We need to get students interested in computer science and that has to be done at an early age before they decide (incorrectly) that they can't do computer science or that it is dull and boring
1. Scratch
Scratch ဆိုတာကေတာ့ MIT Media Lab ကေန ၈ႏွစ္ အထက္ကေလးေတြအတြက္ ရည္ရြယ္ထားတဲ့ graphical programming
language ပဲျဖစ္ပါတယ္။ ၂၀၀၇ မွာ စျပီး release လုပ္ခဲ့တဲ့ scratch ဟာ ခုလက္ရွိခ်ိန္မွာ Projects ေပါင္း one million
ရွိေနျပီး ျဖစ္ပါတယ္။ Scratch ကိုသုံးျပီး ကိုယ္ပိုင္ animations, games, music, and art ေတြကို ဖန္တီးကာ web ေပၚမွာ
share ႏိုင္ပါျပီ။ Sharing project ေတြကို download လုပ္ျပီး remix လည္းလုပ္ႏိုင္ပါတယ္။ Scratch ကိုေလ့လာ ခ်င္တယ္ ဆိုရင္ေတာ့
ဒီမွာ Free Download လုပ္ႏိုင္ျပီး Scratch Wiki ကို လည္းဖတ္ၾကည့္ ႏိုင္ပါတယ္။ ဒါကေတာ့ Scratch Developer ေတြ၊
သုံးေနတဲ့ ေက်ာင္းသား ကေလးငယ္ေတြရဲ႕ video ေလးပါ။
2. App Inventor
Google ကေနျပီး andriod သုံးစြဲသူေတြကို သာမန္ user အဆင့္ကေန creator လုပ္ႏိုင္ေအာင္ ဖန္တီးေပးထားတဲ့
application ေလးတစ္ခု ျဖစ္တယ္လို႕ Professor Harold Abelson ေျပာခဲ့တဲ့ အတိုင္း သာမန္ user ေတြ ဘယ္ေလာက္
လုပ္ေဆာင္ႏိုင္တယ္ ဆိုတာ ေအာက္က video ေလးကို ၾကည့္ရင္ သိပါလိမ့္မယ္။ Beta version သာရွိေနတဲ့ App Inventor ရဲ႕
Activity ေတြကို ဒီမွာ ဖတ္ႏိုင္ပါတယ္။
3. Alice
ေနာက္နာမည္ၾကီး တစ္ခုကေတာ့ Carnegie Mellon University က Product တစ္ခုျဖစ္တဲ့ Alice ဆိုတဲ့ open source 3D
programming ပဲျဖစ္ပါတယ္။ Alice မွာ Graphic ေတြကို drag & drop ေတြနဲ႔ပဲ object-oriented၊ event-driven program ေတြကို
လြယ္ကူစြာ ဖန္တီးႏိုင္ ပါတယ္။ ကိုယ့္မွာ Thinking နဲ႔ Concept ရွိမယ္ဆိုရင္ အလြယ္တကူ အသုံးျပဳ ႏိုင္မွာ ျဖစ္ပါတယ္။ သူလည္းပဲ
Free ရႏိုင္ျပီး platform အေတာ္ေတာ္ မ်ားမ်ား ေျပာမယ္ဆိုရင္ (Win,Lunix,Mac) ေတြအားလုံးမွာ အလုပ္လုပ္ပါတယ္။ ဒါကေတာ့
Carnegie Mellon University က Alice's developer ေတြေျပာျပထားတဲ့ video ေလးတစ္ခုျဖစ္ပါတယ္။
4. Small Basic
Microsoft ရဲ႕ Small Basic ကေတာ့ "Programming is Fun" လို႔ဆိုထားျပီး သူရဲ႕ user friendly ျဖစ္တဲ့ development
environment ေတြအျပင္ မ်ားျပား ျပည့္စုံတဲ့ Library Files ေတြေၾကာင့္ ကိုယ္ပိုင္ game တစ္ခု၊ application တစ္ခုကို
ဖန္တီး ႏိုင္ပါတယ္။ ကိုယ္ဖန္တီးထားတဲ့ program ေလးကို သူငယ္ခ်င္းေတြကို share ခ်င္ရင္လည္း ကိုယ့္ Blog, Website မွာ
ရွိေနတာကို Silverlight player နဲ႔ ကစားႏိုင္ပါတယ္။ ဒါအျပင္ Small Basic ဟာ .net ရဲ႕ အေျခခံ concept ေတြစုစည္းထား
တာေၾကာင့္ ေနာက္ပိုင္း .net ကိုဆက္ျပီး ေလ့လာ ခ်င္သူေတြ အတြက္ ပိုသင့္ေတာ္ မယ္ထင္ပါတယ္။
5. Kodu
သူလည္းပဲ Microsoft ရဲ႕ Product တစ္ခု ျဖစ္ျပီး Xbox ေပၚမွာ run ႏိုင္မယ့္ games ေတြကို ဖန္တီး ႏိုင္မယ့္ programming
environment တစ္ခု ျဖစ္ပါတယ္။ Kodu မွာ classical programming languages ေတြလို႔ လုပ္ေဆာင္ႏိုင္တဲ့ အျပင္ Icon based နဲ႔
program အလြယ္တကူ ေရးလို႕ ရေအာင္ လုပ္ေဆာင္ထား တာေၾကာင့္လည္း နာမည္ၾကီး ျဖစ္ႏိုင္ပါတယ္။ Game တစ္ခုဖန္တီးဖို႔
ဘယ္ေလာက္လြယ္တယ္ ဆိုတာ 2009 CES မွာ Microsoft ကျပသြားတဲ့ Video ေလးျဖစ္ပါတယ္။
6. Lego Mindstorms
ဒီတစ္ခါေတာ့ software application တစ္ခုမဟုတ္ပဲ programmable robotics တစ္ခုျဖစ္တဲ့ robot ေလးတစ္ခုျဖစ္ပါတယ္။
ဒါေလးကေတာ့ ကေလးငယ္ ေလးေတြအတြက္ ပိုျပီး အဆင္ေျပ သင့္ေတာ္ မယ္လို႕ ထင္ပါတယ္။
Computer Science ကေပးတဲ့ logic, critical thinking, problem solving ေတြဟာ ဘယ္ field မွာ မဆို apply ျပန္လုပ္ႏိုင္ျပီး
baseline တစ္ခု အေနနဲ႔ ရွိေနတာေၾကာင့္ ေနာက္မ်ိဳးဆက္ေတြကို ဒီလို Programming ကိုေလ့လာ သင္ယူဖို႔ လြယ္ကူေစမယ့္
Tools/Programming ေတြကို ေျပာျပၾကရ ေအာင္လာဗ်ာ။ MMTuts မွာလည္း ကိုသီဟေရးထားတဲ့ ဒီ Article ႏွစ္ခုကို ဆက္ျပီး
ဖတ္ေစခ်င္ပါတယ္။
Ref: http://www.readwriteweb.com/archives/4_tools_for_teaching_kids_to_code.php
Google Font API
Written by Zack Friday, 20 August 2010 21:01
Google Font API ကို သုံးခ်င္တဲ့ သူေတြ အတြက္ ဒီ videos ေလးေတြ ၾကည့္သင့္ပါတယ္။ အသုံးျပဳပုံကို ကြၽန္ေတာ္ေရးရင္ေတာင္
႐ႈပ္သြားႏိုင္တယ္။ Video ထဲမွာ လုပ္ျပသြားတာ အရမ္း ရွင္းလင္းပါတယ္။ တစ္ခုပဲ ကိုယ့္ custom font ကိုေတာ့ Google Font
Directory ထဲထည့္လို႕ မရဘူးဗ်ာ။ 
NTFS in Mac
Written by Zack Sunday, 15 August 2010 10:37
ကြၽန္ေတာ္တို႔ Mac ေပၚမွာ External Hard Disk ေတြကို တက္လိုက္တဲ့ အခါ read only ပဲျဖစ္ တတ္ပါတယ္။ Mac က HFS
(Hierarchical File System) ကိုသုံးပါတယ္။ External Hard Disk ေတြက မ်ားေသာ အားျဖင့္ NTFS (New Technology
File System) ေတြျဖစ္ပါတယ္။ ဒီျပသနာကို ေျဖရွင္းဖို႔ နည္းလမ္းေတြကို လိုက္ရွာေတာ့။
1) Mac ေရာ၊ Window မွာပါ အဆင္ေျပမယ့္ FAT ကိုေျပာင္းျခင္း
ဒီနည္းကေတာ့ Hard Disk ထဲ data ေတြရွိေနရင္ အဆင္မေျပဘူးဗ်။ ဒီမွာ ဖတ္ၾကည့္ျပီး လုပ္ၾကည့္ႏိုင္ပါတယ္။
2) MacFuse ကိုသုံးျခင္း
NTFS ေတြကို FAT ေျပာင္းစရာ မလိုပဲ RW ရေအာင္ လုပ္ေပးထားတဲ့ third party တစ္ခုပဲျဖစ္ပါတယ္။ ဒီမွာ MacFuse ကို
download လုပ္ျပီး အရင္ထည့္ပါ။ ျပီးရင္ေတာ့ NTFS-3G Read/Write Driver ကို ဒီမွာ ဆက္ download လုပ္ျပီး ထည့္ေပး
ရပါမယ္။ ေျပာမယ္ဆိုရင္ ႏွစ္ခု install လုပ္ဖို႔ လိုပါတယ္။ ဒီ link ကေတာ့ reference လုပ္ဖို႔ အဆင္ေျပမယ္။
3) Command ကိုသုံးျခင္း
Command သုံးျပီး ေျပာင္းမယ္ ဆိုရင္ေတာ့ ဒီ video ေလးေကာင္းတယ္။
ကြၽန္ေတာ္သိသေလာက္ ေျပာထားတာ ျဖစ္လို႕ ဒီထက္ပိုေကာင္း တာေလးေတြ ရွိရင္လည္း ေျပာၾကပါ။
Run IE on Mac
Written by Zack Sunday, 15 August 2010 00:25
Mac ေပၚမွာ IE ကို install လုပ္ခ်င္တယ္ ဆိုရင္ ဒီ youtube movie ေလးကို ၾကည့္လိုက္ပါ။
File upload in CodeIgniter
Written by Zack Saturday, 14 August 2010 21:50
ဒီ Post မွာေတာ့ CI နဲ႔ File/Image Upload တင္တဲ့ အေၾကာင္းကို ေရးမွာ ျဖစ္ပါတယ္။ ကြၽန္ေတာ္ ေရးထားျပီးတဲ့ CI Post
အားလုံးကို ျပန္ဖတ္ခ်င္တယ္ ဆိုရင္ေတာ့
-
CodeIgniter and MVC for Beginners
-
Structure and Configuration of CodeIgniter
-
CodeIgniter Database Library
-
CodeIgniter Form Helper
-
Simple Data Entry in CodeIgniter
-
Pagination with CodeIgniter

PHP မွာ File Upload လုပ္တဲ့ concept ကိုေတာ့ သိထားဖို႔ လိုပါတယ္ ခင္ဗ်ာ။ ဒီေတာ့ w3schools ရဲ႕ ဒီ Article ေလးမွာ ျပန္ၾကည့္ ႏိုင္ပါတယ္။
အဲဒါကို CI သုံးျပီး ဘယ္လို ျပန္ေရးမလဲ ၾကည့္ရေအာင္ 
1) Change in config.php and autoload.php
config.php မွာ သင့္ေတာ္သလို ျပင္ေပးျပီး autoload.php မွာလဲ $autoload['helper'] ထဲကို file,form,url ေတြထည့္ ေပးရမယ္။
<html>
2) Create View
fileupload_view.php
<head>
<title>FIle Upload Tutorial By CodeIgniter</title>
</head>
<body>
<?
echo form_open_multipart('fileupload');
echo form_upload('userfile');
echo form_submit('upload', 'Upload');
echo form_close();
?>
</body>
</html>
ဒါကေတာ့ Form helper ကိုသုံးျပီး view တစ္ခုကို create လုပ္တာ ျဖစ္ပါတယ္။ ကြၽန္ေတာ္ Form helper ကိုေရးတုန္းက
ရွင္းထားျပီး ျဖစ္လို႔ usage ေတြကို ထပ္မရွင္းခ်င္ေတာ့ပါ။ ဒီမွာ ျပန္ဖတ္ၾကည့္ႏိုင္ပါတယ္။
3) Create Controller
View ကိုေခၚဖို႔ controller တစ္ခု လုပ္ပါမယ္။ fileupload.php လို႔ လုပ္လိုက္ပါမယ္။ Code ကေတာ့ <?php
class Fileupload extends Controller {
function index() {
$this->load->view('fileupload_view');
}
}
ဒီအဆင့္ ျပီးလို႕ run ၾကည့္ရင္ေတာ့ ဒီလိုျမင္ရမယ္ဗ်ာ။

4) Create Model
file upload လုပ္တဲ့ Code ေတြအားလုံးကို model ထဲမွာမယ္လို႔ စိတ္ကူးလို႕ model တစ္ခုကို create လုပ္တာ ျဖစ္ပါတယ္။
တကယ္လို႕ controller ထဲမွာပဲ ဆက္ခ်င္ရင္လဲ ရတယ္ဗ်ာ။ application နဲ႔ level တူ "upload" folder နဲ႔ အဲဒီေအာက္မွာ
"thumbs" folder ကို create လုပ္ထားဖို႔ လိုပါတယ္။

fileupload_mod.php is here:
<?php
class Fileupload_mod extends Model {
function Fileupload_mod() {
parent::Model();
}
function do_fileupload() {
$config['upload_path'] = './upload/';
$config['allowed_types'] = 'gif|jpg|png';
$this->load->library('upload', $config);
if (!$this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
echo $error;
}
else
{
$image_data = $this->upload->data();
}
$config = array(
'source_image' => $image_data['full_path'],
'new_image' => './upload/thumbs',
'maintain_ration' => true,
'width' => 150,
'height' => 100
);
$this->load->library('image_lib', $config);
$this->image_lib->resize();
}//do_fileupload
}
အားလုံးျပီးသြားရင္ေတာ့ controller code ကိုဒီလိုေလး ျပန္ျပင္ ေပးလိုက္ရေအာင္။ model ကိုေခၚထားတဲ့ code ေတြရွိလို႕ ဒီလိုေလး ျပင္လိုက္မွ
perfect ျဖစ္သြားပါမယ္။
<?php
class Fileupload extends Controller {
function index() {
$this->load->model('Fileupload_mod');
if ($this->input->post('upload')) {
$this->Fileupload_mod->do_fileupload();
}
$this->load->view('fileupload_view');
}
}
ဒါကေတာ့ upload library ကို loading လုပ္ဖို႔ လိုအပ္တဲ့ parameter ေတြကို $config ထဲကို ထည့္ပါတယ္။
ကိုယ့္ requirement အရ လိုအပ္တဲ့ preference variable ေတြကို ဒီဇယားမွာ ၾကည့္ႏိုင္ပါတယ္။

$this->upload->do_upload ဒါဆိုရင္ေတာ့ upload လုပ္သြားျပီဗ်ာ။ error တက္ရင္ေတာ့ error ကို ႐ိုက္ျပမယ္။ error မရွိရင္ေတာ့
thumbnail image တစ္ခုကို ဆက္ျပီး create လုပ္ၾကည့္မယ္။ မျဖစ္မေန လုပ္ရမွာေတာ့ မဟုတ္ပါဘူး။ တကယ္လို႕ ကိုယ့္က image
ကို thumbnail အတြက္ပါ လိုခ်င္တယ္ ဆိုရင္ေတာ့ ဒီလိုလုပ္ေပးရပါမယ္။
$this->load->library('image_lib', $config);
$this->image_lib->resize();
image_lib library ကို load လုပ္ဖို႔ $config variable ထဲကို လိုအပ္တာေတြကို တစ္ခါျပန္ျပီး ထည့္ပါတယ္။ thumbnail လုပ္ဖို႔လိုအပ္တဲ့
'source_image' => $image_data['full_path'], ခုန upload လုပ္ထားတဲ့ image ရဲ႕ path ကိုေျပာတာပါ။
'new_image' => './upload/thumbs', thumb image ကိုထားမယ့္ ေနရာပါ။
'maintain_ration' => true, original image ရဲ႕ ratio ကိုဆက္ျပီး maintain လုပ္မလုပ္ပါ။
'width' => 150, thumb image ရဲ႕ width
'height' => 100 thumb image ရဲ႕ height
ဒါဆိုရင္ေတာ့ Thumb image ကိုပါ create လုပ္သြားျပီဗ်ာ။ upload နဲ႔ thumb folder ေတြမွာ upload လုပ္ထားတဲ့ image ေတြကို
ၾကည့္ႏိုင္ပါတယ္။ ကြၽန္ေတာ္ လုပ္ထားတဲ့ code ကိုဒီမွာ down ျပီးေတာ့ စမ္းၾကည့္ႏိုင္ပါတယ္။ အဆင္ေျပ ပါေစဗ်ာ။
Share me for Joomla 1.5
Written by Zack Saturday, 14 August 2010 00:09
Joomla မွာ Facebook, Buzz, Twitter စတဲ့ Social Networks ေတြမွာ ကိုယ့္ Article ကို Share လုပ္ခ်င္ေတာ့ ဒီ
Plugin ေလးကေကာင္းတယ္ဗ်။

http://extensions.joomla.org/extensions/social-web/republish/11283
More Articles...
Page 1 of 30
«StartPrev12345678910NextEnd»Latest Post
Login Form
Categories Table View
- Reader's Conner (103)
- PHP (45)
- Joomla CMS (36)
- Codeigniter (10)
- jQuery (6)
- PHP & AJAX (4)
- Apache (3)
- For Mac (3)
- mySQL (2)
