有道智云文本翻译

最近需要用到在线翻译,就找了一个初期免费(送100初始资金)的站,而且有道这个网站主要就是做翻译的,质量应该还是信得过

请求示例:


import random, string, config

def randomword(length):
    letters = string.ascii_lowercase
    return ''.join(random.choice(letters) for i in range(length))

appSecret=config.appSecret

q="<待翻译文本>"
from="en"
to="zh-CHS"
appKey=config.appKey
salt=randomword(<任意长度>)
sign=md5(appKey+q+salt+appSecret) #格式要求:%32X

返回示例


{
    "tSpeakUrl": "",
    "web": [
        {
            "value": [
                "lunar eclipse",
                "Eclipse",
                "moon's eclipse"
            ],
            "key": "月食"
        },
        {
            "value": [
                "penumbral lunar eclipse",
                "penumbral eclipse",
                "appulse"
            ],
            "key": "半影月食"
        },
        {
            "value": [
                "moon phases"
            ],
            "key": "月食字体"
        }
    ],
    "query": "月食",
    "translation": [
        "Eclipse of the moon"
    ],
    "errorCode": "0",
    "dict": {
        "url": "yddict://m.youdao.com/dict?le=eng&q=%E6%9C%88%E9%A3%9F"
    },
    "webdict": {
        "url": "http://m.youdao.com/dict?le=eng&q=%E6%9C%88%E9%A3%9F"
    },
    "basic": {
        "phonetic": "yuè shí",
        "explains": [
            "[天] eclipse of the moon",
            "[天] lunar eclipse"
        ]
    },
    "l": "zh-CHS2en",
    "speakUrl": ""
}

编译安装ss-qt5

OS: Ubuntu Desktop 18.04

相关wiki:


sudo apt-get update
#环境
#如果下面编译报错请使用apt-cache search 来查找相似名称的包
sudo apt-get install \
    cmake\
    qtbase5-dev\
    libqrencode-dev\
    libzbar-dev\
    libappindicator1\
    git\
    libbotan-2-dev

OPT_BASE=~
OPT_BASE=${OPT_BASE}/opt
mkdir ${OPT_BASE}
cd ${OPT_BASE}
#编译libshadowsocksqt5
git clone https://github.com/shadowsocks/libQtShadowsocks
cd libQtShadowsocks
git checkout stable
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j4
sudo make install
#编译shadowsocks-qt5
cd ${OPT_BASE}
git clone https://github.com/shadowsocks/shadowsocks-qt5
cd shadowsocks-qt5
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j4
sudo make install

Chrome地址栏默认不再是自动补全

首先说明一点,这是个feature,相信找到这的都觉得这不是什么好东西,所以我们来关了它

原地址

As Harwin & PlasticIssue points out, to avoid this issue, one can go to chrome://flags/#omnibox-drive-suggestions

and set that “Omnibox Google Drive Document suggestions” flag to Disabled.

What is Google thinking, is this about increasing search ad profits at the expense of usability?

上文中给出了一个Chrome设置的地址,点击之后会进入设置页面,同时需要改的那一项会被标黄

如同这位老哥吐槽的一样,Google为什么会想到这么个东西,好影响体验啊