C++ on Ubuntu 9.04

I want to test C++ on Ubuntu 9.04.

So, follow this post from www.ubuntugeek.com. This post said that………

If you are a developer you need C and C++ Compiler for your development work. In Ubuntu you can install the build-essential for C and C++ compilers.

Install C and C++ Compilers in Ubuntu

sudo aptitude install build-essential

This will install all the required packages for C and C++ compilers

Testing C and C++ Programs

  • Compiling Your first C Programs

Now you need to open first.c file

sudo gedit first.c

add the following lines save and exit the file

#include <stdio.h>
int main()
{
printf(“Hello, World!\n”);
return 0;
}

Firstly compile the code using the following command

cc -c first.c

that would produce an object file you may need to add to the library.
then create an executable using the following command

cc -o first first.c

Now run this executable using the following command

./first

Output should show as follows

Hello, world

  • Compiling your first C++ program

If you want to run c++ program follow this procedure
g++ is the compiler that you must use.
you should use a .cpp file extension rather than a .c one
You need to create a file

sudo gedit first.cpp

add the following lines save and exit the file

#include <iostream>
int main()
{
std::cout << “Hello, World!” << std::endl;
return 0;
}

Run your C++ Program using the following command

g++ first.cpp -o test

./test

Output should show as follows

Hello World!

And I test on my Toshiba laptop.

thanwinnaing@thanwinnaing-laptop:~$ sudo apt-get install build-essential
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
dpkg-dev g++ g++-4.3 libstdc++6-4.3-dev patch
Suggested packages:
debian-keyring g++-multilib g++-4.3-multilib gcc-4.3-doc libstdc++6-4.3-dbg
libstdc++6-4.3-doc diff-doc
The following NEW packages will be installed:
build-essential dpkg-dev g++ g++-4.3 libstdc++6-4.3-dev patch
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 6270kB of archives.
After this operation, 21.4MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.tcc.edu.tw jaunty/main libstdc++6-4.3-dev 4.3.3-5ubuntu4 [1356kB]
Get:2 http://ftp.tcc.edu.tw jaunty/main g++-4.3 4.3.3-5ubuntu4 [4162kB]
Get:3 http://ftp.tcc.edu.tw jaunty/main g++ 4:4.3.3-1ubuntu1 [1438B]
Get:4 http://ftp.tcc.edu.tw jaunty/main patch 2.5.9-5 [100kB]
Get:5 http://ftp.tcc.edu.tw jaunty/main dpkg-dev 1.14.24ubuntu1 [643kB]
Get:6 http://ftp.tcc.edu.tw jaunty/main build-essential 11.4 [7172B]
Fetched 6211kB in 9min 57s (10.4kB/s)
Selecting previously deselected package libstdc++6-4.3-dev.
(Reading database … 103569 files and directories currently installed.)
Unpacking libstdc++6-4.3-dev (from …/libstdc++6-4.3-dev_4.3.3-5ubuntu4_i386.deb) …
Selecting previously deselected package g++-4.3.
Unpacking g++-4.3 (from …/g++-4.3_4.3.3-5ubuntu4_i386.deb) …
Selecting previously deselected package g++.
Unpacking g++ (from …/g++_4%3a4.3.3-1ubuntu1_i386.deb) …
Selecting previously deselected package patch.
Unpacking patch (from …/patch_2.5.9-5_i386.deb) …
Selecting previously deselected package dpkg-dev.
Unpacking dpkg-dev (from …/dpkg-dev_1.14.24ubuntu1_all.deb) …
Selecting previously deselected package build-essential.
Unpacking build-essential (from …/build-essential_11.4_i386.deb) …
Processing triggers for man-db …
Setting up patch (2.5.9-5) …
Setting up dpkg-dev (1.14.24ubuntu1) …
Setting up libstdc++6-4.3-dev (4.3.3-5ubuntu4) …
Setting up g++-4.3 (4.3.3-5ubuntu4) …
Setting up g++ (4:4.3.3-1ubuntu1) …

