本來就是空的
根據(jù)查閱到的資料,我發(fā)現(xiàn)問題并沒有出在后端,而是出來前端的angular上。
在發(fā)送http請求時,需要配置一個選項:
/* 獲取驗證碼 */
getCaptcha(): Observable<any> {
const url = `${Config.apiRoot}captcha`;
const options = new RequestOptions({
withCredentials: true
});
return this.http.get(url, options)
.map(this.extraData)
.catch(this.handleError);
}
配置withCredentials: true
來允許客戶端在跨域請求時允許setcookie響應(yīng)頭。
此外,服務(wù)器端需要配置中間件:
app.all('*', function(req, res, next) {
res.header('Access-Control-Allow-Origin', 'http://localhost:4200'); // 跨域的源
res.header('Access-Control-Allow-Headers', 'Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With, X-Access-Token, X-Real-IP');
res.header('Access-Control-Allow-Methods','PUT,POST,GET,DELETE,OPTIONS');
res.header('Access-Control-Allow-Credentials', 'true');
next();
});
這樣能夠解決跨域請求時,setcookie響應(yīng)頭無效/被忽略的問題。
server {
listen 80;
server_name localhost;
location /a {
alias /test/nginx/a;
index index.html index.htm;
try_files $uri /a/index.html;
}
location /b {
alias /test/nginx/b;
index index.html index.htm;
try_files $uri /b/index.html;
}
}
Nginx 配置中設(shè)置代理的地方增加一行 proxy_redirect http:// $scheme://;
試試。
UNIVER_PROJECR_PORT='79000000'
#!/bin/bash
while read line;do
eval "$line"
done < environment-variable.ini
echo $UNIVER_PROJECR_PORT
if [ $UNIVER_PROJECR_PORT == $(sed '/^UNIVER_PROJECR_PORT=/!d;s/.*=//' /etc/profile) ];then
echo '一致'
else
echo '不一致,需要修改成配置文件中的參數(shù)'
sed -i '/UNIVER_PROJECR_PORT/d' /etc/profile #刪除原有的
echo "export UNIVER_PROJECR_PORT="$UNIVER_PROJECR_PORT>>/etc/profile #添加新的
fi
source /etc/profile
因為這兩個location是同級的,匹配了其中一個,另外一個就不會匹配到
所以第二個是永遠(yuǎn)匹配不到的
把第二個提到前面,并且加上第一個的完整配置。
location ~ wp-admin/\.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
# fastcgi cache
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 301 302 1d;
add_header X-Cache "$upstream_cache_status From $host";
fastcgi_buffering off; # Making the updates in Wordpress real time.
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
# fastcgi cache
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 301 302 1d;
add_header X-Cache "$upstream_cache_status From $host";
}
git reset --mixed HEAD^
路徑不一樣,一個是類路徑 。在項目路徑 下創(chuàng)建lib文件夾
通常是在這里加載的。
你看下你添加的遠(yuǎn)程倉庫git remote -v
, 試試在https和ssh方式間切換一下
你的代碼在linux上運行沒有任何問題
#include <stdio.h>
#include <pthread.h>
void * product(void *arg){
int rear = 0 ;
while(1) {
rear = (rear + 1)%5;
printf("p:%d\n",rear);
sleep(1);
}
}
int main(void) {
pthread_t pid;
pthread_create(&pid,NULL,product,NULL);
pthread_join(pid,NULL);
return 0;
}
編譯
gcc pthread.c -pthread
輸出
p:0
p:1
p:2
p:3
p:4
p:0
p:1
p:2
p:3
p:4
......
不知你說是內(nèi)存溢出指的是什么?什么環(huán)境條件?
安裝Samba服務(wù)器
sudo apt-get install samba
配置Samba服務(wù)
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf~orig
測試配置
[global]
security = share (share參數(shù)已廢棄)
[myshare]
path = /usr/share/doc/samba
public = yes
//測試安全級別
[global]
security = user
[myshare]
path = /usr/share/doc/samba
valid user = freya
public = no
//可選參數(shù)
writeable = yes //可以寫入
valid user = @Teacher //使用組方式驗證-
配置Samba用戶
可以使用系統(tǒng)賬號來配置
創(chuàng)建系統(tǒng)用戶(配置Ubuntu用戶) ->創(chuàng)建對應(yīng)的samba用戶(sudo smbpasswd -a luoding)
可以使用虛擬samba用戶來配置
打開映射選項->創(chuàng)建對應(yīng)系統(tǒng)賬號的samba用戶
配置日志文件:
維護及常用命令
testparm -s 檢查配置文件的語法錯誤 testparm -v 檢查并列出詳細(xì)參數(shù)
重啟smb服務(wù): sudo service smbd restart
查看當(dāng)前的連接: smbstatus
查看smb用戶: sudo pdbedit -L
日志位置:/var/log/samba/log.%m
檢查下gitlab下的日志tail -100 /var/log/gitlab/gitlab-rails/production.log
:file-list="fileList3"
這里 綁定的fileList3 數(shù)組 清空下,內(nèi)容也就沒有了吧。
服務(wù)器缺mysql extension。VPS的話請百度,共享主機請去找主機商。
msql.so
是微軟M$ SQL server的,不是mysql的。它倆完全不一樣。
修改第三方模塊的源碼,主要問題是要考慮項目再次部署的問題,因為 npm store 里沒有你的修改。
一種做法是 fork 原始的的 git repo,代碼修改好后,
開發(fā)完成后,首先確認(rèn)自己 github 中那份 repo 包含了必須的修改,然后從repo 位置安裝該模塊
npm install <your_github_name>/bootstrap-vue --save
(npm 從 git repo 安裝模塊,可以指定分支或 commit id,具體參閱 npm 文檔)
這之后,再次部署項目時的問題就消除了。
如僅僅是修改樣式,應(yīng)該是沒有必要走上述那條彎路,在自己的樣式文件里可以進行覆蓋吧
為了程序的簡單易用性。每個配置都有默認(rèn)值吧 ?
用webstorm吧
不用進行任何特殊設(shè)置,安裝好 apache 就可以訪問
1.首先,你可以直接在服務(wù)器上用babel-node啟動app.js試試看。如果能起來說明是forever的問題
2.如果不能起來,是不是你的babel-node的版本不對
ctrl+c試一下,可能沒卡過來
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團,成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。