![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
代码
cs_colorfullife
这个作者很懒,什么都没留下…
展开
-
进程、线程通讯
线程通讯·: https://blog.csdn.net/a987073381/article/details/52029070?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.cont转载 2021-04-22 08:54:44 · 95 阅读 · 1 评论 -
Linux下左补0处理
int suppleZero(char *in,int len,char *out) { if(strlen(in) < len) { APPLOG("D","长度不够需左补0"); sprintf(out,"%0*d%s",len-strlen(in),0,in); } else { APPLOG("D","无需补0"); strncpy(out,in,len); ...原创 2021-04-20 09:33:18 · 923 阅读 · 0 评论 -
计算日期差
int main() { long day=0; long day1=0; long day2=0; long day3=0; long day4=0; long day5=0; day=jisuan("20190102")-jisuan("20190211"); day1=jisuan("20180820")-jisuan("20181026"); day2=jisuan("20181030")-jisuan("201811...原创 2021-04-19 16:42:47 · 145 阅读 · 0 评论 -
网联清算签名和验签
if(StringUtils.isBlank(epccGwMsg)) { log.info("请求的签约信息epccGwMsg不能为空!"); throw new Exception("请求的签约信息epccGwMsg不能为空!"); } log.info("支付宝绑卡请求参数:{}",epccGwMsg); // 对epccGwMsg进行urlDecode解码 // String urlDecode = URLDecoder.decode(epccGwMsg, "UTF-8"); // 对epccGwM.原创 2021-04-19 16:38:24 · 645 阅读 · 0 评论 -
判断系统大小端
#include <stdio.h> union { char ch; int i; }un; int main(void) { un.i = 0x12345678; if(un.ch == 0x12) { printf(“big endian\n”); } else { printf(“small endain\n”); } return 0; }原创 2020-08-18 09:17:24 · 88 阅读 · 0 评论 -
处理半个汉字
//msg :输入字符串,qs:截取的起始位置,len:截取长度,rmsg:输出 char * mivs_base_cuthz(char *msg ,int qs,int len, char *rmsg) { int i,j,k,m,n,p; static int qs1; if(len<0) { qs1=0; return msg; } if(qs<=1) qs1=0; m = qs1; p = len; j=0;k=0;n=0; if ( m > 0 && m原创 2020-08-18 09:15:13 · 169 阅读 · 0 评论 -
计算星期几
int day_of_week(int y, int m, int d) /* 0 = Sunday */ { static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; y -= m < 3; return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7; }原创 2020-08-18 09:12:30 · 131 阅读 · 0 评论