分类目录归档:技术文章

实验楼


实验楼

知识点1

  • IP 地址
  • 域名
  • MAC 地址
  • 端口号 (2^16个)
  • 封装和分用

封装

物理层(一层)PDU 指数据位(Bit)
数据链路层(二层)PDU 指数据帧(Frame)
网络层(三层)PDU 指数据包(Packet)
传输层(四层)PDU 指数据段(Segment)
第五层以上为数据(data)

RFC(Request for Comment)

[2]

知识点2

  • 控制帧传输
  • 以太网
  • PPP(点对点协议)
  • SLIP与PPP
  • MTU

网络层协议的数据单元是 IP 数据报,而数据链路层的工作就是把网络层交下来的 IP 数据报 封装为帧(frame)发送到链路上,以及把接收到

Read more

Composing Programs


Composing Programs


1.1 Getting Started

Computer science is a tremendously broad academic discipline.
The high productivity of computer science is only possible because the discipline is built upon an elegant and powerful set of fundamental ideas.
These fundamental ideas have long been taught using 

Read more

Spacemacs Org 粘贴剪贴板上的图片


Spacemacs Org 粘贴剪贴板上的图片


粘贴剪贴板上的图片

1. mac

安装pngpate

brew install pngpaste

在.spacemacs中添加org-insert-image函数

(defun org-insert-image ()
  (interactive)
  (let* ((path (concat default-directory "img/"))
    (image-file (concat path (buffer-name)
        (format-time-string "_%Y%m%d_%H%M%S.png"))))
    

Read more

LLVM Source Install On The Centos


LLVM Source Install On The Centos


1. 使用ninja来编译,这样编译时间会缩短很多

2. gcc 选用7.0

3. swig版本最后使用3.0,否着lldb编译会有问题

a5e0389b2a49877edf37eb5ed6699ec50054c3a2 我在这个版本上编译,lldb会报错

4. 编译安装步骤

1. clone code
git clone https://github.com/llvm/llvm-project.git
2. 使用cmake生成ninja脚本
在你clone的llvm-project项目下(默认编译debug脚本)
mkdir

Read more

HBase之Snapshot


HBase之Snapshot

1.配置项中打开snapshot

<property>
<name>hbase.snapshot.enabled</name>
<value>true</value>
</property>

2.创建一个snapshot

$ ./bin/hbase shell
hbase> snapshot 'myTable', 'myTableSnapshot-122112'

3.列出snapshot

$ ./bin/hbase shell
hbase> list_snapshots

4. 删除

Read more

GIT 使用技巧


1. 配置代理

开启代理

git config --global http.proxy $server:$port
git config --global https.proxy $server:$port

关闭代理

git config --global --unset https.proxy
git config --global --unset http.proxy

2. 断点重传

Read more

NGINX 通过不同的二级域名映射到不同端口下的应用


NGINX 二级域名映射不同端口下的应用NGINX 二级域名映射不同端口下的应用


有三个二级域名
www.betteryuan.top ==> djangoblog(djangoblog 127.0.0.1:8000)
gitlab.betteryuan.top ==> gitlab.betteryuan.top(httpd 127.0.0.1:8081)
ngrok.betteryuan.top ==> ngrok.betteryuan.top(nprok 127.0.0.1:1080)
server {

    listen 80;
    server_na

Read more