Monthly Archives: September 2011

[Java/J2EE] Launch a stored Oracle procedure with IN and OUT parameters

Öracle:
CREATE OR REPLACE PROCEDURE get_customer_id (p_customer_id OUT NUMBER, p_order_id IN NUMBER)
IS
BEGIN
   SELECT customer_id INTO p_customer_id FROM orders WHERE order_id = p_order_id; 
EXCEPTION
   WHEN OTHERS
   THEN
      RAISE;
END get_customer_id;
/
Java:
DBprofil[] profil = ResAppli.getDatabaseProfiles();
SessionBase mySessionBase = new SessionBase(profil[0].clonage());
String request = “{call get_customer_id(?, ?)}”;
CallableStatement call = mySessionBase.prepareCall(request);
call.registerOutParameter(1, java.sql.Types.INTEGER);
call.setInt(2, myOrder.getId().intValue());
call.execute();
mySessionBase.commit();
System.out.println(“Customer ID is: ” + call.getInt(1));
Advertisements

Talend Open Studio: Out of memory (Needed xxxxx bytes)

  • Talend Open Studio displays the following error while trying to commit several hundreds of thousands rows: Out of memory (Needed xxxxxbytes)
  • Solution: Diminuer le nombre de lignes au bout duquel Talend doit commit :
    • Select
    • Component
    • Advanced parameters
    • Commit every… : 10000 (default value: change this)

Most Creative Packages in the World

The art of brand packaging.
Review of the unique packaging design that looks original and handy. You won’t throw it away!

10 Reasons You’ll Never Quit Facebook

  1. You’re not going to go back to waiting an hour to send an email to 30 people with 40 photos attached.
  2. How will you remember anybody’s birthday?
  3. How will you stalk your college boyfriend’s new fiance?
  4. Without Facebook what are you going to do when you don’t have a friend’s email address or phone number? Facebook messaging blows. But at least you know you can reach anybody who has a Facebook account.
  5. Forget Facebook. 80 million of you are addicted to Zynga’s Facebook game, FarmVille.
  6. It takes 2 seconds to “join” a new site through Facebook Connect. It can take a good 10 minutes doing it the old way. (Care to subscribe to these magazines?)
  7. How will you hear about parties? How will you remember where and when those parties are? Evite?
  8. You don’t care about Facebook and Mark Zuckerberg’s sometimes sketchy past.
  9. Sure, Facebook has privacy issues, but you don’t care about privacy anymore. Remember when you wouldn’t use your real name on the Internet?
  10. You’ve never quit before. Remember News Feed? Beacon? You didn’t quit then and won’t now, either. Not even if you want to.

Top 10 Reasons Women Love Vampires

Vampires are everywhere — in books like Twilight and in the recently released New Moon trailer, in magazines and newspapers and now on television in the second season of True Blood on HBO. Vampires are stealing our women, but not by the usual force and trickery. Woman love the stupid bloodsuckers!There is something about these Gothic symbols of manhood that make every woman weak in the neck. Is it their style, their power or just their flair for the romantic? It might be a combination of all of the above that makes these thousand-year-old walking corpses so damn appealing to the opposite sex.

Here are 10 reasons why women love vampires, and how a single guy can use this knowledge to his advantage.

No.10 Vampires are loners
The average guy runs with a pack; a group of close drinking friends who come over to watch the game, hit the tiles on the weekends and get into trouble together. This clan takes up quality time and attention that is usually reserved for a girlfriend. Vampires work alone. They don’t have many friends, and if they do, they are usually out doing their own thing. Women love vampires because they have all the time in the world. Literally.

What the single guy could learn: Don’t hang out with your friends so much. Make time for her and occasionally bag plans with the boys. The guys, the game, the golf, and the beers will always be there. Show her you are your own man.

No.9 Vampires require no commitmentduring the day
Even though women love to spend as much time as possible with the man they adore, they still want some alone time to do things with the girls or on their own. They feel bad if they don’t at least call and check in a few times during the day.Women love vampires because vampires can’t take up the entirety of a woman’s day. Hell, they can’t even stay that late into the night. Sleepovers only last until the sun is coming up and vampires are nowhere to be found until the sun goes down.
What thesingle guy could learn: Sometimes a woman does just want to be alone. Give her time to do her own thing and be her own person. Give her space to be independent. It will make the time she spends with you even more special.

No.8 Vampires dress well
Ever seen a poorly dressed vampire? Never. Vampires are always impeccably dressed with perfect hair and a nice complexion (though a tad pale). Their fashionable (and usually dark) garments show off just the right amount of chest. A nice pair of skin-tight trousers and an occasional ascot or medallion completes the look. Like a modern-day Tom Jones without the giant crucifix in his pants — Goth but classy. They usually look better dressed than the living, not even taking into consideration the fact they can’t exactly run to Kenneth Cole at lunch to pick up a nice pair of dark chinos for tonight’s big date. They wear their clothes well and always with the perfect fit. Thankfully, most have dropped the cape.
What the single guy could learn: Dress well for every occasion. Always be slightly overdressed. Find a style that works. If you’re unsure, go to a clothes store and ask the clerk for assistance. Pick clothing that fits your body type. Pick colours that go with your skin tone. When in doubt, dress like the mannequin. But never wear the cape, no matter how good it looks.

