Sunday 14 August 2011

Open Lotus Notes database by replica id

In order to open a Lotus Notes database which is on same server of specified Lotus Notes database, you can use following snippet.

public Database openDatabaseById(Database srcDb, String replicaId) throws Exception {
    String server = srcDb.getServer();
    DbDirectory dir = srcDb.getParent().getDbDirectory(server);
    Database tagDb = dir.openDatabaseByReplicaID(replicaId);
    return tagDb;
}

Wednesday 10 August 2011

Convert date/time from specified time zone to local time

In order to convert date/time from specified time zone to local time, you can use following snippet.

	private Date toLocalTime(Date src, TimeZone zone) {
		Calendar srcCal = new GregorianCalendar();
		srcCal.setTime(src);
		Calendar gmtCal = new GregorianCalendar(zone);
		gmtCal.set(Calendar.YEAR, srcCal.get(Calendar.YEAR));
		gmtCal.set(Calendar.MONTH, srcCal.get(Calendar.MONTH));
		gmtCal.set(Calendar.DATE, srcCal.get(Calendar.DATE));
		gmtCal.set(Calendar.HOUR_OF_DAY, srcCal.get(Calendar.HOUR_OF_DAY));
		gmtCal.set(Calendar.MINUTE, srcCal.get(Calendar.MINUTE));
		gmtCal.set(Calendar.SECOND, srcCal.get(Calendar.SECOND));
		gmtCal.set(Calendar.MILLISECOND, srcCal.get(Calendar.MILLISECOND));
		Calendar tagCal = new GregorianCalendar();
		tagCal.setTime(gmtCal.getTime());
		return tagCal.getTime();
	}

Friday 5 August 2011

Tran Dinh Thoai, with Gump's approach





Jon Foreman – I Am Still Running

You remember me
before I learned to run
At the kissing tree
before I learned my guns
We were 17
17 years young
I am still running
I am still running

I had no idea the pain would be this strong
I had no idea the fight would last this long
In my darkest fears the rights become the wrongs
I am still running, I am still running I am still running I am still running

Build me a home
inside your scars
Build me a home
Inside your song
Build me a home
inside your open arms
The only place I ever will belong

I am still running
I am still running
I am still running
I am still running
Build me a home
inside your scars
Build me a home
Inside your song
Build me a home
inside your open arms
The only place I ever will belong
The only place I ever will belong
inside your open arms
The only place I ever will belong


Forrest Gump: Stupid is as stupid does.



Mrs. Gump: You have to do the best with what God gave you.



Forrest Gump: My momma always said, "Life was like a box of chocolates. You never know what you're gonna get."



Forrest Gump: My Mama always said you've got to put the past behind you before you can move on.



Forrest Gump: Mama always had a way of explaining things so I could understand them.



Lieutenant Daniel Taylor: Have you found Jesus yet, Gump?
Forrest Gump: I didn't know I was supposed to be looking for him, sir.



Forrest Gump: Now you wouldn't believe me if I told you, but I could run like the wind blows. From that day on, if I was ever going somewhere, I was running!



Forrest Gump: When I got tired, I slept. When I got hungry, I ate. When I had to go, you know, I went.
Elderly Southern Woman on Park Bench: And so, you just ran?
Forrest Gump: Yeah.



[Forrest has finished assembling his rifle]
Forrest Gump: DONE, DRILL SERGEANT!
Drill Sergeant: GUUUUUUMP! Why did you put that weapon together so quickly, Gump?
Forrest Gump: [confused] You told me to, Drill Sergeant?
Drill Sergeant: Jesus H. Christ!
[looks at stopwatch]
Drill Sergeant: This is a new company record! If it wouldn't be such a waste of a damn-fine enlisted man I'd recommend you for OCS! You are gonna be a general someday, Gump, now disassemble your weapon and continue!



Drill Sergeant: Gump! What's your sole purpose in this army?
Forrest Gump: To do whatever you tell me, drill sergeant!
Drill Sergeant: God damn it, Gump! You're a god damn genius! This is the most outstanding answer I have ever heard. You must have a goddamn I.Q. of 160. You are goddamn gifted, Private Gump. Listen up, people...
Forrest Gump: [narrates] Now for some reason I fit in the army like one of them round pegs. It's not really hard. You just make your bed real neat and remember to stand up straight and always answer every question with "Yes, drill sergeant."
Drill Sergeant: ...Is that clear?
Forrest Gump: Yes, drill sergeant!



