- 如何 SSH 登录 UniFi UAP-AC-Lite
set-inform <inform-url>
inform-url
形如http://<controller-ip>:8080/inform
,这里的controller-ip
是 AC 的 IP
那么有同学要问了,有 get-inform
命令吗,抱歉没有,试试 info
set-inform <inform-url>
inform-url
形如 http://<controller-ip>:8080/inform
,这里的 controller-ip
是 AC 的 IP那么有同学要问了,有 get-inform
命令吗,抱歉没有,试试 info
从来都是先输入“羽毛”再把“毛”删掉,从“羽毛”的编码nntf
可得出“羽”的前两码一定是nn
,但后面是啥,这么多年也没有试出来过。
就在刚刚,实在忍不住搜索了一下,答案竟然是nnyg
,百思不得其解,先记在这里吧
原因是 N1 盒子 emmc 出现坏块导致,解决方法:用 U 盘启动 N1 盒子进入 Armbian,然后输入下面的命令:
e2fsck /dev/mmcblk1p2
修复成功后拔掉 U 盘重启 N1 盒子。
现在(2020年3月28日,March 28th, 2020)网上能搜到的内容都过时了,正解如下:
dd
to burn ISO to USB——用 dd
命令把 ISO 烧进 U 盘那么第一步,怎么把 DMG 转为 ISO 呢?这里需要用到一个工具叫 dmg2img
,下面是 brew
安装方法:
brew install dmg2img
然后,
dmg2img <path_to_your_dmg_file> <path_to_your_iso_file>
就把 DMG 转为 ISO了。
第二步,把 ISO 烧进 U 盘:
sudo dd if=<path_to_your_iso_file> of=<your_destination_disk> bs=4m
具体可以用 diskutil list
命令查看自己 U 盘的标识
五步走:
Git Server
,安装https://packages.synocommunity.com
,名称写 社群
,确定Z shell (with modules)
,安装sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh
,所以新建~/.profile
文件,粘贴以下内容后保存if [[ -x /usr/local/bin/zsh ]]; then export SHELL=/usr/local/bin/zsh exec /usr/local/bin/zsh fi
lsof -n -i4TCP:$PORT | grep LISTEN lsof -n -iTCP:$PORT | grep LISTEN lsof -n -i:$PORT | grep LISTEN
其中$PORT
替换为指定的端口号,或者是用英文逗号连接的一组端口号。
git config --global core.quotepath false
macOS 升级到 High Sierra 后,telnet
命令竟然不见了!身为码畜,是可忍孰不可忍……
如果你还没有安装过 Homebrew
,先用下面的命令安装上:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
也是一条命令的事儿……
brew install telnet
equal(
x,
y,
name=None
)
对输入的 x
和 y
两个 Tensor
逐元素(element-wise)做 (x == y) 逻辑比较,返回 bool
类型的 Tensor
。
x
只支持以下类型:half
, float32
, float64
, uint8
, int8
, int16
, int32
, int64
, complex64
, quint8
, qint8
, qint32
, string
, bool
, complex128
y
的类型必须与 x
相同name
给这个操作取一个名称,可选bool
类型的 Tensor
broadcasting
,详见 Numpy
文档。x
和 y
拥有相同的 shape
import tensorflow as tf a = tf.constant([1, 2], tf.int32) b = tf.constant([2, 2], tf.int32) with tf.Session() as sess: print(sess.run(tf.equal(a, b))) # 输出 [False True]
broadcasting
用法:x
和 y
不同 shape
x = tf.constant(["hehe", "haha", "hoho", "kaka"], tf.string) y = tf.constant("hoho", tf.string) with tf.Session() as sess: print(sess.run(tf.equal(x, y))) # 输出 [False False True False]
注意观察上面这个栗子,实际解决了在一个数组中查找某个元素索引(index
)的问题,这个特性配合 tf.cast
在生成 one-hot
向量时将会特别有用。
a = tf.constant([[1], [2]], tf.int32) b = tf.constant([[2, 1]], tf.int32) with tf.Session() as sess: print(sess.run(tf.equal(a, b))) # 输出 # [[False True] # [ True False]]