I’m lazy and keep forgetting the format string for formatting dates into strings that I can understand, so here it is:
Function:
to_char()
Arguments:
1) The date column you want to format
2) The mask – personal most commonly used:
‘yyyy/mm/dd hh:mi:ss am’
Leave the first comment ▶
Documentation
In the hibernate.cfg.xml there is an option – ‘hibernate.hbm2ddl.auto’ that controls how it interacts with the database schema (assuming the user you used to connect has the appropriate privileges). The options for this config are as follows:
So the list of possible options are,
- validate: validate the schema, makes no changes to the database.
- update: update the schema.
- create: creates the schema, destroying previous data.
- create-drop: drop the schema at the end of the session.
Leave the first comment ▶
Good stuff:
http://net.tutsplus.com/articles/web-roundups/10-more-awesome-web-development-screencasts-and-presentations/
Also, if you’ve never been to ted.com, check it out, there’s some cool stuff there.
Leave the first comment ▶
Slightly paraphrased -
We must allow the existence of the soul in order to explain free will. Otherwise, we are just machines with genetically coded instructions from our creators. ~ Shelly Kagan
Leave the first comment ▶
http://www.thedragonskitchen.com/2008/07/potato-gnocchi-sausage.html
Ingredients:
1 18 0z package of Potato Gnocchi
3 smoked pork sausages (turkey sausage works great too), sliced
1/4 cup of chopped onions
1 clove of garlic, minced
2 tablespoons of butter
pinch of hot pepper flakes
1/2 tablespoon of fresh thyme leaves
1/2 tablespoon of fresh oregano, chopped
1 cup of frozen peas, run under water to thaw (optional)
1/4 cup of grated parmesan cheese
salt & pepper to taste
A new favorite, one slight modification from the recipe above:
Red peppers instead of onions, sweet italian sausage, and no hot pepper flakes (I do love hot though)
Leave the first comment ▶
Often times in scripting on a Linux box, you end up passing around the full path to a resource (it’s messy coding tbh).
This is great until you want to use just the filename in something.
Here’s a simple Python method that takes a full filename with path and grabs just the filename.
def findFileName (self, fileNameWithPath):
splitStr = fileNameWithPath
strList = splitStr.rsplit(‘/’, 1)
fileName = strList[len(strList) - 1]
return fileName
Leave the first comment ▶