1 # -*- coding:utf-8 -*- 2 # Author: Pete Yim 3 # Date : 13-8-22 4 # Copyright (c) 2013 RCSH Systems Incorporated. All rights reserved. 5 import win.....
分类:
编程语言 时间:
2015-05-15 17:26:39
阅读次数:
3788
表白第一弹的内容发出去后,收到很多人的祝福和建议,很感谢大家的捧场,2014年经历了很多事,自己的创业路失败,重新找工作,一直忙碌,也没有再修改代码,现准备重新拾起来,把第一弹完善,然后送出表白第二弹,第三弹的设想己完成,正在coding中。
这一篇的主要内容是把完善后的第一弹的程序放出,顺便讲解一下这里的一些新的东西。
源码地址:https://github.com/wuxia200...
分类:
其他好文 时间:
2015-05-15 15:32:52
阅读次数:
164
转载请注明出处:http://blog.csdn.net/ns_code/article/details/26064213 剑指offer上的第21题,之前在Cracking the Coding interview上做过,思路參考这里,这次写了測试函数,在九度OJ上測试通过。题目描写叙述:定义栈....
分类:
其他好文 时间:
2015-05-15 15:18:46
阅读次数:
196
# -*- coding: utf-8 -*-#---------------------------------------# 程序:山东大学爬虫# 版本:0.1# 作者:why# 日期:2013-07-12# 语言:Python 2.7# 操作:输入学号和密码# 功能...
分类:
其他好文 时间:
2015-05-15 13:23:57
阅读次数:
103
Form对与一个网站来说就是一个灵魂,今天我们就来说说Django的Form概述.本文内容来自官网,互联网及自己实验所得.表单(forms.py)的定义:#coding:utf-8fromdjangoimportformsfromdjango.forms.extras.widgetsimportSelectDateWidgetSEX_CHOICES=((‘male‘,‘男‘),(‘female‘,‘女‘))B..
分类:
其他好文 时间:
2015-05-15 09:16:35
阅读次数:
175
除了一般的赋值和取值的方法,我们还可以用Key-Value-Coding(KVC)键值编码来访问你要存取的类的属性。下图来自苹果官网:如何使用KVC存取对象属性呢?看个示例1、使用KVC定义一个Student类,继承于NSObject。.h文件#import @interface Student :...
分类:
其他好文 时间:
2015-05-15 06:36:51
阅读次数:
238
#!/usr/bin/python
#coding=utf-8
importthread
fromtimeimportsleep,ctime
loops=[3,5]
#测试函数
defloop(nloop,nsec,lock):
print‘startloop‘,nloop,‘at‘,ctime()
sleep(nsec)
print‘loop‘,nloop,‘doneat‘,ctime()
lock.release()
‘‘‘
defmain()
print‘startat‘.ctime()
#lo..
分类:
编程语言 时间:
2015-05-14 20:46:23
阅读次数:
129
#!/usr/bin/env python3#file name: threadtest.py# -*- coding:utf8 -*-# -version:1.0-import threading, time, socketclass Server(): '''接收消息的服务器类''' def _...
分类:
编程语言 时间:
2015-05-14 13:54:30
阅读次数:
199
# -*- coding: utf-8 -*-import osimport rep = os.popen('ping 120.26.77.101')out = p.read()regex = re.compile("\xd7\xee\xb6\xcc = (\d+)ms\xa3\xac\xd7\xe...
分类:
其他好文 时间:
2015-05-14 11:35:18
阅读次数:
206
Reverse digits of an integer.Example1: x = 123, return 321
Example2: x = -123, return -321 click to show spoilers.Have you thought about this?
Here are some good questions to ask before coding. Bonu...
分类:
其他好文 时间:
2015-05-13 21:49:54
阅读次数:
235