Friday, December 07, 2007
Tuesday, November 20, 2007
I'm almost embarrassingly excited about this.
Last night, I saw this IMHO awful commercial with the most amazing ending ever - a fuel cell car that will be commerically available!
Wikipedia had this to say about the Honda FCX Clarity:
In 15 November 2007 at the Greater Los Angeles Auto Show, Honda unveiled the FCX Clarity, the first production model, and announced that the car would be available for lease beginning in the summer 2008. Initial availability will be limited to the Southern California market, with availability expanding as hydrogen fueling stations become available...
...The new FCX utilizes several interesting new features. The new V Flow fuel cell stack can operate at temperatures as low as −30 °C. This is achieved by allowing the gas to flow vertically in the fuel cell stack. The tanks can store up to 5 kg (171 litres) of hydrogen at a pressure of 350 atmospheres, thanks to the new hydrogen absorption materials used. This allows a longer range of up to 350 miles (570 km)...
...To support the hydrogen fuel-cell technology, Honda also introduced the Home Energy Station (HES). This home solution can convert natural gas to electricity, heat and hydrogen to refuel fuel-cell vehicles. This allows consumers to refuel vehicles with hydrogen at home, important until hydrogen stations become widespread. Alternatively, the hydrogen can be used in the HES's built-in hydrogen fuel cell, providing up to 5 kW of normal or backup electricity and/or hot water for the home.
Apparently there are 20 already-leased 2002 prototypes, some of which are here in New York. What especially excites me is that they've come up with with a home refueling solution! With a range up to 350 miles that sounds like it might be a practical enough solution to make up for the lack of hydrogen fuel infrastructure.
I wish mass production might get started sooner than 2018..
Thursday, November 15, 2007
Wednesday, September 26, 2007
Say you have some Widget like this:
form = Form('FormName',
and displayed in your template like this:
then you can pass values into it from your controller like so:
'Desired TextField Value'}}})
I guess it's pretty obvious in retrospect, in fact, the compound Form outputs something much like this (minus the outside dictionary), and those values can be passed right back into the Compound Form again. Perhaps, had I been actually using a Model, or gotten more sleep, this all would have been more natural - but hopefully this helps someone else.
Hint: If you're overriding templates, be sure that you're still passing the right values in to fetch the children arguments, i.e.:
Monday, September 24, 2007
Today, I'd like to mention Aardvark. It's super useful for isolating parts of the page for easy printing, and quite easy to use, once you learn the keystrokes. I use it all the time for printing out comics and lolcats for posting on my cubical walls.
<link for=\"css in tg_css\" replace=\"css.display()\">
<link for=\"js in tg_js_head\" replace=\"js.display()\">
Now, if you're silly, like me, and don't really pay attention, you just include it, without looking too hard at your master template, which includes these lines by default:
<link for=\"css in tg_css\" replace=\"ET(css.display())\">
<link for=\"js in tg_js_head\" replace=\"ET(js.display())\">
As soon as you put the widget in your controller:
from toscawidgets.widgets.mochikit import mochikit
return dict( form = InformationForm,
js = mochikit )
You start to get funny Genshi errors, mine was "AttributeError: 'Stream' object has no attribute 'tag'" which prompted me to try various combinations of adding ET() and HTML() to my templates, when the problem was that Toscawidgets cleans that whole ET/Genshi issue up and breaks when you leave them in.
So, long story short, add the site template and remove the conflicting lines from your master template. (Though, if you are mixing Toscawidgets and Turbogears widgets, you'll have to do something like what's outlined here.)
Wednesday, September 12, 2007
Tuesday, September 11, 2007
In your templates that include master.html, make divs that have ids of 'left', 'center', 'right', 'footer', and 'header', or just add your static content to master.html. The only caveat is that there must be some sort of other element inside the positional div wrapping your text, it can't be just text, as xpath won't select it for replacement.
- Documentation. It should be mercifully short, yet I still haven't done it
- Fix up the welcome page a bit
- Figure out some sort of decent unit test for templates
- Wait for suggestions, criticisms, etc :)
Monday, September 10, 2007
Anyways, the quick commands to use, after creating an account and setting up your egg and metadata:
- python setup.py register
this creates an entry in the cheeseshop for your project and populates it with the metadata from your egg. If something is wrong, just fix it and rerun this command.
- python setup.py sdist upload
this creates a source distribution (the egg folder tarred and gunzipped) in dist/ and uploads it to the cheeseshop
- python setup.py bdist_egg
upload this creates a binary distribution (the egg folder all zipped up) in dist/ and uploads it to the cheeseshop
Super bonus hints:
python setup.py develop installs the egg using a link to your source code instead of putting it in the site-packages folder, so you can test things.
easy_install -m package_name takes the package name out of the appropriate places, allowing you to uninstall a package by deleting it from the site-packages folder.
Sunday, September 02, 2007
paster create -t toscawidgetsand answer the questions. For a list of what other templates paster create has, try:
paster create --list-templatesFor some reason, figuring this out took me way longer than it really should have last night. (Thanks Daniel)
A super bonus bbedit command line hint: bbedit *.py --new-window
Friday, August 24, 2007
Breaking down the Xpath select statement a little more (removing the quote escapes):<!-- in master.html -->
<div id="status_block" py:if="tg_flash"
<!-- in welcome.html -->
<!-- all your base here -->
<!-- navigation stuff here -->
//div[@id='centercontent']/*//div == in all 'div' elements
[@id='centercontent'] == where the (@) attribute 'id' is equal to 'centercontent'
/* == select all the children elements
Tuesday, August 14, 2007
It's already cool enough that they're apparently using an old quarry as a lake, so the whole thing is sunk into a pit and looks like an especially fantastical Bryce creation, or that they're using geothermal power. The thing that drops my jaw is the ginormous *waterfall-like elevator* that apparently runs over the glass face of the building. A
t least, I think it's an elevator.
If only I had a spare second to doodle :)
Thursday, August 09, 2007
Sunday, August 05, 2007
More to come in the future. :)
Saturday, August 04, 2007
Wednesday, August 01, 2007
I think it's a fantastic idea, putting captchas to a good purpose. :)
As it turns out, when you create your form widget:
the field class gets created once, at the controller load, and that's it.editform = widgets.TableForm(
Therefore, if you populate your fields when you create the form, they won't be updated, possibly causing you to learn more than you wanted to about SQLObject caching. I found the solution on this page. Similar to passing values, you just pass a dictionary of the options to the appropriate widget. Since I have a generic CRUD controller, I created a function in my EditFields class that returns a dictionary of all the options fields and updated values, like so:
(using the build_list method here) then, in my controller:def updatelists(self):
"""Return a dictionary of any lists
that need to be updated due to new objects"""
companylist = Company.build_list(
#in my form, companyID is the
#name of the SingleSelectField
return dict(companyID=companylist )
and finally, in my model:return dict( form=self.editform,
(I'm using Genshi, which is why I have the ET function there)<div py:content="ET(form.display(
Thursday, July 26, 2007
- Unfortunately Linden seems to be content with generating bullshit instead of pushing the state of the art. (ouch)
- Unfortunately, Linden doesn't include enough of them, nor explore their implications sufficiently, to do justice to his argument.
- Unfortunately, Linden has not been the tonic for the offense that I was hoping for.
- Unfortunately, Linden was completely sold out of their Cabernet Franc. (damn)
- Unfortunately, Linden is still around to fret, cry, whine, and hesitate in Covenants stead.
- Unfortunately, Linden is a 23 year old corner outfield prospect who has yet to crack an 800 OPS in two attempts at AAA. (I am 23, and also not good at baseball.. creepy?)
- Unfortunately, Linden's future in the 21st century is threatened by a combination of factors. (oh noes!!)
- Unfortunately Linden lifted the ban on fireworks after that "little" rain last weekend.
- Unfortunately Linden was there.... refusing to leave, dag nab him. And I believe that the elbow and knee combo, to the right of shot, belongs to Mr Krad.
- Unfortunately, Linden's papers have disappeared, and Land is forced to piece together the story behind the discovery with the dubious aid of Linden's young mistress (woo!)
Wednesday, July 25, 2007
comment_form = widgets.TableForm(
def add(self, tg_errors=None):
flash("There was a problem with the form!")
def save(self, **data):
And, for whatever reason, your user ends up at "host.com/add/" instead of "host.com/add", the form will display fine, but will point to "host.com/add/save" instead of "host.com/save". Then you'll get all kinds of fun errors, like "TypeError: add() got an unexpected keyword argument '
Friday, July 20, 2007
Go ars, go. =)
Thursday, July 19, 2007
Puzzle Pirate's Subscription FAQ is the first time I've seen this concept written out, though I'm sure it's pretty common. (No, I don't play Puzzle Pirates, but it's always appealed to me. If only they'd make a Ninja themed puzzle game)
Tuesday, July 17, 2007
Tuesday, July 10, 2007
[Spell check doesn't think that sillily is a word. Pssht.]
Monday, July 09, 2007
Also, on the subject of validators in Turbogears, I recommend using the FormEncode documentation directly, it's much more complete than what you find listed in Turbogears docs.
Friday, July 06, 2007
Anyways, I bought Elebits, a game I've been fascinated with. It's a lot of fun, very unique sort of gameplay. After getting past Nintendo's incredibly finicky credit card authorization, I just downloaded the Opera browser (6 days ago, could have gotten it for free.. oh well). I'm pretty sure I won't be using the Opera browser for reading the news, the text doesn't display well at all on my screen, and zoom is annoying, but I've tried YouTube, and I think I'll definitely be using this as an internet solution for my home theatre. (Full Screen mode looks good, and I have the sound going to my surround system, the Grayson trailer looked good, sounded great)
Oops, I spoke too soon. Flickr worked well, until I tried a slideshow, and got an out of memory error after 3 pictures. :( I was pretty stoked about slideshows during parties and whatnot. Anyone know if there's a way to get around this?)
Now, I'm off to look at Virtual Console stuff, the reason I finally decided to plunk down the money for this thing in the first place.
[I've been going nuts on the blog recently, there's so much stuff I've been meaning to post, now I have some time, it's all getting pushed out of the queue]
[Update: wow, if they brought out Marble Madness for Virtual Console, I'd rush home, and take all of tuesday off just to play it. Virtual Console is just as amazing as I had hoped. Childhood memories, here we come!]
Anyways, my father and I used to get in the car (always a beamer), and if we were really lucky, Car Talk would be playing on NPR. I have so many fond memories of listening to Car Talk with my dad, just hearing Click and Clack's voice makes me smile. Not to mention that they have a great show, and I learn interesting things about debugging cars. Which is good, since my car is starting to do funny things.
Since I don't really drive much during the week, I've downloaded the Car Talk podcasts, and I'm listening to them on the bicycle ride to work in the morning. It's fantastic, helps me wake up a little more, and starts my day off right. I would highly recommend it.
Wow, I would love to have one of these. I do wake board, and the control scheme is pretty similar, toe/heel flexion to steer. It would really help my balance. That's a good reason to buy it, right?
Thursday, July 05, 2007
Whew, typing all that made me tired. At least I'm not sitting in front of my computer dorking out *all* the time. Speaking of dorking out, I've really got to write that sample AJAX program in Turbogears for the next Tampa Bay Python Meetup.
Probably, though, you should just watch the episode. It's much funnier when he says it. :) Other gems from the episode:
- What is the most deadliest move you know? "Probably, from New York to Florida. People don't come back."
- Hey are there self help books for lousy ninjas? "Yes, they're called funeral directories."
- How many people have you wrongly killed? "Just one, but I went back the next day and I killed him correctly."
Friday, June 01, 2007
Thursday, May 31, 2007
I have stumbled upon some utterly astonishing stuff in my wanderings, some more useful than others -
Apartment Therapy has a ton of photo tours of people's apartments, some of it is just jaw dropping:
This apartment has some really insane stuff in it, like the cityscape relief cut into panels as art in the dining room! And a crazy awesome chandalier that I want an excuse to try and make myself.
This loft/apartment has some things I would never do for sure, but so many amazing elements - like the icechest/cabinet with the vases, and the crazy rounded (reverse?) column shelves designed for climbing on! I'm very intrigued by the clear chairs, I looked them up and dang, are they pricey, but a cool idea. Also the fireplace is just jaw-dropping, although I do wonder a tiny bit about its fire-safety... plus I would probably want it to be more of a faux-slate type effect.
I like from a different apartment the use of this way more awesome clear chair much better... also the textures and stencils in this apartment are insane!
And this apartment is just HELLA cool.
On a more practical front, this blog is all IKEA hacks, which I am so totally down with. In fact out of all the many IKEA things I have, I can think of maybe one that I have used 100% as is intended by the manufacturer : )
My favorite "hack" by far - I would so do this in a second. Too bad I don't really have any doors that I can do up bat-cave-entrance style.
The other thing I found today was Rollerwall.com. Which, knowing well the evils of wallpaper, I think I have actually thought up before :)
Thursday, May 24, 2007
I used to be not a big fan of flavored vodka's, but I've learned that it's neigh impossible to get a decent cosmopolitan these days, and the Poor Man's Cosmo, cranberry with citrus vodka is the next best thing. Plus, you really can't argue with a great tasting drink that can be made by pouring two things together in a glass with ice.
Wednesday, May 23, 2007
Friday, May 18, 2007
Wednesday, May 16, 2007
||, &&, ... =, ... and, orwhich could be a problem for me if I'm not paying attention some time in the future, and expect the wrong behavior. (And is also kinda goofy, this is why we use parenthesis)
Monday, May 14, 2007
- Hofstadter's Law:
It always takes longer than you expect, even when you take into account Hofstadter's Law.
- Godwin's Law:
As an online discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches one.
- Benford's law of controversy:
Passion is inversely proportional to the amount of real information available.
- O'Toole's Corollary of Finagle's Law:
The perversity of the Universe tends towards a maximum.
- Hanlon's razor:
Never attribute to malice that which can be adequately explained by stupidity.
After that, I went to Blues Dance, a party held by my good friend Bill, which starts at 1am, and goes until early in the morning. This was a very successful party, even though I didn't dance much, I had a fantastic time talking all night with another geek. (Look, I found another person I can geek out with. Awesome.)
Saturday was consumed by sleep and going to the Tropical Heatwave concert in Ybor city, Tampa. We got there early to get a good parking spot for the mobile home, and walked around a bit. If you ever go to Ybor city, and you like crepes, you must try out Le Creperia Cafe. Not only is the atmosphere delightful, but our waiter was definitely one of a kind, and the food was amazingly fantastic. I would love to go there again with someone for a relaxing meal. Ybor, by day, is a really neat place to walk around. They have a great motif going, the brick, tile, and iron wrought architecture has a lot of character. There's even a trolley that goes through it. Tropical Heatwave was also very good. I really liked Poetry n' Lotion, though most of the bands we saw were quality. The only issue I had was the loudness of the sound system in the Cantina. For crying out loud, it was actually painful to stand in there towards the end of the night. Saturday night, we went to a friend's house and played Katamari Damacy, Guitar Hero, and watched FLCL. FLCL is funny, strange in a crazy way, and has a good soundtrack, but the best part is the graphics. Some of the artistic style is truly unique, all of it is very well done.
After a little sleep, I went to North Shore to play Beach Volleyball. Again, the crew I play volleyball with is full of great people. Nothing beats hanging out on the beach and playing some good games of co-ed doubles. I went home, got dressed, and went to Swing Dancing in Tampa with Bill. Most of the swing dancers I've met are pretty cool, and all of them are nice. It's an interesting crowd to hang out with.
Well, that brings me to now. Quite a good time, but I have to get to sleep and go to work in the morning. Cheers.
Friday, May 11, 2007
Originally uploaded by Kusmeroglu.
Here's the first poster I made. I got white wrapping paper, and used lots of spray on glue, so that I can take it up and down pretty easily. If anyone else wants to do this, I *highly* recommend spray glue, just be careful not to spray it on too thick to wet the paper, and you're golden. Catwoman is by far my favorite comic book character. I hope that they make a new batman movie with her in it. I would die so, so happy.
Tuesday, May 08, 2007
Funny name aside, Rachel pointed this out to me in an email, and it's freaking awesome. So cool, that I was obsessed until I found the perfect pictures to rasterbate. (My house needs some decor, haven't had a chance since I moved in to really do anything) My pictures? Batman for the living room, Catwoman for the bedroom. Both Bruce Timm (of course.. remember this?)
So, I've been telling people about this piece for years, I saw it a long time ago and it's stuck with me all this time as my favorite Spiderman picture, but never found it again. Apparently I hit the right Google terms this time, and I've finally found it. Too bad it's so expensive. Anyways, done by John Romita. There was a scene in Spiderman 3 that reminded me of it, which is why I brought it up again.
Saturday, May 05, 2007
Tuesday, May 01, 2007
Monday, April 30, 2007
ls > dir any day of the week.
Monday, April 16, 2007
Sunday, February 25, 2007
The people at work are all great, I haven't had a bad experience yet. Things are hectic and the politics are at an extreme because there is a lot of upheaval going on, but everybody is still nice. People down here are nice in general, except when they are behind the wheel. Everyone has this friendly, laid back sort of attitude in the city. (I hear it isn't so in other places nearby) I just ate at The Chattaway, which is this adorable 'best burger in st. pete' type place. I've never ate somewhere with such an interesting and comfortable setting. On the way there, I passed my neighbor, Moe, and her husband, who asked if I was going to "the chatty", since it's only 3 blocks from me in an otherwise residential area. The guy I ate with is my new beach volleyball partner, V, a truely nice guy. We ate and sat by a firepit type thing and talked about life and relationships, then chit chatted with a couple who were also sitting by the fire.
Charlie, one of the guys from work, invited me out to play beach volleyball, and got me totally hooked. I played for the first time on tuesday, and I've probably logged 20 hours since then (thursday, saturday, and sunday). V wants to train me for a co-ed team and participate in tournaments. Apparently I'm a natural beach volleyball player, I'm picking it up much quicker than I did indoor volleyball. I blame martial arts and wallyball for my quick reflexes, and the scenery and company for my enthusiasm. Everyone I play with is really cool, and spending hours out on the beach can't be beat. Between games, you get to lay back and watch the boats go by on the water, or the sunset. I should have a dark tan in no time, which is odd for me, since I don't have the patience to lay out.
The nightlife down here is odd, it's all beer, wine, and music. There's a lot of jazz and blues down here, and most of the places have live music, then there's First Friday, where they shut down a couple blocks on Central Ave and have a band playing out in the street. Everybody drinks beer all the time. I'm assuming that it tapers off in the summer, when beer becomes heavy, but I wouldn't be suprized if people just switched to wine. It's very vacationy. Even people that have lived here their whole lives remark on how it's like a vacation everyday. (I think this is where the laid back attitude comes from)
Anyways, I just wanted to chat about my thoughts on moving to Florida. I like it here very much, I'm keeping myself busy seeing new places and trying out new things.
Wednesday, January 24, 2007
So, I just noticed today that if you have Google suggestions turned on, like in my search bar in Firefox, you can do the calculator stuff, and it will pop up as the first suggestion. I use Google for a calculator, spell checker, and thesaurus all the time, this just makes my life two buttons easier/faster.
If you're not familiar with the calculator stuff, check this out. You can type stuff like "1440 minutes in hours", and the conversion (=24 hours) will show up as the first suggestion.