Setting up build-essential (11.4) …
thanwinnaing@thanwinnaing-laptop:~$

But, I test with this code only for C++ which is the same above. :)

#include<iostream>
using namespace std;
int main()
{
cout << “Hello, World!” << endl;
return 0;
}

GPG error in Ubuntu 9.04

ကျွန်တော်က အခုမှ Linux ကို ဒီ Ubuntu 9.04 ကစသုံးဖူးတာ။ (ကျွန်တော်လို စသုံးတဲ့လူတွေများ အသုံးဝင်မလားလို့ ဒီ post ကိုတင်ပါတယ်ဗျာ။)

9.04 ထွက်တော့မယ် ဆိုကတည်းက download လုပ်ဖို့စောင့်ပြီး download လုပ်၊ install လုပ်တော့လည်း ကိုစေတန် ရဲ့ စာအုပ်လေးဖတ်ပြီး Vista တစ်ခြမ်း Ubuntu တစ်ခြမ်းလုပ်တာ အဆင်ပြေနေရော။ တစ်ခါ ကိုစေတန်ရဲ့ blog က post ဖတ်ပြီး extra တွေကို ဒါလေး terminal ထဲရိုက်ပြီး install လုပ်။

sudo apt-get install ubuntu-restricted-extras

တစ်ခါ ဇော်ဂျီဖွန့်ကို box02 ရဲ့ zawgyi-keyboard-ubuntu904.tar.gz ကိုသုံးပြီး install လုပ်တာလဲ အဆင်ပြေ နေဆဲပဲ။ ဒီလို အဆင်ပြေပြေ သုံးလို့ရနေတော့ firefox လေးသုံးပြီး web surf လုပ်လိုက်၊ Pidgin လေးသုံးပြီး chat လိုက်နဲ့ ငါတော့ Ubuntu ကိုသုံးတတ်သွားပြီ ဆိုပြီး ပျော်နေတာပေါ့။

ဒါပေမယ့် ဘာဖြစ်တယ် မသိဘူး လွန်ခဲ့တဲ့ ၁၀ ရက်ကျော်လောက်က စပြီး update လုပ်တဲ့ နေရာမှာ problem စဖြစ်တော့တာပဲ။ box02 ကို gtalk မှာတွေ့တော့ အဲဒီအကြောင်းပြောပြီး ဘယ်လိုလုပ်ရမလဲ မေးရတယ်။ သူပြောတဲ့အတိုင်း လုပ်ကြည့်တယ် အဲဒီအချိန်တုန်းကတော့ ကွန်နက်ရှင်ကြောင့်လို့ ထင်ခဲ့တယ် မပြေလည်ခဲ့ဘူး (box02 ကျေးဇူးပါဗျာ)

ဒါနဲ့ Ubuntu forum မှာလဲ ဝင်မေးကြည့်တယ် ဒီ post နဲ့ပေါ့။ သူတို့ပေးတဲ့ အဖြေကလဲ မပြေလည်ဘူးဗျ။ ဒီမှာ ကျွန်တော် သတိထားမိတာက အားလုံးက Terminal ကနေပဲ လုပ်ခိုင်းနေကျတယ်။ windows မှာလို application setting ကနေ ရှင်းလို့ မရဘူးလားပေါ့။

၁. ဒါနဲ့ system -> administration -> Update Manager ကိုဖွင့်ပါတယ်။ Update Manager ရဲ့ setting ကိုဖွင့်တော့ ထုံးစံအတိုင်း password တောင်းတယ်၊ password ရိုက်လိုက်တော့ Update Manager ရဲ့ software sources window ပွင့်လာပါတယ်။

၂. အဲဒီအထဲမှာ tap ငါးခုရှိတယ်၊ Ubuntu software tap ရဲ့ download from: မှာ drop down list ကိုနှိပ်ပါတယ်။

