├── .gitattributes ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── autorestart.sh ├── autorun.sh ├── changelist.txt ├── class ├── controller.go ├── function.go └── init.go ├── config ├── app.conf ├── config.go └── router.conf ├── controller ├── admin │ ├── contest.go │ ├── home.go │ ├── image.go │ ├── news.go │ ├── notice.go │ ├── problem.go │ ├── rejudger.go │ ├── test_data.go │ └── user.go ├── ban.go ├── contest.go ├── contest │ ├── contest.go │ ├── contestuser.go │ ├── problem.go │ ├── ranklist.go │ └── status.go ├── faq.go ├── home.go ├── news.go ├── osc.go ├── problem.go ├── ranklist.go ├── sess.go ├── status.go └── user.go ├── db_backup.sh ├── db_restore.sh ├── docs ├── Golang_Style_Guide.md ├── function.md └── requirement.md ├── filter.go ├── install.sh ├── log └── .gitkeep ├── main.go ├── model ├── class │ ├── init.go │ └── model.go ├── contest.go ├── doc │ └── GoServerAPI.xlsx ├── errors.go ├── last.go ├── ma.go ├── migrate.go ├── news.go ├── oj.go ├── problem.go ├── solution.go └── user.go ├── schedule ├── error.go ├── hdu.go ├── init.go └── pku.go ├── static ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── style.css ├── favicon-backup.ico ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── img │ ├── Shortcuts.png │ ├── logo.bak.png │ ├── logo.png │ ├── pid8.jpg │ ├── zjgsu.png │ └── 脸萌.jpg ├── js │ ├── MathJax.js │ ├── action.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── codemirror.js │ ├── jquery-1.10.2.min.js │ ├── jquery.cookie.js │ ├── jquery.min.js │ ├── jquery.pin.js │ └── operation.js ├── kindeditor │ ├── kindeditor-all-min.js │ ├── kindeditor-all.js │ ├── kindeditor-min.js │ ├── kindeditor.js │ ├── lang │ │ ├── ar.js │ │ ├── en.js │ │ ├── ko.js │ │ ├── zh_CN.js │ │ └── zh_TW.js │ ├── license.txt │ ├── plugins │ │ ├── anchor │ │ │ └── anchor.js │ │ ├── autoheight │ │ │ └── autoheight.js │ │ ├── baidumap │ │ │ ├── baidumap.js │ │ │ ├── index.html │ │ │ └── map.html │ │ ├── clearhtml │ │ │ └── clearhtml.js │ │ ├── code │ │ │ ├── code.js │ │ │ ├── prettify.css │ │ │ └── prettify.js │ │ ├── emoticons │ │ │ ├── emoticons.js │ │ │ └── images │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 100.gif │ │ │ │ ├── 101.gif │ │ │ │ ├── 102.gif │ │ │ │ ├── 103.gif │ │ │ │ ├── 104.gif │ │ │ │ ├── 105.gif │ │ │ │ ├── 106.gif │ │ │ │ ├── 107.gif │ │ │ │ ├── 108.gif │ │ │ │ ├── 109.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 110.gif │ │ │ │ ├── 111.gif │ │ │ │ ├── 112.gif │ │ │ │ ├── 113.gif │ │ │ │ ├── 114.gif │ │ │ │ ├── 115.gif │ │ │ │ ├── 116.gif │ │ │ │ ├── 117.gif │ │ │ │ ├── 118.gif │ │ │ │ ├── 119.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 120.gif │ │ │ │ ├── 121.gif │ │ │ │ ├── 122.gif │ │ │ │ ├── 123.gif │ │ │ │ ├── 124.gif │ │ │ │ ├── 125.gif │ │ │ │ ├── 126.gif │ │ │ │ ├── 127.gif │ │ │ │ ├── 128.gif │ │ │ │ ├── 129.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 130.gif │ │ │ │ ├── 131.gif │ │ │ │ ├── 132.gif │ │ │ │ ├── 133.gif │ │ │ │ ├── 134.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ ├── 38.gif │ │ │ │ ├── 39.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 40.gif │ │ │ │ ├── 41.gif │ │ │ │ ├── 42.gif │ │ │ │ ├── 43.gif │ │ │ │ ├── 44.gif │ │ │ │ ├── 45.gif │ │ │ │ ├── 46.gif │ │ │ │ ├── 47.gif │ │ │ │ ├── 48.gif │ │ │ │ ├── 49.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 50.gif │ │ │ │ ├── 51.gif │ │ │ │ ├── 52.gif │ │ │ │ ├── 53.gif │ │ │ │ ├── 54.gif │ │ │ │ ├── 55.gif │ │ │ │ ├── 56.gif │ │ │ │ ├── 57.gif │ │ │ │ ├── 58.gif │ │ │ │ ├── 59.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 60.gif │ │ │ │ ├── 61.gif │ │ │ │ ├── 62.gif │ │ │ │ ├── 63.gif │ │ │ │ ├── 64.gif │ │ │ │ ├── 65.gif │ │ │ │ ├── 66.gif │ │ │ │ ├── 67.gif │ │ │ │ ├── 68.gif │ │ │ │ ├── 69.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 70.gif │ │ │ │ ├── 71.gif │ │ │ │ ├── 72.gif │ │ │ │ ├── 73.gif │ │ │ │ ├── 74.gif │ │ │ │ ├── 75.gif │ │ │ │ ├── 76.gif │ │ │ │ ├── 77.gif │ │ │ │ ├── 78.gif │ │ │ │ ├── 79.gif │ │ │ │ ├── 8.gif │ │ │ │ ├── 80.gif │ │ │ │ ├── 81.gif │ │ │ │ ├── 82.gif │ │ │ │ ├── 83.gif │ │ │ │ ├── 84.gif │ │ │ │ ├── 85.gif │ │ │ │ ├── 86.gif │ │ │ │ ├── 87.gif │ │ │ │ ├── 88.gif │ │ │ │ ├── 89.gif │ │ │ │ ├── 9.gif │ │ │ │ ├── 90.gif │ │ │ │ ├── 91.gif │ │ │ │ ├── 92.gif │ │ │ │ ├── 93.gif │ │ │ │ ├── 94.gif │ │ │ │ ├── 95.gif │ │ │ │ ├── 96.gif │ │ │ │ ├── 97.gif │ │ │ │ ├── 98.gif │ │ │ │ ├── 99.gif │ │ │ │ └── static.gif │ │ ├── filemanager │ │ │ ├── filemanager.js │ │ │ └── images │ │ │ │ ├── file-16.gif │ │ │ │ ├── file-64.gif │ │ │ │ ├── folder-16.gif │ │ │ │ ├── folder-64.gif │ │ │ │ └── go-up.gif │ │ ├── flash │ │ │ └── flash.js │ │ ├── image │ │ │ ├── image.js │ │ │ └── images │ │ │ │ ├── align_left.gif │ │ │ │ ├── align_right.gif │ │ │ │ ├── align_top.gif │ │ │ │ └── refresh.png │ │ ├── insertfile │ │ │ └── insertfile.js │ │ ├── lineheight │ │ │ └── lineheight.js │ │ ├── link │ │ │ └── link.js │ │ ├── map │ │ │ ├── map.html │ │ │ └── map.js │ │ ├── media │ │ │ └── media.js │ │ ├── multiimage │ │ │ ├── images │ │ │ │ ├── image.png │ │ │ │ ├── select-files-en.png │ │ │ │ ├── select-files-zh_CN.png │ │ │ │ └── swfupload.swf │ │ │ └── multiimage.js │ │ ├── pagebreak │ │ │ └── pagebreak.js │ │ ├── plainpaste │ │ │ └── plainpaste.js │ │ ├── preview │ │ │ └── preview.js │ │ ├── quickformat │ │ │ └── quickformat.js │ │ ├── table │ │ │ └── table.js │ │ ├── template │ │ │ ├── html │ │ │ │ ├── 1.html │ │ │ │ ├── 2.html │ │ │ │ └── 3.html │ │ │ └── template.js │ │ └── wordpaste │ │ │ └── wordpaste.js │ └── themes │ │ ├── common │ │ ├── anchor.gif │ │ ├── blank.gif │ │ ├── flash.gif │ │ ├── loading.gif │ │ ├── media.gif │ │ └── rm.gif │ │ ├── default │ │ ├── background.png │ │ ├── default.css │ │ └── default.png │ │ ├── qq │ │ ├── editor.gif │ │ └── qq.css │ │ └── simple │ │ └── simple.css ├── material │ ├── css │ │ ├── material-wfont.css │ │ ├── material-wfont.min.css │ │ ├── material.css │ │ ├── material.min.css │ │ ├── ripples.css │ │ └── ripples.min.css │ ├── fonts │ │ ├── LICENSE.txt │ │ ├── Material-Design.eot │ │ ├── Material-Design.svg │ │ ├── Material-Design.ttf │ │ └── Material-Design.woff │ └── js │ │ ├── material.js │ │ ├── material.min.js │ │ ├── ripples.js │ │ └── ripples.min.js └── prettify │ ├── lang-apollo.js │ ├── lang-basic.js │ ├── lang-clj.js │ ├── lang-css.js │ ├── lang-dart.js │ ├── lang-erlang.js │ ├── lang-go.js │ ├── lang-hs.js │ ├── lang-lisp.js │ ├── lang-llvm.js │ ├── lang-lua.js │ ├── lang-matlab.js │ ├── lang-ml.js │ ├── lang-mumps.js │ ├── lang-n.js │ ├── lang-pascal.js │ ├── lang-proto.js │ ├── lang-r.js │ ├── lang-rd.js │ ├── lang-scala.js │ ├── lang-sql.js │ ├── lang-tcl.js │ ├── lang-tex.js │ ├── lang-vb.js │ ├── lang-vhdl.js │ ├── lang-wiki.js │ ├── lang-xq.js │ ├── lang-yaml.js │ ├── prettify.css │ ├── prettify.js │ └── run_prettify.js └── view ├── 400.tpl ├── admin ├── contest_add.tpl ├── contest_edit.tpl ├── contest_list.tpl ├── home.tpl ├── layout.tpl ├── msg.txt ├── news_add.tpl ├── news_edit.tpl ├── news_list.tpl ├── notice.tpl ├── problem_add.tpl ├── problem_edit.tpl ├── problem_import.tpl ├── problem_list.tpl ├── rejudge.tpl ├── test_data.tpl ├── user_generate.tpl ├── user_list.tpl └── user_password.tpl ├── contest ├── passwd.tpl ├── problem_detail.tpl ├── problem_list.tpl ├── ranklist.tpl ├── status_code.tpl └── status_list.tpl ├── contest_list.tpl ├── faq.tpl ├── layout.bak.tpl ├── layout.tpl ├── news_detail.tpl ├── news_list.tpl ├── osc.tpl ├── problem_detail.tpl ├── problem_list.tpl ├── ranklist.tpl ├── status_code.tpl ├── status_list.tpl ├── user_detail.tpl ├── user_edit.tpl ├── user_password.tpl ├── user_signin.tpl └── user_signup.tpl /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | 24 | *.c linguist-language=go 25 | *.cpp linguist-language=go 26 | *.h linguist-language=go 27 | *.js linguist-language=go 28 | *.css linguist-language=go 29 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.4.2 2 | MAINTAINER Sakeven "sakeven.jiang@daocloud.io" 3 | 4 | ENV OJ_HOME $GOPATH/src 5 | 6 | WORKDIR $GOPATH/src/ 7 | 8 | RUN mkdir -p $OJ_HOME/log 9 | 10 | ADD . $GOPATH/src/GoOnlineJudge 11 | 12 | # Get dependence 13 | RUN git clone https://github.com/sakeven/restweb.git $GOPATH/src/restweb 14 | RUN go get -t GoOnlineJudge 15 | 16 | # Build OJ 17 | RUN cd $GOPATH/src/restweb/restweb && go install 18 | RUN cd $GOPATH/src && restweb build GoOnlineJudge 19 | 20 | EXPOSE 8080 21 | 22 | CMD restweb run GoOnlineJudge 23 | -------------------------------------------------------------------------------- /autorestart.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | while true 4 | do 5 | pid=`history | grep GoOnlineJudge` 6 | if [ $? -ne 0 ] 7 | then 8 | echo "Not running" 9 | echo "At time:`date`: OJ is down. Restart succeeded." >> oj_status_log 10 | restweb run GoOnlineJudge & 11 | else 12 | echo "At time:`date`: is running" 13 | fi 14 | done 15 | -------------------------------------------------------------------------------- /autorun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | 6 | # Start MongoDB 7 | 8 | ps -A | grep mongod > /dev/null 9 | if [ $? = 1 ]; then 10 | mongod 11 | fi 12 | 13 | # RunServer is in $GOPATH/bin which is exported to $PATH 14 | RunServer& 15 | 16 | # Start GoOnineJudge 17 | cd $GOPATH/src 18 | restweb run GoOnlineJudge & -------------------------------------------------------------------------------- /changelist.txt: -------------------------------------------------------------------------------- 1 | 2015-09-24: 2 | 1. Contest ranklist scroll 3 | 2. Docker contianerize 4 | 3. Add problem solve flag 5 | 4. Fix some bugs 6 | 7 | 2015-05-22: 8 | 1. Support record user share code 9 | 2. Fix add admin bug 10 | 11 | 2015-04-24: 12 | 1. Support show remote oj status 13 | 14 | 2015-03-01: 15 | 1. Digital password generator 16 | 2. Record user's last use language 17 | 3. HDU & PKU judge support 18 | 4. Share code 19 | 20 | 2015-01-31: 21 | 1. Fix url 22 | 2. Contest status page 23 | 3. User register check 24 | 4. Contest current system time 25 | 5. Pretty error info 26 | 27 | 2014-12-11 Version 14.12.11: 28 | 1. Refactor the code in restweb freamwork 29 | 2. Satisfy RESTful API 30 | 3. Fix Contest encrypt bug 31 | 4. Add admin notice 32 | 5. Contest status search support 33 | 6. Fix edit problem time bug 34 | 7. Add install script 35 | 8. Other small bugs fix 36 | -------------------------------------------------------------------------------- /class/function.go: -------------------------------------------------------------------------------- 1 | package class 2 | 3 | import ( 4 | "GoOnlineJudge/config" 5 | "restweb" 6 | 7 | "strconv" 8 | "time" 9 | ) 10 | 11 | var specialArr = []string{"Standard", "Special"} 12 | var judgeArr = []string{"Pengding", "Running & Judging", "Compile Error", "Accepted", "Runtime Error", 13 | "Wrong Answer", "Time Limit Exceeded", "Memory Limit Exceeded", "Output Limit Exceeded", "Presentation Error", "System Error"} 14 | var languageArr = []string{"None", "C", "C++", "Java"} 15 | var encryptArr = []string{"None", "Public", "Private", "Password"} 16 | var privilegeArr = []string{"None", "Primary User", "Teacher", "Admin"} 17 | 18 | // ShowStatus 根据status确定状态是否可达的 19 | func ShowStatus(status int) bool { 20 | return status == config.StatusAvailable 21 | } 22 | 23 | // ShowSim 是否显示相似度 24 | func ShowSim(sim int) bool { 25 | return sim != 0 26 | } 27 | 28 | // ShowRatio 显示solve/submit的比率 29 | func ShowRatio(solve int, submit int) (ratio string) { 30 | if submit == 0 { 31 | ratio = "0.00%" 32 | } else { 33 | ratio = strconv.FormatFloat(float64(solve)/float64(submit)*100, 'f', 2, 64) + "%" 34 | } 35 | return 36 | } 37 | 38 | // ShowSpecial显示Judge程序是标准或是特判 39 | func ShowSpecial(num int) (special string) { 40 | special = specialArr[num] 41 | return 42 | } 43 | 44 | // ShowJudge显示判题结果 45 | func ShowJudge(num int) (judge string) { 46 | judge = judgeArr[num] 47 | return 48 | } 49 | 50 | // ShowLanguage 显示代码语言类型 51 | func ShowLanguage(num int) (language string) { 52 | language = languageArr[num] 53 | return 54 | } 55 | 56 | // ShowEncrypt显示比赛的加密方式,公开,私有或者密码 57 | func ShowEncrypt(num int) (encrypt string) { 58 | encrypt = encryptArr[num] 59 | return 60 | } 61 | 62 | // LargePU 判断privilege是否大于普通用户 63 | func LargePU(privilege int) bool { 64 | return privilege > config.PrivilegePU 65 | } 66 | 67 | // ShowPrivilege 显示用户权限 68 | func ShowPrivilege(privilege int) string { 69 | return privilegeArr[privilege] 70 | } 71 | 72 | // 判断两个ID是否相等 73 | func SameID(ID1, ID2 string) bool { 74 | return ID1 == ID2 75 | } 76 | 77 | func HasPriv(priv, needpriv int) bool { 78 | return priv&needpriv > 0 79 | } 80 | 81 | func ShowErrFlag(flag uint8) bool { 82 | return flag == config.FLagER 83 | } 84 | 85 | func ShowACFlag(flag uint8) bool { 86 | return flag == config.FLagAC 87 | } 88 | 89 | // ShowTime 将unixtime转换为北京时间 90 | func ShowTime(unixtime int64) string { 91 | 92 | loc, _ := time.LoadLocation("Asia/Shanghai") 93 | return time.Unix(unixtime, 0).In(loc).Format("2006-01-02 15:04:05") 94 | } 95 | 96 | // initFuncMap 初始化FuncMap 97 | func initFuncMap() { 98 | restweb.AddFuncMap("ShowErrFlag", ShowErrFlag) 99 | restweb.AddFuncMap("ShowACFlag", ShowACFlag) 100 | restweb.AddFuncMap("ShowRatio", ShowRatio) 101 | restweb.AddFuncMap("ShowSpecial", ShowSpecial) 102 | restweb.AddFuncMap("ShowJudge", ShowJudge) 103 | restweb.AddFuncMap("ShowLanguage", ShowLanguage) 104 | restweb.AddFuncMap("ShowEncrypt", ShowEncrypt) 105 | restweb.AddFuncMap("ShowPrivilege", ShowPrivilege) 106 | restweb.AddFuncMap("LargePU", LargePU) 107 | restweb.AddFuncMap("ShowStatus", ShowStatus) 108 | restweb.AddFuncMap("ShowSim", ShowSim) 109 | restweb.AddFuncMap("HasPriv", HasPriv) 110 | restweb.AddFuncMap("ShowTime", ShowTime) 111 | } 112 | -------------------------------------------------------------------------------- /class/init.go: -------------------------------------------------------------------------------- 1 | package class 2 | 3 | func init() { 4 | initFuncMap() 5 | } 6 | -------------------------------------------------------------------------------- /config/app.conf: -------------------------------------------------------------------------------- 1 | { 2 | "port":":8080", 3 | "sesson":true, 4 | "log":"Dev" 5 | } -------------------------------------------------------------------------------- /config/config.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | //server 8 | const CookieExpires = 1800 9 | 10 | var Datapath = os.Getenv("DATA_PATH") 11 | var JudgeHost = os.Getenv("JUDGE_HOST") 12 | 13 | //CONSTANT 14 | const ( 15 | ProblemPerPage = 50 16 | ContestPerPage = 100 17 | SolutionPerPage = 30 18 | UserPerPage = 50 19 | ) 20 | 21 | const ( 22 | PageHeadLimit = 1 23 | PageTailLimit = 1 24 | PageMidLimit = 2 25 | ) 26 | 27 | const ( 28 | JudgePD = 0 //Pending 29 | JudgeRJ = 1 //Running & judging 30 | JudgeCE = 2 //Compile Error 31 | JudgeAC = 3 //Accepted 32 | JudgeRE = 4 //Runtime Error 33 | JudgeWA = 5 //Wrong Answer 34 | JudgeTLE = 6 //Time Limit Exceeded 35 | JudgeMLE = 7 //Memory Limit Exceeded 36 | JudgeOLE = 8 //Output Limit Exceeded 37 | JudgePE = 9 //Presentation Error 38 | JudgeNA = 10 //System Error 39 | JudgeRPD = 11 //Rejudge Pending 40 | ) 41 | 42 | const ( 43 | FlagNA = uint8(iota) // None 44 | FLagAC 45 | FLagER 46 | ) 47 | const ( 48 | LanguageNA = 0 //None 49 | LanguageC = 1 //C 50 | LanguageCPP = 2 //C++ 51 | LanguageJAVA = 3 //Java 52 | ) 53 | 54 | const ( 55 | ModuleNA = 0 //None 56 | ModuleP = 1 //Problem 57 | ModuleC = 2 //Contest 58 | ) 59 | 60 | const ( 61 | PrivilegeNA = 0 //None 62 | PrivilegePU = 1 //Primary User 63 | PrivilegeTC = 2 //Teacher 64 | PrivilegeAD = 3 //Admin 65 | ) 66 | 67 | const ( 68 | EncryptNA = 0 //None 69 | EncryptPB = 1 //Public 70 | EncryptPT = 2 //Private 71 | EncryptPW = 3 //Password 72 | ) 73 | 74 | const ( 75 | StatusReverse = 0 //不可用 76 | StatusIncon = 1 //正在比赛中 77 | StatusAvailable = 2 //可用 78 | StatusPending = 3 //等待 79 | StatusRunning = 4 //进行中 80 | StatusEnding = 5 //结束 81 | ) 82 | 83 | //remote OJ status 84 | const ( 85 | StatusOk = 0 86 | StatusUnavailable = 1 87 | ) 88 | 89 | // 权限分离 90 | const ( 91 | AccessAdmin = 1 << iota //管理员页面 92 | ViewReverse //查看保留问题、新闻、竞赛 93 | Notice //通知消息 94 | 95 | AddProblem //添加问题 96 | DeleteProblem //删除问题 97 | Testcase //测试数据管理 98 | ReJudge //重判 99 | 100 | AddContest //添加竞赛 101 | DeleteContest //删除竞赛 102 | AddNews //添加新闻 103 | DeleteNews //删除新闻 104 | 105 | ViewCode //查看代码 106 | ViewSim //查看相似度 107 | 108 | UserControl //用户控制 109 | GenerateUser //生成用户 110 | ) 111 | 112 | const ( 113 | ProFull = AddProblem | DeleteProblem | Testcase | ReJudge 114 | ConFull = AddContest | DeleteContest 115 | NewsFull = AddNews | DeleteNews 116 | CodeFull = ViewCode | ViewSim 117 | UserFull = UserControl | GenerateUser 118 | ) 119 | -------------------------------------------------------------------------------- /controller/admin/home.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | 6 | "restweb" 7 | ) 8 | 9 | type AdminHome struct { 10 | class.Controller 11 | } //@Controller 12 | 13 | //@URL: /admin/ @method: GET 14 | func (hc *AdminHome) Home() { 15 | restweb.Logger.Debug("Admin Home") 16 | 17 | hc.Output["IsHome"] = true 18 | hc.Output["Title"] = "Admin - Home" 19 | hc.RenderTemplate("view/admin/layout.tpl", "view/admin/home.tpl") 20 | } 21 | -------------------------------------------------------------------------------- /controller/admin/image.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | 6 | "restweb" 7 | 8 | "encoding/json" 9 | "io" 10 | "os" 11 | ) 12 | 13 | //ImageController handles sth. with images 14 | type AdminImage struct { 15 | class.Controller 16 | } //@Controller 17 | 18 | type image struct { 19 | Error int `json:"error"` 20 | Url string `json:"url"` 21 | } 22 | 23 | //Upload support kindeditor upload images,the W must return json eg. like {"err":0,"url":"http:...."} 24 | //@URL:/admin/images/ @method: POST 25 | func (ic AdminImage) Post() { 26 | restweb.Logger.Debug("AdminUpload Image") 27 | 28 | r := ic.R 29 | r.ParseMultipartForm(32 << 20) 30 | fhs := r.MultipartForm.File["imgFile"] 31 | 32 | var path string 33 | var errflag int 34 | 35 | for _, fheader := range fhs { 36 | filename := fheader.Filename 37 | restweb.Logger.Debug(filename) 38 | file, err := fheader.Open() 39 | if err != nil { 40 | restweb.Logger.Debug(err) 41 | errflag++ 42 | break 43 | } 44 | defer file.Close() 45 | //保存文件 46 | path = "static/img/" + filename 47 | f, err := os.Create(path) 48 | if err != nil { 49 | restweb.Logger.Debug(err) 50 | errflag++ 51 | break 52 | } 53 | defer f.Close() 54 | io.Copy(f, file) 55 | } 56 | im := &image{Error: errflag, Url: "/" + path} 57 | b, _ := json.Marshal(im) 58 | ic.W.Write(b) 59 | } 60 | -------------------------------------------------------------------------------- /controller/admin/notice.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "html/template" 6 | "net/http" 7 | "os" 8 | "restweb" 9 | ) 10 | 11 | type AdminNotice struct { 12 | class.Controller 13 | } //@Controller 14 | 15 | //@URL: /admin/notice/ @method: GET 16 | func (n *AdminNotice) Index() { 17 | restweb.Logger.Debug("Admin notice index") 18 | n.Output["Msg"] = string(n.Output["Msg"].(template.HTML)) 19 | n.Output["IsNotice"] = true 20 | n.RenderTemplate("view/admin/layout.tpl", "view/admin/notice.tpl") 21 | } 22 | 23 | //@URL: /admin/notice/ @method: POST 24 | func (n *AdminNotice) Edit() { 25 | restweb.Logger.Debug("Admin notice edit") 26 | 27 | msg := n.Input.Get("msg") 28 | file, err := os.Create("view/admin/msg.txt") 29 | if err != nil { 30 | return 31 | } 32 | defer file.Close() 33 | file.Write([]byte(msg)) 34 | n.Redirect("/", http.StatusFound) 35 | } 36 | -------------------------------------------------------------------------------- /controller/admin/rejudger.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/config" 6 | "GoOnlineJudge/model" 7 | "encoding/json" 8 | "net/http" 9 | "restweb" 10 | "strconv" 11 | "time" 12 | ) 13 | 14 | type AdminRejudge struct { 15 | class.Controller 16 | } //@Controller 17 | 18 | //@URL: /admin/rejudger/ @method: GET 19 | func (pc *AdminRejudge) Index() { 20 | restweb.Logger.Debug("Rejudge Page") 21 | 22 | pc.Output["Title"] = "Problem Rejudge" 23 | pc.Output["RejudgePrivilege"] = true 24 | pc.Output["IsProblem"] = true 25 | pc.Output["IsRejudge"] = true 26 | 27 | pc.RenderTemplate("view/admin/layout.tpl", "view/admin/rejudge.tpl") 28 | } 29 | 30 | //@URL: /admin/rejudger/ @method: POST 31 | func (pc *AdminRejudge) Rejudge() { 32 | restweb.Logger.Debug("Problem Rejudge") 33 | 34 | args := pc.R.URL.Query() 35 | types := args.Get("type") 36 | id, err := strconv.Atoi(args.Get("id")) 37 | if err != nil { 38 | pc.Error("args error", 400) 39 | return 40 | } 41 | 42 | hint := make(map[string]string) 43 | one := make(map[string]interface{}) 44 | 45 | if types == "Pid" { 46 | pid := id 47 | proModel := model.ProblemModel{} 48 | pro, err := proModel.Detail(pid) 49 | if err != nil { 50 | restweb.Logger.Debug(err) 51 | hint["info"] = "Problem does not exist!" 52 | 53 | b, _ := json.Marshal(&hint) 54 | pc.W.WriteHeader(400) 55 | pc.W.Write(b) 56 | 57 | return 58 | } 59 | qry := make(map[string]string) 60 | qry["pid"] = strconv.Itoa(pro.Pid) 61 | 62 | solutionModel := model.SolutionModel{} 63 | list, err := solutionModel.List(qry) 64 | 65 | for i := range list { 66 | sid := list[i].Sid 67 | time.Sleep(1 * time.Second) 68 | one["Sid"] = sid 69 | one["Pid"] = pro.RPid 70 | one["OJ"] = pro.ROJ 71 | one["Rejudge"] = true 72 | reader, _ := pc.JsonReader(&one) 73 | _, err := http.Post(config.JudgeHost, "application/json", reader) 74 | if err != nil { 75 | // http.Error(w, "post error", 500) 76 | restweb.Logger.Debug(err) 77 | } 78 | } 79 | } else if types == "Sid" { 80 | sid := id 81 | 82 | solutionModel := model.SolutionModel{} 83 | sol, err := solutionModel.Detail(sid) 84 | if err != nil { 85 | restweb.Logger.Debug(err) 86 | 87 | hint["info"] = "Solution does not exist!" 88 | b, _ := json.Marshal(&hint) 89 | pc.W.WriteHeader(400) 90 | pc.W.Write(b) 91 | return 92 | } 93 | 94 | problemModel := model.ProblemModel{} 95 | pro, err := problemModel.Detail(sol.Pid) 96 | if err != nil { 97 | pc.Error(err.Error(), 500) 98 | return 99 | } 100 | one["Sid"] = sid 101 | one["Pid"] = pro.RPid 102 | one["OJ"] = pro.ROJ 103 | one["Rejudge"] = true 104 | reader, _ := pc.JsonReader(&one) 105 | _, err = http.Post(config.JudgeHost, "application/json", reader) 106 | if err != nil { 107 | restweb.Logger.Debug("Sid[", sid, "] rejudger post error.") 108 | return 109 | } 110 | } 111 | pc.W.WriteHeader(200) 112 | } 113 | -------------------------------------------------------------------------------- /controller/admin/test_data.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/config" 6 | 7 | "restweb" 8 | 9 | "io" 10 | "net/http" 11 | "os" 12 | "os/exec" 13 | "strconv" 14 | ) 15 | 16 | type AdminTestdata struct { 17 | class.Controller 18 | } //@Controller 19 | 20 | // List 列出对应题目的test data 21 | //@URL: /admin/testdata/(\d+) @method: GET 22 | func (tc *AdminTestdata) List(pid string) { 23 | restweb.Logger.Debug("Admin testdata list") 24 | 25 | file := []string{} 26 | dir, err := os.Open(config.Datapath + "/" + pid) 27 | defer dir.Close() 28 | 29 | files, err := dir.Readdir(-1) 30 | if err != nil { 31 | restweb.Logger.Debug(config.Datapath+"/"+pid, err) 32 | } else { 33 | for _, fi := range files { 34 | if !fi.IsDir() { 35 | file = append(file, fi.Name()) 36 | } 37 | } 38 | } 39 | 40 | tc.Output["Files"] = file 41 | tc.Output["Pid"] = pid 42 | tc.Output["Title"] = "Problem" + pid + " - Test data" 43 | tc.Output["IsProblem"] = true 44 | 45 | tc.RenderTemplate("view/admin/layout.tpl", "view/admin/test_data.tpl") 46 | } 47 | 48 | // 上传测试数据 49 | //@URL: /admin/testdata/(\d+) @method: POST 50 | func (tc *AdminTestdata) Upload(pid string) { 51 | restweb.Logger.Debug("Admin Upload files") 52 | 53 | if tc.Privilege != config.PrivilegeAD { 54 | tc.Err400("Warning", "Error Privilege to Update testdate") 55 | return 56 | } 57 | r := tc.R 58 | r.ParseMultipartForm(32 << 20) 59 | fhs := r.MultipartForm.File["testfiles"] 60 | os.Mkdir(config.Datapath+"/"+pid, os.ModePerm) 61 | for _, fheader := range fhs { 62 | filename := fheader.Filename 63 | file, err := fheader.Open() 64 | if err != nil { 65 | restweb.Logger.Debug(err) 66 | return 67 | } 68 | defer file.Close() 69 | //保存文件 70 | f, err := os.Create(config.Datapath + "/" + pid + "/" + filename) 71 | if err != nil { 72 | restweb.Logger.Debug(err) 73 | return 74 | } 75 | defer f.Close() 76 | io.Copy(f, file) 77 | } 78 | tc.Redirect("/admin/testdata/"+pid, http.StatusFound) 79 | } 80 | 81 | // Download 下载测试数据 82 | //@URL: /admin/testdata/(\d+)/file @method: GET 83 | func (tc *AdminTestdata) Download(pid string) { 84 | restweb.Logger.Debug("Admin Download files") 85 | 86 | filename := tc.Input.Get("type") 87 | file, err := os.Open(config.Datapath + "/" + pid + "/" + filename) 88 | if err != nil { 89 | restweb.Logger.Debug(err) 90 | return 91 | } 92 | defer file.Close() 93 | finfo, _ := file.Stat() 94 | tc.W.Header().Add("ContentType", "application/octet-stream") 95 | tc.W.Header().Add("Content-disposition", "attachment; filename="+filename) 96 | tc.W.Header().Add("Content-Length", strconv.Itoa(int(finfo.Size()))) 97 | io.Copy(tc.W, file) 98 | } 99 | 100 | // Delete 删除指定testdata 101 | //@URL: /admin/testdata/(\d+) @method: DELETE 102 | func (tc *AdminTestdata) Delete(pid string) { 103 | restweb.Logger.Debug("Admin TestData Delete") 104 | 105 | if tc.Privilege != config.PrivilegeAD { 106 | tc.Err400("Warning", "Error Privilege to Delete testdate") 107 | return 108 | } 109 | 110 | filetype := tc.Input.Get("type") 111 | 112 | cmd := exec.Command("rm", config.Datapath+"/"+pid+"/"+filetype) 113 | err := cmd.Run() 114 | if err != nil { 115 | restweb.Logger.Debug(err) 116 | } 117 | tc.W.WriteHeader(200) 118 | } 119 | -------------------------------------------------------------------------------- /controller/ban.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | var bans [9]string = [9]string{"392464930", "CCF", "ccf", "Ccf", "cCf", "CCf", "cCF", "CcF", "ccF"} 4 | 5 | func Ban(str string) bool { 6 | l := len(str) 7 | flag := false 8 | for _, ban := range bans { 9 | idx := 0 10 | for _, char := range ban { 11 | flag = false 12 | for i := idx; i < l; i++ { 13 | if rune(str[i]) == char { 14 | idx = i 15 | flag = true 16 | break 17 | } 18 | } 19 | } 20 | if flag { 21 | return flag 22 | } 23 | } 24 | return flag 25 | } 26 | -------------------------------------------------------------------------------- /controller/contest.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/model" 6 | "restweb" 7 | ) 8 | 9 | type ContestController struct { 10 | class.Controller 11 | Type string 12 | } //@Controller 13 | 14 | //@URL: /contests @method: GET 15 | func (c *ContestController) Index() { 16 | restweb.Logger.Debug("Contest List") 17 | 18 | CModel := model.ContestModel{} 19 | conetestList, err := CModel.List(nil) 20 | if err != nil { 21 | c.Error(err.Error(), 500) 22 | return 23 | } 24 | 25 | c.Output["Contest"] = conetestList 26 | c.Output["Time"] = restweb.GetTime() 27 | c.Output["Title"] = "Contest List" 28 | c.Output["IsContest"] = true 29 | c.Output["Privilege"] = c.Privilege 30 | c.RenderTemplate("view/layout.tpl", "view/contest_list.tpl") 31 | } 32 | -------------------------------------------------------------------------------- /controller/contest/contest.go: -------------------------------------------------------------------------------- 1 | package contest 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/config" 6 | "GoOnlineJudge/model" 7 | 8 | "restweb" 9 | "strconv" 10 | "time" 11 | ) 12 | 13 | type Contest struct { 14 | Cid int 15 | ContestDetail *model.Contest 16 | Index map[int]int 17 | class.Controller 18 | } //@Controller 19 | 20 | func (c *Contest) InitContest(Cid string) { 21 | c.Init() 22 | 23 | cid, err := strconv.Atoi(Cid) 24 | if err != nil { 25 | c.Error(err.Error(), 400) 26 | return 27 | } 28 | c.Cid = cid 29 | 30 | contestModel := model.ContestModel{} 31 | c.ContestDetail, err = contestModel.Detail(cid) 32 | if err != nil { 33 | c.Error(err.Error(), 500) 34 | return 35 | } 36 | 37 | c.Index = make(map[int]int) 38 | for k, v := range c.ContestDetail.List { 39 | c.Index[v] = k 40 | } 41 | c.Output["Cid"] = strconv.Itoa(c.Cid) 42 | c.Output["Title"] = "Contest Detail " + strconv.Itoa(c.Cid) 43 | c.Output["Contest"] = c.ContestDetail.Title 44 | c.Output["IsContestDetail"] = true 45 | c.Output["IsContest"] = true 46 | } 47 | 48 | func (c *Contest) GetCount(qry map[string]string) (int, error) { 49 | if qry == nil { 50 | qry = make(map[string]string) 51 | } 52 | qry["module"] = strconv.Itoa(config.ModuleC) 53 | qry["mid"] = strconv.Itoa(c.Cid) 54 | solutionModel := model.SolutionModel{} 55 | count, err := solutionModel.Count(qry) 56 | if err != nil { 57 | return 0, err 58 | } 59 | return count, nil 60 | } 61 | 62 | //@URL: /contests/(\d+) @method: GET 63 | func (c *Contest) Detail(Cid string) { 64 | restweb.Logger.Debug("Contest Problem List") 65 | 66 | c.InitContest(Cid) 67 | list := make([]*model.Problem, len(c.ContestDetail.List)) 68 | idx := 0 69 | solutionModel := &model.SolutionModel{} 70 | achieve, _ := solutionModel.Achieve(c.Uid, config.ModuleC, c.Cid) 71 | 72 | for _, v := range c.ContestDetail.List { 73 | problemModel := model.ProblemModel{} 74 | one, err := problemModel.Detail(v) 75 | if err != nil { 76 | restweb.Logger.Debug(err) 77 | continue 78 | } 79 | 80 | qry := make(map[string]string) 81 | qry["pid"] = strconv.Itoa(v) 82 | qry["module"] = strconv.Itoa(config.ModuleC) 83 | qry["action"] = "accept" 84 | one.Solve, err = c.GetCount(qry) 85 | if err != nil { 86 | restweb.Logger.Debug(err) 87 | continue 88 | } 89 | qry["action"] = "submit" 90 | one.Submit, err = c.GetCount(qry) 91 | if err != nil { 92 | restweb.Logger.Debug(err) 93 | continue 94 | } 95 | 96 | one.Flag = config.FlagNA 97 | for _, i := range achieve { 98 | if one.Pid == i { 99 | one.Flag = config.FLagAC 100 | break 101 | } 102 | } 103 | 104 | if one.Flag == config.FlagNA { 105 | args := make(map[string]string) 106 | args["pid"] = strconv.Itoa(one.Pid) 107 | args["module"] = strconv.Itoa(config.ModuleC) 108 | args["mid"] = strconv.Itoa(c.Cid) 109 | args["uid"] = c.Uid 110 | l, _ := solutionModel.List(args) 111 | if len(l) > 0 { 112 | one.Flag = config.FLagER 113 | } 114 | } 115 | 116 | one.Pid = idx 117 | list[idx] = one 118 | idx++ 119 | } 120 | 121 | c.Output["Problem"] = list 122 | c.Output["IsContestProblem"] = true 123 | c.Output["Start"] = c.ContestDetail.Start 124 | c.Output["End"] = c.ContestDetail.End 125 | c.Output["Time"] = time.Now().Unix() 126 | c.RenderTemplate("view/layout.tpl", "view/contest/problem_list.tpl") 127 | } 128 | -------------------------------------------------------------------------------- /controller/contest/contestuser.go: -------------------------------------------------------------------------------- 1 | package contest 2 | 3 | import ( 4 | "GoOnlineJudge/config" 5 | "restweb" 6 | ) 7 | 8 | //@URL: /contests/(\d+)/password @method: GET 9 | func (c *Contest) PasswordPage(Cid string) { 10 | c.InitContest(Cid) 11 | restweb.Logger.Debug("herehr") 12 | if c.ContestDetail.Encrypt != config.EncryptPW { 13 | c.Error("No such page", 400) 14 | } 15 | c.RenderTemplate("view/layout.tpl", "view/contest/passwd.tpl") 16 | } 17 | 18 | //@URL: /contests/(\d+)/password @method: POST 19 | func (c *Contest) Password(Cid string) { 20 | c.InitContest(Cid) 21 | 22 | if c.ContestDetail.Encrypt != config.EncryptPW { 23 | c.Error("No such page", 400) 24 | } 25 | 26 | passwd := c.R.FormValue("password") 27 | restweb.Logger.Debug(c.ContestDetail.Argument.(string), passwd) 28 | if passwd == c.ContestDetail.Argument.(string) { 29 | c.SetSession(Cid+"pass", passwd) 30 | c.W.WriteHeader(200) 31 | } else { 32 | c.Error("incorrect password", 400) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /controller/faq.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "restweb" 6 | ) 7 | 8 | type FAQController struct { 9 | class.Controller 10 | } //@Controller 11 | 12 | //faq 页面 13 | //@URL: /faq @method: GET 14 | func (fc *FAQController) Index() { 15 | restweb.Logger.Debug("FAQ Page") 16 | 17 | fc.Output["Title"] = "FAQ" 18 | fc.Output["IsFAQ"] = true 19 | fc.RenderTemplate("view/layout.tpl", "view/faq.tpl") 20 | } 21 | -------------------------------------------------------------------------------- /controller/home.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/model" 6 | "restweb" 7 | ) 8 | 9 | type HomeController struct { 10 | class.Controller 11 | } //@Controller 12 | 13 | //@URL: / @method: GET 14 | func (hc *HomeController) Index() { 15 | restweb.Logger.Debug("Home") 16 | 17 | newsModel := model.NewsModel{} 18 | newsList, err := newsModel.List(-1, -1) 19 | if err != nil { 20 | hc.Error(err.Error(), 500) 21 | return 22 | } 23 | hc.Output["News"] = newsList 24 | hc.Output["Title"] = "Welcome to ZJGSU Online Judge" 25 | hc.Output["IsNews"] = true 26 | 27 | ojModel := &model.OJModel{} 28 | list, err := ojModel.List() 29 | if err == nil { 30 | for _, l := range list { 31 | restweb.Logger.Debug(*l) 32 | } 33 | hc.Output["OJStatus"] = list 34 | } 35 | 36 | hc.RenderTemplate("view/layout.tpl", "view/news_list.tpl") 37 | } 38 | -------------------------------------------------------------------------------- /controller/news.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/config" 6 | "GoOnlineJudge/model" 7 | 8 | "restweb" 9 | 10 | "net/http" 11 | "strconv" 12 | ) 13 | 14 | //新闻控件 15 | 16 | type NewsController struct { 17 | class.Controller 18 | } //@Controller 19 | 20 | //列出所有新闻 21 | //@URL: /news @method: GET 22 | func (nc *NewsController) List() { 23 | restweb.Logger.Debug("News List") 24 | 25 | newsModel := model.NewsModel{} 26 | newsList, err := newsModel.List(-1, -1) 27 | if err != nil { 28 | // http.Error(w, err.Error(), 500) 29 | return 30 | } 31 | nc.Output["News"] = newsList 32 | 33 | nc.Output["Title"] = "Welcome to ZJGSU Online Judge" 34 | nc.Output["IsNews"] = true 35 | nc.RenderTemplate("view/layout.tpl", "view/news_list.tpl") 36 | } 37 | 38 | //@URL: /news/(\d+) @method: GET 39 | func (nc *NewsController) Detail(Nid string) { 40 | nid, err := strconv.Atoi(Nid) //获取nid 41 | if err != nil { 42 | // http.Error(w, "args error", 400) 43 | return 44 | } 45 | 46 | newsModel := model.NewsModel{} 47 | one, err := newsModel.Detail(nid) 48 | if err != nil { 49 | http.Error(nc.W, err.Error(), 500) 50 | } 51 | nc.Output["Detail"] = one 52 | 53 | if one.Status == config.StatusReverse { 54 | nc.Err400("No such news", "No such news") 55 | return 56 | } 57 | 58 | nc.Output["Title"] = "News Detail" 59 | nc.RenderTemplate("view/layout.tpl", "view/news_detail.tpl") 60 | } 61 | -------------------------------------------------------------------------------- /controller/osc.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "restweb" 6 | ) 7 | 8 | type OSCController struct { 9 | class.Controller 10 | } //@Controller 11 | 12 | //@URL: /osc @method: GET 13 | func (oc *OSCController) Index() { 14 | restweb.Logger.Debug("OSC Page") 15 | 16 | oc.Output["Title"] = "ZJGSU OSC" 17 | oc.Output["IsOSC"] = true 18 | oc.RenderTemplate("view/layout.tpl", "view/osc.tpl") 19 | } 20 | -------------------------------------------------------------------------------- /controller/ranklist.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/config" 6 | "GoOnlineJudge/model" 7 | "net/http" 8 | "restweb" 9 | "strconv" 10 | ) 11 | 12 | // 排名 13 | type rank struct { 14 | model.User 15 | Index int `json:"index"bson:"index"` 16 | } 17 | 18 | // 排名控件 19 | type RanklistController struct { 20 | class.Controller 21 | } //@Controller 22 | 23 | //@URL: /ranklist @method: GET 24 | func (rc *RanklistController) Index() { 25 | restweb.Logger.Debug("Ranklist") 26 | 27 | // Page 28 | 29 | if _, ok := rc.Input["page"]; !ok { 30 | rc.Input.Set("page", "1") 31 | } 32 | 33 | userModel := model.UserModel{} 34 | userList, err := userModel.List(nil) 35 | if err != nil { 36 | http.Error(rc.W, err.Error(), 400) 37 | return 38 | } 39 | 40 | var count int 41 | count = 1 42 | for _, one := range userList { 43 | if one.Status == config.StatusAvailable { 44 | count += 1 45 | } 46 | } 47 | 48 | var pageCount = (count-1)/config.UserPerPage + 1 49 | page, err := strconv.Atoi(rc.Input.Get("page")) 50 | if err != nil { 51 | rc.Error("args error", 400) 52 | return 53 | } 54 | if page > pageCount { 55 | rc.Error("args error", 400) 56 | return 57 | } 58 | 59 | pageData := rc.GetPage(page, pageCount) 60 | for k, v := range pageData { 61 | rc.Output[k] = v 62 | } 63 | 64 | qry := make(map[string]string) 65 | qry["offset"] = strconv.Itoa((page - 1) * config.UserPerPage) 66 | qry["limit"] = strconv.Itoa(config.UserPerPage) 67 | userList, err = userModel.List(qry) 68 | if err != nil { 69 | 70 | } 71 | 72 | list := make([]rank, len(userList), len(userList)) 73 | count = 1 74 | for i, one := range userList { 75 | list[i].User = *one 76 | if one.Status == config.StatusAvailable { 77 | list[count-1].Index = count + (page-1)*config.UserPerPage 78 | count += 1 79 | } 80 | } 81 | rc.Output["URL"] = "/ranklist?" 82 | rc.Output["User"] = list 83 | rc.Output["Title"] = "Ranklist" 84 | rc.Output["IsRanklist"] = true 85 | rc.RenderTemplate("view/layout.tpl", "view/ranklist.tpl") 86 | } 87 | -------------------------------------------------------------------------------- /controller/sess.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/model" 6 | 7 | "restweb" 8 | 9 | "strconv" 10 | "strings" 11 | "time" 12 | ) 13 | 14 | type SessController struct { 15 | class.Controller 16 | } //@Controller 17 | 18 | //@URL: /sess @method: GET 19 | func (s *SessController) Get() { 20 | restweb.Logger.Debug("User Login") 21 | 22 | s.Output["Title"] = "User Sign In" 23 | s.Output["IsUserSignIn"] = true 24 | 25 | s.RenderTemplate("view/layout.tpl", "view/user_signin.tpl") 26 | } 27 | 28 | //@URL: /sess @method: POST 29 | func (s *SessController) Post() { 30 | restweb.Logger.Debug("User Login") 31 | 32 | uid := s.Input.Get("user[handle]") 33 | pwd := s.Input.Get("user[password]") 34 | 35 | userModel := model.UserModel{} 36 | ret, err := userModel.Login(uid, pwd) 37 | if err != nil { 38 | restweb.Logger.Debug(err) 39 | s.Error(err.Error(), 500) 40 | return 41 | } 42 | 43 | if ret.Uid == "" { 44 | s.W.WriteHeader(400) 45 | } else { 46 | s.SetSession("Uid", uid) 47 | s.SetSession("Privilege", strconv.Itoa(ret.Privilege)) 48 | s.W.WriteHeader(201) 49 | 50 | // remoteAddr := s.R.Header.Get("X-Real-IP") // if you set niginx as reverse proxy 51 | remoteAddr := strings.Split(s.R.RemoteAddr, ":")[0] // otherwise 52 | userModel.RecordIP(uid, remoteAddr, time.Now().Unix()) 53 | } 54 | } 55 | 56 | //@URL: /sess @method: Delete 57 | func (s *SessController) Delete() { 58 | restweb.Logger.Debug("User Logout") 59 | 60 | s.DeleteSession() 61 | s.W.WriteHeader(200) 62 | } 63 | -------------------------------------------------------------------------------- /controller/status.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "GoOnlineJudge/class" 5 | "GoOnlineJudge/config" 6 | "GoOnlineJudge/model" 7 | "net/http" 8 | "restweb" 9 | "strconv" 10 | ) 11 | 12 | type StatusController struct { 13 | class.Controller 14 | } //@Controller 15 | 16 | //@URL: /status @method: GET 17 | func (sc *StatusController) List() { 18 | restweb.Logger.Debug("Status List") 19 | 20 | searchUrl := "" 21 | qry := make(map[string]string) 22 | // Search 23 | if v, ok := sc.Input["uid"]; ok { 24 | searchUrl += "uid=" + v[0] + "&" 25 | sc.Output["SearchUid"] = v[0] 26 | qry["uid"] = v[0] 27 | } 28 | if v, ok := sc.Input["pid"]; ok { 29 | searchUrl += "pid=" + v[0] + "&" 30 | sc.Output["SearchPid"] = v[0] 31 | qry["pid"] = v[0] 32 | } 33 | if v, ok := sc.Input["judge"]; ok { 34 | searchUrl += "judge=" + v[0] + "&" 35 | sc.Output["SearchJudge"+v[0]] = v[0] 36 | qry["judge"] = v[0] 37 | } 38 | if v, ok := sc.Input["language"]; ok { 39 | searchUrl += "language=" + v[0] + "&" 40 | sc.Output["SearchLanguage"+v[0]] = v[0] 41 | qry["language"] = v[0] 42 | } 43 | sc.Output["URL"] = "/status?" + searchUrl 44 | 45 | // Page 46 | qry["page"] = "1" 47 | 48 | if v, ok := sc.Input["page"]; ok { 49 | qry["page"] = v[0] 50 | } 51 | 52 | solutionModel := model.SolutionModel{} 53 | qry["module"] = strconv.Itoa(config.ModuleP) 54 | qry["action"] = "submit" 55 | count, err := solutionModel.Count(qry) 56 | if err != nil { 57 | sc.Error(err.Error(), 400) 58 | return 59 | } 60 | var pageCount = (count-1)/config.SolutionPerPage + 1 61 | 62 | page, err := strconv.Atoi(qry["page"]) 63 | if err != nil { 64 | sc.Error("args error", 400) 65 | return 66 | } 67 | if page > pageCount { 68 | sc.Error("args error", 400) 69 | return 70 | } 71 | qry["offset"] = strconv.Itoa((page - 1) * config.SolutionPerPage) 72 | qry["limit"] = strconv.Itoa(config.SolutionPerPage) 73 | 74 | pageData := sc.GetPage(page, pageCount) 75 | for k, v := range pageData { 76 | sc.Output[k] = v 77 | } 78 | 79 | list, err := solutionModel.List(qry) 80 | if err != nil { 81 | sc.Error(err.Error(), 500) 82 | return 83 | } 84 | 85 | sc.Output["Solution"] = list 86 | sc.Output["Title"] = "Status List" 87 | sc.Output["IsStatus"] = true 88 | sc.Output["Privilege"] = sc.Privilege 89 | sc.Output["Uid"] = sc.Uid 90 | 91 | sc.RenderTemplate("view/layout.tpl", "view/status_list.tpl") 92 | } 93 | 94 | //@URL: /status/code @method: GET 95 | func (sc *StatusController) Code() { 96 | restweb.Logger.Debug("Status Code") 97 | 98 | sid, err := strconv.Atoi(sc.Input.Get("sid")) 99 | if err != nil { 100 | http.Error(sc.W, "args error", 400) 101 | return 102 | } 103 | 104 | solutionModel := model.SolutionModel{} 105 | one, err := solutionModel.Detail(sid) 106 | if err != nil { 107 | http.Error(sc.W, err.Error(), 400) 108 | return 109 | } 110 | if one.Error != "" { 111 | one.Code = one.Code + "\n/*\n" + one.Error + "*/\n" 112 | } 113 | 114 | if one.Uid == sc.Uid || sc.Privilege > config.PrivilegePU || one.Share { 115 | sc.Output["Solution"] = one 116 | sc.Output["Title"] = "View Code" 117 | sc.Output["IsCode"] = true 118 | sc.RenderTemplate("view/layout.tpl", "view/status_code.tpl") 119 | } else { 120 | sc.Err400("Warning", "You can't see it!") 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /db_backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # use `crontab -e` to add the script so that it can backup automatically 3 | # e.g 4 | # 0 5 * * * /home/acm/go/src/GoOnlineJudge/db_backup.sh 5 | # means the script will be excuted at 5 o'clock every morning 6 | mongodump -d oj -o ../../db_backup 7 | -------------------------------------------------------------------------------- /db_restore.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | mongorestore -d oj ../../db_backup/oj 3 | -------------------------------------------------------------------------------- /docs/function.md: -------------------------------------------------------------------------------- 1 | #功能简介 2 | 版本14.11.01 3 | 4 | ###符号说明: 5 | 6 | # 与用户权限相关的方面 7 | 8 | ###功能: 9 | 10 | 总览: 11 | 12 | 用户通过导航模块使用不同功能 13 | 14 | 功能: 15 | 16 | 主页: 17 | 18 | 展示新闻、通知,或常用信息、链接等 19 | 20 | 问题: 21 | 22 | 列表页面: 23 | 24 | 列表展示问题的基本信息 25 | 按任题目源、ID、标题等搜索题目 26 | 27 | # 权限不同的用户看到的题目列表不同 28 | 29 | 问题详情页面: 30 | 31 | 显示题目所有的要求和判题信息(描述、通过情况等) 32 | 点击题目源、作者直接转向相关信息 33 | 相关功能,比如提交、通过数据、状态数据 34 | 35 | 状态: 36 | 37 | 展示所有的提交判题状态 38 | 丰富且方便的搜索功能,便于查看自己的状态 39 | 实时刷新,判题状态实时更新 40 | 能通过状态方便的转向其他功能,比如顺便查看题目、用户 41 | 显示代码相似度,可以防作弊 42 | 43 | # 用户权限不同看到的信息不同,如管理员可点击看代码 44 | 45 | 竞赛: 46 | 47 | 列表页面: 48 | 49 | 该模块用于比赛 50 | 展示所有竞赛的基本信息 51 | 52 | 竞赛详情页面: 53 | 54 | 其中展示竞赛的详细信息 55 | 不同的竞赛由不同的权限(public、private、password) 56 | 竞赛中的所有功能与OJ分开管理,数据显示和提交不共享 57 | 竞赛排名导出,方便教师统计成绩 58 | 59 | 排名: 60 | 61 | 显示用户的成绩以及排名信息 62 | 同样可以方便的搜索 63 | 64 | 帮助: 65 | 66 | 介绍OJ相关说明和OJ的帮助文档,比如编译环境、判题结果说明、代码示例等 67 | 68 | 69 | 用户: 70 | 71 | 登录页面: 72 | 73 | 74 | 用户详情页面: 75 | 76 | 显示用户的基本信息,包括题目的完成情况以及提交数据排名等 77 | 题目的完成情况包含已解决和未解决的题目,并有提交次数说明 78 | 用户的最近登入纪录 79 | 80 | 代码: 81 | 82 | 显示用户提交的代码,以及该次提交基本信息 83 | 不同代码不同高亮显示 84 | 85 | 管理: 86 | 87 | 权限: 88 | 89 | 所有管理页面都需要做用户权限的验证 90 | 大致权限从低到高排列如下: 91 | primary_user ->普通用户 92 | teacher ->教师 93 | admin ->超级管理 94 | 95 | 功能: 96 | 97 | 编辑新闻(添加/删除/修改) 98 | 编辑题目(添加/删除/修改) 99 | 编辑练习(添加/删除/修改) 100 | 编辑权限(添加/删除/修改) 101 | 修改密码 102 | 题目重判 103 | 账号生成 104 | 题目导入 105 | -------------------------------------------------------------------------------- /docs/requirement.md: -------------------------------------------------------------------------------- 1 | #Requirement 2 | 3 | ###符号说明: 4 | 5 | * 可以暂时不需要的功能 6 | # 与用户权限相关的方面 7 | 8 | ###需求: 9 | 10 | 总览: 11 | 12 | 用户通过导航模块(不一定要在顶部)使用不同功能 13 | 需要相关说明/紧急通知功能,即用户在任何页面都可以看到该消息(相当于之前的滚动横幅,但不一定是横幅,比如弹窗) 14 | 15 | * 操作简洁,比如可以直接登录而不需要点击进入登录页面 16 | 17 | # 管理员可以方便的管理 18 | 19 | 外观: 20 | 21 | 不求好看,但求简洁好用 22 | 23 | 功能: 24 | 25 | 主页: 26 | 27 | 展示新闻、通知,或常用信息、链接等 28 | 29 | # 管理员可以直接进行内容的编辑 30 | 31 | 问题: 32 | 33 | 列表页面: 34 | 35 | 列表展示问题的基本信息 36 | 按任何类型、关键字等搜索 37 | 根据不同的用户,显示题目的完成情况(正确、未做、不正确) 38 | 39 | * 通过题目源找出源中有题目 40 | * 题目的搜索功能可以单独拿出来作为一个整体 41 | 42 | # 管理员可以直接在此页面进行简单的操作,比如直接转向编辑页面 43 | # 权限不同的用户看到的题目列表可能不同 44 | 45 | 问题详情页面: 46 | 47 | 显示题目所有的要求和判题信息(描述、通过情况等) 48 | 点击题目源、作者直接转向相关信息 49 | 相关功能,比如提交、通过数据、状态数据 50 | 51 | * 页面的布局最好统一,即不存在添加题目产生的html代码 52 | * 该题的留言板/回答功能 53 | 54 | # 管理员可以直接在此页面进行简单的操作,比如直接转向编辑页面 55 | 56 | 代码提交页面: 57 | 58 | 题目号、语言、代码框足矣 59 | 60 | 问题通过数据页面: 61 | 62 | 展示所有该题通过的用户状态数据,以及该题的提交、错误情况 63 | 内容要求与状态页面大致相同,但为用户通过时的最佳情况 64 | 65 | 状态: 66 | 67 | 展示所有的提交判题状态 68 | 丰富且方便的搜索功能,便于查看自己的状态 69 | 实时刷新,判题状态实时更新 70 | 尽可能的能通过状态方便的转向其他功能,比如顺便查看题目、用户 71 | 72 | # 用户权限不同看到的信息不同,如管理员可点击看代码 73 | # 用户可以点击直接修改已提交代码斌再次提交 74 | 75 | 竞赛: 76 | 77 | 列表页面: 78 | 79 | 该模块用于比赛 80 | 展示所有竞赛的基本信息,并且显示正在进行的竞赛数量 81 | 同样可以方便的搜索 82 | 在竞赛中显示的所有题目,在OJ中不可见,但竞赛过期后,能自动添加至OJ题库中 83 | 84 | # 管理员可以直接在此页面进行简单的操作,比如直接转向编辑页面 85 | 86 | 竞赛详情页面: 87 | 88 | 其中展示竞赛的详细信息 89 | 不同的竞赛由不同的权限(public、private、password),需要处理好权限的验证,还有开始与结束时间的验证 90 | 竞赛中的所有功能与OJ分开管理,数据显示和提交不共享 91 | 所有功能与OJ保持一致,需求也大致相同,另外需要比赛的单独通知功能 92 | 93 | # 管理员可以直接在此页面进行简单的操作,比如直接转向编辑页面 94 | 95 | 练习: 96 | 97 | 该模块用于平时日常/教学练习作业题 98 | 所有需求与竞赛相同 99 | 100 | * 练习中的题目可以在OJ题库中可见 101 | 102 | # 该模块用户权限比竞赛低,比如教师只能操作练习但不能操作竞赛 103 | 104 | 排名: 105 | 106 | 显示用户的成绩以及排名信息 107 | 同样可以方便的搜索 108 | 109 | 帮助: 110 | 111 | 介绍OJ相关说明和OJ的帮助文档,比如编译环境、判题结果说明、代码示例等 112 | 113 | 114 | 用户: 115 | 116 | 登录页面: 117 | 118 | = =其实我不想单独开个登录页面的 119 | 可以利用ajax做数据交换 120 | 121 | 用户详情页面: 122 | 123 | 显示用户的基本信息,包括题目的完成情况以及提交数据排名等 124 | 题目的完成情况包含已解决和未解决的题目,并有提交次数说明 125 | 126 | * 代码管理入口,可以下载所有代码等 127 | * 用户周边排名情况 128 | 129 | 代码: 130 | 131 | 显示用户提交的代码,以及该次提交基本信息 132 | 不同代码不同高亮显示 133 | 134 | 管理: 135 | 136 | 权限: 137 | 138 | 所有管理页面都需要做用户权限的验证 139 | 大致权限从低到高排列如下: 140 | primary_user ->普通用户 141 | source_broswer ->代码查看 142 | exercise_admin ->练习管理 143 | contest_admin ->竞赛管理 144 | super_admin ->超级管理 145 | 146 | 功能: 147 | 148 | 修改公告 149 | 编辑新闻(添加/删除/修改) 150 | 编辑题目(添加/删除/修改) 151 | 编辑练习(添加/删除/修改) 152 | 编辑竞赛(添加/删除/修改) 153 | 编辑权限(添加/删除/修改) 154 | 修改密码 155 | 题目重判 156 | 账号生成 157 | 158 | * 题目导入导出 -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Install Ubuntu. 4 | sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list 5 | apt-get update 6 | apt-get -y upgrade 7 | apt-get install -y build-essential mongodb flex openjdk-7-jdk 8 | rm -rf /var/lib/apt/lists/* 9 | 10 | # Install Golang. 11 | mkdir -p /home/acm/goroot 12 | wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz 13 | tar xzf go1.4.2.linux-amd64.tar.gz 14 | cp -r go/* /home/acm/goroot/ 15 | mkdir -p /home/acm/go/src /home/acm/go/pkg /home/acm/go/bin 16 | 17 | # Set environment variables for Golang. 18 | export GOROOT=/home/acm/goroot 19 | export GOPATH=/home/acm/go 20 | export OJ_HOME=$GOPATH/src 21 | export DATA_PATH=$GOPATH/Data 22 | export LOG_PATH=$OJ_HOME/log 23 | export RUN_PATH=$OJ_HOME/run 24 | export JUDGE_HOST="http://127.0.0.1:8888" 25 | export MONGODB_PORT_27017_TCP_ADDR=127.0.0.1 26 | export PATH=$GOROOT/bin:$GOPATH/bin:$PATH 27 | 28 | # Install MongoDB. 29 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 30 | echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' > /etc/apt/sources.list.d/mongodb.list 31 | apt-get update 32 | apt-get install -y mongodb 33 | rm -rf /var/lib/apt/lists/* 34 | 35 | # Get OJ Source Code 36 | mkdir -p $OJ_HOME/ProblemData 37 | mkdir -p $OJ_HOME/run 38 | mkdir -p $OJ_HOME/log 39 | go get gopkg.in/mgo.v2 40 | go get github.com/djimenez/iconv-go 41 | git clone https://github.com/ZJGSU-Open-Source/GoOnlineJudge.git $GOPATH/src/GoOnlineJudge 42 | git clone https://github.com/ZJGSU-Open-Source/RunServer.git $GOPATH/src/RunServer 43 | git clone https://github.com/ZJGSU-Open-Source/vjudger.git $GOPATH/src/vjudger 44 | git clone https://github.com/sakeven/restweb.git $GOPATH/src/restweb 45 | 46 | # Build OJ 47 | cd $OJ_HOME/restweb 48 | cd restweb 49 | go install 50 | cd $OJ_HOME 51 | restweb build GoOnlineJudge 52 | cd $OJ_HOME/RunServer 53 | ./make.sh 54 | 55 | echo 56 | echo ---------- 57 | echo installed. 58 | echo ---------- 59 | echo 60 | 61 | # Run MongoDB, GoOnlineJudge, RunServer 62 | mongod --dbpath /home/acm/go/Data --logpath /home/acm/go/Data/mongo.log 63 | cd $OJ_HOME/ 64 | restweb run GoOnlineJudge & 65 | cd $GOPATH/src/GoOnlineJudge 66 | RunServer & 67 | -------------------------------------------------------------------------------- /log/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/log/.gitkeep -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "restweb" 6 | 7 | _ "GoOnlineJudge/schedule" 8 | 9 | "GoOnlineJudge/controller" 10 | "GoOnlineJudge/controller/admin" 11 | "GoOnlineJudge/controller/contest" 12 | ) 13 | 14 | func main() { 15 | 16 | restweb.RegisterController(&controller.FAQController{}) 17 | restweb.RegisterController(&controller.HomeController{}) 18 | restweb.RegisterController(&controller.NewsController{}) 19 | restweb.RegisterController(&controller.OSCController{}) 20 | restweb.RegisterController(&controller.ProblemController{}) 21 | restweb.RegisterController(&controller.SessController{}) 22 | restweb.RegisterController(&controller.ContestController{}) 23 | restweb.RegisterController(&controller.RanklistController{}) 24 | restweb.RegisterController(&controller.StatusController{}) 25 | restweb.RegisterController(&controller.UserController{}) 26 | restweb.RegisterController(&admin.AdminNews{}) 27 | restweb.RegisterController(&admin.AdminRejudge{}) 28 | restweb.RegisterController(&admin.AdminUser{}) 29 | restweb.RegisterController(&admin.AdminContest{}) 30 | restweb.RegisterController(&admin.AdminHome{}) 31 | restweb.RegisterController(&admin.AdminImage{}) 32 | restweb.RegisterController(&admin.AdminNotice{}) 33 | restweb.RegisterController(&admin.AdminProblem{}) 34 | restweb.RegisterController(&admin.AdminTestdata{}) 35 | restweb.RegisterController(&contest.ContestRanklist{}) 36 | restweb.RegisterController(&contest.ContestStatus{}) 37 | restweb.RegisterController(&contest.Contest{}) 38 | restweb.RegisterController(&contest.ContestProblem{}) 39 | 40 | restweb.AddFile("/static/", ".") 41 | log.Fatal(restweb.Run()) 42 | } 43 | -------------------------------------------------------------------------------- /model/class/init.go: -------------------------------------------------------------------------------- 1 | package class 2 | 3 | func init() { 4 | Config() 5 | } 6 | -------------------------------------------------------------------------------- /model/class/model.go: -------------------------------------------------------------------------------- 1 | package class 2 | 3 | import ( 4 | "crypto/md5" 5 | "crypto/sha1" 6 | "fmt" 7 | "io" 8 | "os" 9 | "time" 10 | 11 | "gopkg.in/mgo.v2" 12 | "gopkg.in/mgo.v2/bson" 13 | ) 14 | 15 | const DBLasting = false 16 | 17 | type ids struct { 18 | Name string `json:"name"bson:"name"` 19 | Id int `json:"id"bson:"id"` 20 | } 21 | 22 | type Model struct { 23 | Session *mgo.Session 24 | DB *mgo.Database 25 | } 26 | 27 | func (this *Model) CloseDB() { 28 | if !DBLasting { 29 | this.Session.Close() 30 | } 31 | } 32 | 33 | func (this *Model) GetID(c string) (id int, err error) { 34 | change := mgo.Change{ 35 | Update: bson.M{"$inc": bson.M{"id": 1}}, 36 | Upsert: true, 37 | ReturnNew: true, 38 | } 39 | 40 | var one ids 41 | _, err = this.DB.C("ids").Find(bson.M{"name": c}).Apply(change, &one) 42 | id = one.Id 43 | return 44 | } 45 | 46 | func (this *Model) GetTime() (ft string) { 47 | t := time.Now().Unix() 48 | ft = time.Unix(t, 0).Format("2006-01-02 15:04:05") 49 | return 50 | } 51 | 52 | func (this *Model) EncryptPassword(str string) (pwd string, err error) { 53 | m := md5.New() 54 | _, err = io.WriteString(m, str) 55 | p1 := fmt.Sprintf("%x", m.Sum(nil)) 56 | s := sha1.New() 57 | _, err = io.WriteString(s, str) 58 | p2 := fmt.Sprintf("%x", s.Sum(nil)) 59 | pwd = p1 + p2 60 | return 61 | } 62 | 63 | var ( 64 | conn string // mongo url 65 | ) 66 | 67 | func Config() { 68 | 69 | username := os.Getenv("MONGODB_USERNAME") 70 | password := os.Getenv("MONGODB_PASSWORD") 71 | host := os.Getenv("MONGODB_PORT_27017_TCP_ADDR") 72 | 73 | if len(host) == 0 { 74 | host = "localhost" 75 | } 76 | 77 | port := os.Getenv("MONGODB_PORT_27017_TCP_PORT") 78 | if len(port) == 0 { 79 | port = "27017" 80 | } 81 | 82 | instance := os.Getenv("MONGODB_INSTANCE_NAME") 83 | if len(instance) == 0 { 84 | instance = "oj" 85 | } 86 | 87 | conn = "" 88 | if len(username) > 0 { 89 | conn += username 90 | 91 | if len(password) > 0 { 92 | conn += ":" + password 93 | } 94 | conn += "@" 95 | } 96 | 97 | conn += fmt.Sprintf("%s:%s/%s", host, port, instance) 98 | 99 | // Blow is test connection. 100 | sess, err := mgo.Dial(conn) 101 | if err != nil { 102 | panic(err) 103 | } 104 | defer sess.Close() 105 | 106 | if err := sess.Ping(); err != nil { 107 | panic(err) 108 | } 109 | } 110 | 111 | func (m *Model) OpenDB() error { 112 | 113 | var err error 114 | 115 | m.Session, err = mgo.Dial(conn) 116 | if err != nil { 117 | return err 118 | } 119 | 120 | m.DB = m.Session.DB("") 121 | return nil 122 | } 123 | -------------------------------------------------------------------------------- /model/doc/GoServerAPI.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/model/doc/GoServerAPI.xlsx -------------------------------------------------------------------------------- /model/errors.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "errors" 5 | "os" 6 | "restweb/golog" 7 | ) 8 | 9 | var ( 10 | //数据库打开错误 11 | DBErr = errors.New("DB Open Error") 12 | 13 | //函数参数错误 14 | ArgsErr = errors.New("Args Error") 15 | 16 | //没有查询到指定数据 17 | NotFoundErr = errors.New("Not Found") 18 | 19 | //更新错误 20 | OpErr = errors.New("Operate Error") 21 | 22 | //ID生成错误 23 | IDErr = errors.New("Get ID Error") 24 | 25 | //查询或查询参数错误 26 | QueryErr = errors.New("Query Error") 27 | 28 | //密码加密错误 29 | EncryptErr = errors.New("Encrypt Error") 30 | 31 | ExistErr = errors.New("Id has existed") 32 | ) 33 | 34 | var logger *golog.Log 35 | 36 | func init() { 37 | logger = golog.NewLog(os.Stdout, golog.Ldebug|golog.Linfo) 38 | } 39 | -------------------------------------------------------------------------------- /model/last.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "GoOnlineJudge/model/class" 5 | "gopkg.in/mgo.v2" 6 | "gopkg.in/mgo.v2/bson" 7 | ) 8 | 9 | type VIds struct { 10 | Name string `json:"name"bson:"name"` 11 | Id int `json:"id"bson:"id"` 12 | } 13 | 14 | type VIdsModel struct { 15 | class.Model 16 | } 17 | 18 | func (v *VIdsModel) GetLastID(c string) (id int, err error) { 19 | err = v.OpenDB() 20 | if err != nil { 21 | return 0, DBErr 22 | } 23 | defer v.CloseDB() 24 | 25 | var ids VIds 26 | err = v.DB.C("VIds").Find(bson.M{"name": c}).One(&ids) 27 | if err == mgo.ErrNotFound { 28 | return 0, nil 29 | } else if err != nil { 30 | return 0, OpErr 31 | } 32 | return ids.Id, nil 33 | } 34 | 35 | func (v *VIdsModel) SetLastID(c string, id int) error { 36 | err := v.OpenDB() 37 | if err != nil { 38 | return DBErr 39 | } 40 | defer v.CloseDB() 41 | 42 | err = v.DB.C("VIds").Update(bson.M{"name": c}, bson.M{"$set": bson.M{"id": id}}) 43 | if err == mgo.ErrNotFound { 44 | ids := VIds{Name: c, Id: id} 45 | err = v.DB.C("VIds").Insert(&ids) 46 | return err 47 | } else if err != nil { 48 | return OpErr 49 | } 50 | 51 | return nil 52 | } 53 | -------------------------------------------------------------------------------- /model/ma.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "GoOnlineJudge/model/class" 5 | 6 | "gopkg.in/mgo.v2" 7 | "gopkg.in/mgo.v2/bson" 8 | ) 9 | 10 | type migrate struct { 11 | Version int `json:"version"bson:"version"` 12 | } 13 | 14 | type migrateModel struct { 15 | class.Model 16 | } 17 | 18 | var versionListSelector = bson.M{"_id": 0, 19 | "version": 1, 20 | } 21 | 22 | func (m *migrateModel) Update(version int) error { 23 | err := m.OpenDB() 24 | if err != nil { 25 | return DBErr 26 | } 27 | defer m.CloseDB() 28 | 29 | alt := make(map[string]interface{}) 30 | alt["version"] = version 31 | 32 | err = m.DB.C("migrate").Update(bson.M{}, bson.M{"$set": alt}) 33 | if err == mgo.ErrNotFound { 34 | err = m.DB.C("migrate").Insert(&migrate{Version: version}) 35 | if err != nil { 36 | return OpErr 37 | } 38 | } else if err != nil { 39 | return OpErr 40 | } 41 | 42 | return nil 43 | } 44 | 45 | func (m *migrateModel) Get() (*migrate, error) { 46 | err := m.OpenDB() 47 | if err != nil { 48 | return nil, DBErr 49 | } 50 | defer m.CloseDB() 51 | 52 | q := m.DB.C("migrate").Find(nil).Select(versionListSelector) 53 | 54 | var list []*migrate 55 | err = q.All(&list) 56 | if err != nil { 57 | return nil, OpErr 58 | } else if len(list) == 0 { 59 | return &migrate{0}, nil 60 | } 61 | 62 | return list[0], nil 63 | } 64 | -------------------------------------------------------------------------------- /model/migrate.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "GoOnlineJudge/config" 5 | ) 6 | 7 | func init() { 8 | setup() 9 | } 10 | 11 | type Migrator func() 12 | 13 | func setup() { 14 | var Migrations = []Migrator{ 15 | Migrate_2015_07_09, 16 | } 17 | 18 | mgt := &migrateModel{} 19 | mi, err := mgt.Get() 20 | if err != nil { 21 | return 22 | } 23 | 24 | if len(Migrations) < mi.Version { 25 | return 26 | } 27 | 28 | for _, m := range Migrations[mi.Version:] { 29 | m() 30 | } 31 | 32 | mgt.Update(len(Migrations)) 33 | 34 | } 35 | 36 | func Migrate_2015_07_09() { 37 | userModel := &UserModel{} 38 | user := &User{} 39 | user.Uid = "admin" 40 | user.Pwd = "admin" 41 | user.Nick = "admin" 42 | user.Privilege = config.PrivilegeAD 43 | 44 | userModel.Insert(*user) 45 | } 46 | -------------------------------------------------------------------------------- /model/oj.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "GoOnlineJudge/model/class" 5 | "gopkg.in/mgo.v2" 6 | "gopkg.in/mgo.v2/bson" 7 | ) 8 | 9 | type OJStatus struct { 10 | Name string `json:"name"bson:"name"` 11 | Status int `json:"status"bson:"status"` 12 | } 13 | 14 | type OJModel struct { 15 | class.Model 16 | } 17 | 18 | var statusListSelector = bson.M{"_id": 0, 19 | "name": 1, 20 | "status": 1, 21 | } 22 | 23 | func (o *OJModel) Update(status *OJStatus) error { 24 | 25 | if status == nil { 26 | return ArgsErr 27 | } 28 | err := o.OpenDB() 29 | if err != nil { 30 | return DBErr 31 | } 32 | defer o.CloseDB() 33 | 34 | alt := make(map[string]interface{}) 35 | alt["status"] = status.Status 36 | 37 | err = o.DB.C("OJStatus").Update(bson.M{"name": status.Name}, bson.M{"$set": alt}) 38 | if err == mgo.ErrNotFound { 39 | err = o.DB.C("OJStatus").Insert(status) 40 | if err != nil { 41 | return OpErr 42 | } 43 | } else if err != nil { 44 | return OpErr 45 | } 46 | 47 | return nil 48 | } 49 | 50 | func (o *OJModel) List() ([]*OJStatus, error) { 51 | err := o.OpenDB() 52 | if err != nil { 53 | return nil, DBErr 54 | } 55 | defer o.CloseDB() 56 | 57 | q := o.DB.C("OJStatus").Find(nil).Select(statusListSelector).Sort("name") 58 | 59 | var list []*OJStatus 60 | err = q.All(&list) 61 | if err != nil { 62 | return nil, OpErr 63 | } 64 | return list, nil 65 | } 66 | -------------------------------------------------------------------------------- /schedule/error.go: -------------------------------------------------------------------------------- 1 | package schedule 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrConnectFailed = errors.New("connection failed") 9 | ErrNoSuchProblem = errors.New("no such problem") 10 | ErrMatchFailed = errors.New("match failed") 11 | ErrResponse = errors.New("can't get response") 12 | ) 13 | 14 | const ( 15 | StatusReverse = 0 //不可用 16 | StatusIncon = 1 //正在比赛中 17 | StatusAvailable = 2 //可用 18 | StatusPending = 3 //等待 19 | StatusRunning = 4 //进行中 20 | StatusEnding = 5 //结束 21 | ) 22 | -------------------------------------------------------------------------------- /schedule/init.go: -------------------------------------------------------------------------------- 1 | package schedule 2 | 3 | import ( 4 | "GoOnlineJudge/config" 5 | "GoOnlineJudge/model" 6 | "time" 7 | ) 8 | 9 | type RemoteOJInterface interface { 10 | Init() 11 | Host() string 12 | Ping() error 13 | GetProblems() error 14 | } 15 | 16 | var ROJs = []RemoteOJInterface{&PKUJudger{}} 17 | 18 | func init() { 19 | go func() { 20 | for _, oj := range ROJs { 21 | oj.Init() 22 | } 23 | for { 24 | errCnt := 0 25 | for _, oj := range ROJs { 26 | again: 27 | if err := oj.GetProblems(); err != nil { 28 | errCnt++ 29 | if errCnt > 5 { 30 | continue 31 | } 32 | time.Sleep(10 * time.Second) 33 | goto again 34 | } 35 | } 36 | time.Sleep(7 * 24 * time.Hour) //update per week 37 | } 38 | }() 39 | go func() { 40 | ojModel := &model.OJModel{} 41 | status := &model.OJStatus{} 42 | for { 43 | for _, oj := range ROJs { 44 | err := oj.Ping() 45 | status.Name = oj.Host() 46 | if err != nil { 47 | status.Status = config.StatusUnavailable 48 | ojModel.Update(status) 49 | } else { 50 | status.Status = config.StatusOk 51 | ojModel.Update(status) 52 | } 53 | } 54 | time.Sleep(10 * time.Minute) 55 | } 56 | }() 57 | } 58 | -------------------------------------------------------------------------------- /static/favicon-backup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/favicon-backup.ico -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/favicon.ico -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/img/Shortcuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/img/Shortcuts.png -------------------------------------------------------------------------------- /static/img/logo.bak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/img/logo.bak.png -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/img/logo.png -------------------------------------------------------------------------------- /static/img/pid8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/img/pid8.jpg -------------------------------------------------------------------------------- /static/img/zjgsu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/img/zjgsu.png -------------------------------------------------------------------------------- /static/img/脸萌.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/img/脸萌.jpg -------------------------------------------------------------------------------- /static/js/operation.js: -------------------------------------------------------------------------------- 1 | var ConfirmDelete = function (url, msg) { 2 | ret = window.confirm(msg); 3 | if (ret == true) { 4 | //alert(url); 5 | //window.location.href = url; 6 | //indow.location.href = "127.0.0.1:8888/admin/news/delete/nid/9"; 7 | //window.location.assign(url); 8 | //window.open(url); 9 | $.ajax({ 10 | url: url, 11 | type: 'POST', 12 | data: {}, 13 | error: function () { 14 | alert('error'); 15 | }, 16 | success: function () { 17 | alert('success!'); 18 | } 19 | }); 20 | } 21 | } -------------------------------------------------------------------------------- /static/kindeditor/plugins/anchor/anchor.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('anchor', function(K) { 11 | var self = this, name = 'anchor', lang = self.lang(name + '.'); 12 | self.plugin.anchor = { 13 | edit : function() { 14 | var html = ['
', 15 | '
', 16 | '', 17 | '', 18 | '
', 19 | '
'].join(''); 20 | var dialog = self.createDialog({ 21 | name : name, 22 | width : 300, 23 | title : self.lang(name), 24 | body : html, 25 | yesBtn : { 26 | name : self.lang('yes'), 27 | click : function(e) { 28 | self.insertHtml('').hideDialog().focus(); 29 | } 30 | } 31 | }); 32 | var div = dialog.div, 33 | nameBox = K('input[name="name"]', div); 34 | var img = self.plugin.getSelectedAnchor(); 35 | if (img) { 36 | nameBox.val(unescape(img.attr('data-ke-name'))); 37 | } 38 | nameBox[0].focus(); 39 | nameBox[0].select(); 40 | }, 41 | 'delete' : function() { 42 | self.plugin.getSelectedAnchor().remove(); 43 | } 44 | }; 45 | self.clickToolbar(name, self.plugin.anchor.edit); 46 | }); 47 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/autoheight/autoheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('autoheight', function(K) { 11 | var self = this; 12 | 13 | if (!self.autoHeightMode) { 14 | return; 15 | } 16 | 17 | var minHeight; 18 | 19 | function hideScroll() { 20 | var edit = self.edit; 21 | var body = edit.doc.body; 22 | edit.iframe[0].scroll = 'no'; 23 | body.style.overflowY = 'hidden'; 24 | } 25 | 26 | function resetHeight() { 27 | var edit = self.edit; 28 | var body = edit.doc.body; 29 | edit.iframe.height(minHeight); 30 | self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight)); 31 | } 32 | 33 | function init() { 34 | minHeight = K.removeUnit(self.height); 35 | 36 | self.edit.afterChange(resetHeight); 37 | hideScroll(); 38 | resetHeight(); 39 | } 40 | 41 | if (self.isCreated) { 42 | init(); 43 | } else { 44 | self.afterCreate(init); 45 | } 46 | }); 47 | 48 | /* 49 | * 如何实现真正的自动高度? 50 | * 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。 51 | * 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。 52 | * 由此就实现了真正的自动高度 53 | * 测试:chrome、firefox、IE9、IE8 54 | * */ 55 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/baidumap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 百度地图API自定义地图 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 83 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/baidumap/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Baidu Maps 6 | 10 | 11 | 39 | 40 | 41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/clearhtml/clearhtml.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('clearhtml', function(K) { 11 | var self = this, name = 'clearhtml'; 12 | self.clickToolbar(name, function() { 13 | self.focus(); 14 | var html = self.html(); 15 | html = html.replace(/(]*>)([\s\S]*?)(<\/script>)/ig, ''); 16 | html = html.replace(/(]*>)([\s\S]*?)(<\/style>)/ig, ''); 17 | html = K.formatHtml(html, { 18 | a : ['href', 'target'], 19 | embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], 20 | img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'], 21 | table : ['border'], 22 | 'td,th' : ['rowspan', 'colspan'], 23 | 'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [] 24 | }); 25 | self.html(html); 26 | self.cmd.selection(true); 27 | self.addBookmark(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/code/code.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // google code prettify: http://google-code-prettify.googlecode.com/ 11 | // http://google-code-prettify.googlecode.com/ 12 | 13 | KindEditor.plugin('code', function(K) { 14 | var self = this, name = 'code'; 15 | self.clickToolbar(name, function() { 16 | var lang = self.lang(name + '.'), 17 | html = ['
', 18 | '
', 19 | '', 35 | '
', 36 | '', 37 | '
'].join(''), 38 | dialog = self.createDialog({ 39 | name : name, 40 | width : 450, 41 | title : self.lang(name), 42 | body : html, 43 | yesBtn : { 44 | name : self.lang('yes'), 45 | click : function(e) { 46 | var type = K('.ke-code-type', dialog.div).val(), 47 | code = textarea.val(), 48 | cls = type === '' ? '' : ' lang-' + type, 49 | html = '
\n' + K.escape(code) + '
'; 50 | if (K.trim(code) === '') { 51 | alert(lang.pleaseInput); 52 | textarea[0].focus(); 53 | return; 54 | } 55 | self.insertHtml(html).hideDialog().focus(); 56 | } 57 | } 58 | }), 59 | textarea = K('textarea', dialog.div); 60 | textarea[0].focus(); 61 | }); 62 | }); 63 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/code/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | 3 | pre.prettyprint { 4 | border: 0; 5 | border-left: 3px solid rgb(204, 204, 204); 6 | margin-left: 2em; 7 | padding: 0.5em; 8 | font-size: 110%; 9 | display: block; 10 | font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 11 | margin: 1em 0px; 12 | white-space: pre; 13 | } 14 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/0.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/1.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/10.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/100.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/100.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/101.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/101.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/102.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/102.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/103.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/103.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/104.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/104.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/105.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/105.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/106.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/106.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/107.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/107.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/108.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/108.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/109.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/109.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/11.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/110.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/110.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/111.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/112.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/112.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/113.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/113.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/114.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/114.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/115.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/115.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/116.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/116.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/117.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/117.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/118.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/118.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/119.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/119.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/12.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/120.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/120.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/121.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/121.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/122.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/122.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/123.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/123.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/124.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/124.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/125.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/125.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/126.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/126.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/127.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/127.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/128.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/129.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/129.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/13.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/130.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/130.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/131.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/131.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/132.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/132.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/133.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/133.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/134.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/134.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/14.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/15.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/16.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/17.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/18.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/19.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/2.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/20.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/21.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/22.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/23.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/24.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/25.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/26.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/27.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/28.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/29.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/3.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/30.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/31.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/32.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/33.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/34.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/35.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/36.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/37.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/38.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/39.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/4.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/40.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/41.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/42.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/43.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/44.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/45.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/46.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/47.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/48.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/49.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/5.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/50.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/51.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/52.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/53.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/54.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/55.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/56.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/57.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/58.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/59.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/6.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/60.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/61.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/62.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/63.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/64.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/65.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/66.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/67.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/68.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/69.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/7.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/70.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/71.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/72.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/72.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/73.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/73.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/74.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/74.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/75.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/75.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/76.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/77.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/77.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/78.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/78.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/79.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/79.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/8.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/80.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/80.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/81.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/81.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/82.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/82.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/83.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/83.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/84.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/85.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/85.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/86.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/86.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/87.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/87.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/88.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/88.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/89.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/89.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/9.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/90.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/90.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/91.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/91.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/92.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/92.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/93.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/93.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/94.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/94.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/95.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/95.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/96.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/96.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/97.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/97.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/98.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/98.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/99.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/99.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/emoticons/images/static.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/emoticons/images/static.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/file-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/filemanager/images/file-16.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/file-64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/filemanager/images/file-64.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/folder-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/filemanager/images/folder-16.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/folder-64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/filemanager/images/folder-64.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/filemanager/images/go-up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/filemanager/images/go-up.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/align_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/image/images/align_left.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/align_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/image/images/align_right.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/align_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/image/images/align_top.gif -------------------------------------------------------------------------------- /static/kindeditor/plugins/image/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/image/images/refresh.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/lineheight/lineheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('lineheight', function(K) { 11 | var self = this, name = 'lineheight', lang = self.lang(name + '.'); 12 | self.clickToolbar(name, function() { 13 | var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'}); 14 | if (commonNode) { 15 | curVal = commonNode.css('line-height'); 16 | } 17 | var menu = self.createMenu({ 18 | name : name, 19 | width : 150 20 | }); 21 | K.each(lang.lineHeight, function(i, row) { 22 | K.each(row, function(key, val) { 23 | menu.addItem({ 24 | title : val, 25 | checked : curVal === key, 26 | click : function() { 27 | self.cmd.toggle('', { 28 | span : '.line-height=' + key 29 | }); 30 | self.updateState(); 31 | self.addBookmark(); 32 | self.hideMenu(); 33 | } 34 | }); 35 | }); 36 | }); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/link/link.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('link', function(K) { 11 | var self = this, name = 'link'; 12 | self.plugin.link = { 13 | edit : function() { 14 | var lang = self.lang(name + '.'), 15 | html = '
' + 16 | //url 17 | '
' + 18 | '' + 19 | '
' + 20 | //type 21 | '
' + 22 | '' + 23 | '' + 24 | '
' + 25 | '
', 26 | dialog = self.createDialog({ 27 | name : name, 28 | width : 450, 29 | title : self.lang(name), 30 | body : html, 31 | yesBtn : { 32 | name : self.lang('yes'), 33 | click : function(e) { 34 | var url = K.trim(urlBox.val()); 35 | if (url == 'http://' || K.invalidUrl(url)) { 36 | alert(self.lang('invalidUrl')); 37 | urlBox[0].focus(); 38 | return; 39 | } 40 | self.exec('createlink', url, typeBox.val()).hideDialog().focus(); 41 | } 42 | } 43 | }), 44 | div = dialog.div, 45 | urlBox = K('input[name="url"]', div), 46 | typeBox = K('select[name="type"]', div); 47 | urlBox.val('http://'); 48 | typeBox[0].options[0] = new Option(lang.newWindow, '_blank'); 49 | typeBox[0].options[1] = new Option(lang.selfWindow, ''); 50 | self.cmd.selection(); 51 | var a = self.plugin.getSelectedLink(); 52 | if (a) { 53 | self.cmd.range.selectNode(a[0]); 54 | self.cmd.select(); 55 | urlBox.val(a.attr('data-ke-src')); 56 | typeBox.val(a.attr('target')); 57 | } 58 | urlBox[0].focus(); 59 | urlBox[0].select(); 60 | }, 61 | 'delete' : function() { 62 | self.exec('unlink', null); 63 | } 64 | }; 65 | self.clickToolbar(name, self.plugin.link.edit); 66 | }); 67 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/map/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 53 | 54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/multiimage/images/image.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/select-files-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/multiimage/images/select-files-en.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/select-files-zh_CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/multiimage/images/select-files-zh_CN.png -------------------------------------------------------------------------------- /static/kindeditor/plugins/multiimage/images/swfupload.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/plugins/multiimage/images/swfupload.swf -------------------------------------------------------------------------------- /static/kindeditor/plugins/pagebreak/pagebreak.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('pagebreak', function(K) { 11 | var self = this; 12 | var name = 'pagebreak'; 13 | var pagebreakHtml = K.undef(self.pagebreakHtml, '
'); 14 | 15 | self.clickToolbar(name, function() { 16 | var cmd = self.cmd, range = cmd.range; 17 | self.focus(); 18 | var tail = self.newlineTag == 'br' || K.WEBKIT ? '' : ''; 19 | self.insertHtml(pagebreakHtml + tail); 20 | if (tail !== '') { 21 | var p = K('#__kindeditor_tail_tag__', self.edit.doc); 22 | range.selectNodeContents(p[0]); 23 | p.removeAttr('id'); 24 | cmd.select(); 25 | } 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/plainpaste/plainpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('plainpaste', function(K) { 11 | var self = this, name = 'plainpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
' + 15 | '
' + lang.comment + '
' + 16 | '' + 17 | '
', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var html = textarea.val(); 27 | html = K.escape(html); 28 | html = html.replace(/ {2}/g, '  '); 29 | if (self.newlineTag == 'p') { 30 | html = html.replace(/^/, '

').replace(/$/, '

').replace(/\n/g, '

'); 31 | } else { 32 | html = html.replace(/\n/g, '
$&'); 33 | } 34 | self.insertHtml(html).hideDialog().focus(); 35 | } 36 | } 37 | }), 38 | textarea = K('textarea', dialog.div); 39 | textarea[0].focus(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/preview/preview.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('preview', function(K) { 11 | var self = this, name = 'preview', undefined; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '

' + 15 | '' + 16 | '
', 17 | dialog = self.createDialog({ 18 | name : name, 19 | width : 750, 20 | title : self.lang(name), 21 | body : html 22 | }), 23 | iframe = K('iframe', dialog.div), 24 | doc = K.iframeDoc(iframe); 25 | doc.open(); 26 | doc.write(self.fullHtml()); 27 | doc.close(); 28 | K(doc.body).css('background-color', '#FFF'); 29 | iframe[0].contentWindow.focus(); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/quickformat/quickformat.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('quickformat', function(K) { 11 | var self = this, name = 'quickformat', 12 | blockMap = K.toMap('blockquote,center,div,h1,h2,h3,h4,h5,h6,p'); 13 | function getFirstChild(knode) { 14 | var child = knode.first(); 15 | while (child && child.first()) { 16 | child = child.first(); 17 | } 18 | return child; 19 | } 20 | self.clickToolbar(name, function() { 21 | self.focus(); 22 | var doc = self.edit.doc, 23 | range = self.cmd.range, 24 | child = K(doc.body).first(), next, 25 | nodeList = [], subList = [], 26 | bookmark = range.createBookmark(true); 27 | while(child) { 28 | next = child.next(); 29 | var firstChild = getFirstChild(child); 30 | if (!firstChild || firstChild.name != 'img') { 31 | if (blockMap[child.name]) { 32 | child.html(child.html().replace(/^(\s| | )+/ig, '')); 33 | child.css('text-indent', '2em'); 34 | } else { 35 | subList.push(child); 36 | } 37 | if (!next || (blockMap[next.name] || blockMap[child.name] && !blockMap[next.name])) { 38 | if (subList.length > 0) { 39 | nodeList.push(subList); 40 | } 41 | subList = []; 42 | } 43 | } 44 | child = next; 45 | } 46 | K.each(nodeList, function(i, subList) { 47 | var wrapper = K('

', doc); 48 | subList[0].before(wrapper); 49 | K.each(subList, function(i, knode) { 50 | wrapper.append(knode); 51 | }); 52 | }); 53 | range.moveToBookmark(bookmark); 54 | self.addBookmark(); 55 | }); 56 | }); 57 | 58 | /** 59 | -------------------------- 60 | abcd
61 | 1234
62 | 63 | to 64 | 65 |

66 | abcd
67 | 1234
68 |

69 | 70 | -------------------------- 71 | 72 |   abcd1233 73 |

1234

74 | 75 | to 76 | 77 |

abcd1233

78 |

1234

79 | 80 | -------------------------- 81 | */ -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/html/1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 在此处输入标题 9 |

10 |

11 | 在此处输入内容 12 |

13 | 14 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/html/2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 标题 9 |

10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 |
14 |

标题1

15 |
17 |

标题1

18 |
22 | 内容1 23 | 25 | 内容2 26 |
30 | 内容3 31 | 33 | 内容4 34 |
38 |

39 | 表格说明 40 |

41 | 42 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/html/3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 在此处输入内容 9 |

10 |
    11 |
  1. 12 | 描述1 13 |
  2. 14 |
  3. 15 | 描述2 16 |
  4. 17 |
  5. 18 | 描述3 19 |
  6. 20 |
21 |

22 | 在此处输入内容 23 |

24 |
    25 |
  • 26 | 描述1 27 |
  • 28 |
  • 29 | 描述2 30 |
  • 31 |
  • 32 | 描述3 33 |
  • 34 |
35 | 36 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/template/template.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('template', function(K) { 11 | var self = this, name = 'template', lang = self.lang(name + '.'), 12 | htmlPath = self.pluginsPath + name + '/html/'; 13 | function getFilePath(fileName) { 14 | return htmlPath + fileName + '?ver=' + encodeURIComponent(K.DEBUG ? K.TIME : K.VERSION); 15 | } 16 | self.clickToolbar(name, function() { 17 | var lang = self.lang(name + '.'), 18 | arr = ['
', 19 | '
', 20 | // left start 21 | '
', 22 | lang. selectTemplate + '
', 28 | // right start 29 | '
', 30 | ' ', 31 | '
', 32 | '
', 33 | '
', 34 | '', 35 | '
'].join(''); 36 | var dialog = self.createDialog({ 37 | name : name, 38 | width : 500, 39 | title : self.lang(name), 40 | body : html, 41 | yesBtn : { 42 | name : self.lang('yes'), 43 | click : function(e) { 44 | var doc = K.iframeDoc(iframe); 45 | self[checkbox[0].checked ? 'html' : 'insertHtml'](doc.body.innerHTML).hideDialog().focus(); 46 | } 47 | } 48 | }); 49 | var selectBox = K('select', dialog.div), 50 | checkbox = K('[name="replaceFlag"]', dialog.div), 51 | iframe = K('iframe', dialog.div); 52 | checkbox[0].checked = true; 53 | iframe.attr('src', getFilePath(selectBox.val())); 54 | selectBox.change(function() { 55 | iframe.attr('src', getFilePath(this.value)); 56 | }); 57 | }); 58 | }); 59 | -------------------------------------------------------------------------------- /static/kindeditor/plugins/wordpaste/wordpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('wordpaste', function(K) { 11 | var self = this, name = 'wordpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
' + 15 | '
' + lang.comment + '
' + 16 | '' + 17 | '
', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var str = doc.body.innerHTML; 27 | str = K.clearMsWord(str, self.filterMode ? self.htmlTags : K.options.htmlTags); 28 | self.insertHtml(str).hideDialog().focus(); 29 | } 30 | } 31 | }), 32 | div = dialog.div, 33 | iframe = K('iframe', div), 34 | doc = K.iframeDoc(iframe); 35 | if (!K.IE) { 36 | doc.designMode = 'on'; 37 | } 38 | doc.open(); 39 | doc.write('WordPaste'); 40 | doc.write(''); 41 | if (!K.IE) { 42 | doc.write('
'); 43 | } 44 | doc.write(''); 45 | doc.close(); 46 | if (K.IE) { 47 | doc.body.contentEditable = 'true'; 48 | } 49 | iframe[0].contentWindow.focus(); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /static/kindeditor/themes/common/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/common/anchor.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/common/blank.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/flash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/common/flash.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/common/loading.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/media.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/common/media.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/common/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/common/rm.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/default/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/default/background.png -------------------------------------------------------------------------------- /static/kindeditor/themes/default/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/default/default.png -------------------------------------------------------------------------------- /static/kindeditor/themes/qq/editor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/kindeditor/themes/qq/editor.gif -------------------------------------------------------------------------------- /static/kindeditor/themes/simple/simple.css: -------------------------------------------------------------------------------- 1 | /* container */ 2 | .ke-container-simple { 3 | display: block; 4 | border: 1px solid #CCC; 5 | background-color: #FFF; 6 | overflow: hidden; 7 | } 8 | /* toolbar */ 9 | .ke-container-simple .ke-toolbar { 10 | border-bottom: 1px solid #CCC; 11 | background-color: #FFF; 12 | padding: 2px 5px; 13 | overflow: hidden; 14 | } 15 | .ke-container-simple .ke-toolbar .ke-outline { 16 | border: 1px solid #FFF; 17 | background-color: transparent; 18 | margin: 1px; 19 | padding: 1px 2px; 20 | font-size: 0; 21 | line-height: 0; 22 | overflow: hidden; 23 | cursor: pointer; 24 | } 25 | .ke-container-simple .ke-toolbar .ke-on { 26 | border: 1px solid #5690D2; 27 | } 28 | .ke-container-simple .ke-toolbar .ke-selected { 29 | border: 1px solid #5690D2; 30 | background-color: #E9EFF6; 31 | } 32 | .ke-container-simple .ke-toolbar .ke-disabled { 33 | cursor: default; 34 | } 35 | /* statusbar */ 36 | .ke-container-simple .ke-statusbar { 37 | position: relative; 38 | background-color: #FFF; 39 | border-top: 1px solid #CCCCCC; 40 | font-size: 0; 41 | line-height: 0; 42 | *height: 12px; 43 | overflow: hidden; 44 | text-align: center; 45 | cursor: s-resize; 46 | } 47 | /* menu */ 48 | .ke-menu-simple { 49 | border: 1px solid #A0A0A0; 50 | background-color: #FFF; 51 | color: #222222; 52 | padding: 2px; 53 | font-family: "sans serif",tahoma,verdana,helvetica; 54 | font-size: 12px; 55 | text-align: left; 56 | overflow: hidden; 57 | } 58 | .ke-menu-simple .ke-menu-item { 59 | border: 1px solid #FFF; 60 | background-color: #FFF; 61 | color: #222222; 62 | height: 24px; 63 | overflow: hidden; 64 | cursor: pointer; 65 | } 66 | .ke-menu-simple .ke-menu-item-on { 67 | border: 1px solid #5690D2; 68 | background-color: #FFF; 69 | } 70 | /* colorpicker */ 71 | .ke-colorpicker-simple { 72 | border: 1px solid #A0A0A0; 73 | background-color: #FEFEFE; 74 | color: #222222; 75 | padding: 2px; 76 | } 77 | .ke-colorpicker-simple .ke-colorpicker-cell { 78 | font-size: 0; 79 | line-height: 0; 80 | border: 1px solid #FEFEFE; 81 | cursor: pointer; 82 | margin:3px; 83 | padding:0; 84 | } 85 | .ke-colorpicker-simple .ke-colorpicker-cell-top { 86 | font-family: "sans serif",tahoma,verdana,helvetica; 87 | font-size: 12px; 88 | line-height: 24px; 89 | border: 1px solid #FEFEFE; 90 | cursor: pointer; 91 | margin:0; 92 | padding:0; 93 | text-align: center; 94 | } 95 | .ke-colorpicker-simple .ke-colorpicker-cell-on { 96 | border: 1px solid #5690D2; 97 | } 98 | .ke-colorpicker-simple .ke-colorpicker-cell-selected { 99 | border: 1px solid #2446AB; 100 | } 101 | -------------------------------------------------------------------------------- /static/material/css/ripples.css: -------------------------------------------------------------------------------- 1 | .withripple { 2 | position: relative; 3 | } 4 | .ripple-wrapper { 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | z-index: 1; 9 | width: 100%; 10 | height: 100%; 11 | overflow: hidden; 12 | border-radius: 2px; 13 | } 14 | .ripple { 15 | position: absolute; 16 | width: 20px; 17 | height: 20px; 18 | margin-left: -10px; 19 | margin-top: -10px; 20 | border-radius: 100%; 21 | background-color: rgba(0, 0, 0, 0.05); 22 | -webkit-transform: scale(1); 23 | -ms-transform: scale(1); 24 | transform: scale(1); 25 | -webkit-transform-origin: 50%; 26 | -ms-transform-origin: 50%; 27 | transform-origin: 50%; 28 | opacity: 0; 29 | pointer-events: none; 30 | } 31 | .ripple.ripple-on { 32 | -webkit-transition: opacity 0.15s ease-in 0s, -webkit-transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s; 33 | transition: opacity 0.15s ease-in 0s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s; 34 | opacity: 1; 35 | } 36 | .ripple.ripple-out { 37 | -webkit-transition: opacity 0.1s linear 0s !important; 38 | transition: opacity 0.1s linear 0s !important; 39 | opacity: 0; 40 | } 41 | -------------------------------------------------------------------------------- /static/material/css/ripples.min.css: -------------------------------------------------------------------------------- 1 | .withripple{position:relative}.ripple-wrapper{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;overflow:hidden;border-radius:2px}.ripple{position:absolute;width:20px;height:20px;margin-left:-10px;margin-top:-10px;border-radius:100%;background-color:rgba(0,0,0,.05);-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;opacity:0;pointer-events:none}.ripple.ripple-on{-webkit-transition:opacity .15s ease-in 0s,-webkit-transform .5s cubic-bezier(0.4,0,.2,1) .1s;transition:opacity .15s ease-in 0s,transform .5s cubic-bezier(0.4,0,.2,1) .1s;opacity:1}.ripple.ripple-out{-webkit-transition:opacity .1s linear 0s!important;transition:opacity .1s linear 0s!important;opacity:0} -------------------------------------------------------------------------------- /static/material/fonts/LICENSE.txt: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Polymer Authors. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the names of its 14 | // contributors may be used to endorse or promote products derived from 15 | // this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /static/material/fonts/Material-Design.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/material/fonts/Material-Design.eot -------------------------------------------------------------------------------- /static/material/fonts/Material-Design.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/material/fonts/Material-Design.ttf -------------------------------------------------------------------------------- /static/material/fonts/Material-Design.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/static/material/fonts/Material-Design.woff -------------------------------------------------------------------------------- /static/material/js/material.min.js: -------------------------------------------------------------------------------- 1 | $(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after(""),$(".radio > label > input").not(".bs-material").addClass("bs-material").after(""),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("
"),$(this).after(""),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("
"+a+"
")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a(),document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){$(this).blur()}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})}); -------------------------------------------------------------------------------- /static/material/js/ripples.min.js: -------------------------------------------------------------------------------- 1 | window.ripples={init:function(a){"use strict";function b(a,b){var c=a.matches||a.matchesSelector||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector;return c.call(a,b)}var c=100,d=500,e=function(a,c,d){document.addEventListener(a,function(a){var e="number"!=typeof a.detail?a.detail:a.target;b(e,c)&&d(a,e)})},f=function(a,b){var c,e=b,f=e.parentNode,g=document.createElement("div"),h=f.getBoundingClientRect(),j={x:a.clientX-h.left,y:a.clientY-h.top},k="transform:scale("+Math.round(e.offsetWidth/5)+")",l=new CustomEvent("rippleEnd",{detail:g});i=g,g.className="ripple",g.setAttribute("style","left:"+j.x+"px; top:"+j.y+"px;"),e.appendChild(g),c=window.getComputedStyle(g).opacity,g.dataset.animating=1,g.className="ripple ripple-on",g.setAttribute("style",g.getAttribute("style")+["-ms-"+k,"-moz-"+k,"-webkit-"+k,k].join(";")),setTimeout(function(){g.dataset.animating=0,document.dispatchEvent(l)},d)},g=function(a){a.className="ripple ripple-on ripple-out",setTimeout(function(){a.remove()},c)},h=!1;document.body.onmousedown=function(){h=!0},document.body.onmouseup=function(){h=!1};var i,j=function(a,b){if(0===b.getElementsByClassName("ripple-wrapper").length){b.className+=" withripple";var c=document.createElement("div");c.className="ripple-wrapper",b.appendChild(c)}};e("mouseover",a,j),e("mousedown",".ripple-wrapper",function(a,b){(1===a.which||2===a.which)&&f(a,b)}),e("rippleEnd",".ripple-wrapper .ripple",function(a,b){var c=b.parentNode.getElementsByClassName("ripple");(!h||c[0]==b&&c.length>1)&&g(b)}),e("mouseup",".ripple-wrapper",function(){var a=i;1!=a.dataset.animating&&g(a)})}}; -------------------------------------------------------------------------------- /static/prettify/lang-apollo.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 2 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-basic.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun", 3 | /^.[^\s\w"$%.]*/,a]]),["basic","cbm"]); 4 | -------------------------------------------------------------------------------- /static/prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | var a=null; 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], 18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]); 19 | -------------------------------------------------------------------------------- /static/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//], 2 | ["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-dart.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i], 2 | ["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(),.;[\]{}]/]]), 3 | ["dart"]); 4 | -------------------------------------------------------------------------------- /static/prettify/lang-erlang.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], 2 | ["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-go.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]); 2 | -------------------------------------------------------------------------------- /static/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]); 4 | -------------------------------------------------------------------------------- /static/prettify/lang-llvm.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]); 2 | -------------------------------------------------------------------------------- /static/prettify/lang-lua.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i], 2 | ["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-ml.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], 2 | ["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-mumps.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i, 2 | null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /static/prettify/lang-pascal.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a], 3 | ["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]); 4 | -------------------------------------------------------------------------------- /static/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /static/prettify/lang-r.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/], 2 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-rd.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]); 2 | -------------------------------------------------------------------------------- /static/prettify/lang-scala.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], 2 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-sql.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i, 2 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-tcl.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit", 3 | /^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]); 4 | -------------------------------------------------------------------------------- /static/prettify/lang-tex.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]); 2 | -------------------------------------------------------------------------------- /static/prettify/lang-vb.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i, 2 | null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, 2 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i], 3 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]); 4 | -------------------------------------------------------------------------------- /static/prettify/lang-wiki.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]); 2 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); 3 | -------------------------------------------------------------------------------- /static/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /static/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;/*border:1px solid #888*/}ol.linenums{margin-top:0;margin-bottom:0;padding-left:35px;}/*li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}*/li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /view/400.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |
{{.Info}}
3 | {{end}} -------------------------------------------------------------------------------- /view/admin/contest_list.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - Contest List

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{with .Contest}} 16 | {{range .}} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {{end}} 26 | {{end}} 27 | 28 |
IDTitleCreatorStatusDeleteEdit
{{.Cid}}{{.Title}}{{.Creator}}[{{if ShowStatus .Status}}Available{{else}}Reserved{{end}}][Delete][Edit]
29 | 66 | {{end}} 67 | -------------------------------------------------------------------------------- /view/admin/home.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | {{if .IsAdmin}} 3 |
Hi, Admin.
4 | {{end}} 5 | 6 | {{if .IsTeacher}} 7 |
Hi, Teacher.
8 | {{end}} 9 | {{end}} -------------------------------------------------------------------------------- /view/admin/msg.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZJGSU-Open-Source/GoOnlineJudge/5979347cc59cf40f1b5f3752655972396078cdac/view/admin/msg.txt -------------------------------------------------------------------------------- /view/admin/news_add.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - News Add

