在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/ Linux問(wèn)答
奧特蛋 回答
  1. 如果是阻塞式的,那只能代表數(shù)據(jù)已發(fā)出去,但不能保證對(duì)方已收到;如果是非阻塞式的,select到OP_WRITE就說(shuō)明數(shù)據(jù)已發(fā)出去;無(wú)論哪種方式似乎都無(wú)法確保對(duì)方收到,除非對(duì)方用數(shù)據(jù)來(lái)應(yīng)答;
  2. 對(duì)方宕機(jī)(或者拔網(wǎng)線),理論上我方是無(wú)法知道狀態(tài)的,如果對(duì)方進(jìn)程被kill掉,那么操作系統(tǒng)可能會(huì)給回一個(gè)FINRST,你應(yīng)該會(huì)select到一個(gè)OP_READ,并在read時(shí)得到-1或異常。
情殺 回答

沒(méi)用過(guò)這個(gè)引導(dǎo)。

但你看屏幕提示的是,找不到它的配置文件,而你做的只是改配置,所以,你是不是可以去網(wǎng)上看下,到底它的配置是放哪的?有沒(méi)有特殊要求?網(wǎng)上有沒(méi)有出現(xiàn)過(guò)類似的錯(cuò)誤?

你好胸 回答

你去了解一下 happens-before 就清楚了

清夢(mèng) 回答

//把nginx默認(rèn)的配置文件備份下,改改就可以了。
server {
????????#這是你要代理到的80端口
????????listen????80;
????????#這是訪問(wèn)的域名
????????server_name??http://localhost;

????????root html;

????????access_log??logs/nginx.access.log??main;
????????
????????#然后下面才是你要代理的幾個(gè)tomcat
?
????????#默認(rèn)請(qǐng)求
????????location / {
????????????index index.php index.html index.htm;??
????????}
????????location /tomcat1 {

        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://localhost:8081;
    }
    location /tomcat2 {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://localhost:8082;
    }
    location /tomcat3 {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://localhost:8083;
    }
    #其他配置略
}
巴扎嘿 回答

決定并發(fā)的根本原因是數(shù)據(jù)庫(kù)存取,其次一個(gè)服務(wù)器能承載的并發(fā)量并非軟件決定,還是要看硬件性能

硬扛 回答

提示的很清楚。login.js中有個(gè)對(duì)象的屬性是apply,出現(xiàn)了這個(gè)對(duì)象為undefined的情況。
判斷一下空undefined的情況。

背叛者 回答
Alpine Linux操作系統(tǒng)是一個(gè)面向安全的輕型Linux發(fā)行版,Alpine Linux Docker鏡像也繼承了Alpine Linux發(fā)行版的這些優(yōu)勢(shì)。相比于其他Docker鏡像,它的容量非常小,僅僅只有5M,且擁有非常友好的包管理器。

下表是一些官方鏡像的大小:

鏡像名稱 大?。∕B)
ubuntu:latest 187.9
debian:latest 125.1
centos:latest 196.6
alpine 4.794
話寡 回答

https://segmentfault.com/q/10...
——————————————————————————————
第一次回復(fù)時(shí)沒(méi)看你的內(nèi)容,只回應(yīng)了標(biāo)題所以貼了個(gè)網(wǎng)址
下面正式回復(fù)
你的問(wèn)題不是cookies的問(wèn)題,我根據(jù)那篇文章改了下運(yùn)行成功了,你自己對(duì)照下

package main

import (
    "fmt"
    "io"
    "io/ioutil"
    "log"
    "net/http"
    "net/http/cookiejar"
    "net/url"
    "regexp"
    "strings"
)

var cookies_lagou []*http.Cookie

const (
    login_url_lagou string = "https://passport.lagou.com/login/login.html"

    post_login_info_url_lagou string = "https://passport.lagou.com/login/login.json"

    username_lagou string = "13330295142"
    password_lagou string = "4525674692ac06e619cdb3f1b4b65b08"
)

