多臂赌博机1

假想一个风投他想着他的收益最大化,这时他总会面临一个两难: 何时去投资那些已经成功的公司,何时去投资那些还没有成功但具有很大潜力的公司.这里套用股市里的一句话:收益总是伴随着风险的. 一个成功的风投必须处理好这个勘探-开发两难(exploration and exploitation tradeoff): 勘探过多意味着不能获得较高的……

阅读全文

Linux防火墙2

在上一节我们提到,我们配置的防火墙可能已经在别人配置的防火墙内了. 即使自己设置了数据包全部通过的规则,数据包也可能在外层防火墙被滤掉了.那么如何扫描别人给我们开放的端口呢? 这里我们介绍nmap. 安装 osx: brew install nmap linux: 用你最喜欢的包管理安装吧 windows: zenmap 功能架构图 nmap功能架构图 主机发现(Hos……

阅读全文

YADR替换oh-my-zsh

由于喜欢agnoster主题,但是oh-my-zsh默认还是解决不了这个问题.所以考虑换个配置包.终于找到另一个不用配置的的配置包YADR,基本不用自己手动一点点搞了,除了自己下载iterm2,其它依赖会直接搞定: 它会安装homebrew(记得回车输入密码), 然后安装必要的软件,……

阅读全文

TCPIP及wireshark分析

TCP 三次握手 开始: 客户发送Syn,Seq=X 服务发送Syn,Ack=X+1,Seq=Y 客户发送Ack=Y+1,Seq=Z 结束 服务发送Fin,Seq=X 客户发送Ack,Seq=X+1 客户发送Fin,Seq=Y 服务发送Ack,Seq=Y+1 wireshark分析使用 过滤器 协议过滤:如T……

阅读全文

Linux防火墙1

iptables与netfilter 经常混用,不过iptables指的是防火墙的管理工具而netfilter指的是linux实现防火墙的内核模块. iptables结构 表(Tables) 现在一般有5种内建表,Filter表, NAT表,Mangle表,Raw表和security表,分……

阅读全文

MATLAB基础

预定义名 eps: 最小浮点数 pi: $\pi$ i/j: 虚数单位 Inf/inf: 无穷大 intmax/intmin: 最大、最小正数 realmax/realmin: 最大、最小实数 函数 accuumarray cross cumsum cumprod dot prod sum tril, triu 变量管理 clear clc clf 工作空间图形化操作 who/whos save/load ans 工作目录 cd dir doc help which 运算 加法: + 减法: - 乘法: * 点乘: .* 左除: / 右除\ 点除: ./ 幂: ^ 转置: .' 共轭转置: ' 关系运算: ==, ~=,>,>=,<,<= 逻辑运算: &,|,~ all: 是否为全0; B=all(A),B=all(A,dim) any:……

阅读全文

postgres基础

1 2 3 4 5 6 7 8 9 10 sudo su - postgres psql -c "alter user postgres with password 'StrongAdminP@ssw0rd'" sudo vi /etc/postgresql/12/main/postgresql.conf listen_addresses = '*' sudo vi /etc/postgresql/12/main/pg_hba.conf host all all 192.168.10.0/24 md5 sudo systemctl restart postgresql sudo apt install pgadmin4 pgadmin4-apache2 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 create table dept( id serial primary key, name varchar(20) ) create table employee1( id serial primary key, name varchar(20), age int, salary real, dept_id int references dept (id) ) insert into dept (name) values('人事部'); insert into dept (name) values('……

阅读全文

latex系统说明

格式 plaintex latex2e context 其它格式:amstex,BLUe,HP tex, Jadetex, Lollipop, MacroTex,MeX,PHYS(E),PHYZZY,StarTex,Texinfo,Texsis,XMLTex,YTEX,ZzTex 引擎(编译器) tex tex3 e-tex pdftex pdflatex xetex luatex META*(辅助程序) MetaFont MetaPost MegaPost BibTex: 参考文献管理编译程序及格式,作用同bibliography环境 编译:先编译tex,生成aux文件,再用bibtex编译,而后再用latex生成带参考文献的文档 dvi2pdf dvipdf dvipdfm dvipdfmx……

阅读全文

硬盘接口与参数

PCIe PCIe是一种物理接口:Peripheral Component Interconnect Express,替换PCI、PCI-X、AGP等接口 M.2 M.2是一种物理接口:Next Generation Form Factor (NGFF),替换mSATA接口,一般用于笔记本,和U.2是竞争关系,使用PCIe MiniCard的物理布局,支持AHCI和NVMe控制接口……

阅读全文

Probability Theory: the logic of science

Plausible reasoning The actual science of logic is conversant at present only with things either certain, impossible, or entirely doubtful, none of which (fortunately) we have to reason on. Therefore the true logic for this world is the calculus of Probabilities, which takes account of the magnitude of the probability which is, or ought to be, in a reasonable man's mind. –Maxwell Aristotle deductive reasoning(apodeixis) strong syllogism if A is true, then B is true; now A is true, therefore B is true if A is true, then B is true; now B is false, therefore A is false Plausible reasoning weak syllogism(epagoge) if A is true, then B is true; now B is true, therefore A becomes more plausible. if A is true, then B is true, now A is false, therefore B becomes less plausible. weaker syllogism if……

阅读全文