Tuesday, November 18, 2008

Virtual box back up and restore VDI files

The command is this:

VBoxManage clonevdi /home/winship/.VirtualBox/VDI/WinXP.vdi /media/storage2/tmp/WinXP.vdi

To restore it, go to File->Virtual Disk Manager->Add and select your backup .vdi file


Sunday, September 28, 2008

CSS browser hacks

height:10px;
_height:20px;/* ignored by IE6 */

*height:20px;/* ignored by IE7 */

#container[id] { width: 820px; } /* ignored by IE */


Wednesday, July 16, 2008

Read resource files from class library: resx files from dll

set up for resource files in Visual studio:





Add the below line in your class

ResourceManager rm = new ResourceManager("%NAMESPACE TO BE REPLACE WITH THE DEFUAT NAMESPACE OF LIBRARY%.ErrorMessages", Assembly.GetExecutingAssembly());
rm.GetString("%RESOURCE KEY HERE%");


thats it ,... to read resource in a dll from the same dll

Thursday, February 14, 2008

How to exclude .svn folders from project -Eclipse

Ref:
http://pyre.third-bit.com/blog/archives/101.html
http://lists.ofbiz.org/pipermail/dev/2006-January/009586.html
http://www.malcolmhall.com/?p=98

I’ve just began using Eclipse instead of IntelliJ and one thing had me stumped for an hour. My src folder was under SVN but my bin folder wasn’t, however when I compile, the tortoise plugin for windows explorer suddenly showed the bin folder as under SVN with an exclamation over the folder icon. What was going on? It appears that when Eclipse builds, it copies any files and folders form the src folder to the bin folder including the .svn hidden folders. I had just about given up with Eclipse then I started hunting for a way to manually exclude the .svn folders from the build. A few attempts at making my own exclude pattern which only worked in a few cases I finally found this neat solution on the web:

Modify the project’s java build path to exclude the pattern **/.svn/

Here’s complete directions:
Project / Properties / Java Build Path / Source / unfold your project / Excluded / Edit / Exclusion patterns / Add / “**/.svn/*”