func getToken(contents io.Reader) (string, string) {

    data, _ := ioutil.ReadAll(contents)

    regCode := regexp.MustCompile(`X_Anti_Forge_Code = '(.*?)';`)
    if regCode == nil {
        log.Fatal("解析Code出錯(cuò)...")
    }

    //提取關(guān)鍵信息
    code := regCode.FindAllStringSubmatch(string(data), -1)[0][1]

    regToken := regexp.MustCompile(`X_Anti_Forge_Token = '(.*?)';`)
    if regToken == nil {
        fmt.Println("MustCompile err")
    }

    //提取關(guān)鍵信息
    token := regToken.FindAllStringSubmatch(string(data), -1)[0][1]

    return token, code
}

func login_lagou() {
    //獲取登陸界面的cookie
    jar, _ := cookiejar.New(nil)
    client := &http.Client{
        Jar: jar,
    }
    req, _ := http.NewRequest("GET", login_url_lagou, nil)
    res, _ := client.Do(req)
    // for k, v := range res.Cookies() {
    //     fmt.Printf("%v=%v\n", k, v)
    // }
    token, code := getToken(res.Body)
    fmt.Println(token, code)
    //post數(shù)據(jù)
    postValues := url.Values{}
    postValues.Add("isValidate", "true")
    postValues.Add("username", username_lagou)
    postValues.Add("password", password_lagou)
    postValues.Add("request_form_verifyCode", "")
    postValues.Add("submit", "")
    // body := ioutil.NopCloser(strings.NewReader(postValues.Encode())) //把form數(shù)據(jù)編下碼
    // requ, _ := http.NewRequest("POST", post_login_info_url_lagou, nil)

    requ, _ := http.NewRequest("POST", post_login_info_url_lagou, strings.NewReader(postValues.Encode()))
    requ.Header.Set("Referer", "https://passport.lagou.com/login/login.html")
    requ.Header.Set("X-Requested-With", "XMLHttpRequest")
    requ.Header.Set("X-Anit-Forge-Token", token)
    requ.Header.Set("X-Anit-Forge-Code", code)
    requ.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0")
    requ.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")

    //for _, v := range res.Cookies() {
    //    requ.AddCookie(v)
    //}

    res, _ = client.Do(requ)
    //cookies_lagou = res.Cookies()
    data, _ := ioutil.ReadAll(res.Body)
    res.Body.Close()
    fmt.Println(string(data))
}

func main() {
    login_lagou()
}

運(yùn)行結(jié)果

15f131a3-74b0-4914-bd6e-2672f36675e1 28747049
{"content":{"rows":[]},"message":"該帳號(hào)不存在或密碼(驗(yàn)證碼)誤,請(qǐng)重新輸入","state":400,"submitCode":23207051,"submitToken":"666f51d4-ccef-462a-bb56-55cb97c5231a"}

Process finished with exit code 0
好難瘦 回答

在scripts/config/
zconf.hash.c
zconf.hash.c_shipped
兩個(gè)文件中kconf_id_lookup前加入:

#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif

圖片描述

黑與白 回答

已經(jīng)解決! 吐槽一下:審核真慢
嵌套結(jié)構(gòu)體:

type SongSingle struct {
    Codes int `json:"code"`
    Date  struct {
        Song struct { // 音樂(lè)
            Count    int `json:"count"`
            Itemlist []struct {
                Albummid string `json:"albummid"`
                Docid    string `json:"docid"`
                Id       string `json:"id"`
                Mid      string `json:"mid"`
                Name     string `json:"name"`
                Singer   string `json:"singer"`
            } `json:"itemlist"`
            Name  string `json:"name"`
            Order int    `json:"order"`
            Type  int    `json:"type"`
        } `json:"song"`
        Album struct { // 專輯
            Count    int `json:"count"`
            Itemlist []struct {
                docid  string `json:"docid"`
                Id     string `json:"id"`
                Mid    string `json:"mid"`
                Name   string `json:"name"`
                Pic    string `json:"pic"`
                Singer string `json:"singer"`
            } `json:"itemlist"`
            Name  string `json:"name"`
            Order int    `json:"order"`
            Type  int    `json:"type"`
        } `json:"album"`
        Singer struct { // 歌手
            Count    int `json:"count"`
            Itemlist []struct {
                docid  string `json:"docid"`
                Id     string `json:"id"`
                Mid    string `json:"mid"`
                Name   string `json:"name"`
                Pic    string `json:"pic"`
                Singer string `json:"singer"`
            } `json:"itemlist"`
            Name  string `json:"name"`
            Order int    `json:"order"`
            Type  int    `json:"type"`
        } `json:"singer"`
        Mv struct { // mv
            Count    int `json:"count"`
            Itemlist []struct {
                docid  string `json:"docid"`
                Id     string `json:"id"`
                Mid    string `json:"mid"`
                Name   string `json:"name"`
                Singer string `json:"singer"`
                Vid    string `json:"vid"`
            } `json:"itemlist"`
            Name  string `json:"name"`
            Order int    `json:"order"`
            Type  int    `json:"type"`
        } `json:"mv"`
        Name  string `json:"name"`
        Order int    `json:"order"`
        Type  int    `json:"type"`
    } `json:"data"`
    Subcode int `json:"subcode"`
}

