会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
阿汤的博客
CnBlogs
Home
New Post
Contact
Admin
Subscription
上一页
1
2
3
4
5
6
7
8
9
10
···
13
下一页
2016年11月15日
vscode 编写python如何禁止 flake8 提示 line too long
使用vscode编写python还是挺舒服的,但是如果给vscode安装了语法校验插件,例如flake8,会常常提示一些非常苛刻的语法问题,其中最让人不能忍受的就是line to long. 一行仅能容纳79个字符?显然不够用!强迫症患者对于代码中的语法错误提示是无法容忍的,所以必须要消灭它. 在命
Read More
posted @ 2016-11-15 11:30 你好阿汤哥
Views(27437)
Comments(3)
Diggs(5)
2016年11月13日
检测本地字节序 是大端存储还是小端存储
#include typedef union{ unsigned short value; unsigned char byte[2]; }CodeOrderUnion; void test_endian() { CodeOrderUnion order; order.value = 0x0102; if(order.byte[0] == 0x01 ...
Read More
posted @ 2016-11-13 19:01 你好阿汤哥
Views(635)
Comments(0)
Diggs(0)
2016年11月9日
C++ 一个统计文件夹下所有代码文件行数的小工具
效果图:
Read More
posted @ 2016-11-09 11:33 你好阿汤哥
Views(2103)
Comments(1)
Diggs(0)
C++ 扫描文件夹下所有文件
void GetFilesFromDirectory(std::vector &files, const char *directoryPath) { struct _finddata_t fileinfo; long hFile = 0; char tmpPath[MAX_PATH] = { 0 }; sprintf_s(tmpPath, "%s\\*", di...
Read More
posted @ 2016-11-09 10:07 你好阿汤哥
Views(3396)
Comments(0)
Diggs(0)
2016年11月3日
C++ 安全拼接字符串函数
void SafeStrAppend(char buf[], const uint32_t maxBufSize, uint32_t &offset, const char *format, ...) { if (offset < maxBufSize) { va_list ap; va_start(ap, format); off...
Read More
posted @ 2016-11-03 21:33 你好阿汤哥
Views(1195)
Comments(0)
Diggs(0)
2016年10月25日
几个常见Win32 API函数
1.获取客户区矩形区域 2.获取窗口上下文句柄 3.LPWSTR 与 char * 互转 4.获取带颜色的画刷 COLORREF colorObs = 0x9D9D9D; HBRUSH hbObs = CreateSolidBrush(colorObs); //.... DeleteObject(h
Read More
posted @ 2016-10-25 10:19 你好阿汤哥
Views(3976)
Comments(0)
Diggs(0)
2016年9月22日
C 数组模拟阶乘运算
#include void rdump(int arr[],int len) { int i = 0; for(i=len-1;i >= 0; --i) { printf("%d",arr[i]); } printf("\n"); } void trailingZeroes(int n) { int arr[10000] = ...
Read More
posted @ 2016-09-22 22:48 你好阿汤哥
Views(443)
Comments(0)
Diggs(0)
2016年8月28日
leetcode 2. Add Two Numbers
//Definition for singly-linked list. #include #include #include struct ListNode { int val; struct ListNode *next; }; void addNode(struct ListNode **head, struct ListNode **p, int val) { ...
Read More
posted @ 2016-08-28 13:43 你好阿汤哥
Views(180)
Comments(0)
Diggs(0)
2016年8月27日
Airline Hub
参考:http://blog.csdn.net/mobius_strip/article/details/12731459
Read More
posted @ 2016-08-27 22:00 你好阿汤哥
Views(305)
Comments(0)
Diggs(0)
2016年8月26日
C++ 自动指针 共享指针
#include #include #include class Item { public: Item(std::string str):name(str){} ~Item(){std::coutdump(); delete pi; std::auto_ptr ap1(Item::CreateItem("auto ptr")); ap1.get(...
Read More
posted @ 2016-08-26 21:15 你好阿汤哥
Views(1451)
Comments(0)
Diggs(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
13
下一页
公告