Jan
19
2012

working with git

Git ကို အရင်ရုံး point-star မှာ စသုံးဖူးတာပါ။ git ဆိုတာကို အရင်တုန်းကတော့ opensource တွေကို download ဆွဲချပြီး သုံးဖို့လောက်ပဲ သုံးဖြစ်တယ်။ point-star မှာ github သုံးရမယ်ဆိုတာနဲ့ github ကို လေ့လာဖြစ်တာပဲ။ github နဲ့ git အစတုန်းက လုံးဝ ကို မကွဲတာ။ github သုံးရင်းနဲ့ git နဲ့ github မတူဘူးဆိုတာ သိလာတာ။ git သုံးတတ်ပြီးနောက်ပိုင်းမှာ github မှာ opensource project တွေ တင်ဖြစ်တယ်။ သို့ပေမယ့် တစ်ယောက်တည်းပဲ ဖြစ်တဲ့အတွက် git အကြောင်းကို ကောင်းကောင်း မသိခဲ့ဘူး။ အရင်ရုံးတုန်းကလည်း တစ်ယောက်တည်းလိုလို ဖြစ်နေတဲ့အတွက် မထူးခြားလှဘူး။ backup သာသာ ရှိပါတယ်။ ဒီရုံးရောက်တော့ repo သုံးမယ် ဆိုတော့ ကျွန်တော်က bitbucket ကို recommend လုပ်ခဲ့တယ်။ သို့ပေမယ့် bitbucket က hg ပဲ support လုပ်တယ်။ ဒါကြောင့် [...]

Dec
12
2011

How to manage Git Repository Server with Gitosis?

ပရောဂျက်တစ်ခုချင်းအလိုက် Permission မလိုအပ်ရင်နဲ့ လူနည်းရင်တော့ Authorized Key နဲ့အဆင်ပြေပါတယ်။ ဒါပေမယ့် Permission တွေလိုအပ်လာပြီ နောက်ပြီးတော့ Repository Initialization တွေ User Management တွေလိုလာရင်တော့ Authorized Key နဲ့မလုံလောက်တော့ပါဘူး။ အသုံးများတာကတော့ Gitosis နဲ့ Gitolite သုံးကြပါတယ် ကောင်းတာကတော့ နှစ်ခုလုံးကောင်းပါတယ် တစ်ခုတော့ရှိပါတယ် Gitosis ကတော့ Development ရပ်နေတာ အတော်လေးကြာနေပါပြီ။ Gitosis ကို Setup လုပ်ရတာ သိပ်မခက်ပါဘူး အရင်ဆုံးတော့ Gitosis ကိုသူ့ရဲ့ Repository ကနေ Clone လုပ်ယူရပါတယ်။ အကယ်လို့ Ubuntu လိုသုံးရင်တော့ သူ့ရဲ့ Repo ထဲကနေ apt-get နဲ့ Install လုပ်လို့ရပါတယ် ဒါပေမယ့်သူက User creation တွေပါလုပ်ကုန်လို့ မလိုတဲ့ဟာတွေပါလို့ ကိုယ်တိုင်ပဲ Install လုပ်ယူတာကပိုပြီး ကိစ္စရှင်းပါတယ်။ အောက်မှာပြထားတဲ့ Commands တွေနဲ့ Gitosis ကို Install လုပ်ယူလိုက်ပါ။ root@gitserver:~# git clone git://eagain.net/gitosis.git [...]

Nov
28
2011

How to setup a simple Git Repository Server?

