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.

Tuesday, April 26, 2011

Microsoft Access and Excel Driver 64 bit OS


Microsoft.ACE.OLEDB.12.0

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d&displaylang=en

Connection string

For Access
xConnStr = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
                        "Data Source=" & Path & ";User ID=;Password=;")

For Excel
xConnStr = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & Path & ";" & _
"Extended Properties=" & Convert.ToChar(34).ToString() & "Excel 8.0;Imex=1; HDR=Yes; " + Convert.ToChar(34).ToString()

This download will install a set of components that facilitate the transfer of data between existing Microsoft Office files such as Microsoft Office Access 2010 (*.mdb and *.accdb) files and Microsoft Office Excel 2010 (*.xls, *.xlsx, and *.xlsb) files to other data sources such as Microsoft SQL Server. Connectivity to existing text files is also supported.ODBC and OLEDB drivers are installed for application developers to use in developing their applications with connectivity to Office file formats.

Tuesday, February 15, 2011

JUDGE YOURSELF!

Once upon a time there was a painter who had just completed his course. He took 3 days and painted beautiful scenery. He wanted people's opinion about his caliber and painting skills.

He put his creation at a busy street-crossing. And just down below aboard which read -"I have painted this piece. Since I'm new to this profession I might have committed some mistakes in my strokes etc. Please put a cross wherever you see a mistake."

While he came back in the evening to collect his painting he was completely shattered to see that whole canvass was filled with Xs (crosses) and some people had even written their comments on the painting.

Disheartened and broken completely he ran to his master's place and burst into tears.

This young artist was breathing heavily and master heard him saying "I'm useless and if this is what I have learnt to paint I'm not worth becoming a painter. People have rejected me completely. I feel like dying".

Master smiled and suggested "My Son, I will prove that you are a great artist and have learnt flawless painting. Do as I say without questioning it. It WILL work."

Young artist reluctantly agreed and two days later early morning he presented a replica of his earlier painting to his master. Master took that gracefully and smiled.

"Come with me." master said.

They reached the same street-square early morning and displayed the same painting exactly at the same place. Now master took out anotherboard which read -"Gentlemen, I have painted this piece. Since I'm new to this profession I might have committed some mistakes in my strokesetc. I have put a box with colors and brushes just below. Please do a favor. If you see a mistake, kindly pick up the brush and correct it."

Master and disciple walked back home.

They both visited the place same evening. Young painter was surprised to see that actually there was not a single correction done so far. Next day again they visited and found painting remained untouched. They say the painting was kept there for a month for no correction came in!

Moral of the story:
It is easier to criticize, but DIFFICULT TO IMPROVE !

So don't get carried away or judge yourself by someone else’s criticism and feel depressed...

JUDGE YOURSELF! YOU ARE YOUR BEST JUDGE !!!

Wednesday, February 9, 2011

Welcome to the Stock Market

Once upon a time in a village, a man appeared and announced to the villagers that he would buy monkeys for Rs10. The villagers seeing that there were many monkeys around, went out to the forest and started catching them.

The man bought thousands at Rs10 and as supply started to diminish, the villagers stopped their effort. He further announced that he would now buy at Rs20. This renewed the efforts of the villagers and they started catching monkeys again.

Soon the supply diminished even further and people started going back to their farms. The offer rate increased to Rs25 and the supply of monkeys became so little that it was an effort to even see a monkey, let alone catch it!

The man now announced that he would buy monkeys at Rs50! However, since he had to go to the city on some business, his assistant would now buy on behalf of him.

In the absence of the man, the assistant told the villagers. Look at all these monkeys in the big cage that the man has collected. I will sell them to you at Rs35 and when the man returns from the city, you can sell it to him for Rs50.

The villagers squeezed up with all their savings and bought all the monkeys. Then they never saw the man nor his assistant, only monkeys everywhere!!!

Welcome to the Stock Market !!!

Monday, February 7, 2011

Do not to mess with childeren.......

