other
文章平均质量分 65
lucy55555
一个过了三十才刚刚学会敲代码程序员
展开
-
log实现自动增加行号
刚刚同事传授了一个 默认写日志和文件名的技巧,特此记录一下, class CLog { public: CLog(char *file,int line) :m_file(file),m_line(line) { } void operator()(char *format,...) { printf("%s(%d)",m_file,m_line); va_list vl;原创 2013-05-13 19:02:58 · 903 阅读 · 0 评论 -
Unicode字符串写入文本
Unicode文本写入到文件时候,在头部需要Unicode标志 0xfffe,才能显示文本 CTime ct = CTime::GetCurrentTime(); CString fileName = ct.Format(_T("DB_%Y_%m_%d.log")); CString tempstr = ct.Format(_T("[%H:%M:%S]")); CString strT原创 2015-10-22 14:40:33 · 1104 阅读 · 0 评论 -
python语法基础入门
import sys print 'hello' aDicTest = {'aa':6666666,'bb':7777} for item in aDicTest: print item print aDicTest[item] a = 1 if a == 1: print '111111111' else: print '22222222' arr原创 2017-07-25 21:41:01 · 278 阅读 · 0 评论 -
常用排序算法实现
以上是排序算法的时间复杂度 下面是具体实现: template void bubbleSort(T arr[],int len) { T temp; for (int i = 0; i { for (int j = 0; j { if (arr[j] > arr[j + 1]) { temp = arr[j + 1]; arr[j + 1] = arr[j]; a原创 2018-01-22 18:46:08 · 154 阅读 · 0 评论