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/*”

Thursday, December 13, 2007

Configuring Java on Linux

http://sdnshare.sun.com/view.jsp?id=1018

Exo ECM Architectiure request process


Exo_platform Architecture


Form request->to portlet (UIPortlet’s subclass) or UICommand class -> sets Renderer using (VelocityRenderer), sets class using setClazz
-> gets RequestInfo using RequestInfo class -> using a Business service object (For ex:OrganizationService)-> gets Handler(Handler Implementor which is like a DAO) -> using hibernate service ->gets data from database and puts in java objects -> Performs
Business process

Exo-ECM postgres SQL configuration

1) JDBC Driver – copy the driver to application service lib directory.
URL: jdbc:postgresql:postgres
Driver Class: org.postgresql.Driver
Username: postgres
Password: postgres
2) Configure the driver .
http://docs.exoplatform.org/exo-documents/exo-jcr.site/dbcontainer.html
Single-database configuration:
Configure the “database-configuration.pgsql.xml” and “database-configuration.xml” available in “%EXO-TOMCAT-HOME%/conf” directory to postgres: (If ‘database-configuration.pgsql.xml’ not available then take a content copy of ‘database-configuration.hsql.xml’ file and create new one)
The changes includes update the url of data base, driver class, username, password and dialect.
Here are the details for Poetgres:
URL: jdbc:postgresql:postgres
Driver Class: org.postgresql.Driver
Username: postgres
Password: inkriti
Dialect: org.hibernate.dialect.PostgreSQLDialect

3) Intigration

Work n progress:
We are getting issues while creating the tables into postgres data base as hibernate configuration for postgres sql is different from hsql(Ex: In scenarios of identity generation is different for different data bases)