
编程
qiangshou001
这个作者很懒,什么都没留下…
展开
-
IP地址转换:int转string
实际编程中,IP地址多用整型来表示,如int、unsigned int等。整型对于机器是友好的,对于编码人员就不那么友好了,毕竟我们还是喜欢用点分格式的IP地址,下面就写了个简单的小方法,供参考、使用;#include "stdafx.h"#include <iostream>#include <string>#include <sstream>usi...原创 2018-03-10 10:35:46 · 2794 阅读 · 0 评论 -
1分钟搞定VMware Workstation error "This virtual machine appears to be in use"
出现error "This virtual machine appears to be in use" ,可能是由于异常关机(意外掉电、强制关机等)导致的虚拟机没有及时将状态信息持久化,触发虚拟机的状态保护机制,导致重启后,信息加载不上。 solution:1)close VMware Workstation2)delete any .lck or .lock files and/...原创 2019-02-22 09:22:34 · 565 阅读 · 0 评论 -
为GitLab帐号添加SSH keys并连接GitLab
参考链接:https://blog.youkuaiyun.com/xyzchenxiaolin/article/details/51852333转载 2019-02-21 09:50:27 · 330 阅读 · 0 评论 -
hashMap底层实现
参考知乎https://zhuanlan.zhihu.com/p/28501879原创 2019-03-11 14:21:33 · 222 阅读 · 0 评论 -
Java中HashMap底层实现原理(JDK1.8)源码分析
文中详细介绍了hashmap的底层原理,挺好https://blog.youkuaiyun.com/tuke_tuke/article/details/51588156hashmap为什么线程不安全?1、put的时候导致的多线程数据不一致。datarace现象,线程A、B同时put数据时,如果桶的index相同,则可能会出现,前者覆盖后者的情况。2、另外一个比较明显的...转载 2019-04-04 09:43:54 · 316 阅读 · 0 评论 -
Key-Value 存储引擎 · 系统设计 (System Design)
文章讲述了RocksDB、LevelDB的底层实现过程,很棒https://juejin.im/entry/5ad4890f6fb9a028e33bec7b转载 2019-04-10 10:04:38 · 735 阅读 · 0 评论 -
哈希表和完美哈希
通俗介绍了哈希表、哈希函数的实际意义,及设计哈希函数时的注意事项.https://www.cnblogs.com/wt869054461/p/5731577.html原创 2019-04-03 15:05:04 · 270 阅读 · 0 评论 -
快速排序入门实现,Rust版
Rust实现:fn quick_sort(nums: &mut Vec<u8>, left: usize, right: usize) { if left >= right { return; } let mut l = left; let mut r = right; while l < r ...原创 2019-05-19 11:24:25 · 1926 阅读 · 0 评论 -
获取丑数 get ugly nums
pub fn nth_ugly_number(n: i32) -> i32 { fn is_ugly_number(n: i32) -> bool { let mut m = n; while m % 5 == 0 { m = m / 5; } while m % 3 == 0 { ...原创 2019-05-24 13:53:46 · 253 阅读 · 0 评论 -
How to Debug Rust with Visual Studio Code
https://www.forrestthewoods.com/blog/how-to-debug-rust-with-visual-studio-code/Install Rust and VS CodeThis should go without saying.Install RustInstall Visual Studio CodeInstall V...原创 2019-05-24 14:18:20 · 964 阅读 · 0 评论 -
how to resolve "librocksdb-sys" compile error
error logCompiling librocksdb-sys v5.14.2 error: failed to run custom build command for `librocksdb-sys...原创 2019-05-16 10:06:08 · 2714 阅读 · 0 评论 -
rust copy 和 clone 区别
参考资料https://zhuanlan.zhihu.com/p/21730929 总结Copy 和 Clone 两者的区别和联系有:Copy内部没有方法,Clone内部有两个方法。 Copy trait 是给编译器用的,告诉编译器这个类型默认采用 copy 语义,而不是 move 语义。Clone trait 是给程序员用的,我们必须手动调用clone方法,它才能发挥作用。...原创 2019-01-29 17:17:42 · 7286 阅读 · 0 评论 -
install rustup failed, err "it looks like you have an existing installation of Rust"
error: it looks like you have an existing installation of Rust at:error: /home/pnkfelix/binerror: rustup cannot be installed alongside Rust. Please uninstall firsterror: if this is what you wan...原创 2019-01-23 17:46:31 · 1448 阅读 · 0 评论 -
MAC地址转换:64位整型转string
实际编程中,MAC地址多用整型来表示,如unsigned long long等。整型对于机器是友好的,对于编码人员就不那么友好了,毕竟我们还是喜欢用string类型的MAC地址,如“00-00-00-00-00-00”,下面就写了个简单的小方法,供参考、使用;#include "stdafx.h"#include <iostream>#include <string>...原创 2018-03-10 10:40:45 · 4262 阅读 · 0 评论 -
cargo install cargo-tree 失败,提示“error: failed to run custom build command for `kernel32-sys v0.2.2`”
error: failed to run custom build command for `libssh2-sys v0.2.6`process didn't exit successfully: `C:\Users\radix\AppData\Local\Temp\cargo-install.FV5LTR5nFsKM\release\build\libssh2-sys-86a416940b...原创 2018-09-05 11:09:48 · 3185 阅读 · 0 评论 -
ubuntu 16.04 安装 docker教程
1.下载安装 VMware Workstation;2.VMware Workstation中创建ubuntu虚拟机,版本 16.04,下载地址https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/16.04/ubuntu-16.04.5-desktop-amd64.iso3.在安装好的ubuntu虚拟机中按照如下帖子中的方法,傻瓜式操作...原创 2018-09-19 10:39:39 · 277 阅读 · 0 评论 -
ubuntu 16.04 虚拟机中 git pull 出错 sign_and_send_pubkey: signing failed: agent refused operation
osboxes@ubuntu:~/user$ git pullsign_and_send_pubkey: signing failed: agent refused operationPermission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the...原创 2018-09-21 09:16:49 · 377 阅读 · 0 评论 -
rust hashmap使用总结
https://blog.youkuaiyun.com/wowotuo/article/details/74779709use std::collections::HashMap;fn hashmap_test() { let mut contacts = HashMap::new(); for i in 1..10 { contacts.insert(i, (i *...原创 2018-09-21 11:02:06 · 8839 阅读 · 0 评论 -
cygwin 使用 zsh
命令窗口输入 ls -a 打开.bashrc,并将 /usr/bin/zsh 插入.bashrc,将zsh设置为默认 输入 wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 安装oh-my-zsh; 安装成功,重启cygwin,即可。...原创 2018-09-21 18:25:19 · 920 阅读 · 1 评论 -
Windows下安装Go开发环境
1) 下载msi安装文件,选择和自己系统相匹配的msi,区分32/64,建议选择msi格式的,懒得手动配置环境变量; 官方下载地址 https://golang.org/dl/ 2) msi下载完成后,打开msi文件,傻瓜式安装(一直next),直至结束;3)测试是否安装成功:cmd命令下,输入 go version 或 go help,若出现下图提示,则安装成功;4...原创 2018-11-01 19:42:36 · 164 阅读 · 0 评论 -
WebAssembly && 编译原理
WebAssembly 系列(一)生动形象地介绍 WebAssemblyhttps://www.w3ctech.com/topic/2027WebAssembly 系列(三)编译器如何生成汇编https://www.w3ctech.com/topic/2025原创 2018-11-26 16:33:19 · 313 阅读 · 0 评论 -
用emoji表情提交代码指南
https://github.com/muwenzi/Program-Blog/issues/71转载 2018-12-29 10:32:14 · 828 阅读 · 0 评论 -
RocksDB 笔记
https://alexstocks.github.io/html/rocksdb.html很棒的一篇介绍RockDB的文章,收藏之转载 2019-06-14 10:29:45 · 549 阅读 · 0 评论