Got to know this interesting bit today
By default in solaris core dump occurs when an application misbehaves(say segmentation fault).
But in linux the default core dumping is disabled.
Using ulimit command one can turn on this feature.
Just enable the application to core dump by
$>ulimit -c unlimited
For more on this refer to
http://www.novell.com/coolsolutions/feature/16257.html
Tuesday, February 27, 2007
Friday, February 23, 2007
Amazon turks now in Indian rupees
Amazon turk now renders Indian rupee transaction. Check it out
http://www.mturk.com/mturk/welcome
http://www.mturk.com/mturk/welcome
Saturday, February 10, 2007
Sun Tech days in Hyderabad
Tuesday, February 06, 2007
Continuations in java
Continuation is an object that represents the execution state of a program at a certain point. We can use continuation to restart the execution from the point stored in it.
One area that has seen practical use of continuations is in web programming
Check out an enumeration here
One area that has seen practical use of continuations is in web programming
Check out an enumeration here
Monday, December 25, 2006
Krugle - Code Search for Developers
This is a nice site for code stealing
Read more at www.krugle.com/
Friday, December 22, 2006
Thursday, October 19, 2006
How to list only directories in Unix
Well this may seem a very simple problem, but its not. So it deserves a thread for sure
Traditional method
ls -l|grep ^d
But u get the other unwanted details, incase u are automating
Slightly Sophisticated
find . -type d
But on execution u will dicern that find is recursive, so "just the" folders of the current directory are not displayed
If its getting slightly complicated try this simpler solution.
ls -l|grep ^d|awk '{print $9}'
Pretty neat.
This command works almost fine. But just in case the folder has a "space", the command fails to get the exact name of the folder.
Here is a solution which "WORKS" and is very simple
ls -p |grep /
Just an indicator of the power of the raw tools invented ages ago. KISS(Keep it Simple S......)
Traditional method
ls -l|grep ^d
But u get the other unwanted details, incase u are automating
Slightly Sophisticated
find . -type d
But on execution u will dicern that find is recursive, so "just the" folders of the current directory are not displayed
If its getting slightly complicated try this simpler solution.
ls -l|grep ^d|awk '{print $9}'
Pretty neat.
This command works almost fine. But just in case the folder has a "space", the command fails to get the exact name of the folder.
Here is a solution which "WORKS" and is very simple
ls -p |grep /
Just an indicator of the power of the raw tools invented ages ago. KISS(Keep it Simple S......)
Saturday, October 07, 2006
Google does it again
Check this out. Its out and open for people to use.
Now here are the interesting issues with it.
1) Be prepared for spams. Just try this, you will know.
2) Emotions the poor developers go through :-X . Just pick your slang, google does the rest.I just hope openSolaris is clean!!!!!!!!!!!!!!
3) Some programmers put the default password in sourcecode and Most lazy users never change the default password.This makes it easy to get the default password which can be exploited. Try this
Actually this is not a great innovation in itself. Krugle, Koders, and Codease are into this. But a gaint entering will have its own advatages.
"Good programmers write good code. Great programmers find it on Google!"
Now here are the interesting issues with it.
1) Be prepared for spams. Just try this, you will know.
2) Emotions the poor developers go through :-X . Just pick your slang, google does the rest.I just hope openSolaris is clean!!!!!!!!!!!!!!
3) Some programmers put the default password in sourcecode and Most lazy users never change the default password.This makes it easy to get the default password which can be exploited. Try this
Actually this is not a great innovation in itself. Krugle, Koders, and Codease are into this. But a gaint entering will have its own advatages.
"Good programmers write good code. Great programmers find it on Google!"
Tuesday, September 26, 2006
PHP sucks big time
I was trying to integrate Apache--PHP--mysql for a HR project at janagraha.
The problem is that the php documentation is very old...or I should say it works for lower versions of php and apache.
So here is a small TO-DO on how to go about integrating
1) Download Apache here. Apply your user friendly GUI knowledge of windows and get it installed.
2)Download php here.
3)Unzip in d:\php5.
4)Rename php.ini-recommended to php.ini
5)Add these lines to the top of httpd.conf
# PHP 5 Support
LoadModule php5_module "d:/php5/php5apache2_2_filter.dll"
LoadFile "d:/php5/php5ts.dll"
AddOutputFilter PHP php
PHPIniDir "d:/php5"
***Please note the locations used.
6) Finally process is over. Create a test.php.
Having say
copy to htdocs folder of apache.
7)RESTART APACHE. (hopefully no errors).
Run http://localhost/test.php
Worth a try though
The problem is that the php documentation is very old...or I should say it works for lower versions of php and apache.
So here is a small TO-DO on how to go about integrating
1) Download Apache here. Apply your user friendly GUI knowledge of windows and get it installed.
2)Download php here.
3)Unzip in d:\php5.
4)Rename php.ini-recommended to php.ini
5)Add these lines to the top of httpd.conf
# PHP 5 Support
LoadModule php5_module "d:/php5/php5apache2_2_filter.dll"
LoadFile "d:/php5/php5ts.dll"
AddOutputFilter PHP php
PHPIniDir "d:/php5"
***Please note the locations used.
6) Finally process is over. Create a test.php.
Having say
copy to htdocs folder of apache.
7)RESTART APACHE. (hopefully no errors).
Run http://localhost/test.php
Worth a try though
Thursday, September 07, 2006
Google Releases Tesseract as Open Source
Google recently released Tesseract as open source. Originally developed at the HP Labs from 1985-1995, it has been vouched as one of the most accurate Optical Character Recognition (OCR) programs available. You can download Tesseract here.
Checkout one possible use of this technology here
Leaving the rest to imagination....
Checkout one possible use of this technology here
Leaving the rest to imagination....
Monday, August 28, 2006
Does machine have JAVA
My friend can up with a curious problem.
To run an applet a prerequiste is to actually check whether JRE(or JVM) is actually present on the machine. Although applet inherits the intelligence to actually point the browser to the web location.
However if the application has to be in total control then how??????
In short for Non-IE browsers then navigator.mimeTypes gets the registry values for the installed runtimes.
But alas IE does not implement mimetypes. So an activeX document to implement the same.
Here is a small snippet of the code written in javascript.
if(navigator.mimeTypes) {
//For non-IE browsers
for (i=0; i < navigator.mimeTypes.length; i++) {
if( (navigator.mimeTypes[ i].type != null)
&& (navigator.mimeTypes[ i].type.indexOf(
"application/x-java-applet;jpi-version=1.5") != -1) ) {
pluginDetected = true;
break;
}
}
}
} else if (is_ie5up) {
var javaVersion;
var shell;
try {
// Create WSH(WindowsScriptHost) shell, available on Windows only
shell = new ActiveXObject("WScript.Shell");
if (shell != null) {
// Read JRE version from Window Registry
try {
javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
} catch(e) {
// handle exceptions raised by 'shell.regRead(...)' here
// so that the outer try-catch block would receive only
// exceptions raised by 'shell = new ActiveXObject(...)'
}
}
} catch(e) {
}
To run an applet a prerequiste is to actually check whether JRE(or JVM) is actually present on the machine. Although applet inherits the intelligence to actually point the browser to the web location.
However if the application has to be in total control then how??????
In short for Non-IE browsers then navigator.mimeTypes gets the registry values for the installed runtimes.
But alas IE does not implement mimetypes. So an activeX document to implement the same.
Here is a small snippet of the code written in javascript.
if(navigator.mimeTypes) {
//For non-IE browsers
for (i=0; i < navigator.mimeTypes.length; i++) {
if( (navigator.mimeTypes[ i].type != null)
&& (navigator.mimeTypes[ i].type.indexOf(
"application/x-java-applet;jpi-version=1.5") != -1) ) {
pluginDetected = true;
break;
}
}
}
} else if (is_ie5up) {
var javaVersion;
var shell;
try {
// Create WSH(WindowsScriptHost) shell, available on Windows only
shell = new ActiveXObject("WScript.Shell");
if (shell != null) {
// Read JRE version from Window Registry
try {
javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
} catch(e) {
// handle exceptions raised by 'shell.regRead(...)' here
// so that the outer try-catch block would receive only
// exceptions raised by 'shell = new ActiveXObject(...)'
}
}
} catch(e) {
}
My friend can up with a curious problem.
To run an applet a prerequiste is to actually check whether JRE(or JVM) is actually present on the machine. Although applet inherits the intelligence to actually point the browser to the web location.
However if the application has to be in total control then how??????
In short for Non-IE browsers then navigator.mimeTypes gets the registry values for the installed runtimes.
But alas IE does not implement mimetypes. So an activeX document to implement the same.
Here is a small snippet of the code written in javascript.
if(navigator.mimeTypes) {
//For non-IE browsers
for (i=0; i < navigator.mimeTypes.length; i++) {
if( (navigator.mimeTypes[ i].type != null)
&& (navigator.mimeTypes[ i].type.indexOf(
"application/x-java-applet;jpi-version=1.5") != -1) ) {
pluginDetected = true;
break;
}
}
}
} else if (is_ie5up) {
var javaVersion;
var shell;
try {
// Create WSH(WindowsScriptHost) shell, available on Windows only
shell = new ActiveXObject("WScript.Shell");
if (shell != null) {
// Read JRE version from Window Registry
try {
javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
} catch(e) {
// handle exceptions raised by 'shell.regRead(...)' here
// so that the outer try-catch block would receive only
// exceptions raised by 'shell = new ActiveXObject(...)'
}
}
} catch(e) {
}
To run an applet a prerequiste is to actually check whether JRE(or JVM) is actually present on the machine. Although applet inherits the intelligence to actually point the browser to the web location.
However if the application has to be in total control then how??????
In short for Non-IE browsers then navigator.mimeTypes gets the registry values for the installed runtimes.
But alas IE does not implement mimetypes. So an activeX document to implement the same.
Here is a small snippet of the code written in javascript.
if(navigator.mimeTypes) {
//For non-IE browsers
for (i=0; i < navigator.mimeTypes.length; i++) {
if( (navigator.mimeTypes[ i].type != null)
&& (navigator.mimeTypes[ i].type.indexOf(
"application/x-java-applet;jpi-version=1.5") != -1) ) {
pluginDetected = true;
break;
}
}
}
} else if (is_ie5up) {
var javaVersion;
var shell;
try {
// Create WSH(WindowsScriptHost) shell, available on Windows only
shell = new ActiveXObject("WScript.Shell");
if (shell != null) {
// Read JRE version from Window Registry
try {
javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
} catch(e) {
// handle exceptions raised by 'shell.regRead(...)' here
// so that the outer try-catch block would receive only
// exceptions raised by 'shell = new ActiveXObject(...)'
}
}
} catch(e) {
}
Thursday, August 17, 2006
Richard Stallman @IISc
Title: Free Software: current status and challenges
Time: 19 Aug (Sat) 11am
Place: Faculty Hall
Speaker: Richard Stallman,
Founder of GNU project and FSF (Free Software Foundation)
Abstract:
Richard Stallman will give a talk on free software and current status on
aspects such as GPLv3, DRM (digital rights mgmt), DMCA, etc.
Bio:
Richard Stallman is the founder of the GNU Project, launched in 1984 to
develop the free software operating system GNU. The name ``GNU'' is a
recursive acronym for ``GNU's Not Unix''.
Stallman graduated from Harvard in 1974 with a BA in physics. During his
college years, he also worked as a staff hacker at the MIT Artificial
Intelligence Lab, learning operating system development by doing it. He
wrote the first extensible Emacs text editor there in 1975. He also
developed the AI technique of dependency-directed backtracking, also
known as truth maintenance. In January 1984 he resigned from MIT to
start the GNU project.
Stallman received the Grace Hopper award for 1991 from the Association
for Computing Machinery, for his development of the first Emacs editor.
In 1990 he was awarded a Macarthur foundation fellowship, and in 1996 an
honorary doctorate from the Royal Institute of Technology in Sweden. In
1998 he received the Electronic Frontier Foundation's pioneer award
along with Linus Torvalds. In 1999 he received the Yuri Rubinski award.
In 2001 he received a second honorary doctorate, from the University of
Glasgow, and shared the Takeda award for social/economic betterment with
Torvalds and Ken Sakamura. In 2002 he was elected to the US National
Academy of Engineering, and in 2003 to the American Academy of Arts and
Sciences. In 2003 he was named an honorary professor of the Universidad
Nacional de Ingenieria in Peru, and received an honorary doctorate from
the Free University of Brussels. In 2004 he received an honorary
doctorate from the Universidad Nacional de Salta, in Argentina.
About GNU:
GNU is free software: everyone is free to copy it and redistribute it,
as well as to make changes either large or small. Non-free software
keeps users divided and helpless, forbidden to share it and unable to
change it. A free operating system is essential for people to be able to
use computers in freedom.
Today, Linux-based variants of the GNU system, based on the kernel Linux
developed by Linus Torvalds, are in widespread use. There are estimated
to be some 20 million users of GNU/Linux systems today.
Richard Stallman is the principal author of the GNU Compiler Collection,
a portable optimizing compiler which was designed to support diverse
architectures and multiple languages. The compiler now supports over 30
different architectures and 7 programming languages.
Stallman also wrote the GNU symbolic debugger (gdb), GNU Emacs, and
various other programs for the GNU operating system.
Time: 19 Aug (Sat) 11am
Place: Faculty Hall
Speaker: Richard Stallman,
Founder of GNU project and FSF (Free Software Foundation)
Abstract:
Richard Stallman will give a talk on free software and current status on
aspects such as GPLv3, DRM (digital rights mgmt), DMCA, etc.
Bio:
Richard Stallman is the founder of the GNU Project, launched in 1984 to
develop the free software operating system GNU. The name ``GNU'' is a
recursive acronym for ``GNU's Not Unix''.
Stallman graduated from Harvard in 1974 with a BA in physics. During his
college years, he also worked as a staff hacker at the MIT Artificial
Intelligence Lab, learning operating system development by doing it. He
wrote the first extensible Emacs text editor there in 1975. He also
developed the AI technique of dependency-directed backtracking, also
known as truth maintenance. In January 1984 he resigned from MIT to
start the GNU project.
Stallman received the Grace Hopper award for 1991 from the Association
for Computing Machinery, for his development of the first Emacs editor.
In 1990 he was awarded a Macarthur foundation fellowship, and in 1996 an
honorary doctorate from the Royal Institute of Technology in Sweden. In
1998 he received the Electronic Frontier Foundation's pioneer award
along with Linus Torvalds. In 1999 he received the Yuri Rubinski award.
In 2001 he received a second honorary doctorate, from the University of
Glasgow, and shared the Takeda award for social/economic betterment with
Torvalds and Ken Sakamura. In 2002 he was elected to the US National
Academy of Engineering, and in 2003 to the American Academy of Arts and
Sciences. In 2003 he was named an honorary professor of the Universidad
Nacional de Ingenieria in Peru, and received an honorary doctorate from
the Free University of Brussels. In 2004 he received an honorary
doctorate from the Universidad Nacional de Salta, in Argentina.
About GNU:
GNU is free software: everyone is free to copy it and redistribute it,
as well as to make changes either large or small. Non-free software
keeps users divided and helpless, forbidden to share it and unable to
change it. A free operating system is essential for people to be able to
use computers in freedom.
Today, Linux-based variants of the GNU system, based on the kernel Linux
developed by Linus Torvalds, are in widespread use. There are estimated
to be some 20 million users of GNU/Linux systems today.
Richard Stallman is the principal author of the GNU Compiler Collection,
a portable optimizing compiler which was designed to support diverse
architectures and multiple languages. The compiler now supports over 30
different architectures and 7 programming languages.
Stallman also wrote the GNU symbolic debugger (gdb), GNU Emacs, and
various other programs for the GNU operating system.
Monday, August 07, 2006
Is this methods fool proof?
Does this method make a valid check for even numbers?
public static boolean isEven(int i) {
return i % 2 == 1;
}
public static boolean isEven(int i) {
return i % 2 == 1;
}
Wednesday, August 02, 2006
Nice Article on troublshooting
Check this out
I liked the following points discussed
1)Use of strings for printing the strings of printable characters in files.
2)Apt examples of gdb,strace & ldd
Also this very useful tip. I ran into this , for finding out what is used of "OR-ing" in javascript.
"Google normally removes common words like 'and', 'or', 'when' etc from the search patten. To forcefully include them in the search, use a '+' just before the word. ( +word_to_be_included)"
I liked the following points discussed
1)Use of strings for printing the strings of printable characters in files.
2)Apt examples of gdb,strace & ldd
Also this very useful tip. I ran into this , for finding out what is used of "OR-ing" in javascript.
"Google normally removes common words like 'and', 'or', 'when' etc from the search patten. To forcefully include them in the search, use a '+' just before the word. ( +word_to_be_included)"
Monday, July 31, 2006
IBM is legacy, Infosys is the future
These are the exact words of euphemism used by our FM P Chidambaram.
I think its time for Indian companies and Indians to be globally competetive. I would love to see a day when a fresh college grad rejects a MNC's offer for an Indian company for a more financially as well as technically satisfying career. I know the day is not quite far, its in the air- can sense it .
Well Infosys has all it takes to kick butt out of IBM.
Happy birthday Infy( btw its Arnold's Birthday today as well, 1 more astrological reason to be gr8)
And congratulations to all the Infy mates, u are in for a treat. Enjoy madi
I think its time for Indian companies and Indians to be globally competetive. I would love to see a day when a fresh college grad rejects a MNC's offer for an Indian company for a more financially as well as technically satisfying career. I know the day is not quite far, its in the air- can sense it .
Well Infosys has all it takes to kick butt out of IBM.
Happy birthday Infy( btw its Arnold's Birthday today as well, 1 more astrological reason to be gr8)
And congratulations to all the Infy mates, u are in for a treat. Enjoy madi
Wednesday, July 26, 2006
YouOS Online OS!!!!!!!!
Are we seeing the beginning of the end of Microsoft days, finally? It may be too soon to say but YouOS looks pretty functional to me. “YouOS strives to bring the web and traditional operating systems together to form a shared virtual computer.” It is a wonderful concept. There are gotchas today, not to mention crumbling under digg/slash effect, but first, what in the hell is YouOS?
YouOS is a web operating system that lets you run diverse applications within a web browser. Small applications like sticky notes or clocks. Large applications like word processing, mp3 players, and instant messaging. Even better, it’s very easy to tweak an existing application or write your own.
The idea is very captivating. Imagine a giant computer which everyone across the internet can share and work on. You can share your desktop, work equally well from any computer. “Your desktop, applications, and data travel with you from cafe to cafe, session to session. And tedious things like data backups and archiving? We’ll take care of them for you.” And yet you control your data.
Rapid application development and management is central to YouOS. You can also clone an existing application to start yours. Here is a subset of the sample apps developed by the YouOS team:
* RichTextWarrior - a rich text editor.
* Wshell - a shell program, like in Linux. Try running “ps” or “ls” or javascript.
* FlickRSS - want to have new pictures every time you log on? Use this.
* Mersenne Prime Search - help search for special prime numbers.
* goohoo - a not-so elegant way to search yahoo and google at the same time.
* Penguin - an animated gif for your desktop
* ChatWarrior - a chat room application
YouOS exposes its functionality through open RESTful server APIs. That means you can easily write applications which consumes them or builds upon them. You can easily provide a customized version of YouOS for mobile for example or a desktop client which uses YouOS API’s to provide services.
In short - wonderful concept and nice implementation (in Python). I wish this project success. It is very likely that it will soon be gobbled by the likes or Microsoft, Yahoo or Google.
YouOS is a web operating system that lets you run diverse applications within a web browser. Small applications like sticky notes or clocks. Large applications like word processing, mp3 players, and instant messaging. Even better, it’s very easy to tweak an existing application or write your own.
The idea is very captivating. Imagine a giant computer which everyone across the internet can share and work on. You can share your desktop, work equally well from any computer. “Your desktop, applications, and data travel with you from cafe to cafe, session to session. And tedious things like data backups and archiving? We’ll take care of them for you.” And yet you control your data.
Rapid application development and management is central to YouOS. You can also clone an existing application to start yours. Here is a subset of the sample apps developed by the YouOS team:
* RichTextWarrior - a rich text editor.
* Wshell - a shell program, like in Linux. Try running “ps” or “ls” or javascript.
* FlickRSS - want to have new pictures every time you log on? Use this.
* Mersenne Prime Search - help search for special prime numbers.
* goohoo - a not-so elegant way to search yahoo and google at the same time.
* Penguin - an animated gif for your desktop
* ChatWarrior - a chat room application
YouOS exposes its functionality through open RESTful server APIs. That means you can easily write applications which consumes them or builds upon them. You can easily provide a customized version of YouOS for mobile for example or a desktop client which uses YouOS API’s to provide services.
In short - wonderful concept and nice implementation (in Python). I wish this project success. It is very likely that it will soon be gobbled by the likes or Microsoft, Yahoo or Google.
Thursday, July 06, 2006
Wiki --How can we create ONE
Just finished with my wiki creation. My machine is the server for the internal wiki which can be put to use.
It turned out to be much simpler than I expected.
Just go to http://www.jspwiki.org/wiki/JSPWikiDownload .....download
Tomcat is required as a container for the above generated war file.
Just place the JSP WIKI war file in the tomcat HOME directory. Tomcat does everything all by itself.
Thats it WIKI is up
It turned out to be much simpler than I expected.
Just go to http://www.jspwiki.org/wiki/JSPWikiDownload .....download
Tomcat is required as a container for the above generated war file.
Just place the JSP WIKI war file in the tomcat HOME directory. Tomcat does everything all by itself.
Thats it WIKI is up
Wednesday, June 21, 2006
Microchip@500GHz speed
Check this news out.
This is truly out of the world.... If IBM achieves it then boy it will be the company everyone will be after. If I may recall correctly Intel is struggling to get a 5 GHz processor out.
When I purchased my PC way back in 2002, I was proud to say that my intel processor is the fastest with 1.7Gig. Well Moore's law set in thereafter. But hey this is voilation of the law to the core.
I wholeheartdly doubt such high speeds being pragmatic.Nevertheless in case it clicks, then the entire world will be changed.
This processor at 451 degrees below zero is certailnly SUPER COOL!!!!!!!!!
This is truly out of the world.... If IBM achieves it then boy it will be the company everyone will be after. If I may recall correctly Intel is struggling to get a 5 GHz processor out.
When I purchased my PC way back in 2002, I was proud to say that my intel processor is the fastest with 1.7Gig. Well Moore's law set in thereafter. But hey this is voilation of the law to the core.
I wholeheartdly doubt such high speeds being pragmatic.Nevertheless in case it clicks, then the entire world will be changed.
This processor at 451 degrees below zero is certailnly SUPER COOL!!!!!!!!!
Sunday, April 30, 2006
Pick Up Javascript code for bookmark
Bookmark this site here
Tested on Firefox and IE. Please comment if you face any run-time or javascript errors with your favourite browser.
Tested on Firefox and IE. Please comment if you face any run-time or javascript errors with your favourite browser.
Subscribe to:
Posts (Atom)