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 uid = function() { | |
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | |
} | |
function Library (name, creator) { | |
this.name = name; | |
this.creator = creator; | |
this.playlists = []; | |
this.tracks = []; | |
} |
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
class Person | |
attr_accessor(:name) | |
def initialize(name) | |
@name = name | |
end | |
# def name= name | |
# @name = name | |
# 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
const input = [ | |
"AND", | |
["<", "var1", "var2"], | |
[ | |
"OR", | |
[">", "var3", "var4"], | |
["==", "var5", "var6"] | |
] | |
]; | |
const result = "var1 < val2 AND (var3 > val4 OR val5 == val6)"; |
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 axios from 'axios'; | |
const SUBGRAPH_URL = | |
'https://api.thegraph.com/subgraphs/name/tokenunion/polymarket-matic'; | |
export interface Condition { | |
id: string; | |
payouts: string[]; | |
resolutionTimestamp: number; | |
} |