Archive for June, 2006
Friday, June 30th, 2006
Resetting Drupal’s admin password
Quite annoyingly, I was stuck with a Drupal install with an incomplete SMTP setup and a “missing-in-action” admin password.
Thankfully, occy had a solution for my very headache in form of the following SQL:
update users set pass=md5(’NEWPASS’) where uid = 1;
No Comments » - Posted in PHP, SQL by dkaz
Wednesday, June 28th, 2006
PHP Array - jack of all trades
One of the more intriguing features of PHP (from the perspective of someone exposed to it for the first time) is the amazing versatility of the Array class.
from php.net:
An array in PHP is actually an ordered map. A map is a type that maps values to keys. […]
2 Comments » - Posted in Programming, PHP by dkaz
Friday, June 23rd, 2006
Splay Trees
Picking up where I left off a couple of weeks back, I’m continuing the binary tree family refresher course with Splay Trees.
I Google’d a couple of “java” and “splay” term permutations, but I did not find any obvious traces of splays being used anywhere in the JDK. It would be nice to get something other […]
No Comments » - Posted in Programming by dkaz
Wednesday, June 21st, 2006
Bloom Filters
One of the more interesting data structures I’ve run into lately is the Bloom Filter. Bloom filters are very good at performing large membership queries very quickly. Some important features of the Bloom Filters were nicely summarized by lectures at the Wash. U. of St.Louis:
A bloom filter computes k hash functions on an input
Each resulting […]
1 Comment » - Posted in Programming by dkaz
Wednesday, June 14th, 2006
Row-major and Column-major ordering
As I’m working on an API that returns matrices of solutions in its responses, I’m finding Wikipedia’s definitions for some of the concepts I’m trying to express quite handy.
Methods for ordering & storing multidimensional arrays fall into the bucket, as I’ve struggled to figure out how to express a matrix in JDK 1.5 (1-D Array? […]
No Comments » - Posted in Java, Programming by dkaz
Wednesday, June 14th, 2006
Unary vs. Binary Operators
Here’s another (oh so simple) definition that somehow escaped through the cracks of my brain over time. I’m blushing over this one.
Operators are binary or unary. Binary operators (”bi” as in “two”) have two operands. In “A*B” the * operator has two operands: A and B. In “!B” the “!” operator (meaning boolean NOT) has […]
No Comments » - Posted in Ruby, Programming by dkaz
Tuesday, June 13th, 2006
Traits > Interfaces
Over the last couple of months I’ve spent a bit of time studying Scala, a multi-paradigm (function + oo) programming language designed to inter-operate with both .NET and Java.
One of the (many) neat features of the language is its inclusion of the trait abstract data type. Scala traits are similar to Java interfaces in that […]
1 Comment » - Posted in Java, C#, Smalltalk, Programming by dkaz
Tuesday, June 13th, 2006
Infix Notation AKA “Human Readable” Notation
While studying Lisp documentation on S-expressions and their use of prefix notation, I accidentaly picked up the proper name for the notation I have used all these years (in imperative language land) - infix notation. As always, Wikipedia definition comes in handy…
Infix notation is the common arithmetic and logical formula notation, in which operators are […]
No Comments » - Posted in Java, Ruby, Programming, Lisp/Scheme by dkaz
Saturday, June 10th, 2006
San is Honorific
References to Takahashi-san and Sasada-san are pretty frequent in the Ruby world and I wanted to be clear about how to interpret the -san suffix in the Japanese culture…
San
San (さん, San?) is the most common honorific title, used when addressing most social outsiders, for example, non-family members. San is used unless the addressee’s status warrants […]
No Comments » - Posted in Wikipedia, Interesting, Ruby by dkaz
Saturday, June 10th, 2006
Jokes & Quotes, Takahashi-style
I’m trying to figure out Takahashi Method XUL presentation framework blogged here, so I’ve set up some joke & quote presentations here to get up to speed on the method.
Japanese people rock! I’m not going back to PowerPoint anytime soon.
No Comments » - Posted in Funny, Programming by dkaz
Friday, June 9th, 2006
Static (Lexical) vs Dynamic Scoping
While reading an article about lexical closures, I realized that I wasn’t quite clear on the difference between static and dynamic scoping (probably because I’ve been stuck in Java for so long).
With Wikipedia only a click away, let’s take a closer look at the definitions…
Static scoping
With static scoping, a variable always refers to its nearest […]
4 Comments » - Posted in Wikipedia, Programming by dkaz
Thursday, June 8th, 2006
Petr Čech and Diacritics
Train disagreement about the correct way to pronounce Petr Čech (Czech Republic’s star goalie) motivated me to study up on diacritics tonight.
Here’s Wikipedia’s definition of the term “diacritic”…
A diacritical mark or diacritic, sometimes called an accent mark, is a mark added to a letter to alter a word’s pronunciation or to distinguish between similar words. […]