Git Server တစ်ခုလုပ်ယူရတာ သိပ်ပြီးတော့ မခက်ခဲလှပါဘူး ရုံးမှာတစ်ယောက်တစ်ပေါက် Revision Control တစ်ခုခုတင်ပေးပါ ပြောပြောနေလို့ Git Server တစ်ခုလုပ်ပေးဖို့ တာဝန်ကျလာပါတယ်။ Server ပေါ်မှာ Git အတွက် User Account တစ်ခုခွဲထားလို်က်ပြီး Repository တွေကိုသိမ်းလို့ရပါတယ်။ အလွယ်ဆုံးနည်းကတော့ ခွဲထားတဲ့ User Account တစ်ခုနဲ့ အားလုံးသုံးမှာဖြစ်တဲ့အတွက် Password ကိုအားလုံးကို ပေးထားတာထက် Authorized Key နဲ့ဝင်တာ အဆင်အပြေဆုံးပါပဲ။ အောက်မှာပြထားတဲ့ Command တွေနဲ့ git ဆိုတဲ့ User တစ်ယောက်ကို Create လုပ်လို့ပြီး Authorized Key အတွက် Folder တစ်ခုထည့်လို့ရပါတယ်။ root@gitserver:~# adduser -m git root@gitserver:~# su git git@gitserver:~$ cd ~ git@gitserver:~$ mkdir .ssh ပြီးပြီဆိုရင်တော့ ကိုယ့်ရဲ့ Git Server ကိုသုံးမယ့်လူတွေရဲ့ Public Key တွေကို .ssh အောက်ထဲမှာ authorized_keys ဆိုတဲ့ဖိုင် [...]

Nov
23
2011

iOS Resources for developer

iosresourcefeature

iOS developer တွေ အနေနဲ့ အသုံးဝင်တဲ့ resource အချို့တွေက Cocoa Control iOS မှာ အခြား သူတွေ အသုံးပြုထားတဲ့ control တွေကို လွယ်လင့် တကူ ရှာဖွေ အသုံးပြုနိုင်ပါတယ်။ တော်တော်များများကတော့ github မှာ share ထားပြီးထားသားပါ။ http://cocoacontrols.com က resource တွေ အားလုံးကို စုစည်းထားပေးတာပါ။ တော်တော်လေးကို အသုံးဝင်ပါတယ်။ ဥပမာ။။ twitter ipad version လိုမျိုး ဖန်တီးချင်တယ်ဆိုရင် လွယ်လင့်တကူ ရှာဖွေနိုင်ပါတယ်။ iOS Weekly iosdevweekly.com ကို iOS Developer တိုင်း subscribe လုပ်ထားသင့်ပါတယ်။ အပတ်စဉ် iOS devleopment နဲ့ ပတ်သက်ပြီး အသုံးဝင်တဲ့ newsletter တွေ ပို့ပေးပါတယ်။ ပုံမှန်အားဖြင့် News , Design, Code , Tool ဆိုပြီး Section ၄ ခု ပါပါတယ်။

Oct
16
2011

CodeAcedamy

Programming ကိုလေ့လာချင်တယ်။ Programming ဆိုတာ ဘာလဲ။ Programming နဲ့ ပတ်သက်ပြီး ဘာမှ မသိဘူး။ ဒါပေမယ့် လေ့လာကြည့်ချင်တယ်ဆိုတဲ့ သူတွေအတွက် CodeAcedamy က ဖန်တီးပေးထားပါတယ်။ javascript ကို လေ့လာချင်တဲ့ သူတွေအတွက်ကတော့ တော်တော် အဆင်ပြေပါတယ်။ အခု အချိန်မှာတော့ Course က ၂ ခု ပဲ ရှိပါသေးတယ်။ သို့ပေမယ့် contribute လုပ်ထားတဲ့ course တွေကတော့ တော်တော်များများရှိပါတယ်။ အခုထက်ထိတော့ အကုန်လုံးကို တင်မထားသေးပါဘူး။

Jul
28
2011

Design Resources

designfeature

UI Design Resource ဆိုပြီးတော့ Post ရေးခဲ့ဖူးပါတယ်။ အခုတလော သဘောကျတဲ့ Design နဲ့ ပတ်သက်တဲ့ resources လေးတွေကို ပြောပြချင်ပါတယ်။ premiumpixels premiumpixels.com ကို Smashing Magazine က ညွှန်းလို့ တွေ့ခဲ့ပါတယ်။ 365psd.com လောက် အမြောက်အများမရှိပေမယ့် လှပတဲ့ UI design PSD တွေကို အခမဲ့ လွတ်လပ်စွာ သုံးခွင့်ပေးထားပါတယ်။ License နဲ့ ပတ်သက်ပြီးတော့ All resources made available on Premium Pixels, including but not limited to, icons, images, brushes, shapes, layer styles, layered PSD’s, patterns, textures, web elements and themes are free for use in both personal and commercial projects. လို့ ဆိုထားတဲ့အတွက်ကြောင့် ကိုယ့်ရဲ့ [...]

