Friday, January 18, 2008

Fabled $250 Neimann-Marcus Chocolate-Chip Cookies

That really is the title of this recipe in our cookbook. See the history here.

Anyway, this is my favorite cookie recipe, and I love cookies.

Note that this version is a double recipe: 200 cookies

2 cups butter
2 cups sugar
2 cups brown sugar
4 eggs
2 teaspoons vanilla
4 cups flour
3 cups oatmeal (2 1/4 c. blended)
1 teaspoon salt
2 teaspoons baking powder
2 teaspoons baking soda
1 24-ounce package chocolate chips
1 8-ounce Hershey's bar, grated
3 cups nuts, chopped

Cream butter with sugars. Add eggs and vanilla. Add flour, oatmeal, salt, baking powder and baking soda to creamed mixture. Add chocolate chips, candy and nuts. Form dough into balls and place 2 inches apart on cookie sheet. Bake at 375 degrees for 6 minutes. Yields 200 cookies.

Monday, January 14, 2008

convert an Oracle CLOB to a string

I had to use the UTL_RAW package so I could do string (aka VARCHAR2) operations:

utl_raw.cast_to_varchar2(utl_raw.cast_to_raw(...))

Note that you can do operations like 'substr' and 'instr', and the result is still a CLOB and not a varchar! Ug.

Friday, January 11, 2008

basic Japanese phrases

First, for good pronunciation, there are 5 vowel sounds and they're always the same:

a - like "aaah", eg. father
i - like "ee", eg. eat
u - like "oooo", eg. food
e - is "eh", eg. end
o - is "oh", eg. Ohio

Practice saying that over and over "aaah, eeee, oooo, eh, oh", so you'll get in the habit of saying only those 5 sounds.

I'll spell these phrases the regular (romanized) way, then as they might sound in English:

phrase == romanized spelling == phonetic spelling
----------------------------------------------------------------------------------------------------
Hello (Good day) == kon-ni-chi wa == cone-nee-chee-wah
Good Morning == o-ha-yo == oh-hi-yo
... and if you want that to be very polite, say: o-ha-yo go-za-i-mas == oh-hi-yo go-zah-ee-mah-s
Good Afternoon == same as "Hello" above
Good Evening == kon-ban-wa == cone-bahn-wah
Good Night == same as "Good Night", unless you're saying good-bye, and then it would be: o-ya-su-mi-na-sa-i == oh-yah-sue-me-nah-sa-ee
Excuse Me == su-mi-ma-sen == sue-me-mah-sen
Thank You == a-ri-ga-to == ah-ree-gah-toe
Thank You Very Much == a-ri-ga-to go-za-i-mas == ah-ree-gah-toe go-za-i-mah-s

One that will probably impress them is something to say when you're leaving someone; you say "I'm being rude":
I'm being rude == shi-tsu-re-i-shi-mas == she-tsoo-ray-she-mah-s

Thursday, January 10, 2008

setup Apache and Tomcat (with mod_jk in Ubuntu), plus load-balancing (or simple clustering)

These directions were kindly shared with me by Matt Dame.

If you're load-balancing between Tomcats, do the following:

  • In the Tomcat 'conf/server.xml' file(s), add the following to the "Engine" element:
    jvmRoute="jvm1"
  • Change the "8009" port on each of the other Tomcats, and change jk.conf accordingly (below).


Start your Tomcat(s). (I've heard of problems if you don't have Tomcat started before starting Apache.)


Run as root:
  • apt-get install apache2 ssl-cert libapache2-mod-jk
  • make-ssl-cert generate-default-snakeoil
  • cd /etc/apache2
  • ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem ssl.crt
  • ln -s /etc/ssl/private/ssl-cert-snakeoil.key ssl.key
  • Place 'http' and 'https' in the 'sites-available' directory. (Note that these are just slightly modified versions of 'default' in that directory).
  • Place 'jk.conf' in the 'mods-available' directory.
  • a2dissite default
  • a2ensite http
  • a2ensite https
  • a2dismod jk
  • a2enmod jk
  • /etc/init.d/apache2 force-reload
---

Andre recommended the following readings about connectors:

generic_howto/loadbalancers.html


reference/workers.html


ajp/ajpv13a.html


reference/apache.html


webserver_howto/apache.html