April 06, 2007

Represent Rows as Single Column in DB2

select ifnull(virtual.Q1, '') || ifnull(virtual.Q2, '') || ifnull(virtual.Q3, '') || ifnull(virtual.Q4, '') || ifnull(virtual.Q5, '') 
|| ifnull(virtual.Q6, '') || ifnull(virtual.Q7, '') || ifnull(virtual.Q8, '') || ifnull(virtual.Q9, '')as sentence from (

SELECT hex(sst.sst_scs_tk), 
       MAX(CASE WHEN sst.sst_ent_seq_nu = 1
           THEN sst.sst_tx END) AS Q1,
       MAX(CASE WHEN sst.sst_ent_seq_nu = 2
           THEN sst.sst_tx END) AS Q2,
       MAX(CASE WHEN sst.sst_ent_seq_nu = 3
           THEN sst.sst_tx END) AS Q3,
       MAX(CASE WHEN sst.sst_ent_seq_nu = 4
           THEN sst.sst_tx END) AS Q4,
 MAX(CASE WHEN sst.sst_ent_seq_nu = 5
           THEN sst.sst_tx END) AS Q5,
 MAX(CASE WHEN sst.sst_ent_seq_nu = 6
           THEN sst.sst_tx END) AS Q6,
 MAX(CASE WHEN sst.sst_ent_seq_nu = 7
           THEN sst.sst_tx END) AS Q7,
 MAX(CASE WHEN sst.sst_ent_seq_nu = 8
           THEN sst.sst_tx END) AS Q8,
 MAX(CASE WHEN sst.sst_ent_seq_nu = 9
           THEN sst.sst_tx END) AS Q9
FROM sst
where sst.sst_scs_tk in (
 select spa.SPA_SCS_TK from spa where spa_per_tk = x'AAEB98F45CA740FF'  
GROUP BY sst.sst_scs_tk
) as virtual

December 14, 2006

Thanksgiving Food

Alton Brown’s Turkey

1 (14 to 16 pound) frozen young turkey

For the brine: 1 cup kosher salt 1/2 cup light brown sugar 1 gallon vegetable stock 1 tablespoon black peppercorns 1/2 tablespoon allspice berries 1/2 tablespoon candied ginger 1 gallon iced water

Combine all brine ingredients, except ice water, in a stockpot, and bring to a boil. Stir to dissolve solids, then remove from heat, cool to room temperature, and refrigerate until thoroughly chilled.

Early on the day of cooking, (or late the night before) combine the brine and ice water in a clean 5-gallon bucket. Place thawed turkey breast side down in brine, cover, and refrigerate or set in cool area (like a basement) for 6 hours. Turn turkey over once, half way through brining.

Remove bird from brine and rinse inside and out with cold water. Discard brine.

For the aromatics: 1 red apple, sliced 1/2 onion, sliced 1 cinnamon stick 1 cup water 4 sprigs rosemary 6 leaves sage Canola oil

Combine the apple, onion, cinnamon stick, and cup of water in a microwave safe dish and microwave on high for 5 minutes.

Place bird on roasting rack inside wide, low pan and pat dry with paper towels. Add steeped aromatics to cavity along with rosemary and sage. Tuck back wings and coat whole bird liberally with canola (or other neutral) oil.

Roast on lowest level of the oven at 500 degrees F. for 30 minutes.

Remove from oven and cover breast with double layer of aluminum foil, insert probe thermometer into thickest part of the breast and return to oven, reducing temperature to 350 degrees F.

Set thermometer alarm (if available) to 161 degrees.

A 14 to 16 pound bird should require a total of 2 to 2 1/2 hours of roasting.

Let turkey rest, loosely covered for 15 minutes before carving.


§ Remove a turkey from the refrigerator about one hour before placing it in the oven.

§ Brush the bird generously with melted butter before roasting to assist in browning and adding flavor.

§ Baste only at the beginning of the roasting process. Basting later may make the skin soft instead of crispy.

§ Cook your turkey on a rack with white wine or chicken broth in the bottom of the pan.

§ Roast the bird with the breast side down for the first hour.

§ Use a meat thermometer for best results. When done, the breast temperature should be 170°F, the thigh 180°F.

16–20 pounds 4 to 5 hours

20–25 pounds 5 to 6 hours

Approximate ROASTING TIMES FOR TURKEY (325 °F oven temperature)

18-20 lbs. 4¼ - 4½ Hours

20-24 lbs. 4½ - 5 Hours

Cooking Live’s Gravy

Pour the drippings from the roasting pan into a heatproof glass bowl or large measuring cup.

Let stand for 5 minutes, then skim off and reserve the clear yellow fat that has risen to the top.

Measure 3/4 cup fat, adding melted butter if needed. Add enough turkey stock to the skimmed drippings to make 8 cups total.

Place the roasting pan on two stove burners over low heat and

add the turkey fat.

Whisk in the flour, scraping up browned bits on the bottom of the pan,

and cook until lightly browned, about 2 minutes.

Whisk in the turkey stock and the optional bourbon.

Cook, whisking often, until the gravy has thickened and no trace of raw flour remains, about 5 minutes.

Turkey Gravy from How to Boil Water

4 tablespoons unsalted butter, (1/2 a stick) Neck and giblets from a 12 to 14 pound turkey (discard the liver) 1 medium onion, sliced 8 cups chicken broth, home made or low sodium canned Couple sprigs fresh herbs, such as thyme, parsley, rosemary, or sage 1 bay leaf Turkey pan drippings 1/2 cup all-purpose flour Dash Worcestershire sauce Salt and freshly ground black pepper

Melt the butter in a saucepan, over medium-low heat. Add the neck, giblets, onion, and cook stirring occasionally until browned, about 15 minutes. Add the broth, herbs, and bay leaf; cover and simmer over medium-low heat, about 2 hours. (This can be done while your turkey roasts.) Discard the giblets or reserve for chopping and adding to the gravy.

Pour all the turkey pan drippings into a liquid measuring cup or a degreasing cup. Set aside to let the fat separate from the darker pan juices. (Put the measuring cup in the freezer to helps them separate.)

Ladle off 1/2 cup of the fat from the top of the drippings, and transfer to a saucepan (or do it the old fashioned way in the turkey roasting pan.)

Heat the fat over medium heat. Scatter the flour evenly on top and cook, stirring constantly, with a wooden spoon until the flour browns slightly and smells toasty, about 4 minutes. Switch to a whisk; then gradually and carefully ladle the hot broth into the flour mixture while whisking constantly. Bring the gravy to a boil; adjust the heat so it simmers gently. Skim and discard any excess fat from the remaining drippings, and add the pan juices to the gravy. Continue to simmer, whisking occasionally, until the gravy is thickened, about 10 minutes. Chop and add giblets, if desired. Season with the Worcestershire, salt, and pepper.

Transfer gravy to a sauce boat and serve hot.

November 09, 2006

November 06, 2006

How to Talk to a Climate Skeptic

A series by Coby Beck containing responses to the most common skeptical arguments on global warming. There are four separate taxonomies; arguments are divided by: * Stages of Denial, * Scientific Topics, * Types of Argument, and * Levels of Sophistication.

October 27, 2006


Really cool AJAX library for building rich clients.

October 24, 2006

Beer Belly


Removing the straw that broke the camel's back does not necessarily allow the camel to walk again.

October 23, 2006

Battle of the New Atheism

"Most of these people call themselves agnostic, but they don't harbor much suspicion that God is real. They tell me they reject atheism not out of piety but out of politeness. As one said, "Atheism is like telling somebody, 'The very thing you hinge your life on, I totally dismiss.'" This is the type of statement she would never want to make. This is the statement the New Atheists believe must be made -- loudly, clearly and before it's too late. I continue to invite my friends for a nice, invigorating stroll down Logic Lane. For the most part, they just laugh and wave me on."
From Wired

October 16, 2006

GPU-based Sorting in PostgreSQL

Implementing sorting in GPU hardware for Postgres and Fast Computation of Database Operations using Graphics Processors

The Vegetable-Industrial Complex

If bagged salad greens are vulnerable to bacterial contamination on such a scale, industry and government would very soon come looking for a technological fix; any day now, calls to irradiate the entire food supply will be on a great many official lips. From The New York Times

Computers, The Electric Brains

Note the middle finger!

October 13, 2006

The flying spaghetti monster

Richard Dawkins interview @ Salon
Now, suppose science does have limits. What is the value in giving the label "religion" to those limits? If you simply want to define religion as the bits outside of what science can explain, then we're not really arguing.

October 04, 2006

September 26, 2006

6412 remote codes or reset remote? - Digital Forum

6412 or 3412 remote codes or reset remote? - Digital Forum: "I talked to shaw, they sent me this useful email and I just manualy programed the buttons 207 Fast Forward 243 Parental Lock 046 Record 237 B 115 G 177 M 242 Reserved 1 240 Browse 111 H 173 N 211 Reserved 2 114 C 048 Help (*) 034 O 238 Reserved 3 236 Cancel 113 I 211 Out Channel 208 Reserved 4 110 D 044 Info 210 P/F 204 Reserved 5 174 Day Minus 109 J 172 Page Down 209 Reverse 178 Day Plus 179 K 176 Page Up 241 A / Theme 112 E 175 L 205 Pause 108 F 239 List 081 PPV CABLE CONVERTER. 018 0...............0 014 1...............1 016 2...............2 012 3...............3 019 4...............4 015 5...............5 017 6...............6 013 7...............7 146 8...............8 142 9...............9 147 CHANNEL DOWN....Channel Down 140 CHANNEL UP......Channel Up 047 DOWN............Down 080 CLEAR...........Exit 079 SURROUND........Fav Ch 050 PROGRAM.........Guide 076 RECALL..........Last Channel 049 LEFT............Left 206 MENU............Menu 082 ENTER...........Music 141 MUTE............Mute 144 POWER...........Power(CATV) 045 RIGHT...........Right 078 SELECT..........Select 083 TV/VCR..........Switch A/B 051 UP..............Up 145 VOLUME DOWN.....Volume Down 143 VOLUME UP.......Volume Up DVR 178 Play 205 Pause 209 Rewind 207 Fast Forward 174 Stop 046 Record 173 Skip 179 Replay 175 DVR 210 PPV 208 OND 083 A/B 177 Live (DVR) 236 Swap (dual tuner DVR) Simply substitute the code for the feature you would like to map with the code in the instructions for 30 second skip. 1) Press the 'Cable' button at the top of the remote to put it into Cable Box control mode. 2) Press and hold the 'Setup' button until the 'Cable' button blinks twice. 3) Type in the code 994. The 'Cable' button will blink twice 4) Press (do not hold) the 'Setup' button 5) Type in the code 00XXX (Where XXX is the code for the feature you want to map). 6) Press whatever button you want to map the skip function to. __________________ Sony KDF55WF655 Motorola HD PVR 6412 bup bup bup im loving it"

August 23, 2006

Salon.com Interviews Michael Shermer

Salon.com Books | The joys of life without God: "I believe in the indomitable human spirit and the amazing capacity we have for understanding the world; for love, joy and happiness. Science not only does not take away any of those things, it adds to the sum of human knowledge. When I look through my little telescope in my backyard at the planets, moon or Andromeda galaxy that is 2.9 million light-years away, I can enjoy the beauty of the night sky and appreciate it on an emotional level. Then I can think that the photons of light that are landing on my retina left 2.9 million years ago, when we were just barely bipedal hominids in Africa, and are just now arriving tonight. Boy, that's just awe-inspiring. To me, that's what it means to be spiritual -- what makes your spine tingle. It's what gives you a sense of awe and wonder and transcendence. It doesn't matter to me if you call it God or the cosmos. We're all talking about the same thing, whether it's religious people or New Age spiritual people or Buddhists or scientists. We're all talking about having a sense of awe and wonder at something grander than ourselves. "

Guide to Financial Independence - Yahoo! Finance

Guide to Financial Independence - Yahoo! Finance

August 04, 2006

Power from Electric Eels

This guy looks like a nut, but I've always thought this approach should be viable...

July 31, 2006

Scientific American: The Expert Mind

Scientific American: The Expert Mind: "The preponderance of psychological evidence indicates that experts are made, not born. What is more, the demonstrated ability to turn a child quickly into an expert--in chess, music and a host of other subjects--sets a clear challenge before the schools. Can educators find ways to encourage students to engage in the kind of effortful study that will improve their reading and math skills? Roland G. Fryer, Jr., an economist at Harvard University, has experimented with offering monetary rewards to motivate students in underperforming schools in New York City and Dallas. In one ongoing program in New York, for example, teachers test the students every three weeks and award small amounts--on the order of $10 or $20--to those who score well. The early results have been promising. Instead of perpetually pondering the question, 'Why can't Johnny read?' perhaps educators should ask, 'Why should there be anything in the world he can't learn to do?'"

July 27, 2006


Upside-Down-Ternet: "My neighbours are stealing my wireless internet access. I could encrypt it or alternately I could have fun"