MS Dynamics AX中对编写X++提倡的最佳实践原则还是极有借鉴实用价值。因此温习而知新并借来记之。General coding principles for Microsoft Dynamics AX.Declare variables as locally as possible.Che...
分类:
其他好文 时间:
2015-06-06 23:20:26
阅读次数:
173
1.Python内置md5模块 1 #-*- coding:utf-8 -*- 2 3 import md5 4 5 def Str2Md5(s): 6 m=md5.new() 7 m.update(s) 8 return m.hexdigest() 9 10 if __...
分类:
编程语言 时间:
2015-06-06 21:58:34
阅读次数:
150
test_python.phpsome.py#!/usr/bin/env python#-*- coding:utf-8 -*-import sysdef do_some(a): return "dosome:%s" % aif __name__ == '__main__': a = sys.a.....
分类:
编程语言 时间:
2015-06-06 20:48:30
阅读次数:
154
最近在学习Python下面给出一个用Pygame模块实现的小动画通过按下鼠标来变换两张图片 1 #coding:utf-8 2 import pygame 3 4 from sys import exit 5 flag=0 6 pygame.init() #初始化 7 8 screen=pyga.....
分类:
其他好文 时间:
2015-06-06 16:33:41
阅读次数:
122
什么是 clean code ?大神对优雅代码的定义: I like my code to be elegant and efficient. The
logic should be straightforward to make it hard
for bugs to hide, the dependencies minimal to
ease maintenance, error han...
分类:
其他好文 时间:
2015-06-06 09:12:49
阅读次数:
112
今天在学习Flask,边看官方文档一边动手运行例子,以注释的形式写了一些笔记,分享给大家。Flask官方文档,快速入门:ex1:#coding:utf-8######################## 1.URL的解析######################from flask import ...
分类:
其他好文 时间:
2015-06-06 00:14:02
阅读次数:
160
Code:#!/usr/bin/python# -*- coding: UTF-8 -*-import reimport urllibimport timedef getHtml(url): """ This function just simply get all the data ...
分类:
其他好文 时间:
2015-06-05 21:07:49
阅读次数:
177
网上的一个关于QDockWidget停靠窗体的教程代码: 1 # -*- coding: utf-8 -*- 2 from PyQt4.QtGui import * 3 from PyQt4.QtCore import * 4 import sys 5 6 QTextCode...
#!/usr/bin/python#coding=utf-8'''一、socket模块的类方法:socket.socket(family,type)——创建并返回一个新的socket对象socket.getfqdn(name)——将使用点好分割的IP地址字符串转换成一个完整的域名socket.get...
分类:
编程语言 时间:
2015-06-05 17:30:07
阅读次数:
119
QCalendarWidgetQCalendarWidget 提供基于月份的日历窗口组件,它允许用户简单并且直观的选择日期。#!/usr/bin/python# -*- coding: utf-8 -*-# calendar.pyimport sysfrom PyQt4 import QtGuifr...
分类:
其他好文 时间:
2015-06-05 17:21:47
阅读次数:
187