I hereby claim:
- I am booxood on github.
- I am azm (https://keybase.io/azm) on keybase.
- I have a public key ASDYbcLc2qja24aN4TbqTUXOX7oFnEXe-QaFHJWxemvl2go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to make opened Markdown files always be soft wrapped: | |
| # | |
| # path = require 'path' | |
| # |
| console.reset = function () { | |
| return process.stdout.write('\033c'); | |
| } |
| var util = require('util'); | |
| var event = require('events').EventEmitter; | |
| function f(){ | |
| // event.call(this); | |
| } | |
| // util.inherits(f, event); | |
| f.prototype = new event(); | |
| var ff = new f(); |
| from django.test import TestCase | |
| from django.conf import settings | |
| from django.utils.importlib import import_module | |
| class SessionTestCase(TestCase): | |
| def setUp(self): | |
| # http://stackoverflow.com/questions/4453764/how-do-i-modify-the-session-in-the-django-test-framework | |
| # http://code.djangoproject.com/ticket/10899 | |
| # settings.SESSION_ENGINE = 'django.contrib.sessions.backends.file' #use django settings |
| var ClassA = function(name){ | |
| this.name = name || 'no name'; | |
| }; | |
| ClassA.prototype.sayName = function(){ | |
| console.log('say name:' + this.name); | |
| }; | |
| var ClassB = function(name, age){ | |
| // this.new = ClassA; |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| #for encode: pip install qrcode | |
| import qrcode | |
| #for decode: pip install zbar | |
| #如果报找不到zbar.h,则先安装libzbar-dev | |
| import zbar |
| #返回一个list | |
| #如果list很大,会占用很多内存 | |
| def fab(max): | |
| f = [] | |
| n, a, b = 0, 0, 1 | |
| while n < max: | |
| f.append(b) | |
| a, b = b, a+b | |
| n += 1 | |
| return f |