会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
···
11
下一页
2019年12月17日
ubuntu 虚拟机复制后打开蓝屏解决办法
摘要: ``` sudo apt-get install xserver-xorg-lts-utopic sudo dpkg-reconfigure xserver-xorg-lts-utopic reboot ```
阅读全文
posted @ 2019-12-17 23:40 sfdevs
阅读(1013)
评论(0)
推荐(0)
2019年12月16日
Python zipfile模块学习
摘要: 转载自
阅读全文
posted @ 2019-12-16 15:11 sfdevs
阅读(512)
评论(0)
推荐(0)
2019年12月4日
boost multi_index简单了解
摘要: ``` #include #include #include #include #include #include using namespace boost; using namespace boost::multi_index; using namespace std; struct Employee{ int id; string name; int age; Employee():id(0
阅读全文
posted @ 2019-12-04 11:14 sfdevs
阅读(272)
评论(0)
推荐(0)
gcc/g++堆栈保护技术
摘要: 最近学习内存分布,通过gdb调试发现一些问题,栈空间变量地址应该是从高往低分布的,但是调试发现地址虽然是从高往低分布,但是变量地址的顺序是乱的,请教同事他说可能是gcc/g++默认启用了堆栈保护,关于堆栈保护可以查看这篇文章 默认编译 关闭堆栈保护编译
阅读全文
posted @ 2019-12-04 11:04 sfdevs
阅读(509)
评论(0)
推荐(0)
2019年11月29日
itoa、ltoa
摘要: ``` #include /*整形转字符型*/ char * itoa(int value, char *string, int radix) { char tmp[33]; char *tp = tmp; int i; unsigned v; int sign; char *sp; if (radix > 36 || radix tmp) *sp++ = *--tp; *sp = 0; retu
阅读全文
posted @ 2019-11-29 17:53 sfdevs
阅读(258)
评论(0)
推荐(0)
2019年11月24日
文件打包学习
摘要: 文件打包学习(1) 打包的定义 什么是打包?打包这个词很形象,就是把零碎的文件进行统一重封装,统一管理,比如我们常见的RAR文件,ZIP文件都是很常见的包裹格式 打包的意义 1. 比如RAR包,我们虽然能有工具解压,但是我们却基本上没有相关的SDK来做二次开发 2. ZIP包虽然有SDK来读取,但是
阅读全文
posted @ 2019-11-24 17:27 sfdevs
阅读(375)
评论(0)
推荐(0)
2019年11月12日
Linux kernel min/max宏
摘要: ```#define min(x,y) ({ \ typeof(x) _x = (x); \ typeof(y) _y = (y); \ (void) (&_x == &_y); \ _x _y ? _x : _y; })```
阅读全文
posted @ 2019-11-12 13:57 sfdevs
阅读(208)
评论(0)
推荐(0)
C语言变长数组
摘要: 根据结果可以得出的信息 1. 结构体的地址和结构体中第一个元素的地址是相同的 2. Array在结构体中“不占空间” 实现的前提: 数组必须在结构体的最后,因为malloc的是整个结构体,如果数组不在最后,申请的空间会覆盖后面元素的空间
阅读全文
posted @ 2019-11-12 13:54 sfdevs
阅读(872)
评论(0)
推荐(0)
蚂蚁爬杆问题
摘要: 思路, 为了考虑最长的时间,假设两只蚂蚁相遇后不调头,这样每只蚂蚁都是独立运动的,只要求蚂蚁到杆子端点的距离就好了
阅读全文
posted @ 2019-11-12 10:27 sfdevs
阅读(420)
评论(0)
推荐(0)
2019年11月7日
C++智能指针类型转换
摘要: ```#include #include struct Base { int a; virtual void f() const { std::cout (); std::cout f(); auto derivedPtr = std::make_shared(); std::cout f(); // 上行的转换(派生类到基类的转换) ...
阅读全文
posted @ 2019-11-07 23:44 sfdevs
阅读(3033)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
11
下一页