Jul
9
2011

Making Todolist with node.js and mongo Part VII

nodefature

အခု task တစ်ခု ပြီးသွားတဲ့ ကိစ္စကို သွားရအောင်။ Done ကို နှိပ်လိုက်တာနဲ့ /done/:id ကို သွားမယ်။ ပြီးရင် ပြန်လာမယ်။ ဒါကြောင့် အောက်ကလို ရေးလိုက်တယ်။ ပြီးတဲ့ အခါ ကျွန်တော်တို့မှာ closeByid မရှိသေးဘူး။ closeByiD က username နဲ့ task id ပေါ်မှာ မူတည်ပြီး done ကို 1 ဆိုပြီး update လုပ်ပေးရမယ်။ ဒါကြောင့် set ကို သုံးပြီး current id သိအောင် $.done နဲ့ သုံးရမယ်။ code ကို အောက်မှာ ကြည့်လိုက်ပါ။ dataprovider.js မှာ အောက်ကလို ဖြည့်လိုက်တယ်။

Jun
28
2011

Making Todolist with node.js and mongo Part VI

nodefature

ကဲ … အခု ကျွန်တော်တို့ task list အတွက် mongodb ပြင်ဆင်ပြီးပြီ။ အခုတော့ mongodb အတွက် model တစ်ခု ဆောက်ပါမယ်။ data-provider.js အခု code လေးက ကျွန်တော်တို့တွေ ပထမဆုံး DataProvider module လေး စလိုက်တာပါ။ DB တစ်ခု ဆောက်တယ်။ ဆိုတာက ကျွန်တော်တို့တွေ collection ကို ခေါ်ဖို့ ဖန်တီးလိုက်တာပါ။ ကဲ အခု ကျွန်တော်တို့တွေ tasks တွေ အကုန်လုံးကို ထုတ်ကြည့်ဖို့ အတွက် ရေးပါမယ်။ taskcollection ကို user name နဲ့ ရှာလိုက်တယ်။ ပြီးတော့ result ကို callback ပြန်ပို့လိုက်တယ်။ အခု index.js တစ်ခုဖန်တီးပြီး ကျွန်တော်တို့ ဖန်တီးထားတဲ့ model ကို လှမ်းခေါ်သုံးပါမယ်။ ကျွန်တော်တို့ လိုအပ်တာတွေက express , mongodb နဲ့ jqtpl template engine ပါ။ ဒါကြောင့် အဲဒီ module [...]

Jun
20
2011

Making Todolist with node.js and mongo Part V

mongodbfeature

ရှေ့ပိုင်းမှာတော့ value တွေ ထည့်တာ task အသစ်ထပ်ဖြည့်တာတွေကို ပြောပြီးပါပြီ။ အခု Mongodb ကိုပဲ ရှေ့ဆက်ရအောင်။ Update Value အခု ကျွန်တော်တို့တွေ Task တစ်ခု done ဖြစ်သွားတဲ့ အခါမှာ done ကို 1 ပြောင်းပေးပါမယ်။ ဒီတော့ လက်ရှိ object ကို update လုပ်ရပါမယ်။ ဆိုပြီး ရိုက်လိုက်ပါ။ todo.id ဆိုတာက todo အောက်က id field ကို ညွှန်းလိုက်တာပါ။ id က 1 ဖြစ်ရမယ်ဆိုပြီး ညွှန်းလိုက်တာပါ။ $set ကတော့ ပြန်ပြင်ဖို့ပေါ့။ todo.$.done ဆိုတာကတော့ ကျွန်တော်တို့ ရှာတွေ့ထားတဲ့ array number အောက်က done field ကို 1 လို့ ပြင်လိုက်တာပါ။

