会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
opensmarty
记录我的成长吧~
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
28
29
30
31
32
33
34
35
36
···
78
下一页
2023年4月17日
【c&c++】#define用法集锦(非常全)
摘要: Definition: The #define Directive You can use the #define directive to give a meaningful name to a constant in your program. The two forms of the synt
阅读全文
posted @ 2023-04-17 09:32 opensmarty
阅读(404)
评论(0)
推荐(0)
2023年4月14日
【c&c++】strdup函数简介
摘要: strdup函数简介 收藏 用法:#include <string.h> 功能:复制字符串s 说明:返回指向被复制的字符串的指针,所需空间由malloc()分配且可以由free()释放。 举例: // strdup.c #include <syslib.h> #include <string.h>
阅读全文
posted @ 2023-04-14 10:21 opensmarty
阅读(707)
评论(0)
推荐(0)
2023年4月6日
【c&c++】#ifdef __cplusplus extern “C”的作用详解
摘要: extern "C"的主要作用就是为了能够正确实现C++代码调用其他C语言代码。加上extern "C"后,会指示编译器这部分代码按C语言的进行编译,而不是C++的。由于C++支持函数重载,因此编译器编译函数的过程中会将函数的参数类型也加到编译后的代码中,而不仅仅是函数名;而C语言并不支持函数重载,
阅读全文
posted @ 2023-04-06 09:47 opensmarty
阅读(1806)
评论(0)
推荐(0)
【c&c++】C语言 char*和char[]用法
摘要: char []定义的是一个字符数组,注意强调是数组。char * 定义的是一个字符串指针,注意强调是指针。char *s定义了一个char型的指针,它只知道所指向的内存单元,并不知道这个内存单元有多大,所以: 当char *s = “hello”;后,不能使用s[0]=‘a’;语句进行赋值。这是将提
阅读全文
posted @ 2023-04-06 09:38 opensmarty
阅读(748)
评论(0)
推荐(0)
2023年3月29日
【go】谈谈一致性哈希算法及其 Golang 实现(含负载均衡算法概述)
摘要: 教程集为您提供谈谈一致性哈希算法及其 Golang 实现(含负载均衡算法概述)等资源,欢迎您收藏本站,我们将为您提供最新的谈谈一致性哈希算法及其 Golang 实现(含负载均衡算法概述)资源 文章目录 一、概述 二、负载均衡算法 2.1 概述 2.2 轮询算法 2.3 随机算法 2.4 随机轮询算法
阅读全文
posted @ 2023-03-29 14:08 opensmarty
阅读(500)
评论(0)
推荐(1)
【音视频】RTP封装G711源代码
摘要: G711:8000HZ,8位,20ms一包数据 ,50包每秒 源代码: // g711.c // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <netdb.h> #in
阅读全文
posted @ 2023-03-29 10:48 opensmarty
阅读(399)
评论(0)
推荐(0)
2023年3月28日
【android】%1$s %1$d Android string (java & Android 格式化字符串)
摘要: 1$s // String%1$d // int //R.string.old:<string name="old">我今年%1$d岁了</string> String sAgeFormat = getResources().getString(R.string.old);String sFinal
阅读全文
posted @ 2023-03-28 09:53 opensmarty
阅读(99)
评论(0)
推荐(0)
2023年3月24日
【音视频】一文搞懂音频视频中的采样率、采样精度、码率、分辨率
摘要: 计算码率(bit rate) 音频: CD音质,一般2通道,原始音频数据1秒钟的数据量是44.1k(采样率)*16(位深度)*2(声道数)=1411.2kbits,可求得整个音频文件的大小=时长(300s)*码率(1411.2)/1024/8=51.67M。压缩成128kbps的MP3,1秒钟数据就
阅读全文
posted @ 2023-03-24 17:48 opensmarty
阅读(1210)
评论(0)
推荐(0)
【go】go多种uuid生产方式
摘要: package main import ( "fmt" "github.com/chilts/sid" "github.com/kjk/betterguid" "github.com/oklog/ulid" "github.com/rs/xid" "github.com/satori/go.uuid
阅读全文
posted @ 2023-03-24 15:18 opensmarty
阅读(223)
评论(0)
推荐(0)
【go】uuid简介
摘要: 通用唯一识别码(英语:universally unique identifier,简称uuid)是一种软件建构的标准,亦为自由软件基金会组织在分散式计算环境领域的一部份。uuid的目的,是让分散式系统中的所有元素,都能有唯一的辨识信息,而不需要通过中央控制端来做辨识信息的指定。如此一来,每个人都可以
阅读全文
posted @ 2023-03-24 14:51 opensmarty
阅读(1833)
评论(0)
推荐(0)
上一页
1
···
28
29
30
31
32
33
34
35
36
···
78
下一页
公告