Forrest Gump: That day, for no particular reason, I decided to go for a little run. So I ran to the end of the road. And when I got there, I thought maybe I'd run to the end of town. And when I got there, I thought maybe I'd just run across Greenbow County. And I figured, since I run this far, maybe I'd just run across the great state of Alabama. And that's what I did. I ran clear across Alabama. For no particular reason I just kept on going. I ran clear to the ocean. And when I got there, I figured, since I'd gone this far, I might as well turn around, just keep on going. When I got to another ocean, I figured, since I'd gone this far, I might as well just turn back, keep right on going.



Mrs. Gump: Remember what I told you, Forrest. You're no different than anybody else is. Did you hear what I said, Forrest? You're the same as everybody else. You are no different.
Principal: Your boy's... different, Miz Gump. His IQ's 75.



Forrest Gump: I'm not a smart man... but I know what love is.



Forrest Gump: Mama always said, dying was a part of life.



Forrest Gump: You died on a Saturday morning. And I had you placed here under our tree. And I had that house of your father's bulldozed to the ground. Momma always said dyin' was a part of life. I sure wish it wasn't. Little Forrest, he's doing just fine. About to start school again soon. I make his breakfast, lunch, and dinner every day. I make sure he combs his hair and brushes his teeth every day. Teaching him how to play ping-pong. He's really good. We fish a lot. And every night, we read a book. He's so smart, Jenny. You'd be so proud of him. I am. He, uh, wrote a letter, and he says I can't read it. I'm not supposed to, so I'll just leave it here for you. Jenny, I don't know if Momma was right or if, if it's Lieutenant Dan. I don't know if we each have a destiny, or if we're all just floating around accidental-like on a breeze, but I, I think maybe it's both. Maybe both is happening at the same time. I miss you, Jenny. If there's anything you need, I won't be far away.



Forrest Gump: [running] I had run for 3 years, 2 months, 14 days, and 16 hours.
[he stops and turns around]
Young Man Running: Quiet, quiet! He's gonna say something!
Forrest Gump: [pause] I'm pretty tired... I think I'll go home now.



[when the bullies from school were chasing him]
Jenny Curran: Run, Forrest! Run!



Jenny Curran: [hearing that Forrest is going to Vietnam] Listen, you promise me something, OK? Just if you're ever in trouble, don't be brave. You just run, OK? Just run away.



Forrest Gump: Those must be comfortable shoes, I bet you could walk all day in shoes like those and not feel a thing.
Nurse at Park Bench: My feet hurt.
Forrest Gump: My momma always said you can tell a lot about a person by their shoes, where the go, where they've been. I've worn lots of shoes, I bet if I think about it real hard I can remember my first pair of shoes.

Tran Dinh Thoai, social networking contacts

You can meet Tran Dinh Thoai on following networks:

Buy Website

Follow Tran Dinh Thoai on Twitter

Tran Dinh Thoai, in Osaka, Japan














Tran Dinh Thoai, on past events

Tran Dinh Thoai, on Veterinarian Job Posting/Matching Website project


This is the first project that he has won and completed (in technology term). Bad business skill has led him to failure with poor rating on RAC site and bad financial status (only receive 44% of money but working time is 4 times longer).



We need an ASP.NET C# website (VS.NET 2008 Professional) created that will allow veterinarian clinics to list available jobs and match possible candidates that have registered in the system.

Please review the attached requirements document for more detail.

Here is a summary of the major requirements of the project but you must follow the Ignyte Standards document completely or the final project will not be accepted.

1) Must be written in C#, ASP.NET, and VS.NET 2008 Professional Edition.
2) Must store this information in a SQL Server 2005 Professional database.
3) Application must provide a commercial quality AJAX interface.
4) Application needs to provide logging and tracing functionality in order to assist in troubleshooting.
5) Must follow Ignyte's coding standards which will be provided.
6) Must utilize Ignyte's Data Layer Generator, which will generate the basic data tier along with basic Insert/Update/Delete/select classes and stored procedures, which will save some development time.
7) Must follow our design methodology which requires screen prototypes to built and approved before moving to the business layer modeling and then data layer modeling, which also must be approved before moving on to the coding.
8) Must utilize the CSLA.NET framework for the business objects (Business Layer Tier).

DO NOT BID ON THIS IF YOU ARE FROM INDIA OR PAKISTAN. WE HAVE NEVER HAD A SUCCESSFUL PROJECT COMPLETED FROM ANY CODERS FROM THESE COUNTRIES AND WE WILL NOT DO BUSINESS WITH THEM AGAIN.

Thanks
Ignyte Software Inc.