全部版块 我的主页
论坛 金融投资论坛 六区 金融实务版
2018-4-27 08:41:39
昨天阅读0.5小时,累计阅读88.5小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 08:46:40
昨天阅读4小时,一共阅读232小时。与其焦虑的思考,不如静心的实干!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 08:51:27
充实每一天 发表于 2018-4-27 05:55
【加入充实计划】【了解充实计划】

|新充实挑战|    |公告【想成为牛人】|
昨日2小时,累计520小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 08:56:47
昨天学习2小时,累计4小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 08:58:18
昨天阅读1小时,累计131小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:00:24
昨天阅读1小时,累计61小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:00:59
昨日阅读2小时,累计阅读139小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:01:44
昨日阅读0.5小时,累积阅读6小时。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:08:11
昨日阅读时间2小时,总阅读时间35小时。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:19:42
阅读1小时,总计96小时。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:24:45
昨日阅读0.5小时,累计阅读29小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:24:59
充实每一天 发表于 2018-4-27 05:55
【加入充实计划】【了解充实计划】

|新充实挑战|    |公告【想成为牛人】|
昨日阅读1小时,累积阅读6小时。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:46:34
昨日阅读2小时,累计阅读66小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:47:30
昨日阅读0小时,累计7小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:55:03
DAY #27

1.主题
Flask Web Development.pdf
原作者视频讲解
https://www.bilibili.com/video/av5708093/?p=9

2.摘要
一个application的三部分:
第一部分:Initialization
All Flask applications must create an application instance. The web server passes all requests it receives from clients to this object for handling, using a protocol called Web Server Gateway Interface (WSGI). The application instance is an object of class Flask, usually created as follows:

from flask import Flask
app = Flask(__name__)

第二部分:Routes and View Functions
Clients such as web browsers send requests to the web server, which in turn sends them to the Flask application instance. The application instance needs to know what code needs to run for each URL requested, so it keeps a mapping of URLs to Python functions. The association between a URL and the function that handles it is called a route.
The most convenient way to define a route in a Flask application is through the app.route decorator exposed by the application instance, which registers the decorated function as a route. The following example shows how a route is declared using this decorator:

@app.route('/')
def index():
        return '<h1>Hello World!</h1>'

Flask supports these types of URLs using a special syntax in the route decorator.
@app.route('/user/<name>') def user(name):
return '<h1>Hello, %s!</h1>' % name

The portion enclosed in angle brackets is the dynamic part, so any URLs that match the static portions will be mapped to this route. When the view function is invoked, Flask sends the dynamic component as an argument. In the earlier example view function, this argument is used to generate a personalized greeting as a response.

第三部分:Server Startup
The application instance has a run method that launches Flask’s integrated development web server:

if __name__ == '__main__':
        app.run(debug=True)

During development, it is convenient to enable debug mode, which among other things activates the debugger and the reloader. This is done by passing the argument debug set to True.

逻辑总结:
The Request-Response Cycle  = Initialization  +  Routes and View Functions  +  Server Startup

Contexts enable Flask to make certain variables globally accessible to a thread without interfering with the other threads.
There are two contexts in Flask: the application context and the request context.
If any of these variables are accessed without an active application or request context, an error is generated.

Flask attaches methods to each route so that different request methods sent to the same URL can be handled by different view functions.

In most cases the response is a simple string that is sent back to the client as an HTML page.
A template is a file that contains the text of a response, with placeholder variables for the dynamic parts that will be known only in the context of a request. The process that replaces the variables with actual values and returns a final response string is called rendering. For the task of rendering templates, Flask uses a powerful template engine called Jinja2.

In its simplest form, a Jinja2 template is a file that contains the text of a response.

Bootstrap is a client-side framework, so the server is not directly involved with it. All the server needs to do is provide HTML responses that reference Bootstrap’s cascading style sheets (CSS) and JavaScript files and instantiate the desired components through HTML, CSS, and JavaScript code. The ideal place to do all this is in templates.

A redirect is a special type of response that has a URL instead of a string with HTML code. When the browser receives this response, it issues a GET request for the redirect URL, and that is the page that is displayed. This trick is known as the Post/ Redirect/Get pattern.

In the context of an ORM, a model is typically a Python class with attributes that match the columns of a corresponding database table.

Project Structure
This structure has four top-level folders:
* The Flask application lives inside a package generically named app.
* The migrations folder contains the database migration scripts, as before.
* Unit tests are written in a tests package.
* The venv folder contains the Python virtual environment, as before. 


3.心得感悟
粗读前半部分,获取三个框架:

整体项目框架 == app + migrations + tests + venv

单个application的框架 == Initialization + Routes and View Functions  +   Server Startup

整体结构框架 ==  Ttemplates + Web Forms + Databases + Email

了解基本运行原理,懂得多一点挺好。

这本书的整体思路不错,是一点点一层层展开讲解,能够白手起家读懂一个网页从小到大怎么发育长大成人的,不错。
但是需要补充javascript的知识。。。~

这个波兰英语,听着实在费劲!~~

4.时间统计
昨日阅读5小时,累计535小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 09:57:33
充实每一天 发表于 2018-4-27 05:55
【加入充实计划】【了解充实计划】