遍歷結(jié)構(gòu)體取值:

Sbody := string(body)
var arrayData SongSingle
if err := json.Unmarshal([]byte(Sbody), &arrayData); err == nil {

// fmt.Println("碼:", arrayData.Subcode)
// fmt.Println("子碼:", arrayData.Subcode)
for _, Songitem := range arrayData.Date.Song.Itemlist {
    fmt.Println("專輯ID:", Songitem.Albummid)
    fmt.Println("  ID  :", Songitem.Id)
    fmt.Println("歌曲ID:", Songitem.Mid)
    fmt.Println("歌  名:", Songitem.Name)
    fmt.Println("歌  手:", Songitem.Singer)
    fmt.Println("\n")
}

} else {

fmt.Println(err)

}

先看看你控制臺(tái)有沒(méi)有報(bào)什么錯(cuò)

吢丕 回答

要通過(guò)域名來(lái)區(qū)分, 步驟:

  1. nginx配置啟用 server_name
  2. 訪問(wèn)nginx的時(shí)候不要直接ip,綁定本地host,用個(gè)假域名,比如 127.0.0.1 domain.test
# 第一個(gè)域名配置
server {
     listen       80;
     server_name  domain1.test  www.domain1.test;
     ...
}
...

# 第二個(gè)域名配置
server {
     listen       80;
     server_name  domain2.test  www.domain2.test;
     ...
}
...
莫小染 回答
rsync --delete-after -avz /home/test/dir1/ /home/test/dir2

這樣寫就對(duì)了

拽很帥 回答

先把本地已經(jīng)與git倉(cāng)庫(kù)綁定的文件家添加到如圖
圖片描述

然后就可以通過(guò)pycharm直接操作,不需要在命令行敲命令了
圖片描述

未命名 回答

首先確認(rèn)重啟之前舊進(jìn)程已經(jīng)結(jié)束。

默認(rèn)情況下,TCP 端口從關(guān)閉到重新開(kāi)啟需要等待一段時(shí)間(TIME_WAIT),在這一時(shí)間段,端口不能使用。
詳情請(qǐng)查閱 TCP 標(biāo)準(zhǔn)文檔 https://tools.ietf.org/html/r...

以 Windows 操作系統(tǒng)為例,你可以通過(guò)修改 TcpTimedWaitDelay 注冊(cè)表值來(lái)降低等待時(shí)間,它的默認(rèn)值是 240 秒(4 分鐘),注冊(cè)表路徑 HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters 。

夢(mèng)囈 回答

這錯(cuò)誤不是很明顯嗎?
需要先安裝這兩個(gè):libpnglibz

舊城人 回答

git的版本管理有點(diǎn)像生物的遺傳。

每次更改都會(huì)產(chǎn)生一次變異,而checkout不同的分支就是在不同的變異特性之間切換。

checkout也可以回到之前的commit(commit可以看做是存檔點(diǎn))。

一般的開(kāi)發(fā)習(xí)慣是在某一特性的分支上開(kāi)發(fā)測(cè)試,然后merge到主分支。

膽怯 回答

location PHP配置應(yīng)該這樣:

location ~ \.php$

另外重寫的話,可以這樣寫:

server {
    listen 80;
    server_name example.com;
    index index.php index.html;
    root /code/netapi/public;

    location / {
        try_files $uri /index.php$is_args$args;
    }
}

root /code/netapi/public;可以寫在server段里,因?yàn)槟阒貙懥撕髍oot也沒(méi)變

PS:請(qǐng)?zhí)顚懘a,不要貼截圖