3 |
4 |
5 | 6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 | 17 |
18 |
19 | 39 | {{end}} 40 | -------------------------------------------------------------------------------- /view/admin/news_edit.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - News Edit

3 | {{with .Detail}} 4 |
5 |
6 | 7 |
8 |
9 |
10 | 11 |
12 |
13 |
14 | 15 |
16 | 17 |
18 | 19 | {{end}} 20 | 40 | {{end}} 41 | -------------------------------------------------------------------------------- /view/admin/news_list.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - News List

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{with .News}} 15 | {{range .}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {{end}} 24 | {{end}} 25 | 26 |
TitleDateStatusDeleteEdit
{{.Title}}{{.Create}}[{{if ShowStatus .Status}}Available{{else}}Reserved{{end}}][Delete][Edit]
27 | 64 | 65 | {{end}} -------------------------------------------------------------------------------- /view/admin/notice.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - Notice

3 |
4 |
5 |
6 | 7 |
8 |
9 | 10 |
11 |
12 | {{end}} -------------------------------------------------------------------------------- /view/admin/problem_add.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - Problem Add

3 |
4 |
5 | 6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 | S 14 |
15 |
16 |
17 | kB 18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 |
35 |
36 |
37 | 38 |
39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 |
47 |
48 |
49 | 50 |
51 |
52 | 53 |
54 |
55 | 78 | {{end}} 79 | -------------------------------------------------------------------------------- /view/admin/problem_import.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Problem Import

3 |
4 |
5 | 7 |
8 |
9 | 10 | {{end}} -------------------------------------------------------------------------------- /view/admin/rejudge.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Rejudge

3 | 4 |
5 | 9 |
10 | 11 |
12 | 13 |
14 |
15 | 16 | 39 | {{end}} -------------------------------------------------------------------------------- /view/admin/test_data.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

{{.Title}}

3 | {{$isAdmin := .IsAdmin}} 4 | 5 | 6 | 7 | 8 | {{if $isAdmin}} 9 | 10 | {{end}} 11 | 12 | 13 | 14 | 15 | {{$Pid := .Pid}} 16 | {{with .Files}} 17 | {{range .}} 18 | 19 | 20 | {{if $isAdmin}} 21 | 22 | {{end}} 23 | 24 | 25 | {{end}} 26 | {{end}} 27 | 28 |
Data FileDeleteDownload
{{.}}[Delete][Download]
29 | {{if $isAdmin}} 30 |
31 |
32 | 34 |
35 |
36 |
You can just add test.in and test.out with encoding utf-8.
37 | {{end}} 38 | 39 | 59 | {{end}} 60 | -------------------------------------------------------------------------------- /view/admin/user_generate.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Team Account Generate

3 | 4 |
5 |
6 | 7 |
8 |
9 | * 10 |
11 | 12 |
13 |
14 | * 15 |
16 | 17 |
18 |
19 |
20 | 24 |
25 |
26 | 27 |
28 |
29 | {{end}} -------------------------------------------------------------------------------- /view/admin/user_list.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Admin - Privilege User List

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{with .User}} 13 | {{range .}} 14 | {{if LargePU .Privilege}} 15 | 16 | 17 | 18 | 19 | 20 | {{end}} 21 | {{end}} 22 | {{end}} 23 | 24 |
UidPrivilegeDelete
{{.Uid}}{{ShowPrivilege .Privilege}}[Delete]
25 | 26 |
27 | Add Admin: 28 | 32 | 33 |
34 | 35 | 56 | 57 | 81 | {{end}} -------------------------------------------------------------------------------- /view/admin/user_password.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

