自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(96)
  • 资源 (4)
  • 收藏
  • 关注

原创 git whatchanged -n 1

git whatchanged -n 1

2013-01-29 17:28:09 158

原创 exc_info=True

exc_info=True

2013-01-07 13:50:24 1249

原创 Premature end of script headers

down vote See:http://code.google.com/p/modwsgi/wiki/FrequentlyAskedQuestions#Apache_Process_CrashesThe message 'premature end of script headers' is usually indicative ...

2012-11-22 16:55:07 179

原创 SyntaxError: 'return' outside function

SyntaxError: 'return' outside function一般是由于缩进不对引起的,比如tab 和空格混合使用.........

2012-11-18 13:21:24 684

原创 TypeError: 'NoneType' object is unsubscriptable

TypeError: 'NoneType' object is unsubscriptable  x = None 然后你使用了x[0],就会出现这个错误。 If a list a is none, and you use a[1], it will throw this error

2012-11-08 14:36:06 665

原创 ValueError: too many values to unpack

too many values to unpack这种错误是指一个tuple值赋给一个tuple变量时,变量个数不够造成的。如:a, b = (1, 2, 3) for example: if ditc_a is dict, following code will get this errorfor key, value in ditc_a:    ...  C...

2012-11-08 14:34:33 565

原创 AssertionError: Hop-by-hop headers not allowed

Traceback (most recent call last): File "/Library/Python/2.7/site-packages/django/core/servers/basehttp.py", line 283, in run self.result = application(self.environ, self.start_response)...

2012-10-16 19:08:16 529 1

原创 MAC: unable to execute llvm-gcc-4.2: No such file or directory error

Install psycopg2 for python, got "unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1" Download "GCC-10.7-v2.pkg", install, ok...

2012-07-31 18:06:27 301

原创 Can't open file 'django-admin.py': [Errno 2] No such file or directory

 今日Windows下通过命令行python django-admin.py startproject test, 结果Can't open file 'django-admin.py': [Errno 2] No such file or directory 记得以前就是这么干的,好奇怪。看了path设置包含C:\Python27;C:\Python27\Scripts,djan...

2012-07-22 18:54:08 433

原创 python

http://luugiathuy.com/2011/02/setup-opencv-for-python/ http://www.opencv.org.cn/index.php/Debian%E4%B8%8B%E5%AE%89%E8%A3%85Resotre Now

2012-05-22 15:22:50 119

原创 Python Django Riak 这几天的调试

