UUID生成库libuuid和crossguid
libuuid是一个开源的用于生成UUID(Universally Unique Identifier,通用唯一标识符)的库。
可从https://sourceforge.net/projects/libuuid/ 下载,最新版本为1.0.3,更新于2013年4月27日,此库仅支持在类Linux下编译使用。
之前在Windows上,我们产生guid(uuid在Windows上的叫法,是一个东西)可以使用API函数CoCreateGuid。
CrossGuid是一个最小的跨平台C ++ GUID库。它在给定平台上使用最好的本机GUID / UUID生成器,并具有用于解析,字符串化和比较ID的通用类。
可从https://github.com/graeme-hill/crossguid下载使用
接下来,我们在linux ubuntu上编译学习以下这两个库:
- libuuid
libuuid已经为我们提供了configure,直接./configure & make & make install三部曲即可,最终编译生成libuuid.a供程序链接使用,自带的一个C测试例子test_uuid.c,全部的终端执行如下:
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
michael@ubuntu:~/git$ cd ./libuuid-/
michael@ubuntu:~/git/libuuid-.3$ ls aclocal.m4 config.h.in depcomp Makefile.in test_uuid.c uuidP.h all-io.h config.sub gen_uuid.c missing unpack.c uuid_time.c c.h configure install-sh pack.c unparse.c clear.c configure.ac isnull.c parse.c uuidd.h compare.c copy.c ltmain.sh randutils.c uuid.h config.guess COPYING Makefile.am randutils.h uuid.pc.in michael@ubuntu:~/git/libuuid-.3$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking for library containing socket... none required checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking whether _SC_HOST_NAME_MAX is declared... yes checking for int32_t... yes checking for mode_t... yes checking for size_t... yes checking for ssize_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for uint8_t... yes checking for ftruncate... yes checking for gettimeofday... yes checking for memset... yes checking for socket... yes checking for strtoul... yes checking for usleep... yes checking for srandom... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating uuid.pc config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands michael@ubuntu:~/git/libuuid-.3$ make make all-am make[]: Entering directory '/home/michael/git/libuuid-1.0.3' /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-clear.lo -MD -MP -MF .deps/libuuid_la-clear.Tpo -c -o libuuid_la-clear.lo `test -f 'clear.c' || echo './'`clear.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-clear.lo -MD -MP -MF .deps/libuuid_la-clear.Tpo -c clear.c -fPIC -DPIC -o .libs/libuuid_la-clear.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-clear.lo -MD -MP -MF .deps/libuuid_la-clear.Tpo -c clear.c -o libuuid_la-clear.o >/dev/null mv -f .deps/libuuid_la-clear.Tpo .deps/libuuid_la-clear.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-compare.lo -MD -MP -MF .deps/libuuid_la-compare.Tpo -c -o libuuid_la-compare.lo `test -f 'compare.c' || echo './'`compare.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-compare.lo -MD -MP -MF .deps/libuuid_la-compare.Tpo -c compare.c -fPIC -DPIC -o .libs/libuuid_la-compare.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-compare.lo -MD -MP -MF .deps/libuuid_la-compare.Tpo -c compare.c -o libuuid_la-compare.o >/dev/null mv -f .deps/libuuid_la-compare.Tpo .deps/libuuid_la-compare.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-copy.lo -MD -MP -MF .deps/libuuid_la-copy.Tpo -c -o libuuid_la-copy.lo `test -f 'copy.c' || echo './'`copy.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-copy.lo -MD -MP -MF .deps/libuuid_la-copy.Tpo -c copy.c -fPIC -DPIC -o .libs/libuuid_la-copy.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-copy.lo -MD -MP -MF .deps/libuuid_la-copy.Tpo -c copy.c -o libuuid_la-copy.o >/dev/null mv -f .deps/libuuid_la-copy.Tpo .deps/libuuid_la-copy.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-gen_uuid.lo -MD -MP -MF .deps/libuuid_la-gen_uuid.Tpo -c -o libuuid_la-gen_uuid.lo `test -f 'gen_uuid.c' || echo './'`gen_uuid.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-gen_uuid.lo -MD -MP -MF .deps/libuuid_la-gen_uuid.Tpo -c gen_uuid.c -fPIC -DPIC -o .libs/libuuid_la-gen_uuid.o In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:, from /usr/include/stdio.h:, from gen_uuid.c:: /usr/include/features.h:: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" ^~~~~~~ gen_uuid.c: In function 'get_clock': gen_uuid.c:: warning: implicit declaration of function 'flock'; did you mean 'clock'? [-Wimplicit-function-declaration] ) { ^~~~~ clock libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-gen_uuid.lo -MD -MP -MF .deps/libuuid_la-gen_uuid.Tpo -c gen_uuid.c -o libuuid_la-gen_uuid.o >/dev/null mv -f .deps/libuuid_la-gen_uuid.Tpo .deps/libuuid_la-gen_uuid.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-isnull.lo -MD -MP -MF .deps/libuuid_la-isnull.Tpo -c -o libuuid_la-isnull.lo `test -f 'isnull.c' || echo './'`isnull.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-isnull.lo -MD -MP -MF .deps/libuuid_la-isnull.Tpo -c isnull.c -fPIC -DPIC -o .libs/libuuid_la-isnull.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-isnull.lo -MD -MP -MF .deps/libuuid_la-isnull.Tpo -c isnull.c -o libuuid_la-isnull.o >/dev/null mv -f .deps/libuuid_la-isnull.Tpo .deps/libuuid_la-isnull.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-pack.lo -MD -MP -MF .deps/libuuid_la-pack.Tpo -c -o libuuid_la-pack.lo `test -f 'pack.c' || echo './'`pack.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-pack.lo -MD -MP -MF .deps/libuuid_la-pack.Tpo -c pack.c -fPIC -DPIC -o .libs/libuuid_la-pack.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la- mv -f .deps/libuuid_la-pack.Tpo .deps/libuuid_la-pack.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-parse.lo -MD -MP -MF .deps/libuuid_la-parse.Tpo -c -o libuuid_la-parse.lo `test -f 'parse.c' || echo './'`parse.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-parse.lo -MD -MP -MF .deps/libuuid_la-parse.Tpo -c parse.c -fPIC -DPIC -o .libs/libuuid_la-parse.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-parse.lo -MD -MP -MF .deps/libuuid_la-parse.Tpo -c parse.c -o libuuid_la-parse.o >/dev/null mv -f .deps/libuuid_la-parse.Tpo .deps/libuuid_la-parse.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-unpack.lo -MD -MP -MF .deps/libuuid_la-unpack.Tpo -c -o libuuid_la-unpack.lo `test -f 'unpack.c' || echo './'`unpack.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-unpack.lo -MD -MP -MF .deps/libuuid_la-unpack.Tpo -c unpack.c -fPIC -DPIC -o .libs/libuuid_la-unpack.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la- mv -f .deps/libuuid_la-unpack.Tpo .deps/libuuid_la-unpack.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-unparse.lo -MD -MP -MF .deps/libuuid_la-unparse.Tpo -c -o libuuid_la-unparse.lo `test -f 'unparse.c' || echo './'`unparse.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-unparse.lo -MD -MP -MF .deps/libuuid_la-unparse.Tpo -c unparse.c -fPIC -DPIC -o .libs/libuuid_la-unparse.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-unparse.lo -MD -MP -MF .deps/libuuid_la-unparse.Tpo -c unparse.c -o libuuid_la-unparse.o >/dev/null mv -f .deps/libuuid_la-unparse.Tpo .deps/libuuid_la-unparse.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-uuid_time.lo -MD -MP -MF .deps/libuuid_la-uuid_time.Tpo -c -o libuuid_la-uuid_time.lo `test -f 'uuid_time.c' || echo './'`uuid_time.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-uuid_time.lo -MD -MP -MF .deps/libuuid_la-uuid_time.Tpo -c uuid_time.c -fPIC -DPIC -o .libs/libuuid_la-uuid_time.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-uuid_time.lo -MD -MP -MF .deps/libuuid_la-uuid_time.Tpo -c uuid_time.c -o libuuid_la-uuid_time.o >/dev/null mv -f .deps/libuuid_la-uuid_time.Tpo .deps/libuuid_la-uuid_time.Plo /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-randutils.lo -MD -MP -MF .deps/libuuid_la-randutils.Tpo -c -o libuuid_la-randutils.lo `test -f 'randutils.c' || echo './'`randutils.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-randutils.lo -MD -MP -MF .deps/libuuid_la-randutils.Tpo -c randutils.c -fPIC -DPIC -o .libs/libuuid_la-randutils.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT libuuid_la-randutils.lo -MD -MP -MF .deps/libuuid_la-randutils.Tpo -c randutils.c -o libuuid_la-randutils.o >/dev/null mv -f .deps/libuuid_la-randutils.Tpo .deps/libuuid_la-randutils.Plo /bin/bash ./libtool --tag=CC --mode= -o libuuid.la -rpath /usr/local/lib libuuid_la-clear.lo libuuid_la-compare.lo libuuid_la-copy.lo libuuid_la-gen_uuid.lo libuuid_la-isnull.lo libuuid_la-pack.lo libuuid_la-parse.lo libuuid_la-unpack.lo libuuid_la-unparse.lo libuuid_la-uuid_time.lo libuuid_la-randutils.lo libtool: libtool: link: (cd ".libs" && rm -f "libuuid.so.1" && ln -s "libuuid.so.1.0.0" "libuuid.so.1") libtool: link: (cd ".libs" && rm -f "libuuid.so" && ln -s "libuuid.so.1.0.0" "libuuid.so") libtool: link: ar cru .libs/libuuid.a libuuid_la-clear.o libuuid_la-compare.o libuuid_la-copy.o libuuid_la-gen_uuid.o libuuid_la-isnull.o libuuid_la-pack.o libuuid_la-parse.o libuuid_la-unpack.o libuuid_la-unparse.o libuuid_la-uuid_time.o libuuid_la-randutils.o ar: `u' modifier ignored since `D' is the default (see `U') libtool: link: ranlib .libs/libuuid.a libtool: link: ( cd ".libs" && rm -f "libuuid.la" && ln -s "../libuuid.la" "libuuid.la" ) make[]: Leaving directory '/home/michael/git/libuuid-1.0.3' michael@ubuntu:~/git/libuuid-.3$ make install make[]: Entering directory '/home/michael/git/libuuid-1.0.3' /bin/mkdir -p '/usr/local/lib' /bin/bash ./libtool --mode=install /usr/bin/install -c libuuid.la '/usr/local/lib' libtool: install: /usr/bin/install -c .libs/libuuid.so. /usr/bin/install: cannot create regular file '/usr/local/lib/libuuid.so.1.0.0': Permission denied make[ make[]: Leaving directory '/home/michael/git/libuuid-1.0.3' make: *** [Makefile: michael@ubuntu:~/git/libuuid-.3$ sudo make install [sudo] password for michael: make[]: Entering directory '/home/michael/git/libuuid-1.0.3' /bin/mkdir -p '/usr/local/lib' /bin/bash ./libtool --mode=install /usr/bin/install -c libuuid.la '/usr/local/lib' libtool: install: /usr/bin/install -c .libs/libuuid.so. libtool: install: (cd /usr/; }; }) libtool: install: (cd /usr/ libuuid.so; }; }) libtool: install: /usr/bin/install -c .libs/libuuid.lai /usr/local/lib/libuuid.la libtool: install: /usr/bin/install -c .libs/libuuid.a /usr/local/lib/libuuid.a libtool: install: /usr/local/lib/libuuid.a libtool: install: ranlib /usr/local/lib/libuuid.a libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/lib If you ever happen to want to link against installed libraries See any operating system documentation about shared libraries for UUID random string = dacba404--47c3-b8de-f451f843b849 UUID string = 6c7dffbe-d07d-11e9-9d41-000c2977e04e UUID parse and compare succeeded. |
- crossguid
crossguid则为我们提供了CMakeLists.txt,方便我们使用cmake的方式来构建,构建成功后会生成一个libcrossguid.a
静态库和测试程序 crossguid-test
,全部的终端执行如下:
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 54 55 56 57 58 59 60 61 62 |
michael@ubuntu:~$ cd ./git/crossguid-master/
michael@ubuntu:~/git/crossguid-master$ ls android cmake crossguid.pc.in LICENSE src android.sh CMakeLists.txt include README.md test michael@ubuntu:~/git/crossguid-master$ mkdir build michael@ubuntu:~/git/crossguid-master$ cd ./build/ michael@ubuntu:~/git/crossguid-master/build$ cmake --version cmake version CMake suite maintained and supported by Kitware (kitware.com/cmake). make: *** [Makefile: |
具体函数使用请参考官方文档,本文到此为止。
UUID生成库libuuid和crossguid的更多相关文章
- UUID 生成(源代码编译)
根据定义,UUID(Universally Unique IDentifier,也称GUID)在时间和空间都是唯一的.为保证空间的唯一性,每个UUID使用了一个48位的值来记录,一般是计算机的网卡地址 ...
- 一个UUID生成算法的C语言实现 --- WIN32版本 .
一个UUID生成算法的C语言实现——WIN32版本 cheungmine 2007-9-16 根据定义,UUID(Universally Unique IDentifier,也称GUID)在时 ...
- js页码生成库,一个适合前后端分离的页码生成器
原文:js页码生成库,一个适合前后端分离的页码生成器 前言 上星期写的任务里面有需要进行分页的处理,git搜索了一番,没有觉得合适的,于是自己临时写了个分页的算法. 然后等闲下来的时候,决定把分页进行 ...
- [C#] BarcodeLib -- 一个精简而不失优雅的条形码生成库
BarcodeLib -- 一个精简而不失优雅的条形码生成库 引言 在百度进行“C# 条形码”等类似关键字搜索的时候,基本上是使用 ZXing 类库进行条形码的生成.今天我所介绍的是另一款类库 Bar ...
- java自带uuid生成
java自带uuid生成UUID.randomUUID().toString()
- 二维码js生成库
jr-qrcode 把字符串生成二维码,并以Base64 URL形式输出. 支持白色二维码,即反色二维码. 兼容性 插件使用了H5的canvas特性进行二维码绘制,最后输出base64 url,因此本 ...
- 一个UUID生成算法的C语言实现——WIN32版本
源: 一个UUID生成算法的C语言实现——WIN32版本
- BarcodeLib -- 一个精简而不失优雅的条形码生成库
BarcodeLib -- 一个精简而不失优雅的条形码生成库 引言 在百度进行“C# 条形码”等类似关键字搜索的时候,基本上是使用 ZXing 类库进行条形码的生成.今天我所介绍的是另一款类库 Bar ...
- UUID 生成32位随机串
java通过jdk自带的UUID,生成32位的随机串 private static String generate_UUID() { UUID uuid=UUID.randomUUID(); Stri ...
随机推荐
- 201871010133-赵永军《面向对象程序设计(java)》第十二周学习总结
201871010133-赵永军<面向对象程序设计(java)>第十二周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ ...
- 常用开窗函数总结(hive、sparkSQL可执行)
一:根据某个字段排序 测试数据: SQL> select * from sscore; NAME SCORE ---------- ----- aa 99 bb ...
- django的几个常见命令、request请求取值形式、数据库连接、
django基础知识薄弱点 几个常见的命令 #创建django项目 django-admin startproject mysite #启动django项目 python manage.py runs ...
- USACO 利润Profits
洛谷P3009 [USACO11JAN]利润Profits 题解 https://www.luogu.org/problemnew/solution/P3009 JDOJ 2727: USACO 2 ...
- VIJOS-P1421 更换轮胎
JDOJ 1506: VIJOS-P1421 更换轮胎 https://neooj.com/oldoj/problem.php?id=1506 Description 经过数周的期待,比赛终于正式开始 ...
- 毕业一年的大专生程序员工作总结(java后台)
文章导读 一.回眸过去-- 闲扯的话-- 零碎的技术 二.经验总结-- 沟通交流-- 贵在坚持-- 合理规划 三.展望未来-- 积累行业背景-- 学习清单 四.最后补充 一. 回牟过去 1.闲扯的话 ...
- 11/8 <matrix> LC 48 54 59
48. Rotate Image 先按对角线对称图形,再水平对折. class Solution { public void rotate(int[][] matrix) { //1.transpos ...
- Hello 2019 D 素因子贡献法计算期望 + 概率dp + 滚动数组
https://codeforces.com/contest/1097/problem/D 题意 给你一个n和k,问n经过k次操作之后留下的n的期望,每次操作n随机变成一个n的因数 题解 概率dp计算 ...
- java 随笔
Spring的scope="prototype"属性 - 多例 spring 默认scope 是单例模式(singleton),这样只会创建一个Action对象,每次访问都是同一个 ...
- 支持TV远程控制的WIN10PEX64_17763网络版by双心
支持TV远程控制的WIN10PEX64_17763网络版by双心 用slore大神的wimbuilder2,基于cn_windows_10_enterprise_ltsc_2019_x64_dvd_9 ...