Sunday, October 18, 2009

Favorite YouTube authours

googleanalytics
GoogleApps
GoogleDevelopers
GoogleDeveloperDay
GoogleEarthVideoHelp
GoogleMobileBlog
GoogleMobileHelp
GoogleReaderHelp
GoogleRU
GoogleVideos
GoogleWebmasterHelp
makemagazine
SketchUpVideo
NASAtelevision
NASAexplorer
NASAtechnology
googletechtalks

Friday, October 16, 2009

Google AppEngine: How to fetch more than 1000 entities?


def fetch_all(query, max_entries=1000):
''' fetch all entities '''
entries = []

count = 0
query = query.order('__key__')
while count % max_entries == 0:
items = query.fetch(max_entries)
for i, item in enumerate(items):
entry = {}
entry['gae_key'] = str(item.key())
for field in item.fields(): entry[field] = getattr(item, field)
entries.append(entry)

current_count = len(items)
count += current_count

if current_count == max_entries:
last_key = query.fetch(1, max_entries-1)[0].key()
query = query.filter('__key__ > ', last_key)
return entries

Sunday, October 11, 2009

Consolas font in Windows command prompt

if you would like to use Consolas font in your cmd.exe sessions, open up a Command Prompt that has administrative privileges and execute the following command:

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v 00 /d Consolas

Alternatively, you can find and edit the following key in your Windows Registry:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Console\TrueTypeFont

Add a key value with the name 00 and put Consolas in the data field.