Jun
12
2011

Making Todolist with node.js and mongo Part IV

mongodbfeature

အခုဆိုရင်တော့ mongodb ကို နည်းနည်း သဘောပေါက်သွားလောက်ပါပြီ။ အခု project structure ကို ရှင်းပြပါမယ်။ Project က Task တွေကို add မယ်။ Task Done ဖြစ်သွားရင် မှတ်ထားမယ်။ မလိုအပ်တဲ့ task တွေကို ပြန်ဖျက်မယ်။ ဒီတော့ data ကို အောက်ပုံစံနဲ့ သိမ်းလိုက်ပါတယ်။ data တွေကို username ပေါ်မှာ မူတည်ပြီး သိမ်းလိုက်ပါတယ်။ todo ကို array နဲ့ သိမ်းပါမယ်။ ဖြစ်မပြီးကို သိဖို့ အတွက် done ကို 0 နဲ့ 1 သတ်မှတ်ပါမယ်။ နောက်ဆုံး သိမ်းထားတဲ့ id နံပတ်ကို သိအောင် lastid နဲ့ သိမ်းထားလိုက်ပါတယ်။ MySQL မှာ auto increment မပါတဲ့အတွက် အသစ်ဖြည့်တာ အခါမှာ id ကို ကိုယ့်ဘာသာ ကိုယ် တိုးဖို့အတွက် သိမ်းခဲ့တာပါ။ Install Mongodb အရင်ဆုံး mongodb ကို [...]

Jun
11
2011

CSS Myanmar EBook

ဒီစာအုပ်ကို ရေးတာ ဘယ်လောက် ကြာလို့ ကြာသွားမှန်းတောင် မသိတော့ဘူး။ သေချာတာကတော့ ၁ နှစ်ကျော်သွားပြီဆိုတာပဲ။ ၁ နှစ်အတွင်းမှာ အားတဲ့ အချိန်တွေမှာ တဖြည်းဖြည်းခြင်းရေးခဲ့တာ အခုတော့ ပြီးသွားပါပြီ။ ကျွန်တော် ရေးတဲ့အချိန်တုန်းက CSS 3 က ပေါ်ကစဖြစ်ပြီး browser အားလုံး support မလုပ်သေးပါဘူး။ ဒါကြောင့် အခု CSS စာအုပ်မှာ CSS 3 အကြောင်းမပါလာခဲ့ပါဘူး။ စာလုံးပေါင်းမှားနေတာ ရေးထားတာမှားနေတာတွေကို ဝေဖန်ထောက်ပြနိုင်ပါတယ်ဗျာ။ Download

Jun
7
2011

Making Todolist with node.js and mongo Part III

mongodbfeature

ရှေ့ပိုင်းတွေမှာတော့ Node.js အကြောင်းပြောပြီးပါပြီ။ အခု အပိုင်းမှာတော့ mongodb အကြောင်း အနည်းငယ်ပြောပါမယ်။ Mongodb အကြောင်း ပြောပြီးမှပဲ project ရဲ့ တည်ဆောက်ပုံကို နားလည်မှာပါ။ Mongodb က NOSQL database ဖြစ်ပြီးတော့ document storage ကို အသုံးပြုထားပါတယ်။ Mongodb အကြောင်းကို ရေးဖူးပြီးသား ဖြစ်တဲ့အတွက်ကြောင့် အောက်က link တွေမှာ ဖတ်လိုက်ပါ။ http://www.saturngod.net/knowledgebase/nosql http://www.saturngod.net/knowledgebase/nosql-part-2 အဲဒါကို ဖတ်ပြီးရင်တော့ အမြန်ဆုံး လေ့လာရလွယ်အောင် http://www.mongodb.org/ မှာ Try It Out ကို နှိပ်ပြီး tutorial လေးကို လက်တွေ့ စမ်းသပ်နိုင်ပါတယ်။ အဲဒါလေး ပြီးရင်တောင project လေးကို စလို့ရပါပြီ။

