Browsing the blog archives for February, 2009.

Useful Git Links

Tools

git-logo

Switching to Git has been an incremental learning experience. Below, are some useful links for learning about Git:

If you know of other useful introductory Git links, add them in the comments and we will update the post.

2 Comments

Disable iPhoto When Connecting iPhone

Config

apple_logo

One of the more annoying features of OS X is that iPhoto automatically launches when you connect your iPhone. Apple is trying to make importing photos as easy as possible so the camera in the iPhone triggers the launching of iPhoto when connect your device. Follow the steps below to disable this feature:

  • Open the Image Capture application in your Applications folder
  • Click Image Capture and then Preferences in the top application navigation
  • In the drop-down select “No application” for, “When a camera is connected, open.”

The following screenshot shows the Image Capture Preferences dialog:

image_capture_pref1

5 Comments

Hibernate Wildcard Query

Examples

hibernate_icon

Creating a wildcard query in Hibernate (HQL) is similar to how SQL handles the same funciton. The query is accomplished by using the, like keyword.

The example below searches for people with a name that contains Mik – an obvious match would be Mike.

Query query
= getEntityManager().createQuery("SELECT p FROM Person p WHERE p.name like :name");
 query.setParameter("name", 'Mik");
 query.getResultList(); // Returns a list of People.
No Comments