This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var e=function(){var c,a,b;return null==(a=null==(c=document.querySelector("link[rel='canonical']"))?void 0:c.href)?void 0:null==(b=a.match(/title_id\/(\d+)\//))?void 0:b[1]}();null==e?alert("Can't get title-id."):function(c){var a=document.createElement("iframe");a.src="/follow/title-list";document.querySelector("body").appendChild(a);var b=a.contentWindow;b.addEventListener("DOMContentLoaded",function(){var f=b.document.querySelector("#title_list_form input[name='token']").value,d=new FormData;d.append("token",f);d.append("title_id[]",c);d.append("notice_type",1);fetch("/follow/notification-delete",{method:"POST",body:d}).then(function(){location.reload()})})}(e)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.SessionPanel_inactive__3UvF1 .SessionPanel_panel__1Oz0y { | |
color: #888; | |
} | |
.SessionPanel_container__3iORH .SessionPanel_title__1iwdo span { | |
color: #ddd; | |
} | |
.SessionPanel_container__3iORH { | |
word-break: break-word; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @param {Integer[]} nums | |
# @return {String[]} | |
def summary_ranges(nums) | |
return [] if nums.empty? | |
prev = nums.shift | |
r = [prev] | |
out = [] | |
nums.each do |n| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for a Node. | |
* class Node(var `val`: Int) { | |
* var neighbors: ArrayList<Node?> = ArrayList<Node?>() | |
* } | |
*/ | |
class Solution { | |
fun cloneGraph(node: Node?): Node? { | |
return cloneGraph(node, mutableMapOf()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Definition for a Node. | |
# class Node | |
# attr_accessor :val, :neighbors | |
# def initialize(val = 0, neighbors = nil) | |
# @val = val | |
# neighbors = [] if neighbors.nil? | |
# @neighbors = neighbors | |
# end | |
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @param {Integer[]} nums | |
# @param {Integer} k | |
# @return {Integer} | |
def find_pairs(nums, k) | |
if k == 0 | |
return nums.group_by { |n| n } | |
.map { |k, v| [k, v.size] } | |
.filter { |(n, c)| c >= 2 } | |
.size | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
env: { | |
es6: true, | |
node: true, | |
}, | |
extends: [ | |
'standard', | |
'plugin:@typescript-eslint/eslint-recommended', | |
'plugin:@typescript-eslint/recommended', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set clipboard=unnamed,unnamedplus | |
set visualbell | |
set surround | |
" escape | |
noremap <C-j> <C-[> | |
inoremap <C-j> <C-[> | |
" emacs like | |
noremap <C-a> <Home> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gain = ((el) => { | |
const ctx = new window.AudioContext(); | |
const source = ctx.createMediaElementSource(el); | |
const gain = ctx.createGain(); | |
source.connect(gain); | |
gain.connect(ctx.destination) | |
return (multiplier) => { gain.gain.value = Math.min(multiplier, 10); }; | |
})(document.querySelector("video")); | |
gain(2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./point.dart"; | |
import "./print.dart"; | |
void main() { | |
var p = new Point(1, 2); | |
printPoint(p); | |
} |
NewerOlder