၃. other ကိုရွေး၊ choose a download server window ပေါ်လာရင် selet best server ကိုနှိပ်တယ်။ သူ့အလိုလို ရွေးနေတယ်။ ကျွန်တော့်မှာတော့ နည်းနည်း ကြာတယ်ဗျ။

၄. ကျွန်တော့်ကိုတော့ ဒီ http://ftp.tcc.edu.tw/linux/ubuntu ဆိုတဲ့ server ကိုရွေးပေးတယ်။

၅. close ကိုနှိပ်လိုက်တာနဲ့ update manager ကအလုပ်စလုပ်ပါပြီ။ ဘာ error မှမပြတော့ပါ။ အခုတော့ အရင်လိုပဲ firefox လေးနဲ့ web surf လုပ်လိုက်၊ Pidgin လေးနဲ့ chat လိုက်နဲ့ ပြန်အဆင်ပြေနေတယ်ဗျို့။ :)

သာဓုကန် စက်မှုဇုန်

ဒီနေ့ သာဓုကန် စက်မှုဇုန်ကို သွားဖြစ်တယ်။ မြေကွက် ကိစ္စပေါ့။ တွေ့ရမယ့် မစန်းစန်းညွန့်မရှိသေးလို့ စောင့်နေရသေးတယ်။ ရောင်းမယ်လို့ ပြောတဲ့ မြေကွက်က ၂ ကွက်တွဲ၊ အားလုံးပေါင်း ၅ ဧကလောက်ရှိတယ်။ ၁ ဧကကို ၃၀၀ အားလုံးယူရင် ၂၅ သိန်း လျှော့မယ်ပြောတယ်။ နေရာက အမှတ် ၈၃ နဲ့ ၈၄ ထင်တယ်။ ဘေးကပ်ရက်မှာ အိုးအိမ်က ယူထားတဲ့ ၂၁ ဧကကျော် ရှိတယ်။ ယူဖြစ်မယ် ဆိုရင် တစ်ပါတ်အတွင်း အကြောင်းပြန်မယ်လို့ ပြောခဲ့တယ်။ ဆရာကတော့ သိတဲ့အတိုင်း မရသေးဘူးဆိုရင် မရသေးလို့၊ ရတော့ကြတော့ သေးလို့ ထပ်ချဲ့မရလို့ ကြီးတာမရနိုင်တော့ဘူးလား ဆိုပြီး ဂျီးကိုများတယ်။

update : ရတာ အရင်ဝယ်ကြမယ်လို့ ပြောတယ်။26th May 2009

တွံတေး ဆန်စက်

မနေ့က သွားကြည့်တဲ့ တွံတေးက ဆန်စက်နဲ့ ပတ်သက်တဲ့ Data တွေကို မေ့မှာစိုးလို့။
ဆန်စက်က လမ်းဟောင်းက ဝင်ရင် EPC ရုံးကိုကျော်၊ လမ်းဘယ်ဖက်ဘေးမှာ ငါးကန်တွေတွေ့ရင် ရောက်ပြီ။
တန် ၅၀ ကျဆန်စက်ပါ။
နေရာ အကျယ်အဝန်းကတော့ ၁၁ ဧကကျော်၊ တွံတေးတူးမြောင်းကို နောက်ခံပြီး ဒီဖက်ကတော့ လမ်းရှိတယ်။

dsc01225
အစိုးရ လေလံ​ဈေးက ၂၈၀၀ လို့ကြားတယ်။ ခန့်မှန်းအရင်း ၃၅၀၀ လို့မှန်းတယ်။
သစ်ကာ သစ်ခင်း သွပ်မိုး နာဂစ်ထိထားတဲ့
ပေ ၅၀ ပေ ၈၀ ဂိုထောင် ၄ လုံး၊
ပေ ၄၀ ပေ ၆၀ ဂိုထောင် ၆ လုံး၊

dsc01201

dsc01202

dsc01203

dsc01219

Hiroshima boiler Co., Japan ကထုတ်တဲ့ boiler တစ်လုံး

dsc01193

