来自Andrew
Delong的博客http://andrewdelong.wordpress.com/2012/11/03/pythonc-in-visual-studio-an-alternative-to-matlabmex/I
spent much of my PhD working in ...
分类:
编程语言 时间:
2014-06-08 22:45:10
阅读次数:
458
$django-admin.py startproject web2$cd
web2/$python manage.py startapp blog$vim web2/settings.py
注意settings.py以下两个部分,首先要配置数据库,其次要在INSTALLED_APP里添加刚才新建的...
分类:
移动开发 时间:
2014-06-08 22:18:14
阅读次数:
377
原题地址:https://oj.leetcode.com/problems/sqrtx/题意:Implementint
sqrt(int x).Compute and return the square root
ofx.解题思路:实现开平方函数。这里要注意的一点是返回的时一个整数。通过这一点我们可...
分类:
编程语言 时间:
2014-06-08 21:04:38
阅读次数:
329
原题地址:https://oj.leetcode.com/problems/search-for-a-range/题意:Given
a sorted array of integers, find the starting and ending position of a given
target ...
分类:
编程语言 时间:
2014-06-08 21:03:21
阅读次数:
297
原题地址:https://oj.leetcode.com/problems/sort-colors/题意:Given
an array withnobjects colored red, white or blue, sort them so that objects of
the same col...
分类:
编程语言 时间:
2014-06-08 20:56:32
阅读次数:
394
原题地址:https://oj.leetcode.com/problems/add-binary/题意:Given
two binary strings, return their sum (also a binary string).For example,a ="11"b
="1"Return"...
分类:
编程语言 时间:
2014-06-08 20:28:04
阅读次数:
300
url编码分两种, 一种是unicode, 另一种是gb2312,
今天遇到的一个网站是要将字符编码按照gb2312来编码,用来得到一个先填写blanks后再返回页面的数据,废话少说,需要做的就是先查看你的python的编码是啥,默认是ascii,import
sysprint sys.getd.....
分类:
编程语言 时间:
2014-06-08 20:17:26
阅读次数:
342
这里简短的总结一下而不是完全的罗列python的re模块,python的re具有强大的功能,如下是一个从我们学校抓取数据然后拆分的程序,代码如下:import
httplibimport urllibimport reimport sysreload(sys)sys.setdefaultencodi...
分类:
编程语言 时间:
2014-06-08 19:33:35
阅读次数:
333
使用python编写的脚本应用程序,在运行的时候需要有python的运行环境,但是我们肯定是希望整个python程序能够像应用程序一样打包生成一个包括其运行环境的exe文件包,这是第一步,但是要想使用net
start这样的方式启动, 还需要将该exe注册到服务里面去,使用exe install.....
分类:
编程语言 时间:
2014-06-08 19:27:50
阅读次数:
254