终于决定将学习环境彻底转到Linux上来,下面记录一下转移学习环境的各种软件和环境的安装和配置。1、centos自带python2.6,之前的博文已经说到已成功更新到python3.3,下面首先安装python的包管理器(pip或easy_install) CentOS 6.3安装pip Cen.....
分类:
系统相关 时间:
2014-09-03 23:53:57
阅读次数:
527
在写 migrate 的时候要考虑一些意外情况,比如: Comment.all , 如果有很多 comment ,而那个时候服务器内存又不够,那么很有可能就把内存给用光。所以foreach 操作很有必要。有些时候在 运行迁移的时候会出现,某个任务迁移到一半的时候,出现异常,迁移终止了。 这个时候该怎...
分类:
其他好文 时间:
2014-09-03 22:40:37
阅读次数:
215
转义符表This all of the escape sequences Ruby supports. You may not use many of these, but memorize their format and what they do anyway. Try them out in ...
分类:
其他好文 时间:
2014-09-03 22:37:17
阅读次数:
222
LeetCode: Maximal RectangleGiven a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.地址:htt...
分类:
其他好文 时间:
2014-09-03 22:36:37
阅读次数:
220
首先,这是python脚本import os;for i in range(0,20): print ("Case:"+str(i)); print ("randoming"); os.system("randomdata.exe"); print("running righ...
分类:
编程语言 时间:
2014-09-03 22:35:57
阅读次数:
475
时间转换python中处理时间的时候,最常用的就是字符形式与时间戳之间的转换。 把最基本的转换在这里记下来string -> timestampimport timeimport dateutil.parser as dateparserdef str_to_timestamp(time_str) ...
分类:
编程语言 时间:
2014-09-03 22:28:17
阅读次数:
387
一、INSTEAD OF触发器 对于简单的视图可以执行INSERT,UPDATE和DELETE操作,但是对于复杂视图,不允许直接执行INSERT,UPDATE,DELETE操作,当视图出现以下任何一种情况时,都不允许直接执行DML操作,如下:具有集合操作符(UNION,UNION ALL,INTE....
分类:
数据库 时间:
2014-09-03 22:28:07
阅读次数:
575
学习flask,安装virtualenv环境,这些带都ok,但是一安装包总是出错无法安装,http://e.pypi.python.org/这个就是官网了,清华大学提供的建议非清华大学校内的使用这个镜像: http://e.pypi.python.org/simple(这也是一个http://pyp...
分类:
编程语言 时间:
2014-09-03 22:27:47
阅读次数:
325
LeetCode: Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear only once. For example,Giv...
分类:
其他好文 时间:
2014-09-03 22:27:17
阅读次数:
311
import moduleName如果要使用moduleName模块中的方法时,是moduleName.method(点方法),比如moduleName中有个方法是set,则使用的是moduleName.set如果想直接使用set,就可以使用from moduleName import set,就可...
分类:
编程语言 时间:
2014-09-03 21:17:37
阅读次数:
283