ထုတ်လုပ်နှစ် ၁၉၇၇
မီးပေါင် ၁၄၀

working pressure 12 kg/cm3;

max pressure 14 kg/cm3

used in 2 inch fire tube

ခန့်မှန်းခြေ အရှည် ၁၂ ပေ

ဆန်စက်ကတော့ တော်တော် ပြည့်ပြည့်စုံစုံ ရှိပါသေးတယ်။ ဘာတွေဆိုတာ တိတိကျကျ မသိလို့ မရေးထားနိုင်ပေမယ့် ဆန်စက်ရဲ့ အင်္ဂါပြည့်စုံအောင် ရှိတယ်လို့ ဆိုနိုင်ပါတယ်။ ဆန်စက်နေရာကတော့ ပေ ၁၀၀ ပတ်လည် ရှိမယ်ထင်တယ်။ ဆန်စက်နဲ့ တစ်တွဲတည်း boiler ကိုထားတယ်။

dsc01197

စက်ရုံ ရုံးခန်း လုပ်ထားတဲ့ RC တစ်ထပ်တိုက် ၁ လုံး၊

စက်အပိုပစ္စည်း ဂိုဒေါင်အဖြစ်သုံးတဲ့ RC တစ်ထပ်တိုက် ၁ လုံး၊

စက်ရုံမှုးနေဖို့ RC တစ်ထပ်တိုက် ၁ လုံး၊

မန်နေဂျာနေဖို့ RC တစ်ထပ်တိုက်တစ်လုံး၊

dsc01222

dsc01198

dsc01199

ဒီအဆောက်အဉီ ၄ လုံးက စက်ရုံကို ဝင်ဝင်ခြင်း တွေ့ရတယ်။ အရွယ်အစားက အဲဒီအစဉ်အတိုင်း ကြီးရာကနေ ငယ်သွားတယ်။ ရုံးခန်းက အကြီးဆုံးဖြစ်သလို အပြင်အဆင်လည်း အကောင်းဆုံးပဲ။

ငါးကန် ၃ ကန်ပါတယ်။ ငါးကန်တွေရဲ့ အစွန်း လမ်းမဖက်ကပ်ပြီး ဝန်ထမ်းအိမ်ရာ ရှိတယ်၊ အားလုံး နံကပ်အုတ်တက် ၅ လုံး စက်ရုံနဲ့တော့ တော်တော် လှမ်းတယ်။ ဆန်စက်နဲ့ တည့်တည့် တွံတေးတူးမြောင်းဖက်မှာ ရုံးသဘောမျိုး သုံးတဲ့ RC တစ်ထပ်တိုက် တစ်လုံးလဲ ရှိတယ်။

dsc01213

dsc01217

dsc01226

အင်း   ဒါဆို စုံပြီ ထင်ပါတယ်။ :)

8.9.1976

3 R Commemorative Postage Stamps

1976-1

1976-3

1976-2

1976-4

Technical Dateils

1. Date of issue: 8.9.1976

2. Denomination: 10, 15, 50 Pya & K 1

3. Size of stamps: 10 Pya & K 1 - 40 * 24.5 mm

15, 50 Pya - 24.5 * 40 mm

4. Format: 10 Pya & K 1 – Vertical

15, 50 Pya – Horizontal

5. Sheet Composition: 10, 15, 50 Pya – 60 stamps per sheet

K 1 – 50 stamps per sheet

6. Printing Process: Photogravaure

7. Printer: Security Printing Works, Burma(Myanmar)

8. Designer: Original and Design Department, Security Printing Works.

9. Colour: 10 Pya – 2

15 Pya – 3

50 Pya – 3

K 1 – 4

10. Perforation: 14

11. Theme: 10 Pya – A young volunteer teacher is teaching a group of peasants.

15 Pya – Reading, Writing & Arithmetic is the main theme

50 Pya – Denotes the increasing number of literate people

K 1 – Denotes the momentum, the campaign is gaining all over the world