2013年7月18日
摘要: 代码主要是为了说清楚boundaryvoid UploadFile(LPTSTR lpFilePath){ HINTERNET hSession=0; HINTERNET hConnect=0; HINTERNET hRequest=0; DWORD dwNumberOfBytesWritten=0; DWORD dwBytesSend=0; INTERNET_BUFFERS BufferIn; DWORD dwFlag; LPCTSTR boundary=TEXT("-----------------------------67... 阅读全文
posted @ 2013-07-18 11:19 回头多少个秋 阅读(7423) 评论(2) 推荐(1) 编辑
  2013年7月9日
摘要: 点击Edit global .gitconfig添加[http] sslVerify = false proxy = http://127.0.0.1:8087 阅读全文
posted @ 2013-07-09 09:00 回头多少个秋 阅读(291) 评论(0) 推荐(0) 编辑
  2013年6月15日
摘要: 友元函数不是类的成员函数,本质上仍是普通函数,却能像成员函数那样访问类的私有成员.1.友元函数是定义在类外的普通函数,它不属于任何类,但需要在类的定义中加以声明,声明时只需在友元的名称前加上关键字friend2.友元函数的声明可以放在类的私有部分,也可以放在公有部分3.一个函数可以是多个类的友元函数,只需要在各个类中分别声明简单规则:1.如果函数要执行的任务只涉及一个对象,就使用成员函数2.如果要执行的任务涉及对歌对象,就使用非成员函数#include <iostream>using namespace stdclass DayOfYear{public: friend bool 阅读全文
posted @ 2013-06-15 22:19 回头多少个秋 阅读(158) 评论(0) 推荐(0) 编辑
  2013年6月6日
摘要: 想把svn仓库转换成git.通过网上查阅资料,得知应使用命令git svn clone https://xxx.googlecode.com/svn/ -s如果是本地文件,则命令是git svn clone file:///tmp/xxx-svn -s在windows下操作出现了问题:1.用TortoiseGit,URL处填写D:\Repositories\project1,出现错误:git did not exit cleanly (exit code 1)2.用Git Bash,git svn clone file:///d:\repositories\project1,出现错误Could 阅读全文
posted @ 2013-06-06 22:05 回头多少个秋 阅读(589) 评论(0) 推荐(0) 编辑
  2013年5月23日
摘要: import asyncoreimport socketimport sysclass Receiver(asyncore.dispatcher_with_send): def __init__(self,sock,remote_ip,remote_port): asyncore.dispatcher_with_send.__init__(self,sock=sock) self.buffer="" self.max_buffer_size=1024000 self.remote_ip=remote_ip se... 阅读全文
posted @ 2013-05-23 11:13 回头多少个秋 阅读(4858) 评论(0) 推荐(1) 编辑
  2013年5月21日
摘要: import sqlite3if __name__ =='__main__': db_file='d:\\data.db' conn=sqlite3.connect(db_file) cur=conn.cursor() cur.execute('SELECT * FROM table1') records=cur.fetchall() for x in records: print x[0]+' '+x[1] #有多少列就打印多少个 conn.close() 阅读全文
posted @ 2013-05-21 17:06 回头多少个秋 阅读(314) 评论(0) 推荐(0) 编辑
摘要: import osimport os.pathif __name__ =='__main__': root_dir='g:\\download' for root, dirs, files in os.walk(root_dir): for dir in dirs: print 'root=%s dir=%s' % (root,dir) #print 'root='+root+' dir='+dir for file in files: print 'roo... 阅读全文
posted @ 2013-05-21 17:01 回头多少个秋 阅读(144) 评论(0) 推荐(0) 编辑
  2013年5月2日
摘要: 问题症状:This virtual machine's policies are too old to be run by this version of VMware. Contact your system administrator.解决方法:删除.vmx文件中如下三行policy.vm.mvmtid = "52 d6 6f f9 f3 36 0f 9f-31 da 9f f5 90 7b ce 76"policy.vm.managedVMTemplate = "TRUE"policy.vm.managedVM = "FALSE& 阅读全文
posted @ 2013-05-02 15:34 回头多少个秋 阅读(735) 评论(0) 推荐(0) 编辑
  2013年4月27日
摘要: 参考资料:http://bbs.pediy.com/showthread.php?t=167693http://www.cnblogs.com/autosar/archive/2012/04/08/2437799.html/**/#include <Windows.h>#include <stdio.h>char comb_array[]={'A','B','C','D','E','F','G','H','I','J&# 阅读全文
posted @ 2013-04-27 00:20 回头多少个秋 阅读(184) 评论(0) 推荐(0) 编辑
  2013年3月22日
摘要: 最近写的一个程序,大致用到以下代码: WSADATA wsaData; WSAStartup (MAKEWORD( 2, 2 ),&wsaData); struct addrinfo *aiList=0; sockaddr_in addr; char *ip; while (TRUE) { if (0==getaddrinfo("www.qq.com",0,0,&aiList)) { addr=*(struct sockaddr_in *)aiList->ai_addr; ip=i... 阅读全文
posted @ 2013-03-22 11:14 回头多少个秋 阅读(730) 评论(0) 推荐(0) 编辑