自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 c++格式化时间

#include <ctime> #include <iostream> void timestamp() { # define TIME_SIZE 40 static char time_buffer[TIME_SIZE]; const struct std::tm *tm_ptr; std::time_t now; now = std::time ( NULL ); tm_ptr = std::localtime ( &now ); st

2021-11-29 11:23:25 195

原创 判断一个数是否是2的整数次幂

十进制(n) 二进制(n) 二进制(n-1) 结论 2 10 01 n&(n-1) == 0 4 100 011 n&(n-1) == 0 8 1000 0111 n&(n-1) == 0 16 10000 01111 n&(n-1) == 0 反过来,判断一个数的二进制位全是1,则 n&(n+1) == 0; ...

2021-10-13 11:45:33 69

原创 Android 添加SELinux权限

文件类型:*.te,通常位于 */system/sepolicy/vendor 目录下 示例: selinux权限报错: avc: denied { read } for pid=1831 comm="servicemanager" name="current" dev="proc" ino=62432 scontext=u:r:servicemanager:s0 tcontext=u:r:networkserver:s0 tclass=file permissive=1 解析: scontex: 源对

2021-09-29 10:19:59 191

原创 组播实现示例:udp demo

组播示例:udp demo@TOC 代码如下(示例): #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <netdb.h> #include <errno.h> #include<

2021-09-23 16:52:09 454

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除