街角_祝福

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

08 2012 档案

VS2010中MFC连接Sql Server 2012方法
摘要://初始化数据库连接::CoInitialize(NULL);连接数据库BOOL CLogin::ConnectDB(void){ HRESULT hr = NULL; try { hr = m_pConnection.CreateInstance("ADODB.Connection");///... 阅读全文

posted @ 2012-08-26 23:09 街角_祝福 阅读(766) 评论(5) 推荐(0) 编辑

查看QQ是否在线
摘要:源码:import os,time,datetime,stringimport urllib2def chk_qq(qqnum): chkurl = 'http://wpa.qq.com/pa?p=1:'+`qqnum`+':1' #print(chkurl) a = urllib... 阅读全文

posted @ 2012-08-24 09:28 街角_祝福 阅读(220) 评论(0) 推荐(0) 编辑

project euler--10
摘要:Question:The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.Code:import mathdef IsPrime(n): if n... 阅读全文

posted @ 2012-08-16 00:13 街角_祝福 阅读(108) 评论(0) 推荐(0) 编辑

windows文件隐藏方法
摘要:翻译+整理: By Bigworm 不当之处请指正这篇文章是根据H. Carvey的The Dark Side of NTFS (Microsoft’s Scarlet Letter)翻译的,可以自由转载,但请保持译者和来源以及文章的完整性. 简介:微软的平台不断在增加.公司用的服务器和桌面操作系... 阅读全文

posted @ 2012-08-15 22:35 街角_祝福 阅读(339) 评论(0) 推荐(0) 编辑

Problem 8--找连续的五个数的最大乘积
摘要:Question:import refrom operator import mula = '7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858... 阅读全文

posted @ 2012-08-15 16:50 街角_祝福 阅读(207) 评论(0) 推荐(0) 编辑

Fibonacci sequence
摘要:#################################################################################Question: ... 阅读全文

posted @ 2012-08-14 15:50 街角_祝福 阅读(148) 评论(0) 推荐(0) 编辑

pythonchallenge--10
摘要:a = '1'for i in xrange(30): pos = 0 tmp = '' str_len = len(a) while pos < str_len: count = 1 while pos+1<str_len and a[pos] ... 阅读全文

posted @ 2012-08-13 10:21 街角_祝福 阅读(139) 评论(0) 推荐(0) 编辑

pythonchallenge--9
摘要:题目链接:http://www.pythonchallenge.com/pc/return/good.htmlimport Image,ImageDrawim = Image.new('RGB', (500,500))draw = ImageDraw.Draw(im)first=[146,399,1... 阅读全文

posted @ 2012-08-13 09:56 街角_祝福 阅读(130) 评论(0) 推荐(0) 编辑

pythonchallenge--8
摘要:题目:http://www.pythonchallenge.com/pc/def/integrity.html点击蜜蜂发现可以分登录,而网页源码中恰好有两行,像是加密了的用户名和密码,又发现字符串的前缀是bz2的,所以用bz2解压试试,结果不小心就出来了。import bz2un = 'BZh91A... 阅读全文

posted @ 2012-08-13 09:39 街角_祝福 阅读(153) 评论(0) 推荐(0) 编辑

pythonchallenge--7
摘要:import Imageim = Image.open('oxygen.png')print ('image information:',im.format,im.size,im.mode)y_begin = 0while True: p = im.getpixel((0,y_begin)) i... 阅读全文

posted @ 2012-08-13 08:56 街角_祝福 阅读(149) 评论(0) 推荐(0) 编辑

pythonchallenge--5
摘要:题目:http://www.pythonchallenge.com/pc/def/peak.html看到这个题目,标题"peak hell",下面写着"pronounce it",而且网页源码提示说这个“是不是很熟悉?”,我就在着急这个标题能读出个啥东西出来,由于python学的时间短,英语也不是很... 阅读全文

posted @ 2012-08-12 20:57 街角_祝福 阅读(126) 评论(0) 推荐(0) 编辑

pythonchallenge--4
摘要:先贴代码吧。from urllib import *import reimport ossrc = urlopen(r'http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345')nexturl = Noneurl = r'... 阅读全文

posted @ 2012-08-12 15:36 街角_祝福 阅读(137) 评论(0) 推荐(0) 编辑

pythonchallenge--3
摘要:题:http://www.pythonchallenge.com/pc/def/equality.html好吧,看完题目我只知道一个小写字母和两边的大保镖,然后就不知道该怎么下去了,我表示我还不习惯做这种题目。后来,看了别人的解释,才知道要从网页的源文件读取,坑爹坑到家了,我根本就没没往这方面想。然... 阅读全文

posted @ 2012-08-12 13:12 街角_祝福 阅读(201) 评论(0) 推荐(0) 编辑

pythonchallenge--2
摘要:代码:from urllib import *src = urlopen(r'http://www.pythonchallenge.com/pc/def/ocr.html')for i in range(37): #排除前面没用的37行 text.readline()a = []str1 = ... 阅读全文

posted @ 2012-08-12 01:10 街角_祝福 阅读(160) 评论(0) 推荐(0) 编辑

pythonchallenge--1
摘要:先贴代码:import stringstr = r"g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq ... 阅读全文

posted @ 2012-08-12 00:12 街角_祝福 阅读(148) 评论(0) 推荐(0) 编辑

pythonchallenge--0
摘要:先贴代码吧!#!/usr/bin/env pythonimport ospreurl = r'http://www.pythonchallenge.com/pc/def/0.html'page = 2**38newurl = preurl.replace('0',str(page))os.start... 阅读全文

posted @ 2012-08-11 23:46 街角_祝福 阅读(125) 评论(0) 推荐(0) 编辑

递归排序
摘要:import randomdef qsort(L): if len(L)L[0]]))li = []for i in range(20): li.append(random.randrange(10,100))print(li)print(sorted(li))print(qsort(l... 阅读全文

posted @ 2012-08-10 14:26 街角_祝福 阅读(124) 评论(0) 推荐(0) 编辑

wxPython的简单使用
摘要:+看书。import wxdef load(event): file = open(filename.GetValue()) contents.SetValue(file.read()) file.close() def save(event): file = open... 阅读全文

posted @ 2012-08-10 09:24 街角_祝福 阅读(309) 评论(0) 推荐(0) 编辑

获取句柄的方法总结(尤其是对于dll而言)
摘要:/*************************************************************测试获取文件所在的模块的方法,其中GetModuleHandle是获取exe的*句柄,而后两者还可以用来获取dll模块的句柄*By IT05*2012-8-6 16:24:27... 阅读全文

posted @ 2012-08-06 16:21 街角_祝福 阅读(465) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示