Showing posts with label SELF-C. Show all posts
Showing posts with label SELF-C. Show all posts

Sunday, April 19, 2020

Install Cuda 10.1 & TensorFlow 2.1 on ubuntu 18.04

1. Install Cuda 10.1 & TensorFlow 2.1

@reference_1_tensorflow.org

(1)  Install conda: `conda create -n your_env_name python=3.7 pip`
(2) `pip install tensorflow`

@reference_2_itfashion4u

2. Downgrade versions if necessary

`apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 libnvinfer-dev=6.0.1-1+cuda10.1 libnvinfer-plugin6=6.0.1-1+cuda10.1 --allow-downgrades`

3. Uncheck Nvidia repositories to prevent ubuntu software updater from updating 
"Software & Updates" => "Other Software" => uncheck Nvidia repositories

Monday, August 5, 2019

Reinstall ubuntu 19.04 dual boot on T470p - Install Pycharm, Clion, Intellij Idea

1. Download pycharm  (Clion, Intellij Idea)
2. Put it into the directory you want to install pycharm in, unzip it:
    `tar -xvzf pycharm-professional-2019.x.tar.gz`

3. Create a 'desktop shortcut launcher':
(1) `apt install --no-install-recommends gnome-panel`
      (The 'gnome-desktop-item-edit' command may be missing as it is not installed by default.)
(2) Create Desktop Launcher Dialog:     `gnome-desktop-item-edit ~/Desktop/ --create-new`
      Enter name, the path to the application binary executable and an optional comment. When ready, click on 'OK'.
(3) Double-click on the new shortcut to edit it:
      Change `Icon= ...` and `Icon[en_US]=...` path to the desirable icon path, e.g., '.../pycharm-2019.x/bin/pycharm.png'.

(4) Right-click on the new shortcut and select "Allow Launching".
      Double-click on the new shortcut to launch pycharm.

@reference_1_linuxconfig.org

4.  "File" --> "Setting" --> search "font" --> "Font" of "Editor" --> set font size '19'

Thursday, August 1, 2019

Reinstall ubuntu 19.04 dual boot on T470p - Setting (2)

1. Right click on the desktop, in the menu select "Display Settings"
   "Display Settings" --> "Resolution" --> "2048 x 1152 (16:9)"
                                  --> "Refresh Rate" --> "119.96Hz"
                                  --> "Scale" --> "100%"

2. Open "Terminal" --> "Preferences" --> "Unnamed" -->
               "Initial terminal size" --> "152 x 36"
               "Custom font" --> "12"

3.  Open "Settings"
(1) "Dock" --> scale dock to a proper size
(2) "Privacy" --> configure privacy setting
(3) "Power" -->
                   "Blank screen" --> select "Never"
                   "Automatic suspend" --> "off"
                   "When the Power Button is pressed" --> "Suspend"
(4) "Details" --> "About" --> modify "Device name" to make it short in terminal
                     --> "Date & Time" --> set proper date & time format
                     --> "User" --> select an image for login
                     --> "Default Application" --> select proper default application

4. Install "tweaks"
`sudo add-apt-repository universe`
`sudo apt install gnome-tweak-tool`
Open "tweaks":
(1) "General" --> turn off "Suspend when laptop lid is closed"
(2) "Top Bar" --> Select proper 'clock' and 'calendar' format
(3) "Windows" --> turn on "Center New Windows"

5. Install "VLC media player" from "Ubuntu Software"
(1) click 'loop one sign'
(2) "Tools" --> "Preferences" --> "Interface" -->
           "Show media change popup" --> select "Never"
           "Continue playback?" --> select "Never"
           "Save recently played items" --> "off"
           "Allow metedata network access"  --> "off"
     Open ubuntu system "Settings" -->
           "Notifications" --> "VLC media player" --> "off"
       
6.  Playing videos in firefox
If those streaming services use DRM, you must enable DRM in Firefox's settings: "Preferences -> General -> Play DRM-controlled content"
You might also have to install package libavcodec-extra to get the codecs:
`sudo apt install libavcodec-extra`

@reference_1_askubuntu.com

Reinstall ubuntu 19.04 dual boot on T470p - Setting (1)

1.  Fix Windows and Linux Showing Different Times When Dual Booting
 To make linux use Local Time (not UTC time):
 `timedatectl set-local-rtc 1 --adjust-system-clock`

 To check your current settings, run:
