WELCOME TO MY BLOG

Senin, 16 Juli 2012


Ketika jarak memisahkan kita
Dan komunikasipun mulai terputus
Aku tak kuasa menahan rindu ini
Rindu untuk bertemu dengan dirimu
Rindu yang hanya dapat aku pendam
Entah apa yang kamu rasakan
Apakah kamu memiliki rindu yang sama padaku
Tetapi inilah aku dengan segala keadaanku
Aku tidak bisa terlalu lama jauh darimu
Aku tak mampu menahan rindu yang merasuk jiwa
Aku ingin segera kembali lalui hari-hari bersamamu
Dan berada dalam dekapanmu ...

Aku ingin menjadikanmu masa depanku,
Lewati hari-hari bersama dengan dirimu
Akankah kesempatan itu menjadi milikku ???
Aku tidak tahu entah sampai kapan kita akan terus bersama,
Tetapi selama kesempatan bersama dengan dirimu masih ada
Aku akan selalu mengukir kisah dan kenangan indah bersama dengan dirimu
Yang tak lekang oleh waktu ...

AMQ, 18 Juni 2012


Kecemasan, ketakutan menyelimuti diriku
Semenjak ku tahu tentang kondisi dirimu
Aku takut kehilangan dirimu
Kamu adalah segalanya bagiku
Aku ada & bertahan sampai saat ini karena dirimu

Aku datang kali ini bukan untuk liburan,
Tetapi untuk menemani, memberi kekuatan, dukungan & menjagamu
Aku belajar menjadi kuat & tegar dari dirimu

Aku bukanlah wanita yang kuat seperti dirimu
Tetapi aku berusaha menutupi karapuanku dihadapanmu
& selalu tersenyum agar dirimu tidak kwatir dengan diriku

Aku tahu apa yang kamu pikirkan & yang kamu rasakan
Aku tahu perjuanganmu selama ini untukmu & untuk diriku
Kamu tidak pernah mengeluh dalam menjalani hari-harimu
Kamu selalu menutupi apa yang kamu alami
Bahkan mengenai penyakit yang kamu derita

MAMA, kamu adalah wanita yang penuh kasih sayang,
sabar, pengertian, kuat, tegar & sangat mencintai keluargamu
Aku bangga mempunyai & memilikimu

Aku hanya bisa berdoa agar aku dapat membahagiakan MAMA & PAPA
sebelum kalian pergi meninggalkan diriku
ataukah aku pergi meninggalkan kalian
Aku ingin selalu menjadi yang terbaik untuk kalian
Aku ingin selalu membahagiakan kalian
Meskipun harus mengorbankan kebahagiakan diriku
Aku sangat mencintai & menyayangi MAMA & PAPA

Untuk MAMA & PAPA

Shut down, reboot, logoff

SOURCE CODE DELPHI 7
Untuk : Windows 9x/NT/Me/2000/XP

function MyExitWindows(RebootParam: Longword): Boolean;
var
  TTokenHd: THandle;
  TTokenPvg: TTokenPrivileges;
  cbtpPrevious: DWORD;
  rTTokenPvg: TTokenPrivileges;
  pcbtpPreviousRequired: DWORD;
  tpResult: Boolean;
const
  SE_SHUTDOWN_NAME = 'SeShutdownPrivilege';
begin
  if Win32Platform = VER_PLATFORM_WIN32_NT then
  begin
    tpResult := OpenProcessToken(GetCurrentProcess(),
      TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY,
      TTokenHd);
    if tpResult then
    begin
      tpResult := LookupPrivilegeValue(nil,
                                       SE_SHUTDOWN_NAME,
                                       TTokenPvg.Privileges[0].Luid);
      TTokenPvg.PrivilegeCount := 1;
      TTokenPvg.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
      cbtpPrevious := SizeOf(rTTokenPvg);
      pcbtpPreviousRequired := 0;
      if tpResult then
        Windows.AdjustTokenPrivileges(TTokenHd,
                                      False,
                                      TTokenPvg,
                                      cbtpPrevious,
                                      rTTokenPvg,
                                      pcbtpPreviousRequired);
    end;
  end;
  Result := ExitWindowsEx(RebootParam, 0);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  MyExitWindows(EWX_POWEROFF or EWX_FORCE);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  MyExitWindows(EWX_REBOOT or EWX_FORCE);
end;

Empty recycle bin

SOURCE CODE DELPHI 7

procedure EmptyRecycleBin;
const
  SHERB_NOCONFIRMATION = $00000001;
  SHERB_NOPROGRESSUI = $00000002;
  SHERB_NOSOUND = $00000004;
type
  TSHEmptyRecycleBin = function(Wnd: HWND;
                                pszRootPath: PChar;
                                dwFlags: DWORD): HRESULT;  stdcall;
var
  SHEmptyRecycleBin: TSHEmptyRecycleBin;
  LibHandle: THandle;
