Friday, February 3, 2012
Thursday, February 2, 2012
Interesting Stuff~~~!!!!
Setting "java.library.path" programmatically
When messing around with JNI, one have to set the “java.library.path” accordingly. Unfortunately the only way is to add a system property *before* the application is started:
java -Djava.library.path=/path/to/libs
Changing the system property later doesn’t have any effect, since the property is evaluated very early and cached.
But the guys over at jdic discovered a way how to work around it. It is a little bit dirty – but hey, those hacks are the reason we all love Java…
System.setProperty( "java.library.path", "/path/to/libs" );Field fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );fieldSysPath.setAccessible( true );fieldSysPath.set( null, null );
Explanation
At first the system property is updated with the new value. This might be a relative path – or maybe you want to create that path dynamically.
The Classloader has a static field (sys_paths) that contains the paths. If that field is set to null, it is initialized automatically. Therefore forcing that field to null will result into the reevaluation of the library path as soon as loadLibrary() is called…
Tuesday, January 31, 2012
interviewing – knowledge vs experience vs skill
When trying to explain the difference between knowledge and experience, I heard someone jokingly mention a formula between the two. While there isn’t really a formula (at least as far as I know), his point is still important. When interviewing, knowledge, experience and skill all come into play. Let’s look at the differences.
Knowledge
- Questions: Do you know how to do what needs to be done? Do you know where to find out?
- Example: Do you know how to read in a file so you can go through it and look for data?
- Why it matters: While technology changes fast, the ability to find knowledge quickly, is an asset. And caching it in your head or knowing what to look for in the API makes things faster.
- Where it is on the resume: list of technologies. Which tends to be buzzwords over depth. After all, if you list “Spring”, you could have just heard of it or be an expert.
Skill
- Questions: Do you know how to identify what needs to be done?
- Example: Do you realize using scanner with a regular expression can make the problem trivial?
- Why it matters: Solving the right problem is what makes development part art (and not all science.)
- Where it is on the resume: Sometimes shows up in the form of on the job accomplishments, but often has to be determined by talking to the person.
Experience
- Questions: Have you done something similar? What worked? What didn’t?
- Example: Do you identify this is the wrong problem to be solving and a better one would be to ….?
- Why it matters: Who wants to repeat the mistakes of the past!
- Where it is on the resume: In some form, it is on the resume as number of years. However, this doesn’t show what the person actually learned. I’ve met people who have managed to learn almost nothing in 7-10 years.
Why this matters at an interview
An interviewer should be interested in all three of these. (Plus potential, fit and many other things.). Everyone has some experience. If you are entry level, it might have come from school or a toy project.
What do you think?
Saturday, November 26, 2011
WITH GREAT POWER COMES GREAT RESPONSIBILITY
Wednesday, November 16, 2011
Wednesday, September 7, 2011
9/7/2011 - Techie Posts
2) If your unix box has FTP or SCP setup you can just write a script that connects and copies files over.
3) NFS (http://support.microsoft.
Batch file instructions for copy/paste:
http://www.ehow.com/how_68
NOTE: You would just copy from the location and then paste to whatever drive/location you mapped the Samba share to.
For the samba setup I would good for instructions for the specific version of Unix you have. Also, google on how to map the share to your Windows machine. Should be easy enough.
http://www.chiark.greenend
Script to transfer files from Linux to Windows
use application pscp.exe
2.Save pscp.exe to c:\pscp.exe (or any location u want to save but make sure no space should be there in the path i.e c:\newfolder\pscp.exe is correct)
3.Create a .bat file the syntax is
c:\pscp.exe -pw
pause
4.Save the Notepad file with ext .bat
5.Enjoy now u can transfer files from linux to windows
Monday, September 5, 2011
from mails interesting..
HI Frndz ,
here are some Bhaja Govinda meaning for slokas
Adi Shankaracharya Bhaja Govindam
1) Seek Govinda! Seek Govinda! Seek Govinda! Oh ignoramus, at the time of death the rules of grammer, which you are trying to cram and master, will not be able to rescue you at all.
2) Oh, Fool! give up your insatiable desire for earthly possessions; be sensible and develop serenity and contentment. Be satisfied and happy with whatever you may earn by the sweat of your brow and whatever has destiny marked for your lot.
3) Enticed by the physical glamour of a woman, do not lose your senses; the body is nothing but a conglomeration of flesh, do not forget this any time.
4) The water droplet on the lotus leaf is tremulous and unsteady. So too is life which is as uncertain. Know the body to be in the claws of disease, which may swallow it at any moment. Life is ultimately nothing but worry, misery and grief.
5) As long as you are fit to make an earning, so long will your kith and kin be solicitous about you, but no sooner your limbs become infirm and your earnings cease, none will care for you, not even your own home-folk.
6) As long as there is life in your body, your people may have concern for you, but once the life-breath ebbs out of your body, even your own wife will run away from you.
7) Childhood skips off on sport and play. Youth flies off in pursuits of love-making. As one grows older he is drowned in worry about the security and future of his wife and children. One's whole life gets spent in some kind of worry or other. And at no stage does man find time to lift his thoughts to God.
8) Who indeed is your beloved and who indeed is your son? Strange indeed are these family bonds; who belongs to you and to whom you belong? whence did you come, Oh brother! Reflect on the truth of it all.
9) The company of the good weans one away from false atttachments; when attachment is lost, delusion ends; when delusion ends, the mind becomes unwavering and steady. An unwavering and steady mind is merited for Jeevan Mukti ( liberation even in this life).
10) When youth is gone, where is lust and its play? Where is the lake when its waters have dried up? Where are the kinsfolk when riches are gone ? When Truth is realised, where is the snare of Samsara?