Edit Password

3 |
4 |
5 | 6 |
7 |
8 | * 9 |
10 | 11 |
12 |
13 | * 14 |
15 | 16 |
17 |
18 | * 19 |
20 | 21 |
22 |
23 | 24 |
25 |
26 | 27 | 63 | {{end}} -------------------------------------------------------------------------------- /view/contest/passwd.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

{{.Contest}}

3 | 4 |
5 |
6 |
7 | 8 |
9 |
10 | 11 |
12 |
13 | 30 | {{end}} -------------------------------------------------------------------------------- /view/contest/problem_list.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |
3 |

{{.Contest}}

4 |

Start Time : {{ShowTime .Start}}   End Time : {{ShowTime .End}}

5 |

Current Time : {{ShowTime .Time}}

6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {{$cid := .Cid}} 18 | {{with .Problem}} 19 | {{range .}} 20 | {{if .}} 21 | 22 | 28 | 29 | 30 | 31 | 32 | {{end}} 33 | {{end}} 34 | {{end}} 35 | 36 |
FlagIDTitleRatio(Accept/Submit)
23 | {{if ShowACFlag .Flag}} 24 | {{else if ShowErrFlag .Flag}} 25 | 26 | {{end}} 27 | {{.Pid}}{{.Title}}{{ShowRatio .Solve .Submit}} ({{.Solve}}/{{.Submit}})
37 | {{end}} -------------------------------------------------------------------------------- /view/contest/ranklist.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | {{$cid := .Cid}} 3 |