|新充实挑战|    |公告【想成为牛人】|
昨日阅读1小时 累计阅读176小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 10:15:32
2018.4.27
昨日阅读4.5小时  累计阅读166.5小时。
匠人匠心:愚直的坚持-(日)稻盛和夫(日)山中伸弥 著
京瓷的经营哲学里面有“六项精进”这个内容,非常简单易懂:①付出不亚于任何人的努力;②要谦虚,不要骄傲;③要每天反省;④活着,就要感谢;⑤积善行,思利他;⑥不要有感性的烦恼。之所以加入了第六条,比如说,有的经营者在资金周转上遇到困难,担心自己资不抵债而破产,于是夜不能寐,结果把自己的身体搞垮了。而这样的烦恼,我觉得是非常没有意义的。在公司面临这样的问题之前就应该拼命努力让公司拥有足够的资金,这才是重要的。但即便是拼命努力,有时候自己的努力得不到回报,公司也可能会破产。到了那个时候,就只能让自己重新振作起来,从头再来了。
有句话叫作“覆水难收”,只要尽了全力最后即便失败了,我觉得也没有必要过多地去想“当时这样做就好了,那样做就好了”,这只会带来更多的烦恼。当然,必须好好地分析一下失败的原因,进行反省。而进行了足够的反省之后,就把之前的都忘掉,振作起来朝着新的目标再一次挑战、努力就行了。
稻盛:我经常被询问:“要在工作上取得好的成绩,应该怎样做呢?”对于回答这个问题,我有一个方程式。就是“人生·工作的结果=思维方式×热
情×能力”。
稻盛:这里面有三个要素,但最重要的就是当事人所拥有的对人生和工作的“思维方式”,第二是“热情”,第三才是“能力”。这里所说的“能力”,是指知能、学力或运动神经等,多数都是先天性的东西,不是个人主观意志所能掌控的。能力的得分,是从“0分”到“100分”。
“热情”或许可以更换为“努力”,这个项目的得分也是从完全没有干劲儿的“0分”到对工作怀有熊熊烈火一般的热情并拼命努力工作的“100分”。
而关于最重要的“思维方式”,得分却是从“负100分”到“正100分”。比如说这个人愤世嫉俗、怨恨他人,总是愤愤不满散发负能量,那这个人的“思维方式”的得分就是负值。相反,如果遇到苦难和挫折也能坦诚地接受别人的意见与建议,不怕辛苦,善良地对待他人,开朗、认真并且坚持不断努力,那么这个人的“思维方式”的得分就是正值。
稻盛:工作的结果就是这三个要素的乘积。学力和能力再高,如果对于自己的能力过于自信
而忽视了努力的话,那么他最后的工作结果也就不会很好。相反,能力虽然比较低,但工作的热情很高,付出超过他人多倍的努力,而且如果他的思维方式也是正向的话,那么他所能取得的成绩是非常巨大的。举个例子,比如有一个人学历很高,能力方面可以达到90分,
但他对自己的能力过于自信,觉得工作很轻松,于是就不去努力,那么他的热情可能就是40分,思维方式也只有50分,那最后算下来,他的工作的结果,乘一下就是18万分。相反,有一个人他的能力只有50分,但对工作的热情非常高昂,付出超过他人多倍的努力,那他的热情可以达到90分,再加上非常积极向上,能够善待队友和同事,那么他的思维方式可能就是80分,最后算下来他的结果是36万分。所以说即便是一个能力平平的人,只要有很好的思维方式,再加上拼命地努力,那他肯定能获得预想不到的优异成就。
实际上,无论是工作还是人生,他们都得到了按照方程式计算出来的结果。

用没有偏见的心看事物
还有就是要用没有偏见的心来看待问题。听说锻造日本刀的师傅在工作之前先要将自己的身体洗净,再对着神像进行祷告,然后才能打造日本刀。那其实并不仅仅是形式上的东西,而是通过这些形式让自己的心清澈透底,如果不是怀着这样纯粹的心,可能有些东西也就看不到了。

《你不可不知的人性》 心得:无
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 10:38:41
昨日阅读0.5小时,累计阅读139.5小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 10:47:11
昨日阅读1小时,累计阅读537小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 10:57:19
昨天阅读1.5小时,累计阅读1.5小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 10:57:43
昨天阅读1小时,累计阅读428小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 11:08:26
充实每一天 发表于 2018-4-27 05:55
【加入充实计划】【了解充实计划】

|新充实挑战|    |公告【想成为牛人】|
昨日阅读1小时,总阅读490小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 11:21:19
昨日阅读5小时,累计阅读35小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 11:47:57
昨日阅读2小时,累计阅读141小时。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 12:06:59
昨日阅读2小时,累计阅读23小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 12:15:22
昨日阅读1小时,累计阅读1小时(之前没有记录)
资本论不知道是翻译的问题,还是专业术语的问题,看着略吃力
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 12:40:50
昨日阅读1小时,累计阅读187小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 13:05:16
昨日阅读1小时,累计阅读11小时
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 13:17:28
昨日阅读1个小时,总阅读时间6小时。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-4-27 13:33:00
昨日阅读1小时,累计阅读31小时,工作的变动让人措手不及,尽快重整旗鼓好好准备CFA吧
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群