码迷,mamicode.com
首页 >  
搜索关键字:zen coding    ( 13130个结果
文件Move操作
#coding = utf-8import osstr1 = 'd:/v3/'str2 = 'd:/v3/'fobj = open('D:/V3/txt/1.txt','rb')line = fobj.readline()while line: if(line.find('a') > 0):...
分类:其他好文   时间:2014-06-25 23:22:26    阅读次数:270
Some thoughts on a progress
I can feel that I am making great progress now.. if inspected closely, it is obvious that what I'm getting through is, a newbie phase:coding details m...
分类:其他好文   时间:2014-06-25 18:23:24    阅读次数:206
Key-Value Coding (KVC)
KVC/KVO1 KVC/KVO2 线程(GCP)
分类:其他好文   时间:2014-06-25 12:40:23    阅读次数:109
Python Monkey patch猴子补丁
monkey patch (猴子补丁) 用来在运行时动态修改已有的代码,而不需要修改原始代码。简单的monkey patch 实现:[python]#coding=utf-8def originalFunc(): print 'this is original function!'def modif...
分类:编程语言   时间:2014-06-24 22:50:22    阅读次数:463
一入python深似海--python之道
python社区不乏幽默,先来看“python之道”这首诗。 导入this包: import this 输出时一首诗,这首诗总结了Python的风格,可以指导Python程序员的编程。下面是译文: The Zen of Python, by Tim Peters Python之道 Beautiful is better than ugly. 美观胜于丑陋。 Explicit i...
分类:编程语言   时间:2014-06-24 22:40:23    阅读次数:295
Python lambda和reduce函数
看到一篇博文写lambda和reduce函数,笔者小痒了一下,用Python实现一下:   #! /usr/bin/env python # -*-coding:utf-8-*-   import time import math   def test_reduce():    start_time = time.clock()    print reduce[A1] (lam...
分类:编程语言   时间:2014-06-24 20:37:10    阅读次数:272
Reverse Integer
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus poin...
分类:其他好文   时间:2014-06-24 20:16:39    阅读次数:180
python中的堆排序peapq模块
heapq模块实现了python中的堆排序,并提供了有关方法。让用Python实现排序算法有了简单快捷的方式。 heapq的官方文档和源码:8.4.heapq-Heap queue algorithm 下面通过举例的方式说明heapq的应用方法 实现堆排序 #! /usr/bin/evn python #coding:utf-8 from heapq import * def ...
分类:编程语言   时间:2014-06-24 18:47:47    阅读次数:403
LeetCode——Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for y...
分类:其他好文   时间:2014-06-22 09:31:16    阅读次数:220
Zend_Db_Table::getDefaultAdapter is not working
在Bootstrap中使用 $url = constant ( "APPLICATION_PATH" ) . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR . 'application.ini'; $dbconfig = new Zend_Config_Ini ( $url, "mysql" ); // $db = Zen...
分类:数据库   时间:2014-06-22 07:52:08    阅读次数:205
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!