Fuck me on GayHub

Flask Internal Part 5

what is request context?

When Flask receives a request from a client, it needs to make a few objects available to the view functions that will handle it. A good example of this is the request object, which encapsulates the HTTP request sent by the client.


more >>

Flask Internal Part 4

How do flask routing urls?

URL routing is the component that connects the requests with view functions. when the web application receives a request, it first find the corresponding view functions, and then execute the function with the right parameters, then assemble the response and return.


more >>

Flask Internal part 1

有一个开源组织叫做Pocoo,开始为了做出一个类似phpBB的BBS系统,期间就开发出了许多出名的工具,如下:

  • Flask
  • Jinja
  • Werkzeug
  • Sphinx
  • Pygments
  • etc

如今这个BBS早已经销声匿迹,但是这些子项目却声名鹊起。


more >>

Binary Tutorial: Number System, the theory behind numbers and how binary work

Numbers are all around us and for the most part we take them for granted. If I offered you $1337 dollars you would be happy because you know that is a fairly reasonable number of dollars. A number system is a means of representing amounts of things. Decimal is just one of several number systems though and others, in paticular binary, are important to understand in various fields, especially computing.

In our beginners introduction to binary, hexadecimal and octal numbers you will learn binary conversions and arithmetic with interactive demonstrations and detailed explanations.

生活中到处都是数字以至于我们都想当然了。如果我给你1337美元,那么你将会很高兴,因为你知道这是一笔不小的数目。数字系统就是用来表示物品数量的工具。十进制只是数字系统里面的一种而已,例如二进制在计算机和其它领域就是一种重要的计数方式。
在本系列的入门介绍中,你将会了解二进制,十六进制,八进制和与其相关的转化,数学运算等一些细节。


more >>

我与父辈

近来,阅读的最令我感动的书就是《我与父辈》了。开始是在一篇批评书籍腰封的文章中看到这本书的,当时就怀着厌恶的情感,直到最近Hailling推荐,才买回来看。本书讲述的是父辈们在那个年代拼命工作,为了儿女,为了家庭,为了生存,在极度的贫乏困顿中亲人们之间的感情。《平凡的世界》是小说,但反应的是现实生活,而本书则是真真正正的河南那一带的人的故事。虽然我所处的年代并不能完全体会到作者年代的艰难,但是作品的真实性仍然无处不流露出来。读书要读真实的书,而这本书无疑就是真实生活的记录。而阅读中,时刻让我想到自己的父母亲,因为忙碌的工作而忽视了父母亲的存在。


more >>

腰封与妖封

书籍腰封起于西方世界,流行于日本,台湾,在大陆则更上一层楼而成为妖封。想必都有过买书,选书的经历,如今,经常会被书籍表面的腰封给雷倒。这里我们来直接看看一些例子吧。


more >>