码迷,mamicode.com
首页 >  
搜索关键字:coding    ( 12955个结果
Django学习系列之ModelForm
前面两篇写了有关Form与Form的验证,今天我们来写些ModelForm,因为现在的web开发都基与db驱动的,所以models.py的定义是少不掉的,但我们会发现它的定义与forms.py定义很接近,为此减少输入,我们可以使用modelForm这个模块,可减少代码输入。先定义models.py#coding:utf-8fro..
分类:其他好文   时间:2015-05-24 10:15:35    阅读次数:151
Own (and Refactor) the Build
Own (and Refactor) the BuildSteve BerczukiT iS NOT UNCOMMON for teams that are otherwise highly disciplined about coding practices to neglect build scripts, either out of a belief that they are merely...
分类:其他好文   时间:2015-05-24 10:13:02    阅读次数:126
Python中判断是否为闰年,求输入日期是该年第几天
#coding = utf-8def getLastDay(): y = int(input("Please input year :")) m = int(input("please input month :")) d = int(input("Please input day...
分类:编程语言   时间:2015-05-23 19:58:59    阅读次数:152
scapy - dns sniffer
How to parse dns request and response ? Scapy is a powerful tool, and it can help us for dns detail.#!/usr/bin/env python # -*- coding: utf8 -*-""" execte demo py with root privilege, and finish double...
分类:其他好文   时间:2015-05-23 13:00:37    阅读次数:330
OC --(8)-- 属性、点语法、KVC
一、属性1.什么是属性属性是 Objective - c 2.0 定义的语法,为实例变量提供了 setter、getter 方法的默认实现能够在一定程度上简化程序,并且增强实例变量的访问安全性.2.属性的定义三、KVCKVC(Key-Value-Coding),键值编码,是一种间接访问实例变量的方法...
分类:其他好文   时间:2015-05-22 21:10:29    阅读次数:101
pad时间同步
#!/usr/bin/python #!_*_coding:utf-8_*_ importos #importdatetime importtime #获取文件在系统的时间戳 SysTime=int(os.popen("stat-t/home/ftp/sync.log|awk‘{print$12}‘").read()) #读取文件内记录的时间戳 WinTime=int(open(‘/home/ftp/sync.log‘,‘r‘).read()) ifSysTime..
分类:其他好文   时间:2015-05-22 19:21:14    阅读次数:224
Loadrunner定时执行脚本
# -*- coding: utf-8 -*-import timeimport os#格式为小时,分钟,脚本名称(包括盘符,最好是放在根目录下)#需要把LoadRunner安装路径的Bin加入系统参数Path下run_time = [[16,30,'scenario1'],[17,30,'scen...
分类:其他好文   时间:2015-05-22 18:27:32    阅读次数:155
经常被问到累加器?还在用循环解决?
#!/usr/bin/env python # -*- coding: utf-8 -*- ###  # @function fn_sigma(∑)  # @brief 等差数列求和公式  # @see http://baike.baidu.com/link?url=m9jRLvZLJdl9_41rx0_0VMzshMRLjiH0B-SANBATlvoaJYLYRUJMLS-paa5...
分类:其他好文   时间:2015-05-22 17:08:05    阅读次数:124
abap如何查找SAP示例程序
SAP提供了大量示例程序,可供ABAPER学习,可以直接COPY过来用,对提升Coding质量及编程能力很有帮助,下面是几种查找方法: 1、tcode:SE38 输入'DEMO*'后按F4,可以查到SAP所有的DEMO示例程序,能学到很多ABAP功能的实现方法。 2、tcode:"ABAPDOCU",可以找到很多ABAP DOCUMENT及示例程序。 3、tcode:se38 输入'BCALV*'后按F4,可以查到很多ALV示例程序。...
分类:其他好文   时间:2015-05-22 11:40:19    阅读次数:171
破解栅栏密码python脚本
今天遇到一个要破解的栅栏密码,写了个通用的脚本 1 #!/usr/bin/env python 2 # -*- coding: gbk -*- 3 # -*- coding: utf_8 -*- 4 # Author: 蔚蓝行 5 # http://www.cnblogs.com/duanv 6 e...
分类:编程语言   时间:2015-05-22 00:14:53    阅读次数:3829
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!