`timedatectl`



 To undo this change:
 `timedatectl set-local-rtc 0 --adjust-system-clock`
 
@reference_1_ howtogeek.com


2. Add a (command) directory to the '$PATH' in Ubuntu
Edit `.bashrc` in your home directory and add the following line: 
`export PATH="/path/to/dir:$PATH"`

You will need to source your '.bashrc' or logout/login (or restart the terminal) for the changes to take effect. To source your '.bashrc', simply type 
`source ~/.bashrc`

@reference_2_askubuntu.com

3.  Install "proxychains"
 `apt-get install proxychains`
Edit:   `/etc/proxychains.conf`               (`chmod...` etc.)
Add:  `socks5 127.0.0.1 1080`

Note that: there is a DNS issue in "tsocks"

Use the following script to switch ports:
`re='^[0-9]{4}$'
if [ "$#" -eq  "0" ]
  then
    echo "Error: No arguments supplied"
else
    if ! [[ $1 =~ $re ]] ; then
       echo "Error: argument '$1' is illegal!"
    else sudo sed -i -r 's/(127.0.0.1 )([0-9]{4})/\1'"$1"'/g' /etc/proxychains.conf
    fi
fi
`

@reference_3_yuzhangbit.github.io

4.  Add “New Document” back to the right-click menu
`touch ~/Templates/"Untitled Document"`

@reference_1_vitux.com

5. How to auto-mount windows 10 ntfs partition in dual-boot ubuntu system ?
    "Activities" --> search "Disks" --> select the partition to auto-mount -->
                click [gears icon] (Additional partition options) --> 
                click "Edit Mount Options..." --> 
                turn off "User Session Defaults" -->
                set "Mount Point" to `/media/xxxxx/D Volume` (or other pathes) -->
                click "OK" --> reboot system to check



Wednesday, July 31, 2019

Reinstall ubuntu 19.04 dual boot - install vmware workstation 15 pro

1. Uninstall Workstation Pro from a Linux Host
`su` root
`vmware-installer -u vmware-workstation`

(To inistall, 'sh' the bundle file)

@reference_1_docs.vmware.com

2. Prompt "No 3d support is available from the host" and "hardware graphics acceleration is not available" when booting up the virtual machine.

edit `.vmware/preferences`
`mks.gl.allowBlacklistedDrivers = "TRUE"`

@reference_2_askubuntu.com

3. “Install VMware Tools” greyed out

shutdown the machine and change both the "floppy drive" and "cd drive" to "Auto detect" and then power on the machine.

@reference_3_askubuntu.com

4.  Install VMware Tools 10.3.10 in windows10 vm on ubuntu host machine
(1) Download the 10.3.10 tools from VMware. https://my.vmware.com/web/vmware/details?downloadGroup=VMTOOLS10310&productId=491
(could be downloaded without proxy)
      Get the zip file with Windows and Linux tools.
(2) Unpack the zip file, and execute `chmod 777 -R VMware-Tools-core-10.3.10-12406962` .
(3) Set "floppy drive" to "pvscsi-Windows8.flp" and "cd drive" to "windows.iso" respectively.
(4) Restart the virtual machine, then click into the "cd drive" to install the "VMware Tools"

@reference_4_vm.knutsson.it
@reference_5_communities.vmware.com
@reference_6_my.vmware.com

5. Note that
There is NO "clean up disks" availability for Linux host VMware workstation.
In windows host there is an option to "reclaim disk space" but running with linux as host, that doesn't exist.

@reference_7_communities.vmware.com

6. System "Swap" memory problem
If the size of "Swap Partition" memory allocation is too low when you install the ubuntu dual boot system, your virtual window10 on the ubuntu host could be extremely slow.
To solve the problem:
(1) Run VMware under root (Terminal: `su` --> `vmware`)
(2) Click "Edit" --> "Preferences" --> "Memory" --> "Additional Memory"
      --> select "Fit all virtual machine memory into reserved host RAM"


Wednesday, September 13, 2017

About using iptables owner match to block a specific application

iptables -A OUTPUT -m owner --gid-owner black -j REJECT

User name (uid) or group name (gid) won't help because these are the IDs of the user executing the application. Thus it would apply to all applications by that particular user and not just a single one.
Blocking a specific application is usually done by blocking all ports the application uses. But this only works if the user can't change the ports the application will use.

@reference_1_unix.stackexchange.com
Block specific application with iptables


Then how to establish a white-list mode using iptables owner match?