Contest RankList -- {{.Contest}}

4 |
Export ranklist
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{with .ProblemList}} 14 | {{range $idx,$pid:= .}} 15 | 16 | {{end}} 17 | {{end}} 18 | 19 | 20 | 21 | {{with .UserList}} 22 | {{range $idx,$v := .}} 23 | 24 | 25 | 26 | 27 | 28 | {{with $v.ProblemList}} 29 | {{range .}} 30 | {{if .}} 31 | {{if eq .Judge 3}} 32 | {{else}} 33 | {{end}} 34 | {{else}} 35 | {{end}} 36 | {{end}} 37 | 38 | {{end}} 39 | {{end}} 40 | 41 |
RankTeamSolvedPenalty{{$idx}}
{{NumAdd $idx 1}}{{$v.Uid}}{{$v.Solved}}{{ShowGapTime $v.Time}} {{ShowGapTime .Time}}/({{.Count}})0/({{.Count}})0/(0){{end}}
42 |
43 | {{end}} -------------------------------------------------------------------------------- /view/contest/status_code.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

{{.Title}}

3 | {{with .Solution}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
{{.Code}}
13 |

Double click to view unformatted code.

14 |
15 | {{end}} 16 | Back to problem {{.Pid}} 17 | 27 | {{end}} -------------------------------------------------------------------------------- /view/contest_list.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{$time := .Time}} 15 | {{$privilege := .Privilege}} 16 | {{with .Contest}} 17 | {{range .}} 18 | {{if or (ShowStatus .Status) (LargePU $privilege)}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | {{end}} 26 | {{end}} 27 | {{end}} 28 | 29 |
IDTitleStatusType
{{.Cid}}{{.Title}}{{if ge $time .End }}Ended@{{ShowTime .End}}{{else}}{{if ge .Start $time}}Start@{{ShowTime .Start}}{{else}}Running{{end}}{{end}}{{ShowEncrypt .Encrypt}}
30 | {{end}} 31 | -------------------------------------------------------------------------------- /view/news_detail.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | {{with .Detail}} 3 | 4 |

Date: {{.Create}}

5 | {{.Content}} 6 | {{end}} 7 | {{end}} -------------------------------------------------------------------------------- /view/news_list.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |
3 | 4 | 5 |
6 | {{with .News}} 7 | 8 | {{range .}} 9 | {{if ShowStatus .Status}} 10 | 11 |

12 | 13 | {{.Create}} 14 |
{{.Title}} 15 |

16 | {{end}} 17 | {{end}} 18 | {{end}} 19 |
20 |
21 | Check every 10 minutes 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{with .OJStatus}} 31 | {{range .}} 32 | 33 | 34 | 40 | 41 | {{end}} 42 | {{end}} 43 | 44 |
OJSTATUS
{{.Name}}{{if eq .Status 0}} 35 | Ok 36 | {{else}} 37 | Unavailable 38 | {{end}} 39 |
45 |
46 |
47 | {{end}} 48 | -------------------------------------------------------------------------------- /view/osc.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