No.7 Vampires love necking
Woman love sex. Honestly. But what they love even more is all the fooling around that should be involved before sex. As we all know, men just like to get down to business — but not vampires. They don’t even really care about sex. They want to mess around. Particularly around the neck area — the “sweetspot” as it’s known around the coffins. They know how to start off tender and soft and then get a little rough. Rough enough to draw blood. Kinky.
What the single guy could learn: Start off slow with foreplay. Find out all her most erotic spots. Don’t know her erotic spots? Here’s a crazy notion: ask her! Spend extra time on those areas; especially the neck. The vamps have that part down to a sweet science. If you draw blood you are definitely doing something wrong. The sex will happen. She won’t forget it’s the big payoff, and neither will you.

No.6 Vampires are moody
Women beg to differ, but they honestly do like the occasional hint of drama in a relationship. It keeps things fresh and exciting. This is perfect for the vampire, whose mood is constantly changing. You’d be pissed too if people wanted you dead and all you’ve had to eat for a couple centuries is someblood and the occasional taste of plasma. It’s not the greatest life to lead. Good thing they’ve got all the female attention to keep things bearable.
What the single guy could learn: Don’t be a moody little baby, but occasionally keep her on her toes. As soon as a relationship becomes complacent and boring, the problems arise. Spontaneity is one of the reasons women love vampires, so be unpredictable yourself. Do things out of the ordinary like pop into her office for lunch, make her a surprise dinner or demand she skips work to spend the day together.

No.5 Vampires are persuasive
Vampires have a calming demeanour. They are suave, smooth and soft-spoken, and the women eat it up. They convince the smart and savvy women that their odd behaviour is on the up-and-up. They even convince them it’s cool to suck blood. How hard is that? You can’t even convince her to try new sexual positions.
What the single guy could learn: Tell a woman what you want by being candid and straightforward, but not necessarily demanding. It will save a load of time in arguing and fighting. Speak your mind. Don’t play games. Don’t let her have to figure you out.

No.4 Vampires search forever to find”her”
Woman love to think they were destined to be with one man for the rest of their lives. They love the romantic angle of a soul mate — two people destined to meet, fall in love and be together forever. Now imagine that man is just as eager to find her and has been searching for untold centuries. It knocks a woman off her feet like a silver bullet through the heart. When a vampire sinks his teeth (figuratively) into a woman, he makes her feel like the only woman in the world. It’s no wonder women fall hard — then again, it could also be the blood loss.
What the single guy could learn: Prove to her that she is the only woman in your life. Don’t check out other girls at a bar or ogle at the Top 99 Women on AskMen (at least not for as long as you usually do), and make her feel like the greatest thing that has ever happened to you.

No.3 Vampires are romantic
Give those dead, bloodsucking bastards credit: they know how to romance the pants off a woman. The setting is always dark and mysterious and the atmosphere is just right for doing something dirty. The full moon seems to follow them wherever they go. One of the reasons women love vampires is that they know how to pull all the tricks to make the setting perfect. Also working to their advantage is that they don’t do much talking to ruin the moment. They’ve also had hundreds of years of practice.
What the single guy could learn: Set the mood and pick romantic spots foreven the simplest activities. Remember places and little nuances for special occasions. Do the small things: special occasions, flowers for no reason, and tiny little “I love you” reminders to make her feel special. If you show her how much you care, you might end up involved in a different kind of sucking that doesn’t involve blood.

No.2 Vampires are powerful
Vampires exude two types of power. The first is the raw, physical power. The vampire is always in phenomenal shape; it must be the low carbs/high blood diet and tons of sleep.The second type of power is mental. He’s usually a manipulative bastard who can match brains as much as brawn. This amazing one-two combo is a major reason women love vampires. Moreover, it’s almost impossible to kill a vampire. You think he’s dead? Nope. Still not dead.
What the single guy could learn: Every man knows he has to stay in top physical shape. More important, though, is being mentally powerful. Never stop learning; tackle a new language, do puzzles and games to keep your mind sharp and for ghoul’s sake read challenging and thought-provoking books instead of the backpages every morning. That’s another reason women love vampires; they can carry on a conversation about something other than the footy or Big Brother.

No.1 Vampires are the ultimate bad boys
Women love bad boys. Now mix in the fact that a vampire is searching for eternal love and needs a woman to survive; you’ve got yourself the ultimate bad boy. He answers to no one, lives by his own rules, wears nice clothes, and is hated by millions of living people. He is the man her mother warned her about except with more guy-liner and lip gloss than either of them could have ever predicted. He isn’t just bad, he’s dead. Beat that!
What the single guy could learn: It’s tough to pull off for some, but you could always give off the appearance of a bad boy. Try it like this: start sleeping all day, hang out late into the night, live by your own rules, piss off as many people as possible, and live off the blood of innocent women. Basically, pretend you’re back in uni.

%d bloggers like this: