mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-21 21:08:42 +00:00
Initial commit for PHP7
This is the commit before changing environment to PHP7.
This commit is contained in:
parent
82ad3efce2
commit
babd30364e
83
README.md
83
README.md
@ -1,83 +1,14 @@
|
||||
# Universal Online Judge
|
||||
# Universal OJ
|
||||
|
||||
## Dependence
|
||||
This is a dockerized version of UOJ. Before installation, please make sure that [Docker](https://www.docker.com/) has already been installed on your OS.
|
||||
这是一份民间的UOJ版本,我们希望它比官方版本更易用。
|
||||
|
||||
The docker image of UOJ is **64-bit**, so a **32-bit** host OS may cause installation failure.
|
||||
部署文档在[universaloj.github.io](https://universaloj.github.io)。
|
||||
|
||||
## Installation
|
||||
First please download [JDK7u76](http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u76-oth-JPR) and [JDK8u31](http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-8u31-oth-JPR), and put them to `docker/jdk-7u76-linux-x64.tar.gz` and `docker/jdk-8u31-linux-x64.tar.gz`. These two compressed files are used by judge\_client for judging Java program. If you are too lazy to download these two huge files, you can simply place two empty .tar.gz files there.
|
||||
|
||||
Next, you can run the following command in your terminal: (not the one in the `docker/` directory!)
|
||||
```sh
|
||||
./install
|
||||
```
|
||||
If everything goes well, you will see `Successfully built <image-id>` in the last line of the output.
|
||||
目前已经支持的特性:
|
||||
|
||||
To start your UOJ main server, please run:
|
||||
```sh
|
||||
docker run -it -p 80:80 -p 3690:3690 <image-id>
|
||||
```
|
||||
If you are using docker on Mac OS or having 'std: compile error. no comment' message on uploading problem data, you could possibly use this alternative command:
|
||||
```sh
|
||||
docker run -it -p 80:80 -p 3690:3690 --cap-add SYS_PTRACE <image-id>
|
||||
```
|
||||
- 子目录博客(感谢[roastduck](https://github.com/roastduck/)的贡献)
|
||||
- zip传题 (感谢[AD1024](https://github.com/AD1024/)的贡献)
|
||||
|
||||
The default hostname of UOJ is `local_uoj.ac`, so you need to modify your host file in your OS in order to map `127.0.0.1` to `local_uoj.ac`. (It is `/etc/hosts` on Linux.) After that, you can access UOJ in your web browser.
|
||||
|
||||
The first user registered after the installation of UOJ will be a super user. If you need another super user, please register a user and change its `usergroup` to "<samp>S</samp>" in the table `user_info`. Run
|
||||
```sh
|
||||
mysql app_uoj233 -u root -p
|
||||
```
|
||||
to login mysql in the terminal.
|
||||
|
||||
Notice that if you want only one judge client, then everything is ok now. Cheers!
|
||||
|
||||
However, if you want more judge clients, you need to set up them one by one. First run:
|
||||
```sh
|
||||
./config_judge_client
|
||||
```
|
||||
and answer the questions.
|
||||
|
||||
* uoj container id: the container id of the main server.
|
||||
* uoj ip: the ip address of the main server.
|
||||
* judger name: you can take a name you like, such as judger, judger\_2, very\_strong\_judger. (containing special characters may cause unforeseeable consequence.)
|
||||
|
||||
After that, a sql command is given, we will talk about it later.
|
||||
|
||||
Next, we need to run:
|
||||
```sh
|
||||
./install_judge_client
|
||||
```
|
||||
to build the docker image. If you want to run judger at the same server, you just need to run
|
||||
```sh
|
||||
docker run -it <image-id>
|
||||
```
|
||||
And, you need to complete the sql command given just now with the ip address of the judger docker, and modify the database. To someone who do not know how to get the ip address of a docker container, here is the answer:
|
||||
```sh
|
||||
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container-id>
|
||||
```
|
||||
|
||||
Or, if you want to run judger at different server, you need to copy the image to the other server, and run
|
||||
```sh
|
||||
docker run -p 2333 -it <image-id>
|
||||
```
|
||||
Similarly, you need to complete the sql command and modify the database. This time, you need to fill with the ip address of the host machine of the judger docker.
|
||||
|
||||
You may meet many difficulties during the installation. Good luck and have fun!
|
||||
|
||||
## Notes
|
||||
|
||||
mysql default password: root
|
||||
|
||||
local\_main\_judger password: judger
|
||||
|
||||
You can change the default hostname and something else in `/var/www/uoj/app/.config.php`. However, not all the config is here, haha.
|
||||
|
||||
## More Documentation
|
||||
As you know, my Yingyu is not very hao. Suoyi only the README file is En(Chi)nglish for internationalization.
|
||||
|
||||
More documentation is here: [https://vfleaking.github.io/uoj/](https://vfleaking.github.io/uoj/)
|
||||
|
||||
## License
|
||||
MIT License.
|
||||
希望对您有帮助。
|
2
docker/.gitignore
vendored
2
docker/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
jdk-7u76-linux-x64.tar.gz
|
||||
jdk-8u31-linux-x64.tar.gz
|
@ -1,30 +0,0 @@
|
||||
FROM vfleaking/uoj
|
||||
MAINTAINER vfleaking vfleaking@163.com
|
||||
COPY docker/sources.list /etc/apt/sources.list
|
||||
COPY uoj/1 /root/uoj_1
|
||||
COPY judge_client/1 /root/judge_client_1
|
||||
|
||||
COPY docker/new_problem.sh \
|
||||
docker/post-commit.sh \
|
||||
docker/uoj-passwd \
|
||||
docker/uoj-post-commit \
|
||||
docker/gen-uoj-config.php \
|
||||
docker/app_uoj233.sql \
|
||||
/root/
|
||||
|
||||
COPY docker/jdk-7u76-linux-x64.tar.gz \
|
||||
docker/jdk-8u31-linux-x64.tar.gz \
|
||||
/home/local_main_judger/
|
||||
|
||||
COPY docker/install /root/install
|
||||
|
||||
RUN cd /root && php gen-uoj-config.php && chmod +x install
|
||||
RUN cd /root && ./install && rm * -rf
|
||||
|
||||
COPY docker/up /root/up
|
||||
|
||||
RUN chmod +x /root/up
|
||||
|
||||
EXPOSE 80 3690
|
||||
|
||||
CMD /root/up
|
@ -1,93 +0,0 @@
|
||||
<?php
|
||||
|
||||
function rand_str($len, $charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
|
||||
$n_chars = strlen($charset);
|
||||
$str = '';
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$str .= $charset[mt_rand(0, $n_chars - 1)];
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
function translate($filename, $target, $tab) {
|
||||
$content = file_get_contents($filename);
|
||||
foreach ($tab as $k => $v) {
|
||||
$content = str_replace("__{$k}__", $v, $content);
|
||||
}
|
||||
file_put_contents($target, $content);
|
||||
}
|
||||
|
||||
$svn_pwd = rand_str(32);
|
||||
$svn_cert = '--username root --password '.$svn_pwd;
|
||||
|
||||
$config = [
|
||||
'database' => [
|
||||
'database' => 'app_uoj233',
|
||||
'username' => 'root',
|
||||
'password' => 'root',
|
||||
'host' => '127.0.0.1'
|
||||
],
|
||||
'web' => [
|
||||
'main' => [
|
||||
'protocol' => 'http',
|
||||
'host' => 'local_uoj.ac'
|
||||
],
|
||||
'blog' => [
|
||||
'protocol' => 'http',
|
||||
'host' => 'blog.local_uoj.ac'
|
||||
]
|
||||
],
|
||||
'security' => [
|
||||
'user' => [
|
||||
'client_salt' => rand_str(32)
|
||||
],
|
||||
'cookie' => [
|
||||
'checksum_salt' => [rand_str(16), rand_str(16), rand_str(16)]
|
||||
],
|
||||
],
|
||||
'mail' => [
|
||||
'noreply' => [
|
||||
'username' => 'noreply@none',
|
||||
'password' => 'noreply'
|
||||
]
|
||||
],
|
||||
'judger' => [
|
||||
'socket' => [
|
||||
'port' => 2333,
|
||||
'password' => rand_str(32)
|
||||
]
|
||||
],
|
||||
'svn' => [
|
||||
'our-root' => [
|
||||
'username' => 'our-root',
|
||||
'password' => rand_str(32)
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
$judge_client_config = [
|
||||
'uoj_protocol' => 'http',
|
||||
'uoj_host' => '127.0.0.1',
|
||||
'judger_name' => 'main_judger',
|
||||
'judger_password' => rand_str(32),
|
||||
'socket_port' => $config['judger']['socket']['port'],
|
||||
'socket_password' => $config['judger']['socket']['password'],
|
||||
'svn_username' => 'root',
|
||||
'svn_password' => $svn_pwd
|
||||
];
|
||||
|
||||
$translate_table = [
|
||||
'svn_cert' => $svn_cert,
|
||||
'svn_pwd' => $svn_pwd,
|
||||
'our_root_password' => $config['svn']['our-root']['password'],
|
||||
'main_judger_password' => $judge_client_config['judger_password']
|
||||
];
|
||||
|
||||
translate('new_problem.sh', '/var/svn/problem/new_problem.sh', $translate_table);
|
||||
translate('post-commit.sh', '/var/svn/problem/post-commit.sh', $translate_table);
|
||||
|
||||
translate('uoj-passwd', '/var/svn/uoj/conf/passwd', $translate_table);
|
||||
translate('uoj-post-commit', '/var/svn/uoj/hooks/post-commit', $translate_table);
|
||||
file_put_contents('uoj_config.php', "<?php\nreturn ".var_export($config, true).";\n");
|
||||
file_put_contents('judge_client_config.json', json_encode($judge_client_config, JSON_PRETTY_PRINT));
|
||||
translate('install', 'install', $translate_table);
|
@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
chmod +x /var/svn/uoj/hooks/post-commit
|
||||
chmod +x /var/svn/problem/new_problem.sh
|
||||
chmod +x /var/svn/problem/post-commit.sh
|
||||
|
||||
svnserve -d -r /var/svn
|
||||
service mysql start
|
||||
service apache2 start
|
||||
|
||||
cd /root
|
||||
|
||||
svn co svn://127.0.0.1/uoj __svn_cert__
|
||||
mv uoj_1 uoj/1
|
||||
cd uoj
|
||||
svn add 1
|
||||
svn ci -m "first commit" __svn_cert__
|
||||
cd ..
|
||||
rm uoj -r
|
||||
|
||||
rm /var/www/uoj -r && ln -s /var/svn/uoj/cur/uoj/1 /var/www/uoj
|
||||
|
||||
while [ ! -d "/var/www/uoj/app" ]
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
mv uoj_config.php /var/www/uoj/app/.config.php
|
||||
|
||||
mysql -u root --password=root <app_uoj233.sql
|
||||
chown www-data /var/www/uoj/app/storage -R
|
||||
|
||||
svn co svn://127.0.0.1/judge_client __svn_cert__
|
||||
mv judge_client_1 judge_client/1
|
||||
cd judge_client
|
||||
svn add 1
|
||||
svn ci -m "first commit" __svn_cert__
|
||||
cd ..
|
||||
rm judge_client -r
|
||||
|
||||
chown local_main_judger /home/local_main_judger/jdk-7u76-linux-x64.tar.gz /home/local_main_judger/jdk-8u31-linux-x64.tar.gz
|
||||
|
||||
su local_main_judger <<EOD
|
||||
svn update /var/svn/judge_client/cur/judge_client __svn_cert__
|
||||
ln -s /var/svn/judge_client/cur/judge_client/1 ~/judge_client
|
||||
cd ~/judge_client
|
||||
chmod +x judge_client
|
||||
echo '#define UOJ_WORK_PATH "/home/local_main_judger/judge_client/uoj_judger"' >uoj_judger/include/uoj_work_path.h
|
||||
make
|
||||
ln -s /var/uoj_data ~/judge_client/uoj_judger/data
|
||||
|
||||
mkdir ~/judge_client/uoj_judger/run/runtime
|
||||
mv ~/jdk-7u76-linux-x64.tar.gz ~/jdk-8u31-linux-x64.tar.gz ~/judge_client/uoj_judger/run/runtime
|
||||
cd ~/judge_client/uoj_judger/run/runtime
|
||||
tar -xzf jdk-7u76-linux-x64.tar.gz
|
||||
tar -xzf jdk-8u31-linux-x64.tar.gz
|
||||
EOD
|
||||
|
||||
mv judge_client_config.json /home/local_main_judger/judge_client/.conf.json
|
||||
chown local_main_judger /home/local_main_judger/judge_client/.conf.json
|
||||
chmod 600 /home/local_main_judger/judge_client/.conf.json
|
||||
|
||||
echo 'insert into judger_info (judger_name, password) values ("main_judger", "__main_judger_password__")' | mysql app_uoj233 -u root --password=root
|
||||
|
||||
php /var/www/uoj/app/cli.php upgrade:latest
|
@ -1,34 +0,0 @@
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo 'invalid argument'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
path=/var/svn/problem/$1
|
||||
mkdir $path
|
||||
svnadmin create $path
|
||||
cat >$path/conf/svnserve.conf <<EOD
|
||||
[general]
|
||||
anon-access = none
|
||||
auth-access = write
|
||||
password-db = passwd
|
||||
EOD
|
||||
|
||||
svnusr="our-root"
|
||||
svnpwd="__our_root_password__"
|
||||
|
||||
cat >$path/conf/passwd <<EOD
|
||||
[users]
|
||||
$svnusr = $svnpwd
|
||||
EOD
|
||||
|
||||
mkdir $path/cur
|
||||
cd $path/cur
|
||||
svn checkout svn://127.0.0.1/problem/$1 --username $svnusr --password $svnpwd
|
||||
mkdir /var/uoj_data/$1
|
||||
|
||||
cat >$path/hooks/post-commit <<EODEOD
|
||||
#!/bin/sh
|
||||
/var/svn/problem/post-commit.sh $1
|
||||
EODEOD
|
||||
chmod +x $path/hooks/post-commit
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
svnusr="our-root"
|
||||
svnpwd="__our_root_password__"
|
||||
cd /var/svn/problem/$1/cur/$1
|
||||
svn update --username $svnusr --password $svnpwd
|
||||
chown www-data /var/svn/problem/$1 -R
|
@ -1,35 +0,0 @@
|
||||
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
|
||||
# newer versions of the distribution.
|
||||
|
||||
deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted
|
||||
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted
|
||||
|
||||
## Major bug fix updates produced after the final release of the
|
||||
## distribution.
|
||||
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
|
||||
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
|
||||
|
||||
## Uncomment the following two lines to add software from the 'universe'
|
||||
## repository.
|
||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
||||
## team. Also, please note that software in universe WILL NOT receive any
|
||||
## review or updates from the Ubuntu security team.
|
||||
deb http://cn.archive.ubuntu.com/ubuntu/ trusty universe
|
||||
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty universe
|
||||
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates universe
|
||||
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates universe
|
||||
|
||||
## N.B. software from this repository may not have been tested as
|
||||
## extensively as that contained in the main release, although it includes
|
||||
## newer versions of some applications which may provide useful features.
|
||||
## Also, please note that software in backports WILL NOT receive any review
|
||||
## or updates from the Ubuntu security team.
|
||||
# deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
|
||||
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted
|
||||
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted
|
||||
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security universe
|
||||
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security universe
|
||||
# deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security multiverse
|
||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security multiverse
|
@ -1,2 +0,0 @@
|
||||
[users]
|
||||
root = __svn_pwd__
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd /var/svn/uoj/cur/uoj && svn update --username root --password __svn_pwd__
|
10
docker/up
10
docker/up
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
service ntp start
|
||||
service apache2 start
|
||||
service mysql start
|
||||
svnserve -d -r /var/svn
|
||||
|
||||
su local_main_judger -c '~/judge_client/judge_client start'
|
||||
|
||||
exec bash
|
1
docs/.gitignore
vendored
1
docs/.gitignore
vendored
@ -1 +0,0 @@
|
||||
site/
|
@ -1,4 +0,0 @@
|
||||
# 关于
|
||||
文档编写:vfleaking
|
||||
|
||||
邮件:vfleaking@163.com
|
@ -1,3 +0,0 @@
|
||||
# 比赛
|
||||
|
||||
<p style="font-size:233px">坑</p>
|
@ -1,50 +0,0 @@
|
||||
# 开发
|
||||
听说你想写代码?
|
||||
|
||||
svn://local\_uoj.ac/uoj 和 svn://local\_uoj.ac/judge_client 欢迎你(如果你没改 UOJ 的 hostname 的话),这是两个 svn 仓库,至于 svn 仓库权限问题……你需要手工加一下……
|
||||
|
||||
在 /var/svn/uoj/conf/passwd 这个文件中你可以加一行
|
||||
<pre>
|
||||
uoj = 666666
|
||||
</pre>
|
||||
来增加一位名为 "<samp>uoj</samp>",密码为 "<samp>666666</samp>" 的 svn 仓库管理员。
|
||||
|
||||
之后你就可以随意用 svn 玩耍了哇咔咔……
|
||||
|
||||
在本地写完之后,如果你想与别人分享,你可以把代码再放到 git 中(什么鬼?)再 push 到 github。
|
||||
|
||||
如果你想更新的东西已经不局限于网站代码,还想对数据库、文件系统之类的折腾一番,请在 app/upgrade 目录下建立文件夹,举个例子,叫 `2333_create_table_qaq`。即,以一串数字开头,后面加一个下划线,再后面随便取名字吧,仅能包含数字字母和下划线。
|
||||
|
||||
在这个文件夹下你可以放一些小脚本。大概 UOJ 运行这些小脚本是这么个逻辑:
|
||||
```php
|
||||
if (is_file("{$dir}/upgrade.php")) {
|
||||
$fun = include "{$dir}/upgrade.php";
|
||||
$fun("up");
|
||||
}
|
||||
if (is_file("{$dir}/up.sql")) {
|
||||
runSQL("{$dir}/up.sql");
|
||||
}
|
||||
if (is_file("{$dir}/upgrade.sh")) {
|
||||
runShell("/bin/bash {$dir}/upgrade.sh up");
|
||||
}
|
||||
```
|
||||
你只需要在 /var/www/uoj/app 下执行 `php cli.php upgrade:up 2333_create_table_qaq` 就可以运行了,这个运行过程我们称为 `up`。
|
||||
|
||||
请务必再写一下还原的小脚本,我们称为 `down`。写完代码后你需要保证 `up` 再 `down` 能回到原来的系统。与 `up` 类似,你需要执行 `php cli.php upgrade:down 2333_create_table_qaq`,执行 `down` 的逻辑如下:
|
||||
```php
|
||||
if (is_file("{$dir}/upgrade.php")) {
|
||||
$fun = include "{$dir}/upgrade.php";
|
||||
$fun("down");
|
||||
}
|
||||
if (is_file("{$dir}/down.sql")) {
|
||||
runSQL("{$dir}/down.sql");
|
||||
}
|
||||
if (is_file("{$dir}/upgrade.sh")) {
|
||||
runShell("/bin/bash {$dir}/upgrade.sh down");
|
||||
}
|
||||
```
|
||||
|
||||
在数据库中,UOJ 会记录自己已经加载了哪些 upgrade,当你执行 `php cli.php upgrade:latest` 的时候,UOJ 会把所有已经在 app/upgrade 文件夹下但还没有加载的 upgrade 都给 `up` 一下,并且是按前缀上的那一串数字从小到大执行。所以写好了这种小 upgrade 之后,你就可以跟别人分享了!
|
||||
|
||||
不过关于架构什么的介绍我还是先
|
||||
<p style="font-size:233px">坑着</p>
|
@ -1,4 +0,0 @@
|
||||
.hljs-preprocessor .hljs-keyword {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# 概述
|
||||
|
||||
写点 UOJ 的文档方便大家。
|
||||
|
||||
(喂怎么概述就这么短这么懒啊?)
|
||||
|
||||
哎呀懒得废话那么多啦……
|
||||
|
||||
要想竞赛搞得好,网上刷题不可少;在线题库哪里找?通用测评大法好!
|
||||
|
||||
[UOJ](http://uoj.ac/)
|
@ -1,106 +0,0 @@
|
||||
# 安装
|
||||
|
||||
## 教练我想安装!
|
||||
|
||||
请参见 [README.md](https://github.com/vfleaking/uoj/blob/master/README.md) 来安装。
|
||||
|
||||
嘿嘿现在我假设你已经是超级管理员了!
|
||||
|
||||
那么你就可以新建题目了!
|
||||
|
||||
看看看,problem/1 这个文件夹,里面有一道样题,赶紧动手上传!(啊感觉我应该多给几道样题的)
|
||||
|
||||
关于如何传题请参见[题目文档](problem/)
|
||||
|
||||
啊如果你在 “与svn仓库同步” 的过程中发现 <samp>compile error</samp> 并且还说 <samp>no comment</samp> 的话……多半是……UOJ 尝试 ptrace 然而 ptrace 被禁了……
|
||||
|
||||
被禁了可能是被 docker 禁了,可以加一句 `--cap-add SYS_PTRACE` (见 [README.md](https://github.com/vfleaking/uoj/blob/master/README.md))……要是这样不能解决问题……是 Ubuntu/openSUSE 环境嘛?请尝试用下面的命令阻止 AppArmor 对 docker 的行为产生影响。当然把第二行加到 `rc.local` 里就不用每次重启都输入一遍啦~(详细解释戳 [→ 这里](https://github.com/docker/docker/issues/7276))
|
||||
|
||||
```sh
|
||||
sudo apt-get install apparmor-utils
|
||||
aa-complain /etc/apparmor.d/docker
|
||||
```
|
||||
|
||||
要是这样还是不能解决问题……估计就是被黑恶势力禁掉了。。。大概就不是咱们这边的锅了,找找是哪个黑恶势力禁的吧。。。
|
||||
|
||||
另:如果上述方法不能解决 ptrace 问题也可以考虑使用 `--privileged`,但是这么做会导致 docker 失去其原有的隔离性而带来潜在的风险,不建议在生产环境中使用。
|
||||
|
||||
传题都没问题的话,感觉就可以愉快使用 UOJ 了!
|
||||
|
||||
## 教练我还想折腾!
|
||||
|
||||
嗯!来来来我们来折腾一波。
|
||||
|
||||
有个很厉害的配置文件,在 /var/www/uoj/app/.config.php 里,你可以配置一波……一个完全体如下:(有可能本文档没有跟上代码更新的速度,请以旁边的那个 .default-config.php 为准)
|
||||
|
||||
```php
|
||||
<?php
|
||||
return [
|
||||
'database' => [ // 数据库相关
|
||||
'database' => 'app_uoj233', // 数据库名称
|
||||
'username' => 'root', // 用户名
|
||||
'password' => '', // 密码
|
||||
'host' => '127.0.0.1' // 数据库主机名
|
||||
],
|
||||
'web' => [ // 网址相关
|
||||
'main' => [ // 网站主体
|
||||
'protocol' => 'http', // 传输协议
|
||||
'host' => 'local_uoj.ac', // 主机名
|
||||
'port' => 80 // 端口
|
||||
],
|
||||
'blog' => [ // UOJ 博客 (用户名放前面之后成为完整的域名)
|
||||
'protocol' => 'http', // 传输协议
|
||||
'host' => 'blog.local_uoj.ac', // 主机名
|
||||
'port' => 80 // 端口
|
||||
]
|
||||
],
|
||||
'security' => [ // 安全相关(不要动)
|
||||
'user' => [
|
||||
'client_salt' => 'salt0'
|
||||
],
|
||||
'cookie' => [
|
||||
'checksum_salt' => ['salt1', 'salt2', 'salt3']
|
||||
],
|
||||
],
|
||||
'mail' => [ // 邮件相关(SMTP 协议发送)
|
||||
'noreply' => [ // noreply 邮箱
|
||||
'username' => 'noreply@none',
|
||||
'password' => 'noreply',
|
||||
'host' => 'smtp.sina.com',
|
||||
'port' => 25
|
||||
]
|
||||
],
|
||||
'judger' => [ // 测评相关(不要动)
|
||||
'socket' => [ // 与测评机的 socket 服务器通讯的设置
|
||||
'port' => '233', // 端口
|
||||
'password' => 'password233' // 认证密码(证明自己 UOJ 服务器)
|
||||
]
|
||||
],
|
||||
'svn' => [ // svn 相关(不要动)
|
||||
'our-root' => [ // 每个题目的 svn 仓库自带的仓库管理员
|
||||
'username' => 'our-root', // 管理员用户名
|
||||
'password' => 'our-root' // 密码
|
||||
]
|
||||
],
|
||||
'switch' => [ // 一些开关
|
||||
'ICP-license' => false, // ICP 备案信息的显示
|
||||
'web-analytics' => false // 网站流量统计(记 uoj.ac 名下……想统计自己的得改代码)
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
### 域名
|
||||
如果你想使用自己的域名,改 config 即可。
|
||||
|
||||
如果你是搭校内网站这种的,可能没有 DNS。你可以选择自己搭校内的 DNS 解析,或者自己改 hosts。
|
||||
|
||||
或者你想成为一条咸鱼,可以直接在 config 里的 host 那里写 ip。
|
||||
|
||||
谜之声:为什么博客用不了?
|
||||
|
||||
嗯。。。博客的话需要给每个用户的博客域名进行解析……最好是用泛解析解决。如果没这条件,我帮你点根蜡烛 23333……期待有为青年码一个“博客以子域名还是子目录形式出现”的开关。
|
||||
|
||||
### 邮箱
|
||||
noreply 邮箱的目的是发一些莫名其妙的邮件,比如 svn 密码和 “找回密码”。
|
||||
|
||||
你可以随便找一个邮箱小号把账号密码塞这里,但是记得查查邮件服务商的 SMTP 服务器名和端口。以及,有些邮箱是需要手动开启某个开关才能允许 SMTP 发送邮件的。
|
@ -1,35 +0,0 @@
|
||||
# 维护
|
||||
|
||||
## 数据可持久化
|
||||
|
||||
(我并不是在说函数式线段树233)
|
||||
|
||||
有同学表示重启后 docker 丢失了数据。在这里要科普下 docker 的 image 和 container 的概念。
|
||||
|
||||
`run` 命令的功能是读一个 image 并运行,跑起来的 image 是一名光荣的 container,跑完的 container 还是一名光荣的 container。
|
||||
|
||||
所以当你关掉了你的 container 之后,使用 `run` 命令试图让它复活是不对的。。。
|
||||
|
||||
首先,你需要
|
||||
```sh
|
||||
docker ps -a
|
||||
```
|
||||
来查看所有正在运行或运行结束的 container,找到你刚才掐掉的那个(通常就是第一个),然后复制下它的 container id。然后:
|
||||
```sh
|
||||
docker restart <container-id>
|
||||
```
|
||||
这家伙就在后台默默跑起来了!如果你想让它回到前台,请用
|
||||
```sh
|
||||
docker attach <container-id>
|
||||
```
|
||||
当当!复活了!你以为丢失了的数据都回来了!(container 其实可以起名的,这种进阶用法自己探索吧233)
|
||||
|
||||
## 更新
|
||||
|
||||
当 github 上有更新的时候,如何更新自己本地的版本呢?
|
||||
|
||||
求看眼[开发](/dev/)最前面几行关于使用 svn 仓库的。
|
||||
|
||||
嗯好,假设你已经看完了。如果是 uoj 和 judge_client 的更新,那么你可以 svn checkout 一下,然后把 git 里的新版本 commit 上去……不过你以前 checkout 过的话就可以留着那个文件夹,下次就不用重新 checkout 了。
|
||||
|
||||
随着 UOJ 代码的更新,可能会有一些数据哇文件系统哇之类的更新,这种会被打包放在 app/upgrade 目录下。你只需要在 /var/www/uoj/app 下执行 `php cli.php upgrade:latest` 就好啦!
|
@ -1,263 +0,0 @@
|
||||
# 题目
|
||||
## 上传题目
|
||||
新建题目只有超级管理员有权限,所以想加题先要联系超级管理员君,点一下题库右下方的 “新建题目” 按钮。
|
||||
|
||||
新建题目后,超级管理员或该题目的题目管理员可以看到题目后台。后台分为三个选项卡:
|
||||
|
||||
1. 编辑:题面编辑页面
|
||||
2. 管理者:题目管理员列表管理页面
|
||||
3. 数据:题目数据管理页面
|
||||
|
||||
当然还有最后个 “返回” 选项卡退出后台。下面将逐一介绍这三个选项卡。
|
||||
|
||||
###编辑
|
||||
该页面可以对题面本身进行编辑,还可以管理题目的标签。
|
||||
|
||||
####编辑题面
|
||||
题面用 Markdown 编写。
|
||||
|
||||
理论上题面是可以自由编写的,但还是有一些推荐的格式。可参照 UOJ 上对应类型的题面(传统题,交互题,提交答案题等)
|
||||
|
||||
一些推荐的规则:
|
||||
|
||||
1. 中文与英文、数字之间加一个空格隔开。
|
||||
2. 输入输出样例用 `<pre>` 标签包围,并且以一个空行结尾。(方便大家复制样例到终端后不用再打回车)
|
||||
3. 题面中最高级标题为三级标题。这是因为题目名称是二级标题。
|
||||
4. 名称超过一个字符的数学符号要用 mathrm。例如 `\mathrm{sgn}`, `\mathrm{lca}`。
|
||||
4. 注意 `\max`, `\min`, `\gcd` 都是有现成的。
|
||||
5. 注意 xor 这种名称超过一个字符的二元运算符请用 `\mathbin{\mathrm{xor}}`。
|
||||
6. 一行内的计算机输入输出和常量字符串表达式请用 `<samp>` 标签,例如 `请输出 “<samp>NO SOLUTION</samp>”`, `<samp>aaa</samp> 中有三个 <samp>a</samp>`。
|
||||
7. 一行内的计算机代码请用 <code>`</code> 括起来,就像上面的规则那样。
|
||||
|
||||
可参考下面这个例子:
|
||||
```markdown
|
||||
读入一个整数 $n$,表示题目中提到的 $3$ 位大爷 AC 的总题数。请输出他们分别 AC 的总题数。如果你不能正确读入,那么将获得 $0$ 分。前 $3$ 个测试点你正确读入即可获得 $6$ 分,第 4 个测试点你正确读入只能获得 $3$ 分。如果你不会做这道题,请直接输出 “<samp>WOBUHUI</samp>”
|
||||
|
||||
下面有一个样例:
|
||||
<pre>
|
||||
233
|
||||
|
||||
</pre>
|
||||
```
|
||||
|
||||
|
||||
####编辑标签
|
||||
只需要用英文逗号隔开标签填入文本框就行。
|
||||
|
||||
推荐你使用如下几条规则填写标签:
|
||||
|
||||
1. 标签的目的是标出题目类型,方便用户检索题目。一般来说,标签顺序基本为从小范围到大范围。
|
||||
2. 最前面的几个标签是这题所需要的前置技能,这里假定 “二分查找” 之类过于基础的技能选手已经掌握。
|
||||
3. 接下来是这道题的大方法,比如 “贪心”、“DP”、“乱搞”、“构造”、“分治”……
|
||||
4. 接下来,如果这道题是非传统题,用一个标签注明非传统题类型,比如 “提交答案”、“交互式”、“通讯”。
|
||||
5. 接下来,如果这道题是模板题,用一个标签注明 “模板题”。
|
||||
6. 接下来,如果这道题是不用脑子想就能做出的题,例如 NOIP 第一题难度,用一个标签注明 “水题”。
|
||||
7. 最后,如果这题的来源比较重要,用一个标签注明。比如 “UOJ Round”、“NOI”、“WC”。
|
||||
8. 前置技能中,“数学” 太过宽泛不能作为标签,但 “数论” 可以作为前置技能。
|
||||
9. 如果有多个解法,每个解法的前值技能和大方法都不太一样,那么尽可能都标上去。
|
||||
10. “乱搞” 标签不宜滥用。
|
||||
|
||||
|
||||
###管理者
|
||||
只有题目管理员和超级管理员才能看到后台,但只有题目管理员才能管理题目数据。
|
||||
|
||||
可以通过这个页面增加或删除题目管理员。
|
||||
|
||||
###数据
|
||||
UOJ 使用 svn 管理题目数据,svn 仓库地址可以在本页面上找到。当你点了本页面的某个按钮后,UOJ 将把 svn 密码发送到你的邮箱。这个 svn 密码是不随题目变化而变化的。
|
||||
|
||||
但是,初始时 UOJ 是没有配置过用于给大家发邮件的邮箱的。所以如果你还没有配置过,请直接在数据库的 user\_info 表中找到 svn\_password 一栏存储的值;如果你愿意折腾一下,可以在 /var/www/uoj/app/.config.php 里配置一下邮箱,详情见[安装](/install/)咯~
|
||||
|
||||
1. 下载 svn,即 subversion。如果是 win 可以用 TortoiseSVN,如果是 ubuntu 直接 apt-get 一发,也可以用 smartsvn。
|
||||
2. 学习怎么使用 svn。(蛮好懂的吧,会用 checkout,add,remove,commit 什么的就行了)
|
||||
3. 在题目数据管理页面,获取 svn 密码。
|
||||
4. checkout 这道题。
|
||||
5. 在你的 working copy 下,建立文件夹 1,然后在 1 这个文件夹下放置题目数据什么的。
|
||||
6. 搞完之后 commit。
|
||||
7. 在网页上点“与SVN仓库同步”,就可以啦!
|
||||
|
||||
####题目配置格式
|
||||
主要麻烦是要写个 problem.conf,下面主要介绍传统题的配置。
|
||||
|
||||
例如:
|
||||
|
||||
<pre>
|
||||
use_builtin_judger on
|
||||
use_builtin_checker ncmp
|
||||
n_tests 10
|
||||
n_ex_tests 5
|
||||
n_sample_tests 1
|
||||
input_pre www
|
||||
input_suf in
|
||||
output_pre www
|
||||
output_suf out
|
||||
time_limit 1
|
||||
memory_limit 256
|
||||
output_limit 64
|
||||
|
||||
</pre>
|
||||
|
||||
假如你 input 文件是 www1.in, www2.in, ... 这个样子,那么你需要在 problem.conf 里记录:
|
||||
|
||||
<pre>
|
||||
input_pre www
|
||||
input_suf in
|
||||
|
||||
</pre>
|
||||
|
||||
output 文件同理。
|
||||
|
||||
extra test 是指额外数据,在 AC 的情况下会测额外数据,如果某个额外数据通不过会被倒扣3分。
|
||||
|
||||
至于样例,样例一定是前几个额外数据,所以有一个 `n_sample_tests` 表示是前多少组是样例。你需要把题面中的样例和大样例放进额外数据里。
|
||||
|
||||
额外数据命名形如 ex\_www1.in, ex\_www2.in, ... 这个样子。
|
||||
|
||||
checker 是指判断选手输出是否正确的。一般来说输出结果为整数序列,用 ncmp 就够了,它会比较标准答案的整数序列和选手输出的整数序列。如果是忽略所有空白字符,进行字符串序列的比较,可以用wcmp。如果你想按行比较(不忽略行末空格,但忽略文末回车),可以使用 fcmp。如果想手写 checker,请使用 Codeforces 的 [testlib](http://codeforces.com/testlib) 库写 checker。
|
||||
|
||||
你需要写好后命名为 chk.cpp,然后在 problem.conf 中去掉 “use\_builtin\_checker” 一行。
|
||||
|
||||
如果你的题目的输入数据可以被检验是否满足题目要求,那么请写一个 validator。比如“保证数据随机”“保证数据均为人手工输入”等就无法检验输入数据是否满足题目要求。
|
||||
|
||||
validator 的作用就是检查你输入数据造得是否合法。比如你输入保证是个连通图,validator 就得检验这个图是不是连通的。还是请用 testlib 写,教程还是之前提到的那个教程。写好后命名为 val.cpp 就行。
|
||||
|
||||
另外注意时间限制**不能为小数**。
|
||||
|
||||
#### 提交答案题的配置
|
||||
范例:
|
||||
|
||||
<pre>
|
||||
use_builtin_judger on
|
||||
submit_answer on
|
||||
n_tests 10
|
||||
input_pre www
|
||||
input_suf in
|
||||
output_pre www
|
||||
output_suf out
|
||||
|
||||
</pre>
|
||||
|
||||
So easy!
|
||||
|
||||
不过还没完……你要写个 checker。当然如果你是道 [最小割计数](http://uoj.ac/problem/85) 就不用写了。。。老样子写个 use\_builtin\_checker ncmp 就行。
|
||||
|
||||
提答题经常会面临给部分分,请使用 quitp 函数。由于一些历史原因(求不吐槽 QAQ),假设测试点满分为 a,则
|
||||
```cpp
|
||||
quitp(x, "haha");
|
||||
```
|
||||
将会给 floor(a * round(100x) / 100) 分。是不是很复杂……其实很简单,当你这个测试点想给 p 分的时候,只要
|
||||
```cpp
|
||||
quitp(ceil(100.0 * p / a) / 100, "haha");
|
||||
```
|
||||
就行了。(好麻烦啊)
|
||||
|
||||
假设你已经写好了,赞!
|
||||
|
||||
但是下发的本地 checker 怎么办?
|
||||
|
||||
首先你得会写本地 checker。如果只是传参进来一个测试点编号,检查测试点是否正确,那么只要善用 registerTestlib 就行了。如果你想让 checker 与用户交互,请使用 registerInteraction。特别地,如果你想让 checker 通过终端与用户进行交互,请使用如下代码(好丑啊)
|
||||
```cpp
|
||||
char *targv[] = {argv[0], "inf_file.out", (char*)"stdout"};
|
||||
#ifdef __EMSCRIPTEN__
|
||||
setvbuf(stdin, NULL, _IONBF, 0);
|
||||
#endif
|
||||
registerInteraction(3, targv);
|
||||
```
|
||||
|
||||
那么怎么下发文件呢?你可以在文件夹 1/ 下新建一个文件夹 download,里面放的所有东西都会打包发给选手啦~
|
||||
|
||||
#### 交叉编译
|
||||
|
||||
由于你的本地 checker 可能需要发布到各个平台,所以你也许需要交叉编译。交叉编译的意思是在一个平台上编译出其他平台上的可执行文件。好!下面是 Ubuntu 上交叉编译小教程时间。
|
||||
|
||||
首先不管三七二十一装一些库:(请注意 libc 和 libc++ 可能有更新的版本)
|
||||
```sh
|
||||
sudo apt-get install libc6-dev-i386
|
||||
sudo apt-get install lib32stdc++6 lib32stdc++-4.8-dev
|
||||
sudo apt-get install mingw32
|
||||
```
|
||||
|
||||
然后就能编译啦:
|
||||
```sh
|
||||
g++ localchk.cpp -o checker_linux64 -O2
|
||||
g++ localchk.cpp -m32 -o checker_linux32 -O2
|
||||
i586-mingw32msvc-g++ localchk.cpp -o checker_win32.exe -O2
|
||||
```
|
||||
|
||||
问:那其他系统怎么办?有个叫 emscripten 的东西,可以把 C++ 代码编译成 javascript。请务必使用 UOJ 上的 testlib,而不是 CF 上的那个版本。由于 testlib 有些黑科技,UOJ 上的 testlib 对 emscripten 才是兼容的。
|
||||
|
||||
[emscripten 下载地址](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) (建议翻墙提升下载速度)
|
||||
|
||||
编译就用
|
||||
```sh
|
||||
em++ localchk.cpp -o checker.js -O2
|
||||
```
|
||||
|
||||
#### 交互题的配置
|
||||
嘛……其实并没有 UOJ 内部并没有显式地支持交互式(真正的程序与程序交互的版本还没发布出来),只是提供了 require、implementer 和 token 这两个东西。
|
||||
|
||||
除了前文所述的 download 这个文件夹,还有一个叫 require 的神奇文件夹。在测评时,这个文件夹里的所有文件均会被移动到与选手源程序同一目录下。在这个文件夹下,你可以放置交互库,供编译时使用。
|
||||
|
||||
再来说 implementer 的用途。如果你在 problem.conf 里设置 `with_implementer on` 的话,各个语言的编译命令将变为:
|
||||
|
||||
* C++: g++ code implementer.cpp code.cpp -lm -O2 -DONLINE_JUDGE
|
||||
* C: gcc code implementer.c code.c -lm -O2 -DONLINE_JUDGE
|
||||
* Pascal: fpc implementer.pas -o code -O2
|
||||
|
||||
好……不管那些奇怪的选手的话,一个交互题就搞好了……你需要写 implementer.cpp、implementer.c 和 implementer.pas。当然你不想兹瓷某个语言的话不写对应的交互库就好了。
|
||||
|
||||
如果是 C/C++,正确姿势是搞一个统一的头文件放置接口,让 implementer 和选手程序都 include 这个头文件。把主函数写在 implementer 里,连起来编译时程序就是从 implementer 开始执行的了。
|
||||
|
||||
如果是 Pascal,正确姿势是让选手写一个 pascal unit 上来,在 implementer.pas 里 uses 一下。除此之外也要搞另外一个 pascal unit,里面存交互库的各种接口,让 implementer 和选手程序都 uses 一下。
|
||||
|
||||
哦另外 require 文件夹的内容显然不会被下发……如果你想下发一个样例交互库,可以放到 download 文件夹里。
|
||||
|
||||
好下面来解释什么是 token……考虑一道典型的交互题,交互库跟选手函数交流得很愉快,最后给了个满分。此时交互库输出了 “AC!!!” 的字样,也可能输出了选手一共调用了几次接口。但是聪明的选手发现,只要自己手动输出一下 “AC!!!” 然后果断退出似乎就能骗过测评系统了娃哈哈。
|
||||
|
||||
这是因为选手函数和交互库已经融为一体成为了一个统一的程序,测评系统分辨出谁是谁。这时候,token 就出来拯救世界了。
|
||||
|
||||
在 problem.conf 里配置一个奇妙的 token,比如 `token wahaha233`,然后把这个 token 写进交互库的代码里(线上交互库,不是样例交互库)。在交互库准备输出任何东西之前,先输出一下这个 token。当测评系统要给选手判分时,首先判断文件的第一行是不是 token,如果不是,直接零分。这样就避免了奇怪的选手 hack 测评系统了。这里的 token 判定是在调用 checker 之前,测评系统会把 token 去掉之后的选手输出喂给 checker。(所以一道交互题的 token 要好好保护好)
|
||||
|
||||
另外另外,记得在 C/C++ 的交互库里给全局变量开 static,意为仅本文件可访问。
|
||||
|
||||
#### 意想不到的非传统题
|
||||
吼,假如你有一道题不属于上述任何一种题目类型 —— 恭喜你中奖啦!得自己写 judger 啦!
|
||||
|
||||
judger 的任务:给你选手提交的文件,把测评结果告诉我。
|
||||
|
||||
把 problem.conf 里的 `use_builtin_judger on` 这行去掉,搞一个 judger 放在题目目录下,就好了。
|
||||
|
||||
噢对怎么搞这个 judger 呢。。。全自动啦233。。。你需要写个 Makefile……比如
|
||||
```makefile
|
||||
export INCLUDE_PATH
|
||||
CXXFLAGS = -I$(INCLUDE_PATH) -O2
|
||||
|
||||
all: chk judger
|
||||
|
||||
% : %.cpp
|
||||
$(CXX) $(CXXFLAGS) $< -o $@
|
||||
```
|
||||
|
||||
什么?你问 judger 应该怎么写?
|
||||
|
||||
很抱歉的是这部分我封装得并不是很方便……请 include 一下 uoj_judger.h 来辅助你写 judger……参照 QUINE 这个样题……
|
||||
|
||||
说实在的 uoj_judger.h 写得太丑了(不过反正我会用2333)。期待神犇再来造一遍轮子,或者用 python 码个框架(需要解决 python 启动就耗时 40ms 的坑爹问题)
|
||||
|
||||
哦对,要使用自己的 judger 的话就只有超级管理员能 “与 SVN 仓库同步” 了。另外无论你的 judger 如何折腾,测评也是有 10 分钟 的时间限制的。
|
||||
|
||||
## 样题
|
||||
在 problem 文件夹下有我们给出的几道样题。
|
||||
|
||||
1. 一个典型的传统题
|
||||
* \#1. A + B Problem。
|
||||
2. 一个典型的非传统题:
|
||||
* \#8. Quine。
|
||||
3. 一个典型的交互题:
|
||||
* \#52. 【UR \#4】元旦激光炮。
|
||||
4. 一个典型的 ACM 赛制题(错一个就 0 分):
|
||||
* \#79. 一般图最大匹配。
|
||||
5. 一个典型的提交答案题:
|
||||
* \#116. 【ZJOI2015】黑客技术。
|
||||
6. 一个典型的 subtask 制的题:
|
||||
* \#225. 【UR #15】奥林匹克五子棋。
|
@ -1,11 +0,0 @@
|
||||
site_name: UOJ Documentation
|
||||
pages:
|
||||
- 主页: 'index.md'
|
||||
- 安装: 'install.md'
|
||||
- 维护: 'maintain.md'
|
||||
- 题目: 'problem.md'
|
||||
- 比赛: 'contest.md'
|
||||
- 开发: 'dev.md'
|
||||
- 关于: 'about.md'
|
||||
theme: cerulean
|
||||
extra_css: [extra.css]
|
23
install/bundle/Dockerfile
Normal file
23
install/bundle/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
FROM ubuntu:14.04
|
||||
MAINTAINER MascoSkray <MascoSkray@gmail.com>
|
||||
|
||||
#Update apt and install git
|
||||
RUN apt-get update -y && apt-get install -y git
|
||||
#Clone the latest UOJ Community verison to local
|
||||
RUN cd ~ && git clone https://github.com/UniversalOJ/UOJ-System.git
|
||||
#Install environment and set startup script
|
||||
RUN cd ~/UOJ-System/install/bundle && bash install.sh -e && echo "\
|
||||
#!/bin/bash\n\
|
||||
if [ ! -f "/var/svn/.UOJSetupDone" ]; then\n\
|
||||
cd ~/UOJ-System/install/bundle && bash install.sh -c\n\
|
||||
fi\n\
|
||||
service ntp start\n\
|
||||
service mysql start\n\
|
||||
service apache2 start\n\
|
||||
svnserve -d -r /var/svn\n\
|
||||
su local_main_judger -c \"~/judge_client/judge_client start\"\n\
|
||||
exec bash\n" >/root/up && chmod +x /root/up
|
||||
|
||||
ENV LANG=C.UTF-8 TZ=Asia/Shanghai
|
||||
EXPOSE 80 3690
|
||||
CMD /root/up
|
251
install/bundle/install.sh
Normal file
251
install/bundle/install.sh
Normal file
@ -0,0 +1,251 @@
|
||||
#!/bin/bash
|
||||
genRandStr(){
|
||||
cat /dev/urandom | tr -dc [:alnum:] | head -c $1
|
||||
}
|
||||
#Set some vars
|
||||
_database_password_=root
|
||||
_judger_socket_port_=2333
|
||||
_judger_socket_password_=$(genRandStr 10)
|
||||
_main_judger_password_=$(genRandStr 32)
|
||||
_svn_ourroot_password_=$(genRandStr 10)
|
||||
_svn_certroot_password_=$(genRandStr 32)
|
||||
|
||||
getAptPackage(){
|
||||
echo -e "\n\n==> Getting environment packages"
|
||||
#Set MySQL root password
|
||||
debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password password $_database_password_" && debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password_again password $_database_password_"
|
||||
#Update apt sources and install
|
||||
apt-get update -y
|
||||
apt-get install -y vim ntp zip unzip curl wget subversion apache2 libapache2-mod-xsendfile libapache2-mod-auth-mysql php5 php5-dev php-pear php5-mysql mysql-server-5.6 cmake fp-compiler re2c libv8-dev libyaml-dev python python3 python-requests
|
||||
#Install PHP extensions
|
||||
echo -e "\n\n" | pecl install v8js-0.1.3 yaml-1.3.1
|
||||
}
|
||||
|
||||
getOracleJDK(){
|
||||
echo -e "\n\n==> Getting JDK runtime files"
|
||||
#Add judger user
|
||||
useradd -m local_main_judger && usermod -a -G www-data local_main_judger
|
||||
#Get newest jdk dist file
|
||||
JDK_MIRROR_LINK=http://ftp.osuosl.org/pub/funtoo/distfiles/oracle-java/
|
||||
JDK_CNMIRROR_LINK=http://funtoo.neu.edu.cn/funtoo/distfiles/oracle-java/
|
||||
curl -s ${JDK_MIRROR_LINK} | grep -oP '>jdk-[7,8].*-linux-x64.tar' | sed -e 's/[\",>]//g' -e 's/-linux-x64.tar//g' >jdkdist.list
|
||||
wget ${JDK_MIRROR_LINK}$(sed -n '1p' jdkdist.list)-linux-x64.tar.gz && wget ${JDK_MIRROR_LINK}$(sed -n '2p' jdkdist.list)-linux-x64.tar.gz
|
||||
#Change jdk version to faq.php
|
||||
sed -i -e "s/jdk-7u76/$(sed -n '1p' jdkdist.list)/g" -e "s/jdk-8u31/$(sed -n '2p' jdkdist.list)/g" ../../uoj/1/app/controllers/faq.php
|
||||
#Move jdk file to judge user root
|
||||
chown local_main_judger jdkdist.list jdk-*-linux-x64.tar.gz
|
||||
mv jdkdist.list jdk-*-linux-x64.tar.gz /home/local_main_judger/
|
||||
}
|
||||
|
||||
setLAMPConf(){
|
||||
echo -e "\n\n==> Setting LAMP configs"
|
||||
#Set Apache UOJ site conf
|
||||
cat >/etc/apache2/sites-available/000-uoj.conf <<UOJEOF
|
||||
<VirtualHost *:80>
|
||||
#ServerName local_uoj.ac
|
||||
ServerAdmin vfleaking@163.com
|
||||
DocumentRoot /var/www/uoj
|
||||
|
||||
#LogLevel info ssl:warn
|
||||
ErrorLog \${APACHE_LOG_DIR}/uoj_error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/uoj_access.log combined
|
||||
|
||||
XSendFile On
|
||||
XSendFilePath /var/uoj_data
|
||||
XSendFilePath /var/www/uoj/app/storage
|
||||
XSendFilePath /home/local_main_judger/judge_client/uoj_judger/include
|
||||
</VirtualHost>
|
||||
UOJEOF
|
||||
#Enable modules and make UOJ site conf enabled
|
||||
a2ensite 000-uoj.conf && a2dissite 000-default.conf
|
||||
a2enmod rewrite headers && sed -i -e '166s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
|
||||
#Create UOJ session save dir and make PHP extensions available
|
||||
mkdir --mode=733 /var/lib/php5/uoj && chmod +t /var/lib/php5/uoj
|
||||
sed -i -e '866a\extension=v8js.so\nextension=yaml.so' /etc/php5/apache2/php.ini
|
||||
#Set MySQL user directory and connection config
|
||||
usermod -d /var/lib/mysql/ mysql
|
||||
sed -i -e "108a\init_connect='SET collation_connection = utf8_unicode_ci'\ninit_connect='SET NAMES utf8'\ncharacter-set-server=utf8\ncollation-server=utf8_unicode_ci\nskip-character-set-client-handshake" -e "117a\default-character-set=utf8" /etc/mysql/my.cnf
|
||||
}
|
||||
|
||||
setSVNServe(){
|
||||
echo -e "\n\n==> Setting SVN server"
|
||||
#Make SVN work dir
|
||||
mkdir /var/svn && svnserve -d -r /var/svn
|
||||
mkdir /var/svn/problem && chown www-data /var/svn/problem -R
|
||||
svnadmin create /var/svn/uoj && svnadmin create /var/svn/judge_client
|
||||
#Set SVN server config file and password db
|
||||
sed -i -e 's/# store-plaintext-passwords = no/store-plaintext-passwords = yes/g' /etc/subversion/servers
|
||||
sed -i -e 's/# anon-access/anon-access/g' -e 's/# auth-access/auth-access/g' -e 's/# password-db/password-db/g' /var/svn/uoj/conf/svnserve.conf
|
||||
rm -r /var/svn/judge_client/conf/passwd && ln -s /var/svn/uoj/conf/passwd /var/svn/judge_client/conf/passwd
|
||||
cat /var/svn/uoj/conf/svnserve.conf >/var/svn/judge_client/conf/svnserve.conf
|
||||
cat >/var/svn/uoj/conf/passwd <<UOJEOF
|
||||
[users]
|
||||
root = $_svn_certroot_password_
|
||||
UOJEOF
|
||||
#Set SVN hook scripts
|
||||
cat >/var/svn/uoj/hooks/post-commit <<UOJEOF
|
||||
#!/bin/sh
|
||||
cd /var/svn/uoj/cur/uoj && svn update --username root --password $_svn_certroot_password_
|
||||
UOJEOF
|
||||
chmod +x /var/svn/uoj/hooks/post-commit
|
||||
cat >/var/svn/judge_client/hooks/post-commit <<UOJEOF
|
||||
#!/bin/sh
|
||||
su local_main_judger -c '~/judge_client/judge_client update'
|
||||
exit \$?
|
||||
UOJEOF
|
||||
chmod +x /var/svn/judge_client/hooks/post-commit
|
||||
cat >/var/svn/problem/new_problem.sh <<UOJEOF
|
||||
if [ \$# -ne 1 ]
|
||||
then
|
||||
echo 'invalid argument'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
path=/var/svn/problem/\$1
|
||||
mkdir \$path
|
||||
svnadmin create \$path
|
||||
cat >\$path/conf/svnserve.conf <<EOD
|
||||
[general]
|
||||
anon-access = none
|
||||
auth-access = write
|
||||
password-db = passwd
|
||||
EOD
|
||||
|
||||
svnusr="our-root"
|
||||
svnpwd="$_svn_ourroot_password_"
|
||||
|
||||
cat >\$path/conf/passwd <<EOD
|
||||
[users]
|
||||
\$svnusr = \$svnpwd
|
||||
EOD
|
||||
|
||||
mkdir \$path/cur && cd \$path/cur
|
||||
svn checkout svn://127.0.0.1/problem/\$1 --username \$svnusr --password \$svnpwd
|
||||
mkdir /var/uoj_data/\$1
|
||||
|
||||
cat >\$path/hooks/post-commit <<EODEOD
|
||||
#!/bin/sh
|
||||
/var/svn/problem/post-commit.sh \$1
|
||||
EODEOD
|
||||
chmod +x \$path/hooks/post-commit
|
||||
UOJEOF
|
||||
chmod +x /var/svn/problem/new_problem.sh
|
||||
cat >/var/svn/problem/post-commit.sh <<UOJEOF
|
||||
#!/bin/sh
|
||||
svnusr="our-root"
|
||||
svnpwd="$_svn_ourroot_password_"
|
||||
cd /var/svn/problem/\$1/cur/\$1
|
||||
svn update --username \$svnusr --password \$svnpwd
|
||||
chown www-data /var/svn/problem/\$1 -R
|
||||
UOJEOF
|
||||
chmod +x /var/svn/problem/post-commit.sh
|
||||
#Precheckout to cur folder
|
||||
mkdir /var/svn/uoj/cur /var/svn/judge_client/cur
|
||||
svn co svn://127.0.0.1/uoj --username root --password $_svn_certroot_password_ /var/svn/uoj/cur/uoj
|
||||
svn co svn://127.0.0.1/judge_client --username root --password $_svn_certroot_password_ /var/svn/judge_client/cur/judge_client
|
||||
chown local_main_judger /var/svn/judge_client/cur/judge_client -R
|
||||
}
|
||||
|
||||
setWebConf(){
|
||||
echo -e "\n\n==> Setting web files"
|
||||
#Commit web source file
|
||||
svn co svn://127.0.0.1/uoj --username root --password $_svn_certroot_password_
|
||||
mv ../../uoj/1 uoj/1 && cd uoj
|
||||
svn add 1 && svn ci -m "Installtion commit" --username root --password $_svn_certroot_password_
|
||||
cd .. && rm uoj /var/www/uoj -r
|
||||
#Set webroot path
|
||||
ln -s /var/svn/uoj/cur/uoj/1 /var/www/uoj
|
||||
chown www-data /var/www/uoj/app/storage -R
|
||||
#Set web config file
|
||||
php -a <<UOJEOF
|
||||
\$config = include '/var/www/uoj/app/.default-config.php';
|
||||
\$config['database']['password']='$_database_password_';
|
||||
\$config['security']['user']['client_salt']='$(genRandStr 32)';
|
||||
\$config['security']['cookie']['checksum_salt']=['$(genRandStr 16)','$(genRandStr 16)','$(genRandStr 16)'];
|
||||
\$config['judger']['socket']['port']='$_judger_socket_port_';
|
||||
\$config['judger']['socket']['password']='$_judger_socket_password_';
|
||||
\$config['svn']['our-root']['password']='$_svn_certroot_password_';
|
||||
file_put_contents('/var/www/uoj/app/.config.php', "<?php\nreturn ".str_replace('\'_httpHost_\'','UOJContext::httpHost()',var_export(\$config, true)).";\n");
|
||||
UOJEOF
|
||||
#Import MySQL database
|
||||
service mysql start
|
||||
mysql -u root --password=$_database_password_ <app_uoj233.sql
|
||||
}
|
||||
|
||||
setJudgeConf(){
|
||||
echo -e "\n\n==> Setting judge_client files"
|
||||
#Commit judge_client source file
|
||||
svn co svn://127.0.0.1/judge_client --username root --password $_svn_certroot_password_
|
||||
mv ../../judge_client/1 judge_client/1 && cd judge_client
|
||||
svn add 1 && svn ci -m "Installation commit" --username root --password $_svn_certroot_password_
|
||||
cd .. && rm judge_client -r
|
||||
#Set uoj_data path
|
||||
mkdir /var/uoj_data
|
||||
chown www-data /var/uoj_data -R && chgrp www-data /var/uoj_data -R
|
||||
#Compile judge_client and set runtime
|
||||
su local_main_judger <<EOD
|
||||
svn update /var/svn/judge_client/cur/judge_client --username root --password $_svn_certroot_password_
|
||||
ln -s /var/svn/judge_client/cur/judge_client/1 ~/judge_client
|
||||
ln -s /var/uoj_data ~/judge_client/uoj_judger/data
|
||||
cd ~/judge_client && chmod +x judge_client
|
||||
echo '#define UOJ_WORK_PATH "/home/local_main_judger/judge_client/uoj_judger"' >uoj_judger/include/uoj_work_path.h
|
||||
make
|
||||
mkdir ~/judge_client/uoj_judger/run/runtime && cd ~/judge_client/uoj_judger/run/runtime
|
||||
mv ~/jdkdist.list ~/jdk-*-linux-x64.tar.gz .
|
||||
tar -xzf jdk-7*-linux-x64.tar.gz && tar -xzf jdk-8*-linux-x64.tar.gz
|
||||
mv jdk1.7* jdk1.7.0_latest && mv jdk1.8* jdk1.8.0_latest
|
||||
EOD
|
||||
#Set judge_client config file
|
||||
cat >/home/local_main_judger/judge_client/.conf.json <<UOJEOF
|
||||
{
|
||||
"uoj_protocol": "http",
|
||||
"uoj_host": "127.0.0.1",
|
||||
"judger_name": "main_judger",
|
||||
"judger_password": "$_main_judger_password_",
|
||||
"socket_port": $_judger_socket_port_,
|
||||
"socket_password": "$_judger_socket_password_",
|
||||
"svn_username": "root",
|
||||
"svn_password": "$_svn_certroot_password_"
|
||||
}
|
||||
UOJEOF
|
||||
chmod 600 /home/local_main_judger/judge_client/.conf.json
|
||||
chown local_main_judger /home/local_main_judger/judge_client/.conf.json
|
||||
#Import judge_client to MySQL database
|
||||
echo "insert into judger_info (judger_name, password) values (\"main_judger\", \"$_main_judger_password_\")" | mysql app_uoj233 -u root --password=$_database_password_
|
||||
}
|
||||
|
||||
endUpProgress(){
|
||||
echo -e "\n\n==> Ending progress and start service"
|
||||
#Using cli upgrade to latest
|
||||
php /var/www/uoj/app/cli.php upgrade:latest
|
||||
#Start services
|
||||
service ntp restart
|
||||
service mysql restart
|
||||
service apache2 restart
|
||||
su local_main_judger -c '~/judge_client/judge_client start'
|
||||
#Set SetupDone flag file
|
||||
echo 'Congratulations!' > /var/svn/.UOJSetupDone
|
||||
echo -e "\n\n***Installation complete. Enjoy!***"
|
||||
}
|
||||
|
||||
if [ "$1" == "-e" ] ;then
|
||||
echo 'Setting UOJ System bundle environment...'
|
||||
getAptPackage
|
||||
getOracleJDK
|
||||
setLAMPConf
|
||||
elif [ "$1" == "-c" ] ;then
|
||||
echo 'Configuring UOJ System bundle...'
|
||||
setSVNServe
|
||||
setWebConf
|
||||
setJudgeConf
|
||||
endUpProgress
|
||||
else
|
||||
echo 'Installing UOJ System bundle...'
|
||||
getAptPackage
|
||||
getOracleJDK
|
||||
setLAMPConf
|
||||
setSVNServe
|
||||
setWebConf
|
||||
setJudgeConf
|
||||
endUpProgress
|
||||
fi
|
@ -14,16 +14,16 @@ cid = raw_input('uoj container id: ')
|
||||
ip = raw_input('uoj ip: ')
|
||||
name = raw_input('judger name: ')
|
||||
|
||||
os.system("docker cp " + cid + ":/home/local_main_judger/judge_client/.conf.json docker/judge_client/conf.json")
|
||||
os.system("docker cp " + cid + ":/home/local_main_judger/judge_client/.conf.json conf.json")
|
||||
|
||||
with open('docker/judge_client/conf.json', 'r') as f:
|
||||
with open('conf.json', 'r') as f:
|
||||
conf = json.load(f)
|
||||
|
||||
conf['uoj_host'] = ip
|
||||
conf['judger_name'] = name
|
||||
conf['judger_password'] = ''.join(random.choice('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') for i in range(32))
|
||||
|
||||
with open('docker/judge_client/conf.json', 'w') as f:
|
||||
with open('conf.json', 'w') as f:
|
||||
json.dump(conf, f, indent=4, separators=(',', ': '))
|
||||
print >>f
|
||||
|
||||
@ -32,7 +32,7 @@ translate_table = {
|
||||
'uoj_host': ip
|
||||
}
|
||||
|
||||
translate('docker/judge_client/install', 'docker/judge_client/cur_install', translate_table)
|
||||
translate('install', 'cur_install', translate_table)
|
||||
|
||||
print "please modify the database after getting the judger server ready:"
|
||||
print "insert into judger_info (judger_name, password, ip) values ('%s', '%s', '__judger_ip_here__');" % (name, conf['judger_password'])
|
3
install/judge_client/install_judge_client
Normal file
3
install/judge_client/install_judge_client
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -f Dockerfile .
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -f docker/judge_client/Dockerfile .
|
@ -1103,7 +1103,7 @@ RunCompilerResult compile_java7(const string &name, const string &path = work_pa
|
||||
executef("echo package %s\\; | cat - %s/%s.code >%s/%s/%s.java", name.c_str(), path.c_str(), name.c_str(), path.c_str(), name.c_str(), main_class.c_str());
|
||||
|
||||
return run_compiler((path + "/" + name).c_str(),
|
||||
(main_path + "/run/runtime/jdk1.7.0_76/bin/javac").c_str(), (main_class + ".java").c_str(), NULL);
|
||||
(main_path + "/run/runtime/jdk1.7.0_latest/bin/javac").c_str(), (main_class + ".java").c_str(), NULL);
|
||||
}
|
||||
RunCompilerResult compile_java8(const string &name, const string &path = work_path) {
|
||||
RunCompilerResult ret = prepare_java_source(name, path);
|
||||
@ -1116,7 +1116,7 @@ RunCompilerResult compile_java8(const string &name, const string &path = work_pa
|
||||
executef("echo package %s\\; | cat - %s/%s.code >%s/%s/%s.java", name.c_str(), path.c_str(), name.c_str(), path.c_str(), name.c_str(), main_class.c_str());
|
||||
|
||||
return run_compiler((path + "/" + name).c_str(),
|
||||
(main_path + "/run/runtime/jdk1.8.0_31/bin/javac").c_str(), (main_class + ".java").c_str(), NULL);
|
||||
(main_path + "/run/runtime/jdk1.8.0_latest/bin/javac").c_str(), (main_class + ".java").c_str(), NULL);
|
||||
}
|
||||
|
||||
RunCompilerResult compile(const char *name) {
|
||||
|
@ -208,10 +208,10 @@ void parse_args(int argc, char **argv) {
|
||||
string pre[3] = {"/usr/bin/python3.4", "-I", "-B"};
|
||||
run_program_config.argv.insert(run_program_config.argv.begin(), pre, pre + 3);
|
||||
} else if (run_program_config.type == "java7u76") {
|
||||
string pre[3] = {abspath(0, string(self_path) + "/../runtime/jdk1.7.0_76/bin/java"), "-Xmx1024m", "-Xss1024m"};
|
||||
string pre[3] = {abspath(0, string(self_path) + "/../runtime/jdk1.7.0_latest/bin/java"), "-Xmx1024m", "-Xss1024m"};
|
||||
run_program_config.argv.insert(run_program_config.argv.begin(), pre, pre + 3);
|
||||
} else if (run_program_config.type == "java8u31") {
|
||||
string pre[3] = {abspath(0, string(self_path) + "/../runtime/jdk1.8.0_31/bin/java"), "-Xmx1024m", "-Xss1024m"};
|
||||
string pre[3] = {abspath(0, string(self_path) + "/../runtime/jdk1.8.0_latest/bin/java"), "-Xmx1024m", "-Xss1024m"};
|
||||
run_program_config.argv.insert(run_program_config.argv.begin(), pre, pre + 3);
|
||||
}
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ void init_conf(const RunProgramConfig &config) {
|
||||
soft_ban_file_name_set.insert("/etc/nsswitch.conf");
|
||||
soft_ban_file_name_set.insert("/etc/passwd");
|
||||
|
||||
add_file_permission(abspath(0, string(self_path) + "/../runtime/jdk1.7.0_76") + "/", 'r');
|
||||
add_file_permission(abspath(0, string(self_path) + "/../runtime/jdk1.7.0_latest") + "/", 'r');
|
||||
readable_file_name_set.insert("/sys/devices/system/cpu/");
|
||||
readable_file_name_set.insert("/proc/");
|
||||
statable_file_name_set.insert("/usr/java/");
|
||||
@ -421,7 +421,7 @@ void init_conf(const RunProgramConfig &config) {
|
||||
soft_ban_file_name_set.insert("/etc/nsswitch.conf");
|
||||
soft_ban_file_name_set.insert("/etc/passwd");
|
||||
|
||||
add_file_permission(abspath(0, string(self_path) + "/../runtime/jdk1.8.0_31") + "/", 'r');
|
||||
add_file_permission(abspath(0, string(self_path) + "/../runtime/jdk1.8.0_latest") + "/", 'r');
|
||||
readable_file_name_set.insert("/sys/devices/system/cpu/");
|
||||
readable_file_name_set.insert("/proc/");
|
||||
statable_file_name_set.insert("/usr/java/");
|
||||
|
BIN
problem/1.zip
BIN
problem/1.zip
Binary file not shown.
BIN
problem/116.zip
BIN
problem/116.zip
Binary file not shown.
BIN
problem/225.zip
BIN
problem/225.zip
Binary file not shown.
BIN
problem/52.zip
BIN
problem/52.zip
Binary file not shown.
BIN
problem/79.zip
BIN
problem/79.zip
Binary file not shown.
BIN
problem/8.zip
BIN
problem/8.zip
Binary file not shown.
@ -4,8 +4,8 @@ php_value session.save_path /var/lib/php5/uoj
|
||||
php_value session.gc_maxlifetime 172800
|
||||
php_value session.cookie_lifetime 31536000
|
||||
|
||||
php_value post_max_size 10M
|
||||
php_value upload_max_filesize 10M
|
||||
php_value post_max_size 1000M
|
||||
php_value upload_max_filesize 1000M
|
||||
|
||||
php_value session.gc_probability 1
|
||||
php_value session.gc_divisor 1000
|
||||
|
@ -1,21 +1,29 @@
|
||||
<?php
|
||||
return [
|
||||
'profile' => [
|
||||
'oj-name' => 'Universal Online Judge',
|
||||
'oj-name-short' => 'UOJ',
|
||||
'administrator' => 'root',
|
||||
'admin-email' => 'admin@local_uoj.ac',
|
||||
'QQ-group' => '',
|
||||
'ICP-license' => ''
|
||||
],
|
||||
'database' => [
|
||||
'database' => 'app_uoj233',
|
||||
'database' => 'app_uoj233',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'password' => '_database_password_',
|
||||
'host' => '127.0.0.1'
|
||||
],
|
||||
'web' => [
|
||||
'domain' => null,
|
||||
'main' => [
|
||||
'protocol' => 'http',
|
||||
'host' => 'local_uoj.ac',
|
||||
'host' => '_httpHost_',
|
||||
'port' => 80
|
||||
],
|
||||
'blog' => [
|
||||
'protocol' => 'http',
|
||||
'host' => 'blog.local_uoj.ac',
|
||||
'host' => '_httpHost_',
|
||||
'port' => 80
|
||||
]
|
||||
],
|
||||
@ -29,9 +37,9 @@ return [
|
||||
],
|
||||
'mail' => [
|
||||
'noreply' => [
|
||||
'username' => 'noreply@none',
|
||||
'password' => 'noreply',
|
||||
'host' => 'smtp.sina.com',
|
||||
'username' => 'noreply@local_uoj.ac',
|
||||
'password' => '_mail_noreply_password_',
|
||||
'host' => 'smtp.local_uoj.ac',
|
||||
'secure' => '',
|
||||
'port' => 25
|
||||
]
|
||||
@ -39,17 +47,17 @@ return [
|
||||
'judger' => [
|
||||
'socket' => [
|
||||
'port' => '233',
|
||||
'password' => 'password233'
|
||||
'password' => '_judger_socket_password_'
|
||||
]
|
||||
],
|
||||
'svn' => [
|
||||
'our-root' => [
|
||||
'username' => 'our-root',
|
||||
'password' => 'our-root'
|
||||
'password' => '_svn_ourroot_password_'
|
||||
]
|
||||
],
|
||||
'switch' => [
|
||||
'ICP-license' => false,
|
||||
'web-analytics' => false
|
||||
'web-analytics' => false,
|
||||
'blog-use-subdomain' => false
|
||||
]
|
||||
];
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
$_SERVER['DOCUMENT_ROOT'] = dirname(__DIR__);
|
||||
|
||||
require $_SERVER['DOCUMENT_ROOT'] . '/app/uoj-lib.php';
|
||||
require $_SERVER['DOCUMENT_ROOT'] . '/app/libs/uoj-lib.php';
|
||||
|
||||
// TODO: more beautiful argv parser
|
||||
|
||||
|
@ -21,7 +21,10 @@ EOD;
|
||||
<?php echoUOJPageHeader(UOJLocale::get('blogs')) ?>
|
||||
<?php if (Auth::check()): ?>
|
||||
<div class="pull-right">
|
||||
<a href="<?= HTML::blog_url(Auth::id(), '/') ?>" class="btn btn-default btn-sm">我的博客首页</a>
|
||||
<div class="btn-group">
|
||||
<a href="<?= HTML::blog_url(Auth::id(), '/') ?>" class="btn btn-default btn-sm">我的博客首页</a>
|
||||
<a href="<?= HTML::blog_url(Auth::id(), '/blog/new/write')?>" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-edit"></span> 写新博客</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h3>博客总览</h3>
|
||||
|
@ -1,67 +1,189 @@
|
||||
<?php echoUOJPageHeader(UOJLocale::get('help')) ?>
|
||||
<?php
|
||||
requireLib('shjs');
|
||||
requireLib('mathjax');
|
||||
echoUOJPageHeader(UOJLocale::get('help'))
|
||||
?>
|
||||
<article>
|
||||
<header>
|
||||
<h2 class="page-header">常见问题及其解答</h2>
|
||||
<h2 class="page-header">常见问题及其解答(FAQ)</h2>
|
||||
</header>
|
||||
<section>
|
||||
<header>
|
||||
<h4>1. 什么是UOJ</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseOne">1. 什么是<?= UOJConfig::$data['profile']['oj-name-short'] ?></a></h4>
|
||||
</header>
|
||||
<p>见 <a href="http://uoj.ac/blog/4">http://uoj.ac/blog/4</a>。 </p>
|
||||
<div id="collapseOne" class="collapse">
|
||||
<p>来了?坐,欢迎来到 <?= UOJConfig::$data['profile']['oj-name'] ?>。</p>
|
||||
<p><img src="http://tb2.bdstatic.com/tb/editor/images/qpx_n/b37.gif?t=20140803" alt="小熊像超人一样飞" /></p>
|
||||
<p>众所周知,信息学的题目一般形式为:给出XXXXX,要你提交一份源代码,输出XXXXX,然后时限若干秒,内存若干兆,数据若干组,每组数据与答案进行比较,不对就不给分。</p>
|
||||
<p>看起来挺合理的,但是总是有意外。比如要求输出一个浮点数,与答案接近就满分。于是只好引入Special Judge来判断选手输出的正确性。</p>
|
||||
<p>但是还是有意外,比如提交两个程序,一个压缩另一个解压;比如提交答案题只用提交文件;比如给出音乐要求识别乐器,达到90%的正确率就算满分……</p>
|
||||
<p>这个时候UOJ出现了,于是<?= UOJConfig::$data['profile']['oj-name-short'] ?>就使用了这套系统。Universal的中文意思是通用,之所以称之为UOJ,因为我们所有题目从编译、运行到评分,都可以由出题人自定义。</p>
|
||||
<p>如果你正在为没有地方测奇奇怪怪的题目而苦恼,那么你来对地方了。</p>
|
||||
<p>当然了,<?= UOJConfig::$data['profile']['oj-name-short'] ?>对于传统题的评测也做了特别支持。平时做题时我很难容忍的地方就是数据出水了导致暴力得了好多分甚至过了,而出题人却委屈地说,总共才一百分,卡了这个暴力就不能卡另一个暴力,所以暴力过了就过了吧。</p>
|
||||
<p>所以我们引入了Extra Tests和Hack机制。每道传统题的数据都分为Tests和Extra Tests,Tests满分100分,如果你通过了所有的Tests,那么就会为你测Extra Tests。如果过了Tests但没过Extra Tests那么倒扣3分变为97分。Extra Tests的来源,一个是这道题没什么人可能会错的边界情况可以放在里面,另一个就是各位平时做题的时候,如果发现错误算法AC了,可以使用hack将其卡掉,<?= UOJConfig::$data['profile']['oj-name-short'] ?>会自动加入Extra Tests并重测。我们无法阻止暴力高分的脚步,但是不让他得满分还是有心里安慰作用的~</p>
|
||||
<p><?= UOJConfig::$data['profile']['oj-name-short'] ?>还有比赛功能可以承办比赛,赛制暂时只支持OI赛制。(不过你可以利用现有方案变相实现ACM赛制!)未来将支持更多种多样的赛制甚至自定义赛制。</p>
|
||||
<p>目前<?= UOJConfig::$data['profile']['oj-name-short'] ?>刚刚起步,还有很多地方有待完善。想出题、想出比赛、发现BUG、发现槽点都可以联系我们,联系方式见下。</p>
|
||||
<p>祝各位在<?= UOJConfig::$data['profile']['oj-name-short'] ?>玩得愉快!(求不虐萌萌哒服务器~求不虐萌萌哒测评机~!)</p>
|
||||
<p><img src="http://tb2.bdstatic.com/tb/editor/images/qpx_n/b54.gif?t=20140803" alt="小熊抱抱" /></p>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4>2. 注册后怎么上传头像</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseTwo">2. 注册后怎么上传头像</a></h4>
|
||||
</header>
|
||||
<p>UOJ不提供头像存储服务。每到一个网站都要上传一个头像挺烦的对不对?UOJ支持Gravatar,请使用Gravatar吧!Gravatar是一个全球的头像存储服务,你的头像将会与你的电子邮箱绑定。在各大网站比如各种Wordpress还有各种OJ比如Vijos、Contest Hunter上,只要你电子邮箱填对了,那么你的头像也就立即能显示了!</p>
|
||||
<p>快使用Gravatar吧! Gravatar地址:<a href="https://cn.gravatar.com/">https://cn.gravatar.com/</a>。进去后注册个帐号然后与邮箱绑定并上传头像,就ok啦!</p>
|
||||
<div id="collapseTwo" class="collapse">
|
||||
<p><?= UOJConfig::$data['profile']['oj-name-short'] ?>不提供头像存储服务。每到一个网站都要上传一个头像挺烦的对不对?我们支持Gravatar,请使用Gravatar吧!Gravatar是一个全球的头像存储服务,你的头像将会与你的电子邮箱绑定。在各大网站比如各种Wordpress还有各种OJ比如Vijos、Contest Hunter上,只要你电子邮箱填对了,那么你的头像也就立即能显示了!</p>
|
||||
<p>快使用Gravatar吧! Gravatar地址:<a href="https://cn.gravatar.com/">https://cn.gravatar.com/</a>。进去后注册个帐号然后与邮箱绑定并上传头像,就ok啦!</p>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4>3. UOJ的测评环境</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseThree">3. <?= UOJConfig::$data['profile']['oj-name-short'] ?>的测评环境?</a></h4>
|
||||
</header>
|
||||
<p>测评环境是Linux,Ubuntu 14.04,64位系统。</p>
|
||||
<p>C++的编译器是 g++ 4.8.4,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
||||
<p>C的编译器是 gcc 4.8.4,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
||||
<p>Pascal的编译器是 fpc 2.6.2,编译命令:<code>fpc code.pas -O2</code>。</p>
|
||||
<p>Java7的JDK版本是 jdk-7u76,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Java8的JDK版本是 jdk-8u31,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Python会先编译为优化过的字节码<samp>.pyo</samp>文件。支持的Python版本分别为Python 2.7和3.4。</p>
|
||||
<div id="collapseThree" class="collapse">
|
||||
<p>默认的测评环境是 Ubuntu Linux 14.04 LTS x64。</p>
|
||||
<p>C++的编译器是 g++ 4.8.4,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
||||
<p>C的编译器是 gcc 4.8.4,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
||||
<p>Pascal的编译器是 fpc 2.6.2,编译命令:<code>fpc code.pas -O2</code>。</p>
|
||||
<p>Java7的JDK版本是 jdk-7u76,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Java8的JDK版本是 jdk-8u31,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Python会先编译为优化过的字节码<samp>.pyo</samp>文件。支持的Python版本分别为Python 2.7和3.4。</p>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4>4. 递归 10<sup>7</sup> 层怎么没爆栈啊</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseFour">4. 各种评测状态的鸟语是什么意思?</a></h4>
|
||||
</header>
|
||||
<p>没错就是这样!除非是特殊情况,UOJ测评程序时的栈大小与该题的空间限制是相等的!</p>
|
||||
<div id="collapseFour" class="collapse">
|
||||
<ul>
|
||||
<li>Accepted: 答案正确。恭喜大佬,您通过了这道题。</li>
|
||||
<li>Wrong Answer: 答案错误。仅仅通过样例数据的测试并不一定是正确答案,一定还有你没想到的地方。</li>
|
||||
<li>Runtime Error: 运行时错误。像非法的内存访问,数组越界,指针漂移,调用禁用的系统函数都可能出现这类问题,请点击评测详情获得输出。</li>
|
||||
<li>Time Limit Exceeded: 时间超限。请检查程序是否有死循环,或者应该有更快的计算方法。</li>
|
||||
<li>Memory Limit Exceeded: 内存超限。数据可能需要压缩,或者您数组开太大了,请检查是否有内存泄露。</li>
|
||||
<li>Output Limit Exceeded: 输出超限。你的输出居然比正确答案长了两倍!</li>
|
||||
<li>Dangerous Syscalls: 危险系统调用,你是不是带了文件,或者使用了某些有意思的system函数?</li>
|
||||
<li>Judgement Failed: 评测失败。可能是评测机抽风了,也可能是服务器正在睡觉;反正不一定是你的锅啦!</li>
|
||||
<li>No Comment: 没有详情。评测机对您的程序无话可说,那么我们也不知道到底发生了什么...</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4>5. 博客使用指南</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseFive">5. 递归 10<sup>7</sup> 层怎么没爆栈啊</a></h4>
|
||||
</header>
|
||||
<p>见 <a href="http://uoj.ac/blog/7">http://uoj.ac/blog/7</a>。 </p>
|
||||
<div id="collapseFive" class="collapse">
|
||||
<p>没错就是这样!除非是特殊情况,<?= UOJConfig::$data['profile']['oj-name-short'] ?>测评程序时的栈大小与该题的空间限制是相等的!</p>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4>6. 交互式类型的题怎么本地测试</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseSix">6. 我在本地/某某OJ上AC了,但在<?= UOJConfig::$data['profile']['oj-name-short'] ?>却过不了...这咋办?</a></h4>
|
||||
</header>
|
||||
<p>唔……好问题。交互式的题一般给了一个头文件要你include进来,以及一个实现接口的源文件grader。好像大家对多个源文件一起编译还不太熟悉。</p>
|
||||
<p>对于C++:<code>g++ -o code grader.cpp code.cpp</code></p>
|
||||
<p>对于C语言:<code>gcc -o code grader.c code.c</code></p>
|
||||
<p>如果你是悲催的电脑盲,实在不会折腾没关系!你可以把grader的文件内容完整地粘贴到你的code的include语句之后,就可以了!</p>
|
||||
<p>什么你是萌萌哒Pascal选手?一般来说都会给个grader,你需要写一个Pascal单元。这个grader会使用你的单元。所以你只需要把源文件取名为单元名 + <code>.pas</code>,然后:</p>
|
||||
<p>对于Pascal语言:<code>fpc grader.pas</code></p>
|
||||
<p>就可以啦!</p>
|
||||
<div id="collapseSix" class="collapse">
|
||||
<p>对于这类问题,我们在这里简单列一下可能原因:</p>
|
||||
<ul>
|
||||
<li>Linux中换行符是'\n'而windows中是'\r\n'(多一个字符)。有些数据在Windows下生成,而<?= UOJConfig::$data['profile']['oj-name-short'] ?>评测环境为Linux系统。这种情况在字符串输入中非常常见。</li>
|
||||
<li>评测系统建立在Linux下,可能由于使用了Linux的保留字而出现CE,但在Windows下正常。</li>
|
||||
<li>Linux对内存的访问控制更为严格,因此在Windows上可能正常运行的无效指针或数组下标访问越界,在评测系统上无法运行。</li>
|
||||
<li>严重的内存泄露的问题很可能会引起系统的保护模块杀死你的进程。因此,凡是使用malloc(或calloc,realloc,new)分配而得的内存空间,请使用free(或delete)完全释放。</li>
|
||||
<li>当然数据可能真的有问题。但是如果不止一个人通过了这道题,那最好不要怀疑是数据的锅。反之,可以立即联系我们上报!</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4>7. 联系方式</h4>
|
||||
<h4><a data-toggle="collapse" href="#collapseSeven">7. 博客使用指南</a></h4>
|
||||
</header>
|
||||
<p>如果你想出题、想办比赛,或者发现了BUG,或者对网站有什么建议,可以通过下面的方式联系我们:</p>
|
||||
<ul>
|
||||
<li>UOJ私信联系vfleaking。</li>
|
||||
<li>邮件联系vfleaking@163.com。</li>
|
||||
<li>你也可以进QQ群水水,群号是197293072,Universal OJ用户群。</li>
|
||||
</ul>
|
||||
<div id="collapseSeven" class="collapse">
|
||||
<p><?= UOJConfig::$data['profile']['oj-name-short'] ?>博客使用的是Markdown。(好吧……好简陋的……好多功能还没写……)</p>
|
||||
<p>(喂喂喂我们是OJ好吗……要那么完善的博客功能干啥呢……?)</p>
|
||||
<p>其实我觉得Markdown不用教!一学就会!</p>
|
||||
<p>(完蛋了……<?= UOJConfig::$data['profile']['oj-name-short'] ?>好像没有Markdown的语法高亮……= =……)</p>
|
||||
<p>我就只介绍最基本的功能好了。其它的自己探索吧~比如<a href="http://wowubuntu.com/markdown/">这里</a>。</p>
|
||||
<!-- readmore -->
|
||||
<p><code>**强调**</code> = <strong>强调</strong></p>
|
||||
<hr /><p><code>*强调*</code> = <em>强调</em></p>
|
||||
<hr /><p><code>[<?= UOJConfig::$data['profile']['oj-name-short'] ?>](http://<?= UOJConfig::$data['web']['main']['host'] ?>)</code> = <a href="http://<?= UOJConfig::$data['web']['main']['host'] ?>"><?= UOJConfig::$data['profile']['oj-name-short'] ?></a></p>
|
||||
<hr /><p><code>http://<?= UOJConfig::$data['web']['main']['host'] ?></code> = <a href="http://<?= UOJConfig::$data['web']['main']['host'] ?>">http://<?= UOJConfig::$data['web']['main']['host'] ?></a></p>
|
||||
<hr /><p><code>![这个文字在图挂了的时候会显示](http://<?= UOJConfig::$data['web']['main']['host'] ?>/pictures/UOJ.ico)</code> =
|
||||
<img src="http://<?= UOJConfig::$data['web']['main']['host'] ?>/pictures/UOJ.ico" alt="这个文字在图挂了的时候会显示" /></p>
|
||||
<hr /><p><code>`rm orz`</code> = <code>rm orz</code></p>
|
||||
<hr /><p><code>数学公式萌萌哒$(a + b)^2$萌萌哒</code> = 数学公式萌萌哒$(a + b)^2$萌萌哒</p>
|
||||
<hr /><p><code><!-- readmore --></code> = 在外面看这篇博客时会到此为止然后显示一个“阅读更多”字样</p>
|
||||
<hr /><p>来个更大的例子:</p>
|
||||
<pre>
|
||||
```c++
|
||||
#include <iostream>
|
||||
```
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
```
|
||||
|
||||
```pascal
|
||||
begin
|
||||
```
|
||||
|
||||
```python
|
||||
print '<?= UOJConfig::$data['profile']['oj-name-short'] ?>'
|
||||
```
|
||||
|
||||
\begin{equation}
|
||||
\frac{-b + \sqrt{b^2 - 4ac}}{2a}
|
||||
\end{equation}
|
||||
|
||||
#一级标题
|
||||
##二级标题
|
||||
###三级标题
|
||||
####四级标题
|
||||
</pre>
|
||||
<p>会转换为:</p>
|
||||
<pre><code class="sh_cpp">#include <iostream></code></pre>
|
||||
<pre><code class="sh_c">#include <stdio.h></code></pre>
|
||||
<pre><code class="sh_pascal">begin</code></pre>
|
||||
<pre><code class="sh_python">print '<?= UOJConfig::$data['profile']['oj-name-short'] ?>'</code></pre>
|
||||
<p>\begin{equation}
|
||||
\frac{-b + \sqrt{b^2 - 4ac}}{2a}
|
||||
\end{equation}</p>
|
||||
<h1>一级标题</h1>
|
||||
<h2>二级标题</h2>
|
||||
<h3>三级标题</h3>
|
||||
<h4>四级标题</h4>
|
||||
<hr /><p>还有一个很重要的事情,就是你很容易以为<?= UOJConfig::$data['profile']['oj-name-short'] ?>在吃换行……</p>
|
||||
<p>那是因为跟LaTeX一样,你需要一个空行来分段。你可以粗略地认为两个换行会被替换成一换行。(当然不完全是这样,空行是用来分段的,段落还有间距啊行首空两格啊之类的属性)</p>
|
||||
<p>唔……就介绍到这里吧。想要更详细的介绍上网搜搜吧~</p>
|
||||
<p>(评论区是不可以用任何HTML滴~但是数学公式还是没问题滴)</p>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4><a data-toggle="collapse" href="#collapseEight">8. 交互式类型的题怎么本地测试</a></h4>
|
||||
</header>
|
||||
<div id="collapseEight" class="collapse">
|
||||
<p>唔……好问题。交互式的题一般给了一个头文件要你include进来,以及一个实现接口的源文件grader。好像大家对多个源文件一起编译还不太熟悉。</p>
|
||||
<p>对于C++:<code>g++ -o code grader.cpp code.cpp</code></p>
|
||||
<p>对于C语言:<code>gcc -o code grader.c code.c</code></p>
|
||||
<p>如果你是悲催的电脑盲,实在不会折腾没关系!你可以把grader的文件内容完整地粘贴到你的code的include语句之后,就可以了!</p>
|
||||
<p>什么你是萌萌哒Pascal选手?一般来说都会给个grader,你需要写一个Pascal单元。这个grader会使用你的单元。所以你只需要把源文件取名为单元名 + <code>.pas</code>,然后:</p>
|
||||
<p>对于Pascal语言:<code>fpc grader.pas</code></p>
|
||||
<p>就可以啦!</p>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<header>
|
||||
<h4><a data-toggle="collapse" href="#collapseNine">9. 联系方式</a></h4>
|
||||
</header>
|
||||
<div id="collapseNine" class="collapse">
|
||||
<p>如果你想出题、想办比赛、发现了BUG或者对网站有什么建议,可以通过下面的方式联系我们:</p>
|
||||
<ul>
|
||||
<li>私信联系<?= UOJConfig::$data['profile']['administrator'] ?>。</li>
|
||||
<li>邮件联系<?= UOJConfig::$data['profile']['admin-email'] ?>。</li>
|
||||
<?php if (UOJConfig::$data['profile']['QQ-group']!=''): ?>
|
||||
<li>你也可以进QQ群水水,群号是<?= UOJConfig::$data['profile']['QQ-group'] ?>。</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
|
@ -19,15 +19,17 @@
|
||||
$user = $vdata['user'];
|
||||
$password = $user["password"];
|
||||
|
||||
$oj_name = UOJConfig::$data['profile']['oj-name'];
|
||||
$oj_name_short = UOJConfig::$data['profile']['oj-name-short'];
|
||||
$sufs = base64url_encode($user['username'] . "." . md5($user['username'] . "+" . $password));
|
||||
$url = HTML::url("/reset-password", array('params' => array('p' => $sufs)));
|
||||
$html = <<<EOD
|
||||
<base target="_blank" />
|
||||
|
||||
<p>{$user['username']}您好,</p>
|
||||
<p>您刚刚启用了UOJ密码找回功能,请进入下面的链接重设您的密码:</p>
|
||||
<p>您刚刚启用了{$oj_name_short}密码找回功能,请进入下面的链接重设您的密码:</p>
|
||||
<p><a href="$url">$url</a></p>
|
||||
<p>Universal Online Judge</p>
|
||||
<p>{$oj_name}</p>
|
||||
|
||||
<style type="text/css">
|
||||
body{font-size:14px;font-family:arial,verdana,sans-serif;line-height:1.666;padding:0;margin:0;overflow:auto;white-space:normal;word-wrap:break-word;min-height:100px}
|
||||
@ -37,7 +39,7 @@ EOD;
|
||||
|
||||
$mailer = UOJMail::noreply();
|
||||
$mailer->addAddress($user['email'], $user['username']);
|
||||
$mailer->Subject = "UOJ密码找回";
|
||||
$mailer->Subject = $oj_name_short."密码找回";
|
||||
$mailer->msgHTML($html);
|
||||
if (!$mailer->send()) {
|
||||
error_log($mailer->ErrorInfo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$blogs = DB::selectAll("select blogs.id, title, poster, post_time from important_blogs, blogs where is_hidden = 0 and important_blogs.blog_id = blogs.id order by level desc, important_blogs.blog_id desc limit 5");
|
||||
?>
|
||||
<?php echoUOJPageHeader('UOJ') ?>
|
||||
<?php echoUOJPageHeader(UOJConfig::$data['profile']['oj-name-short']) ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
|
@ -95,10 +95,10 @@ function submitLoginPost() {
|
||||
window.location.href = prevUrl;
|
||||
} else if (msg == 'banned') {
|
||||
$('#div-username').addClass('has-error');
|
||||
$('#help-username').html('用户已被禁用。');
|
||||
$('#help-username').html('该用户已被封停,请联系管理员。');
|
||||
} else if (msg == 'expired') {
|
||||
$('#div-username').addClass('has-error');
|
||||
$('#help-username').html('页面已过期。');
|
||||
$('#help-username').html('页面会话已过期。');
|
||||
} else {
|
||||
$('#div-username').addClass('has-error');
|
||||
$('#help-username').html('用户名或密码错误。');
|
||||
|
@ -10,6 +10,7 @@
|
||||
become403Page();
|
||||
}
|
||||
|
||||
$oj_name = UOJConfig::$data['profile']['oj-name'];
|
||||
$problem_extra_config = getProblemExtraConfig($problem);
|
||||
|
||||
if (isset($_POST['getsvn'])) {
|
||||
@ -18,8 +19,8 @@
|
||||
<base target="_blank" />
|
||||
|
||||
<p>{$myUser['username']}您好,</p>
|
||||
<p>您的svn密码是:{$myUser['svn_password']}</p>
|
||||
<p>Universal Online Judge</p>
|
||||
<p>您的SVN密码是:{$myUser['svn_password']}</p>
|
||||
<p>{$oj_name}</p>
|
||||
|
||||
<style type="text/css">
|
||||
body{font-size:14px;font-family:arial,verdana,sans-serif;line-height:1.666;padding:0;margin:0;overflow:auto;white-space:normal;word-wrap:break-word;min-height:100px}
|
||||
@ -29,7 +30,7 @@ EOD;
|
||||
|
||||
$mailer = UOJMail::noreply();
|
||||
$mailer->addAddress($myUser['email'], $myUser['username']);
|
||||
$mailer->Subject = "svn密码";
|
||||
$mailer->Subject = "SVN密码";
|
||||
$mailer->msgHTML($html);
|
||||
if ($mailer->send()) {
|
||||
echo 'good';
|
||||
@ -41,7 +42,7 @@ EOD;
|
||||
$data_dir = "/var/uoj_data/${problem['id']}";
|
||||
|
||||
function echoFileNotFound($file_name) {
|
||||
echo '<h4>', htmlspecialchars($file_name), '<sub class="text-danger"> ', 'file not found', '</sub></h4>';
|
||||
echo '<h4>', htmlspecialchars($file_name), '<sub class="text-danger"> ', '文件未找到', '</sub></h4>';
|
||||
}
|
||||
function echoFilePre($file_name) {
|
||||
global $data_dir;
|
||||
@ -67,22 +68,111 @@ EOD;
|
||||
echo "\n</pre>";
|
||||
}
|
||||
|
||||
|
||||
//上传数据
|
||||
if($_POST['problem_data_file_submit']=='submit'){
|
||||
if ($_FILES["problem_data_file"]["error"] > 0){
|
||||
$errmsg = "Error: ".$_FILES["problem_data_file"]["error"];
|
||||
becomeMsgPage('<div>' . $errmsg . '</div><a href="/problem/'.$problem['id'].'/manage/data">返回</a>');
|
||||
}
|
||||
else{
|
||||
//if($_FILES["problem_data_file"]["type"]=='application/zip'){
|
||||
$up_filename="/tmp/".rand(0,100000000)."data.zip";
|
||||
move_uploaded_file($_FILES["problem_data_file"]["tmp_name"], $up_filename);
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open($up_filename) === TRUE){
|
||||
$zip->extractTo("/var/svn/problem/{$problem['id']}/cur/{$problem['id']}/1");
|
||||
$zip->close();
|
||||
svnCommitZipData($problem['id'], 'data');
|
||||
echo "<script>alert('上传成功!')</script>";
|
||||
}else{
|
||||
$errmsg = "解压失败!";
|
||||
becomeMsgPage('<div>' . $errmsg . '</div><a href="/problem/'.$problem['id'].'/manage/data">返回</a>');
|
||||
}
|
||||
unlink($up_filename);
|
||||
//}else{
|
||||
//$errmsg = "请上传zip文件!";
|
||||
//becomeMsgPage('<div>' . $errmsg . '</div><a href="/problem/'.$problem['id'].'/manage/data">返回</a>');
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
//添加配置文件
|
||||
if($_POST['problem_settings_file_submit']=='submit'){
|
||||
if($_POST['use_builtin_checker'] and $_POST['n_tests'] and $_POST['input_pre'] and $_POST['input_suf'] and $_POST['output_pre'] and $_POST['output_suf'] and $_POST['time_limit'] and $_POST['memory_limit']){
|
||||
if(!is_dir("/var/svn/problem/{$problem['id']}/cur/{$problem['id']}/1/")){
|
||||
mkdir("/var/svn/problem/{$problem['id']}/cur/{$problem['id']}/1/");
|
||||
}
|
||||
$set_filename="/var/svn/problem/{$problem['id']}/cur/{$problem['id']}/1/problem.conf";
|
||||
$has_legacy=false;
|
||||
if(file_exists($set_filename)){
|
||||
$has_legacy=true;
|
||||
unlink($set_filename);
|
||||
}
|
||||
$setfile = fopen($set_filename, "w");
|
||||
fwrite($setfile, "use_builtin_judger on\n");
|
||||
if($_POST['use_builtin_checker'] != 'ownchk'){
|
||||
fwrite($setfile, "use_builtin_checker ".$_POST['use_builtin_checker']."\n");
|
||||
}
|
||||
fwrite($setfile, "n_tests ".$_POST['n_tests']."\n");
|
||||
if($_POST['n_ex_tests']){
|
||||
fwrite($setfile, "n_ex_tests ".$_POST['n_ex_tests']."\n");
|
||||
}else{
|
||||
fwrite($setfile, "n_ex_tests 0\n");
|
||||
}
|
||||
if($_POST['n_sample_tests']){
|
||||
fwrite($setfile, "n_sample_tests ".$_POST['n_sample_tests']."\n");
|
||||
}else{
|
||||
fwrite($setfile, "n_sample_tests 0\n");
|
||||
}
|
||||
fwrite($setfile, "input_pre ".$_POST['input_pre']."\n");
|
||||
fwrite($setfile, "input_suf ".$_POST['input_suf']."\n");
|
||||
fwrite($setfile, "output_pre ".$_POST['output_pre']."\n");
|
||||
fwrite($setfile, "output_suf ".$_POST['output_suf']."\n");
|
||||
fwrite($setfile, "time_limit ".$_POST['time_limit']."\n");
|
||||
fwrite($setfile, "memory_limit ".$_POST['memory_limit']."\n");
|
||||
fclose($setfile);
|
||||
svnCommitZipData($problem['id'], 'conf');
|
||||
if(!$has_legacy){
|
||||
echo "<script>alert('添加成功!')</script>";
|
||||
}else{
|
||||
echo "<script>alert('替换成功!')</script>";
|
||||
}
|
||||
}else{
|
||||
$errmsg = "添加配置文件失败,请检查是否所有输入框都已填写!";
|
||||
becomeMsgPage('<div>' . $errmsg . '</div><a href="/problem/'.$problem['id'].'/manage/data">返回</a>');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$info_form = new UOJForm('info');
|
||||
$http_host = HTML::escape(UOJContext::httpHost());
|
||||
$download_url = HTML::escape(HTML::url("/download.php?type=problem&id={$problem['id']}"));
|
||||
//$download_url = HTML::escape(HTML::url("/download.php?type=problem&id={$problem['id']}"));
|
||||
$download_url = HTML::url("/download.php?type=problem&id={$problem['id']}");
|
||||
$info_form->appendHTML(<<<EOD
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">SVN地址</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="form-control-static">
|
||||
<button id="button-getsvn" type="button" class="btn btn-info btn-xs pull-right">把我的svn密码发到我的邮箱</button>
|
||||
<button id="button-getsvn" type="button" class="btn btn-info btn-xs pull-right">查看/发送SVN密码</button>
|
||||
<a>svn://{$http_host}/problem/{$problem['id']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<!--<label class="col-sm-3 control-label">zip上传数据</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="form-control-static">
|
||||
<row>
|
||||
<button type="button" style="width:30%" class="btn btn-primary" data-toggle="modal" data-target="#UploadDataModal">上传数据</button>
|
||||
<button type="submit" style="width:30%" id="button-submit-data" name="submit-data" value="data" class="btn btn-danger">与SVN仓库同步</button>
|
||||
</row>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#button-getsvn').click(function(){
|
||||
if (!confirm("确定要发送你的svn密码到${myUser['email']}吗")) {
|
||||
if (!confirm("您的SVN密码是:{$myUser['svn_password']}。是否要发送SVN密码到${myUser['email']}?")) {
|
||||
return;
|
||||
}
|
||||
$.post('${_SERVER['REQUEST_URI']}', {
|
||||
@ -91,7 +181,7 @@ $('#button-getsvn').click(function(){
|
||||
if (res == "good") {
|
||||
BootstrapDialog.show({
|
||||
title : "操作成功",
|
||||
message : "svn密码已经发送至您的邮箱,请查收。",
|
||||
message : "SVN密码已经发送至您的邮箱,请查收。",
|
||||
type : BootstrapDialog.TYPE_SUCCESS,
|
||||
buttons: [{
|
||||
label: '好的',
|
||||
@ -429,6 +519,7 @@ EOD
|
||||
$hackable_form->handle = function() {
|
||||
global $problem;
|
||||
$problem['hackable'] = !$problem['hackable'];
|
||||
//$problem['hackable'] = 0;
|
||||
$ret = svnSyncProblemData($problem);
|
||||
if ($ret) {
|
||||
becomeMsgPage('<div>' . $ret . '</div><a href="/problem/'.$problem['id'].'/manage/data">返回</a>');
|
||||
@ -450,7 +541,7 @@ EOD
|
||||
}
|
||||
};
|
||||
$data_form->submit_button_config['class_str'] = 'btn btn-danger btn-block';
|
||||
$data_form->submit_button_config['text'] = '与svn仓库同步';
|
||||
$data_form->submit_button_config['text'] = '与SVN仓库同步';
|
||||
$data_form->submit_button_config['smart_confirm'] = '';
|
||||
|
||||
$clear_data_form = new UOJForm('clear_data');
|
||||
@ -518,7 +609,7 @@ EOD
|
||||
|
||||
$user_std = queryUser('std');
|
||||
if (!$user_std) {
|
||||
becomeMsgPage('Please create an user named "std"');
|
||||
becomeMsgPage('请建立"std"账号。');
|
||||
}
|
||||
|
||||
$requirement = json_decode($problem['submission_requirement'], true);
|
||||
@ -597,7 +688,7 @@ EOD
|
||||
<script type="text/javascript">
|
||||
curFileName = '';
|
||||
$('#div-file_list a').click(function(e) {
|
||||
$('#div-file_content').html('<h3>loading...</h3>');
|
||||
$('#div-file_content').html('<h3>Loading...</h3>');
|
||||
$(this).tab('show');
|
||||
|
||||
var fileName = $(this).text();
|
||||
@ -648,6 +739,125 @@ EOD
|
||||
<div class="top-buffer-md">
|
||||
<?php $rejudge_form->printHTML(); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="top-buffer-md">
|
||||
<button type="button" class="btn btn-block btn-primary" data-toggle="modal" data-target="#UploadDataModal">上传数据</button>
|
||||
</div>
|
||||
<div class="top-buffer-md">
|
||||
<button type="button" class="btn btn-block btn-primary" data-toggle="modal" data-target="#ProblemSettingsFileModal">试题配置</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="UploadDataModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">上传数据</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="" method="post" enctype="multipart/form-data" role="form">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputFile">文件</label>
|
||||
<input type="file" name="problem_data_file" id="problem_data_file">
|
||||
<p class="help-block">请上传.zip文件</p>
|
||||
</div>
|
||||
<input type="hidden" name="problem_data_file_submit" value="submit">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success">上传</button>
|
||||
</form>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ProblemSettingsFileModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">试题配置</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" action="" method="post" role="form">
|
||||
<div class="form-group">
|
||||
<label for="use_builtin_checker" class="col-sm-5 control-label">比对函数</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" id="use_builtin_checker" name="use_builtin_checker">
|
||||
<option value="ncmp">单行整数序列</option>
|
||||
<option value="wcmp">单行字符串序列</option>
|
||||
<option value="fcmp">多行数据(不忽略行末空格,但忽略文末回车)</option>
|
||||
<option value="ownchk">自定义校验器</option>
|
||||
</select>
|
||||
<!--<input type="hidden" class="form-control" id="use_builtin_checker" name="use_builtin_checker" placeholder="比对函数">-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="n_tests" class="col-sm-5 control-label">n_tests</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="n_tests" name="n_tests" placeholder="数据点个数">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="n_ex_tests" class="col-sm-5 control-label">n_ex_tests</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="n_ex_tests" name="n_ex_tests" placeholder="额外数据点个数">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="n_sample_tests" class="col-sm-5 control-label">n_sample_tests</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="n_sample_tests" name="n_sample_tests" placeholder="样例测试点个数">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="input_pre" class="col-sm-5 control-label">input_pre</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="input_pre" name="input_pre" placeholder="输入文件名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="input_suf" class="col-sm-5 control-label">input_suf</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="input_suf" name="input_suf" placeholder="输入文件后缀">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="output_pre" class="col-sm-5 control-label">output_pre</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="output_pre" name="output_pre" placeholder="输出文件名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="output_suf" class="col-sm-5 control-label">output_suf</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="output_suf" name="output_suf" placeholder="输出文件后缀">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="time_limit" class="col-sm-5 control-label">time_limit</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="time_limit" name="time_limit" placeholder="时间限制(不能为小数!)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="memory_limit" class="col-sm-5 control-label">memory_limit</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" class="form-control" id="memory_limit" name="memory_limit" placeholder="内存限制">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="problem_settings_file_submit" value="submit">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success">确定</button>
|
||||
</form>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -67,6 +67,9 @@ EOD;
|
||||
if ($search_tag) {
|
||||
$cond[] = "'".DB::escape($search_tag)."' in (select tag from problems_tags where problems_tags.problem_id = problems.id)";
|
||||
}
|
||||
if (isset($_GET["search"])) {
|
||||
$cond[]="title like '%".DB::escape($_GET["search"])."%' or id like '%".DB::escape($_GET["search"])."%'";
|
||||
}
|
||||
|
||||
if ($cond) {
|
||||
$cond = join($cond, ' and ');
|
||||
@ -131,12 +134,26 @@ EOD;
|
||||
<div class="col-sm-4">
|
||||
<?= HTML::tablist($tabs_info, $cur_tab, 'nav-pills') ?>
|
||||
</div>
|
||||
<div class="col-sm-4 col-sm-push-4 checkbox text-right">
|
||||
<label class="checkbox-inline" for="input-show_tags_mode"><input type="checkbox" id="input-show_tags_mode" <?= isset($_COOKIE['show_tags_mode']) ? 'checked="checked" ': ''?>/> <?= UOJLocale::get('problems::show tags') ?></label>
|
||||
<label class="checkbox-inline" for="input-show_submit_mode"><input type="checkbox" id="input-show_submit_mode" <?= isset($_COOKIE['show_submit_mode']) ? 'checked="checked" ': ''?>/> <?= UOJLocale::get('problems::show statistics') ?></label>
|
||||
<div class="col-sm-4">
|
||||
<form id="form-search" class="input-group form-group" method="get">
|
||||
<input type="text" class="form-control" name="search" placeholder="<?= UOJLocale::get('search')?>" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-search btn-primary" id="submit-search"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-4 col-sm-pull-4">
|
||||
<?php echo $pag->pagination(); ?>
|
||||
<div class="col-sm-4 checkbox text-right">
|
||||
<label class="checkbox-inline" for="input-show_tags_mode">
|
||||
<input type="checkbox" id="input-show_tags_mode" <?= isset($_COOKIE['show_tags_mode']) ? 'checked="checked" ': ''?>/> <?= UOJLocale::get('problems::show tags') ?>
|
||||
</label>
|
||||
<label class="checkbox-inline" for="input-show_submit_mode">
|
||||
<input type="checkbox" id="input-show_submit_mode" <?= isset($_COOKIE['show_submit_mode']) ? 'checked="checked" ': ''?>/> <?= UOJLocale::get('problems::show statistics') ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-10 col-xs-push-1 col-sm-6 col-sm-push-3 input-group">
|
||||
<?php echo $pag->pagination(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-buffer-sm"></div>
|
||||
@ -168,6 +185,10 @@ $('#input-show_submit_mode').click(function() {
|
||||
|
||||
foreach ($pag->get() as $idx => $row) {
|
||||
echoProblem($row);
|
||||
echo "\n";
|
||||
}
|
||||
if ($pag->isEmpty()) {
|
||||
echo '<tr><td class="text-center" colspan="233">'.UOJLocale::get('none').'</td></tr>';
|
||||
}
|
||||
|
||||
echo '</tbody>';
|
||||
|
@ -34,8 +34,8 @@
|
||||
<div class="col-md-3">
|
||||
<?php if (UOJContext::hasBlogPermission()): ?>
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a href="/blog/new/write" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> 写新博客</a>
|
||||
<a href="/slide/new/write" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> 写新幻灯片</a>
|
||||
<a href="<?=HTML::blog_url(UOJContext::userid(), '/blog/new/write')?>" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> 写新博客</a>
|
||||
<a href="<?=HTML::blog_url(UOJContext::userid(), '/slide/new/write')?>" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> 写新幻灯片</a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="panel panel-info top-buffer-sm">
|
||||
|
@ -1,21 +1,33 @@
|
||||
<?php
|
||||
|
||||
Route::pattern('blog_username', '[a-zA-Z0-9_\-]{1,20}');
|
||||
call_user_func(function() { // to prevent variable scope leak
|
||||
|
||||
Route::group([
|
||||
'domain' => '{blog_username}.'.UOJConfig::$data['web']['blog']['host'],
|
||||
'onload' => function() {
|
||||
UOJContext::setupBlog();
|
||||
}
|
||||
], function() {
|
||||
Route::any('/', '/subdomain/blog/index.php');
|
||||
Route::any('/archive', '/subdomain/blog/archive.php');
|
||||
Route::any('/aboutme', '/subdomain/blog/aboutme.php');
|
||||
Route::any('/click-zan', '/click_zan.php');
|
||||
Route::any('/blog/{id}', '/subdomain/blog/blog.php');
|
||||
Route::any('/slide/{id}', '/subdomain/blog/slide.php');
|
||||
Route::any('/blog/(?:{id}|new)/write', '/subdomain/blog/blog_write.php');
|
||||
Route::any('/slide/(?:{id}|new)/write', '/subdomain/blog/slide_write.php');
|
||||
Route::any('/blog/{id}/delete', '/subdomain/blog/blog_delete.php');
|
||||
Route::pattern('blog_username', '[a-zA-Z0-9_\-]{1,20}');
|
||||
|
||||
if (UOJConfig::$data['switch']['blog-use-subdomain']) {
|
||||
$domain = '{blog_username}.'.UOJConfig::$data['web']['blog']['host'];
|
||||
$prefix = '';
|
||||
} else {
|
||||
$domain = UOJConfig::$data['web']['blog']['host'];
|
||||
$prefix = '/blogof/{blog_username}';
|
||||
}
|
||||
);
|
||||
|
||||
Route::group([
|
||||
'domain' => $domain,
|
||||
'onload' => function() {
|
||||
UOJContext::setupBlog();
|
||||
}
|
||||
], function() use ($prefix) {
|
||||
Route::any("$prefix/", '/subdomain/blog/index.php');
|
||||
Route::any("$prefix/archive", '/subdomain/blog/archive.php');
|
||||
Route::any("$prefix/aboutme", '/subdomain/blog/aboutme.php');
|
||||
Route::any("$prefix/click-zan", '/click_zan.php');
|
||||
Route::any("$prefix/blog/{id}", '/subdomain/blog/blog.php');
|
||||
Route::any("$prefix/slide/{id}", '/subdomain/blog/slide.php');
|
||||
Route::any("$prefix/blog/(?:{id}|new)/write", '/subdomain/blog/blog_write.php');
|
||||
Route::any("$prefix/slide/(?:{id}|new)/write", '/subdomain/blog/slide_write.php');
|
||||
Route::any("$prefix/blog/{id}/delete", '/subdomain/blog/blog_delete.php');
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
@ -20,9 +20,9 @@
|
||||
null
|
||||
);
|
||||
$options = array(
|
||||
'ban' => '封禁',
|
||||
'deblocking' => '解封',
|
||||
'login' => '登录'
|
||||
'banneduser' => '设为封禁用户',
|
||||
'normaluser' => '设为普通用户',
|
||||
'superuser' => '设为超级用户'
|
||||
);
|
||||
$user_form->addSelect('op-type', $options, '操作类型', '');
|
||||
$user_form->handle = function() {
|
||||
@ -30,15 +30,14 @@
|
||||
|
||||
$username = $_POST['username'];
|
||||
switch ($_POST['op-type']) {
|
||||
case 'ban':
|
||||
case 'banneduser':
|
||||
DB::update("update user_info set usergroup = 'B' where username = '{$username}'");
|
||||
break;
|
||||
case 'deblocking':
|
||||
case 'normaluser':
|
||||
DB::update("update user_info set usergroup = 'U' where username = '{$username}'");
|
||||
break;
|
||||
case 'login':
|
||||
Auth::login($username);
|
||||
$user_form->succ_href = "/";
|
||||
case 'superuser':
|
||||
DB::update("update user_info set usergroup = 'S' where username = '{$username}'");
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
$REQUIRE_LIB[$name] = '';
|
||||
}
|
||||
function requirePHPLib($name) { // uoj php lib
|
||||
require $_SERVER['DOCUMENT_ROOT'].'/app/uoj-'.$name.'-lib.php';
|
||||
require $_SERVER['DOCUMENT_ROOT'].'/app/libs/uoj-'.$name.'-lib.php';
|
||||
}
|
||||
|
||||
requirePHPLib('validate');
|
@ -362,4 +362,34 @@ EOD
|
||||
error_log('hack successfully but sync failed.');
|
||||
}
|
||||
}
|
||||
|
||||
function svnCommitZipData($problem, $type) {
|
||||
$id = $problem['id'];
|
||||
$cur_dir = "/var/svn/problem/$id/cur/$id";
|
||||
$svnusr = UOJConfig::$data['svn']['our-root']['username'];
|
||||
$svnpwd = UOJConfig::$data['svn']['our-root']['password'];
|
||||
|
||||
if($type=='conf'){
|
||||
exec(
|
||||
<<<EOD
|
||||
cd $cur_dir
|
||||
svn add 1/problem.conf --username $svnusr --password $svnpwd
|
||||
svn commit -m "update problem.conf by online conf editor." --username $svnusr --password $svnpwd
|
||||
EOD
|
||||
);
|
||||
}
|
||||
else if($type=='data'){
|
||||
exec(
|
||||
<<<EOD
|
||||
cd $cur_dir
|
||||
svn add * --username $svnusr --password $svnpwd
|
||||
svn commit -m "add testdata from zip file online." --username $svnusr --password $svnpwd
|
||||
EOD
|
||||
);
|
||||
}
|
||||
else{
|
||||
error_log("svnCommitZipData: invalid argument");
|
||||
return "invalid argument";
|
||||
}
|
||||
}
|
||||
?>
|
@ -43,10 +43,11 @@ class HTML {
|
||||
}
|
||||
|
||||
public static function blog_url($username, $uri) {
|
||||
$url = UOJConfig::$data['web']['blog']['protocol'].'://'.blog_name_encode($username).'.'.UOJConfig::$data['web']['blog']['host'];
|
||||
if (UOJConfig::$data['web']['blog']['port'] != 80) {
|
||||
$url .= ':'.UOJConfig::$data['web']['blog']['port'];
|
||||
}
|
||||
$port = UOJConfig::$data['web']['blog']['port'] == 80 ? '' : (':'.UOJConfig::$data['web']['blog']['port']);
|
||||
if (UOJConfig::$data['switch']['blog-use-subdomain'])
|
||||
$url = UOJConfig::$data['web']['blog']['protocol'].'://'.blog_name_encode($username).'.'.UOJConfig::$data['web']['blog']['host'].$port;
|
||||
else
|
||||
$url = UOJConfig::$data['web']['blog']['protocol'].'://'.UOJConfig::$data['web']['blog']['host'].$port.'/blogof/'.blog_name_encode($username);
|
||||
$url .= $uri;
|
||||
$url = rtrim($url, '/');
|
||||
return HTML::escape($url);
|
||||
|
@ -56,7 +56,7 @@ class Route {
|
||||
|
||||
$cur = array();
|
||||
$cur['methods'] = $methods;
|
||||
$cur['uri'] = $uri;
|
||||
$cur['uri'] = rtrim($uri, '/');
|
||||
$cur['action'] = $action;
|
||||
$cur = array_merge(self::getGroup(), $cur);
|
||||
self::$routes[] = $cur;
|
||||
@ -84,7 +84,7 @@ class Route {
|
||||
}
|
||||
|
||||
$uri_pat = strtr($route['uri'], $rep_arr);
|
||||
if (!preg_match('/^'.$uri_pat.'$/', UOJContext::requestPath(), $uri_matches)) {
|
||||
if (!preg_match('/^'.$uri_pat.'$/', rtrim(UOJContext::requestPath(), '/'), $uri_matches)) {
|
||||
return false;
|
||||
}
|
||||
$matches = array_merge($matches, $uri_matches);
|
||||
|
@ -7,14 +7,17 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"><?= UOJContext::userid() ?></a>
|
||||
<a class="navbar-brand" href="<?= HTML::blog_url(UOJContext::userid(), '/')?>"><?= UOJContext::userid() ?></a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/archive">日志</a></li>
|
||||
<li><a href="/aboutme">关于我</a></li>
|
||||
<li><a href="<?= HTML::url('/') ?>">UOJ</a></li>
|
||||
<li><a href="<?= HTML::blog_url(UOJContext::userid(), '/archive')?>">日志</a></li>
|
||||
<li><a href="<?= HTML::blog_url(UOJContext::userid(), '/aboutme')?>">关于我</a></li>
|
||||
<li><a href="<?= HTML::url('/') ?>"><?= UOJConfig::$data['profile']['oj-name-short'] ?></a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var uojBlogUrl = '<?= HTML::blog_url(UOJContext::userid(), '')?>';
|
||||
</script>
|
@ -2,7 +2,7 @@
|
||||
if ($is_preview) {
|
||||
$readmore_pos = strpos($blog['content'], '<!-- readmore -->');
|
||||
if ($readmore_pos !== false) {
|
||||
$content = substr($blog['content'], 0, $readmore_pos).'<p><a href="/blog/'.$blog['id'].'">阅读更多……</a></p>';
|
||||
$content = substr($blog['content'], 0, $readmore_pos).'<p><a href="'.HTML::blog_url(UOJContext::userid(), '/blog/').$blog['id'].'">阅读更多……</a></p>';
|
||||
} else {
|
||||
$content = $blog['content'];
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
$blog_type = $blog['type'] == 'B' ? 'blog' : 'slide';
|
||||
?>
|
||||
<h2><?= $extra_text ?><a class="header-a" href="/blog/<?= $blog['id'] ?>"><?= $blog['title'] ?></a></h2>
|
||||
<h2><?= $extra_text ?><a class="header-a" href="<?= HTML::blog_url(UOJContext::userid(), '/blog/'.$blog['id']) ?>"><?= $blog['title'] ?></a></h2>
|
||||
<div><?= $blog['post_time'] ?> <strong>By</strong> <?= getUserLink($blog['poster']) ?></div>
|
||||
<?php if (!$show_title_only): ?>
|
||||
<div class="panel panel-default">
|
||||
@ -24,10 +24,10 @@
|
||||
<?php elseif ($blog_type == 'slide'): ?>
|
||||
<article>
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" src="/slide/<?= $blog['id'] ?>"></iframe>
|
||||
<iframe class="embed-responsive-item" src="<?= HTML::blog_url(UOJContext::userid(), '/slide/'.$blog['id']) ?>"></iframe>
|
||||
</div>
|
||||
<div class="text-right top-buffer-sm">
|
||||
<a class="btn btn-default btn-md" href="/slide/<?= $blog['id'] ?>"><span class="glyphicon glyphicon-fullscreen"></span> 全屏</a>
|
||||
<a class="btn btn-default btn-md" href="<?= HTML::blog_url(UOJContext::userid(), '/slide/'.$blog['id']) ?>"><span class="glyphicon glyphicon-fullscreen"></span> 全屏</a>
|
||||
</div>
|
||||
</article>
|
||||
<?php endif ?>
|
||||
@ -40,11 +40,11 @@
|
||||
<?php endforeach ?>
|
||||
</li>
|
||||
<?php if ($is_preview): ?>
|
||||
<li><a href="/blog/<?= $blog['id'] ?>">阅读全文</a></li>
|
||||
<li><a href="<?= HTML::blog_url(UOJContext::userid(), '/blog/'.$blog['id']) ?>">阅读全文</a></li>
|
||||
<?php endif ?>
|
||||
<?php if (Auth::check() && (isSuperUser(Auth::user()) || Auth::id() == $blog['poster'])): ?>
|
||||
<li><a href="/<?=$blog_type?>/<?=$blog['id']?>/write">修改</a></li>
|
||||
<li><a href="/blog/<?=$blog['id']?>/delete">删除</a></li>
|
||||
<li><a href="<?=HTML::blog_url(UOJContext::userid(), '/'.$blog_type.'/'.$blog['id'].'/write')?>">修改</a></li>
|
||||
<li><a href="<?=HTML::blog_url(UOJContext::userid(), '/blog/'.$blog['id'].'/delete')?>">删除</a></li>
|
||||
<?php endif ?>
|
||||
<li><?= getClickZanBlock('B', $blog['id'], $blog['zan']) ?></li>
|
||||
</ul>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?= HTML::url('/') ?>">UOJ</a>
|
||||
<a class="navbar-brand" href="<?= HTML::url('/') ?>"><?= UOJConfig::$data['profile']['oj-name-short'] ?></a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
@ -6,13 +6,19 @@
|
||||
</div>
|
||||
<?php if ($ShowPageFooter): ?>
|
||||
<div class="uoj-footer">
|
||||
<p><a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'zh-cn'))) ?>"><img src="//img.uoj.ac/utility/flags/24/cn.png" alt="中文" /></a> <a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'en'))) ?>"><img src="//img.uoj.ac/utility/flags/24/gb.png" alt="English" /></a></p>
|
||||
<?php if (UOJConfig::$data['switch']['ICP-license']): ?>
|
||||
<ul class="list-inline"><li>Universal Online Judge</li>|<li><a href="http://www.miitbeian.gov.cn">鄂ICP备14016048号</a></li></ul>
|
||||
<?php else: ?>
|
||||
<ul class="list-inline"><li>Universal Online Judge</li></ul>
|
||||
<?php endif ?>
|
||||
<p>Server time: <?= UOJTime::$time_now_str ?></p>
|
||||
<p>
|
||||
<a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'zh-cn'))) ?>"><img src="/pictures/lang/cn.png" alt="中文" /></a>
|
||||
<a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'en'))) ?>"><img src="/pictures/lang/gb.png" alt="English" /></a>
|
||||
</p>
|
||||
|
||||
<ul class="list-inline">
|
||||
<li><?= UOJConfig::$data['profile']['oj-name'] ?></li>
|
||||
<?php if (UOJConfig::$data['profile']['ICP-license'] != ''): ?> |
|
||||
<li><a href="http://www.miitbeian.gov.cn"><?= UOJConfig::$data['profile']['ICP-license'] ?></a></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<p>Server time: <?= UOJTime::$time_now_str ?> | <a href="http://github.com/UniversalOJ/UOJ-System">开源项目</a></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
@ -20,10 +20,10 @@
|
||||
}
|
||||
|
||||
if (!isset($PageMainTitle)) {
|
||||
$PageMainTitle = 'Universal Online Judge';
|
||||
$PageMainTitle = UOJConfig::$data['profile']['oj-name'];
|
||||
}
|
||||
if (!isset($PageMainTitleOnSmall)) {
|
||||
$PageMainTitleOnSmall = 'UOJ';
|
||||
$PageMainTitleOnSmall = UOJConfig::$data['profile']['oj-name-short'];
|
||||
}
|
||||
if (!isset($ShowPageHeader)) {
|
||||
$ShowPageHeader = true;
|
||||
@ -37,7 +37,7 @@
|
||||
<?php if (isset($_GET['locale'])): ?>
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<?php endif ?>
|
||||
<title><?= isset($PageTitle) ? $PageTitle : 'UOJ' ?> - <?= $PageMainTitle ?></title>
|
||||
<title><?= isset($PageTitle) ? $PageTitle : UOJConfig::$data['profile']['oj-name-short'] ?> - <?= $PageMainTitle ?></title>
|
||||
|
||||
<script type="text/javascript">uojHome = '<?= HTML::url('/') ?>'</script>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title><?= isset($PageTitle) ? $PageTitle : 'UOJ' ?> - <?= isset($PageMainTitle) ? $PageMainTitle : 'Universal Online Judge' ?></title>
|
||||
<title><?= isset($PageTitle) ? $PageTitle : UOJConfig::$data['profile']['oj-name-short'] ?> - <?= isset($PageMainTitle) ? $PageMainTitle : UOJConfig::$data['profile']['oj-name'] ?></title>
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.useso.com/css?family=Lato:400,700,400italic,700italic);body{background:#f7f2d3;background:-moz-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:-webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #fff), color-stop(100%, #f7f2d3));background:-webkit-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:-o-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:-ms-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background-color:#f7f3de}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#333}::selection{color:#fff;background:rgba(79,64,28,0.99);text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#333;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,0.1),0 0 5px rgba(0,0,0,0.1),0 1px 3px rgba(0,0,0,0.3),0 3px 5px rgba(0,0,0,0.2),0 5px 10px rgba(0,0,0,0.25),0 20px 20px rgba(0,0,0,0.15)}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#8b743d;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#c0a86e;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#564826}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #333;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#8b743d;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#8b743d}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#8b743d}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#8b743d}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#8b743d}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#c0a86e}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#c0a86e}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#c0a86e}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#c0a86e}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#8b743d;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#8b743d}
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);body{background:#f7f2d3;background:-moz-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:-webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #fff), color-stop(100%, #f7f2d3));background:-webkit-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:-o-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:-ms-radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background:radial-gradient(center, circle cover, #fff 0%, #f7f2d3 100%);background-color:#f7f3de}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#333}::selection{color:#fff;background:rgba(79,64,28,0.99);text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#333;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,0.1),0 0 5px rgba(0,0,0,0.1),0 1px 3px rgba(0,0,0,0.3),0 3px 5px rgba(0,0,0,0.2),0 5px 10px rgba(0,0,0,0.25),0 20px 20px rgba(0,0,0,0.15)}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#8b743d;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#c0a86e;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#564826}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #333;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#8b743d;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#8b743d}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#8b743d}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#8b743d}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#8b743d}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#c0a86e}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#c0a86e}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#c0a86e}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#c0a86e}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#8b743d;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#8b743d}
|
||||
/*# sourceMappingURL=beige.css.map */
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.useso.com/css?family=Lato:400,700,400italic,700italic);body{background:#1c1e20;background:-moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:-webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));background:-webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:-o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:-ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background-color:#2b2b2b}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#eee}::selection{color:#fff;background:#FF5E99;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#eee;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:0px 0px 6px rgba(0,0,0,0.2);word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,0.1),0 0 5px rgba(0,0,0,0.1),0 1px 3px rgba(0,0,0,0.3),0 3px 5px rgba(0,0,0,0.2),0 5px 10px rgba(0,0,0,0.25),0 20px 20px rgba(0,0,0,0.15)}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#13DAEC;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#71e9f4;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#0d99a5}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #eee;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#13DAEC;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#13DAEC}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#13DAEC}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#13DAEC}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#13DAEC}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#71e9f4}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#71e9f4}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#71e9f4}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#71e9f4}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#13DAEC;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#13DAEC}
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);body{background:#1c1e20;background:-moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:-webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));background:-webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:-o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:-ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background:radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);background-color:#2b2b2b}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#eee}::selection{color:#fff;background:#FF5E99;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#eee;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:0px 0px 6px rgba(0,0,0,0.2);word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,0.1),0 0 5px rgba(0,0,0,0.1),0 1px 3px rgba(0,0,0,0.3),0 3px 5px rgba(0,0,0,0.2),0 5px 10px rgba(0,0,0,0.25),0 20px 20px rgba(0,0,0,0.15)}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#13DAEC;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#71e9f4;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#0d99a5}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #eee;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#13DAEC;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#13DAEC}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#13DAEC}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#13DAEC}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#13DAEC}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#71e9f4}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#71e9f4}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#71e9f4}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#71e9f4}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#13DAEC;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#13DAEC}
|
||||
/*# sourceMappingURL=league.css.map */
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.useso.com/css?family=Lato:400,700,400italic,700italic);html *{color-profile:sRGB;rendering-intent:auto}body{background:#002b36;background-color:#002b36}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#93a1a1}::selection{color:#fff;background:#d33682;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#eee8d5;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#268bd2;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#78b9e6;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#1a6091}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #93a1a1;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#268bd2;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#268bd2}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#268bd2}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#268bd2}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#268bd2}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#78b9e6}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#78b9e6}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#78b9e6}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#78b9e6}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#268bd2;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#268bd2}
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);html *{color-profile:sRGB;rendering-intent:auto}body{background:#002b36;background-color:#002b36}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#93a1a1}::selection{color:#fff;background:#d33682;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#eee8d5;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#268bd2;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#78b9e6;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#1a6091}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #93a1a1;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#268bd2;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#268bd2}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#268bd2}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#268bd2}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#268bd2}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#78b9e6}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#78b9e6}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#78b9e6}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#78b9e6}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#268bd2;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#268bd2}
|
||||
/*# sourceMappingURL=moon.css.map */
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import url(//fonts.useso.com/css?family=Montserrat:700);@import url(//fonts.useso.com/css?family=Open+Sans:400,700,400italic,700italic);body{background:#111;background-color:#111}.reveal{font-family:"Open Sans",sans-serif;font-size:30px;font-weight:normal;color:#eee}::selection{color:#fff;background:#e7ad52;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#eee;font-family:"Montserrat",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:-0.03em;text-transform:none;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#e7ad52;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#f3d7ac;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#d08a1d}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #eee;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#e7ad52;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#e7ad52}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#e7ad52}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#e7ad52}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#e7ad52}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#f3d7ac}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#f3d7ac}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#f3d7ac}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#f3d7ac}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#e7ad52;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#e7ad52}
|
||||
@import url(//fonts.googleapis.com/css?family=Montserrat:700);@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);body{background:#111;background-color:#111}.reveal{font-family:"Open Sans",sans-serif;font-size:30px;font-weight:normal;color:#eee}::selection{color:#fff;background:#e7ad52;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#eee;font-family:"Montserrat",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:-0.03em;text-transform:none;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#e7ad52;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#f3d7ac;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#d08a1d}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #eee;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#e7ad52;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#e7ad52}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#e7ad52}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#e7ad52}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#e7ad52}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#f3d7ac}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#f3d7ac}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#f3d7ac}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#f3d7ac}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#e7ad52;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#e7ad52}
|
||||
/*# sourceMappingURL=night.css.map */
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import url(//fonts.useso.com/css?family=News+Cycle:400,700);@import url(//fonts.useso.com/css?family=Lato:400,700,400italic,700italic);body{background:#fff;background-color:#fff}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#000}::selection{color:#fff;background:rgba(0,0,0,0.99);text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#000;font-family:"News Cycle",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:none;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#00008B;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#0000f1;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#00003f}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #000;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#00008B;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#00008B}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#00008B}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#00008B}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#00008B}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#0000f1}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#0000f1}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#0000f1}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#0000f1}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#00008B;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#00008B}
|
||||
@import url(//fonts.googleapis.com/css?family=News+Cycle:400,700);@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);body{background:#fff;background-color:#fff}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#000}::selection{color:#fff;background:rgba(0,0,0,0.99);text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#000;font-family:"News Cycle",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:none;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#00008B;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#0000f1;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#00003f}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #000;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#00008B;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#00008B}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#00008B}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#00008B}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#00008B}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#0000f1}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#0000f1}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#0000f1}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#0000f1}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#00008B;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#00008B}
|
||||
/*# sourceMappingURL=simple.css.map */
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import url(//fonts.useso.com/css?family=Quicksand:400,700,400italic,700italic);@import url(//fonts.useso.com/css?family=Open+Sans:400italic,700italic,400,700);.reveal a{line-height:1.3em}body{background:#add9e4;background:-moz-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:-webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #f7fbfc), color-stop(100%, #add9e4));background:-webkit-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:-o-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:-ms-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background-color:#f7fbfc}.reveal{font-family:"Open Sans",sans-serif;font-size:36px;font-weight:normal;color:#333}::selection{color:#fff;background:#134674;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#333;font-family:"Quicksand",sans-serif;font-weight:normal;line-height:1.2;letter-spacing:-0.08em;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#3b759e;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#74a7cb;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#264c66}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #333;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#3b759e;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#3b759e}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#3b759e}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#3b759e}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#3b759e}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#74a7cb}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#74a7cb}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#74a7cb}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#74a7cb}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#3b759e;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#3b759e}
|
||||
@import url(//fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);@import url(//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);.reveal a{line-height:1.3em}body{background:#add9e4;background:-moz-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:-webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #f7fbfc), color-stop(100%, #add9e4));background:-webkit-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:-o-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:-ms-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background:radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);background-color:#f7fbfc}.reveal{font-family:"Open Sans",sans-serif;font-size:36px;font-weight:normal;color:#333}::selection{color:#fff;background:#134674;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#333;font-family:"Quicksand",sans-serif;font-weight:normal;line-height:1.2;letter-spacing:-0.08em;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#3b759e;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#74a7cb;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#264c66}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #333;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#3b759e;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#3b759e}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#3b759e}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#3b759e}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#3b759e}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#74a7cb}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#74a7cb}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#74a7cb}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#74a7cb}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#3b759e;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#3b759e}
|
||||
/*# sourceMappingURL=sky.css.map */
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.useso.com/css?family=Lato:400,700,400italic,700italic);html *{color-profile:sRGB;rendering-intent:auto}body{background:#fdf6e3;background-color:#fdf6e3}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#657b83}::selection{color:#fff;background:#d33682;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#586e75;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#268bd2;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#78b9e6;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#1a6091}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #657b83;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#268bd2;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#268bd2}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#268bd2}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#268bd2}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#268bd2}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#78b9e6}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#78b9e6}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#78b9e6}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#78b9e6}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#268bd2;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#268bd2}
|
||||
@import url(/fonts/league-gothic/league-gothic.css);@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);html *{color-profile:sRGB;rendering-intent:auto}body{background:#fdf6e3;background-color:#fdf6e3}.reveal{font-family:"Lato",sans-serif;font-size:36px;font-weight:normal;color:#657b83}::selection{color:#fff;background:#d33682;text-shadow:none}.reveal .slides>section,.reveal .slides>section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px 0;color:#586e75;font-family:"League Gothic",Impact,sans-serif;font-weight:normal;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:bold}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:bold}.reveal dd{margin-left:40px}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,0.05);box-shadow:0px 0px 2px rgba(0,0,0,0.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:0.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0px 0px 6px rgba(0,0,0,0.3)}.reveal code{font-family:monospace}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal;background:#3F3F3F;color:#DCDCDC}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:bold}.reveal table th,.reveal table td{text-align:left;padding:0.2em 0.5em 0.2em 0.5em;border-bottom:1px solid}.reveal table tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super}.reveal sub{vertical-align:sub}.reveal small{display:inline-block;font-size:0.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#268bd2;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#78b9e6;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#1a6091}.reveal section img{margin:15px 0px;background:rgba(255,255,255,0.12);border:4px solid #657b83;box-shadow:0 0 10px rgba(0,0,0,0.15)}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,0.2);border-color:#268bd2;box-shadow:0 0 20px rgba(0,0,0,0.55)}.reveal .controls div.navigate-left,.reveal .controls div.navigate-left.enabled{border-right-color:#268bd2}.reveal .controls div.navigate-right,.reveal .controls div.navigate-right.enabled{border-left-color:#268bd2}.reveal .controls div.navigate-up,.reveal .controls div.navigate-up.enabled{border-bottom-color:#268bd2}.reveal .controls div.navigate-down,.reveal .controls div.navigate-down.enabled{border-top-color:#268bd2}.reveal .controls div.navigate-left.enabled:hover{border-right-color:#78b9e6}.reveal .controls div.navigate-right.enabled:hover{border-left-color:#78b9e6}.reveal .controls div.navigate-up.enabled:hover{border-bottom-color:#78b9e6}.reveal .controls div.navigate-down.enabled:hover{border-top-color:#78b9e6}.reveal .progress{background:rgba(0,0,0,0.2)}.reveal .progress span{background:#268bd2;-webkit-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);-moz-transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);transition:width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985)}.reveal .slide-number{color:#268bd2}
|
||||
/*# sourceMappingURL=solarized.css.map */
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
require $_SERVER['DOCUMENT_ROOT'] . '/app/uoj-lib.php';
|
||||
Session_Start();
|
||||
|
||||
require $_SERVER['DOCUMENT_ROOT'] . '/app/libs/uoj-lib.php';
|
||||
|
||||
require UOJContext::documentRoot().'/app/route.php';
|
||||
require UOJContext::documentRoot().'/app/controllers/subdomain/blog/route.php';
|
||||
|
@ -287,7 +287,7 @@ $.fn.uoj_problem_tag = function() {
|
||||
}
|
||||
$.fn.uoj_blog_tag = function() {
|
||||
return this.each(function() {
|
||||
$(this).attr('href', '/archive?tag=' + encodeURIComponent($(this).text()));
|
||||
$(this).attr('href', uojBlogUrl + '/archive?tag=' + encodeURIComponent($(this).text()));
|
||||
});
|
||||
}
|
||||
|
||||
|
BIN
uoj/1/pictures/lang/cn.png
Normal file
BIN
uoj/1/pictures/lang/cn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 604 B |
BIN
uoj/1/pictures/lang/gb.png
Normal file
BIN
uoj/1/pictures/lang/gb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user