#Allow Loopback Connections
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

iptables -A OUTPUT -m owner --uid-owner current_login_user -j REJECT
iptables -A OUTPUT -m owner --uid-owner root -j REJECT
iptables -A OUTPUT -m owner --uid-owner other_users -j REJECT

1. block all the users using above commands
2. create a white-list user allowed to use network
3. start your program using the white-list user under your current login user

root privilege & execute permission

sudo chmod 000 xxx
execution of the script(or program) xxx under the root account will be denied.

sudo chmod 100 xxx
sudo chmod 001 xxx
sudo chmod 010 xxx

either command above will make the execution of the script(or program) xxx under the root account accepted.

Difference between `sh xxx.sh` & `./xxx.sh` commands in ubuntu

`sh xxx.sh` requires +r Permission
`./xxx.sh` requires +rx Permission


@reference_1_forum.ubuntu.org.cn
./和sh的区别

Sunday, August 27, 2017

Can't open Apps from the SearchBar in windows 10


Setting the option "Language for non-Unicode programs" to Chinese(or other languages) or making other language settings in windows 10 may result in the problem of "can't open Apps from SearchBar (click with no response)". Even if you change it back when it happens, the problem won't disappear.

Solution:
1. first change the settings back to the original language
2. set the windows display language to Chinese(or other languages)
3. change the system display language back to English

Some similar problems:
@reference_1_answers.microsoft.com
Q: Windows 10 - Can't Open Apps From Search Bar
@reference_2_superuser.com
Windows 10 - Can't open apps I search for in the start menu
@reference_3_tomshardware.com
can't open apps founded through search
@reference_4_superuser.com
Win 10 - Can't open Desktop Apps from SearchBar

Thursday, July 27, 2017

Minimize network traffics in Win10

#Step 1:  
Disable win10 update service. (Pro / Enterprise Edition required)

#Step 2:
Download & open  Firewall App Blocker (Fab) v1.6 .

Switch to the Whitelist Mode,  add the applications you want to use to the whitelist.

#Step3:
Open windows firewall settings, add custom rules (e.g. add dns server, proxy server, gate to the allowlist/whitelist, block some LAN ip etc.), disable some default rules.

#Step4: 
Open the Wireshark, observe & record the DNS query traffics , then block those domain names queried by win10 or other apps in the ‘C:\WINDOWS\system32\drivers\etc\hosts’ file as follows:

# [start - Block m$]
127.0.0.1 win10.ipv6.microsoft.com
127.0.0.1 dns.msftncsi.com
127.0.0.1 client.wns.windows.com
127.0.0.1 c.urs.microsoft.com
127.0.0.1 v10.vortex-win.data.microsoft.com
127.0.0.1 www.msftconnecttest.com
127.0.0.1 v4ncsi.msedge.net
127.0.0.1 ncsi.4-c-0003.c-msedge.net
127.0.0.1 4-c-0003.c-msedge.net
127.0.0.1 travel.tile.appex.bing.com
127.0.0.1 cdn.content.prod.cms.msn.com
127.0.0.1 cdn.content.prod.cms.msn.com.edgekey.net
127.0.0.1 e10663.g.akamaiedge.net
127.0.0.1 iecvlist.microsoft.com
127.0.0.1 ie9comview.vo.msecnd.net
127.0.0.1 cs9.wpc.v0cdn.net
127.0.0.1 settings-win.data.microsoft.com
127.0.0.1 asimov-win.settings.data.microsoft.com.akadns.net
127.0.0.1 geo.settings.data.microsoft.com.akadns.net
127.0.0.1 hk2.settings.data.microsoft.com.akadns.net
127.0.0.1 go.microsoft.com
127.0.0.1 go.microsoft.com.edgekey.net
127.0.0.1 e11290.dspg.akamaiedge.net
127.0.0.1 displaycatalog.mp.microsoft.com
127.0.0.1 displaycatalog.md.mp.microsoft.com.akadns.net
127.0.0.1 displaycatalog-asia.md.mp.microsoft.com.akadns.net
127.0.0.1 hk2.displaycatalog.md.mp.microsoft.com.akadns.net
127.0.0.1 watson.telemetry.microsoft.com
127.0.0.1 modern.watson.data.microsoft.com.akadns.net

127.0.0.1 sway-cdn.com
127.0.0.1 cdn.onenote.net
127.0.0.1 weather.services.appex.bing.com
127.0.0.1 candycrushsoda.king.com
127.0.0.1 go.microsoft.com
127.0.0.1 www.bing.com  ####
# [end - Block m$]




