自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

一步一步

没有热忱,世间便无进步。

  • 博客(18)
  • 资源 (3)
  • 收藏
  • 关注

原创 python线程

import threadingimport timeimport random#生产者class Producer(threading.Thread): def __init__(self, threadName, shareObject): threading.Thread.__init__(self, name = threadName)

2010-03-26 16:11:00 915

原创 python学习3-使用dict

#构造d = dict(one = 33, two = 44)print(d)d0 = dict({one : 55, two : 66})print(d0)d1 = dict(zip((one, two), (77, 88)))print(d1)d2 = dict([(one, 3), (two, 4)])print(d2)d3 = {

2010-03-20 15:23:00 2361

原创 python学习2-使用list

# 0 1 2 3 4 5 6# -7 -6 -5 -4 -3 -2 -1a = [1, 2, 3, 4, 5, 6, 7]#子list提取#起始位置:结束位置(不包括结束位置的元素)b = a[1:4]print(b)#默认是最后一个元素的下一位(好比C++的迭代器)c = a[1:]print(c)d = a[1:-1]prin

2010-03-19 10:04:00 702

原创 python学习1-使用类

#使用类class CPerson: #类变量好比C++中的静态成员变量 population = 0 def SayHi(self): print(Hello World) def HowMany(self): if CPerson.population == 1: prin

2010-03-18 11:32:00 1019

原创 单例模式的一种实现方法

class CSingleton{private: /* 禁掉构造函数 拷贝构造函数 */ CSingleton(void); CSingleton(const CSingleton& oth);public: static CSingleton& Instance(void) { static CSingleton s_singleton; retur

2010-03-16 21:18:00 1377

原创 python算法实践7-归并排序

def MergeSort(mylist, low, mid, high): i = low j = mid + 1 tmp = [] while i <= mid and j <= high: if mylist[i] <= mylist[j]: tmp.append(mylist[i])

2010-03-16 17:09:00 1145 2

原创 python算法实践6-堆排序

#堆排序def Heapify(mylist, start, end): left = 0 right = 0 maxv = 0 left = start * 2 right = start * 2 + 1 while left <= end: maxv = left if right <= end

2010-03-16 16:21:00 1814

原创 python算法实践5-直接选择排序

#直接选择排序def SelectSort(mylist): size = len(mylist) i = 0 for i in range(0, size): k = i for j in range(i + 1, size): if mylist[j] < mylist[k]:

2010-03-16 15:24:00 1118

原创 python算法实践4-快速排序

#快速排序def Partition(mylist, low, high): tmp = mylist[low] while low < high: while low = tmp: high = high - 1 if low < high: mylist[low] = mylist[

2010-03-16 15:03:00 1871

原创 python算法实践3-冒泡排序

#冒泡排序def BubbleSort(mylist): n = len(mylist) i = 0 j = 0 bExchange = False for i in range(1, n): bExchange = False j = n - 1 while j >= i:

2010-03-16 14:08:00 1562

原创 python算法实践2-shell排序

#shell排序def ShellPass(mylist, d): size = len(mylist) i = d while i < size: if mylist[i] < mylist[i - d]: tmp = mylist[i] j = i - d myli

2010-03-16 11:45:00 854

原创 python算法实践1-直接插入排序

# 直接插入排序def InsertSort(mylist): size = len(mylist) i = 1 for i in range(1, size): if mylist[i] < mylist[i - 1]: tmp = mylist[i] j = i - 1

2010-03-16 10:22:00 1815

原创 stack使用

// stackTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include #include using namespace std; /*     stack是一个后进先出操作元素

2010-03-09 17:12:00 1898

原创 map使用

// mapTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include using namespace std;/*template ,class Allocator = allocator > > class map;

2010-03-05 21:24:00 1211

原创 priority_queue使用

 // priority_queueTest.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include #include using namespace std;/*template class Compare = less > class p

2010-03-05 17:17:00 1017

转载 怎样学习编程

高质量自然是程序员的技术追求,也是职业道德的要求。宁可进度慢些,也要保证每个环节的质量,以图长远利益。人员管理,项目管理,可行性与需求分析,系统设计,程序设计,测试。软件开发中的三种基本策略:“复用”、“分而治之”、“优化——折衷”。进步是应该的,但不进步则是可耻的。在一个新系统中,大部分的内容是成熟的,只有小部分内容是创新的。

2010-03-05 13:35:00 903

原创 deque使用

// dequeTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include using namespace std; /*     双端队列 */ /

2010-03-04 11:04:00 1378

原创 live writer

Test

2010-03-04 08:46:00 625

C++ SMTP协议发送邮件模块(支持身份验证)

解压后,添加所有文件到工程中,并且设置include路径即可 (这个也是我参考别人的东西,整理了一下,加入身份验证)

2010-09-17

cximage600_full.zip

开源的C++图像处理类,支持十几种格式的图片互转

2008-12-25

CListCtrl数据导入到Excel VC++封装

CListCtrl数据导入到Excel VC++封装

2008-09-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除