begin  { EmptyRecycleBin }
  LibHandle := LoadLibrary(PChar('Shell32.dll'));
  if LibHandle <> 0 then @SHEmptyRecycleBin :=
      GetProcAddress(LibHandle, 'SHEmptyRecycleBinA')
  else
  begin
    MessageDlg('Failed to load Shell32.dll.', mtError, [mbOK], 0);
    Exit;
  end;
  if @SHEmptyRecycleBin <> nil then
    SHEmptyRecycleBin(Application.Handle,
                      nil,
                      SHERB_NOCONFIRMATION or SHERB_NOPROGRESSUI or SHERB_NOSOUND);
  FreeLibrary(LibHandle); @SHEmptyRecycleBin := nil;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  EmptyRecycleBin;
end;

Minggu, 13 Mei 2012

Konversi Suhu Menggunakan Delphi 7.0


MEMBUAT PROGRAM KONVERSI SUHU

Untuk membuat program konversi suhu, terdapat beberapa langkah sebagai berikut:
  1. Buatlah form baru kemudian ganti caption menjadi Konversi Suhu, kemudian name diubah menjadi FKonversi.
  2. Simpan dengan cara klik file, kemudian pilih save all (Shift+Ctrl+S), file : Unit1 diubah menjadi UKonversiSuhu.pas, file : Project1 diubah menjadi PKonversiSuhu.dpr, selanjutnya klik tombol OK.
  3. Buatlah desain form konversi suhu seperti gambar 1.1


                            Label1



                                                      LebeledEdit1
                          
                     ComboBox1                                                                 Button1


                   LebeledEdit2

Gambar 1.1 Form Konversi Suhu
  1. Ubahlah properties masing-masing object seperti yang terdapat pada tabel 1.1
Componen Pallete
Object Inspector
Tab
Nama Object
Properties
Keterangan
Standard
Label1
Caption
Konversi Suhu
ComboBox1
Text
Pilihan Konversi

Items
Kelvin to Celcius
Kelvin to Fahrenheit
Kelvin to Rankine
Kelvin to Delisle
Kelvin to Newton
Kelvin to Reamur
Kelvin to Romer
Celcius to Kelvin
Celcius to Fahrenheit
Celcius to Rankine
Celcius to Delisle
Celcius to Newton
Celcius to Reamur
Celcius to Romer
Fahrenheit to Kelvin
Fahrenheit to Celcius
Fahrenheit to Rankine
Fahrenheit to Delisle
Fahrenheit to Newton
Fahrenheit to Reamur
Fahrenheit to Romer
Rankine to Kelvin
Rankine to Celcius
Rankine to Fahrenheit
Rankine to Delisle
Rankine to Newton
Rankine to Reamur
Rankine to Romer
Delisle to Kelvin
Delisle to Celcius
Delisle to Fahrenheit
Delisle to Rankine
Delisle to Newton
Delisle to Reamur
Delisle to Romer
Newton to Kelvin
Newton to Celcius
Newton to Fahrenheit
Newton to Rankine
Newton to Delisle
Newton to Reamur
Newton to Romer
Reamur to Kelvin
Reamur to Celcius
Reamur to Fahrenheit
Reamur to Rankine
Reamur to Delisle
Reamur to Newton
Reamur to Romer
Romer to Kelvin
Romer to Celcius
Romer to Fahrenheit
Romer to Rankine
Romer to Delisle
Romer to Newton
Romer to Reamur

Name
CBKonversi
Button1
Caption
Konversi


Name
BKonversi
Additional
LabeledEdit1
Caption
Masukan Nilai

Name
LEInput
LabeledEdit2
Caption
Hasil Konversi


Name
LEOutput

  1. Pada tombol konversi, masukkan source code konversi suhu berikut:
procedure TFKonversi.BKonversiClick(Sender: TObject);
var a:real;
begin
a:=strtofloat(LEInput.Text);

