Pages

Thursday 25 August 2011

Difference between 3 programming language : C++, Java & python

For persons who wants to write program for computer, here are some 
programming language they can choose from :
 
C++ :
C++ is a superset of C. Meaning that C++ is C with more features. 
Kernel of Windows 7 was written in C. Linux kernel was written in C.
Here is a simple C++ program :
  
#include <stdio.h>
  
int main (void)
{
    printf("Hello World !\n");
    return 0;
}
  
C++ are very complicated.It needs to be compile 
into machine native code to be able to run. But it 
runs very fast and used very little memory. 
A C++ program in Windows will not be able to run on Linux and vice vesa. 
A program for AMD 64 cannot be run on Intel32 machine.
C++ program can deal directly with your hardware and the programmer
must manage the memory of the program properly.
Java:
Java is a great programming language by Sun (now belong to Oracle).
The syntax looks like C and it has automatic memory management. But 
C++ program runs 10 to 100 times faster then java. Here is
a sample Java program code :  
 
package helloworldapp;

public class HelloWorldApp {

    public HelloWorldApp() {
    }

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }

}
 
The  code must be compile to bytecode and load into 
your Java interpreter program to be able to run. But
the bytecode are portable across different OS and machine.
Java is simple but take a lot of writing to do simple thing and it 
is slow and take o lot of your computer memory.
 
Python :
Python is a cool programming language. It is very simple
and programmer can write a program in the shortest of time.
Here is a simple code program:
 
print " hello world !" 
 
 
Simple right ? Python code are no need to compile into anything.
You just run the text file with python interpreter program. Python
are slower then Java. But NASA and Wall street use it for their mission
critical application. 

Wednesday 24 August 2011

The truth about Samarahan Country Club

There are some confusion about the SCC (samarahan Country Club) thing I posted yesterday. So I should clear the smoke a bit.

By joining SCC, you are not joining The Sarawak Club

You can't use the facilities at The Sarawak Club although you are a member of SCC. Not even their toilet.

But you can get a hideaway with your family during weekend at Samarahan, enjoy golf, good food, swimming, gym and nice food !

Application form are at the Sarawak Club. Valid for 3 months only.

Tuesday 23 August 2011

difference between Intel Pentium G620 I3, i5 and i7

Many people asking me this question so I have better make clear explaination here.

First of all, from the technology point of view, the 4 thing is about the same. But Intel make different name for them for marketing and different range of pricing.

Here are some of the features of these LGA 1155 processors :


2 core and 4 core : i7 normally has 4 cores but the others has 2 cores except some expensive i5.

Hyper Threading : Useless technology by Intel. Only the Pentium G620 doesn't has it. You will see 4 cores on your OS but actually there are only 2. Another 2 are virtual core. The virtual core was generated using extra cycle from your CPU. The truth is if you have extra CPU cycle, you don't need hyper threading. The shit just confuse your operating system.

Turbo Boost : Only i5 and i7 has this thing. The CPU can increase speed by 30 % for a few seconds.  But this is just for temporary only. I don't see any benefit of this thing.

Clear Video : Only on i5 and i7. This thing can directly decode your H264 and mpeg 4 movie within your CPU (aka H264 hardware decoding) . But CPU nowadays are powerful enough to decode all these movies using software. Unless you want to watch Super High Resolution Full HD video (where to get this kind of video ?), you really don't need this shit. Do you know that computers nowadays can directly decode mpeg2 (aka DVD). But nobody use this features anyway because the software is good enough already. Software can be upgraded but hardware can't.

True 3D technology : This one on i5 and i7 only. can render 3D thing in the CPU. Useless unless you play racing game and 3D shooting game. And if you really serious into gaming, buy AMD.

Conclussion : It is all the 'price' thing. Buy i7 and i5 if you wanna show off you are rich. Buy G620 if you want to do serious work and wanna save $

Monday 22 August 2011

Rich Foochow finding a brain

One day, a doctor told a very rich Sibu Foochow guy, " Boss, your brain got cancer and you need a new brain from a person who is dying!"

The Foochow said, " My God ! Can you find me a very good brain ? I am willing to pay anything."

Few days later, the doctor called the rich man," Boss I have found one which belong to a civil engineer. He is willing to transfer to you if you willing to pay 1 million ringgits."

The Foochow said, " An engineer ? You think I am so poor ? find me a more expensive one !"

Few days past by and the doctor told the guy, " I have found one brain from a scientist, this one will cost you 10 millions !"

The Foochow said, " I am a billionaire, find a brain that is really good ! I want first class !"

Again another few days went by and the doctor call again, " OK. I have found the best brain but will cost you 500 millions."

Rich man said, " Great, will take it !"

After a successful brain transferring surgery the Foochow said, " Thanks doctor for your work. I believe you have given me the best brain. May I know this brain belong to who ?"

Doc answer, " a civil servant."

"What !??? My God ! Why is it so expensive ??!!!"

