Monday, May 25, 2009

Working on two computers using Synergy

I'm working on my laptop, and have another computer next to me which I'm using as an debug server, and sometimes as an extra screen.
The only physical connection between the two computer is being on the same LAN, but for me they are sitting together on the same desk.
So after working a few hours with two keyboards and two mice, I realized there must be a better solution, someone had to have thought of one already!

And so I found Synergy! :-)
Just a few minutes of configuration (inc. figuring out what all those ports, computer names, and screen edged mean), and I have my keyboard and mouse shared with the computer next to me.

Like having multi-monitor configuration, just without ability to move windows between them, and with the processing power of both computer and physical separation between them!

Wednesday, May 20, 2009

Date format


Recently we have had a problem in csv export, that showed the dates in a different format after exporting some rows.
The problem file looked ok, but Microsoft Excel did not show it as we expected ,as showed up , because of the reason that the dates where in the en-US format ,and since we are Israelis, our computers work in he-IL , which is actually almost en-UK
When a date is 5/10 , excel assumes that it is fith of october (wich is still wrong but we don't care as long as it is a date) ;) , however when the date is 5/16 excel files to recognize the 16-th month (hextober, duh !) and shows the date as a string , wich driving our clients nuts

Great so far, because we know what is the problem but the solution was a little triky , because the whole application has culture preset to en-US and actually i was a little bit scarred to change it , therefore we used the dtColData.ToString("yyyy'-'MM'-'dd' 'HH':'mm':'ss") wich worked allright

Sunday, May 10, 2009

Hibernate - how to add a new table

hibernate creating new table

checklist

1. create the table in the database
2. create the class only members this time
3. create the hbm.xml file with mapping of the class members to the
4. update the hibernate.cfg.xml with the new hbm file you have created
5. create the test - and make it fail (c'mon in never works on the first time )

more is comming
  • foreign keys
  • pictures
  • more detailed how to