Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
For UTF8, a replacement character for each buffered byte of a (partial) character needs to be added to the output.
function utf8End(buf) { var r = buf && buf.length ? this.write(buf) : ''; if (this.lastNeed) return r + '\uFFFD'.repeat(this.lastTotal - this.lastNeed); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString('utf8',i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString('utf8',i,end);}// For UTF-8, a replacement character is added when ending on a partial",...
[ "0.7265392", "0.7265392", "0.6905704", "0.6905704", "0.6795985", "0.6454713", "0.6172159", "0.6003483", "0.5962663", "0.5959326", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "0.5916007", "...
0.0
-1
UTF16LE typically needs two bytes per character, but even if we have an even number of bytes available, we need to check if we end on a leading/high surrogate. In that case, we need to wait for the next two bytes in order to decode the last character properly.
function utf16Text(buf, i) { if ((buf.length - i) % 2 === 0) { var r = buf.toString('utf16le', i); if (r) { var c = r.charCodeAt(r.length - 1); if (c >= 0xD800 && c <= 0xDBFF) { this.lastNeed = 2; this.lastTotal = 4; this.lastChar[0] = buf[buf.length - 2]; this.last...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isUTF16 (data) {\n var i = 0\n var len = data && data.length\n var pos = null\n var b1, b2, next, prev\n\n if (len < 2) {\n if (data[0] > 0xFF) {\n return false\n }\n } else {\n b1 = data[0]\n b2 = data[1]\n if (b1 === 0xFF && // BOM (little-endian)\n ...
[ "0.69672346", "0.6922697", "0.6922697", "0.6817192", "0.6748142", "0.6748142", "0.6737076", "0.6737076", "0.6728251", "0.6642958" ]
0.0
-1
For UTF16LE we do not explicitly append special replacement characters if we end on a partial character, we simply let v8 handle that.
function utf16End(buf) { var r = buf && buf.length ? this.write(buf) : ''; if (this.lastNeed) { var end = this.lastTotal - this.lastNeed; return r + this.lastChar.toString('utf16le', 0, end); } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $lrG1$var$utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.len...
[ "0.61745626", "0.61719906", "0.61677617", "0.6157869", "0.6157869", "0.6081929", "0.6043509", "0.58793575", "0.58793575", "0.5811206", "0.5811206", "0.5811206", "0.5811206", "0.5811206", "0.5811206", "0.5811206", "0.5790016", "0.5790016", "0.5742851", "0.570861", "0.5700932",...
0.0
-1
Pass bytes on through for singlebyte encodings (e.g. ascii, latin1, hex)
function simpleWrite(buf) { return buf.toString(this.encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utf8CheckExtraBytes(self,buf,p){if((buf[0]&0xC0)!==0x80){self.lastNeed=0;return\"\\uFFFD\";}if(self.lastNeed>1&&buf.length>1){if((buf[1]&0xC0)!==0x80){self.lastNeed=1;return\"\\uFFFD\";}if(self.lastNeed>2&&buf.length>2){if((buf[2]&0xC0)!==0x80){self.lastNeed=2;return\"\\uFFFD\";}}}}// Attempts to complete...
[ "0.6349106", "0.6320545", "0.6203621", "0.6178444", "0.6119716", "0.60451204", "0.595599", "0.5950051", "0.59132457", "0.59132457", "0.59132457", "0.5899401", "0.5895261", "0.58929884", "0.5869207", "0.5869207", "0.5869207", "0.5869207", "0.5787332", "0.5768909", "0.57253253"...
0.0
-1
Removes 0x from a given String
function stripHexPrefix(str) { if (typeof str !== 'string') { return str; } return isHexPrefixed(str) ? str.slice(2) : str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strip0x(hex) {\n if (typeof hex === 'undefined') return '';\n if (typeof hex === 'string' && hex.indexOf('0x') === 0) {\n return hex.slice(2).toString();\n }\n return hex.toString();\n}", "function strip0x(hex) {\n if (typeof hex === 'undefined')\n return '';\n if (typeof hex === 'st...
[ "0.7889725", "0.78876233", "0.7152076", "0.7152076", "0.7152076", "0.7152076", "0.7152076", "0.7152076", "0.7094743", "0.7094743", "0.7094743", "0.7094743", "0.7094743", "0.7094743", "0.7094743", "0.7094743", "0.70499325", "0.70463914", "0.69749254", "0.67041767", "0.66904837...
0.7123923
8
alternative to using Object.keys for old browsers
function copyProps(src, dst) { for (var key in src) { dst[key] = src[key]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getKeys(obj) {\n return Object.keys(obj); // Yes it is builtin!\n }", "function Object_keys(obj) {\n\t if (Object.keys) return Object.keys(obj)\n\t else {\n\t var res = [];\n\t for (var key in obj) res.push(key);\n\t return res;\n\t }\n\t}", "function keys(obj){\n return Object....
[ "0.7382736", "0.7311627", "0.723966", "0.7199875", "0.7199875", "0.7199875", "0.7199875", "0.7199875", "0.7199875", "0.7199875", "0.7199875", "0.7199875", "0.7109948", "0.69957906", "0.69584274", "0.6930815", "0.6926222", "0.6915537", "0.6879077", "0.68776375", "0.686874", ...
0.0
-1
increments counter inside inner
function incrementCounter() { for (var i = innerLen - 1; i >= innerLen - 4; i--) { inner[i]++; if (inner[i] <= 0xff) return; inner[i] = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inner() {\n return num++;\n }", "function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }", "function incrementCounter() {\n ...
[ "0.77618736", "0.74416184", "0.74416184", "0.74416184", "0.74340457", "0.73745996", "0.7347063", "0.72372717", "0.72120374", "0.71709335", "0.71709335", "0.71709335", "0.71080846", "0.7096185", "0.7084882", "0.7064063", "0.70378286", "0.69863284", "0.6966228", "0.69315726", "...
0.7374574
6
prototype class for hash functions
function Hash(blockSize, finalSize) { this._block = Buffer.alloc(blockSize); this._finalSize = finalSize; this._blockSize = blockSize; this._len = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Hash() {}", "function Hash() {}", "function Hash() {\r\n}", "function Hashers() {\n}", "GetHashCode() {\n\n }", "_generateHash() {\n\n }", "hash() {\n return this.is()\n }", "function Hasher()\n{\n this.truckHash = {};\n}", "calculateHash(){\n return SHA256(this.index + this.pr...
[ "0.8444925", "0.8444925", "0.8012337", "0.7593274", "0.7441991", "0.7378374", "0.73555523", "0.7269683", "0.71957415", "0.718947", "0.7186965", "0.71654564", "0.7144473", "0.71247315", "0.70964617", "0.7088249", "0.70709276", "0.7060434", "0.70601094", "0.7054379", "0.702781"...
0.0
-1
oldstyle streams. Note that the pipe method (the only relevant part of this class) is overridden in the Readable class.
function Stream() { EE.call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pipe(stream) {\n var cache, scope = this;\n if(stream) {\n // add to the pipeline\n this.fuse(stream);\n // ensure return values are also added to the pipeline\n cache = stream.pipe;\n stream.pipe = function(/* dest */) {\n // restore cached method when called\n this.pipe = cach...
[ "0.7391187", "0.71942365", "0.69006467", "0.6534597", "0.649291", "0.6412553", "0.6313477", "0.628901", "0.628393", "0.628393", "0.6232855", "0.6213001", "0.61951864", "0.6182298", "0.6182298", "0.6138871", "0.612683", "0.61039245", "0.61039245", "0.60856295", "0.60470706", ...
0.0
-1
don't leave dangling pipes when there are errors.
function onerror(er) { cleanup(); if (EE.listenerCount(this, 'error') === 0) { throw er; // Unhandled stream error in pipe. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function brokenPipe() {\n throw Error('artoo.asyncStore: broken pipe.');\n }", "function onerror(error) {\n cleanup();\n if (!hasListeners(this, 'error'))\n throw error; // Unhandled stream error in pipe.\n }", "function onerror(er){debug(\"onerror\",er);unpipe();dest.removeListener(\"e...
[ "0.69866925", "0.6516497", "0.6399389", "0.6383316", "0.63701004", "0.63701004", "0.63701004", "0.63701004", "0.63701004", "0.6333437", "0.6292604", "0.6285128", "0.6285128", "0.6274714", "0.6233449", "0.62333864", "0.6221305", "0.62146306", "0.62146306", "0.62146306", "0.621...
0.0
-1
remove all the event listeners that were added.
function cleanup() { source.removeListener('data', ondata); dest.removeListener('drain', ondrain); source.removeListener('end', onend); source.removeListener('close', onclose); source.removeListener('error', onerror); dest.removeListener('error', onerror); source.removeListener('end', cle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "_clearListeners() {\n for (let liste...
[ "0.8521039", "0.8521039", "0.8521039", "0.8423259", "0.8304111", "0.8296624", "0.8282094", "0.8274838", "0.82720345", "0.8261525", "0.81342524", "0.8060971", "0.8031993", "0.7983937", "0.7970812", "0.7962308", "0.7867754", "0.78554255", "0.7834158", "0.77878404", "0.77458024"...
0.0
-1
Note: difference from C smlen returned, not passed as argument.
function crypto_sign(sm, m, n, sk) { var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); var i, j, x = new Float64Array(64); var p = [gf(), gf(), gf(), gf()]; crypto_hash(d, sk, 32); d[0] &= 248; d[31] &= 127; d[31] |= 64; var sml...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_stringLength(s) { return s.length; }", "function lengthOfTheLongestSubstringThatContainsAtMost(s, k) {\n // Your code here\n}", "function get_key(stype, ctype) {\r\n return (stype * 65536 + ctype);\r\n}", "function mqcaLen(s, nameCount) {\n log.traceEntry('mqcaLen', \"attr:%d\", s);\n var r...
[ "0.5772413", "0.5524705", "0.55153906", "0.54178804", "0.53638273", "0.53512657", "0.53341514", "0.5325894", "0.5317365", "0.5317365", "0.5304874", "0.5216951", "0.5216951", "0.51967674", "0.5165042", "0.5137512", "0.51268816", "0.50942016", "0.50879025", "0.50879025", "0.508...
0.49434856
70
format a parsed object into a url string
function urlFormat(obj) { // ensure it's an object, and not a string url. // If it's an obj, this is a no-op. // this way, you can call url_format() on strings // to clean up potentially wonky urls. if (util.isString(obj)) obj = urlParse(obj); if (!(obj instanceof Url)) return Url.prototype.format.call(obj)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urlFormat(obj) {\n\t // ensure it's an object, and not a string url.\n\t // If it's an obj, this is a no-op.\n\t // this way, you can call url_format() on strings\n\t // to clean up potentially wonky urls.\n\t if (util_11(obj)) obj = parse$1({}, obj);\n\t return format(obj);\n\t}", "function urlFo...
[ "0.7634554", "0.7633261", "0.76041514", "0.7599994", "0.75834167", "0.7559971", "0.7553888", "0.7549819", "0.7520917", "0.7520917", "0.74891424", "0.74868375", "0.74493414", "0.74185044", "0.74185044", "0.74185044", "0.74185044", "0.74185044", "0.74185044", "0.74185044", "0.7...
0.0
-1
NOTE: These type checking functions intentionally don't use `instanceof` because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) { return Array.isArray(ar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOfType(obj, type) {\n obj = Object(obj)\n return typeof type === \"string\"\n ? obj.constructor.name === type\n : obj instanceof type\n}", "function isType(obj, type) {\n return obj instanceof type\n}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "functio...
[ "0.639718", "0.63863194", "0.63592416", "0.63453543", "0.63185567", "0.62965316", "0.6277247", "0.62704825", "0.6231414", "0.62198436", "0.6205334", "0.6204304", "0.6196526", "0.616023", "0.61118853", "0.6053214", "0.60388887", "0.6038773", "0.60224813", "0.6019567", "0.60169...
0.0
-1
INITIALIZE Tests if smooth scrolling is allowed. Shuts down everything if not.
function initTest() { var disableKeyboard = false; // disable keyboard support if anything above requested it if (disableKeyboard) { removeEvent("keydown", keydown); } if (options.keyboardSupport && !disableKeyboard) { addEvent("keydown", keydown); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(){\n\tnew SmoothScroll(document,200,2)\n}", "function smoothScrollInit() {\r\n\r\n\t \t\t\t\t// Smooth scroll\r\n\t\t $('a[href^=\"#\"]').bind('click.smoothscroll',function (e) {\r\n\t\t e.preventDefault();\r\n\r\n\t\t var target = this.hash,\r\n\t\t ...
[ "0.6717106", "0.6269612", "0.6171443", "0.6084328", "0.60526973", "0.60436183", "0.6042544", "0.60187334", "0.59973747", "0.59708804", "0.59100354", "0.5904702", "0.5892736", "0.58738875", "0.5859428", "0.5828786", "0.58107936", "0.58104765", "0.5796963", "0.57806456", "0.578...
0.0
-1
Sets up scrolls array, determines if frames are involved.
function init() { if (!document.body) return; var body = document.body; var html = document.documentElement; var windowHeight = window.innerHeight; var scrollHeight = body.scrollHeight; // check compat mode for root element root = (document.compatMode.indexOf('CSS') >= 0) ? html : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CameraCommand_Scroll_Initialise()\n{\n\t//remember camera state to restore it later\n\tthis.IsShowingCamera = this.Camera && this.Camera.CameraUI.IsShowing;\n\t//ensure that the target's form is active\n\tForm_SetFocusOnParentWindow(this.TargetHTML);\n\t//loop through all the parents of the html target\n\...
[ "0.63181925", "0.6290658", "0.6263272", "0.62566733", "0.6225962", "0.621694", "0.61085737", "0.6094833", "0.608676", "0.6049039", "0.60014534", "0.5986989", "0.598587", "0.59653527", "0.59467876", "0.5933924", "0.5924363", "0.5911742", "0.5894068", "0.58492404", "0.584578", ...
0.54242676
96
Pushes scroll actions to the scrolling queue.
function scrollArray(elem, left, top, delay) { delay || (delay = 1000); directionCheck(left, top); if (options.accelerationMax != 1) { var now = +new Date; var elapsed = now - lastScroll; if (elapsed < options.accelerationDelta) { var factor = (1 + (30 / elapsed)) /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dispatch() {\n var currScrollTop = window.pageYOffset;\n\n var appSectionHeight = $('#app-section-1').height();\n\n var scrollInfo = {\n windowHeight: appSectionHeight,\n scrollHeight: $(document.body).prop('scrollHeight'),\n scrollTop: currScrollTop,\n directi...
[ "0.6285056", "0.60334843", "0.59531695", "0.59531695", "0.5939761", "0.5939761", "0.5897734", "0.5850394", "0.57792956", "0.57792956", "0.5772229", "0.57711375", "0.57556874", "0.57456005", "0.57375705", "0.5733483", "0.5733483", "0.56984425", "0.5676571", "0.5644397", "0.563...
0.58254206
12
Mousedown event only for updating activeElement
function mousedown(event) { activeElement = event.target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mousedown(event) {\n activeElement = event.target;\n }", "function mousedown(event) {\n activeElement = event.target;\n }", "function mousedown(event) {\r\n activeElement = event.target;\r\n}", "function mousedown(event) {\r\n activeElement = event...
[ "0.8798445", "0.87899625", "0.8754566", "0.8754566", "0.8754566", "0.8754566", "0.8754189", "0.8754189", "0.8754189", "0.8190667", "0.66085976", "0.6604286", "0.6601424", "0.6601424", "0.65757895", "0.65757895", "0.65397", "0.6478562", "0.644599", "0.64423376", "0.6441396", ...
0.875648
8
PULSE Viscous fluid with a pulse for part and decay for the rest. Applies a fixed force over an interval (a damped acceleration), and Lets the exponential bleed away the velocity over a longer interval Michael Herf,
function pulse_(x) { var val, start, expx; // test x = x * options.pulseScale; if (x < 1) { // acceleartion val = x - (1 - Math.exp(-x)); } else { // tail // the previous animation ended here: start = Math.exp(-1); // simple viscous drag x -= 1; ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Pulse_(x)\n{\n var val;\n \n // test\n x = x * PulseScale;\n if (x < 1) {val = x - (1 - Math.exp(-x));} \n else {\n // the previous animation ended here:\n var start = Math.exp(-1);\n\n // simple viscous drag\n x -= 1;\n var expx = 1 - Math.exp(-x);\n val = start + (expx * (1.0 - s...
[ "0.6353916", "0.6190333", "0.6190333", "0.6190333", "0.6190333", "0.6103519", "0.60786045", "0.6076984", "0.6041115", "0.6041115", "0.6019466", "0.59089136", "0.5852997", "0.5799964", "0.5564951", "0.54653883", "0.54381216", "0.54291767", "0.5386268", "0.5377888", "0.53723305...
0.6131315
10
CONCATENATED MODULE: ./node_modules/vuestyleloader/lib/listToStyles.js Translates the list format produced by cssloader into something easier to manipulate.
function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: medi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id...
[ "0.6929006" ]
0.0
-1
Try/catch helper to minimize deoptimizations. Returns a completion record like context.tryEntries[i].completion. This interface could have been (and was previously) designed to take a closure to be invoked without arguments, but in all the cases we care about we already have an existing method we want to call, so there...
function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryCatch(fn, obj, arg) { // 59\n try { // 60\n return { type: \"normal\", arg: fn.call(obj, arg) }; ...
[ "0.50696796", "0.5059458", "0.4847744", "0.4790416", "0.4790416", "0.4790416", "0.4790416", "0.4790416", "0.47844028", "0.47844028", "0.470539", "0.46897522", "0.46689764", "0.46565467", "0.46565467", "0.46565467", "0.46538404", "0.46371102", "0.46231273", "0.461268", "0.4612...
0.0
-1
Dummy constructor functions that we use as the .constructor and .constructor.prototype properties for functions that return Generator objects. For full spec compliance, you may wish to configure your minifier not to mangle the names of these two functions.
function Generator() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tempCtor() {}", "function temporaryConstructor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function HelperConstructor() {}", "function DummyClass() {\r\n // ...
[ "0.7217103", "0.70240223", "0.6951494", "0.6951494", "0.6951494", "0.6951494", "0.6951494", "0.6951494", "0.6760924", "0.66002876", "0.6571959", "0.6571959", "0.6571959", "0.64858365", "0.644378", "0.6400115", "0.63952774", "0.6378302", "0.6378302", "0.633828", "0.6275942", ...
0.0
-1
Helper for defining the .next, .throw, and .return methods of the Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function(method) { prototype[method] = function(arg) { return this._invoke(method, arg); }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg);};});}", "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return th...
[ "0.7482408", "0.7482408", "0.7482408", "0.7482408", "0.7482408", "0.7482408", "0.71797216", "0.6995967", "0.6995967", "0.6974173", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69680876", "0.69...
0.0
-1
From FvD 13.37, CSS Color Module Level 3
function hsl2rgb(h, m1, m2) { return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Colour(){\n\n /* Returns an object representing the RGBA components of this Colour. The red,\n * green, and blue components are converted to integers in the range [0,255].\n * The alpha is a value in the range [0,1].\n */\n this.getIntegerRGB = function(){\n\n // get the RGB components of this ...
[ "0.7089194", "0.7050894", "0.70180076", "0.6918326", "0.69088155", "0.6865348", "0.6787769", "0.6779162", "0.67433536", "0.6725297", "0.6723463", "0.6701248", "0.66937774", "0.66653216", "0.6639698", "0.66359454", "0.66359454", "0.66359454", "0.66295534", "0.66295534", "0.662...
0.0
-1
CONCATENATED MODULE: ./node_modules/d3zoom/src/zoom.js Ignore rightclick, since that should open the context menu.
function defaultFilter() { return !on_event.ctrlKey && !on_event.button; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableRightClick() {\n // stop zoom\n if (d3.event.button == 2) {\n console.log('No right click allowed');\n d3.event.stopImmediatePropagation();\n }\n }", "function zoom_actions() {\n inner.attr('transform', d3.zoomTransform(svg.node()));\n }", "function enableClickZoom (...
[ "0.68682355", "0.6590456", "0.6555861", "0.6525897", "0.64211947", "0.6409633", "0.63698554", "0.63642365", "0.627119", "0.6262157", "0.6187169", "0.6143611", "0.6137548", "0.61272603", "0.61163515", "0.61163515", "0.61087805", "0.6100864", "0.602034", "0.6018764", "0.6001197...
0.0
-1
CONCATENATED MODULE: ./node_modules/d3drag/src/drag.js Ignore rightclick, since that should open the context menu.
function drag_defaultFilter() { return !on_event.ctrlKey && !on_event.button; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CdkDragDrop() {}", "function CdkDragDrop() {}", "function disableRightClick() {\n // stop zoom\n if (d3.event.button == 2) {\n console.log('No right click allowed');\n d3.event.stopImmediatePropagation();\n }\n }", "drag(ev) {\n // console.log('drag')\n }", "onMouseDown(eve...
[ "0.6623259", "0.6623259", "0.6569861", "0.6364385", "0.6317839", "0.6317839", "0.6297875", "0.6256062", "0.6231483", "0.6231483", "0.61838925", "0.61521536", "0.61396873", "0.60389614", "0.6032357", "0.60306025", "0.60285634", "0.60076916", "0.5992657", "0.59607285", "0.59484...
0.0
-1
CONCATENATED MODULE: ./node_modules/d3drag/src/index.js CONCATENATED MODULE: ./src/js/d3.js CONCATENATED MODULE: ./node_modules/d3hierarchy/src/hierarchy/count.js
function count(node) { var sum = 0, children = node.children, i = children && children.length; if (!i) sum = 1; else while (--i >= 0) sum += children[i].value; node.value = sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function r(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "function find_dep (obj) {\n //TODO include require\n //TODO include other formating (like other spaces etc)\n const DepPattern = /const (.*) = require\\((.*)\\)/g\n //TODO include var and let\...
[ "0.5088819", "0.49495324", "0.49365926", "0.4926473", "0.49225572", "0.49225572", "0.49225572", "0.49225572", "0.49084696", "0.48948702", "0.4890869", "0.48647508", "0.48628497", "0.48628497", "0.48604384", "0.48559484", "0.48520806", "0.48473853", "0.4840869", "0.4840603", "...
0.0
-1
Create a layout function with customizable options. Per D3style, the options can be set at any time using setter methods. The layout function will compute the tree node positions based on the options in effect at the time it is called.
function flextree(options) { const opts = Object.assign({}, defaults, options); function accessor(name) { const opt = opts[name]; return typeof opt === 'function' ? opt : () => opt; } function layout(tree) { const wtree = wrap(getWrapper(), tree, node=>node.children); wtree.update(); return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(nodes, edges, layout_options = {}) {\n this._nodes = nodes;\n this._edges = edges;\n const margin = 0.05;\n const center = [0.5, 0.5];\n let defaults = {\n margin: 0.05,\n direction: 'left-right',\n ordering: 'degree', // \"topological\" for degree which also considers the...
[ "0.594175", "0.570465", "0.5599043", "0.551686", "0.5472774", "0.54013574", "0.53722364", "0.53655535", "0.5347105", "0.5330697", "0.53190005", "0.53070515", "0.52506804", "0.5198676", "0.5178814", "0.51215607", "0.50973773", "0.5085926", "0.5070829", "0.5064705", "0.5060744"...
0.5310881
11
CONCATENATED MODULE: ./node_modules/vueloader/lib/runtime/componentNormalizer.js / globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __vue_normalize__(a,b,c,d,e){var f=(\"function\"==typeof c?c.options:c)||{};// For security concerns, we use only base name in production mode.\nreturn f.__file=\"/Users/hadefication/Packages/vue-chartisan/src/components/Pie.vue\",f.render||(f.render=a.render,f.staticRenderFns=a.staticRenderFns,f._compile...
[ "0.6743542", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "0.6495445", "...
0.0
-1
Get product data from the database
function loadManagerMenu() { connection.query("SELECT * FROM products", function(err, res) { if (err) throw err; // Load the possible manager menu options, pass in the products data loadManagerOptions(res); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "viewProduct(product) {\n const queryString = `SELECT * FROM products\n WHERE products.id = $1`;\n\n const queryParams = [product.productId];\n\n return db\n .query(queryString, queryParams)\n .then(result => result.rows)\n .catch(error => error.message)...
[ "0.74135166", "0.7397718", "0.7285445", "0.7258316", "0.7221496", "0.70489645", "0.70213825", "0.70185035", "0.7010617", "0.6964359", "0.6938664", "0.6926935", "0.6897097", "0.68968654", "0.6894156", "0.6872055", "0.6860494", "0.6858464", "0.6849977", "0.68458664", "0.6843554...
0.0
-1
Load the manager options and pass in the products data from the database
function loadManagerOptions(products) { inquirer .prompt({ type: "list", name: "choice", choices: ["View Products for Sale", "View Low Inventory", "Add to Inventory", "Add New Product", "Quit"], message: "What would you like to do?" }) .then(function(val) { switch (val.choice...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadManagerMenu() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n // Load the possible manager menu options, pass in the products data\n loadManagerOptions(res);\n });\n}", "function loadProducts(){\n productService.products().then(function(dat...
[ "0.7912322", "0.6667471", "0.65612525", "0.6275276", "0.5970383", "0.5944314", "0.59027195", "0.5858497", "0.5839634", "0.58368176", "0.5716678", "0.5688853", "0.5637833", "0.56372535", "0.5616354", "0.55463713", "0.5527941", "0.55279344", "0.55056334", "0.5466246", "0.544949...
0.7337389
1
Query the DB for low inventory products
function loadLowInventory() { // Selects all of the products that have a quantity of 5 or less connection.query("SELECT * FROM products WHERE stock_quantity <= 5", function(err, res) { if (err) throw err; // Draw the table in the terminal using the response, load the manager menu console.table(res); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewLowInventory() {\n\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\t// console.log(res)\n\t\tif(err) {\n\t\t\tthrow err\n\t\t};\n\t\t\n\t\tvar enoughStocked = true;\n\n\t\tfor (var j = 0; j < res.length; j++) {\n\t\t\tif (res[j].stock_quantity < 5) {\n\t\t\t\tenoughStocked = fal...
[ "0.82842684", "0.8082062", "0.8058224", "0.80196536", "0.7987542", "0.7914033", "0.7905745", "0.7879375", "0.7877785", "0.7873546", "0.78461874", "0.78351957", "0.7827155", "0.78263474", "0.77651983", "0.7688713", "0.7686559", "0.76559913", "0.76559144", "0.7642595", "0.76354...
0.7641846
20
Prompt the manager for a product to replenish
function addToInventory(inventory) { console.table(inventory); inquirer .prompt([ { type: "input", name: "choice", message: "What is the ID of the item you would you like add to?", validate: function(val) { return !isNaN(val); } } ]) .then(fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function productSelection(){\n inquirer.prompt([\n {\n name: \"id\",\n message: \"What product do you want? Provide the Item id:\"\n },\n {\n name: \"quantity\",\n message: \"How Many Do you Want?\"\n },\n {\n type: \"confirm\",\n name: \"confirm\",\n message: \"A...
[ "0.75167584", "0.74697316", "0.72961533", "0.7224598", "0.7200978", "0.7200733", "0.7108153", "0.70953923", "0.70540994", "0.70534587", "0.70421845", "0.69211006", "0.6889511", "0.6852595", "0.6850228", "0.6825651", "0.68185544", "0.680233", "0.6796497", "0.6786283", "0.67357...
0.0
-1
Ask for the quantity that should be added to the chosen product
function promptManagerForQuantity(product) { inquirer .prompt([ { type: "input", name: "quantity", message: "How many would you like to add?", validate: function(val) { return val > 0; } } ]) .then(function(val) { var quantity = parseInt(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseQuantity() {\n inq.prompt([{\n type: 'input',\n name: 'quantity',\n message: '\\nPlease enter the number of units to add',\n }]).then(function(inqRes) {\n // This value is for later use\n quantityToAdd = parseInt(inqRes.quantity);\n // This value is for updating t...
[ "0.78015405", "0.7539885", "0.7479968", "0.7436117", "0.74261", "0.7383619", "0.73595405", "0.7358597", "0.73531216", "0.7321985", "0.7309883", "0.73000443", "0.7295558", "0.7275884", "0.7219577", "0.7183741", "0.7182451", "0.7157939", "0.7123876", "0.70927566", "0.7075984", ...
0.78353786
0
Updates quantity of selected product
function addQuantity(product, quantity) { connection.query( "UPDATE products SET stock_quantity = ? WHERE item_id = ?", [product.stock_quantity + quantity, product.item_id], function(err, res) { // Let the user know the purchase was successful, re-run loadProducts console.log("\nSuccessfully a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateQuantity() {\n var query = connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: updatedStock\n },\n {\n item_id: answer.userId\n }\n ],\n )...
[ "0.77198535", "0.7709397", "0.7511506", "0.7437494", "0.74089575", "0.73848474", "0.7300367", "0.7298138", "0.72644216", "0.72087187", "0.7202309", "0.71929413", "0.71791947", "0.7174978", "0.71596086", "0.71507335", "0.71486235", "0.71149206", "0.7064696", "0.70596015", "0.7...
0.75029546
3
Asks the manager details about the new product Adds new product to the db when complete
function promptManagerForNewProduct(products) { inquirer .prompt([ { type: "input", name: "product_name", message: "What is the name of the product you would like to add?" }, { type: "list", name: "department_name", choices: getDepartments(products...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newProduct (err, results) {\n if (err) {\n console.log(err)\n }\n console.log(`New product added, Product ID = ${results.insertId}`)\n mainMenu()\n}", "function addNewProduct(val) {\n connection.query(\n \"INSERT INTO products (product_name, department_name, price, stock_quantity) VALUES (?, ...
[ "0.7355503", "0.7227053", "0.71364427", "0.70449144", "0.70327437", "0.69944066", "0.6858686", "0.6840742", "0.6838159", "0.68348765", "0.68167734", "0.6809378", "0.6805562", "0.6798643", "0.6797127", "0.6746408", "0.67143726", "0.67108625", "0.6704818", "0.6697895", "0.66939...
0.7057045
3
Adds a new product to the database, loads the manager menu
function addNewProduct(val) { connection.query( "INSERT INTO products (product_name, department_name, price, stock_quantity) VALUES (?, ?, ?, ?)", [val.product_name, val.department_name, val.price, val.quantity], function(err, res) { if (err) throw err; console.log(val.product_name + " ADDED T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newProduct (err, results) {\n if (err) {\n console.log(err)\n }\n console.log(`New product added, Product ID = ${results.insertId}`)\n mainMenu()\n}", "function loadManagerMenu() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n // Load the possi...
[ "0.7364068", "0.6874185", "0.6729026", "0.67250264", "0.650847", "0.6484515", "0.6274437", "0.62658936", "0.6132553", "0.61250466", "0.61112756", "0.610945", "0.6091191", "0.60139006", "0.6007783", "0.5993611", "0.5982465", "0.5978315", "0.59469867", "0.5946747", "0.59434694"...
0.7084908
1
Take an array of product objects, return an array of their unique departments
function getDepartments(products) { var departments = []; for (var i = 0; i < products.length; i++) { if (departments.indexOf(products[i].department_name) === -1) { departments.push(products[i].department_name); } } return departments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUnique2(arr) {\n let tempArr = arr.reduce((gather , current) => {\n gather.add(current.company);\n return gather\n }, new Set()) \n // OUTPUT\n return [...tempArr] \n \n}", "function getUnique3(arr) {\n return [...arr.reduce((gather , current) => {\n gather.add(...
[ "0.6460275", "0.64592206", "0.6371784", "0.612898", "0.6101002", "0.5992127", "0.5941811", "0.5899402", "0.58575755", "0.58468294", "0.58458644", "0.58180094", "0.5814035", "0.57421064", "0.5731082", "0.57278883", "0.57278883", "0.57278883", "0.57278883", "0.57278883", "0.572...
0.71909887
0
Check to see if the product the user chose exists in the inventory
function checkInventory(choiceId, inventory) { for (var i = 0; i < inventory.length; i++) { if (inventory[i].item_id === choiceId) { // If a matching product is found, return the product return inventory[i]; } } // Otherwise return null return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkInventory(chosenItemId, inventory) {\n // loop through the inventory, and check if the user ID-input matches any IDs in the database\n for (let i = 0; i < product.length; i++) {\n // if it matches, then return the item\n if (inventory[i].id === chosenItemId) {\n return ...
[ "0.7601303", "0.712073", "0.7018199", "0.70141375", "0.70021194", "0.69821376", "0.6933764", "0.69245327", "0.6900151", "0.67542666", "0.661", "0.66061205", "0.6596743", "0.6545932", "0.6517005", "0.6489719", "0.6463005", "0.63997686", "0.63905644", "0.63800263", "0.63727635"...
0.67501634
10
import RootRoute from './RootRouter';
function Router() { return ( <NavigationContainer> <AuthRoute /> </NavigationContainer> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Root() {\n return (\n <Router history={hashHistory} routes={routes} />\n );\n}", "function App() {\n return (\n\n <div className=\"App\">\n <Router>\n <AppRoutes />\n </Router>\n </div>\n\n );\n}", "function App() {\n return (\n <Router> \n <Route path='/'...
[ "0.7303722", "0.6971873", "0.6863466", "0.6799434", "0.6765403", "0.66777235", "0.6667506", "0.6656719", "0.66299665", "0.66296023", "0.66030216", "0.6574356", "0.6569497", "0.6555372", "0.6542504", "0.653201", "0.6527956", "0.65251213", "0.6516192", "0.6514471", "0.65046895"...
0.0
-1
========================================= SETUP ========================================= /========================================= START OF A STAR ALGORITHM =========================================
function reconstructPath(cell, end = false) { const origin = cell.cameFrom; // include cell if end end && totalPath.push(cell); if (origin) { totalPath.push(origin); return reconstructPath(origin); } // reconstruct path backwards totalPath.forEach((currentCell, i) => { setTimeout(() => { color(path, cu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "started () {}", "function start() {\n flag1 = 0;\n flag2 = 0;\n flag3 = 0;\n type = -1;\n\n if (count == 1) {\n aStarSearch(source, dest, grid);\n aStarSearch(source, dest1, grid);\n } else aStarSearch(source, dest, grid);\n}", "function start() { \n initiate_graph_builder();\n initiate_job_i...
[ "0.6217912", "0.6115493", "0.6102366", "0.6081186", "0.60664976", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.6038372", "0.60060245", "0.60060245", "0.60060245", "0.60060245", "0.60060245", "0.6006024...
0.0
-1
Display the account registration form based on account type selected: User/Admin
render() { if (this.state.redirectMain === true){ return <Redirect to='/' props={this.props}/> } return ( <div className="mainpage"> Create Account Page <div className="back"> </div> <div className="acctype"> <text>Select Your Account Type: </text> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showForm(type) {\n var factory = $('#user-factory');\n\n if (!factory.length) {\n $('article > *').hide();\n } else {\n factory.remove();\n }\n main.prepend(\n '<form id=\"user-factory\"><span id=\"form-name\">Register</span><br><label>' ...
[ "0.64508384", "0.6328676", "0.6319103", "0.6309801", "0.6307064", "0.6234938", "0.6156549", "0.6149695", "0.6139383", "0.6120384", "0.6086062", "0.59958094", "0.59080446", "0.59078074", "0.5800479", "0.5792521", "0.5778092", "0.57694495", "0.5768828", "0.5755393", "0.5755366"...
0.53350264
75
..... end of setNumberValue() .....
componentDidMount() { $('.arrow').html('&nbsp;'); if (Object.keys(this.props.punchCard).length > 0) this.loadEditData(this.props.punchCard); else { this.props.dispatch(resetPunchCardState()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setValue(value) {\n this.value = value;\n this.doubleNumber = this.value * 2;\n }", "function setNum1() {\n num1 = parseFloat(currentValue);\n updateCurrentValue(0);\n}", "function Numeral(number){this._value=number;}", "function setNumbers(value) {\n if (firstNumb == null) {\n firstNumb =...
[ "0.71869683", "0.6989551", "0.69499576", "0.68345094", "0.67036676", "0.66861635", "0.6635959", "0.66296005", "0.65974945", "0.6549476", "0.65463144", "0.6512378", "0.6482518", "0.6481894", "0.6453539", "0.6441774", "0.64234257", "0.63947004", "0.63810074", "0.63769096", "0.6...
0.0
-1
new File( FCGX_stream ) A wrapper class for the stdin, stdout and stderr streams. Behaves like JSEXT1.File, in that they both suck.
function File(stream) { this.stream = stream; this.closed = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function File() {}", "function fileFactory(arg) {\n\t// Files can be constructed from either a siapath or a status object\n\t// returned from /renter/files||downloads\n\tvar f = Object.create(file);\n\tif (typeof arg === 'object'){\n\t\tObject.assign(f, arg);\n\t\tf.path = arg.siapath;\n\t} else if (typeof arg =...
[ "0.64553577", "0.5953737", "0.5911366", "0.54722714", "0.54445946", "0.54445946", "0.542982", "0.5377941", "0.52176136", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "0.52116203", "...
0.708909
0
Adds data from just this particular movie to user's library of movies, not yet functioning
function clickToAdd(e) { var thisMovieImdbId = e.target.id; // grabs movie in search results from id on add button // var thisMovieImdbId = allResults[thisMovieId].imdbID; // grabs proper movie information given correct id $.ajax({ // Makes the next api request to get full listing on movie, not just s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(movie) {\n\t\tthis.push(movie);\n\t}", "async addToCollection(ctx, payload) {\n if(payload.id != false) {\n let movieArr = [];\n await axios.get('http://www.omdbapi.com/?i=' + payload.id + '&apikey='+key.key).then((response) => { movieArr = response.data });\n if(movieArr.Ra...
[ "0.6651736", "0.6579162", "0.65583414", "0.6465471", "0.63795197", "0.63528186", "0.633415", "0.62539405", "0.6243634", "0.62051666", "0.61961246", "0.61934054", "0.6137959", "0.6129992", "0.6104988", "0.6104322", "0.6099597", "0.60976714", "0.6095187", "0.6049739", "0.603564...
0.6370493
5
Add row banding for visibility,four columns to recieve purchase and return data, and validation column in last column for clearing function
function menuItem1() { var active = SpreadsheetApp.getActive(); var sheet = active.getActiveSheet(); var lastrow = sheet.getLastRow(); var stylehelper = ('A1:N' + lastrow) var stylerange = active.getRange(stylehelper); var approvalhelper = ('N2:N' + lastrow); var approvalrange = active.getRange(approvalhe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FillTblRows() {\n console.log( \"===== FillTblRows === \");\n console.log( \" selected_btn: \", selected_btn);\n console.log( \" selected: \", selected);\n\n const tblName = get_tblName_from_selectedBtn() // tblName = userapproval, usercompensation or userdata\n c...
[ "0.5888042", "0.5810216", "0.5794228", "0.5791945", "0.576805", "0.57284963", "0.5705764", "0.57037634", "0.560037", "0.55986404", "0.55757564", "0.5575717", "0.555854", "0.55203915", "0.5511384", "0.54872406", "0.5484344", "0.54772836", "0.5460157", "0.54513", "0.54491055", ...
0.567462
8
Calls name of company being edited on the Clearing Sheet
function ActiveCompanyNumber() { var sheet = SpreadsheetApp.getActive().getActiveSheet(); var activerow = sheet.getRange(sheet.getSelection().getCurrentCell().getRow(),1,1,1); var companynumber = activerow.getValue(); //Logger.log('Company name is ' + companyname); return companynumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redoSupplierName(){\n var result = ui.prompt(\n 'That name has benn used already:',\n 'Please enter a different Company Name:',\n ui.ButtonSet.OK_CANCEL);\n var button = result.getSelectedButton();\n var name = result.getResponseText();\n if (button == ui.Button.OK) {\n che...
[ "0.6491618", "0.60302633", "0.57515407", "0.5711537", "0.5687795", "0.5653336", "0.5639898", "0.562015", "0.56050307", "0.5572745", "0.5546801", "0.5524367", "0.5499475", "0.54499215", "0.54287386", "0.53941417", "0.5358751", "0.53516525", "0.53504443", "0.5336031", "0.531711...
0.5537261
11
Calls the row number of the Master List that contains the company name from above
function rowOfDocId(){ var sourcesheet = SpreadsheetApp.openById('1WQBEVDTyK8XvTG5BkMJMbqWMyKTf3aYuFjCQPuc23GI').getSheetByName('Client Master List'); var sourcevalues = sourcesheet.getDataRange().getValues(); var companynumber = ActiveCompanyNumber(); for (var i = 0; i < sourcevalues.length;i++){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _fnMasterIndexFromDisplay( iIndexAAData )\n\t\t{\n\t\t\tvar i = 0;\n\t\t\t\n\t\t\twhile ( _fnArrayCmp( _aaDataMaster[i], _aaData[iIndexAAData] ) != 0 )\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\treturn i;\n\t\t}", "function setRowNumber() {\n $self.find('td.js-row-no').each(function (i) {...
[ "0.59015757", "0.582749", "0.56275535", "0.5552082", "0.5541882", "0.5508874", "0.52934843", "0.52770174", "0.52656937", "0.5262539", "0.5236383", "0.52213454", "0.5197791", "0.51929027", "0.5188701", "0.51612115", "0.51605844", "0.5140835", "0.51210964", "0.5090196", "0.5082...
0.66159403
0
Retrieves the ID of the invoicing document related to the active company from above and sends it to onEdit function on prepareSheet.gs
function retrieveDocId(){ var masterrownum = rowOfDocId(); var mastersheet = SpreadsheetApp.openById('1WQBEVDTyK8XvTG5BkMJMbqWMyKTf3aYuFjCQPuc23GI'); var mastertab = mastersheet.getSheetByName('Client Master List'); var masterrange = mastertab.getRange(masterrownum, 6,1,1); var billingDocId = masterrange.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ActiveCompanyNumber() {\n var sheet = SpreadsheetApp.getActive().getActiveSheet();\n var activerow = sheet.getRange(sheet.getSelection().getCurrentCell().getRow(),1,1,1);\n var companynumber = activerow.getValue();\n //Logger.log('Company name is ' + companyname);\n return companynumber; \...
[ "0.5909847", "0.5637438", "0.5566653", "0.55170155", "0.55070364", "0.523841", "0.5217206", "0.51937413", "0.51513666", "0.5128671", "0.51016474", "0.5082699", "0.5046894", "0.50231224", "0.50190145", "0.49849018", "0.4969777", "0.49650598", "0.49619985", "0.4953088", "0.4941...
0.55283976
3
Fill table with data
function populateWareHouses() { // Empty content string var tableContent = ''; map = new google.maps.Map(document.getElementById('mymap'), { center: myLatLng, zoom: 5 }); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init () {\n data.forEach((tableData) => {\n let row = tbody.append(\"tr\");\n Object.values(tableData).forEach(value => {\n let cell = row.append(\"td\");\n cell.text(value);\n });\n })\n}", "function fill_table(_data){\n\n\tfor (var i = 0; i < _data.length; i++){\n\t\tvar row = cre...
[ "0.7897888", "0.78105795", "0.76989204", "0.76252204", "0.75241506", "0.7461645", "0.74393183", "0.742936", "0.7425173", "0.7416092", "0.74117094", "0.7368194", "0.7311061", "0.7289157", "0.7282286", "0.7263067", "0.7250405", "0.72403866", "0.7232921", "0.72002536", "0.719758...
0.0
-1
Receives the selected "moment" object as only parameter
handleDateTimeChange(date) { this.setState({ eventDate: date }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(moment) {\n this.moment = moment;\n }", "function isMoment(val) {\n return isObject(val) && val._isAMomentObject;\n}", "function setMomentValues(mom, a) {\n mom.year(a[0] || 0)\n .month(a[1] || 0)\n .date(a[2] || 0)\n .hours(a[3] || 0)\n .mi...
[ "0.68503875", "0.6352689", "0.63129205", "0.6225394", "0.6225394", "0.6225394", "0.62152654", "0.5921603", "0.58856714", "0.5863975", "0.5863975", "0.5863975", "0.58585274", "0.5838606", "0.5795845", "0.5795845", "0.57862765", "0.57826257", "0.57826257", "0.57826257", "0.5782...
0.0
-1
Render questions and answers
renderResponses(section) { const applicationData = this.state.applicationData; const questions = section.questions.map(q => { const a = applicationData.answers.find(a => a.question_id === q.id); if (q.type === "information") { return <h4>{q.headline}</h4> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderQuestion() {\n var q = multipleChoice[currentQuestionIndex];\n\n question.innerHTML = \"<p>\" + q.question + \"<p>\";\n answerA.innerHTML = q.answerA;\n answerB.innerHTML = q.answerB;\n answerC.innerHTML = q.answerC;\n}", "function renderAnswers() {\n return question.answers.map((answe...
[ "0.76646703", "0.7488299", "0.7481373", "0.73547953", "0.7328354", "0.73194516", "0.7295369", "0.7289491", "0.7257966", "0.7255019", "0.72245127", "0.7218002", "0.7209299", "0.7170849", "0.71644735", "0.7130189", "0.71230274", "0.71217114", "0.7118798", "0.71181923", "0.71131...
0.0
-1
var string1 = "which limit the power of the federal government in guarantees citizens of the united states certain rights"; var string2 = "which limit the power of the federal government and guarantee citizens of the united states certain rights"; var results = compareStrings(string1, string2); var newString1 = results...
function stringFormat(string){ return string.toLowerCase().replace(/[^A-Za-z0-9_]/g, " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareWords(str1, str2) {\n if (str1.toLowerCase() === str2.toLowerCase()) {\n // PLAYER GETS SCORE\n isWordGuessed = true;\n animalToGuess.innerHTML = `${gameAnimalExample.toUpperCase()}! Yay!`;\n playerScore += scoreAmount;\n clearInterval(timer);\n updateScores();\n ...
[ "0.76191235", "0.73749", "0.7135599", "0.7127417", "0.690093", "0.6888176", "0.68255293", "0.6772142", "0.6738767", "0.66815895", "0.66281253", "0.658813", "0.6584615", "0.658051", "0.65690434", "0.6552294", "0.6526732", "0.6486373", "0.6472805", "0.6471082", "0.645502", "0...
0.0
-1
GET events for specific day
function getEvents(day, cbSuccess, cbError) { if (day < 14 || day > 23) cbError("Invalid day requested") if (!Modernizr.localstorage) { cbError("No localStorage accessible") return } // Manage current day var cachedData = $.parseJSON(localStorage.getItem("day_" + day)); if (cachedData == null) { $.ajax(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventsByDay(_day, sday){\n\t$(\"#moreInfo\").hide();\n\t$(\"#body\").show();\n\tsetSessionValue(\"date\",_day);\n\tday = _day;\n\tsetDateOnMenu(sday);\n\tdayChooser();\n\tsetTimeline(day);\n}", "getDayEvents(date, calendar_ids) {\n const period_start = dayjs__WEBPACK_IMPORTED_MODULE_4__(date)....
[ "0.74583274", "0.73862183", "0.70151544", "0.69496256", "0.6917186", "0.68627644", "0.6745117", "0.6665844", "0.6646471", "0.657785", "0.65336746", "0.65306276", "0.65140283", "0.6495495", "0.64830506", "0.64808977", "0.6437319", "0.6413522", "0.64067197", "0.6397324", "0.638...
0.6867595
5
RETURNS events for specific day without callback
function getEvents2(day) { if (day < 14 || day > 23) cbError("Invalid day requested") if (!Modernizr.localstorage) { cbError("No localStorage accessible") return } // Manage current day var cachedData = $.parseJSON(localStorage.getItem("day_" + day)); if (cachedData == null) { $.ajax({ url : 'http://...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventsByDay(_day, sday){\n\t$(\"#moreInfo\").hide();\n\t$(\"#body\").show();\n\tsetSessionValue(\"date\",_day);\n\tday = _day;\n\tsetDateOnMenu(sday);\n\tdayChooser();\n\tsetTimeline(day);\n}", "getDayEvents(date, calendar_ids) {\n const period_start = dayjs__WEBPACK_IMPORTED_MODULE_4__(date)....
[ "0.67270994", "0.6718422", "0.6668776", "0.6613677", "0.65618384", "0.6538497", "0.64281905", "0.6377115", "0.6227994", "0.61954623", "0.61727154", "0.616548", "0.61248404", "0.6065255", "0.6029974", "0.59359175", "0.5933963", "0.5913888", "0.59077126", "0.58950526", "0.58945...
0.6367409
8
RETURNS events for specific day without callback
function getToilets() { if (!Modernizr.localstorage) { cbError("No localStorage accessible") return } // Manage current day var cachedData = $.parseJSON(localStorage.getItem("gf_toilets")); if (cachedData == null) { $.ajax({ url : 'http://data.appsforghent.be/poi/publieksanitair.json', async : false, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventsByDay(_day, sday){\n\t$(\"#moreInfo\").hide();\n\t$(\"#body\").show();\n\tsetSessionValue(\"date\",_day);\n\tday = _day;\n\tsetDateOnMenu(sday);\n\tdayChooser();\n\tsetTimeline(day);\n}", "getDayEvents(date, calendar_ids) {\n const period_start = dayjs__WEBPACK_IMPORTED_MODULE_4__(date)....
[ "0.67270994", "0.6718422", "0.6668776", "0.6613677", "0.65618384", "0.6538497", "0.64281905", "0.6377115", "0.6367409", "0.6227994", "0.61954623", "0.61727154", "0.616548", "0.61248404", "0.6065255", "0.6029974", "0.59359175", "0.5933963", "0.5913888", "0.59077126", "0.589505...
0.0
-1
Gets the Id of a given item
function getIdOfItem(item){ return item.id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItemId() {\r\n var item_id = 0;\r\n item_id = urlParams.getUrlVar('id');\r\n if(item_id == undefined) {\r\n item_id = 0;\r\n }\r\n return item_id;\r\n }", "function item_id(tv) {\n var item_id = tv.id;\n return item_id;\n }...
[ "0.7907378", "0.7469026", "0.73859614", "0.70612526", "0.6757472", "0.6722211", "0.67196745", "0.665145", "0.665145", "0.665145", "0.665145", "0.665145", "0.664975", "0.66372925", "0.66372925", "0.66372925", "0.66372925", "0.66372925", "0.66372925", "0.66372925", "0.6595179",...
0.8286665
0
Fix time digits, returns e.g. 11:00 instead of 11:0
function setTimeDigits(timeString){ var timeSplitted = timeString.split(':'); if(timeSplitted[1].length == 1){ return timeString + "0"; } else{ return timeString; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function correctTime(time){\n return time > 9 ? time : `0${time}`;\n }", "function formatTime(time) {\n if (time > 9) {\n return time;\n } else {\n return \"0\" + time;\n }\n }", "function formatTime(time) {\n if (time < 10) {\n time = \"0...
[ "0.8089798", "0.79660094", "0.7742732", "0.7711487", "0.76949716", "0.7694695", "0.7683322", "0.7681377", "0.7679457", "0.7672588", "0.760656", "0.7604622", "0.7584902", "0.7567143", "0.7542993", "0.7521498", "0.74889946", "0.74843556", "0.74593484", "0.7438024", "0.74294114"...
0.71863115
44
Returns the item for a given id
function getItemById(data, id){ return data[id]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getItemById (context, id) {\n return itemGetter.getItemById(context, id);\n }", "get(id) {\n const index = this.indexOfId(id);\n if (index > -1) return this.items[index];\n }", "function getItem(item, id) {\n for( var i = 0; i < item.length; i++){\n\n if(id == item[i].id){\n ...
[ "0.8588322", "0.83053625", "0.8167034", "0.8079013", "0.80614555", "0.802107", "0.8008855", "0.7922896", "0.79213244", "0.78317183", "0.7811231", "0.7766773", "0.77421176", "0.7729794", "0.77098083", "0.76835465", "0.7659259", "0.75926334", "0.7564318", "0.75593334", "0.75470...
0.82626265
2
Adding an event to favourites
function addFavourite(event, day, id, cbSucces, cbError) { if (!Modernizr.geolocation) { cbError("No HTML5 geolocation available") return } if (localStorage['day_' + day + 'favourites'] == undefined) { favouriteEvents = []; favouriteEvents.push(event); localStorage['day_' + day + 'favourites'] = JSON ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToFavorites() {\n let favorite = buildCityItem(event.currentTarget);\n\n let favorites = readFromLS(\"favorites\");\n if (favorites == null) {\n favorites = [];\n }\n favorites.push(favorite);\n saveToLS(\"favorites\", favorites);\n loadFavorites();\n loadCityWeather();\n...
[ "0.7293554", "0.7123948", "0.7102606", "0.70415163", "0.6985447", "0.6973764", "0.69721293", "0.6967212", "0.6887869", "0.68361926", "0.6807418", "0.67752355", "0.67514753", "0.6748916", "0.67203367", "0.67099375", "0.6648887", "0.6632357", "0.66148454", "0.65882915", "0.6580...
0.74712974
0
Function triggered when event is added to favourites. Function makes it visibile.
function addedToFavourites(id){ var classname = "founditem" + id; var onclick = $("." + classname + " .resultbutton a").attr("onclick"); $("." + classname + " .resultbutton").addClass('added').html("toegevoegd"); $("." + classname + " .resultbutton a").disabled = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showFavoriteList() {\n this.blockBtnTemporarily(this.elem.favTrigger, this.animDur.favList);\n this.elem.favSection.classList.add(this.class.fav.active);\n }", "function handleFav(ev) {\n const livalue = ev.target.innerHTML;\n favoriteShow.push(livalue);\n renderFav();\n}", "function onFavo...
[ "0.75887394", "0.7065181", "0.70376074", "0.7007041", "0.69442624", "0.6930743", "0.6913709", "0.6884866", "0.6800631", "0.6796752", "0.67857987", "0.67392737", "0.6735079", "0.67276144", "0.6696413", "0.6665139", "0.66601", "0.66399294", "0.6599951", "0.65932405", "0.6587118...
0.6223323
50
Return favourites for a specific day
function getFavourites(day, cbSucces, cbError) { if(localStorage['day_' + day + 'favourites'] != undefined) { return JSON.parse(localStorage['day_' + day + 'favourites']); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function todaysFavoite(songData) {\n var info = {\n artist: songData.artist.name,\n song: songData.name,\n listeners: songData.listeners,\n image: songData.image[3]['#text']\n };\n generateTemplate('favorite', info);\n ...
[ "0.64551276", "0.6209957", "0.61599326", "0.61486936", "0.60707086", "0.5989004", "0.5941364", "0.5933608", "0.59283334", "0.58853644", "0.5850136", "0.5848335", "0.5819531", "0.57991314", "0.57852477", "0.5710969", "0.5702721", "0.5640824", "0.56158626", "0.5583664", "0.5581...
0.7011226
0
Store a value in HTML5 Session Storage and escape it WARNING: Not escaped
function setSessionValue(key, value) { sessionStorage[key] = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function putValueOnSession(key, value){\n\tif (hasStorage()) {\n\t\tsessionStorage.setItem(window.xuser.id + '|' + key, stringify(value));\n\t}\n}", "function saveInSessionStorage(key, value) {\n if (typeof(Storage) !== \"undefined\") {\n sessionStorage.setItem(key, JSON.stringify(value))\n } else {...
[ "0.72922003", "0.7016534", "0.69760823", "0.68662095", "0.68069893", "0.67936736", "0.66757", "0.6625338", "0.66026133", "0.65869945", "0.657028", "0.649754", "0.649754", "0.649462", "0.649462", "0.649462", "0.649462", "0.649462", "0.649462", "0.649462", "0.64856243", "0.64...
0.65394604
11
Get a value from HTML5 Session Storage and escape it
function getSessionValue(key) { return sessionStorage[key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueFromSession(key){\n\tif (hasStorage()) {\n\t\treturn thisX.eval('__xstorage = ' + sessionStorage.getItem(window.xuser.id + '|' + key) + ';');\n\t}\n\treturn null;\n}", "function putValueOnSession(key, value){\n\tif (hasStorage()) {\n\t\tsessionStorage.setItem(window.xuser.id + '|' + key, stringi...
[ "0.71287775", "0.69826955", "0.678887", "0.6773884", "0.6733559", "0.6690227", "0.6669755", "0.6647395", "0.6629845", "0.65793544", "0.65660083", "0.6550702", "0.6537557", "0.6532545", "0.6528553", "0.6509445", "0.64866537", "0.6470998", "0.6458464", "0.6441826", "0.64250356"...
0.6943264
2
SETS A PLACE ON A MAP LIVE
function setLiveMap(lati, long, data){ var eventLat = lati; var eventLong = long; var filtered_data = filter(data, long, lati); if(isLive){ map.removeLayer(markerHere); } if(isLive == false){ map.setView(new L.LatLng(lati,long), 16); } var MyIcon = L.Icon.extend({ iconUrl : 'images/marker.png',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPointOnMap(ax, ay) {\n myMap.geoObjects.removeAll();\n var onePoint = new ymaps.Placemark(\n [ay, ax], {},\n {\n preset: \"islands#redIcon\",\n });\n\n myMap.geoObjects.add(onePoint);\n myMap.setCenter([ay, ax], 16);\n}", "addPlace(x, y) {\n...
[ "0.6382538", "0.6331693", "0.62283486", "0.62263006", "0.6140689", "0.60701096", "0.6068287", "0.60542595", "0.6046754", "0.6045187", "0.6027204", "0.6023063", "0.6017122", "0.59792256", "0.5928197", "0.5917654", "0.59100693", "0.5908172", "0.58982044", "0.5890471", "0.588402...
0.0
-1
Submit function of filterform
function filterResults(){ // Set filters to localstorage var formName = $("#searchTitle").val(); var beginHour = $("#beginHour").val(); var beginMin = $("#beginMin").val(); var endHour = $("#endHour").val(); var endMin = $("#endMin").val(); var beginTime = beginHour + beginMin; var endTime = endHour + endMi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitFilters()\n {\n\n }", "function filter() {\n\tvar form = event.target.form;\n\tdocument.forms[0].filter_name.value = form.filter_name_input.value;\n\tdocument.forms[0].filter_url.value = form.filter_url_input.value;\n\tdocument.forms[0].filter_bool.value = form.filter_bool_select.options[documen...
[ "0.8616993", "0.8056333", "0.7666683", "0.719804", "0.7096979", "0.6975613", "0.6933377", "0.6876122", "0.6852975", "0.68415743", "0.6814971", "0.6790146", "0.6769892", "0.67073727", "0.66791695", "0.66644824", "0.6632292", "0.65903246", "0.6503205", "0.64842623", "0.64811414...
0.0
-1
Submit function of filterform for only name
function filterName(){ // Set filters to localstorage var formName = $("#searchTitle").val(); if(formName == ""){ filterResults(); } else{ searchResults(formName, "600", "2800"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitFilters()\n {\n\n }", "function filter() {\n\tvar form = event.target.form;\n\tdocument.forms[0].filter_name.value = form.filter_name_input.value;\n\tdocument.forms[0].filter_url.value = form.filter_url_input.value;\n\tdocument.forms[0].filter_bool.value = form.filter_bool_select.options[documen...
[ "0.7754502", "0.7597582", "0.7147176", "0.66021323", "0.6597407", "0.65674955", "0.651237", "0.64448625", "0.6382795", "0.63632405", "0.6237811", "0.6233215", "0.621827", "0.62039983", "0.61697966", "0.61696774", "0.6144101", "0.6140241", "0.61394393", "0.6109575", "0.6109468...
0.6951361
3
Converts hourString into an unique id (int). (hhmm)
function numberForHourString(hourString){ var hourArray = hourString.split(':'); var hourString = hourArray[0] + "" + hourArray[1]; while(hourString.charAt(0) == "0"){ hourString = hourString.substring(1); } if(hourString == ""){ return "0"; } return hourString; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractTimeFromId(str) {\n var dt = str.split('-');\n var pat = /(00|30)$/\n var ret = dt[1].replace(pat, ':$1');\n return ret;\n }", "function parsehour(string)\r\n{\r\n\tvar obj = null;\r\n\ttry {\r\n\t\tvar array = string.match (/\\d{1,2}/g);\r\n\t\t\r\n\t\tobj = {hour:...
[ "0.7044624", "0.69678026", "0.6831421", "0.6812546", "0.6702707", "0.6695528", "0.668406", "0.66042763", "0.64933187", "0.6368329", "0.6319866", "0.6221448", "0.6203494", "0.6040554", "0.6024524", "0.6016112", "0.5953666", "0.59367675", "0.5900796", "0.5833882", "0.58293945",...
0.7458877
0
Makes sure the end hour is later than the start hour
function solveConflicts(time){ // get data from ddl's var beginHour = $("#beginHour").val(); var beginMin = $("#beginMin").val(); var endHour = $("#endHour").val(); var endMin = $("#endMin").val(); switch(time){ case 'begin': // set begin and end time in one var (eg 12:30 -> 1230) var beginTime = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "downHourEnabled() {\r\n return !this.minDateTime || this.compareHours(-this.stepHour, this.minDateTime) > -1;\r\n }", "function trabalho(entrada, saida) {\n var horaInicio = entrada.split(\":\"); //Split starting hours\n var horaSaida = saida.split(\":\"); //Split finishing hours\n\n //Create ...
[ "0.646675", "0.64630604", "0.63926697", "0.6232893", "0.615339", "0.6124129", "0.61138153", "0.60863245", "0.60696507", "0.60462886", "0.6043695", "0.598882", "0.59835696", "0.5967233", "0.5948896", "0.59469974", "0.5937341", "0.5937341", "0.5937341", "0.5937341", "0.5937341"...
0.54277843
87
Function called when you click on delete
function deleteFavourite(id){ var day = $.parseJSON(getSessionValue('date')); var favorites = getFavourites(day); findAndRemove(favorites, "id", id, day, afterTimelineDelete); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteItem(e){\n}", "function deleteHandler() {\n console.log(\"clicked delete button in tasks\");\n deleteTask($(this).data(\"id\"))\n} // end deleteHandler", "onQuestionRowClickDelete(event){\n\t\t\n\t}", "onClickDeleteBtn(e, index) {\n this.deleteItem(e, arguments[1]);\n this....
[ "0.78884673", "0.7764697", "0.77440786", "0.76469743", "0.76004744", "0.75996196", "0.75985533", "0.74934155", "0.7389298", "0.7389237", "0.73858035", "0.7366479", "0.73565096", "0.7341306", "0.7339934", "0.73279977", "0.731492", "0.72808814", "0.72754365", "0.7262964", "0.72...
0.0
-1
Function for getting more info on event
function getInfo(day, property, value, callback) { var dataSet = getEvents2(day); $.each(dataSet, function(index, result) { if(result[property] == value) { //Remove from array callback(result); //window.alert(string); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventInfo() { }", "function EventInfo() { }", "showDetailedInfo(event) {\n return null;\n }", "function printEvent(event) {\n console.log(event.startTime + \" - \" + event.name + \" @ \" + event.place);\n}", "getEventInfo(event){\n var offset = this.$viewer_div.offset();\n var...
[ "0.83782405", "0.83782405", "0.7631546", "0.71251094", "0.7023015", "0.6974201", "0.670681", "0.6649521", "0.66028225", "0.6546777", "0.652765", "0.65184784", "0.6504819", "0.6500278", "0.6448741", "0.6436062", "0.6429001", "0.6425425", "0.64187187", "0.64187187", "0.64187187...
0.0
-1
SETS A PLACE ON A MAP
function setMap(data, div){ var eventLat = data.latitude; var eventLong = data.longitude; var map = new L.Map(div).setView(new L.LatLng(eventLat,eventLong), 15); wax.tilejson('http://api.tiles.mapbox.com/v3/mapbox.mapbox-streets.jsonp', function(tilejson) { map.addLayer(new wax.leaf.connector(tilejson)); });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initMap(){\n let places = {\n newDelhi: {lat:28.38, lng:77.12},\n newjersey: {lat:39.833851,lng:-74.871826},\n chicago: {lat:41.881832,lng: -87.623177}\n };\n\n let map = new google.maps.Map(document.getElementById('map'), {\n zoom: 4,\n center: places.chicago\n...
[ "0.6701546", "0.6700028", "0.664847", "0.654457", "0.6452013", "0.6448708", "0.6431757", "0.6424482", "0.6421195", "0.63898695", "0.6383371", "0.6303462", "0.629922", "0.6269839", "0.62589586", "0.6244586", "0.62368685", "0.6236503", "0.6223112", "0.6214281", "0.62134886", ...
0.0
-1
Sets toilets on map
function setToilets(data, long, lat){ if(isLive == true){ map.removeLayer(markerHere); } map.setView(new L.LatLng(lat,long), 17); var MyIcon = L.Icon.extend({ iconUrl : 'images/marker.png', iconSize : new L.Point(25, 41), shadowSize : null, iconAnchor : new L.Point(16, 35)}) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tintTile(){\r\n if (towers[stringFromCoords(this.coords)] != null && \r\n towers[stringFromCoords(this.coords)] != undefined){\r\n this.tint = 0x0000FF; \r\n return;\r\n }\r\n this.tint = 0x00FF00;\r\n }", "function gridSetMountains(){\n\tfor(var i=0; i<sq...
[ "0.6146794", "0.6110901", "0.6044772", "0.6023545", "0.60078365", "0.5967851", "0.5962403", "0.59460634", "0.5925805", "0.59152675", "0.57853603", "0.5775161", "0.5745877", "0.57362527", "0.572394", "0.5718222", "0.56922334", "0.56738865", "0.56711465", "0.5662424", "0.565315...
0.6361113
0
Switch between info and map
function switchInfo(show){ if(show == "info"){ $("#extra_map").hide(); $("#extra_info").show(); } else{ $("#extra_info").hide(); $("#extra_map").show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateInformation() {\n// UPDATE MAP INFORMATION\ndojo.forEach(_maps, function (map) {\n updateInformationForMap(map);\n});\n}", "switchtoInfo() {\n this._setState('InfoState');\n }", "handleMapLoad(map) {\n }", "function load_map (p_coordinates, p_zoom)\n{\n switch (action)\n ...
[ "0.66873425", "0.6548011", "0.6171847", "0.6166023", "0.61587065", "0.61429447", "0.6125347", "0.6099421", "0.6089107", "0.608264", "0.60478747", "0.6044057", "0.6020523", "0.5971962", "0.5954572", "0.5930451", "0.59245086", "0.59243417", "0.59209776", "0.59168535", "0.590799...
0.7084693
0
Function for deleting favourites
function findAndRemove(array, property, value, day, callback) { $.each(array, function(index, result) { if(result[property] == value) { //Remove from array array.splice(index, 1); localStorage['day_' + day + 'favourites'] = JSON .stringify(array); callback(array); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteFavourite(id){\n\tvar day = $.parseJSON(getSessionValue('date'));\n\tvar favorites = getFavourites(day);\n\tfindAndRemove(favorites, \"id\", id, day, afterTimelineDelete);\n}", "function deleteFavorites() {\n localStorage.clear();\n loadFavorites();\n}", "deleteFavorite(id) {\n const in...
[ "0.79614496", "0.76483136", "0.7533689", "0.75169116", "0.7483014", "0.7336531", "0.7287679", "0.72194195", "0.7216411", "0.72028935", "0.7184184", "0.718106", "0.71803033", "0.714309", "0.71385205", "0.7136997", "0.71364826", "0.7127376", "0.7119437", "0.7113059", "0.7095329...
0.0
-1
FUNCTION GETS TRIGGERED AFTER DELETE ON TIMELINE
function afterTimelineDelete(favorites){ //IF FAVORITES EXISTS, ADD THEM TO TIMELINE if(favorites != 0){ checkIfTimelineDataExists(favorites); } else{ $("#timelinediv").empty(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ondelete(deltas) { /* ?? */}", "afterDelete(result, params) {\n console.log(\"Hereeeeeeeeeee 16\");\n }", "static _handle_delete_triggers() {\n\n //...override\n }", "function fnOnDeleted(result) { }", "onAfterDeleteEntity(data_obj) {\n\t\t//TODO: Override this as needed;\n\t}", "functi...
[ "0.73986965", "0.7003597", "0.6922895", "0.66600615", "0.6559646", "0.65120345", "0.64824", "0.6481702", "0.6376543", "0.63141185", "0.6294051", "0.62851757", "0.60967904", "0.6091535", "0.606878", "0.60613626", "0.6047887", "0.6035014", "0.6001103", "0.59848905", "0.59703064...
0.0
-1
LOAD EVENTS BY DAY FOR DAYMENU IN TIMELINE
function getEventsByDay(_day, sday){ $("#moreInfo").hide(); $("#body").show(); setSessionValue("date",_day); day = _day; setDateOnMenu(sday); dayChooser(); setTimeline(day); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTimelineEvents() {\n var chaplainID = window.location.pathname.match( /\\d+/ )[0];\n loadchart(\"svgContent\", window.origin + \"/bojanglers/chaplain/\"+chaplainID+\"/geteventsjson/\");\n}", "startDatePanelClick() {\n // change time type to start time mode\n dispatch(modifyInnerState...
[ "0.6054508", "0.60182285", "0.5926578", "0.59085447", "0.5900675", "0.58576465", "0.58365566", "0.58299565", "0.58236116", "0.581165", "0.5810188", "0.57486254", "0.57407624", "0.57219166", "0.57109755", "0.5703436", "0.56940836", "0.5686096", "0.564316", "0.56406873", "0.563...
0.5902315
4
LOAD EVENTS BY DAY FOR DAYMENU IN TIMELINE
function getEventsByDay2(_day, sday){ setSessionValue("date", _day); window.location.href = 'timeline.html'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTimelineEvents() {\n var chaplainID = window.location.pathname.match( /\\d+/ )[0];\n loadchart(\"svgContent\", window.origin + \"/bojanglers/chaplain/\"+chaplainID+\"/geteventsjson/\");\n}", "startDatePanelClick() {\n // change time type to start time mode\n dispatch(modifyInnerState...
[ "0.6052858", "0.6016947", "0.59252954", "0.5907569", "0.5901171", "0.5900566", "0.5857983", "0.58358526", "0.5830662", "0.5823688", "0.5810388", "0.58097476", "0.57482845", "0.57416815", "0.57227415", "0.5709243", "0.5704716", "0.56935996", "0.56850153", "0.5643931", "0.56408...
0.547197
41
FUNCTION FOR THE DAY CHOOSER IN TIMELINE
function dayChooser(){ if($(".mask").length){ $("#daychooser").css("background-position","center 0"); $("#daychooser2").css("background-position","center 0"); $(".mask").remove(); $("#hiddenDates").hide(); $("#hiddenDates2").hide(); $("#footer").animate({"height":"53"},300); } else{ $("#daychooser")....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function day(){\n step=4;\n timeSelector=\"day\";\n resetGraph();\n}", "function connectDaysToIcons(){\r\n if(getDropdownValue() === \"monday\"){\r\n return 'You chose ' + getDropdownValue();\r\n } else if(getDropdownValue() === \"tuesday\"){\r\n return 'You chose ' + getDropdownValue();\r...
[ "0.6514491", "0.6428966", "0.6269969", "0.62423813", "0.6180785", "0.58742774", "0.5851517", "0.5847912", "0.5846104", "0.58372307", "0.5832313", "0.57651675", "0.5750527", "0.57425404", "0.57349414", "0.5719711", "0.5694354", "0.5683532", "0.5679713", "0.5668545", "0.5664518...
0.5340554
80
SETS A ONE DIGIT NUMBER TO A TWO DIGIT fe 9 TO 09
function twoDigits(digit){ digit = ""+digit; if(digit.length == 1){ digit = "0" + digit; return digit; } else{ return digit; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTwoDigit(num) {\n return (\"0\" + num).slice(-2);\n}", "function aumentar_cero(num){\r\n if (num < 10) {\r\n num = \"0\" + num;\r\n }\r\n return num;\r\n}", "function aumentar_cero(num){\r\n if (num < 10) {\r\n num = \"0\" + num;\r\n }\r\n return num;\r\n}", "fu...
[ "0.6978988", "0.6553362", "0.6553362", "0.6553362", "0.6553362", "0.64814657", "0.6452158", "0.6410901", "0.6394631", "0.633467", "0.630601", "0.6302943", "0.6277218", "0.6258247", "0.6255137", "0.6203179", "0.61701393", "0.61622024", "0.61622024", "0.61622024", "0.6140904", ...
0.0
-1
Helper function for reactredux connect
function mappingsAreComplete(props, sheet) { const { mappings } = props; const confirmedColCount = mappings.collections[sheet.collection].mappings .filter((m) => m.confirmed) .map((m) => m.variable.map((v) => v.variableName)) .reduce((a, b) => a.concat(b), []) .filter((x, idx, self) => self.indexOf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static connectStore(reduxStore) {\n store = reduxStore;\n }", "function createConnect(_temp){var _ref=_temp===void 0?{}:_temp,_ref$connectHOC=_ref.connectHOC,connectHOC=_ref$connectHOC===void 0?_components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"]:_ref$connectHOC,_ref$mapStateToPropsF=_...
[ "0.69508946", "0.6673786", "0.66492194", "0.66492194", "0.65720457", "0.652168", "0.6513841", "0.6502498", "0.6490165", "0.6430905", "0.64294624", "0.64294624", "0.6400893", "0.63807446", "0.63784975", "0.63600194", "0.63460183", "0.63398844", "0.6331017", "0.63229203", "0.63...
0.0
-1
Moves to reactredux connect
function transformProps(props) { const { importData: { sheets, activeCollection, uploadedFileName }, mappings, archetype } = props; const collectionData = sheets.find((sheet) => sheet.collection === activeCollection); const { rows, variables } = collectionData; const confirmedCols = getConfirmedCols(props, va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static connectStore(reduxStore) {\n store = reduxStore;\n }", "function mapStateToProps(state) {\n return {\n ...state.connectfour\n };\n}", "function reduxStateToProps(state) {\n // const reduxState = (state) => {\n console.log('redux staettt', state.redux_session.user_data.user_type)\n ...
[ "0.68352664", "0.64016557", "0.6391417", "0.63589555", "0.6295503", "0.6252604", "0.6210882", "0.61666805", "0.6139437", "0.6139085", "0.6137965", "0.6137965", "0.6103681", "0.60644037", "0.60242796", "0.601137", "0.59868556", "0.5975948", "0.5962091", "0.5960829", "0.5949099...
0.0
-1
! This function contains the game
function startGame() { // ! This creates a square grid of cells for (let i = 0; i < width ** 2; i++) { const div = document.createElement('div') div.classList.add('cell') if (width === 8) { div.classList.add('game-small') } else if (width === 12) { div.classList.add('game-medium') } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function game() {\n dessinerSerpent();\n dessinerPomme();\n detectionCollision();\n verifMangerPomme();\n gestionVieSerpent();\n gestionBonus();\n }", "launchGame() {\n this.grid.generate()\n this.grid.generateWalls()\n this.grid.generateWeapon('axe', this.grid.giveRandomC...
[ "0.7337129", "0.72936326", "0.7219806", "0.70629126", "0.70235866", "0.70080876", "0.696865", "0.6943148", "0.68946046", "0.68887067", "0.68821347", "0.68728024", "0.68526334", "0.6850458", "0.68243784", "0.68073016", "0.67778426", "0.6763735", "0.67558885", "0.6755533", "0.6...
0.0
-1
! This Checks Adjacent Cells For Mines ! Adds To Mine Count !
function topLeft() { if (cellTopLeft.classList.contains('bomb')) { bombCount += 1 } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countSurroundingMines (currentRow, currentCol) {\n var mineCount = 0;\n var checkReturn = lib.getSurroundingCells(currentRow, currentCol);\n \n for(var a = 0; a < checkReturn.length; a++){\n if(checkReturn[a].isMine === true){\n mineCount++;\n }\n }\n return mineCount;\n}", "countMines(...
[ "0.801206", "0.7811911", "0.7788938", "0.7744119", "0.77237225", "0.7622978", "0.75989956", "0.75759375", "0.7567753", "0.75488394", "0.75410414", "0.7524546", "0.7493377", "0.74801207", "0.7478833", "0.74652857", "0.7463382", "0.74162585", "0.73879886", "0.7295213", "0.72567...
0.0
-1
Write number of wins in standard mode.
writeUnlockMessage() { ctx.font = "30px Arial"; ctx.fillStyle = 'rgba(255, 255, 255, ' + this.displayOpacity + ')'; ctx.fillText(this.displayMessage, this.getXLocation(this.displayMessage, 3), 5 * TILE_HEIGHT + 15); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winCounter () {\n wins++;\n document.getElementById(\"wins\").innerHTML = wins;\n }", "writeWins() {\n ctx.font = \"30px Arial\";\n const wins = getLocalStorage('wins', '0');\n ctx.fillStyle = 'white';\n ctx.fillText('Wins', this.getXLocation('Wins', 1), 7 * TILE_HEIGHT - 7);\n ctx...
[ "0.65549505", "0.6392122", "0.62671167", "0.62636286", "0.6155592", "0.6146416", "0.6137906", "0.6120665", "0.6103488", "0.6060098", "0.5983666", "0.5969663", "0.5939103", "0.5918826", "0.59152365", "0.5892043", "0.586727", "0.5866228", "0.5862738", "0.5840336", "0.5834287", ...
0.0
-1
Write number of wins in standard mode.
writeWins() { ctx.font = "30px Arial"; const wins = getLocalStorage('wins', '0'); ctx.fillStyle = 'white'; ctx.fillText('Wins', this.getXLocation('Wins', 1), 7 * TILE_HEIGHT - 7); ctx.fillText(wins, this.getXLocation(wins, 2), 7 * TILE_HEIGHT - 7); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winCounter () {\n wins++;\n document.getElementById(\"wins\").innerHTML = wins;\n }", "function winCounter() {\n alert(\"You won!\");\n wins++;\n $(\"#number-wins\").text(wins);\n reset();\n }", "function win(){\n console.log(\"running win!\");\n wn++;\n ...
[ "0.65549505", "0.62671167", "0.62636286", "0.6155592", "0.6146416", "0.6137906", "0.6120665", "0.6103488", "0.6060098", "0.5983666", "0.5969663", "0.5939103", "0.5918826", "0.59152365", "0.5892043", "0.586727", "0.5866228", "0.5862738", "0.5840336", "0.5834287", "0.57926714",...
0.6392122
1
Determine a starting location to display the string so it's centered on a tile. Starts with tile 1
getXLocation(str, tile) { const width = ctx.measureText(str).width; return TILE_WIDTH * (tile - 0.5) - width / 2.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + ...
[ "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "0.6588051", "...
0.7622317
0
Write score, hearts, and level in scoring mode.
writeScore() { ctx.font = "25px Arial"; // Level and Score ctx.fillStyle = 'white'; // Score first. ctx.fillText('Score', this.getXLocation('Score', 1), 7 * TILE_HEIGHT - 7); ctx.fillText(`${scores.score}`, this.getXLocation(scores.score.toString(), 2), 7 * TILE_HEIGHT - 7); // Level next ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SaveHighScores(){\n\tvar sw : StreamWriter;\n\tswitch(Application.loadedLevelName){\n\t\tcase \"Labirinto\":\n\t\t\tsw = new StreamWriter(path + \"/HighScores.txt\");\n\t\t\tbreak;\n\t\tcase \"Labirinto2\":\n\t\t\tsw = new StreamWriter(path + \"/HighScores2.txt\");\n\t\t\tbreak;\n\t\tcase \"Labirinto3\":\...
[ "0.7138354", "0.7053794", "0.6583331", "0.6278372", "0.62177604", "0.616714", "0.60306245", "0.6027669", "0.5858598", "0.5829927", "0.5773034", "0.56764287", "0.5657258", "0.5655001", "0.5605439", "0.56038487", "0.5601047", "0.559873", "0.5591342", "0.5590322", "0.557708", ...
0.5908994
8
Update stats screen with scoring information.
displayStatsScreen() { // Display wins const wins = getLocalStorage('wins', 0); $('.games-won').text(wins); const highestScore = getLocalStorage('highestScore', '0'); $('.highest-score').text(highestScore); const highestLevel = getLocalStorage('highestLevel', '0'); $('.highest-level').text...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStats() {\n $(\"#number-to-guess\").text(targetNumber);\n $(\"#user-score\").text(userScore);\n $(\"#wins\").text(wins);\n $(\"#losses\").text(losses);\n }", "function updateScores() {\n scope.$el.find('.js-score-value').text(model.prediction[team])\n }", "func...
[ "0.76314455", "0.7393376", "0.73318434", "0.7298468", "0.72509396", "0.7211586", "0.7208826", "0.71813774", "0.71534836", "0.71474236", "0.71319854", "0.7120363", "0.7104727", "0.71046454", "0.7086982", "0.70694053", "0.706719", "0.70596814", "0.7054452", "0.705426", "0.70443...
0.0
-1
Display the end of game stats in scoring mode.
displayEndGame() { $('.level-reached').text(scores.level); $('.score').text(scores.score); let prevHighestScore = getLocalStorage('highestScore', '0'); // Just set a high score! if (scores.score > parseInt(prevHighestScore)) { $('.high-score-message').text(`You have beat your highest score o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame() {\n // Overlay\n // Show score\n // Show table \n // Give user chance to restart\n // TODO: add high score to renderGUI\n\n uploadScore(score);\n score = 0;\n}", "function gameEnd(){\n\t\tconsole.log(\"gameend FN works!\")\n\t\t$(\".triviascreen\").hide();\n\t\t$(\".scores...
[ "0.7750527", "0.7600921", "0.7487321", "0.7209555", "0.7188392", "0.7176677", "0.7115129", "0.7094373", "0.70577395", "0.7015503", "0.7011965", "0.7006141", "0.7002187", "0.69401395", "0.693587", "0.69168055", "0.6884937", "0.68775076", "0.68747497", "0.68531156", "0.6846386"...
0.71504396
6
Clear all data and request a reset.
function clearStorage() { localStorage.clear(); player.char = 0; requestReset = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n this.set('data', []);\n this._reset();\n }", "reset() {\n this.resetFields();\n this.resetStatus();\n }", "function reset() {\n getService().reset();\n}", "function reset() { }", "async resetAll() {\n\t\treturn reset();\n\t}", "function fullReset() {\n try ...
[ "0.75382817", "0.75219125", "0.7490438", "0.7452324", "0.74487305", "0.7361712", "0.7332515", "0.7299487", "0.7242585", "0.7224407", "0.7224407", "0.7166933", "0.7161535", "0.71271056", "0.7127006", "0.7121303", "0.70994467", "0.70993894", "0.70947057", "0.7077018", "0.706476...
0.0
-1
Helper function to deal with boilerplate null value/default code.
function getLocalStorage(name, defaultValue) { const value = localStorage.getItem(name); return value || defaultValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nullish(nullishVal, defaultVal) {\n return nullishVal !== null && nullishVal !== undefined ? nullishVal : defaultVal;\n}", "function null_checker(check_val)\n{\n if (typeof(default_val) === 'undefined') default_val = \"\";\n if(check_val == null || check_val == undefined || check_val == \"\"){\n ...
[ "0.7568159", "0.73374885", "0.7209636", "0.71355784", "0.7111012", "0.69720113", "0.69491094", "0.6898807", "0.6854233", "0.6854233", "0.6854233", "0.67509973", "0.67263657", "0.6651497", "0.6610933", "0.6593905", "0.6593905", "0.6593905", "0.6593905", "0.65789676", "0.656659...
0.0
-1
generates UI variables. Set variable watchers and set initial state
function generateWatchers() { var uiR = $rootScope.ressources.ui; for (var key in uiR) { for (var type in uiR[key]) { if (type == "variables") { for (var vari in uiR[key][type]) { ui.variables[vari] = uiR[key][type][vari]; rootVar[vari] = uiR[key][type][vari]; rootfn.varChanged(vari, u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(){\n appendButtons();\n clearVariables();\n}", "function initialiseControlVariables() {\n lbm1 = \"Red\";\n lbm2 = \"Green\";\n lbm3 = \"Blue\";\n rbm1 = \"Red \";\n rbm2 = \"Green \";\n rbm3 = \"Blue \";\n\n Timer = \"Timer\";\n\n massMin = 1.0;\n massMax = 100.0;\...
[ "0.6440373", "0.639498", "0.63046235", "0.6189362", "0.6092074", "0.60623", "0.5975431", "0.59398854", "0.5936544", "0.593555", "0.59320974", "0.591996", "0.58708906", "0.5868037", "0.5864253", "0.58613074", "0.58381903", "0.5835578", "0.5823772", "0.58222574", "0.58088434", ...
0.6450185
0
aguarda o carregamento da pagina
function onReady(callback) { var intervalId = window.setInterval(function () { if (document.getElementsByTagName('body')[0] !== undefined) { window.clearInterval(intervalId); callback.call(this); } }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function carga(){\n\n \tlocation.href='http://108.175.15.78/listado/public/usuario';\n }", "async function carregaPagina(){\n let hash = location.hash;\n let endereco = hash.substring(1,hash.length);\n\n if (endereco === rotas.HOMEPAGE){\n homepage.montar_view();\n } else if (endereco === ro...
[ "0.6400375", "0.6370344", "0.62203026", "0.6211938", "0.6198208", "0.6156265", "0.61117494", "0.6106174", "0.6097417", "0.60723156", "0.6031707", "0.6014036", "0.600807", "0.59989077", "0.5998498", "0.5987407", "0.59811246", "0.59787774", "0.5971111", "0.59606373", "0.5947169...
0.0
-1
adiciona dois cards com um personagem e uma imagem de verso
function addCard(strLevel) { var cardNumber = getCardNumber(); var newDiv = document.createElement("div"); //cria a nova div newDiv.classList.add("memory-card"); //define a classe da div newDiv.classList.add(strLevel); newDiv.setAttribute("data-name", cardNumber); var newDiv2 = document.creat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCard(character,number)\r\n{\r\n let cards = document.getElementById(\"cartes\");\r\n let backCard = document.getElementById(\"carta01\");\r\n let valueImage = backCard.getAttribute(\"src\");\r\n let resultCard = character+number;\r\n if(valueImage === \"imatges/back.png\")\r\n {\r\n ...
[ "0.6728037", "0.66036874", "0.6519603", "0.6467669", "0.6428505", "0.6417197", "0.63951385", "0.63942933", "0.63878965", "0.6347029", "0.6333506", "0.63270915", "0.6327079", "0.631208", "0.6305093", "0.6296133", "0.6263577", "0.6260869", "0.621938", "0.62142354", "0.61998206"...
0.65629846
2
objects everything reated to quotation and calculation of insurance
function Insurance(make,year,level){ this.make = make; this.year = year; this.level = level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "standardIngredients() {\n\n const usedUnits = ['tablespoons', 'tablespoon', 'ounces', 'ounce', 'teaspoons', 'teaspoon', 'cups', 'pounds', 'lbs', 'lb'];\n const standardUnits = ['tbsp', 'tbsp', 'oz', 'oz', 'tsp', 'tsp', 'cup', 'pound', 'lb', 'lb'];\n const units = [...standardUnits, 'kg', 'g'];...
[ "0.6211159", "0.58392704", "0.58392704", "0.56798553", "0.56277084", "0.54953945", "0.54760194", "0.5474091", "0.5461367", "0.5459705", "0.544884", "0.5448175", "0.5406209", "0.53723496", "0.53189796", "0.5308484", "0.5303957", "0.52837384", "0.52562165", "0.5236967", "0.5231...
0.0
-1
everyting realted to HTML
function HTMLUI(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderHTML() {\n \n }", "function _getRulaiHtml(content){\n\n}", "toHTML ( theMode, sigDigs , params) {}", "function pagehtml(){\treturn pageholder();}", "render(){return html``}", "interpretHTML(a) {\n // CUT OUT IMGS TO ACCOUNT FOR MORE THAN 1 & STYLE ACCORDINGLY\n let _complete;\n le...
[ "0.6711565", "0.6707757", "0.6527699", "0.6436939", "0.6369839", "0.62241405", "0.6149826", "0.6144028", "0.61248296", "0.6117533", "0.6073164", "0.6066903", "0.6064005", "0.6064005", "0.6064005", "0.605778", "0.60545903", "0.6018144", "0.6012269", "0.5980525", "0.5980525", ...
0.0
-1
Updates the target speaker from which to play a preview sound.
componentDidMount() { this._setAudioSink(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSpeaker(id)\n{\n\t//NOTE: not testing the id\n\tcurSpeakerID = id;\n}", "function playSound() {\n // play the source now\n soundSource.noteOn(context.currentTime);\n }", "function updatePreview() {\n\n // no preview desired? => abort\n if ( !my.preview ) return;\n\n ...
[ "0.6291711", "0.5824722", "0.5737769", "0.5737769", "0.5721624", "0.5693942", "0.5516721", "0.5485915", "0.54080814", "0.53828496", "0.53661495", "0.5292692", "0.5292692", "0.5285872", "0.52388096", "0.52388096", "0.52288526", "0.5225245", "0.5218645", "0.5214369", "0.5204871...
0.0
-1
Updates the target speaker from which to play a preview sound.
componentDidUpdate() { this._setAudioSink(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSpeaker(id)\n{\n\t//NOTE: not testing the id\n\tcurSpeakerID = id;\n}", "function playSound() {\n // play the source now\n soundSource.noteOn(context.currentTime);\n }", "function updatePreview() {\n\n // no preview desired? => abort\n if ( !my.preview ) return;\n\n ...
[ "0.62931395", "0.5825084", "0.5735836", "0.5735836", "0.5721629", "0.5695338", "0.5517857", "0.54852104", "0.5408231", "0.5383114", "0.5366378", "0.52929264", "0.52929264", "0.52862126", "0.5239572", "0.5239572", "0.5229793", "0.5224754", "0.52193546", "0.5215486", "0.5205752...
0.51629317
26
TODO: does it make sense to call a redirect and then nextFn() directly after?
function acceptPage (req, res, nextFn) { res.redirect('/') nextFn() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirectToNext(req, res) {\n var redirectTo = req.session.next || '';\n req.session.next = null; // Null it so that we do not use it again.\n res.redirect(redirectTo);\n}", "function _redir(funcParamObj,onExecuteComplete){\r\n\r\n var operationObj = funcParamObj.operationRef;\r\n var httpRespon...
[ "0.6882287", "0.6628853", "0.6491612", "0.61349434", "0.60911334", "0.60910755", "0.60771644", "0.605956", "0.6009394", "0.59939057", "0.5990151", "0.5968605", "0.5930302", "0.5927033", "0.59076715", "0.58749205", "0.5766161", "0.57522", "0.567294", "0.5624639", "0.56234723",...
0.67934257
1