Jun
5
2011

Making Todolist with node.js and mongo Part II

nodefature

အပိုင်း၁ မှာတော့ Node.js ဆိုတာ ဘာလဲ။ ဘယ်လို သွင်းရလဲ စတာတွေကို ရေးပြခဲ့ပြီးပါပြီ။ နောက်ပြီးတော့ hello world ဥပမာလေးလည်း ရေးပြခဲ့ပါတယ်။ သို့ပေမယ့် code လေးတွေကို မရှင်းပြရသေးပါဘူး။ အခု Hello World ရေးထားတဲ့ code လေးကို လေ့လာရအောင်။ ဆိုတဲ့ code မှာ require ဆိုတာကတော့ php မှာ include ခေါ်သလို python မှာ import လုပ်သလိုပေါ့။ Node.js မှာတော့ require က module တွေ ခေါ်တာပေါ့။ Module ဆိုတာက Node.js မှာ အရန်သင့် အသုံးပြုရန် အတွက် ရေးထားတဲ့ library တွေပါ။ System မှာ default ပါတဲ့ module တွေ ကို ခေါ်ပြီး အသုံးပြုလို့ရသလို Third Party Module တွေကိုလည်း ခေါ်ပြီးသုံးလို့ရပါတယ်။ Node.js မှာပါတဲ့ module အကြောင်းတွေကို ဒီမှာ ဖတ်နိုင်ပါတယ်။ [...]

Jun
3
2011

Making Todolist with node.js and mongo Part I

nodefature

Node.js နဲ့ Mongodb ကို အသုံးပြုပြီးတော့ Todo list လေး တစ်ခု တည်ဆောက်ပုံကို ရေးပြပါမယ်။ Todo list မှာ ဘာ feature တွေ ပါမလဲဆိုတော့ ထည့်မယ်။ ဖျက်ပြီ။ ပြီးသွားတဲ့ task တွေကို done လုပ်တာ ပါမယ်။ ဒီလောက်ပါပဲ။ Node.js အရင်တုန်းကတော့ Javascript ဆိုတာ web browser client side တွေမှာ အလုပ်လုပ်တဲ့ script ပါ။ အခုအခါမှာတော့ Google V8 ကြောင့် Javascript ကို server side မှာ အသုံးပြုလို့ရလာပါပြီ။ Node.js ဟာ Google V8 ကို အသုံးပြုထားတဲ့ Event I/O framework ပါ။ Node.js က အရမ်းကို မြန်ပါတယ်။ PHP ထက်လည်း မြန်ပါတယ်။ နောက်ပြီးတော့ Real Time application တွေ ဖြစ်တဲ့ Friendfeed , Google [...]

Jun
2
2011

Law of cosines , Pythagorean theorem with programming

triangle

မနေ့တုန်းက Wheel Image ပေါ်မှာ Touch Move နဲ့ ရွေ့ဖို့ ကိစ္စ အလုပ်မှာ ရေးရတယ်။ Wheel ပေါ်မှာ Touch start , Touch End , Touch Move event ၃ ခု ရှိတယ်။ Touch start ကနေ start point x နဲ့ y ကို ရတယ်။ Touch move ကနေ ရွေ့နေတဲ့ x , y ကို ရတယ်။ အဲဒီ point ၂ ခု နဲ့ လက်ရှိ ဘီး ကို လည်အောင် လုပ်ပေးရမယ်။ နာရီလက်တံ အတိုင်း လက်နဲ့ ပွတ်ပြီး လှည့်လိုက်ရင် အဲဒီ ဘက်ကို လည်သွားရမယ်။ နာရီလက်တံ ပြောင်းပြန်ဆိုလည်း ပြန်လည်လာရမယ်ပေါ့။ အဲဒါကို တွက်မယ်ဆိုတော့ ပုံကြမ်းချရေးလိုက်တယ်။ a,b အမှတ်နဲ့ x,y အမှတ် ဘယ်လောက် degree ကွာသွားလဲသိဖို့ [...]