Blogs: 938
Comments: 21944
Screen names: 6922
Podcasts: 23
Fri - Jul 03, 2009 - 08:39 AM
According to Google Analytics:
56.87% of kennypyatt.com viewers use Firefox!
Here is the breakdown.
56.87% - Firefox
19.3% - Chrome
16.77% - IE
There were also Mozilla, Konqueror, Opera, Opera Mini, Safari, Playstation Portable and Playstation 3.
Tue - Jun 30, 2009 - 06:26 PM
I am now maintaining MoronDailyNews.com. The goal of the site is to waste your time. I don't write every post but I do occasionally put a story up.
There are a few funny ones up there now. Our goal is 4 stories a day. So check often.
Tue - Jun 30, 2009 - 12:21 PM
If you need to reformat a date string in python from one format to another you can use datetime.strptime() to set a format and then strftime() to convert it into almost anything.
Here is an example from Apache's common log format (CLF)
Apache gives the time as 29/Jun/2009:23:42:50
MySQL wants the time as 2009-06-30 06:19:18
from datetime import datetime
d = datetime.strptime(apache_date, '%d/%b/%Y:%H:%M:%S')
mysql_date = d.strftime('%Y-%m-%d %H:%M:%S')
Tue - Jun 23, 2009 - 07:19 PM
Python and MySQL offer two ways to format currency. I am blogging this more for my memory than to help but hey... you never know.
MySQL
# SELECT FORMAT(money, 2) as money;
# Set it to US Currency
locale.setlocale( locale.LC_ALL, 'en_US' )
money = locale.currency(value, grouping=True)
All Material © Copyright 2005 by RogueFalcon. All Rights Reserved.