September 2007

Drupal 5.x Form API: #value vs. #default_value

This is probably well documented if you look in the right place, but having just spent a number of hours puzzling through it on my own (despite) having access to documentation, I think it bears reiteration:

If you use '#value' when declaring a form element, that value is what will be received after submission, even if applied to a textfield that gets changed by the user. (This makes sense when passing a value behind the scenes, as you would do with a '#value' form element)

Use '#default_value' if you want the end-user to be able to modify the value.

Also

Tags

Renaissance Room - 1

Usonian posted a photo:

Renaissance Room - 1

According to our tour guide, Franklin D. Roosevelt often visited this lodge room when in New York City.

Windows ICS Port Forwarding Gotcha

Yesterday I learned that Windows XP’s Internet Connection Sharing (ICS) allows you to do port forwarding, for example taking requests to port 80 from the internets and forwarding them to a machine behind the firewall. (Don’t ask why I’m using ICS. It’s not by choice, believe me.)

I set this up and tried hitting my external IP address, but kept getting a “connection refused” error. I checked and double-checked all of the various settings, and searched fruitlessly for help - I found plenty of other people experiencing the same problem, and I finally came across the crucial bit of knowledge: ICS port forwarding doesn’t work for requests originating on your LAN! I had to SSH to an external host and then hit my public IP with a curl request to verify that port forwarding was working.

What are you Doing! What Are you Saying!

I came across this Zen koan earlier today, and it has stuck with me. Over the last few months I have been overpowering the packrat gene I inherited from my mom and her mom, and have been jettisoning old crap with surprisingly little deliberation. My usual rationalizations for keeping stuff, “I could fix that,” “But I’ve had that for 20 years,” and “I might still wear that once in a while” seem to have lost some of their power.

I don’t think this koan is only about possessions in the purely material sense, but it does force one to think about the usefulness of keeping lots of old junk around:

The Zen master Mu-nan had only one successor. His name was Shoju. After Shoju had completed his study of Zen, Mu-nan called him into his room. “I am getting old,” he said, “and as far as I know, Shoju, you are the only one who will carry on this teaching. Here is a book. It has been passed down from master to master for seven generations. I also have added many points according to my understanding. The book is very valuable, and I am giving it to you to represent your successorship.”

If the book is such an important thing, you had better keep it,” Shoju replied. “I received your Zen without writing and am satisfied with it as it is.”

I know that,” said Mu-nan. “Even so, this work has been carried from master to master for seven generations, so you may keep it as a symbol of having received the teaching. Here.”

The two happened to be talking before a brazier. The instant Shoju felt the book in his hands he thrust it into the flaming coals. He had no lust for possessions.

Mu-nan, who never had been angry before, yelled: “What are you doing!”

Shoju shouted back: “What are you saying!”

Also

Tags

September Already

In recent years past, when September rolled around I would be counting the days until the start of the hockey season.

Then came the lockout in ‘04-‘05, the Thornton trade in ‘05, the firing of Mike Sullivan, and the subsequent hiring of Dave Lewis, all of which added up to a spectacularly craptastic season in ‘06-‘07.

Even the snazzy new uniform isn’t enough to get me actively anticipatory about hockey this year.

That’s not to say I won’t be watching, at least for the first few months of the season… but my expectations are so low that it’s hard to get excited.

Syndicate content

Twitter

  • Score! http://t.co/KVDyULXM 4 years 4 weeks ago
  • @ComcastBill Thanks. 4 years 4 weeks ago
  • @wstites Thanks. @comcast is making it awfully hard for me to give them more money. 4 years 4 weeks ago
  • @comcastbill(have called 4 or 5 numbers so far. Am told I don't qualify as existing customer, no way to track who it was who called me.) 4 years 4 weeks ago
  • @ComcastBill I received a call with a bundle offer yesterday, but I lost the rep's contact info. I get the runaround calling the main #. 4 years 4 weeks ago

Older

Contact

Andy Chase
(978) 297-6402
andychase [at] gmail.com
GPG/PGP Public Key