斜率

斜率 斜率亦称"角系数”,表示平面直角坐标系中表示一条直线对横坐标轴的倾斜程度的量。 直线对X 轴的倾斜角α的正切值tgα称

Java 7 Phaser

‘Java 7 Phaser’ http://www.oschina.net/question/12_35433 Java 7 引入了一个全新灵活的线程同步机制,名为 Phaser 。 如果你需要等待线程结束然后继续执行其他任务,那么 Phaser 是一个好的选择,接下来我们一步步来介

TCP_NODELAY, TCP_CORK, Nagle

TCP_NODELAY, TCP_CORK, Nagle TCP/IP之 Nagle 算法与40ms延迟提到了Nagle 算法。这样虽然提高了网络吞吐量, 但是实时性却降低了, 在一些交互性很强的应用程序来说是

golang 枚举, enum

golang 枚举, enum 枚举 go 语言并没有提供 enum 的定义,我们可以使用 const 来模拟枚举类型。 1 2 3 4 5 6 7 8 type PolicyType int32 const ( Policy_MIN PolicyType = 0 Policy_MAX PolicyType = 1 Policy_MID PolicyType = 2 Policy_AVG PolicyType = 3 ) 1 2 3 4 5

Golang runtime

Golang runtime golang 判断操作系统是 windows 还是 linux 1 http://www.jianshu.com/p/e45cea3e1723 runtime 调度器是个非常有用的东西,关于 runtime 包几个方法: Gosched: 让当前线程让出 cpu 以让其它线程运行,它不会挂起当前线程,因此当

contract, 合同

contract, 合同 合同的基本结构和主要条款 《合同法》第十二条、《民法典》第四百七十条规定了“合同应当具备如下内容: 当事人的姓名或者名称和住所; 标的; 数量

golang 定时器, timer, ticker

golang 定时器, timer, ticker Go 可以借助 time.After/time.Ticker 来实现延迟/定时触发器, 主要原理是借助无缓冲 channel 无数据时读取操作会阻塞当前协程, Go 会在给定的时间后向 channel 中写入一些数据

kvm GPU VFIO OVMF

‘kvm GPU VFIO OVMF’ https://www.linuxserver.io/2017/04/28/how-to-setup-vfio-gpu-passthrough-using-ovmf-and-kvm-on-arch-linux/ https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF https://github.com/IronicBadger/arch-vfio-ovmf https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Plain_QEMU_without_libvirt

java grpc

java grpc maven依赖 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-netty-shaded</artifactId> <version>1.31.0</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-protobuf</artifactId> <version>1.31.0</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-stub</artifactId> <version>1.31.0</version> </dependency> <dependency> <!-- necessary for Java 9+ --> <groupId>org.apache.tomcat</groupId> <artifactId>annotations-api</artifactId> <version>6.0.53</version> <scope>provided</scope> </dependency> create proto file in src/main/proto/foo.proto option java_package = “com.wiloon.foo”; maven 执行 mvn

容器编排

容器编排 众所周知,Kubernetes 是一个容器编排平台,它有非常丰富的原始的 API 来支持容器编排,但是对于用户来说更加关心的是一个应用的编排,

grpc

python grpc grpcio==1.48.2 grpc 会忽略 linux 环境变量 里配置的 no_proxy, 导致请求失败, 在启动客户端之前 临时删除环境变量 unset HTTP_PROXY golang grpc gRPC 通过 HTTP2 协议传输 定义协议 protobuf 1 2 3 4 5 6 7 syntax = "proto3"; message SearchRequest {

OAuth,SSO,REST

OAuth,SSO,REST http://favccxx.blog.51cto.com/2890523/1635938 OAuth与SSO、REST有哪些区别与联系 2015-04-20 10:31:10 标签: SSO REST OAuth OAuth2.0 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本

cron, anacron

cron, anacron anacron 用于以天为单位的频率运行命令。它的工作与 cron 稍有不同,它假设机器不会一直开机。 anacron 如何在 Linux 工作 anacron 任务被列在 /etc/anacrontab 中,任务可以使用下面的格式 (anacron 文

Linux split, 文件分割与合并

Linux split, 文件分割与合并 1 2 3 4 5 6 7 # -l 按行分割 # -d numeric suffixes split -l 300 -d large_file.txt new_file_prefix inux文件分割与合并: split & cat Linux下文件分割可以通过split命令来实

清空文件

清空文件 在处理服务器磁盘占用时, 比如有比较大的日志文件, 服务还在运行, 所以文件是不能删的, 又因为文件太大了不适合用文本编辑器打开, 比如 vi 之类

raspberry pi openvpn

raspberry pi openvpn https://community.home-assistant.io/t/how-to-install-openvpn-on-raspberry-pi-with-home-assistant/59002 1 2 3 4 5 6 7 8 sudo -s # **rest of the instructions assume you've already done this apt-get update apt-get upgrade apt-get install openvpn unzip easy-rsa gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server/server.conf vim /etc/openvpn/server/server.conf Make the following changes to the server.conf file Increase key security by Finding dh and makesure it reads dh dh2048.pem Allow web traffic pass though to client by uncommenting push “redirect-gateway def1 bypass-dhcp” by removing the semi colon at the start of the line Prevent DNS leak by overriding the default DNS - Uncomment push “dhcp-option DNS 208.

Linux 密码生成工具

Linux 密码生成工具 1 2 3 pwgen -s -y http://blog.csdn.net/u011582658/article/details/38045311 1.pwgen pwgen生成的密码易于记忆且相当安全。从技术上来说,容易记忆的密码不会比随机生成的密码更加安全。但是,在大多

向量化

向量化 http://blog.csdn.net/gengshenghong/article/details/7027186 参考手册: http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011Update/compiler_c/index.htm 说明: 本系列文章为个人笔记,如有不正确之处,请参考官方相关文档,如果错误发现,我会尽量更新修改。另外,以下内容不保证对于

ODX, OTX, UDS

ODX, OTX, UDS https://blog.softing.com/blog/automotive-electronics/diagnostics-odx-otx-uds-and-other-market-standards/ Diagnostics – ODX, OTX, UDS and other market standards Posted on 01/07/2015 by Stephan Obermüller Diagnose_Icon_626_251 A large number of today’s innovations are based on software developments, and vehicles are no exception. Software innovations improve vehicle performance and increase both the safety and sustainability of mobility. The number of ECUs and the associated networking are continually increasing in the process. The associated growing complexity must be mastered over a vehicle’s entire lifetime.