sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
# Proposed Format | |
{ | |
... | |
7. sources: ["baz.ts", "foo.js", "bar.js"] | |
... | |
9. mediaTypes: ["application/javascript", "application/x.typescript"], | |
10. sourcesMediaTypes: "CAA", | |
} |
diff --git a/browser/devtools/debugger/test/head.js b/browser/devtools/debugger/test/head.js | |
index 1c97620..5dd4070 100644 | |
--- a/browser/devtools/debugger/test/head.js | |
+++ b/browser/devtools/debugger/test/head.js | |
@@ -734,17 +734,24 @@ function closeDebuggerAndFinish(aPanel, aFlags = {}) { | |
"unless you're absolutely sure about what you're doing."); | |
} | |
return teardown(aPanel, aFlags).then(finish); | |
} | |
var d = Object.create(Date.prototype); | |
Date.call(d); | |
d instanceof Date // true | |
d.getTime() // throws an Error! |
import numpy as np | |
from tqdm import trange | |
def get_neighbour_matrix(x, L, R): | |
dx = np.subtract.outer(x[:, 0], x[:, 0]) | |
dy = np.subtract.outer(x[:, 1], x[:, 1]) | |
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2 | |
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2 | |
pair_dist = dx ** 2 + dy ** 2 |
let foo = 1; | |
let bar = 2; | |
let obj = { foo, bar }; | |
obj.foo // 1 | |
obj.bar // 2 |
var smc = new SourceMapConsumer(theSourceMapJSON); | |
var smg = SourceMapGenerator.fromSourceMap(smc); | |
smc.sources.forEach(function (s) { | |
smg.setSourceContent(s, somehowGetTheSourceContentsOf(s)); | |
}); | |
// This is your modified map. | |
smg.toJSON(); |
function* G() { yield this.x; } | |
G.prototype = { x: 5 }; | |
console.log([...G()]); |
import pefile | |
def get_product_version(data: bytes) -> str: | |
pe = pefile.PE(data=data, fast_load=True) | |
pe.parse_data_directories( | |
directories=[pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_RESOURCE"]] | |
) | |
for file_info in pe.FileInfo: | |
for entry in file_info: |
Cu.import("resource://gre/modules/Task.jsm") | |
let runTaskWhileValid = (isValid, generator) => { | |
Task.spawn(function* () { | |
const g = generator(); | |
let value, resolved; | |
let done = false; | |
while (!done) { | |
try { | |
({ value, done }) = g.next(resolved); |