ZJGSU开源社区宣言

3 | 我浙工商开源社区劝人为善,广积功德,宣讲正道。奉请五方诸佛,韦驮菩萨,护教伽蓝护持。<--> 4 |
5 |

We had to be rescued from our folly by a rebel alliance of obsessive geeks and creative misfits—who then proceeded to show us that professionalism and dedication really meant what we had been doing before we succumbed to the mundane persuasions of "sound business practices".
(只有痴迷的“黑客”和具有创造力的怪人结成的反叛联盟才能把我们从愚蠢中拯救出来——他们接着教导我们,真正的专业和奉献精神, 正是我们在屈服于世俗观念的"合理商业做法"之所作所为。)
-- The Art of Unix Programming

6 |

ZJGSU开源社区是一群hacker和geek讨论、交流技术的地方,社区的精神是hacker精神,社区源于开源项目,也必将于开源项目而繁荣。社区倡导平等,开放,自由。社区努力为每一个酷爱技术的人提供良好的探索环境,使其兴趣得到充分发展。社区的思想不能受学校规定或政治的牵制,但仍有自己的态度和哲学:

7 |

不作恶

8 | 13 |

不世俗

14 |

信仰

15 | 21 |

Because we can

22 | 30 |

不官僚

31 |

官僚主义是被每一个hacker所痛恨的。在ZJGSU开源社区,没有所谓的"核心成员",只有愿意为社区做贡献的"活跃成员"。

