Posts
GAE's Python Datastore API
class Blog(db.Model): id = db.StringProperty(required=True) name = db.StringProperty(required=True) url = db.LinkProperty(required=True) articleIDs = db.StringListProperty()
articleID = str(uuid.uuid1()) Article(id=articleID, name="hello", content="hello world").put() blog.articleIDs = [articleID] blog.put() ...</pre>
read morePosts
GAE's Users Service
if user: #User Logined else: #User Need Login => Redirect to login page self.redirect(users.create_login_url(self.request.uri))</pre>
read morePosts
Hello, Tkinter
Tkinter._test()
form = Tk() … form.mainloop()
form = Tk() form.title(“HelloWorld Demo”) form.geometry(“300x200”)
lbl = Label(form, text=“Hello, world!”) lbl.pack()
form.mainloop()
read morePosts
How to customize .NET 4.0's System.Runtime.Caching.ChangeMonitor
namespace CustomChangeMonitorDemo { public class ClipboardChangeMonitor : ChangeMonitor { #region Var private string _clipboardText; private Timer _timer; private string _uniqueID; #endregion
#region Private Property private string m_ClipboardText { get { return _clipboardText ?? string.Empty; } set { if (_clipboardText == value) return; _clipboardText = value; OnChanged(value); } } private System.Windows.Forms.Timer m_Timer { get { return _timer ?? (_timer = new System.Windows.Forms.Timer()); } } #endregion #region Public Property public override string UniqueId { get { return _uniqueID ?
read more