Wednesday, July 5, 2017

setTimeout(..., 0)

Question: What does the following code print?
console.log('one');
setTimeout(function() {
  console.log('two');
}, 0);
console.log('three');
@reference_1_github
A:
one
three
two

add - Currying

Question: How would you make this work?
add(2, 5); // 7
add(2)(5); // 7
@reference_1_github.com

A:
function add_(a){   
    return function(b){
        return a + b;
    };
}
function add(a){
   var acc = 0;
   var sub = function(b){
       if(b === undefined)
         return acc;
       else if(!isNaN(b))
         acc += b;
       return sub;
   };
   return sub(a);
}

@reference_2_codeburst.io

Monday, June 19, 2017

Youdao Dictionary API

http://dict.youdao.com/jsonapi?q=nice&keyfrom=deskdict.mini&dogVersion=1.0&dogui%20=%20json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts=%7B%22count%22%3A4%2C%22dicts%22%3A%5B%5B%22ec%22%2C%22ce%22%2C%22cj%22%2C%22jc%22%2C%22ck%22%2C%22kc%22%2C%22cf%22%2C%22fc%22%20%2C%20%22multle%22%20%5D%2C%5B%22web_trans%22%5D%2C%5B%22fanyi%22%5D%2C%5B%22typos%22%5D%5D%7D&LTH=47

Decode:
http://dict.youdao.com/jsonapi?q=nice&keyfrom=deskdict.mini&dogVersion=1.0&dogui = json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts={"count":4,"dicts":[["ec","ce","cj","jc","ck","kc","cf","fc" , "multle" ],["web_trans"],["fanyi"],["typos"]]}&LTH=47

http://dict.youdao.com/jsonapi?q=good&keyfrom=deskdict.main&dogVersion=1.0&dogui=json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts=%7B%22count%22%3A12%2C%22dicts%22%3A%5B%5B%22newjc%22%5D%2C%5B%22newcj%22%5D%2C%5B%22auth_sents_part%22%5D%2C%20%5B%22longman%22%5D%20%2C%20%5B%22collins%22%5D%20%2C%20%5B%22ec21%22%5D%2C%5B%22hh%22%5D%2C%5B%22ee%22%5D%2C%5B%22media_sents_part%22%5D%2C%5B%22rel_word%22%5D%2C%5B%22special%22%5D%2C%5B%22syno%22%5D%5D%7D&LTH=1828

Decode:
http://dict.youdao.com/jsonapi?q=good&keyfrom=deskdict.main&dogVersion=1.0&dogui=json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts={"count":12,"dicts":[["newjc"],["newcj"],["auth_sents_part"], ["longman"] , ["collins"] , ["ec21"],["hh"],["ee"],["media_sents_part"],["rel_word"],["special"],["syno"]]}&LTH=1828

http://dict.youdao.com/jsonapi?q=good&le=en&dicts={%22count%22:12,%22dicts%22:[[%22newjc%22],[%22newcj%22],[%22auth_sents_part%22],%20[%22longman%22]%20,%20[%22collins%22]%20,%20[%22ec21%22],[%22hh%22],[%22ee%22],[%22media_sents_part%22],[%22rel_word%22],[%22special%22],[%22syno%22]]}

Decode:
http://dict.youdao.com/jsonapi?q=good&le=en&dicts={"count":12,"dicts":[["newjc"],["newcj"],["auth_sents_part"], ["longman"] , ["collins"] , ["ec21"],["hh"],["ee"],["media_sents_part"],["rel_word"],["special"],["syno"]]}

http://dict.youdao.com/jsonapi?q=good&le=en&dicts={"count":1,"dicts":[["collins"]]}

@url encode/decode

Monday, January 16, 2017

A better way to search an Object in an Array

You can use the Array.prototype.map() to create a shadow array, which will help you search more fast, or furthermore you can create an index object like below, it will directly return the index you need.

var cars = [
    { id:23, make:'honda', color: 'green' },
    { id:36, make:'acura', color:'silver' },
    { id:18, make:'ford', color:'blue' },
    { id:62, make:'ford', color:'green' }, 
];
let cars_s = cars.map(function(x) {
    return x.id;
});
let i = cars_s.indexOf(18);
console.log(i); // 2
console.log(cars[i]); // { id:18, make:'ford', color:'blue' }

