Pages

Tuesday, September 13, 2011

Bulk Insert

Bulk Insert with file format and unicode formats

http://blogs.msdn.com/b/joaol/archive/2008/11/27/bulk-insert-using-unicode-data-files.aspx






Wednesday, July 20, 2011

PLSQL Query with unicode - nvarhcar2 - arabic

Assuming PL/SQL Developer uses Oracle Client 10.2 libraries, add a new Registry value with the name "ORA_NCHAR_LITERAL_REPLACE" and the string data "TRUE" in the Registry key corresponding to the Oracle Client (HKLM\SOFTWARE\ORACLE\KEY_+Home name+)
NLS_LANG=GERMAN_GERMANY.UTF8
ORA_NCHAR_LITERAL_REPLACE=TRUE

SQL> SELECT VALUE
 
2    FROM nls_database_parameters
 
3   WHERE parameter = 'NLS_NCHAR_CHARACTERSET'; 
If you are using oracle client, and would like to include unicode characters in the CommandText, you should add the folloing line to the start of your application:
System.Environment.SetEnvironmentVariable("ORA_NCHAR_LITERAL_REPLACE", "TRUE"); 

This will allow you, in case you need it, to use the following syntax:
command.CommandText = "INSERT into UNICODEDATA (ID, UNICODESTRING) Values (11, N'Τι κάνεις;')"; 

Oracle white paper: Migration to Unicode Datatypes for Multilingual Databases and Applications. http://www.oracle.com/technology/tech/globalization/pdf/TWP_NCHAR_MIGRATION_10gR2.pdf.

Thursday, July 14, 2011

Cute Valentine

I used to be like this...

Then I met a girl...

She was like this...

I gave her gifts like this...


When she accepted my proposal, I was like this...



I used to talk to her all night like this...


And at the office I use d to do this...


When my friends saw my girlfriend, they stared like this...


And I used to react like this...


But on Valentines Day,
she received a red rose from someone else like this...


And she was like this…


And I was like this…



Which later led to this...


and this...


I felt like doing this...


I started doing this...




Friday, June 24, 2011

Prayer

When Minister Joe Wright was asked to open the new session of the Kansas Senate, everyone was expecting the usual generalities, but this is what they heard:

"Heavenly Father, we come before you today to ask your forgiveness and to seek your direction and guidance.

We know Your Word says, "Woe to those who call evil good", but that is exactly what we have done. We have lost our spiritual equilibrium and reversed our values.

v We have exploited the poor and called it the lottery.

v We have rewarded laziness and called it welfare.

v We have killed our unborn and called it choice.

v We have shot anti-abortionists and called it justifiable.

v We have neglected to discipline our children and called it building self esteem.

v We have abused power and called it politics.

v We have coveted our neighbor's possessions and called it ambition.

v We have polluted the air with profanity and pornography and called it freedom of expression.

v We have ridiculed the time-honored values of our forefathers and called it enlightenment.

ü Search us, Oh, God, and know our hearts today; cleanse us from every sin and set us free. Amen!"

MISCOMUNICATION IN THE OFFICE

Mail from CEO to Manager:

Today at 11 o'clock there will be a total eclipse of the sun. This is when the sun disappears behind the moon for two minutes. As this is something that cannot be seen every day, time will be allowed for employees to view the eclipse in the parking lot. Staff should meet in the lot at ten to eleven, when I will deliver a short speech introducing the eclipse, and giving some background information. Safety goggles will be made available at a small cost.

Mail from Manager to Department Head:

Today at ten to eleven, all staff should meet in the car park. This will be followed by a total eclipse of the sun, which will appear for two minutes. For a moderate cost, this will be made safe with goggles. The CEO will deliver a short speech beforehand to give us all some information. This not something that can be seen everyday.

Mail from Dept. Head to Floor Manager:

The CEO will today deliver a short speech to make the sun disappear for two minutes in the form of an eclipse. This is something that cannot be seen every day, so staff will meet in the car park at ten or eleven. This will be safe, if you pay a moderate cost.

Mail from Floor Manager to Supervisor:

Ten or eleven staff are to go to the car park, where the CEO will eclipse the sun for two minutes. This doesn't happen every day. It will be safe, and as usual it will cost you.

Mail from Supervisor to Staff:

Some staff will go to the car park today to see the CEO disappear. It is a pity, this doesn't happen everyday.

Wednesday, June 22, 2011

Open Source - SMTP

http://emailrelay.sourceforge.net/

E-MailRelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA). When running as a proxy all e-mail messages can be passed through a user-defined program, such as a spam filter, which can drop, re-address or edit messages as they pass through. When running as a store-and-forward MTA incoming messages are stored in a local spool directory, and then forwarded to the next SMTP server on request.
Because of its functional simplicity E-MailRelay is easy to configure, often only requiring the address of the target SMTP server to be put on the command line.
E-MailRelay can also run as a POP3 server. Messages received over SMTP can be automatically dropped into several independent POP3 mailboxes.

Wednesday, May 18, 2011

Attitude

He was grinning as I came out of the airport and was holding a board, which had my name. He grinned even farther when he saw my scowl. "Rough flight?" he asked. "You bet," I said as I got into his car. I was there to address a group on the role of the press, but the journey had been anything but comfortable. I looked around at traffic jams and crowded roads and asked surly, "How's this place to live in?" He grinned farther and asked. "You want a story while I drive?" "Shoot!" I said and found his grin contagious.

"There lived an old man who owned a gas station," said my new friend as he drove, "every afternoon he sat in his rocking chair and greeted the motorists as they passed by. One day his granddaughter also sat next to him. A tall man who surely had to be a tourist began looking around as if he were checking out the area for a place to live and seeing the old man walked up to him and asked, "So what kind of town is this?"

"What kind of a town are you from?" asked the old man.

"Where I'm from," said the tourist, "everyone is very critical of each other. The neighbours all gossip about everyone. It's a real negative place and I'm sure glad I've left the place. It's not a cheerful place at all pardner!"

The old man in the rocking chair looked at the stranger and said, "You know, that's how this town is too!"

An hour later a family that was passing through stopped for gas. A mother jumped out with two small children and rushed to where the rest rooms were. The father who had been driving strolled over to the old man and his grand daughter and asked, "Is this town a pretty good place to live?"

"What about the town you are from? How is it?" asked the old man.
"Well," said the man as he watched his family return, "in the town where I come from, everyone is very close and always willing to lend their neighbour a helping hand. There's always a hello and thank you everywhere you go. I really hate to leave the place, because I feel almost like we are leaving family!"

The old man in the rocking chair looked at the father and gave him a warm smile, "You know," he said, "that's a lot like this town!" and smiled at his wife and kids as they got back into the car and drove off waving.

"Hey granddad?" asked the puzzled granddaughter, "How come you told the first man it was a terrible place to live and the second it's a wonderful place?"

The old man looked lovingly at his granddaughter's wondering blue eyes and said, "No matter where you go, you take your attitude with you and that's what makes a new place wonderful or terrible!"

"So Tony ?" asked my new friend as he drove, "what were you saying?"
"Nothing!" I said and we both laughed out loud.