I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I've ever gotten to a colleg...
分类:
其他好文 时间:
2014-04-29 13:46:22
阅读次数:
337
1D people lived in a 1D country. Everything in the country was one-dimensional, and everything was simple and clear: just one axis and two directions — forward and backward. Even a 1D world has proble...
分类:
其他好文 时间:
2014-04-29 13:44:22
阅读次数:
284
刚开始学习Python时,看资料和别人介绍中提到过,安装Python的包有的用easy_install, setuptools, 有的使用pip,distribute。现在把这些相关的资料整理一下,能更清晰的了解Python的设计,关于这些可以参考http://guide.python-distribute.org/installation.html。...
分类:
编程语言 时间:
2014-04-29 13:42:22
阅读次数:
358
Vagrant进阶:搭建简易Python,PHP开发环境...
分类:
编程语言 时间:
2014-04-29 13:34:21
阅读次数:
332
本文出自:http://blog.csdn.net/svitter
原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=3790
另外写文章之前偷懒一下,发现一个很好的入门python教程!:http://woodpecker.org.cn/abyteofpython_cn/chinese/
题意:在最短路径的前提下,添加了一个最短路径中权值最小的要...
分类:
其他好文 时间:
2014-04-29 13:32:22
阅读次数:
285
Problem Description
In the Wide Web World, Which web server was popular in web site? Apache, nginx, lighttpd? Baidu.com use Apache, and many web sites like 163.com use nginx. Why? Its configuration i...
分类:
其他好文 时间:
2014-04-29 13:24:20
阅读次数:
355
来源于ISCC 2012 破解关第四题
目的是通过逆向police,实现一个thief,能够与police进行通信
实际上就是一个RSA加密通信的例子,我们通过自己编写客户端和服务端来实现上面的thief和police的功能..
要通信,这们这次先通过python写出可以进行网络连接的客户端与服务端..
服务端代码
#!/usr/bin/env python
impo...
分类:
其他好文 时间:
2014-04-29 13:21:19
阅读次数:
473
本系列主要参考《Unity Shaders and Effects Cookbook》一书(感谢原书作者),同时会加上一点个人理解或拓展。
这里是本书所有的插图。这里是本书所需的代码和资源(当然你也可以从官网下载)。
========================================== 分割线 ==================================...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
376
我们都知道在Web开发中,都需要服务器,比如Java Web开发的Tomcat,WebLogic,WebSphere,现在来看利
用Tornado Web Server框架如何写一个简易的Python服务器。
一般来说只需要实现get和post方法就可以了。以上次使用redis数据库的例子说明,数据库插入代码如下:
import redis
import datetime
clas...
分类:
其他好文 时间:
2014-04-29 13:17:20
阅读次数:
397
6.3 初识类
类引入一些新语法:三种新的对象类型和一些新的语义。
6.3.1 类定义语法
类定义的最简单形式如下:
class ClassName:
.
.
.
类定义和函数定义(def语句)一样,必须先执行然后才生效。(你当然可以把类定义放在if语句分支中或者嵌入在函数中)
在实际情况中,在类定义中的语句常常是方法的定义,但是其他语句也是允许的并且有时是很有用的...
分类:
编程语言 时间:
2014-04-29 13:14:23
阅读次数:
433