学生周记:语文是朕的皇后,虽然朕几乎从来不翻她的牌子,可她的地位依然是那么的稳固,英语是朕的华妃,朕其实并不真正爱她,只是因为外戚的缘故总要给她家几分面子,数学是朕的嬛嬛,那年杏花微雨,也许一开始就是[……]
作者:690130229
[iOS] Autolayout
如何正确的设置宽度或高度?给出一些 Tips:
如果宽度和高度布局可以改变,使用固有内容尺寸(Intrinsic Content Size,后面会讲到)设置约束(即 size to fit si[……]
<红楼梦评论>王国维
王国维
第一章 人生及美术之概观
《老子》曰:“人之大患在我有身”。《庄子》曰:“大块载我以形,劳我以生。”忧患与劳苦之与生相对峙也久矣。夫生者人人之所欲,忧患与劳苦者,人人之所恶[……]
处理大并发之一 对异步非阻塞的理解
转载自: http://blog.csdn.net/feitianxuxue/article/details/8936802
在研究nginx和node.js的时候常会遇到异步、非阻塞等,之前自[……]
完美
Python Snippets (4)
1. compile
- #!/usr/bin/env python
- eval_code = compile("100 + 200", "", "eval") 
- print eval(eval_code) 
- single_code = compile("print 'Hello World'", '', "single") 
- exec single_code
- exec_code = compile(""" 
- req = input('Count how many numbers?')
- for eachNum in range(req):
- print eachNum
- """, '','exec') 
- exec exec_code
2.
- #! /usr/bin/env python
- def foo(): 
- return True 
- def bar(): 
- 'bar() does not much'
- return True 
- foo.__doc__ = 'foo() does not do much' 
- foo.tester = ''' 
- if foo():
- print 'PASSED'
- else:
- print 'FAILED'
- '''
- for eachAttr in dir(): 
- obj = eval(eachAttr) #convert the string to the object 
- if isinstance(obj, type(foo)): 
- if hasattr(obj, '__doc__'): 
- print '\n Function "%s" has a doc string:\n\t%s' %(eachAttr, obj.__doc__) 
- if hasattr(obj, 'tester'): 
- print 'Function "%s" has a tester...executing ' %eachAttr 
- exec obj.tester #to execute the strings 
- else:
- print 'Funciton "%s" has no tester...skipping' %eachAttr 
- else:
- print '"%s" is not a Function' %eachAttr 
- print '________________dir()__________________' 
- print dir() 
3.
globals/locals[……]
Web-Fundamental.
1.
The HTTP method (also often called “the verb”) tells the server what the clients wants to do wit[……]
Flask
Some code comes from: http://flask.pocoo.org/docs/0.10/quickstart/
1.
1080725336904646b29bfd_000009[……]
Tools and Technical
Tools:
1.
Headless Browser
2.
Flexx
https://github.com/690130229/flexx
3.
Jinja
http://jin[……]
uWSGI
1.
http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#example
- location / {
- include uwsgi_params; 
- uwsgi_pass localhost:9000; 
- }