Doctor said, " Because it is hardly been used."

Thursday 18 August 2011

how to bypass government DNS blocking of certain web site

Last month, Malaysia has instructed all the ISP to block some file sharing website. Some of the sites are : www.thepiratebay.org filestube.com duckload.com megaupload.com and many others. Most ISP block it inside their DNS server. Users just change to a new DNS server and will be able to access all those sites.

What is DNS Server? DNS is Domain Name Server. Devices connect to each other using IPV4 address on the internet. Like : 206.678.1.5 or 235.456.23.5

when you key in an address on your browser like www.yahoo.com, the computer will ask the DNS server for the IPV4 address of www.yahoo.com. And the DNS server will reply something like 243.326.345.6

Just change the DNS Server to google DNS server and you can bypass all your ISP blocking.

In Windows XP:
Control Panel  -> Network Connection -> Local Area Network (Or Wireless Network) -> click on TCP / IP -> Properties

change your DNS server to 8.8.8.8 and secondary 8.8.4.4

In Windows 7 :
Control Panel -> Network And Internet -> Network And Sharing Center ->Manage Network Connection
Right click on your connection and select Properties. Click On TCP/IPV4 and select Properties

change your DNS server to 8.8.8.8 and secondary 8.8.4.4

In Linux :

edit the file /etc/resolv.conf


Four UN soldiers

During the war in Bosnia, 4 UN soldiers was surrounded by enemies. One British, one American, one Malay, One Malaysian Chinese.

The British soldier was shot on his chest. He shouted, " Long live the Queen !" and drop dead.

The American was shot later, before he closed his eyes and died, he said, " God save America !"

Now only left the 2 Malaysian soldiers. The Malay was shot also ! He shouted " Insaf Allah !" before he died.

The Malaysian Chinese is the only one alive. But he doesn't last long also because he was alone. Finally 1 bullet went into his chest.

Before he fall down and died, he shout, " #@&%$ your mother !!!! "

Wednesday 17 August 2011

Happy life without institution churches

I have became one of the millions of Christians who walk out of their churches.

I believe this churches thing was something invented by the evil Emperor Constantine during Roman Empire time. The real church of Christ is the one that is invincible and made of real Christians. Not some elegant pastor who like to criticize others but they themselves are the worst kind of human.


I am surprised there are so many place in the internet that can provide spiritual need. truthforfree is one of them. I know some may said the internet / the facebook / twitter are the Antichrist but I have had enough of their bullshit.

Two weeks ago my friend asked me a question : If a Buddhist want to built a temple, will you donate RM 10 or not ? I answered : Yes if they take shelter of the poor people. But if XXX (sensored) Church asked me for 10 ringgit, I won't even give a cent. Because they are teaching people to love money and they are preaching evil.

Yes. My mother went to this XXX Church once to listen to their Evangelical Sermon. The pastor said "Do you know why Sibu people are rich ??? Because they are Christians !" My mother never had any interest with Christianity ever since.

I love Jesus. I hate local church.

Follow Jesus. Read the Bible and not human bullshit.

Here is what the Bible said about those money loving church :

Revelation 17 :
 One of the seven angels who had the seven bowls came and spoke with me, saying, “Come here. I will show you the judgment of the great prostitute who sits on many waters, with whom the kings of the earth committed sexual immorality, and those who dwell in the earth were made drunken with the wine of her sexual immorality.” He carried me away in the Spirit into a wilderness. I saw a woman sitting on a scarlet-colored animal, full of blasphemous names, having seven heads and ten horns. The woman was dressed in purple and scarlet, and decked with gold and precious stones and pearls, having in her hand a golden cup full of abominations and the impurities of the sexual immorality of the earth.

Get out of here ! Get out of her !!!

Making computer (even) faster

Many people have a very high end computers but it is as slow as a 486..... Some takes 5 minutes to boot up....some takes 30 seconds to open their Microsoft Word ( Most computer dummies use Microsoft Word). So what is the problem ? Any solution ?

Well, most people using 95 % of their CPU power to do non productivity job. Another word : rubbish. Like : Graphic enhancement for their desktop, scan virus and many thing that doesn't make any sense.

So first : Disable Graphic Enhancement : Go to control panel -> System -> Performance -> Setting and select 'adjust computer for best performance'

Second thing : Add exception of 'explorer.exe' to your anti virus program. Even better just get rid of the anti virus program. Switch to Linux and you don't have to worry about virus anymore.

Run 'services.msc' and disable some of the rubbish services. Like 'System Restore', Remote registry, secondary Logon, distributed link transaction, BITS, Fast User Switching.

Run this 3 commands:

fsutil behavior set disablelastaccess 1
fsutil behavior set disable8dot3 1
fsutil dirty set c: (if c is your system drive)

reboot.

get rid of all your temporary files and temporary internet files using disc cleanup

After that, run this :
defrag c: (if C is your system drive)