- 博客(68)
- 收藏
- 关注
转载 try
何事长向别时圆我会天马流星拳转载于:https://www.cnblogs.com/eth0/archive/2011/08/15/2139421.html
2011-08-15 13:55:00
91
转载 *pytool_snake
# 看了一段时间了Python,看了一下Qt,花了2个多小时根据terix写了这个漏洞挺多的snake<画图,时间,event># 写的过程中发现 对界面大小方面不懂,乱筹才分成这21x21的格子...# 测试时发现对于那种处在边缘的格子 方法应该不对,先不管啦!!!# 希望每一天都有收获!!!import sysfrom PyQt4 import QtG...
2011-08-10 11:03:00
122
转载 *pytool_Edit&Clock
# -*- coding:utf-8 -*-import sipsip.setapi('QVariant', 2)from PyQt4 import QtGui,QtCoreimport sys,winsoundclass DigitalClock(QtGui.QLCDNumber): def __init__(self, parent=None): #super...
2011-08-05 09:45:00
139
转载 *pytool_MP3文件重命名
#-*- coding:utf-8 -*-import os,sys,glob,shutilpath = "D:\\Music"path_ = "F:\\Music 2012"temp = 0delete = []##os.mkdir(path)def visit(arg,dirlist,filelist): for filename in filelist: t...
2011-08-02 16:47:00
153
转载 *py_文件操作等等
Python中的文件和目录操作责任编辑:覃里作者:IT168 宇文 2009-07-28 【IT168 技术文档】摘要:对于文件和目录的处理,虽然可以通过操作系统命令来完成,但是Python语言为了便于开发人员以编程的方式处理相关工作,提供了许多处理文件和目录的内置函数。重要的是,这些函数无论是在Unix、Windows还是Macintosh平台上,它们的使用方式是完全一...
2011-08-01 14:08:00
170
转载 **pyqt_example_learn<wizard>
#-*- coding:gb2312 -*-import sysfrom PyQt4 import QtGui,QtCoredef create_page(): page = QtGui.QWizardPage() page.setTitle('introduction') page.setSubTitle('hello') label = QtGui...
2011-07-21 08:45:00
78
转载 *cute_py<os.walk,os.listdir,os.stat>
import sys,osdef get(path): allfile = {} for root,dirs,files in os.walk(path): for onefile in files: fname = os.path.join(root,onefile) fsize = os.stat(fname)...
2011-07-19 16:00:00
73
转载 **pyqt_example_learn<syntaxhighlighter>
1 from PyQt4 import QtCore, QtGui 2 3 4 class MainWindow(QtGui.QMainWindow): 5 def __init__(self, parent=None): 6 super(MainWindow, self).__init__(parent) 7 8 se...
2011-07-18 11:09:00
171
转载 **pyqt_example_learn<calendar>
from PyQt4 import QtCore, QtGuiclass MainWindow(QtGui.QMainWindow): def __init__(self): super(MainWindow,self).__init__() self.selectedDate = QtCore.QDate.currentDate()...
2011-07-17 12:34:00
107
转载 **pyqt_example_learn<dir view>
from PyQt4 import QtGuiif __name__ == '__main__': import sys app = QtGui.QApplication(sys.argv) model = QtGui.QDirModel() tree = QtGui.QTreeView() tree.setModel(model) tree.se...
2011-07-12 10:40:00
103
转载 **pyqt_example_learn<scribble>
import sipsip.setapi('QString', 2)sip.setapi('QVariant', 2)from PyQt4 import QtCore, QtGuiclass ScribbleArea(QtGui.QWidget): def __init__(self, parent=None): super(ScribbleArea, self)...
2011-07-11 10:43:00
114
转载 **pyqt_example_learn<style>
from PyQt4 import QtCore, QtGuiclass WidgetGallery(QtGui.QDialog): def __init__(self,parent=None): super(WidgetGallery,self).__init__(parent) self.palette = QtGui.QApplication....
2011-07-10 13:55:00
88
转载 **pyqt_example_learn<wiggly>
// from pyqt_examplesfrom PyQt4 import QtCore, QtGuiclass WigglyWidget(QtGui.QWidget): def __init__(self, parent=None): super(WigglyWidget, self).__init__(parent) self.setBackg...
2011-07-09 11:39:00
71
转载 **pyqt_example_learn<shapedclock>
# from pyqt_exampleimport sysfrom PyQt4 import QtGui,QtCoreclass ShapedClock(QtGui.QWidget): hourHand = QtGui.QPolygon([ QtCore.QPoint(7, 8), QtCore.QPoint(-7, 8), QtCor...
2011-07-07 14:29:00
85
转载 **pyqt_example_learn<calculate>
// calculate 1 # coding = gbk 2 import sys 3 from PyQt4 import QtCore,QtGui 4 5 class Button(QtGui.QToolButton): 6 def __init__(self,text,parent=None): 7 super(Button,se...
2011-07-07 12:06:00
98
转载 *py_描述符
##实现了__get__ and __set__ 的描述符称为数据描述符##只实现__get__的描述符称为非数据描述符## 描述符类 <定义另一个类特性可能访问方式的类>class upper_string(object): def __init__(self): self._value = '' def __get__(self,instan...
2011-07-06 21:16:00
99
转载 **pyqt_example_learn<clock>
1 import sys 2 from PyQt4 import QtGui,QtCore 3 4 class Time(QtGui.QLCDNumber): 5 def __init__(self,parent=None): 6 QtGui.QLCDNumber.__init__(self,parent) 7 #self.setFixed...
2011-07-06 14:05:00
118
转载 *pyqt_one<lcdnumber spinbox slider>
class Dialog(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) self.setFixedSize(200,200) self.spinbox = QtGui.QSpinBox() self.spinbox.setRange(0,1...
2011-07-06 13:09:00
80
转载 *苏轼_<江城子*密州出猎>
苏轼_<江城子*密州出猎> 老夫聊发少年狂,左牵黄,右擎苍。 锦帽貂裘,千骑卷平冈。 为报倾城随太守,亲射虎,看孙郎。 酒酣胸胆尚开张,鬓微霜,又何妨! 持节云中,何日遣冯唐? 会挽雕弓如满月,西北望,射天狼。------勉转载于:https://www.cnblogs.com/eth0/archive/2011/07/02/2096427...
2011-07-02 19:44:00
161
转载 *py_learn
#enconding = utf-8a = [1,2,3]b = ['a','b','c']## 并行遍历zip(a,b)for (x,y) in zip(a,b): z[x] = ydict(zip(a,b)) ## zip 构造字典map(None,a,b)## 重新运算出参数的内容,把字符串转化成对象 [pickle module]eval('a') # [1, 2, 3]##...
2011-06-29 17:14:00
70
转载 *py_sinatpy
# http://open.weibo.com/wiki/index.php/SDK# 下载sinatpy解压放到py安装目录下的Libs就好用了# -*- coding:utf-8 -*-import unittestfrom weibopy.auth import OAuthHandlerfrom weibopy.api import API## 你注册应用获取的key and...
2011-06-28 18:08:00
109
转载 *qt_one_two<QSpinBox,QSlider,QWidget,QHBoxLayout>
#include <QApplication>#include <QLabel>#include <QPushButton>#include <QSpinBox>#include <QSlider>#include <QHBoxLayout>int main(int argc,char* argv[]){ ...
2011-06-25 20:54:00
96
转载 *qt_one_one
#include <QApplication>#include <QLabel>int main(int argc,char* argv[]){ QApplication app(argc,argv); QLabel* label = new QLabel("<h2><i>xxx</i>""<font co...
2011-06-25 19:51:00
114
转载 *py_moudle<Tkinter,urllib>
#-*- coding:utf-8 -*-from Tkinter import *import urllibclass window(object): def __init__(self,root): self.rr = root self.entry = Entry(self.rr) self.entry.place(x=5,y=1...
2011-06-24 10:48:00
82
转载 *py_moudle<urllib>
import urllibdef hook(a,b,c): #回调函数 tem = 100.0 * a * b / c if tem>100: tem=100 print '%.2f%%' % temurl = "http://192.168.102.42/www/"path = "d:\\1.txt"urllib.urlretrieve(url...
2011-06-21 20:05:00
73
转载 python gui tkinter
import Tkinterroot = Tkinter.Tk()root.mainloop()显示一个tk窗口转载于:https://www.cnblogs.com/eth0/archive/2011/06/14/2080932.html
2011-06-14 20:20:00
70
转载 *位运算
1 // 判断一个数是否为2的n次幂 2 return !(a & (a-1)) 3 // 简单移位操作 4 a<<1 == a*2 5 a>>1 == a/2 6 // 异或操作<相同取反> 7 a^a==0 a^0==a 8 // 把右数第k位变成1 9 a | (1<<(k-1))10...
2011-05-30 16:15:00
79
转载 *rebuilding roads<pku 1947>
~\Desktop\1947.cpp.html 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <vector> 5 using namespace std; 6 #define ...
2011-05-28 20:01:00
109
转载 *炮兵阵地<pku 1185>
// 类似 2411 状态压缩 1 Source Code 2 3 Problem: 1185 User: eth1 4 Memory: 3452K Time: 297MS 5 Language: C++ Result: Accepted 6 Source Code 7 #include <iostream> 8 #inclu...
2011-05-23 22:11:00
211
转载 *chores<pku 1949>
// 这题坑爹啊 , 米有看清这已经是topsort() 的了, 害我浪费20多分钟写了那么长还爆内存....Source CodeProblem: 1949 User: eth1Memory: 292K Time: 1500MSLanguage: C++ Result: AcceptedSource Code#include <io...
2011-05-20 22:24:00
121
转载 *line up<pku 1118>
Source CodeProblem: 1118 User: eth1Memory: 272K Time: 297MSLanguage: C++ Result: AcceptedSource Code#include <iostream>#include <algorithm>#include <cmath>...
2011-05-20 19:33:00
90
转载 生活感悟~
就算全世界都否定我,我还相信我自己我知道自己选择的路跪着也要把它走完,不去想是否有人在乎我,我的生活很安静,自己做主挥洒任意地自我。悲伤时,狼狈的哭相也很精彩,泪干后,仰头狂笑的是那样地灿烂,失意时,默默地寻找心灵久违的归宿,高兴时,勃发全身所有的激情。永远地让自己活的很快乐。转载于:https://www.cnblogs.com/eth0/archive/2011/05/...
2011-05-20 16:23:00
117
转载 *mondriaan's dream<pku 2411>
这题真没想出来有这么复杂,当然对我们新手来说,没状态压缩的意识,对位运算不理解,害得我看别人代码都想了半天... 首先这题是一道关于状态压缩dp f(i,j) 表示 第i行 状态为j 的个数 <怎么理解状态 j 呢? 二进制思想,假设一行有m个单位需要填充,我们就可以用0 or 1 来表示每一个单位上的属性【0 代表 1x2 单位是横放的不影响下一行,1 代表 1x2 是竖放...
2011-05-19 21:16:00
88
转载 *tree cutting<pku 2378>
// 一看乱七八糟的代码就知道写得很受挫, 写得断断续续, 首先没记录自然tle,记忆搜索之后,爆空间,试着少一位,多亏数据弱, // 好心让我过了,但是怎么感觉都很错误... 1 Source Code 2 3 Problem: 2378 User: eth1 4 Memory: 40008K Time: 329MS 5 Language: C...
2011-05-19 16:24:00
110
转载 *anniversary party<pku 2342>
// 树形dp , 父子兄弟法构建树形结构 , 状态方程 t[i].vis += t[t[i].child].novis || t[i].novis += t[t[i].child].maxx() 1 Source Code 2 3 Problem: 2342 User: eth1 4 Memory: 456K Time: 94MS 5 Lang...
2011-05-19 12:27:00
134
转载 *cornfields <pku 2019>
// 二维 rmq . 1 // author : gssn 2 // date : 5.17 3 #include <iostream> 4 #include <cmath> 5 using namespace std; 6 int maxx[255][255][8],minn[255][255][8],f[255][255]; 7 int n,b,k...
2011-05-17 14:23:00
129
转载 *balanced lineup<pku 3264>
// rmq<区间最指查询> , 不过不知道为什么跑起来忒慢... 1 // author : gssn 2 #include <iostream> 3 #include <cmath> 4 using namespace std; 5 int minn[50005][16],maxx[50005][16],f[50010]; 6 int n...
2011-05-17 13:28:00
93
转载 *blue jeans<pku 3080>
// 难道这题是让我们复习string用法...Gssn 1 Source Code 2 3 Problem: 3080 User: eth1 4 Memory: 744K Time: 63MS 5 Language: G++ Result: Accepted 6 7 Source Code 8 #include <iostream> 9 #in...
2011-05-15 20:31:00
141
转载 *rock ,scissors ,paper<pku 2339>
// 话说这题太水,但是由于把j写成i,调试了半天,其实那不叫调试啦,print而已,不知道debug真让人伤心啊...Gssn 1 Source Code 2 3 Problem: 2339 User: eth1 4 Memory: 820K Time: 250MS 5 Language: G++ Result: Accepted 6 7 Source C...
2011-05-15 15:04:00
113
转载 *spell checker<pku 1035>
// 本来不想写,因为g没想到什么好方法,但是充数还是需要的... = =! 1 Source Code 2 3 Problem: 1035 User: eth1 4 Memory: 760K Time: 485MS 5 Language: C++ Result: Accepted 6 7 Source Code 8 #include <...
2011-05-15 12:31:00
118
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人