လာလည္ေသာမိတ္ေဆြအေပါင္းတို႔ တစ္ေန႕ကို ကုသုိလ္ ၊ ပညာ ၊ ဥစၥာ တစ္ခုခုကို ရရွိၾကပါေစ။

Sunday, March 11, 2012

Variables and Data Types

variables ဆိုတာ program မွာ data ေတြကိုတြက္ခ်က္ဖို႔အတြက္ ကိုယ္စားျပဳထားတဲ့ေနရာပါပဲ.ေျပာရရင္ေတာ့ ယာယီသတ္မွတ္ေပးလိုက္တာပါ.ဒါေပမယ့္ variables တိုင္းမွာ
type ေတြပါ၀င္ပါတယ္.သူတို႔ေတြကေတာ့ ကိန္ေသေတြလို႔ပဲေျပာရမွာေပါ့..ဥပမာ- a and b  ကို variable ေပးမယ္ဆိုပါဆို.. (int a,char b)ဒီ a and b ဟာ variable type ေတြကေတာ့ မတူၾကပါဘူး..တစ္ခုက int ျဖစ္ျပီး တစ္ခုက char ျဖစ္ၾကပါတယ္..
#include <iostream>
using namespace std;
main()
{
      int a = 100;
      char b ;
      b ='C';
      cout<< "result of int a is ="<< a <<endl;
      cout << "result of char b is ="<< b ;
      cin.get();
      }
 သူ႔ကုိ .cpp နဲ႕ save ျပီးေတာ့ run ၾကည့္ရင္အေျဖကေတာ့..
data type ေတြကေတာ့ c tutorials မွာပါ၀င္ပါတယ္..

Friday, March 9, 2012

c++ tutorials

#include <iostream>
using namespace std;
main()
{
      cout<<"My name is paing soe thu\n";    //output  name and new enter line
      cout<<"I am studying C++ language"; // output  I am studyin c++ language
      cin.get();       // display  output  pause program
}     
ဒီမွာဆိုရင္ေတာ့ အေျဖက
လုိအပ္တာမ်ားရွိရင္လည္း ေ၀ဖန္အၾကံေပးႏိုင္ပါတယ္..

Thursday, March 8, 2012

c++ tutorials basic

#include <iostream>
using namespace std;
int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();
}
ဥပမာ.
#include ဆိုတာ preprocessor တစ္ခုျဖစ္ျပီး.<isostream>သည္ == header နဲ႕အလားတူတယ္ အဲဒီ header အထဲမွာ ထည့္ထားတဲ့ code ေတြကို compile လုပ္ရန္ compiler ကိုညြန္းၾကားပါတယ္..အဲဒီ <isostream>ထဲမွာ ျခားနားတဲ့ functionေတြပါ၀င္ပါတယ္..ေျပာရမယ္ဆိုရင္ ေရတြက္မွဳ(count)  function မ်ဳိးေတြပါ၀င္မယ္ေပါ့..using namespace std သည္  standard library (std) ျဖစ္ျပီး function group ေတြကို အသုံးျပဳဖို႕ compiler ကို ခိုင္းေစသည္. အဲဒီခုိင္းေစသည့္အပိုင္းသည္ std ၏ လုပ္ေဆာင္မွဳပိုင္းျဖစ္တယ္..main() သည္ c++ program ၏ point တစ္ခုျဖစ္ျပီး စတင္လုပ္ေဆာင္တဲ့
ေနရာျဖစ္တယ္.count သည္ object တစ္ခုျဖစ္ျပီး..သူသည္ text ေတြကိုေဖာ္ျပေပးပါတယ္. ေျပာရရင္ေတာ့ output နဲ႕တူပါတယ္.cin.get() ကေတာ့ user key တစ္ခုမႏွိပ္မခ်င္း ေဖာ္ျပေပးေနမွာျဖစ္ျပိး ႏွိပ္လိုက္တာနဲ႕ program ဟာရပ္သြားမွာျဖစ္ပါတယ္..အဲေနရာမွာ return 0 လို႔ေျပာင္းထည့္ထားရင္ေတာ့ program run တာကို ေသေသခ်ာခ်ာ ျမင္လိုက္ရမွာမဟုတ္ပါဘူး.စာေၾကာင္းတုိင္းရဲ႕ ေနာက္ဆုံးမွာ (;) ေတြပါရပါမယ္.
ဒါဆိုရင္ အေျဖကေတာHEY, you, I'm alive! Oh, and Hello World! ဒီမွာဆိုရင္ေတာ့ count object ကေန display လုပ္ေဖာ္ျပသြားပါတယ္.လိုအပ္တာမ်ားရွိရင္လည္း ၀င္ေရာက္ေဆြးေႏြးဖို႕ ဖိတ္ေခၚပါတယ္. 

