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 tzdetect = { | |
tzs: moment.tz.names(), | |
matches: function(){ | |
return this.offsetToTimezone[(new Date()).getTimezoneOffset()]; | |
} | |
}; | |
// compute (new Date()).getTimezoneOffset value for all timezones, store in tzdetect.offsetToTimezone | |
(function(tzdetect){ | |
var outp = {}, |
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
/** | |
* PLEASE READ: | |
* This is a very simple implementation of Eulers method for | |
* numerically solving coupled differential equations, used | |
* in an article of mine. It outputs the data in a CSV format | |
* (which is plaintext). | |
* | |
* To run the code, press F12, go to the Console tab of the window | |
* that opens, and paste the code (that's everything with the | |
* line numbers, as seen to the left, beside it) in there. |
This file has been truncated, but you can view the full file.
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
[{"pid":5115,"tid":2,"ts":55785933982,"ph":"X","cat":"toplevel","name":"MessagePumpLibevent::OnLibeventNotification","args":{"fd":218},"dur":63,"tdur":59,"tts":50664}, | |
{"pid":5115,"tid":2,"ts":55785934013,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInputData","args":{"class":61,"line":61},"dur":26,"tdur":25,"tts":50693,"bind_id":"0x4caa5302","flow_in":true}, | |
{"pid":5115,"tid":2,"ts":55786434450,"ph":"X","cat":"toplevel","name":"MessagePumpLibevent::OnLibeventNotification","args":{"fd":218},"dur":39,"tdur":37,"tts":50743}, | |
{"pid":5115,"tid":2,"ts":55786434464,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInputData","args":{"class":61,"line":61},"dur":21,"tdur":20,"tts":50756,"bind_id":"0x4caa7d02","flow_in":true}, | |
{"pid":5115,"tid":2,"ts":55786934731,"ph":"X","cat":"toplevel","name":"MessagePumpLibevent::OnLibeventNotification","args":{"fd":218},"dur":45,"tdur":43,"tts":50797}, | |
{"pid":5115,"tid":2,"ts":55786934747,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInpu |
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 watchPath = "test/"; | |
var found = (function(){ | |
var hist = {}, | |
done = false, | |
timer; | |
return function found(path){ | |
if (done) { | |
console.log("Already checked. Please rerun."); | |
return; |
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
Native: rename bin | |
Raw: rename - bin - { watchedPath: 'test/' } | |
Native: rename bin | |
Raw: rename - bin - { watchedPath: 'test/' } | |
Native: rename lib | |
Raw: rename - lib - { watchedPath: 'test/' } | |
Native: rename lib | |
Raw: rename - lib - { watchedPath: 'test/' } | |
Native: rename node_modules | |
Raw: rename - node_modules - { watchedPath: 'test/' } |
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 readdirp = require('readdirp'); | |
let filtered = {}; | |
let added = {}; | |
function filter(entry){ | |
filtered[entry.fullPath] = true; | |
return true; | |
} | |
readdirp({ |
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 CNF: | |
def __init__(self, filename): | |
self.file = open(filename, "w") | |
self.clauses = [] | |
self.variables = 0 | |
def add(self, clause): | |
# takes a list of variables, adds it as a clause to our output | |
#print("Adding clause", clause) | |
self.clauses.append(" ".join([str(x) for x in clause])+" 0\n") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
INSERT INTO Tournaments (name, prize, date) VALUES | |
('Intel Extreme Masters XII - World Championship', 250000, '2018-02-27'), | |
('StarLadder & i-League StarSeries Season 4', 130000, '2018-02-17'), | |
('ELEAGUE Major: Boston 2018', 500000, '2018-01-12'), | |
('Esports Championship Series Season 4 - Finals', 250000, '2017-12-15'), | |
('ESL Pro League Season 6 - Finals', 225000, '2017-12-05'); | |
INSERT INTO Teams (name, country) VALUES | |
('Astralis', 'DK'), | |
('mousesports', 'EU'), |
OlderNewer