A   little girl was talking to her teacher about whales.
The teacher said it was physically impossible for a whale to swallow a human because even though it was a very large mammal, its throat was very small.
The little girl stated that Jonah was swallowed by a whale.
Irritated, the teacher reiterated that a whale could not swallow a human; it was physically impossible.
The little girl said, “When I get to heaven I will ask Jonah."
The teacher asked, “What if Jonah went to hell?"
The little girl replied, “Then you ask him."
----------------------------------------------------------
 
A   Kindergarten teacher was observing her classroom of children while they were drawing. She would occasionally walk around to see each child's work.
As she got to one little girl who was working diligently, she asked what the drawing was.
The girl replied, "I'm drawing God."
The teacher paused and said, "But no one knows what God looks like."
Without missing a beat, or looking up from her drawing, the girl replied, "They will in a minute."
 
----------------------------------------------------------
 
A   Sunday school teacher was discussing the Ten Commandments with her five and six year olds.
After explaining the commandment to "honour" thy Father and thy Mother, she asked, "Is there a commandment that teaches us how to treat our brothers and sisters?"
Without missing a beat one little boy (the oldest of a family) answered, "Thou shall not kill."
----------------------------------------------------------
 
One day a little girl was sitting and watching her mother do the dishes at the kitchen sink. She suddenly noticed that her mother had several strands of white hair sticking out in contrast on her brunette head.
She looked at her mother and inquisitively asked, "Why are some of your hairs white, Mum?"
Her mother replied, "Well, every time that you do something wrong and make me cry or unhappy, one of my hairs turns white."
The little girl thought about this revelation for a while and then said, "Mummy, how come ALL of grandma's hairs are white?"
 
----------------------------------------------------------
 
The children had all been photographed, and the teacher was trying to persuade them each to buy a copy of the group picture.
"Just think how nice it will be to look at it when you are all grown up and say, "There's Jennifer, she's a lawyer," or "That's Michael, He's a doctor."
A small voice at the back of the room rang out, "And there's the teacher, she's dead."
 
----------------------------------------------------------
 
A   teacher was giving a lesson on the circulation of the blood. Trying to make the matter clearer, she said, "Now, class, if I stood on my head, the blood, as you know, would run into it, and I would turn red in the face."
"Yes," the class said.
"Then why is it that while I am standing upright in the ordinary position the blood doesn't run into my feet?"
A little fellow shouted, “Cause your feet ain't empty."
----------------------------------------------------------
 
The children were lined up in the cafeteria of a Catholic elementary school for lunch. At the head of the table was a large pile of apples. The nun made a note, and posted on the apple tray:
"Take only ONE. God is watching."
Moving further along the lunch line, at the other end of the table was a large pile of chocolate chip cookies.
A child had written a note, "Take all you want. God is watching the apples."
It doesn't matter how many people you send this to, just remember if it made you laugh, your friends will laugh too.
--
If your obstacles bring you down, let your determination bring you up
--

Engineering and Science Notes for easy learning

A blind boy sat on the steps of a building with a hat by his feet. He held up a sign which said: "I am blind, please help." There were only a few coins in the hat.


A man was walking by. He took a few coins from his pocket and dropped them into the hat. He then took the sign, turned it around, and wrote some words. He put the sign back so that everyone who walked by would see the new words.

Soon the hat began to fill up. A lot more people were giving money to the blind boy. That afternoon the man who had changed the sign came to see how things were. The boy recognized his footsteps and asked, "Were you the one who changed my sign this morning? What did you write?"


The man said, "I only wrote the truth. I said what you said but in a different way."

What he had written was: "Today is a beautiful day and I cannot see it."

Do you think the first sign and the second sign were saying the same thing?

Of course both signs told people the boy was blind. But the first sign simply said the boy was blind. The second sign told people they were so lucky that they were not blind. Should we be surprised that the second sign was more effective?


Moral of the Story: Be thankful for what you have. Be creative. Be innovative. Think differently and positively.

Invite others towards good with wisdom. Live life with no excuse and love with no regrets. When life gives you a 100 reasons to cry, show life that you have 1000 reasons to smile. Face your past without regret. Handle your present with confidence. Prepare for the future without fear. Keep the faith and drop the fear.

Great men say, "Life has to be an incessant process of repair and reconstruction, of discarding evil and developing goodness…. In the journey of life, if you want to travel without fear, you must have the ticket of a good conscience."