码迷,mamicode.com
首页 >  
搜索关键字:zen coding    ( 13130个结果
[Int Basics] coding & OO questions
Example 1: Write a function to reverse a string.Example Java code: public static String reverse ( String s ) { int length = s.length(), last =length ....
分类:其他好文   时间:2014-08-22 19:42:59    阅读次数:236
[zz]【整理】Python中Cookie的处理:自动处理Cookie,保存为Cookie文件,从文件载入Cookie
http://www.crifan.com/python_auto_handle_cookie_and_save_to_from_cookie_file/#!/usr/bin/python# -*- coding: utf-8 -*-"""Function: 【整理】Python中Cookie的.....
分类:编程语言   时间:2014-08-22 17:45:29    阅读次数:238
JTDS 1.2.5-dist 关于JDBC连接数据库报错:Native SSPI library not loaded. Check the java.library.path system property
今天coding的时候碰到一个异常:ERROR: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.查了下资料:大部分都是将ntlmauth.dll.....
分类:数据库   时间:2014-08-22 16:06:28    阅读次数:362
python高级编程之元类(第3部分结束)
#-*-coding:utf-8-*-#python:2.x__author__='Administrator'#元编程#new-style类带来了一种能力,通过2个特殊方法(__new__和__metaclass__)在运行时修改类和对象的定义#__new__方法#它是一上元构建程序,每次一个对象...
分类:编程语言   时间:2014-08-22 14:24:48    阅读次数:210
python高级编程之描述符与属性02
#-*-coding:utf-8-*-#python:2.x__author__='Administrator'#元描述符#特点是:使用宿主类的一个或者多个方法来执行一个任务,可能对降低使用提供步骤的类所需要的代码量很有用,比如一个链式描述符可以调用类的一系统方法以返回一组结果,它可以在失败的时候停...
分类:编程语言   时间:2014-08-22 12:53:08    阅读次数:166
python高级编程之描述符与属性03
#-*-coding:utf-8-*-#python:2.x__author__='Administrator'#属性Property#提供了一个内建描述符类型,它知道如何将一个特性链接到一组方法上,采用fget参数和3个可选的参数-fset,fdel,doc最后一个参数可以提供用来定义一个后链接到...
分类:编程语言   时间:2014-08-22 12:51:19    阅读次数:269
python高级编程之最佳实践,描述符与属性01
#-*-coding:utf-8-*-#python:2.x__author__='Administrator'#最佳实践"""为了避免前面所有的问题,必须考虑到几下几点:~1:应该避免多重继承,可以一些设计模式来代替它~2:super使用必须一致,在类层次结构中,应该在所有地方都使用super或者...
分类:编程语言   时间:2014-08-22 12:47:36    阅读次数:234
python高级编程之超类02:super的缺陷
#-*-coding:utf-8-*-#python:2.x__author__='Administrator'#当使用多重继承层次结构时,再使用super的时候是非常危险的,主要是因为类的初始化,基类不在__init__中被隐式调用#1滥用super和传统调用#来自jamesknight(http...
分类:编程语言   时间:2014-08-21 21:01:54    阅读次数:257
gedit embeded terminal 设置字体 颜色
# -*- coding: utf8 -*-# terminal.py - Embeded VTE terminal for gedit# This file is part of gedit## Copyright (C) 2005-2006 - Paolo Borelli## gedit is ...
分类:其他好文   时间:2014-08-21 20:59:14    阅读次数:255
python 分布式进程体验
抽了点时间体验了一把python分布式进程,有点像分布式计算的意思,不过我现在还没有这个需求,先把简单体验的脚本发出来,供路过的各位高手指教注:需要先下载multiprocessing的python包支持才行。管理端:cattask_manager.py#!/usr/bin/envpython#coding:utf8importrandom,tim..
分类:编程语言   时间:2014-08-21 19:38:05    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!