Posts

Very helpful post over here explained how to use Hibernate’s UserType to create a custom type to override the behavior of Oracle’s CLOB types.

Because no programmer can leave well enough alone, I tweaked his code, and made the Unicode related fix suggested in the comments there. Here’s the code I’m using, and it works brilliantly on Java + Hibernate + Oracle 11:

In the land of Unix, files prefixed with a period (.) are hidden from view in most situations. When using ls, for instance, they won’t show by default. You can however use the -a parameter to see the hidden files.

OS X’s Finder, however, doesn’t have an option to show hidden files. And sometimes it’s easier to work with some files via a GUI navigation tool like Finder. So what do you do?

Use the defaults command, and issue the following at a command prompt:

defaults write com.apple.Finder AppleShowAllFiles YES

Because it can make for quite a bit of clutter at times when seeing hidden files isn’t useful, you might want to turn this feature off. To do so, issue the same command with a NO option.

defaults write com.apple.Finder AppleShowAllFiles YES

Once you’ve executed this command, be sure to restart Finder to have it pick up the change. To restart finder, hold down the option key, and hover over the finder in the dock. You’ll see a menu option to restart Finder.

The link below explained what’s going on here. In short, Eclipse is trying to validate XML documents, and in my case, documents that Maven created to do its testing (I think.) To get rid of the warnings, turn off the check for “no grammar specified.”

The steps to disable this check are as follows:

Open Eclipse’s Preferences

Expand the entry “XML”

Expand the sub-entry “XML Files”

Now click on the “Validation” link

Choose “Ignore” from the choice “Indicate when no grammar is specified”

That you can use it to get parent directory:
dirname(dirname(__FILE__))
or you can include the init.php file from anywhere in your filesystem:
You would use
include_once(dirname(__FILE__) . ‘/database.class.php’); in the init.php