Wednesday, November 24, 2010

Posting Thanksgiving RSVP in Frontierville

Open FrontierVille in one tab.
After FrontierVille loads, open Application Privacy in another tab. Open FrontierVille's settings and delete "post to wall".
Go back to FrontierVille tab.
Click Post Dinner Invite.
Click Yes and then Allow.
Go back to Privacy Settings tab and again delete "post to wall".
You may now manually post the invites.
You may have to do this each time you play.

Tuesday, November 16, 2010

ColdFusion 9: ByteArray error

If you've upgraded to ColdFusion 9 with MySQL, be prepared to get a "ByteArray objects cannot be converted to strings." error. This error occurs because the JDBC driver for MySQL included with the ColdFusion 9 install converts TinyInt values to a Byte Array if they're used in a function or a CASE WHEN. You will not get this error if you're simply including a TinyInt column in a SELECT statement, but you will get it if you're using it inside a function or a CASE WHEN.

One solution is to encapsulate your function in a CONVERT([function] USING latin1), but you will have to do it in every query where this condition occurs.

Another solution is to revert to an earlier driver. ColdFusion 9 install includes mysql-connector-java-commercial-5.1.7-bin.jar. You can try downloading the latest driver from here, however, version 5.1.13 still had this bug. If you're still having a problem after downloading the newest driver, revert to the version which was included with ColdFusion 8, mysql-connector-java-commercial-5.0.5-bin.jar.

Monday, November 15, 2010

Kosher Porn

Wrote the following in a thread on hashkafah.com. Apparently someone had a problem with the post, yet didn't mind reading the thread so am reposting it here.

DISCLAIMER: This is a parody on imamother and should not be taken seriously. ;-)

His arms, muscles bulging from doing hagba, held her tight to his body. She could feel the imprints left by his tefillin straps sensually caressing her skin. His hands touched and explored her body as if he was holding a gemorah. He was kneading her sufganyot like challah dough, his fingers circling the raisins. Her body tensed in anticipation as his hands roamed towards her lower mouth while his lips kissed her as if she was a mezuzah. As his lips brushed the lips of her upper mouth, his hand drew a magen david around the contours of her lower lips. She almost screamed when his thumb brushed over her nerit. As she felt the the hardness of his havdalah brush against her thigh, she knew that her wait will be over soon. Just as she had anticipated, he rose over her, his body like a chuppa, held up by the four poles of his arms and legs. He positioned his lulav at the entrance of her shofar and, at first slowly, slid forward into her. His pace increased as she played with his peyos, twirling them with her fingers. When he heard her chanting "talmidim hachamim" over and over, he slammed into her, his havdalah shooting its light into her body.

Was cracking up while writing it. Feel free to expand, ha ha, on this.

Saturday, November 13, 2010

Friday's special guests

Last night, November 12, at 9:20pm, we had a knock at the door and a visit from the NYPD.  Apparently Vader called the cops because he had a problem with my kids playing in their room, on mats and before 11pm.  He told them that I made cracks in his ceiling and make noise at 2am.  I informed the officers that the noise is Nochum waking up and me walking to get him a bottle and that I couldn't care less if he has a problem with me walking.

Tuesday, November 9, 2010

CSS - font and color

Always set the default font and color in body.  Also, right below body, set default font and color for links and a:hover.  This will make things a lot easier for adding new pages, changing default font and color and customizing font and color.

Never ever set font and color for each individual element when they are the same.  Font and color should only be specified for an element when they differ from the default set in body.

Thursday, November 4, 2010

MySQL - COALESCE on an empty string

COALESCE works only on NULLs.  If you have an empty string, COALESCE will return the empty string instead of the second value because the first value is not NULL.

How to return second value or column if first one is NULL or is blank:
SELECT IFNULL(NULLIF(col1,''),col2)
The inner NULLIF returns a NULL if col1 is blank.  The outer IFNULL returns col1 if it's not blank or NULL and col2 otherwise.