鍍金池/ 問答/ Linux問答
陪她鬧 回答
21世紀(jì)是 生物科學(xué) 漂亮代碼的世紀(jì)
# 我假設(shè)你知道這幾行在干啥
git init
git remote add origin PATH/TO/REPO
git fetch

# 指定現(xiàn)在的工作是基于哪個(gè)提交的
git reset origin/Branch_V1.20180611

# 切換到那個(gè)分支
git checkout -t origin/Branch_V1.20180611

# 剩一個(gè)自動(dòng)生成的master,刪掉
git branch -d master

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

鹿惑 回答

前后端分離方式,實(shí)現(xiàn)跨域:

1.模擬后端開發(fā),拉后端代碼。(要后端代碼,沒坑,效率低)
2.前端開啟web服務(wù)器,node服務(wù)器或者nginx服務(wù)器。(前端自由,不用管后端)

node服務(wù)器:

proxyTable: {
  '/api': {
    target: 'http://segmentfault.com',
    pathRewrite: {
      '^/api': ''
    }
  }
}
1.比如ajax接口"/getMessage",本地"localhost:8080/getMessage",有跨域的問題。
2.localhost:8080 => http://segmentfault.com,本地開啟服務(wù)器實(shí)現(xiàn)代理。

nginx服務(wù)器:

http {
    server {
        listen  8080; #本地端口        
        server_name localhost;
        location  ~*/get*|post* { #nginx正則匹配(可高度自定義)            
            proxy_pass http://segmentfault.com; #反向代理
        }
    }
}
1.比如ajax接口"/getMessage",本地"localhost:8080/getMessage",有跨域的問題。
2.localhost:8080 => http://segmentfault.com,本地開啟服務(wù)器實(shí)現(xiàn)代理。
3.nginx反向代理更多配置查詢http://www.nginx.cn/115.html。

參考:
1.Vue-cli proxyTable
2.nginx搭建web服務(wù)器

巴扎嘿 回答

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

好難瘦 回答

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

#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif

圖片描述

何蘇葉 回答

不是很清楚你創(chuàng)建app和config中的代碼怎么寫的,但是應(yīng)該不是相對(duì)路徑的問題。
我使用相對(duì)路徑就可以的。
建議下次提問的時(shí)候把報(bào)錯(cuò)信息、相關(guān)代碼全貼出來。

# config文件配置
SQLALCHEMY_DATABASE_URI = 'sqlite+pysqlite:///./test.db'
骨殘心 回答

storage::exists($results['capture_photo_path'])就好了;

裸橙 回答

執(zhí)行下面語句后再發(fā)布看看

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

下表是一些官方鏡像的大?。?/p>

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

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

安淺陌 回答

這哪里是亂碼啊,應(yīng)該是你的curl有問題

手持兩把錕斤拷,口中疾呼燙燙燙。腳踏千朵屯屯屯,笑看萬物锘锘锘。

好把 不開玩笑了,

錕斤拷 是在GBK和UTF-8編碼的兩種數(shù)據(jù)混用時(shí)會(huì)時(shí)常會(huì)發(fā)生的現(xiàn)象,應(yīng)該是你的終端默認(rèn)字符是GBK的,網(wǎng)頁返回的時(shí)UTF-8了

莓森 回答

沒試過netty,但換jetty是這樣:

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
        </dependency>
悶油瓶 回答

最簡(jiǎn)單的可能就是命令沒有軟鏈到bin目錄下,shell查找的目錄里沒有pip命令,你加個(gè)軟鏈到/usr/local/bin之類的目錄下

赱丅呿 回答

abc.efg.com域名一般是放在

 server {
    listen 80;
    server_name abc.efg.com;

這個(gè)位置的。
然后

localtion /{
  proxy_pass http://122.22.22.22:2222/;
}

clipboard.png
nginx訪問靜態(tài)文件和uwsgi是沒啥關(guān)系的,都是一樣的配制方法.無論用gunicorn還是uwsgi都是這么配置.
這是我隨手截圖的寫法,用的是root,
按照alias寫法,就要在下邊的路徑加上/static/
你看看加上尾部的/行不行.

還有就是nginx是否有權(quán)限訪問你的文件目錄的問題.看一下nginx運(yùn)行的用戶是誰

話寡 回答

https://segmentfault.com/q/10...
——————————————————————————————
第一次回復(fù)時(shí)沒看你的內(nèi)容,只回應(yīng)了標(biāo)題所以貼了個(gè)網(wǎng)址
下面正式回復(fù)
你的問題不是cookies的問題,我根據(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
純妹 回答

假定你的這個(gè)modelnamespacestock
那么組件需要這樣寫:

import connect from 'dva';

export default connect(state => state)(({stock: stockData}) => {
 //your component

 console.log(stockData); //這里就可以獲取到你要東西了。
})

記得在index.js或者router中,引入這個(gè)model.js