let index = {};
for (let i = 0; i < cars_s.length; i++) {
    index[cars_s[i]] = i;
}
console.log(index[18]); // 2

@reference_1_stackoverflow
 

Sunday, January 15, 2017

Object Clone & Closure & Date

Some built-in objects have properties hidden in a closure(namespace), such as Date/String objects. So if you clone an object by just recursively copying all the enumerable or non-enumerable variables/methods into an empty object, it won't work, even including its prototype. It is impossible to detect the private variables(closure) in an object in Javascript.

A lot of people (including me) who try to write the deep clone method will finally find it almost impossible:
@reference_1_stackoverflow

Monday, January 9, 2017

window & Window.prototype

console.log(Window.prototype.__proto__.__proto__.__proto__ === Object.prototype); 
// true (Firefox & Chrome)
console.log(Window.prototype.__proto__ === Object.prototype);   
// true (IE11)

console.log(window instanceof Window);     // true console.log(Window.prototype.isPrototypeOf(window));    // true

Wednesday, December 28, 2016

Object.create(null) & isNaN()

isNaN(Object.create(null)); // throw an error: Number expected

The Number.isNaN() method determines whether the passed value is NaN. It is a more robust version of the original, global isNaN().
@reference_1_stackoverflow
@reference_2_mozilla

Monday, December 5, 2016

Baidu Fanyi

var url = "http://fanyi.baidu.com/v2transapi";
var form = {
                    from: "en",
                    to: "zh",
                    query: "hot",
                    transtype: "realtime",
                    simple_means_flag: 3 };
$.post(url, form, showMsg);
------------------------------------------------------------
"liju_result" decoding codes are in the  "index_60f64ad.js" file
.....................................................................
var u = ["《柯林斯高阶英汉双解学习词典》", "《汉英大词典》", "百度翻译例句库"];