32 |

关于学习

33 | 45 |

加入我们

46 |

邮件列表

47 | 56 |

要求

57 |

浙江工商大学在校学生,不管你是大一的新生,甚至是研究生,博士生,只要你热爱开源文化,愿意为开源社区贡献力量,我们欢迎你们!

58 |

截止日期

59 |

长期有效

60 |

联系方式

61 | 64 | {{end}} 65 | -------------------------------------------------------------------------------- /view/ranklist.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | 3 | 56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | {{with .User}} 69 | {{range .}} 70 | {{if ShowStatus .Status}} 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | {{end}} 79 | {{end}} 80 | {{end}} 81 | 82 |
RankUserNickMottoRatio(Solve/Submit)
{{.Index}}{{.Uid}}{{.Nick}}{{.Motto}}{{ShowRatio .Solve .Submit}} ({{.Solve}}/{{.Submit}})
83 |
84 | {{end}} -------------------------------------------------------------------------------- /view/status_code.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | {{with .Solution}} 3 |

View Code of Problem {{.Pid}}

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
{{.Code}}
13 |

Double click to view unformatted code.

14 |
15 | Back to problem {{.Pid}} 16 | 26 | {{end}} 27 | {{end}} 28 | -------------------------------------------------------------------------------- /view/user_detail.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |

