shensunbo Blog

「离开世界之前 一切都是过程」

json.hpp

人赞过

memcpy优化失败

尝试了多种方式,仍然无法明显优化memcpy的拷贝速度,memcpy应该是已经高度优化过的了 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 ...
人赞过

修改gerrit的review意见

直接在网页上修改 使用git修改 git fetch origin [git checkout <change-id>] git add . git commit --amend git push origin HEAD:refs/for/branch
人赞过

LINUX 调试栈

info proc mappings 打印内存映射信息 ``` (gdb) info proc mappings process 104188 Mapped address spaces: 1 2 3 4 5 Start Addr End Addr Size Offset objfile 0x400000 ...
人赞过

使用 Unix Domain Sockets 在不同进程间传递文件句柄

introduce Note: 句柄通过 msg_control 消息来发送,但是 msg_iov 仍然需要正确填充,不然会报错,可以随便填充一个字符 发送一个描述符会使描述符的引用计数加1,意味着即使在接收进程调用recvmsg之前,发送进程关闭了该描述符,对于接收进程他任然保持打开状态 在接收进程中会创建一个新的描述符,所以发送进程和接收进程的描述符是不相等的...
人赞过

bgfx

人赞过

blender脚本,

选中大于10000个三角形的对象 1 2 3 4 5 6 7 8 9 10 11 import bpy bpy.ops.object.select_all(action='DESELECT') for obj in bpy.data.objects: if obj.type == 'MESH': tri_count = len(obj.data.polygons)...
人赞过

编程

纯方法类接口都声明为静态的
人赞过

C++ 常用操作

使用signal机制, 来捕获CTRL + C, 以使while(1)类的循环正常终止,正常情况下使用ctrl + c杀死程序,并不会调用析构函数,对有些库和框架可能会出问题 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include <csignal> #include <iostream> ...
人赞过

english practice 2

Weekend Plans: What do you like to do on weekends? Favorite TV Shows: What TV shows do you enjoy watching? Social Media: How do you use social media? Holidays: What’s your favorite holiday...
人赞过