This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($) { | |
| return $.widget("IKS.pluginName", { | |
| options: { | |
| uuid: '', | |
| editable: null | |
| }, | |
| populateToolbar: function(toolbar) { | |
| var widget = this, | |
| button = $('<span class="pluginName-button"></span>'); | |
- The power of django's Q objects
- Dynamic Django queries (or why kwargs is your friend)
- https://docs.djangoproject.com/en/dev/ref/models/queries/#q-objects
- https://github.com/django/django/blob/master/django/db/models/query_utils.py
- https://docs.djangoproject.com/en/dev/topics/db/queries/
- help('django.db.models.query_utils.Q')
寫這篇的時候 Django 目前的版本是 1.6.5 & 1.7 RC1
ISC 表示 BIND9 有很高的普及度,目前沒有足夠的資源同時維護 BIND9 和 BIND10 兩邊的開發,所以 ISC 將不再繼續開發 BIND10, BIND10 將改名為 Bundy 放在 GitHub,後續可由社群維護
- https://en.wikipedia.org/wiki/Coroutine
- https://en.wikipedia.org/wiki/Subroutine
- http://electronic-blue.herokuapp.com/blog/2012/06/coroutine-an-introduction/
- http://www.lua.org/pil/9.1.html
Coroutine (大陸翻做 "協程") 這個詞是由 Melvin Conway 在 1963 年所提出來的, 指的是提供多個 entry points 的 subroutine (子程式),讓 code 可以在執行到一些地方後暫停/繼續。
- Replacing import with accio: A Dive into Bootstrapping and Python's Grammar
- 把 import 換成 accio
- 作法為直接更動 CPython (因為 import 是 statement 不是 expression)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import functools | |
| def dp(start=[]): | |
| def decor(func): | |
| func.dp = start.copy() | |
| @functools.wraps(func) | |
| def wrapper(*args, **kwargs): |
- http://slides.com/rilak1328/timsort
- http://svn.python.org/projects/python/trunk/Objects/listsort.txt
- http://hg.python.org/cpython/file/default/Objects/listobject.c
- https://bitbucket.org/pypy/pypy/src/default/rpython/rlib/listsort.py
- http://c2.com/cgi/wiki?TimSort
- adaptive, stable, in-place
- Python Cookbook 裡有 Tim Peters 介紹的 Python 排序算法發展簡史
- https://github.com/swenson/sort
- Sorting routine implementations in "template" C
- https://github.com/gfx/cpp-TimSort