- course info
- what is computation
- python basics
- mathematical operations
- python variables and types
methods that are called on a jQuery object.
$( "h1" ).remove();
several methods that do not act on a selection
- Methods called on jQuery selections
- automatically receive and return the selection as
this
.
- automatically receive and return the selection as
- Methods in the $ namespace are generally utility-type methods, and do not work with selections;
- not automatically passed any arguments, and their return value will vary.
把一个 list 或 dict等 JSON对象 传到网页的 javascript, 用 JS 进行处理,比如用 js 将数据可视化显示到网页上
如果不需要处理,直接显示到网页上,用Django模板就可以了
- 页面加载完成后,在页面上操作,在页面上通过 ajax 方法得到新的数据(再向服务器发送一次请求)并显示在网页上
- 页面不刷新的情况下,动态加载一些内容
- 用户输入一个值或者点击某个地方,动态地把相应内容显示在网页上
- 直接在视图函数(views.py中的函数)中将 JSON对象 和网页其它内容一起传递到Django模板(一次性地渲染,还是同一次请求)。
- Web application servers are generally "stateless":
- Each HTTP request is independent; server can't tell if 2 requests came from the same browser or user.
- Web server applications maintain no information in memory from request to request (only information on disk survives from one request to another).
- Statelessness not always convenient for application developers: need to tie together a series of requests from the same user.
数据库设计,一个软件项目成功的基石。很多从业人员都认为,数据库设计其实不那么重要。现实中的情景也相当雷同,开发人员的数量是数据库设计人员的数倍。多数人使用数据库中的一部分,所以也会把数据库设计想的如此简单。其实不然,数据库设计也是门学问。
This section helps you get started with MySQL. We will start installing MySQL, downloading a sample database, and loading data into the MySQL server for practicing.
- Installing MySQL database server – show you step by step how to install MySQL database server on your computer.
- Downloading MySQL sample database – introduce you to a MySQL sample database named
classicmodels
. We also provide you links for downloading the sample database and its diagrams. - Loading the sample database into your own MySQL database server – walk you through steps of how to load the
classicmodels
sample database into your MySQL database server for practicing.
The difference is that hashing is a one way function, where encryption is a two-way function.
Therefore, when a user submits a password, you don't decrypt your stored hash, instead you perform the same bcrypt operation on the user input and compare the hashes. If they're identical, you accept the authentication.
To further elaborate on my question, imagine you are working on a Python project that needs a password to connect to a database, or a "client secret" to connect to a webservice. Where is the best place to store that information so that you don't inadvertently share it when distributing code?
The most common pattern I've seen is to embed it directly in the Python script, but then leave it blank, with a comment to fill it in yourself.
consumer_secret='' #Fill this in with your own credentials
Coming from PHP, the standard method was to store credentials as variables in a separate file, and then import to a script. That way you could easily "gitignore" that file, but I don't see this very often in Python.