function buildSample(t) {
    var e = t;
    var a = "en", n = "zh";
    var r = {};
    if (r.tplData = {}, r.tplData.to_lang = n, e["double"] = e["double"].replace(/\\'/g, "'"), e.single = e.single.replace(/\\'/g, "'"), e["double"] = e["double"].replace(/[‘|’]/g, "'"), e.single = e.single.replace(/[‘|’]/g, "'"), e["double"]) {
        var u = this.getDoubleSample(e["double"]);
        r.tplData["double"] = u["double"], r.tplData.senData = u.senData, s = r;
    }
    if (e.single) {
        e.single = $.parseJSON(e.single), e.senData2 = [];
        for (var g = 0, p = e.single.length; p > g; g++) {
            var d, m = "";
            "zh" === n ? d = e.single[g][0] : "en" === n && (d = e.single[g][1]);
            for (var c = 0, h = d.length; h > c; c++)
                m += d[c][0], d[c][3] && (m += d[c][3]);
            m = encodeURIComponent(m), e.senData2[g] = m;
            var v = e.single[g][1];
            if (/^http\:\/\//.test(v)) {
                v = v.replace(/^http\:\/\//, "");
                var f = v.indexOf("/");
                e.single[g][2] = f > 0 ? v.substr(0, f) : v;
            } else
                e.single[g][2] = e.single[g][1], e.single[g][1] = "#";
        }
        r.tplData.single = e.single, r.tplData.senData2 = e.senData2;
    }
    return r.tplData;
}

function getDoubleSample(t) {
    var n = "zh";
    var e = {};

    e["double"] = $.parseJSON(t), e.senData = [];
    for (var a = !0, s = 0, l = e["double"].length; l > s; s++) {
        var i, o = "";
        "zh" === n ? i = e["double"][s][0] : "en" === n && (i = e["double"][s][1]);
        for (var r = 0, g = i.length; g > r; r++)
            o += i[r][0], i[r][4] && (o += i[r][4]);
        o = encodeURIComponent(o), e.senData[s] = o, a && $.inArray(e["double"][s][2], u) < 0 && (e["double"][s].isFirstNetSt = !0, a = !1);
        var p = e["double"][s][2];
        if (/^https?\:\/\//.test(p)) {
            p = p.replace(/^https?\:\/\//, "");
            var d = p.indexOf("/");
            e["double"][s][3] = d > 0 ? p.substr(0, d) : p;
        } else
            e["double"][s][3] = e["double"][s][2], e["double"][s][2] = "#";
    }
    return e;
}
------------------------------------------------------
var liju = {
      "double": "[[[[\"Some\",\"w_0\"............................."
      "tag": [
                 "截至"
      ],
     "single": "[[[[\"\\\"\",\"w_0\",0],[................................."
}

/*
 var txt = getDoubleSample(liju.double);
 var t = "", x, y;
for(x in txt["senData"]){
y = Number(x) + 1;
t += y + ". "+ txt["senData"][x] + "<(转义)br(转义)>"; }
t = decodeURIComponent(t);
$("#demo").html(t);
 */
var txt = buildSample(liju);
var t = "", x, y;

for (x in txt["senData2"]) {
y = Number(x) + 1;
 t += y + ". " + txt["senData2"][x] + "<(转义)br(转义)>"; }
t = decodeURIComponent(t);
$("#demo").html(t);

Thursday, December 1, 2016

iciba - word

http://dict-mobile.iciba.com/interface/index.php?callback=jQuery19008480490877831784_1480641521922&c=word&m=getsuggest&nums=10&ck=709a0db45332167b0e2ce1868b84773e&timestamp=1480641526056&client=6&uid=0&is_need_mean=1&word=good&_=1480641521936

http://dict-mobile.iciba.com/interface/index.php?callback=jQuery19008480490877831785_1480641521923&c=word&m=getsuggest&nums=10&ck=709a0db45332167b0e2ce1868b84773e&timestamp=1480641526056&client=6&uid=0&is_need_mean=1&word=kid&_=1480641521944

http://dict-mobile.iciba.com/interface/index.php?callback=jQuery&c=word&m=getsuggest&nums=10&ck=709a0db45332167b0e2ce1868b84773e&timestamp=1480641526056&client=6&uid=0&is_need_mean=1&word=kick&_=1480641521944

-----------------------------------------------
search.js
define("m-search", ["api", "history"], function(e, t) {
    e.regist("getsuggest", "http://dict-mobile.iciba.com/interface/index.php", {
        c: "word",
        m: "getsuggest",
        nums: 10,
        ck: "709a0db45332167b0e2ce1868b84773e",
        timestamp: (new Date).getTime(),
        client: 6,
        uid: 0,
        is_need_mean: 1
    }), e.regist("hotword", "http://dict-mobile.iciba.com/interface/index.php", {
        c: "hotword",
        m: "getword",
        client: 4,
        type: 1,
        timestamp: 1449818906,
        uuid: "45E0C158-F794-4F5C-90BB-69FA54F9CD53",
        v: "8.2.4",
        sv: "iPhoneOS7.1.1",
        sign: "7094eb96b203669e",
        uid: "",
        wtype: 1,
        size: 10,
        lang: 1
    });

.............................................................
----------------------------------------------
http://dict-pc.iciba.com/interface/index.php?callback=jQuery&c=word&m=getsuggest&nums=10&ck=709a0db45332167b0e2ce1868b84773e&timestamp=1480641526056&client=6&uid=0&is_need_mean=1&word=kick&_=1480641521944

http://dict-pc.iciba.com/interface/index.php?c=word&m=getsuggest&nums=10&ck=709a0db45332167b0e2ce1868b84773e&timestamp=1480641526056&client=6&uid=0&is_need_mean=1&word=bus&_=1480641521944

http://dict-pc.iciba.com/interface/index.php?c=word&m=getsuggest&nums=30&client=6&is_need_mean=1&word=rodent

??????????????????????????
http://dict-pc.iciba.com/interface/index.php?c=word&m=getsuggest&nums=10&client=6&is_need_mean=1&word=as%20of

@reference_1

Sunday, November 27, 2016

insert values (` !== ", ` !== ')

INSERT INTO t_users (`t_username`, `t_password`, `t_name`, `t_email`) VALUES (`qqqqq`, `3bad6af0fa4b8b330d162e19938ee981`, `qqqq`, `qqqq`)
报错:  #1054 - Unknown column 'qqqqq' in 'field list'


 INSERT INTO t_users (`t_username`, `t_password`, `t_name`, `t_email`) VALUES ("qqqqq", "3bad6af0fa4b8b330d162e19938ee981", "qqqq", "qqqq")
或者
INSERT INTO t_users (`t_username`, `t_password`, `t_name`, `t_email`) VALUES ('qqqqq', '3bad6af0fa4b8b330d162e19938ee981', 'qqqq', 'qqqq')
执行成功

总结:插入值引号用"或',不能用` 。(` !== ", ` !== ')