Feeds:
Posts
Comments

Archive for the ‘Engineering’ Category

One of those really handy things to remember…  When git “tracks” a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull.  For example: I had a remote branch called Task/Round3.3. I wanted to work on it locally, but have push and pull work right. So [...]

Read Full Post »

Great howto on grabbing a selection of random records from a few different databases here: http://www.petefreitag.com/item/466.cfm

Read Full Post »

Here is a nice little tidbit I ran across some time ago…  Ever delete a bunch of files from a git working copy, and then had to go in and tell git that you meant to delete them?  For example: [jason@dc40 AppStruct]$ git status # On branch master # Changed but not updated: # (use [...]

Read Full Post »

In our workshop, we have been designing a new toy wooden gun model in SolidWorks.  This is inspired by the classic Thompson Machine Gun from the early 1900′s in the US. We will probably make it out of maple or walnut, and either paint or stain it.

Read Full Post »

You start your day, happily working with dictionaries…Life is good. >>> mydict = {‘key-a’: ‘value-a’, ‘key-b’: ‘value-b’} >>> mydict['key-a'] ‘value-a’ All of a sudden, storm clouds appear. Your dictionary variable accidentally gets assigned a list, and life is no longer good! >>> mydict = {‘key-a’: ‘value-a’, ‘key-b’: ‘value-b’} >>> mydict['key-a'] ‘value-a’ >>> mydict = [] [...]

Read Full Post »

I highly recommend reading this excellent writeup on Python super(), python __mro__, python attributes, and more. It is Copyright © 2005-2009 Shalabh Chaturvedi http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.html#method-resolution-order

Read Full Post »

You may be aware of git add . But did you know this: git add . adds all the files. Use with care (only after git status, for example). git add -u . adds and deletes all KNOWN files. This is great if you added and removed or renamed files.

Read Full Post »

While converting a bunch of werkzeug code to Python 3.1, I ran into an issue with one of the bytes objects that was previously a string. The line of code in question was originally this: if value and value[0] == value[-1] == b’"’: … If value is something, and the first and last characters are [...]

Read Full Post »

I use jQuery as the JavaScript library for most projects. It’s terribly convenient for selecting elements and processing them. However, jQuery is not JavaScript, and there is a lot of things it cannot do. Rather than writing a separate set of functionality outside of jQuery, why not simply extend it on an application-per-application basis? It [...]

Read Full Post »

Hello! jQuery has a mouseout and a mouseleave event. The main difference is in how they handle child elements. Mouseout fires when the pointer moves into or out from child element, while mouseleave doesn’t. This was causing a slight problem of having some menu’s close when the mouse encountered a link or other child element [...]

Read Full Post »

Older Posts »