User Detail

3 | 4 | 5 | {{with .Detail}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | {{end}} 35 | {{/*if .IPPrivilege*/}} 36 |
Handle{{.Uid}}
Nick{{.Nick}}
Email{{.Mail}}
Motto{{.Motto}}
School{{.School}}
Problems Submitted{{.Submit}}
Problems Solved{{.Solve}}
37 | 38 | 39 | 40 | {{with .IpList}} 41 | {{range .}} 42 | {{if .}} 43 | 44 | 45 | 46 | {{end}} 47 | {{end}} 48 | {{end}} 49 | 50 |
Login Time
Login IP
{{ShowTime .Time}}
{{.IP}}
51 | {{/*end*/}} 52 | 53 | 54 | 55 | 56 | 57 | {{with .List}} 58 | 59 | 66 | 67 | {{end}} 68 | 69 |
Achieve
60 |
61 | {{range .}} 62 | {{.}} 63 | {{end}} 64 |
65 |
70 | 71 | 72 | 73 | {{end}} 74 | -------------------------------------------------------------------------------- /view/user_password.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 |
3 |
4 |
5 | Edit Password 6 |
7 | 8 |
9 |
10 | 13 |
14 | 15 |
16 |
17 |
18 | 21 |
22 | 23 |
24 |
25 |
26 | 27 |
28 |
29 | 30 |
31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 | 43 | 44 | 80 | {{end}} 81 | -------------------------------------------------------------------------------- /view/user_signin.tpl: -------------------------------------------------------------------------------- 1 | {{define "content"}} 2 | 3 |
4 |
5 | 6 |
7 | Sign In 8 |
9 | 10 |
11 | 12 |
13 | 14 |
15 | 16 |
17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | 38 | 39 | Register a new account. 40 | 62 | {{end}} 63 | --------------------------------------------------------------------------------