May 24, 2008
You may too lazy to type long and complete URL in address bar, started with http://www and ended with .com or .org or .net. These are some tricks you may use to get faster access.
For .com extension, type your main URL, e.g. friendster then strike ENTER while hold CTRL on, release both button.
For .net extension, type your main URL, e.g. servomedia then strike ENTER while hold SHIFT on, release both button.
For .org extension, type your main URL, e.g. gnu then strike ENTER while hold CTRL+SHIFT on, release all three button.
May be helpfull. Happy browsing. 😉
May 16, 2008
Guess A Number
Let’s create a simple console game. The computer will randomly pick an integer number from 0 to 50. Your task is to guess the number. Each time you pick a number a program will tell that your number is larger or smaller than the one you are looking for. When, finally, you find what the number was it’ll tell you how many times it took you to find it.
I’ll give you the code, but first let’s see what are two most seen commands in a console application:
Write and Read RTL procedures are typically used for writing and reading from a file. There are two standard text-file variables, Input and Output. In a Console application, Delphi automatically associates the Input and Output files with the application’s console window. The standard file variable Input is a read-only file associated with the operating system’s standard input (typically the keyboard). The standard file variable Output is a write-only file associated with the operating system’s standard output (typically the display).
Thus, Writeln is used to display a message; ReadLn is normally used to read in variables. In the code below, you will notice it ends with a ReadLn. Readln without any parameters simply waits for the [Enter] key to be pressed. One of the peculiarities of a console application is that when it has stopped running, the console window is automatically closed. The ReadLn statement is necessary so that the user can see any text produced by Writeln statements before it disappears off the screen when the program finishes.
Here goes the code. I hope you understand it.
rn, un, cnt: Integer;
rn := Trunc(Random(50) + 1);
Write('Computer has picked an integer number,');
Write('from 1 to 50, guess the number!');
WriteLn('Your guess is: ');
cnt := 1; un := 0;
Guess := False;
while Guess = False do begin
if un > rn then
Write('Wrong, gimme a smaller number: ')
else if un < rn then
Write('Wrong, gimme a larger number: ')
Write('Correct! It took you ' +
' times to guess!')
cnt := cnt + 1;
ReadLn; //don't close the window, wait for [Enter]
Simply run the project and play....
May 15, 2008
I found this song unintentionaly.
First time I hear the intro, wow! Cool song! I really love it.
Click link below to download the song:
May 15, 2008
Evidence is mounting that Microsoft has really given a select group of testers/partners an early look at the next version of the Windows Operating System. The other day a member of the Neowin forum posted a brief review of Windows 7 before deleting his comments. And now a Chinese web site has posted what could be real live pictures of Windows 7.
Overall, these shots of Windows 7 (or an artist’s fictional rendition thereof) show an operating system that looks a lot like Windows Vista. That’s not particularly surprising, since Windows 7 won’t be launched for at least another two years. Odds are most of the changes would be under the hood at this point.
The images do show a few difference. For example, you can display hidden items in the system tray through a new pop up window. The Control Panel features some rearranged menus, and the display properties dialog for changing screen resolutions looks pretty awesome. Check out the screenshots after the jump.