Tuesday, January 29, 2008

Dream Theater › The Spirit Carries On

Hi all....
gw baru denger lagu yang sebenernya sih udah lama juga...
tapi buat gw ni lagu emang keren abis...
mungkin juga karna ni lagu mirip2 seperti apa yang gw alamin selama ini..
btw, kalian denger aja lagu dari dream theater judulnya the spririt caries on
liriknya ada dibawah ini :


Nicholas:
Where did we come from?
Why are we here?
Where do we go when we die?
What lies beyond
And what lay before?
Is anything certain in life?

They say, life is too short,
The here and the now
And youre only given one shot
But could there be more,
Have I lived before,
Or could this be all that weve got?

If I die tomorrow
Id be allright
Because I believe
That after were gone
The spirit carries on

I used to be frightened of dying
I used to think death was the end
But that was before
Im not scared anymore
I know that my soul will transcend

I may never find all the answers
I may never understand why
I may never prove
What I know to be true
But I know that I still have to try

If I die tomorrow
Id be allright
Because I believe
That after were gone
The spirit carries on

Victoria:
Move on, be brave
Dont weep at my grave
Because I am no longer here
But please never let
Your memory of me disappear

Nicholas:
Safe in the light that surrounds me
Free of the fear and the pain
My questioning mind
Has helped me to find
The meaning in my life again
Victorias real
I finally feel
At peace with the girl in my dreams
And now that Im here
Its perfectly clear
I found out what all of this means

If I die tomorrow
Id be allright
Because I believe
That after were gone
The spirit carries on

Read More...

Thursday, November 8, 2007

Encrypt and Decrypt Image - BMP

Hallow semua...
gw punya source code simple untuk encrypt ato decrypt file gambar (untuk kasus sekarang kita pake file gambar bitmap). Tampilanya seperti ini:

Encrypt bitmap

Decrypt bitmap

Code untuk encrypt/decrypt button seperti ini:

PROCEDURE TForm1.Button2Click(Sender: TObject);
VAR
i : INTEGER;
j : INTEGER;
RandomValue : BYTE;
rowIn : pByteArray;
rowOut : pByteArray;
ScanlineByteCount: INTEGER;
BitmapResult : TBitmap;
BEGIN
/*
BitmapOriginal : tipe dile TBitmap dan di inisialisasi pada saat open file
*/
IF Assigned(BitmapResult)
THEN BitmapResult.Free;

BitmapResult := TBitmap.Create;
BitmapResult.Width := BitmapOriginal.Width;
BitmapResult.Height := BitmapOriginal.Height;
BitmapResult.PixelFormat := BitmapOriginal.PixelFormat;

IF BitmapOriginal.PixelFormat IN [pf1bit, pf4bit, pf8bit]
THEN BitmapResult.Palette := CopyPalette(BitmapOriginal.Palette);

ScanlineByteCount := ABS(Integer(BitmapOriginal.Scanline[1]) -
Integer(BitmapOriginal.Scanline[0]));

RandSeed := 79997;

FOR j := 0 TO BitmapOriginal.Height-1 DO
BEGIN
RowIn := BitmapOriginal.Scanline[j];
RowOut := BitmapResult.Scanline[j];

FOR i := 0 TO ScanlineByteCount-1 DO
BEGIN
RandomValue := Random(256);
RowOut[i] := RowIn[i] XOR RandomValue
END
END;

Image1.Picture.Graphic := BitmapResult;
END;


Selamat mencoba ya...keep writing..:D

Read More...

Saturday, October 20, 2007

Windows API - Delphi

Memanfaatkan applikasi - applikasi bawaan dari windows merupakan hal yang sangat mudah dilakukan. Saat ini kita akan mencoba membuat applikasi sederhana menggunakan Borland Delphi 7, untuk memamnggil applikasi windows seperti notepad, calculator, dan paint.

Hal-hal yang perlu dilakukan untuk membuat applikasi sederhana tersebut adalah sebagai berikut:
1. Yang pasti kalian harus punnya borland delphi nya dulu ya... hahahaa
2. Buat project baru,
3. Buat 3 button, yang pertama button untuk panggil notepad, yang kedua untuk panggil calculator, dan yang ketiga adalah untuk panggil paint.
4. Kemudian masuk ke script (tekan F12)

5. Pada uses, tambahkan ShellApi
6. Pada Button notepad, tambahkan code berikut:
ShellExecute(Handle, 'open', 'c:\Windows\notepad.exe', nil, nil, SW_SHOWNORMAL);
7. Pada Button calculator, tambahkan code berikut:
ShellExecute(Handle, 'open', 'c:\Windows\system32\calculator.exe', nil, nil, SW_SHOWNORMAL) ;
8. Pada Button paint, tambahkan code berikut:
ShellExecute(Handle, 'open', 'c:\Windows\system32\mspaint.exe', nil, nil, SW_SHOWNORMAL) ;

Keterangan: kalo salah, berati exe file nya salah heee coba liat lagi aja di windowsnya...
Selamat mencoba...

Read More...

Thursday, July 26, 2007

Minicom

Buat kalian - kalian yang butuh terminal emulator layaknya hyperterminal pada windows operating system, linux juga punnya, dan ga perlu susah-susah nyarinya..

Nama applikasinya adalah minicom.
*Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems, originally written by Miquel van Smoorenburg, and modeled after the popular MS-DOS program Telix. Minicom includes a dialing directory, full ANSI and VT100 emulation, an (external) scripting language, and other features. Minicom is a menu-driven communications program. It also has an auto zmodem download
(*sumber wikipedia)

Gimana cara pakai dan nampilin program tersebut ??
ikuti langkah - langkah berikut :

1. Buka sebuah terminal/console, trus ketikin "minicom" (tanpa tanda kutip)

$ minicom

2. Setelah itu akan muncul tampilan sebagai berikut :

Welcome to minicom 2.00.0
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Mar 7 2005, 10:29:09.
Press CTRL-A Z for help on special keys

Kemudian, untuk melakukan settingan seperti serialportnya, terminalnya, baudrates, dan temen2 nya.. caranya tekan CTRL+A setelah itu tekan Z pada keyboard, akan muncul menu-menu yang bisa kalian mainkan heee...
Dengan begitu terminal emulator pada linux udah bisa dijalankan heee...
**** selamat mencoba ****

Read More...