Skip to content

Instantly share code, notes, and snippets.

View niltok's full-sized avatar
🔥
Touching fish 🐠

玩火 niltok

🔥
Touching fish 🐠
View GitHub Profile
@niltok
niltok / ZhihuDark.js
Last active August 4, 2022 14:58
知乎暗色脚本: add theme=dark to url automaticlly for zhihu
// ==UserScript==
// @name 知乎暗色
// @namespace http://tampermonkey.net/
// @version 0.1
// @description add theme=dark to uri automaticlly
// @author Niltok
// @match https://*.zhihu.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=zhihu.com
// @grant none
// ==/UserScript==
@niltok
niltok / autofile.js
Last active August 19, 2023 04:36
QUST 自动教评脚本
/* 使用方法:在教评页面把侧栏教学班显示从每页15改成每页5000,打开控制台粘贴本段代码,喝杯咖啡,等所有教师评完后点击提交 */
(async () => {
let wait = 1000; /* 点击侧栏后的等待时间,单位毫秒,根据网络状况选取 */
let delay = t => new Promise((res, rej) => setTimeout(res, t));
document.querySelectorAll("#tempGrid > tbody > .ui-widget-content")[0].click();
await delay(wait);
let list = document.querySelectorAll("#tempGrid > tbody > .ui-widget-content");
for (let i = 1; ; i++) {
await delay(wait);
//try {
#include <bits/stdc++.h>
using namespace std;
struct node {
node *l, *r;
int v, s, t = 0;
node(int val = 0, int sz = 1, node *ls = NULL, node *rs = NULL):
v(val), s(sz), l(ls), r(rs) { }
} pool[200000];