Latest snippets

2009/10/09 15:55:39
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
2009/10/02 12:37:27
# coding=utf-8
# Chinese Calendar for App Engine
# author Tim: iso1600 (at) gmail (dot) com, the Chinese calendar code searched from Internet.
from google.appengine.api import users
from google.appengine.ext import webapp
2009/09/30 12:38:07
input:focus, select:focus, textarea:focus {
outline: 2px solid #ebc476;
-moz-outline-radius: 5px; !important
}
2009/09/28 21:11:37
#!/usr/bin/env python
#coding:utf-8
import urllib2,re
import urllib,sys
2009/09/28 21:10:33
#!/usr/bin/env python
#coding:utf-8
import urllib2,re

class Dict:
2009/09/28 20:43:28
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#to ensure the utf8 encoding environment
import sys
2009/09/28 11:40:24
from google.appengine.api import xmpp
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

TWITTER_USERNAME = "your twitter name"
2009/09/28 11:37:53
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
...
def redirect_from_appspot(wsgi_app):
    def redirect_if_needed(env, start_response):
2009/09/27 20:38:01
<HTML> <!--Had to cheat on tags that appear before BODY-->
<HEAD>
<TITLE>
One sentence contained within every HTML tag in alphabetical order.
</TITLE>