Sunday, November 7, 2010

Stieg Larsson: Millenium # 1

The Girl with the Dragon Tattoo (Millennium, #1)The Girl with the Dragon Tattoo by Stieg Larsson


Great piece of work.. Lisbeth and Blomkvist won't let you keep the book down.


View all my reviews


Friday, March 19, 2010

How to check the status of server/host using PHP ?

Recently I came across this trivial problem of checking whether a server is ONLINE or OFFLINE. I tried "Ping" command but the following approach was more elegant.



$host = "127.0.0.1"; // could be any host address 
$port = "80"; //  port you wanna check 

$fp = @fsockopen($host, $port, $errno, $errstr, 2);

if (!$fp) {
echo "DEAD";


else { 
echo "ALIVE";
}


?>

Have fun !

Saturday, January 16, 2010

C/C++ on Windows 7 using Eclipse

If you got a "Launch Failed. Binary Not Found" error while running C/C++ project in Eclipse on a Windows 7 machine then you are not the only one. I came across similar problem and I have tried my best to give a terse solution. The reason for this issue might be because  Eclipse doesn't understand the 64 bit binaries generated by our Windows 7 Though,  I'm not sure. Okay, back to our problem. 


The quick steps that are to be followed to run a C/C++ program on Windows 7 are: 

1. We need compiler for Windows for this we are going to install  the following:


Open exe->Choose download and install-> install Current package->Check MinGW tools, g++ compiler, MinGW make-->install path C:\MinGW->Finish. 


(b) Minsys 


Open downloaded exe-> folder C:\msys\1.0-->For MinGW path give C:\MinGW-> Finish.


2. We set the Path (Environment variables) for these compilers: 
Append following to your Path variables (*can be located in the Advanced tab of System in the control panel under the Environment Variables option - Google it if you still can't locate it)


;C:\msys\1.0\bin;C:\mingw\bin


3. Installing CDT plugin to your existing Eclipse: 


Software Update link is: http://download.eclipse.org/tools/cdt/releases/galileo


4. Create a new  project and run the Helloworld file. 


Done ! 


Post any queries you might have. 
Enjoy!!! 













Saturday, December 26, 2009

Port conflicts by Skype



Hi,
It seems a very trivial problem that when 2 programs try running on the same port numbers, they conflict with each other. I came across this problem when my Apache Server stopped working. The culprit was Skype. I installed Skype recently and as far as I knew, it used its own unique port number. But, as I delved further, I found that Skype also uses port 80 (which is default port for almost all HTTP servers) and port 443 as alternate ports :O.

To solve this, Open Skype --> Tools --> Options --> Advanced --> Connection --> Uncheck the use of port 80 and 443 as alternate ports.

Saturday, September 5, 2009

Key is ?


"This just can't be done". "What your are suggesting is Impossible"."Why don't you do it". "[Laughs]" ... These are few of many responses that I encounter, when something that seems very challenging is being suggested. Not so long ago, my mind used to give me back similar responses when we used to debate about numerous things.. (won't go into details.. that would be featured in my autobiography, soon).. I came across this phrase : "Everything is possible. The impossible just takes a bit longer".. and I was totally astonished by the simplicity and +veness of these set of words.. 

When some task, no matter how fantastic it may seem, comes to us, we have a proclivity of judging it by the ways in which it could not be achieved.. the points of failure..( even, I tend to have that panic strike like other Homo sapiens... I must've evolved by now ;-) ) and amidst all of this, the basic idea fails to enlighten us.. that "if it has come to us, it could be done"

I have not come across a single thing task,yet, which just could not be done.. (excluding the weird fantasies some of us crave for)... the basic key is to just define a path in your mind,, and give your life some time to take that course...