Given n values a[1], ..., a[n]
, you entertain two types of queries:
- point update: add
x
to the i-th value - range query: query minimum value of
a[i]
in the rangel, r
LIVE CODE.
function getIframesCount(win) { | |
let count = 1; // self frame | |
for (let i = 0; i < win.frames.length; i++) { | |
count += getIframesCount(win.frames[i]); | |
} | |
return count; | |
} |
const vscode = require('vscode'); | |
const gitExt = vscode.extensions.getExtension('vscode.git')?.exports; | |
const gitAPI = gitExt.getAPI(1); | |
module.exports.macroCommands = { | |
OpenContentScript: { | |
no: 1, | |
func: () => openFile("G:/textblaze/bono/chrome_extension/src/js/contentScript.js") | |
}, | |
OpenReplacement: { |
<?php | |
echo file_get_contents("/etc/passwd"); | |
echo "--------\n"; | |
echo file_get_contents("/my_init"); | |
echo "--------\n"; | |
echo file_get_contents("/my_service"); | |
echo "--------\n"; | |
$inspection_dirs=array("", "tmp", "home"); |
<?php echo 'hello'; ?> |
// ==UserScript== | |
// @name Amp Fixer | |
// @match https://codedrills.io/contests/icpc-gwalior-pune-2020-regional-round/scoreboard | |
// ==/UserScript== | |
function fixer() { | |
const elms = document.querySelectorAll(".v-data-table__wrapper > table:nth-child(1) > tbody:nth-child(3) > tr > td:nth-child(3)"); | |
for (const elm of [...elms]) { | |
const s = elm.innerText; |
# place this in your aliases file | |
ghcl() { | |
prefix=$(echo -n $1 | sed 's|https://github.com/|[email protected]:|') | |
git clone "$prefix.git" | |
} |
// ==UserScript== | |
// @name SSH clone button | |
// @version 0.1 | |
// @description For those who have SSH default in their repo | |
// @author Gaurang | |
// @match https://github.com/*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { |
# Basic segtree (prerequisite) | |
Given n values `a[1], ..., a[n]`, you entertain two types of queries: | |
- point update: add `x` to the i-th value | |
- range query: query minimum value of `a[i]` in the range `l, r` | |
LIVE CODE. | |
# Simple lazy segtree |