Vjudge Code
加一些代码,让vjudge简洁
Stylus
@-moz-document url-prefix("https://cn.vjudge.net/"), url-prefix("https://vjudge.net/") {
dd {
font-family: "Noto Serif", "Noto Serif CJK SC Medium", serif;
background-color: rgba(255, 255, 255, 0.5) !important;
box-shadow: none;
}
dd pre {
font-family: "DejaVu Sans Mono", serif;
}
.fa-refresh.fa-spin {
-webkit-animation: fa-spin 1s infinite;
animation: fa-spin 1s infinite;
}
.fa-spin, .fa-pulse {
animation: none;
}
.fa-2x, .fa-3x, .fa-4x, .fa-5x {
font-size: 1em !important;
}
#problem_discuss {
display: none;
}
.navbar{
z-index: 999;
width: 100%;
top: 0;
box-shadow: 0 2px 10px 0 rgba(34,36,38,.15);
border-radius: 0!important;
background-color: white !important;
padding: 0 2rem;
}
.navbar-brand{
color: blue!important;
margin: 0!important;
}
.nav-item {
margin: 0!important;
}
.nav-item>a, .navbar-brand{
color: black!important;
padding: 1em 1em !important;
font-size: 1rem;
}
.nav-item.active {
background-color: rgba(0,0,0,0.05);
}
.nav-item:hover,.nav-item:hover>input{
background-color: #f5f5f5;
}
.dropdown-menu {
border-radius: 0;
margin: 0;
}
.navbar-brand>img {
position: absolute;
left: 1em;
}
body {
background: none;
}
#code-content, code.hljs {
background: none!important;
border: 1px black dotted!important;
}
.hljs, .hljs-section, .hljs-title {
color:black;
}
}
TamperMonkey
// ==UserScript==
// @name vjudge jumper
// @namespace none
// @version 0.1
// @description jump
// @author sahdsg
// @match https://cn.vjudge.net/*
// @match https://vjudge.net/*
// @grant none
// ==/UserScript== (function() {
'use strict';
function funcs() {
var k =$("input.nav-item").val();
if(k.indexOf("!")==0) {
window.location.href='/problem#OJId=All&probNum=&title='+k.slice(1)+'&source=&category=all';
} else {
k = k.toLowerCase();
var t={
"HYSBZ":["bzoj","hysbz"],
"CodeForces":["cf", "codeforces"],
"Gym":["gym"],
"51Nod":["51nod"],
"ZOJ":["zoj"],
"HDU":["hdu"],
"UVALive":["uvalive", "la"],
"UVA":["uva"],
"51Nod":["51nod"],
"HIT":["hit"],
"SPOJ":["spoj"],
"POJ":["poj"]
};
for(var o in t) {
for(var z in t[o]) {
var prefix = t[o][z];
if(k.indexOf(prefix)==0) {
window.location.href='/problem/'+o+'-'+k.slice(prefix.length).replace(/-/g,"").toUpperCase();
return;
}
}
}
alert("unknown");
}
}
$(".nav.navbar-nav").append('<li class="nav-item" style="padding: .25em 1em !important;"><input class="nav-item" style="border: none;height: 3em;"></li>');
if(window.location.href.indexOf("UVA-")>0) {
var k=window.location.href.substr(window.location.href.indexOf("UVA-")+4); $("#prob-operation>.container").append('<div class="row"><div class="col-xs-12"><a href="https://uva.onlinejudge.org/external/'+k.slice(0,-2)+'/'+k+'.pdf" target="_blank" class="btn btn-secondary">PDF</a></div></div>'); }
$("input.nav-item").keypress(function (e) {if (e.which == 13) {funcs()}});
})();
// ==UserScript==
// @name vjudge Timer
// @namespace none
// @version 1.0
// @description vjudge计时器
// @author sahdsg
// @match https://cn.vjudge.net/problem/*
// @match https://vjudge.net/problem/*
// @grant none
// ==/UserScript== (function(){
var odate = new Date();
var timeron = true; function getTime() {
var date = new Date()-odate;
var second = Math.floor(date/1000)%60;
if(second<10) {
second="0"+second;
}
var minute = Math.floor(date/60000)%60;
if(minute<10) {
minute="0"+minute;
}
var hour = Math.floor(date/3600000)%60;
if(hour<10) {
hour="0"+hour;
}
var str=hour+':'+minute+':'+second;
var mtimer = document.getElementById("timerid");
mtimer.innerHTML=str;
} function changeTimer() {
if(timeron) {
getTime();
clearInterval(terval);
timeron = false;
$("#timerop").html("continue");
$("#problem_discuss").slideDown();
} else {
getTime();
terval = setInterval(getTime,1000);
timeron=true;
$("#timerop").html("pause");
$("#problem_discuss").slideUp();
}
}
function resetTimer() {
odate = new Date();var mtimer = document.getElementById("timerid");mtimer.innerHTML='00:00:00';
}
$("#prob-left-panel").prepend('<div class="alert row alert-danger"><table width="100%"><tbody><tr><td>Time used:</td><td style="text-align: right" width="50%" id="timerid">00:00:00</td></tr><tr><td><button class="btn-danger" id="timereset">reset</button></td><td style="text-align: right"><button class="btn-danger" id="timerop">pause</button></td></tr></tbody></table></div>');
$("#timerop").click(function(){changeTimer();});$("#timereset").click(function(){resetTimer();});
var terval = setInterval(getTime,1000);
$("#problem_discuss").hide();
timeron=true;
})();
Vjudge Code的更多相关文章
- HDU 4813 Hard Code 水题
Hard Code Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.act ...
- URAL 1780 G - Gray Code 找规律
G - Gray CodeTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view ...
- 专题[vjudge] - 数论0.1
专题[vjudge] - 数论0.1 web-address : https://cn.vjudge.net/contest/176171 A - Mathematically Hard 题意就是定义 ...
- (完全背包)Writing Code -- Codeforce 544C
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=99951#problem/C (zznu14) Writing Code Writin ...
- UVA 1593 Alignment of Code(紫书习题5-1 字符串流)
You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is ...
- Visual Studio Code 代理设置
Visual Studio Code (简称 VS Code)是由微软研发的一款免费.开源的跨平台文本(代码)编辑器,在十多年的编程经历中,我使用过非常多的的代码编辑器(包括 IDE),例如 Fron ...
- 我们是怎么做Code Review的
前几天看了<Code Review 程序员的寄望与哀伤>,想到我们团队开展Code Review也有2年了,结果还算比较满意,有些经验应该可以和大家一起分享.探讨.我们为什么要推行Code ...
- Code Review 程序员的寄望与哀伤
一个程序员,他写完了代码,在测试环境通过了测试,然后他把它发布到了线上生产环境,但很快就发现在生产环境上出了问题,有潜在的 bug. 事后分析,是生产环境的一些微妙差异,使得这种 bug 场景在线下测 ...
- 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM
刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- Java中实现多线程的四种方式
Java多线程实现方式主要有四种:继承Thread类.实现Runnable接口.实现Callable接口通过FutureTask包装器来创建Thread线程.使用ExecutorService.Cal ...
- 使用Atlas进行元数据管理之Glossary(术语)
背景:笔者和团队的小伙伴近期在进行数据治理/元数据管理方向的探索, 在接下来的系列文章中, 会陆续与读者们进行分享在此过程中踩过的坑和收获. 元数据管理系列文章: [0] - 使用Atlas进行元数据 ...
- fuzzing学习
1.简介 1.1 fuzzing 模糊测试(fuzzing)是一种通过向程序提供非预期的输入并监控输出中的异常来发现软件中的故障的方法. 用于模糊测试的模糊测试器(fuzzer)可以按照以下3种方式进 ...
- asp.net mvc 简单项目框架的搭建(二)—— Spring.Net在Mvc中的简单应用
摘要:上篇写了如何搭建一个简单项目框架的上部分,讲了关于Dal和Bll之间解耦的相关知识,这篇来把后i面的部分说一说. 上篇讲到DbSession,现在接着往下讲. 首先,还是把一些类似的操作完善一下 ...
- c#如何声明数据结构类型为null?
可以通过如下两种方式声明可为空的类型:System.Nullable<T> variable;T?variable:eg:int值是-2,147,483,648 到 2,147,483,6 ...
- oracle学习笔记(六) JDBC使用
JDBC使用 1. 导包 直接使用IDEA导入依赖包即可 新建一个lib,把jar包放在这里 2. 加载驱动 Class.forName("oracle.jdbc.driver.Oracle ...
- nginx系列13:最少连接算法以及如何跨worker进程生效
最少连接算法 使用最少连接算法可以使得nginx优先选择连接最少的上游服务器,需要用到upstream_least_conn模块. 如何跨worker进程生效 因为nginx是多进程结构的,默认多个w ...
- XSS攻击之窃取Cookie
10 年前的博客似乎有点老了,但是XSS 攻击的威胁依然还在,我们不得不防. 窃取Cookie是非常简单的,因此不要轻易相信客户端所声明的身份.即便这个Cookie是在数秒之前验证过,那也未必是真的, ...
- python docx文档转html页面
文章链接:https://mp.weixin.qq.com/s/uMb2ziRS1NJ1GXIjofeANg 说到word文档转html的,网上一搜一大把,各种在线word转html页面,使用起来也方 ...
- 小米5.0以上系统如何没ROOT激活xposed框架的经验
在较多企业的引流或者业务操作中,大多数需要使用安卓的黑高科技术xposed框架,这段时间,我们企业购买了一批新的小米5.0以上系统,大多数都是基于7.0以上版本,大多数不能够获取Root的su超级权限 ...