judgegirl / judgenode Goto Github PK
View Code? Open in Web Editor NEWSmall Online Judge frontend, based on Nodejs, Express4, MySQL
Home Page: http://judgegirl.csie.ntu.edu.tw/
License: GNU General Public License v3.0
Small Online Judge frontend, based on Nodejs, Express4, MySQL
Home Page: http://judgegirl.csie.ntu.edu.tw/
License: GNU General Public License v3.0
請問有考慮包進容器嗎?
方便佈署
需要一個額外的分數調整頁面,方便兩班調分用。
How to add a guild icon, or is there an SOP for that?
主要原因為 Chrome 只為某個 domain name 進行合法憑證,假設現在對 judgegirl.csie.org 網站進行信任,在尚未對實際主機 IP 140.112.31.208 進行信任,在 judgegirl.csie.org 中使用 ajax 訪問 https://140.112.31.208 則會發生錯誤。
修改方式預計在 express 中介層,加入設定參數 req.hostname,針對不同使用者從不同 domain name 進入網站而做不同渲染工作。
http://expressjs.com/en/api.html#req.hostname
Could we use 週一班,週二班? It will be much easier to understand.
Is there any way for other SA to make accounment? It seems that the current mechaism is to make change on a web document directly.
由鑒於 NTU 系統目前沒提供選擇題考卷,下學期平行程式設計的小考考卷批改!
若在電腦教室上課,目標加入電腦閱卷功能。
The listing should be anonymous after I select a problem and click the "status" tab on the top (or you just x out the last three digits of the id).
router.post('/submit',
upload.fields([{name: 'code0', maxCount: 1}, {name: 'code1', maxCount: 1},
{name: 'code2', maxCount: 1}, {name: 'code3', maxCount: 1},
{name: 'code4', maxCount: 1}, {name: 'code5', maxCount: 1},
{name: 'code6', maxCount: 1}, {name: 'code7', maxCount: 1}]),
回報訊息:不知道是不是上傳的source檔案數量有限制,剛剛有個題目 10 個 source 一上傳就 JudgeNode 就 crash
目標在下一次工作日研究一下 multer 給的 API,並完成檔案傳輸個數與大小上傳限制的測試。
建造 _config.yml 檔案,使用 YAML format 方便處理預設內容,而不直接去更動 source code。
# JUDGE_PATH/submission /testdata /source
# JUDGE_PATH: c:/Users/morris821028/Desktop/github/
JUDGE_PATH: /home/c2014/judgesister/
# MODE: limits user open previous source code & submit problem which not in contest.
CONTEST:
MODE: true
SUBMIT_LIMIT: 15
# DATABASE Setting, MySQL
DATABASE:
host: '140.112.xxx.xxxx'
user: 'c2015'
password: 'xxxxxxxxxx'
port: '3306'
dbname: 'c2015'
加入 .gitignore 把 log 檔案移除。
對於每一場考試說明,提供預設內容和可以更改的 markdown 類型,有如 problem description 得更動頁面。
Please add 陳威甯 ino the TA list.
List the number of times the student has submitted a solution to a task.
未登入情況,User 頁面 undefined variable
http://xxx.xxx.xxx.xxx/user/1
,點選上傳紀錄會跳轉到 http://xxx.xxx.xxx.xxx/user/1/detail/xxxxx
,正確顯示應為 http://xxx.xxx.xxx.xxx/detail/xxxxx
One can see other's AC code when he gets AC. I think a better implementation is to give the student the following option. If he allows other ACer to see his AC code, the he can see others' AC code when he gets AC.
由於加入重測按鈕,總共有三個地方會顯示 submission,problem/status, problem/mystatus, user/status,為了往後更改,需要加入統一的模組參數。
Please report only the students taking this course for credits.
$ chmod +x deploy_mySQL.sh
$ ./deploy_mysql.sh
大小寫
$ python distribute_setup.py
未更新
root $ cd Judge-receiver/scripts
沒s
$ bower install
$ gulp build
以上皆須先NPM INSTALL BOWER,GULP
$ ./start
先安裝colorama by pip3
pip3 install colorama
$ node adduser.js nodejs judgegirl notpassword 0 [email protected]
參數有錯 nodejs adduser.js $1 $2 $3 $4
motto nname ename 沒有default值
須自行加入adduser.js
root $ cd Judge-receiver/scripts
root $ ./mount
./mount,每一次主機重新開啟 (例如斷電重開職主機後),要重新執行這條指令
目前直接寫在 router/index.js
,預計要改到 _config.yml
的設置中。
StackOverflow: How to create global variables accessible in all views using Express / Node.JS?
reduce variable config
argument in res.render()
需要更好的 Judge 排程,區分成 rejudge 和 livejudge,
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://judgegirl.github.io/
root: /
用來與其他網站伺服器架構結合,提供轉跳用途。
在 /etc/nginx/sites-available
下建立 judgegirl 的資訊,目前將 Nodejs 開在 port 4000。host domain name 為 apponline.tw,預期使用 judgegirl.apponline.tw 連入。
root@tts:/etc/nginx/sites-available# cat judgegirl
upstream nodejs {
server 127.0.0.1:4000 max_fails=0;
}
server {
listen 80;
server_name judgegirl.apponline.tw;
location / {
proxy_pass http://127.0.0.1:4000;
}
}
複製一份連結到 /etc/nginx/sites-available
目錄下
$ cd /etc/nginx/sites-enabled
$ ln -s /etc/nginx/sites-available/judgegirl .
測試 nginx 設定檔案是否可行
$ sudo nginx -t
如果測試成功,直接重開 nginx 服務
$ service nginx restart
之後再測試 https port 443 的情況。
You may got the error message when you start with redis server. Please check the port 6379 usage first, and then check redis setting in host OS.
https://bugs.launchpad.net/ubuntu/+source/redis/+bug/1663911
$ sudo su
$ mkdir /etc/systemd/system/redis-server.service.d/
$ cd /etc/systemd/system/redis-server.service.d/
$ echo '[Service]' > redis.override.conf
$ echo 'PrivateDevices=no' >> redis.override.conf
Please degrade your MySQL version into 5.6. There are some SQL query sentences written by me as web beginner. If you don't want to change MySQL server, remove group feature from MySQL configuration.
https://stackoverflow.com/questions/23921117/disable-only-full-group-by
否則會有一些學生要求助教看 source code,會發生不知道那一份 source code 是哪一個題目。
according to the subject
https://github.com/letsencrypt/letsencrypt
./letsencrypt-auto certonly --standalone --email [email protected] -d judgegirl.csie.org
./letsencrypt-auto certonly --standalone --email [email protected] -d judgegirl.csie.ntu.edu.tw
change ./bin/www
/*
https
*/
var crypto = require('crypto');
var https = require('https'),
fs = require("fs");
function getSecureContext(domain) {
return crypto.createCredentials({
key: fs.readFileSync('/etc/letsencrypt/live/'+ domain + '/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/' + domain + '/cert.pem')
}).context;
}
var secureContext = {
'judgegirl.csie.org': getSecureContext('judgegirl.csie.org'),
'judgegirl.csie.ntu.edu.tw': getSecureContext('judgegirl.csie.ntu.edu.tw')
};
var options = {
SNICallback: function(domain) {
return secureContext[domain];
},
port: 443,
path: '/140.112.31.208',
method: 'GET',
key: fs.readFileSync('/etc/letsencrypt/live/judgegirl.csie.org/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/judgegirl.csie.org/cert.pem')
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.