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
{ | |
"data": { | |
"error": { | |
"sdk": { | |
"name": "sentry.java.spring-boot", | |
"version": "4.3.0", | |
"packages": [ | |
{ | |
"name": "maven:io.sentry:sentry", | |
"version": "6.10.0" |
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
(function(){ | |
var a = b = 3; | |
})(); | |
console.log("a defined? " + (typeof a !== 'undefined')); | |
console.log("b defined? " + (typeof b !== 'undefined')); | |
// node script.js |
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
function foo() | |
{ | |
return | |
{ | |
bar: "hello" | |
}; | |
} | |
console.log(foo()) |
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
var list = process.argv.slice(2); | |
var sum = 0; | |
var add = function() { | |
if (list.length === 0) { | |
console.log('sum ' + sum); | |
} | |
var item = list.pop(); |
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
var args = process.argv.slice(2); | |
var hero = { | |
name: args[0], | |
getSecretIdentity: function (){ | |
return this.name; | |
} | |
}; | |
var stoleSecretIdentity = hero.getSecretIdentity; |
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 jsdom = require("jsdom"); | |
const { JSDOM } = jsdom; | |
const dom = new JSDOM(`<body></body>`, { runScripts: "dangerously" }); | |
function createDom(total) { | |
for (var i = 0; i < total; i++) { | |
var btn = dom.window.document.createElement('button'); | |
btn.appendChild(dom.window.document.createTextNode('Button ' + i)); | |
btn.addEventListener('click', function(){ console.log(i); }); |
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 os | |
import sys | |
from threading import Thread | |
class Counter(object): | |
def __init__(self): | |
self.count = 0 | |
def increment(self, offset): |
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 os | |
import sys | |
def find_min(): | |
# implement your logic here | |
pass | |
def print_usage(): |
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
def index_words(text): | |
result = [] | |
if text: | |
result.append(0) | |
for index, letter in enumerate(text): | |
if letter == ' ': | |
result.append(index + 1) | |
return result |
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
def extend_list(val, list=[]): | |
list.append(val) | |
return list | |
list1 = extend_list(10) | |
list2 = extend_list(123, []) | |
list3 = extend_list('a') | |
print("list1 = %s" % list1) |
NewerOlder