case CBKonversi.ItemIndex of
      0:LEOutput.Text:=floattostr(a-273.15); //Kelvin to Celcius
      1:LEOutput.Text:=floattostr(a*1.8-459.67); //Kelvin to Fahrenheit
      2:LEOutput.Text:=floattostr(a*1.8); //Kelvin to Rankine
      3:LEOutput.Text:=floattostr((373.15-a)*1.5); //Kelvin to Delisle
      4:LEOutput.Text:=floattostr((a-273.15)*0.33); //Kelvin to Newton
      5:LEOutput.Text:=floattostr((a-273.15)*0.8); //Kelvin to Reamur
      6:LEOutput.Text:=floattostr((a-273.15)*0.525+7.5); //Kelvin to Romer
      7:LEOutput.Text:=floattostr(a+237.15); //Celcius to Kelvin
      8:LEOutput.Text:=floattostr(a*1.8+32); //Celcius to Fahrenheit
      9:LEOutput.Text:=floattostr(a*1.8+491.67); //Celcius to Rankine
      10:LEOutput.Text:=floattostr((100-a)*1.5); //Celcius to Delisle
      11:LEOutput.Text:=floattostr(a-0.33); //Celcius to Newton
      12:LEOutput.Text:=floattostr(a*0.8); //Celcius to Reamur
      13:LEOutput.Text:=floattostr(a*0.525+7.5); //Celcius to Romer
      14:LEOutput.Text:=floattostr((a+459.67)/1.8); //Fahrenheit to Kelvin
      15:LEOutput.Text:=floattostr((a-32)/1.8); //Fahrenheit to Celcius
      16:LEOutput.Text:=floattostr(a+459.67); //Fahrenheit to Rankine
      17:LEOutput.Text:=floattostr((212-a)*0.83); //Fahrenheit to Delisle
      18:LEOutput.Text:=floattostr((a-32)*0.183); //Fahrenheit to Newton
      19:LEOutput.Text:=floattostr((a-32)/2.25); //Fahrenheit to Reamur
      20:LEOutput.Text:=floattostr((a-32)*(7/24)+7.5); //Fahrenheit to Romer
      21:LEOutput.Text:=floattostr(a/1.8); //Rankine to Kelvin
      22:LEOutput.Text:=floattostr(a/1.8+273.15); //Rankine to Celcius
      23:LEOutput.Text:=floattostr(a-459.67); //Rankine to Fahrenheit
      24:LEOutput.Text:=floattostr((671.67-a)*0.83); //Rankine to Delisle
      25:LEOutput.Text:=floattostr((a-491.67)*0.183); //Rankine to Newton
      26:LEOutput.Text:=floattostr((a/1.8+273.15)+0.8); //Rankine to Reamur
      27:LEOutput.Text:=floattostr((a-491.67)*(7/24)+7.5); //Rankine to Romer
      28:LEOutput.Text:=floattostr((373.15-a)*0.67); //Delisle to Kelvin
      29:LEOutput.Text:=floattostr((100-a)*0.67); //Delisle to Celcius
      30:LEOutput.Text:=floattostr((212-a)*1.2); //Delisle to Fahrenheit
      31:LEOutput.Text:=floattostr((671.67-a)*1.2); //Delisle to Rankine
      32:LEOutput.Text:=floattostr((33-a)*0.22); //Delisle to Newton
      33:LEOutput.Text:=floattostr((80-a)*0.53); //Delisle to Reamur
      34:LEOutput.Text:=floattostr((60-a)*0.35); //Delisle to Romer
      35:LEOutput.Text:=floattostr(a*(100/33)+273.15); //Newton to Kelvin
      36:LEOutput.Text:=floattostr(a*(100/33)); //Newton to Celcius
      37:LEOutput.Text:=floattostr(a*5.45+32); //Newton to Fahrenheit
      38:LEOutput.Text:=floattostr(a*5.45+491.67); //Newton to Rankine
      39:LEOutput.Text:=floattostr((33-a)*4.54); //Newton to Delisle
      40:LEOutput.Text:=floattostr(a*2.42); //Newton to Reamur
      41:LEOutput.Text:=floattostr(a*(35/22)+7.5); //Newton to Romer
      42:LEOutput.Text:=floattostr(a/0.8+273.15); //Reamur to Kelvin
      43:LEOutput.Text:=floattostr(a/0.8); //Reamur to Celcius
      44:LEOutput.Text:=floattostr(a*2.25+32); //Reamur to Fahrenheit
      45:LEOutput.Text:=floattostr(a*2.25+491.67); //Reamur to Rankine
      46:LEOutput.Text:=floattostr((80-a)*1.875); //Reamur to Delisle
      47:LEOutput.Text:=floattostr(a*0.4125); //Reamur to Newton
      48:LEOutput.Text:=floattostr(a*(21/32)+7.5); //Reamur to Romer
      49:LEOutput.Text:=floattostr((a-7.5)*(40/21)+273.15); //Romer to Kelvin
      50:LEOutput.Text:=floattostr((a-7.5)*(40/21)); //Romer to Celcius
      51:LEOutput.Text:=floattostr((a-7.5)*(24/7)+32); //Romer to Fahrenheit
      52:LEOutput.Text:=floattostr((a-7.5)*(24/7)+491.67); //Romer to Rankine
      53:LEOutput.Text:=floattostr((60-a)*(20/7)); //Romer to Delisle
      54:LEOutput.Text:=floattostr((a-7.5)*(22/35)); //Romer to Newton
 else
      LEOutput.Text:=floattostr((a-7.5)*(32/21)); //Romer to Reamur    
 end;
end;

  1. Jalankan aplikasi dengan tombol F9.
  2. Masukan nilai, tentukan pilihan konversi misalnya Celcius – Reamur, kemudian klik tombol konversi maka hasil konversi akan muncul secara otomatis.