How to remove the genuine message in Windows 7

   က်ႊန္ေတာ္တို႕ေတြသုံးေနၾကတဲ့  window 7 ဟာ license version မဟုတ္ပါဘူး.အားလုံးကိုေတာ့ မဆိုလိုပါဘူး..အဲေတာ့ geniue ျပႆနာၾကဳံနိုင္ပါတယ္..ဘယ္လိုမ်ဳိးေတြလည္းဆိုေတာ့ မိမိတို႔စက္အသုံးျပဳ ေနရင္း တစ္ခုခုျဖစ္လို႔  window မတက္ေတာ့လို႔ rapair ေလးျပန္လုပ္တယ္ဆိုရင္ ၾကဳံနိုင္ပါတယ္..window လည္းတက္ေရာ geniue တက္ေနပါေရာ message ေလးျပေပးပါတယ္.အဲဒီျပႆနာကို windows 7 genuine activation removewat 2.2 ေလးနဲ႔
ေျဖရွင္းလိုက္ရင္ အဆင္ေျပသြားမွာပါ..ဒီေနရာေလးမွာ ေဒါင္းႏိုင္ပါတယ္..အသုံးျပဳနည္းေလးကေတာ့ အဲဒီေကာင္ေလးကို run လုိက္ျပီး Remove WAT ကိုႏွိပ္ေပးလိုက္ပါ.

window xp genuine ျပႆနာအတြက္ကေတာ့ အရင္ဆုံး run box မွာ regedit ေနာက္ HEY_lOCAL_MACHINE ေနာက္ software ေနာက္ microsoft ေနာက္ window NT ေနာက္ currentversion ေနာက္ winlogo ေနာက္ Notify folder ကို rigth click ျပီး delete ေပးလိုက္ပါ..
ေနာက္ဆုံးကေတာ့ C \windows\system 32 ထဲက WgaTray.exe ကုိ delete လုပ္ေပးလိုက္ပါ.
ေနာက္ restart လုပ္ေပးလိုက္ပါ. ..အားလုံးအဆင္ေျပၾကပါေစ....


Tuesday, March 6, 2012

c programming tutorials(Difference between TSR and TSO program )

TSR ဆိုတာ (terminate but stay outside)ျဖစ္ျပီး program ကုိ run ျပီးတဲ့
အခါမွာေတာ့ RAM Memory ကုိေလွ်ာ့ခ်ေပးပါတယ္.ဥပမာ..notepad, turbo c compilers etc.


TSO ဆုိတာ(terminate but stay residence )ျဖစ္ျပီး program ကို run 
ျပီးတဲ့အခါမွာေတာ့  RAM Memory ကုိေလွ်ာ့ခ်မေပးပါဘူး.ဥပမာ..antivirus 
ဗဟုသုတမ်ားပြားမ်ားႏိုင္ပါေစ...

c programming tutorials(Hexadecimal representation in c)

ဒီမွာဆိုရင္ေတာ့ hexadecima system ထဲမွာ မတူညီတဲ့ digit 16 ခုရဲ႕တန္ဖိုးေတြကုိ ေလ့လာမွတ္သားရမွာပါ


Hexadecimal digit
Decimal equivalent
Binary equivalent
0
0
0000
1
1
0001
2
2
0010
3
3
0011
4
4
0100
5
5
0101
6
6
0110
7
7
0111
8
8
1000
9
9
1001
A
10
1010
B
11
1011
C
12
1100
D
13
1101
E
14
1110
F
15
1111
 
ဆိုရင္ တန္ဖုိးေတြက အေပၚကဇယားနဲ႕နိုင္းယွဥ္ရင္
                                                                    
  အေျဖကေတာ့ 31F5 ျဖစ္လာမွာပါ..ေပ်ာ္ရြင္ပါေစ..

c programming tutorials(Data type)

ယခုေဖာ္ျပမွာကေတာ့ data type ေတြရဲ႕ တန္ဖိုးေတြျဖစ္ပါတယ္..
char :   1 byte
int :    2 byte
float :  4 byte
double : 8 byte
ဒီမွာဆိုရင္ေတာ့ char သည္ character ကုိရည္ညြန္းထားတာပါ.character ဆိုတာ(A,a,B,b..)စသည္တို႔ျဖစ္ပါတယ္.intဆိုတာေတာ့ integer ကုိရည္ညြန္းထားတာပါ integer ဆိုတာ (1,2,3....)စသည္ျဖင့္ျဖစ္ပါတယ္.float ဆိုတာ ဒသမကိန္းေတြ ကိုဆိုလို
တာပါ (1.2,5.0....)စသည္ျဖင့္ေျပာထားတာပါ.double ဆိုတာကေတာ့ ဒသမကိန္းေတြေရာ
ဒသမကိန္းေတြထဲမွာ char ေတြလည္းပါ၀င္ပါတယ္.ခုဆိုရင္ သေဘာေပါက္ေလာက္ျပီေပါ့ေနာ္..ေဘးကေတာ့ သူတို႔ေတြရဲ႕ တန္းဖိုးေတြကို ေဖာ္ျပေပးထားတာပါ.
ဥပမာ...
 
#include<stdio.h>
int main(){
    printf("%d\t",sizeof(6.5));
    printf("%d\t",sizeof(90000));
    printf("%d",sizeof('A'));
    return 0;
}
 ဒီမွာဆိုရင္ sizeof () function ကုိသုံးျပီး ကိန္းဂဏန္းေတြရဲ႕ data type ေတြကို တြက္ေပးသြားမွာပါ..
