These pages describe things I've done which primarily involve coding. Some of these may be useful. Currently, we have hacks, mini-projects, and recipes. I also maintain a page of my Projects.
Created Wednesday, 2011-04-06 — 13:48.Last update 5 days ago.
You need to generate Pascal's Triangle in Python, and you're lazy (an admirable trait). Alternatively, you're looking for a Pascal's Triangle generator that can show really high-ranking rows, ones with multi-hundred-digit (or multi-million-digit) coefficients.
==Solution (pre Python 3)==
Here's the essential, unadorned code:
def pascal(n):
"""
Yield up to row ``n`` of Pascal's triangle, one row at…
Created Tuesday, 2011-04-05 — 22:03.Last update 6 days ago.
A short Javascript program to improve detection of users idling or away from their keyboards, which should in turn improve how online users are detected. The file works with both jQuery and Prototype. It autodetects which is available at load time. Putting an AJAX request in one of the handlers can notify the back-end about the online state of a…
Created Friday, 2011-05-13 — 11:49.Last update 3 weeks ago.
This is a patch adding some extra functionality to the Linux USB touchscreen driver. It adds features useful in developing and testing applications on touch-screens, as well as the ability to reverse the x and/or y axes — not every tablet out there defines its axes the same way.
Installation
Download this patch and then run the usual:
cd /usr/src/linux-kernel
patch
Created Wednesday, 2011-04-06 — 13:32.Last update 1 month ago.
You need to display Pascal's Triangle in a LaTeX document and whenever you hear ‘ampersand’ or ‘smallskip’, you go into a homicidal rage, leaving behind you a trail of viscera and blood-stained Lion Book pages. Also, you're lazy. Put that chainsaw down, this recipe is for you. Although, really, with that kind of reaction to ampersands, what are you doing…
Created Wednesday, 2011-04-06 — 13:28.Last update 2 months ago.
You have a deep directory tree of files, and you need to flatten it into a single directory, so that there are no files in subdirectories, and all the files are in the same place.
all the filenames are unique. If they're not, some will get overwritten (using the cp command), or not linked (using the ln command).
==Solution==
cd $ROOT_DIRECTORY_OF_TREE
find . -type…
Comments
Trackback: six pack shortcut
Trackback from http://searchengineoptimizationdiva.com.Coding | BedroomLAN