<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[harryhare的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/harryhare</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; harryhare]]></copyright><item><title><![CDATA[clusterip,nodeport,loadbalancer]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/106061229</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/106061229</guid><author>harryhare</author><pubDate>Mon, 11 May 2020 20:40:40 +0800</pubDate><description><![CDATA[再下面这种情况下
apiVersion: apps/v1
 
kind: Deployment
 
metadata:
  name: app
 
spec:
 
  replicas: 2
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
 
    spec:
      containers:
        - name: app
         ]]></description><category></category></item><item><title><![CDATA[docker.io 和 docker-ce 区别]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/106015022</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/106015022</guid><author>harryhare</author><pubDate>Sat, 09 May 2020 11:32:56 +0800</pubDate><description><![CDATA[参考 stackoverflow :
https://stackoverflow.com/questions/45023363/what-is-docker-io-in-relation-to-docker-ce-and-docker-ee
我们知道 在 debian/ubuntu 中装 docker.io 是很方便的
sudo apt install docker.io

但是安装 docker.ce 却很多步骤
curl -fsSL https://download.docker.com/linux/u]]></description><category></category></item><item><title><![CDATA[windows 查看 占用文件的进程]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105993654</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105993654</guid><author>harryhare</author><pubDate>Fri, 08 May 2020 13:05:30 +0800</pubDate><description><![CDATA[1 Ctrl+Shift+ESC，打开“任务管理器”，


2 切换到“性能”选项卡下，并点击“资源管理器；


3 打开“资源监视器”后，选择“CPU”;
!!! 注意是选择 CPU 而不是 磁盘


4 并在下面的“关联句柄”处输入你想进行操作的“文件名”；



...]]></description><category></category></item><item><title><![CDATA[在线人数统计]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105885388</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105885388</guid><author>harryhare</author><pubDate>Sat, 02 May 2020 00:33:55 +0800</pubDate><description><![CDATA[几种方法

https://www.cnblogs.com/php-no-2/p/9431213.html
感觉上大概就是 bloom filter 和 hyperloglog 两个比较实用，由于占用资源少，但是统计的值都不是精确值
这两个方法都可以合并，hyperloglog 是取最大值， bloom filter 是 二进制与运算
但是由于redis 里只有有hyperloglog，所以应...]]></description><category></category></item><item><title><![CDATA[kubenetes本地环境搭建]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105667804</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105667804</guid><author>harryhare</author><pubDate>Tue, 21 Apr 2020 21:10:35 +0800</pubDate><description><![CDATA[现象
打开日志文件C:\ProgramData\DockerDesktop\service.txt
发现这样的log
cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: EOF

解决
google 搜到的解读不是hosts文件纠正 .kube/config ， 但是百度一下就发现实际问题是应为被...]]></description><category></category></item><item><title><![CDATA[天池练习赛：【中间件极客榜】自适应负载均衡的设计实现]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105598011</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105598011</guid><author>harryhare</author><pubDate>Sat, 18 Apr 2020 15:28:50 +0800</pubDate><description><![CDATA[比赛地址
https://tianchi.aliyun.com/competition/entrance/231740/score
我的代码
https://code.aliyun.com/harryhare/adaptive-loadbalance
最终成绩
18 名 ，1295781/1295781/28385

题目分析
请求并发连接数是1024， 几个provider 的最大线程数分别是...]]></description><category></category></item><item><title><![CDATA[二分法的边界选择]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105597243</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105597243</guid><author>harryhare</author><pubDate>Sat, 18 Apr 2020 13:54:07 +0800</pubDate><description><![CDATA[要在有序数组中找某个数，这个数只出现一次
这个写法有三个点需要注意

end 是指向实际的值的
begin=m+1, end=m-1
循环的条件是 begin&lt;=end, 因为begin，end 都指向数组中的元素，所以相等时依然要再判断一次

int find(int x, int *a, int begin, int end) {
    while (begin &lt;= end) ...]]></description><category></category></item><item><title><![CDATA[拓扑排序]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105571419</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105571419</guid><author>harryhare</author><pubDate>Fri, 17 Apr 2020 01:54:23 +0800</pubDate><description><![CDATA[题目
突然想起这个话题，是因为这道题
Given a sorted dictionary of an alien language, find order of characters
leetcode 上有个更简单的相似题目
verifying an alien-dictionary
leetcode 这道就很简单，用不着什么拓扑排序。每对相邻的单词，可能得到一对字母的顺序，然后在词典中检查者两个...]]></description><category></category></item><item><title><![CDATA[git ssh key 配置]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/105337605</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/105337605</guid><author>harryhare</author><pubDate>Mon, 06 Apr 2020 01:45:00 +0800</pubDate><description><![CDATA[产生 key

ssh-keygen

场景一

不同git server，不同 ssh key
编辑文件 ~/.ssh/config

Host &lt;Host Name&gt;
HostName AAAAAAA.org
IdentityFile ~/.ssh/&lt;key for the given host&gt;

Host &lt;Host1 Name&gt;
HostName B...]]></description><category></category></item><item><title><![CDATA[windows 快速进入高级系统设置]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/104597160</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/104597160</guid><author>harryhare</author><pubDate>Sun, 01 Mar 2020 18:23:20 +0800</pubDate><description><![CDATA[Win + R
sysdm.cpl


]]></description><category></category></item><item><title><![CDATA[python 标准输出重定向到文件后，文件为空]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/104386424</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/104386424</guid><author>harryhare</author><pubDate>Wed, 19 Feb 2020 05:06:32 +0800</pubDate><description><![CDATA[问题描述
启动一个http server 然后把 标准输出的 log 重定向到 文件
python server.py &gt; log.txt 2&gt;&amp;1 &amp;

然后 tail -f log.txt 会发现一直时空的
但是 如果把 server.py 换成 只有一行print 的文件, 则 输出文件是正常的
print("test")

解
强制输出刷缓存

加参数 -u

...]]></description><category></category></item><item><title><![CDATA[python import/package]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/104360435</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/104360435</guid><author>harryhare</author><pubDate>Mon, 17 Feb 2020 21:00:49 +0800</pubDate><description><![CDATA[示例project
https://github.com/harryhare/python_import_playground
在不涉及包的情况下，引用其他文件
直接 import 文件路径就可以
包
包和普通目录的区别只是包多了个__init__.py 文件。
有了这个文件后，在import 时则可以用目录名，而不是直接引用文件名。
同时 import 后，只有__init__.py 文件中定义...]]></description><category></category></item><item><title><![CDATA[python -m pip  install --upgrade pip 报错]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/104204726</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/104204726</guid><author>harryhare</author><pubDate>Fri, 07 Feb 2020 01:48:43 +0800</pubDate><description><![CDATA[具体问题
环境：

windows
python3.6

根据pip 的提示
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm...]]></description><category></category></item><item><title><![CDATA[webRTC 入门]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/102897440</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/102897440</guid><author>harryhare</author><pubDate>Tue, 05 Nov 2019 10:30:24 +0800</pubDate><description><![CDATA[概念
WebRTC基础介绍
webRTC 的最直接用途是两个浏览器间的p2p，不过加上中转服务器后也可以用来做其他的。
webRTC 是基于UDP的，作为对比，webSocket 是基于TCP的。

流程
除了getUserMedia之外，主要是两件事情：

两端间确定流媒体的格式（SDP）
两端间确定对方的网络地址（ICE）, 由于浏览器极有可能是在内网中的，所以需要有一般的p2p内网穿透的过程...]]></description><category></category></item><item><title><![CDATA[windows录制本机发出的声音]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/102493995</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/102493995</guid><author>harryhare</author><pubDate>Fri, 11 Oct 2019 07:07:53 +0800</pubDate><description><![CDATA[https://www.howtogeek.com/217348/how-to-record-the-sound-coming-from-your-pc-even-without-stereo-mix/
默认录音是没有本地机器发出的声音的，
方法一：
开启Stereo Mix（混合立体声）
方法二：
使用audiocity 的 WSSAPI+loopback
win 10录音软件推荐
audioc...]]></description><category></category></item><item><title><![CDATA[vim常用设置]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/101832096</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/101832096</guid><author>harryhare</author><pubDate>Tue, 01 Oct 2019 11:14:37 +0800</pubDate><description><![CDATA[一个例子
编辑文件 ~/.vimrc
如果没有这个文件，创建一个
set number
set tabspace=4
set shiftwidth=4
set autoindent
set paste
set wrap
set laststatus=2
set ruler
set showmatch
set hlsearch
set ignorecase
set nobackup
set nosw...]]></description><category></category></item><item><title><![CDATA[mac terminal 配置]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/100193718</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/100193718</guid><author>harryhare</author><pubDate>Mon, 02 Sep 2019 10:11:30 +0800</pubDate><description><![CDATA[下面三个blog 差不多：

reference 1
reference 2
reference 3

总结:

iTerm2 替代 mac 默认terminal
zsh 替代 bash# 改成zsh
chsh -s /bin/zsh
# 回到bash
chsh -s /bin/bash


oh-my-zsh# curl 方式安装：
sh -c "$(curl -fsSL https://raw...]]></description><category></category></item><item><title><![CDATA[jenkins 连 github]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/100130262</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/100130262</guid><author>harryhare</author><pubDate>Thu, 29 Aug 2019 10:51:28 +0800</pubDate><description><![CDATA[webhook 可以让 jenkins 自动创建，只需要在 manage jenkins -&gt; configure system -&gt; github -&gt; manage hooks 打勾



在创建Credentials  时， 把 github 的 personal access token 通过 secret text 方式创建，可以验证通过的。

但是 在pipeli...]]></description><category></category></item><item><title><![CDATA[kubectl／helm]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/100072525</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/100072525</guid><author>harryhare</author><pubDate>Mon, 26 Aug 2019 10:23:41 +0800</pubDate><description><![CDATA[http://www.bubuko.com/infodetail-2765767.html
报错：

_get_comp_words_by_ref: command not found

解决：
source /etc/bash_completion
source &lt;(kubectl completion bash)
source &lt;(helm completion bash)


...]]></description><category></category></item><item><title><![CDATA[go get 连接 超时]]></title><link>https://blog.youkuaiyun.com/harryhare/article/details/99772418</link><guid>https://blog.youkuaiyun.com/harryhare/article/details/99772418</guid><author>harryhare</author><pubDate>Mon, 19 Aug 2019 22:49:54 +0800</pubDate><description><![CDATA[参考：https://www.jianshu.com/p/a537ee63d606
大概一共下面几种方法

git clone 到相应的路径  mkdir $GOPATH/src/golang.org/x
  cd $GOPATH/src/golang.org/x
  git clone git@github.com:golang/text.git
  rm -rf text/.git


pro...]]></description><category></category></item></channel></rss>