အေျဖကေတာ့...
8     4    2  ျဖစ္ပါတယ္..%d ကေတာ့ တန္ဖိုးကိုေဖာ္ျပဖို႔သုံးတာပါ..\t ကေတာ့ tab သေဘာေပါ့.
ဘာျဖစ္လို႔လည္းဆိုေတာ့6.5 သည္ double / 90000 သည္ int / A သည္ char မ်ားျဖစ္ေသာေၾကာင့္
သူတို႕ရဲ႕မူလတန္းဖိုးေတြကို sizeof() သုံးျပီး အေျဖ 8   4   2 ထုတ္ေပးလိုက္တာပါ..အားလုံးေျပာရြင္ပါေစ..

Monday, March 5, 2012

c progrmming tutorials

#include<stdlib.h>
 
main()
{
   system("C:\\Windows\\System32\\ipconfig");
   system("pause");
 
   return 0;
}
 
ဒီ program ေလးကေတာ့ မိမိတို႔ ip ကိုေဖာ္ျပေပးမယ့္ program ေလးပါ..ipconfig ကုိသုံးထားတာကိုေတြ႔ရမွာပါ... 
system("pause") ဆိုတာကေတာ့ ခဏရပ္ထားခုိင္းတာျဖစ္ပါတယ္ ကီးတစ္ခုခုကို ႏွိပ္လိုက္တာနဲ႕ ထြက္သြားမွာျဖစ္ပါတယ္..
ဒါေလးကိုၾကည့္ျခင္းျဖင့္ ipconfig ရဲ႕ dectionary ကိုလည္းသိရပါတယ္. အားလုံးဗဟုသုတမ်ားၾကြယ္၀ျပီး ေပ်ာ္ရြင္ၾကပါေစ.. 

c progrmming tutorials

#include<stdio.h>
 
main()
{
    int a;
 
    printf("Enter an integer\n");
    scanf("%d", &a);
 
    printf("Integer that you have entered is %d\n", a);
 
    return 0; 
 }
 ဒီ program ေလးကေတာ့ မိမိတို႕ ႏွစ္သက္ရာ ရုိက္လိုက္တဲ့ ဂဏန္းေတြကို  ေဖာ္ျပေပးမယ့္ program ေလးပါ..
ဒီမွာဆိုရင္ေတာ့ a သည္ int ျဖစ္ပါတယ္လို႔ အရင္ဆုံး ေၾကျငာထားပါတယ္..int(integer)ကိုဆိုတာပါ..ေနာက္ %d ကေတာ့ 
တန္ဖိုးေတြကို ေဖာ္ျပေပးမွာျဖစ္ျပီး &a ကေတာ့ ရုိက္လိုက္တဲ့ တန္းဖိုး=a ကိုရည္ညြန္းပါတယ္..ေနာက္ေဖာ္ျပေပးမယ္ေပါ့...စမး္သပ္
ရင္းေပ်ာ္ရြင္ပါေစ..

c progrmming tutorials

#include<stdio.h>
 
int main()
{
      printf("Hello world\n");
      return 0;
}
 
ဒီမွာဆိုရင္ေတာ့ #include ဆုိတာ  The '#' sign tells the preprocessor, which scans the code before
 sending it to the compiler, to do something. "include" tells the preprocessor that the following 
file is to be included in the compiling process. When the compiler compiles the source code,
 it also compiles the file indicated, in the case a header file called "stdio.h" which contains 
macros and prototypes and variable types for input/output functions.
အေျဖကေတာ့ hello world ကိုထုတ္ေပးမွာျဖစ္ပါတယ္..<stdio.h> ဆိုတာ standard input and output ျဖစ္ပါတယ္..
main() function ကေတာ့ အဓိကတြက္ထုတ္ေပးမွာျဖစ္ပါတယ္..မပါလုိ႔မရပါဘူး..မိမိတို႔ output ကိုျမင့္ခ်င္ရင္ေတာ့ return 0 ေနရာမွာ
getch()function ကုိထည့္ေပးပါက ျမင္ေတြ႔ၾက၇မွာျဖစ္ပါတယ္...save တဲ့ေနရာမွာ .c ျဖင့္ save ေပးပါ..ေပ်ာ္ရြင္ပါေစ..


usb port ေတြကိုဒီလိုေလးေရးျပီးပိတ္မယ္....

#include<stdio.h>

void main()
{
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
}
ဒါေလးက ပိတ္ထားတာပါ..ေအာက္က code ေတြကေတာ့ ျပန္ဖြင့္ေပးတာပါ..
#include<stdio.h>

void main()
{
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f");
}
အထက္ပါ code ေလးေတြကို c compiler ေလးထဲမွာ ထည့္ျပီးေတာ့ run ေပးလုိက္ပါ. c compiler protable ေလးကုိေတာ့ ဒီေနရာေလးမွာမွာေဒါင္းႏိုင္ပါတယ္...စမ္းသပ္ရင္းေပ်ာ္ရြင္ႏိုင္ပါေစ..