1,安装环境:centos 6.4 python 2.6.6 2,安装easy_install 工具: wget -q http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py 3, easy_install?cocos2d...
分类:
编程语言 时间:
2014-07-22 08:22:37
阅读次数:
254
import osimport sysROOT = 'settings.py所在目录'sys.path.append(ROOT)from django.core.management import setup_environimport settingssetup_environ(settings)...
分类:
编程语言 时间:
2014-07-22 00:31:38
阅读次数:
207
class ctypes.py_objectRepresents the C PyObject * datatype. Calling this without an argument creates a NULL PyObject * pointer.示例:>>> dc = {'a':'aaa',...
分类:
编程语言 时间:
2014-07-22 00:28:38
阅读次数:
373
linux内核打印"BUG: scheduling while atomic"和"bad: scheduling from the idle thread"错误的时候,通常是在中断处理函数中调用了可以休眠的函数,如semaphore,mutex,sleep之类的可休眠的函数,而linux内核要求在中...
分类:
系统相关 时间:
2014-07-22 00:12:34
阅读次数:
690
一、通过pip工具安装
https://pypi.python.org/pypi/pip#downloads
cd /opt/
tar xzvf pip-1.5.6.tar.gz
cd /opt/pip-1.5.6
python setup.py install
pip install ngxtop
ngxtop -c /usr/local/nginx/conf/nginx.co...
分类:
其他好文 时间:
2014-07-21 23:28:11
阅读次数:
258
Bad Cowtractors
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 10194
Accepted: 4333
Description
Bessie has been hired to build a cheap internet network am...
分类:
其他好文 时间:
2014-07-21 23:28:09
阅读次数:
260
安装ez_setup.py时出现了这个问题:UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)Something went wrong during the...
分类:
编程语言 时间:
2014-07-21 23:27:53
阅读次数:
236
最近在做Web开发的时候,使用$.post提交数据,但是回调函数却没有被触发,按F12看控制台输出是:POST *** 400 Bad Request后台是SpringMVC的,设置了断点也不会被触发。后来查看JQuery资料了解到,$.post提交数据只有成功时才触发回调函数,于是改用$.ajax提交数据,添加error回调函数,得到错误信息了,如下图:这个问题是什么原因造成的呢?后来经过测试发...
分类:
其他好文 时间:
2014-07-21 13:32:36
阅读次数:
216
问题一:出现控制台坏的响应错误一Bad request控制台出现错误如下:Bad Requestrequest: http://hostIP:8983/solr/update?wt=javabin&version=1解决方法:出现以上错误的原因是,solr服务器上配置的Field和javabean提...
分类:
编程语言 时间:
2014-07-20 23:03:50
阅读次数:
391