最近这几天被python的调试给折腾的无语了。。。。。。。。。 1. 在apache下log调试,出的比较明显的错,在log中根本看不出来,最后只能一步一步log,才找到出错的地方,诚心折腾人2. 发现在交互命令时,因为我自己的代码中有个叫collection的module,结果import riak时出错:>>> import riakTraceback (...

2012-05-09 15:12:05 100

原创 django-groundwork

今天看到 Django 实战 中提到了Djaongo中模仿 ruby on rials 中的scaffold功能的一个django app: django-groundwork,有点意思  Resotre Now

2012-04-20 11:26:43 99

原创 邪门的Riak python client 1.4

from django.core import management;import mip_server.settings as settings;management.setup_environ(settings)from mip_server.shares import riak_dalimport riakclient = riak.RiakClient("10.135.81.2...

2012-03-31 15:56:20 100

原创 backup 2012 0330

--insertinto license_types(pro_partner_id, name, resource_policy) values (3970, 'DirectWeb Upload', 'enabled');  insertinto license_types(pro_partner_id, name, resource_pol...

2012-03-30 14:16:35 78

原创 Python Django报错时候给的错误信息真够不准确的

RIAK_SERVER=settings.CONFIG.get('riak_db', 'server', None)RIAK_PORT=settings.CONFIG.getint('riak_db', 'port') 如果在配置文件中如果没有报错[riak_db]server=port= 甚至写成[riak_db]#server=127.0.0.1#p...

2012-03-29 15:33:10 127

原创 PYTHON 流氓问题

最近发现python的引用真不怎么样,明明是引用问题,给出的提示看了头晕,甚至没有提示。 怀疑项目前人的代码处理有问题,不然就真的是python本身的问题了Resotre Now...

2012-03-27 10:30:18 121

原创 backup

http://library.linode.com/lamp-guides/debian-6-squeeze: 配置LAMP Linode提供了一系列关于网站服务器配置方面的东西,非常好,谢谢拉  用dpkg-reconfigure配置时候,用空格(space)来选择。 When installing phpmyadmin it prompts you for which ...

2012-03-25 00:28:33 92

原创 debian scim 中文

  中文问题[http://latex.yo2.cn/articles/debian-linux-scim.html] 在Linux系统中安装输入法Scim后,有可能开机不能自动启动。对于这种情况我们需要在/etc/X11/Xsession.d/下新建95xinput文 件。但是网上的95xinput内容往往会导致很多程序对键盘失去响应,如不能够重命名等等。以下设置在Debia...

2012-03-25 00:26:22 117

原创 今日python

【http://www.morningprincess.com/python_staticmethod_and_classmethod/】Python中staticmethod和classmethod的区别 定义方式,传入的参数,调用方式都不相同。 staticmethod 不需要传入self和cls对象,只有一般的参数。可以通过实例或类对象进行调用。classmethod...

2012-03-23 16:59:22 90

原创 python tips

*args表示任何多个无名参数,它是一个tuple;**kwargs表示关键字参数,它是一个dict。并且同时使用*args和**kwargs时,必须*args参数列要在**kwargs前  Python灰帽子:黑客与逆向工程师的Python编程之道 (Immunity Inc的资深黑帽Justin Seitz倾力奉献,黑客艺术与工程技术的优雅融合)Resotre ...

2012-03-21 16:05:20 63

原创 backup 2012 0320

  perl perl-base perl-modules3 packages upgraded, 44 newly installed, 0 to remove and 610 not upgraded.Need to get 43.2 MB of archives. After unpacking 50.0 MB will be used.The following package...

2012-03-20 17:56:45 65

原创 Debian 6 Apache2 安装下 mod_wsgi

Debian Apache2 安装下 mod_wsgi:下载源文件./configure --with-apxs=/usr/local/apache/bin/apxs --with-python=/usr/bin/python[如果./configure 提示 apxs:command not found,要安装apache的dev包apt-get install apache2-...

2012-03-19 16:37:41 370

原创 backup

http://www.iteye.com/topic/1120920Git 命令介绍http://phoenixtoday.blogbus.com/logs/33458940.htmlhttp://phoenixtoday.blogbus.com/logs/35149540.htmlNAT模式虚拟机网络设置:http://www.linux521.com/2009/system/2...

2012-03-16 18:03:53 54

Riak 1.1.0安装在 Debian6

Riak 1.1.0 Debian6 安装:Installing on GNU/Linux #Most distributions do not have the most recent Erlang release available, so you will need to install from source.First, make sure you have a compa...

2012-03-04 20:09:39 75

原创 debian apt-spy

 debian上的apt-get是最快的软件安装方式,不过要用好apt-get,首先得需要找到最快的源,这样安装软件的时候才能获得好的速度,用起来才能得心应手。有的源在用了一段以后,就会失效,这个时候,你又需要去网上寻找新的救星。显然,这样会相当麻烦。不过,可以使用apt-spy这个软件来解决这个麻烦。首先,将apt-spy的源加入/etc/apt/sources.list:ech...

2012-02-26 22:09:51 317

原创 ImportError: Settings cannot be imported, because environment variable DJANGO_SE

 from django import templatet = template.Template('My name is {{ name }}.')c = template.Context({'name': 'Adrian'})print t.render(c)   ImportError: Settings cannot be imported, because...

2012-02-09 21:54:13 75

原创 dango One2Many example

from django.db import modelsclass Person(models.Model):    name=models.CharField('作者姓名',max_length=10)    age=models.IntegerField('作者年龄')class Book(models.Model):    person=models.ForeignKey...

2012-02-08 17:09:53 90

原创 MySQL-python 安装

今晚上光折腾了mysql 和MySQL-python了: 下了MySQL-python-1.2.3.tar.gz 解压,运行python setup.py install 结果来了:Traceback (most recent call last):  File "setup.py", line 15, in <module>    metadata, options = ...

2012-02-05 21:58:03 96

原创 google大学学django 第一篇

在网上找了最常见也是最简单的教程,开工。。。记录的是一些本人觉得容易误会的东东 1. django 下载,解压, 安装    安装python setup.py install   后别忘了把django 的bin路径添加到path下(D:\Django-1.3.1\django\bin), 否则运行django-admin.py startproject {appname}是...

2012-02-03 18:15:38 65

原创 今日python学习

记录下今天关于python的东东:  1. setuptools:          下载: http://peak.telecommunity.com/dist/ez_setup.py           安装: python ez_setup.py 安装后Lib\site-packages 多了easy-install的东西  2. Python bindings for Se...

2012-02-02 17:36:37 115

org.hibernate.QueryException: in expected错误

错误信息:org.hibernate.QueryException: in expected:select nre from X nre where nre.id=:ruleId 其中一个原因是:代码中X需要写上全名即包名才行

2011-10-20 16:18:09 801

原创 Oracle 是不支持主键自增

今天遇到一个问题,以为oracle 是支持主键自增的,结果程序调了半天就是提示无法插入记录后来同事提醒,原来是mysql才支持主键自增。public class TRawDataDescriptor implements Serializable {         @Id          @GeneratedValue(strategy=GenerationType.IDE...

2011-04-23 08:59:46 513

原创 hibernate 插入Date字段 时分秒丢失

Oracle 中如果字段类型是Date,在使用JBoss JPA也就是Hibernate插入后只有年月日,时分秒信息丢失。晕!昨天我也遇到了这个问题,在试了很多网上的方法后在CSDN的一个跟帖中找到了最佳方案,而且也成功了。————————大概做如下修改1  在pojo中 把date类型换成timestamp2 用new date()的地方改成   java.util....

2011-04-23 08:51:24 280

原创 转帖:Linux下发生段错误时如何产生core文件

Linux下发生段错误时如何产生core文件来源: http://www.linuxers.cn/2010/01/19/linux%E4%B8%8B%E5%8F%91%E7%94%9F%E6%AE%B5%E9%94%99%E8%AF%AF%E6%97%B6%E5%A6%82%E4%BD%95%E4%BA%A7%E7%94%9Fcore%E6%96%87%E4%BB%B6/L...

2010-11-04 16:28:40 84

原创 转:ORA-00845: MEMORY_TARGET not supported on this system

转帖:http://www.cnblogs.com/killkill/archive/2010/09/10/1823690.html      今天晚上新装一台Oracle 11g的数据库,打算将SGA设大一点,知道 11g 中有一个新特新 MEMORY_TARGET,于是尝一下鲜,谁知报了个 ORA-00845,报错比较容易迷惑人,不借助Google真得想半天:0...

2010-10-28 17:47:39 88

原创 bods one issue

(12.2) 09-20-10 16:11:32 (E) (18251:2795181936) CON-120404: Initialization                                                            OCI call <OCISessionBegin> for connection <SLAMETL> fa...

2010-09-20 21:18:27 100

urllib2.URLError: <urlopen error [Errno 10060] >

&gt;&gt;&gt; fd = urllib2.urlopen('http://www.weather.com.cn/weather/101020100.shtml')Traceback (most recent call last):  File "&lt;stdin&gt;", line 1, in &lt;module&gt;  File "C:\Python27\lib\urllib2...

2010-09-08 19:29:06 334

my python 第一帖 访问oracle数据库

学习python第一帖项目中需要自动往oracle中插入随机数据,原来是用procedure弄得,但在toad中一个procedure执行需要占用整个窗口,有多个procedure,需要多个窗口。 所以想用脚本语言来替代,选择了python。纪念之! #!/usr/bin/env python##import cx_Oracle;import sys;import time,datet...

2010-09-03 20:45:10 83

原创 tnsnames.ora 需要注意的一点TNS-03505: 无法解析名称

SLAMPERF =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = ccmeph13.chn.hp.com)(PORT = 1531))    )    (CONNECT_DATA =      (SID = SLAMPERF)    )  )    SLAMPERF =  (DES...

2010-08-02 13:36:26 539

原创 The operating system 'Windows Vista Version 6.1' is not supported

今天需要在Windows Server 2008 R2 Enterprise上装oracle client, 发现需要下载Oracle Database 11g Release 2 (11.2.0.1.0) client版:win64_11gR2_client.zip.报错如下:OUI-18001: The operating system 'Windows Vista Version 6...

2010-07-22 17:32:47 342

Maven权威指南中文版.pdf

Maven权威指南中文版.pdf 介绍了Maven的背景,安装,使用等等。。。。

2009-11-11

开源ldap-opends

另一个开源ldap, 希望大家喜欢, 除了openldap外的另一选择

2009-04-10

惠普大中华区总裁孙振耀退休十五天后九大感言

惠普大中华区总裁孙振耀退休十五天后九大感言.doc

2008-10-22

oralce 10g 2 day dba.pdf

oralce 10g 2 day dba.pdf

2008-10-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除