query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
function for toggling colors of disabled fields
function togglecolors() { var len = all_input_fields_in_body.length; for (i = 0; i < len; i++) { if (all_input_fields_in_body[i].hasAttribute("disabled")) { all_input_fields_in_body[i].style.background = "rgb(234, 231, 231) none repeat scroll 0% 0%"; } else { all_inp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableColors() {\n colors.disabled = ! colors.disabled;\n}", "function fldEnable(d, off) {\n var node = $form(d);\n if (!node) return;\n node.disabled = off;\n node.style.color = off ? \"#999\" : \"#000\"; \n node.previousSibling.style.color = off ? \"#999\" : \"#000\"; \n //if (node.previousS...
[ "0.78299433", "0.70874643", "0.6857119", "0.6857119", "0.6857119", "0.6857119", "0.6827923", "0.6788093", "0.6731123", "0.6704303", "0.66988295", "0.6637365", "0.65748745", "0.6531255", "0.6527376", "0.65105814", "0.6504638", "0.64514863", "0.64514863", "0.6422645", "0.641545...
0.791702
0
The name of the model represented by this $resource, i.e. `Room`.
static getModelName() { return "Room"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getModelName () {\n\t\treturn this.modelName;\n\t}", "getResourceName() {\n return this.props.model.getName().value;\n }", "_modelName() {\n if (Ember.isNone(this.constructor.typeKey)) {\n return this.constructor.modelName;\n } else {\n return this.constructor.typeKey;\n }\n }", ...
[ "0.7090855", "0.7030949", "0.6870543", "0.6814137", "0.6719699", "0.6241909", "0.62376887", "0.6184363", "0.61598235", "0.6147657", "0.6139808", "0.6118183", "0.6091925", "0.60766876", "0.6054404", "0.60170496", "0.60055184", "0.60055184", "0.60055184", "0.60055184", "0.60055...
0.72586656
0
stop synchronous execution, open db and set version to 1.0
function begin_test(initialVersion) { stop(); // Open db var promise = websql.openDatabase(db_name) .then(function(db) { equal(db.version, "", "db.version=''"); exports.db = db; }); // Set to initialVersion if(initialVersion) { promise = promise.pipe(function(db) { return websql.cha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n debuglog(\"*IDX> start 1\");\n var openDB = indexedDB.open(this.dbName, 1);\n debuglog(\"*IDX> start 2\");\n\n openDB.onupgradeneeded = (evt) => {\n debuglog(\"*IDX> onupgradeneeded 1\");\n const db = evt.target.result;\n debuglog(\"*IDX> onu...
[ "0.67940134", "0.612754", "0.6115635", "0.6031486", "0.59752786", "0.5946706", "0.5849577", "0.5797156", "0.57673925", "0.57485586", "0.5739397", "0.5720626", "0.5719581", "0.56858873", "0.56858873", "0.56839556", "0.56602633", "0.56553406", "0.5647063", "0.56448317", "0.5640...
0.63429385
1
3 Check for palindromes using a stack Write an algorithm that uses a stack to determine whether a given input is palindrome or not. Use the following template as a starting point.
function is_palindrome(s) { s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, ''); const regularString = new Stack(); for (let i = 0; i < s.length; i++) { regularString.push(s[i]); } // racecar front to back, racecar back to front const reverseString = new Stack(); for (let i = s.length - 1; i >= 0; i--)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_palindrome(s) {\n s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, \"\");\n if (s.length < 3) {\n return false;\n }\n // Your code goes here\n const stringStack = new Stack();\n for (let i = 0; i < s.length; i++) {\n stringStack.push(s[i]);\n }\n let reverseString = \"\";\n // add up all the...
[ "0.80117685", "0.79738206", "0.7916331", "0.78523254", "0.7732946", "0.7522022", "0.7503942", "0.7465097", "0.73688", "0.7300379", "0.7281769", "0.7184669", "0.715599", "0.71478564", "0.7080342", "0.70472544", "0.701539", "0.701486", "0.69660467", "0.69531727", "0.6947988", ...
0.8036004
0
TODO: Idea: create a global updatePack variable like init and remove, only push necessary data to it If any of the three packs are empty, don't emit
getUpdatePack() { // TODO: Check if value has changed before sending info // TODO: Compression? return { id: this.id, x: this.x, y: this.y, hp: this.hp, map: this.map } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_ensureUnpacked() {\n if (this.packedData) {\n this._unpackData();\n }\n }", "function onData() {\n if ( packages instanceof Array ) {\n temp.mkdir('staniol_components', function ( err, tempDir ) {\n var components = new Components({\n ...
[ "0.56720066", "0.55067605", "0.5398196", "0.52592355", "0.51703835", "0.5144857", "0.5120342", "0.50245607", "0.5014468", "0.49768415", "0.4974675", "0.49699867", "0.496825", "0.4928849", "0.48548406", "0.4849933", "0.48428416", "0.48122552", "0.48122552", "0.48081532", "0.47...
0.5700492
0
Create the payload of hkp requests (upload only)
async buildHkpPayload(actionFlag, searchTerms) { let payLoad = null, keyData = ""; switch (actionFlag) { case EnigmailConstants.UPLOAD_KEY: keyData = await EnigmailKeyRing.extractKey( false, searchTerms, null, {}, {} ); if (k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function completeUbeKeygen(data)\n{\n delete data['action']; //no need to send to server\n var key_data = {\n 'user_id':user_id,\n 'keys':data.km,\n 'gamma':data.gamma\n }\n\n var oReq = new XMLHttpRequest();\n oReq.open(\"POST\",CLOUD_SERVER+'add_ube_keys',true);\n oReq.res...
[ "0.6215289", "0.5888496", "0.563526", "0.5489863", "0.53984714", "0.5397469", "0.53811705", "0.5380873", "0.5371137", "0.53191125", "0.53174555", "0.5287014", "0.5282862", "0.52760696", "0.5261515", "0.52550644", "0.5232306", "0.5216296", "0.52103895", "0.5208855", "0.5199895...
0.61705995
1
Download keys from a keyserver
async download(autoImport, keyIDs, keyserver, listener = null) { EnigmailLog.DEBUG(`keyserver.jsm: accessHkpInternal.download(${keyIDs})\n`); let keyIdArr = keyIDs.split(/ +/); let retObj = { result: 0, errorDetails: "", keyList: [], }; for (let i = 0; i < keyIdArr.length; i++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async download(autoImport, keyIDs, keyserver, listener = null) {\n EnigmailLog.DEBUG(`keyserver.jsm: accessKeyBase: download()\\n`);\n let keyIdArr = keyIDs.split(/ +/);\n let retObj = {\n result: 0,\n errorDetails: \"\",\n keyList: [],\n };\n\n for (let i = 0; i < keyIdArr.length; i+...
[ "0.75386393", "0.74623394", "0.7382048", "0.65758127", "0.628763", "0.6084997", "0.6062261", "0.59805214", "0.59442765", "0.58737934", "0.5871139", "0.5869542", "0.5758246", "0.57385176", "0.5727226", "0.560713", "0.55736834", "0.55424535", "0.5534211", "0.5531982", "0.550854...
0.7529052
1
Search for keys on a keyserver
async searchKeyserver(searchTerm, keyserver, listener = null) { EnigmailLog.DEBUG( `keyserver.jsm: accessHkpInternal.search(${searchTerm})\n` ); let retObj = { result: 0, errorDetails: "", pubKeys: [], }; let key = null; let searchArr = searchTerm.split(/ +/); for (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async searchKeyserver(searchTerm, keyserver, listener = null) {\n EnigmailLog.DEBUG(`keyserver.jsm: accessKeyBase: search()\\n`);\n let retObj = {\n result: 0,\n errorDetails: \"\",\n pubKeys: [],\n };\n\n try {\n let r = await this.accessKeyServer(\n EnigmailConstants.SEARCH...
[ "0.731396", "0.72883135", "0.7099784", "0.6204947", "0.60664535", "0.59419054", "0.58598703", "0.58546156", "0.5806584", "0.57627136", "0.5757289", "0.5754551", "0.57463413", "0.57393", "0.56759226", "0.5579777", "0.5539429", "0.5509688", "0.549448", "0.5455969", "0.5419252",...
0.7601056
0
Download keys from a KeyBase
async download(autoImport, keyIDs, keyserver, listener = null) { EnigmailLog.DEBUG(`keyserver.jsm: accessKeyBase: download()\n`); let keyIdArr = keyIDs.split(/ +/); let retObj = { result: 0, errorDetails: "", keyList: [], }; for (let i = 0; i < keyIdArr.length; i++) { try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async download(autoImport, keyIDs, keyserver, listener = null) {\n EnigmailLog.DEBUG(`keyserver.jsm: accessHkpInternal.download(${keyIDs})\\n`);\n let keyIdArr = keyIDs.split(/ +/);\n let retObj = {\n result: 0,\n errorDetails: \"\",\n keyList: [],\n };\n\n for (let i = 0; i < keyIdAr...
[ "0.62311697", "0.60099125", "0.6008358", "0.594785", "0.5870066", "0.5835214", "0.58028543", "0.5795701", "0.5606206", "0.55096346", "0.5433288", "0.5402248", "0.5395538", "0.53115237", "0.52689856", "0.52539235", "0.524035", "0.5234623", "0.5219172", "0.5210049", "0.51872414...
0.66923153
0
Search for keys on a keyserver
async searchKeyserver(searchTerm, keyserver, listener = null) { EnigmailLog.DEBUG(`keyserver.jsm: accessKeyBase: search()\n`); let retObj = { result: 0, errorDetails: "", pubKeys: [], }; try { let r = await this.accessKeyServer( EnigmailConstants.SEARCH_KEY, sear...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async searchKeyserver(searchTerm, keyserver, listener = null) {\n EnigmailLog.DEBUG(\n `keyserver.jsm: accessHkpInternal.search(${searchTerm})\\n`\n );\n let retObj = {\n result: 0,\n errorDetails: \"\",\n pubKeys: [],\n };\n let key = null;\n\n let searchArr = searchTerm.spli...
[ "0.7601056", "0.72883135", "0.7099784", "0.6204947", "0.60664535", "0.59419054", "0.58598703", "0.58546156", "0.5806584", "0.57627136", "0.5757289", "0.5754551", "0.57463413", "0.57393", "0.56759226", "0.5579777", "0.5539429", "0.5509688", "0.549448", "0.5455969", "0.5419252"...
0.731396
1
Upload keys to a keyserver
async upload(keyIDs, keyserver, listener = null) { EnigmailLog.DEBUG(`keyserver.jsm: accessVksServer.upload(${keyIDs})\n`); let keyIdArr = keyIDs.split(/ +/); let retObj = { result: 0, errorDetails: "", keyList: [], }; for (let i = 0; i < keyIdArr.length; i++) { let keyObj =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "upload(keyIDs, keyserver = null, listener) {\n let acc = getAccessType(keyserver);\n return acc.upload(keyIDs, keyserver, listener);\n }", "async upload(keyIDs, keyserver, listener = null) {\n EnigmailLog.DEBUG(`keyserver.jsm: accessHkpInternal.upload(${keyIDs})\\n`);\n let keyIdArr = keyIDs.split(/...
[ "0.6957633", "0.6744408", "0.657162", "0.61258686", "0.57900274", "0.57811767", "0.57673", "0.5626443", "0.56078744", "0.55918217", "0.55905205", "0.5583248", "0.55408347", "0.5504498", "0.54702514", "0.5456572", "0.5401573", "0.5394861", "0.5380791", "0.5373257", "0.5333684"...
0.68332607
1
Upload keys to a keyserver
upload(keyIDs, keyserver = null, listener) { let acc = getAccessType(keyserver); return acc.upload(keyIDs, keyserver, listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async upload(keyIDs, keyserver, listener = null) {\n EnigmailLog.DEBUG(`keyserver.jsm: accessVksServer.upload(${keyIDs})\\n`);\n let keyIdArr = keyIDs.split(/ +/);\n let retObj = {\n result: 0,\n errorDetails: \"\",\n keyList: [],\n };\n\n for (let i = 0; i < keyIdArr.length; i++) {\n...
[ "0.6833294", "0.67444503", "0.6571738", "0.6125943", "0.57900614", "0.5781196", "0.57673115", "0.56263936", "0.56079423", "0.5591878", "0.5590536", "0.5583275", "0.5540842", "0.5504619", "0.5470326", "0.5456593", "0.5401602", "0.53949434", "0.5380851", "0.53732675", "0.533370...
0.69576776
0
Compares +_value+ with +self.value+. = Returns true or false, depending on the equality
differs(_value) { const Values = require('comm/values'); return Values.encode(_value) !== Values.encode(this.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "valueDiffers(_value) {\n return this.encodeObject(_value) !== this.encodeObject(this.value);\n }", "_isComparisonIdentical(value) {\n // Note that we don't need to null check the start/end\n // here, because the `value` will always be defined.\n return this.comparisonStart === this.compa...
[ "0.6612549", "0.6542692", "0.6542692", "0.6016294", "0.60126793", "0.60126793", "0.5976803", "0.5957485", "0.5856544", "0.5855905", "0.57943416", "0.5780636", "0.57672596", "0.57672596", "0.5765785", "0.5757613", "0.57501733", "0.5729628", "0.5717842", "0.57163405", "0.570830...
0.6703849
1
= Description Bind a responder to the value, use to attach HValues to responders derived from HControl. = Parameters +_responder+:: Any responder that is derived from HControl or any other class instance that implements HValueResponder or has compatible typing.
bindResponder(_responder) { if (typeof _responder === 'undefined') { throw new Error('HValueBindError: responder is undefined!'); } if (!this.views.includes(_responder)) { this.views.push(_responder); _responder.setValueObj(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bindResponder(_responder) {\n }", "bindResponder(_responder) {\n }", "setValue(val) {\n this.binder.fieldValue = val;\n }", "setValue(val) {\n this.binder.fieldValue = val;\n }", "setValue(val) {\n this.binder.fieldValue = val;\n }", "add(name, ...responders) {\n const getter = () =>...
[ "0.66405296", "0.66405296", "0.5133272", "0.5133272", "0.5133272", "0.5045464", "0.5023724", "0.491515", "0.48843184", "0.48843184", "0.48742062", "0.48742062", "0.47372648", "0.4710066", "0.46727586", "0.46698922", "0.45492518", "0.45474812", "0.45337355", "0.45251146", "0.4...
0.7520641
1
Calls the setValue method all responders bound to this HValue.
refresh() { this.views.forEach(_responder => { if (_responder.value !== this.value && !_responder._valueIsBeingSet) { _responder._valueIsBeingSet = true; _responder.setValue(this.value); _responder._valueIsBeingSet = false; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set(_value) {\n if (this.differs(_value)) {\n this.value = _value;\n if (this.id) {\n require('comm/values').changed(this);\n }\n Queue.push(() => {\n this.refresh();\n });\n }\n }", "set(_value) {\n if (this.differs(_value)) {\n this.value = _value;\n i...
[ "0.63389826", "0.63389826", "0.6335977", "0.62003344", "0.61773074", "0.6129024", "0.6069635", "0.60054946", "0.59781706", "0.5930919", "0.5885544", "0.58635765", "0.5859989", "0.58222467", "0.58222467", "0.58222467", "0.58186364", "0.57765985", "0.57714725", "0.5750517", "0....
0.65827006
1
Get crawler checkpoints for the encrypted rooms and store them in the index.
async addInitialCheckpoints() { const indexManager = PlatformPeg.get().getEventIndexingManager(); const client = MatrixClientPeg.get(); const rooms = client.getRooms(); const isRoomEncrypted = (room) => { return client.isRoomEncrypted(room.roomId); }; // We ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listCheckpoints() {\n const contents = this._manager.contents;\n return this._manager.ready.then(() => {\n return contents.listCheckpoints(this._path);\n });\n }", "function checkpointed() {\n dyno.query({KeyConditions:{type:{ComparisonOperator:'EQ',AttributeValueList: ['sha...
[ "0.5726282", "0.53835034", "0.50723606", "0.48241755", "0.47270277", "0.46580598", "0.46496683", "0.46354538", "0.45623252", "0.45435262", "0.45340395", "0.44715405", "0.4444596", "0.44366768", "0.44299832", "0.44284618", "0.4403667", "0.43872577", "0.4362321", "0.43569428", ...
0.7561487
0
Start the crawler background task.
startCrawler() { if (this._crawler !== null) return; this.crawlerFunc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startCrawler (config) {\n\n var crawler = crawlerModule.create(config);\n crawler.start();\n}", "start()\n {\n if (this._started)\n return;\n\n this._downloader.scheduleChecks(CHECK_INTERVAL, INITIAL_DELAY);\n this._started = true;\n }", "function start() {\n doSearch();\n ...
[ "0.67615247", "0.6196929", "0.61226976", "0.59334624", "0.5872761", "0.5842766", "0.57754934", "0.57610613", "0.56492496", "0.56183404", "0.5584582", "0.55646783", "0.55537015", "0.5547585", "0.55224264", "0.5491381", "0.5489278", "0.547263", "0.5421734", "0.54165065", "0.539...
0.7451024
0
Stop the crawler background task.
stopCrawler() { if (this._crawler === null) return; this._crawler.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stop()\n {\n this._started = false;\n this._downloader.unscheduleChecks();\n }", "async function termination() {\n await crawlQueue.close();\n process.exit();\n}", "stop() {\n if (this._currentTask) {\n this._currentTask.return();\n }\n }", "stop() {\n if (this.worker...
[ "0.6813157", "0.64363617", "0.6408178", "0.6354806", "0.6294899", "0.6253016", "0.62020254", "0.61973876", "0.6176588", "0.6121846", "0.61091495", "0.6102098", "0.6102098", "0.6069703", "0.60675174", "0.6045721", "0.6043517", "0.6020183", "0.60165095", "0.6007468", "0.6005834...
0.80117166
0
Close the event index. This removes all the MatrixClient event listeners, stops the crawler task, and closes the index.
async close() { const indexManager = PlatformPeg.get().getEventIndexingManager(); this.removeListeners(); this.stopCrawler(); await indexManager.closeEventIndex(); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n events.removeListener('failure', this._listeners.failure);\n events.removeListener('success', this._listeners.success);\n events.removeListener('request', this._listeners.request);\n events.removeListener('event', this._listeners.event);\n }", "close() {\n console.log(\"disconnect...
[ "0.61816424", "0.5670542", "0.5633622", "0.5622025", "0.5577773", "0.55651224", "0.5524063", "0.55091715", "0.5508716", "0.54666984", "0.546597", "0.546597", "0.54527444", "0.54444814", "0.54415834", "0.54131615", "0.53929067", "0.53874034", "0.53584373", "0.534331", "0.53420...
0.8355718
0
Returns the distinct roots of the quadratic, or linear, equation.
static rootsOfQuadratic(a, b, c) { a = Complex.from(a); b = Complex.from(b); c = Complex.from(c); if (a.isEqualTo(0)) { if (!b.isEqualTo(0)) { return [c.times(-1).dividedBy(b)]; } if (!c.isEqualTo(0)) { return []; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "quadratic(){\nvar a=readlinesync.question(\"Enter the value of a:\");\nvar b=readlinesync.question(\"Enter the value of b:\");\nvar c=readlinesync.question(\"Enter the value of c:\");\nvar delta=Math.pow(b,2)-4*a*c;\nvar root1=(-b+Math.sqrt(delta)/(2*a*c));\nconsole.log(\"Root1 of x:\"+root1);\nvar root2=(-b-Math....
[ "0.67315966", "0.6526373", "0.64210904", "0.634514", "0.6283151", "0.5851611", "0.5489931", "0.5489931", "0.54868644", "0.5420499", "0.53972894", "0.5325621", "0.5213588", "0.52126545", "0.5201709", "0.51909226", "0.5184703", "0.5143586", "0.50794184", "0.50794184", "0.507760...
0.74367994
0
twee.js Two JavaScript classes for parsing Twee and TiddlyWiki data. These mirror the contents of tiddlywiki.php as much as possible. This cannot output to iPod or flat HTML format, notably, and RSS feeds and merging with an existing TiddlyWiki are as yet unavailable. This expects that incoming source uses \n as a newl...
function TiddlyWiki(nAuthor) { var tiddlers = []; var author = nAuthor; // public functions this.addTwee = addTwee; this.toHtml = toHtml; this.addTiddler = addTiddler; this.GetTiddlers = GetTiddlers; this.tiddlers = tiddlers; // implementation function addTwee(source) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Tiddler(nTitle, nTags, nText, nCreateTime) {\n var title, tags, createTime, text;\n\n // constructor\n\n title = nTitle;\n tags = nTags;\n text = nText;\n\n if (nCreateTime)\n createTime = nCreateTime;\n else\n createTime = new Date();\n\n // public functions\n\n t...
[ "0.619168", "0.5835061", "0.55801344", "0.55569977", "0.55476487", "0.5133876", "0.49677283", "0.49219024", "0.49219024", "0.48653498", "0.48338017", "0.4827082", "0.48094812", "0.47083136", "0.46826097", "0.45827192", "0.4538823", "0.45379928", "0.45186508", "0.45165193", "0...
0.6783806
0
Tiddler class represents a single Tiddler.
function Tiddler(nTitle, nTags, nText, nCreateTime) { var title, tags, createTime, text; // constructor title = nTitle; tags = nTags; text = nText; if (nCreateTime) createTime = nCreateTime; else createTime = new Date(); // public functions this.toHtml = toHtml; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TiddlyWiki()\n{\n\tvar tiddlers = {}; // Hashmap by name of tiddlers\n\tthis.namedNotifications = []; // Array of {name:,notify:} of notification functions\n\tthis.notificationLevel = 0;\n\tthis.clear = function() {\n\t\ttiddlers = {};\n\t\tthis.setDirty(false);\n\t\t};\n\tthis.fetchTiddler = function(tit...
[ "0.5767318", "0.5475345", "0.52616435", "0.5194221", "0.49579355", "0.48585352", "0.47344336", "0.46345365", "0.45958114", "0.4595597", "0.45876217", "0.4548725", "0.45367378", "0.44993618", "0.44743848", "0.44322938", "0.44288462", "0.44227916", "0.43755084", "0.4368391", "0...
0.62247556
0
Ecma International makes this code available under the terms and conditions set forth on (the "Use Terms"). Any redistribution of this code must retain the above copyright and this notice and otherwise comply with the Use Terms. / info: The effect of preventExtentions must be testable by calling isExtensible es5id: 15....
function testcase() { var o = {}; var o2 = undefined; o2 = Object.preventExtensions(o); if (o2 === o && Object.isExtensible(o2) === false) { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PreventExtensions(sandbox, target) {\n if(!(this instanceof PreventExtensions)) return new PreventExtensions(sandbox, target);\n else Write.call(this, sandbox, target);\n }", "function noCurrentIsExtensibleTest() {\n var obj = {};\n\n testDef(obj, 'foo', { value: 1 });\n\n // All other p...
[ "0.62834233", "0.6268955", "0.5917216", "0.5641504", "0.5544726", "0.5509622", "0.54780126", "0.54349047", "0.54208887", "0.53794754", "0.52957577", "0.525158", "0.5246574", "0.5232085", "0.51731336", "0.51490533", "0.5147511", "0.51177526", "0.51084095", "0.50770104", "0.507...
0.74479926
0
function that formats the start & end date and name to be sent off as http request if is7Hours is true, interval will be 7 hours ago if is7Hours is false, interval will be 7 days ago
function sendHttpDays(is7Hours) { var curr_date = new Date(); var eDate = convertToString(curr_date); var prev_date = new Date(); if(is7Hours){ isSevenHours = true; prev_date.setHours( prev_date.getHours() - 6); //7 hours, including current hour } else { isSevenHours = false; prev_date.setDate(prev_date.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateRangeCalculator(){\n\n\t//start date\n\n\t//end date\n\n\t//Api call request that reloads page/section based off of time span requested OR trimming original data object/array based off of new specified date range \n\n\n}", "formatRequestDate(request){\n\t\t// console.log(request, 'Request');\n\t\tif...
[ "0.6520238", "0.58223027", "0.5710918", "0.5699087", "0.54690814", "0.5449532", "0.54376", "0.5429585", "0.5377033", "0.5344248", "0.53091305", "0.5280634", "0.5265325", "0.5262824", "0.5233498", "0.5214276", "0.5187524", "0.51817566", "0.5153318", "0.51468635", "0.51208985",...
0.6417823
1
function that returns the input date in the form yyyymmddhh (string) input must be in form of : var date = new Date();
function convertToString(date) { //gets the year as a four digit number var year = date.getFullYear(); var strYear = year.toString(); //gets month as two digit number, from 0 - 11; so we add one var month = date.getMonth() + 1; var tempStrMonth = month.toString(); var strMonth = ''; //if the month is one digi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FechaInput() {\n var hoy = new Date();\n var dd = hoy.getDate();\n var mm = hoy.getMonth() + 1;\n var yyyy = hoy.getFullYear();\n if (dd < 10) {\n dd = '0' + dd\n }\n if (mm < 10) {\n mm = '0' + mm\n }\n return yyyy + '-' + mm + '-' + dd;\n}", "function makeDateS...
[ "0.68644017", "0.68004274", "0.6759893", "0.6759893", "0.67410755", "0.66927147", "0.6623813", "0.66046673", "0.66046673", "0.6561191", "0.6550014", "0.65229595", "0.6502983", "0.6502983", "0.65027785", "0.64969885", "0.6487335", "0.64766026", "0.64506525", "0.6449347", "0.64...
0.7195894
0
this function will update all the graphs where res is the response from the gcloud function: exercise_data
function update_graphs(res) { //code for generating the labels //to hold the labels for the graphs var labels = []; //generate the labels for the graphs if(isSevenHours) { //if the labels must be generated in hours //hi var i; for(i = 6; i >= 0; i--) { var prev_date = new Date(); prev_date.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function updateEval() {\n const eval = await (await fetch( './getEvaluation', { method: 'POST'} )).json();\n fillElements( eval );\n }", "function updateCharts(responses){\n console.log(\"responss\", responses);\n // const allStats = responses[0].value;\n // console.log(\"updateCharts\",all...
[ "0.6015676", "0.5926245", "0.58696747", "0.57879007", "0.57600206", "0.5754053", "0.57063246", "0.5687876", "0.56679326", "0.5647232", "0.5645358", "0.5636415", "0.5624511", "0.56041634", "0.55981576", "0.55976695", "0.55699205", "0.5553895", "0.5552932", "0.5547289", "0.5546...
0.67230123
0
will sort the exercise by category input exName: the name of the exercise output: Flexibility, Strength, Cardio, Balance 0 : flexibility 1 : strength 2 : cardio 3 : balance
function sortByCategory(exName) { var FLEXIBILITY = ["SINGLE LEG STANCE","QUAD STRETCH","SHOULDER RAISES","NECK SIDE STRETCH","CHEST STRETCH","ARM RAISES"]; var STRENGTH = ["WALL PUSH-UP","TRICEP KICKBACKS","LATERAL RAISES","KNEE EXTENSION","HEEL STAND"]; var CARDIO = ["WALKING", "JOGGING", "JUMPING JACKS"]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortCategories(criteria, array){\n let result = [];\n if (criteria === ORDER_ASC_BY_NAME)\n {\n console.log(array)\n result = array.sort(function(a, b) {\n if ( a.name < b.name ){ return -1; }\n if ( a.name > b.name ){ return 1; }\n return 0;\n ...
[ "0.5880558", "0.58729863", "0.57604057", "0.56897986", "0.5467181", "0.5443398", "0.5440506", "0.5424274", "0.5418382", "0.53623074", "0.534407", "0.5332104", "0.5329409", "0.5303205", "0.52992034", "0.52797663", "0.5278579", "0.5260202", "0.52574885", "0.52460086", "0.524539...
0.77125394
0
Function to fetch SpaceX capsules, populates containers in rokets.htm with these capsules
function capsulesPopulate() { fetch('https://api.spacexdata.com/v3/capsules?order=desc') .then(resolve => { resolve.json().then(respond => { var content = ''; // Looping through returned array to create container for each capsule for (i=0;i<respond...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCapsulesFromStore() {\n return ipcRenderer.sendSync('get-capsules');\n}", "function displayCapsules(capsuleObj)\t{\n\n\tfor (var id in capsuleObj)\t{\n\n\t\tif (capsuleObj.hasOwnProperty(id))\t{\n\t\t\n\t\t\tvar capsule = capsuleObj[id];\n\n\t\t\t// format in locale-dependent format, and include\n\t...
[ "0.5824665", "0.54010856", "0.48412248", "0.48068306", "0.47688463", "0.47300562", "0.46420446", "0.46201995", "0.46108502", "0.46036333", "0.458446", "0.45738217", "0.45661297", "0.45585796", "0.44939533", "0.44902012", "0.44783002", "0.44783002", "0.4469691", "0.44625214", ...
0.694333
0
Function to fetch SpaceX cores, populates containers in rokets.htm with these cores
function coresPopulate() { fetch('https://api.spacexdata.com/v3/cores?order=desc') .then(resolve => { resolve.json().then(respond => { var content = ''; // Looping through returned array to create container for each core for (i=0;i<respond.length;i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cores() {\n\t\tvar nc=0,nc1=0;\n\t\tvar vp = janLocObj(\"vFls\");\n\t\tfor (var f=0;f<vp.length;f++) {\n\t\t\tvar ov = vp[f];\n\t\t\tfor (var prop in ov) {\n\t\t\t\tnc++;\n\t\t\t\tvar e = ov[prop]; //new estilo(f+'@'+prop);\n\t\t\t\tfor (var x=0;!vazio(e) && x<e.v.length;x++) {\n\t\t\t\t\tnc1++;\n\t\t\t\t...
[ "0.6481762", "0.6307506", "0.620021", "0.57203525", "0.55759126", "0.5511897", "0.5447269", "0.5384331", "0.5281964", "0.5281964", "0.5281964", "0.5281964", "0.5281964", "0.5281964", "0.5250441", "0.52333534", "0.5159976", "0.50720996", "0.5053663", "0.50130135", "0.4950191",...
0.79909945
0
addDatas([1,2,3]); without spread (...) addDatas(1,2,3); with spread
addDatas(...datas) { for (let data of datas) { this.add(data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add(...numbers) {\n\n console.log(numbers);\n // [ 1, 2, 3, 4, 5 ]\n\n // spread\n console.log(...numbers);\n // 1 2 3 4 5\n}", "function data([\n first,\n second,\n third\n]) {\n // ...\n}", "function add(...numbers) {}", "function add(books, bookName) {\n return [...b...
[ "0.69785047", "0.66329145", "0.65291125", "0.64014226", "0.6292525", "0.62507397", "0.6243541", "0.6201573", "0.61758244", "0.6110945", "0.61007106", "0.608865", "0.60866416", "0.60866416", "0.6084046", "0.6081373", "0.6073028", "0.604516", "0.6016805", "0.59924006", "0.59859...
0.7735944
0
This function runs after setting text or padding, but only if padding is changed
function updateTextPadding() { var styles = wrapper.styles, textAlign = styles && styles.textAlign, x = paddingLeft + padding * (1 - alignFactor), y; // determin y based on the baseline y = baseline ? 0 : baselineOffset; // compensate for alignment if (defined(width) && bBox && (textAlign =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTextPadding() {\n\t\t\t\tvar styles = wrapper.styles,\n\t\t\t\t\ttextAlign = styles && styles.textAlign,\n\t\t\t\t\tx = paddingLeft + padding * (1 - alignFactor),\n\t\t\t\t\ty;\n\n\t\t\t\t// determin y based on the baseline\n\t\t\t\ty = baseline ? 0 : baselineOffset;\n\n\t\t\t\t// compensate for ali...
[ "0.7067253", "0.7067253", "0.7025967", "0.66400295", "0.6593516", "0.65540165", "0.6394713", "0.6221987", "0.6163933", "0.589906", "0.5890329", "0.58419675", "0.58118546", "0.5810361", "0.56832826", "0.55742013", "0.5572086", "0.5542531", "0.55197", "0.5460289", "0.53741145",...
0.7080722
0
Set the one and two dimensional distance on the point object
function setDistance(p1, p2) { var x = (defined(p1[kdX]) && defined(p2[kdX])) ? Math.pow(p1[kdX] - p2[kdX], 2) : null, y = (defined(p1[kdY]) && defined(p2[kdY])) ? Math.pow(p1[kdY] - p2[kdY], 2) : null, r = (x || 0) + (y || 0); p2.dist = defined(r) ? Math.sqrt(r) : Number.MAX_VALUE; p2.distX = defined...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDistance(p1, p2) {\n\t\t\t\tvar x = (defined(p1[kdX]) && defined(p2[kdX])) ? Math.pow(p1[kdX] - p2[kdX], 2) : null,\n\t\t\t\t\ty = (defined(p1[kdY]) && defined(p2[kdY])) ? Math.pow(p1[kdY] - p2[kdY], 2) : null,\n\t\t\t\t\tr = (x || 0) + (y || 0);\n\n\t\t\t\tp2.dist = defined(r) ? Math.sqrt(r) : Number....
[ "0.7406235", "0.7311403", "0.7311403", "0.7107996", "0.67952037", "0.6686311", "0.6452893", "0.63330126", "0.6236338", "0.6172903", "0.6071648", "0.6019819", "0.6006763", "0.60058075", "0.60022664", "0.5996299", "0.5928645", "0.59236705", "0.59168565", "0.59125465", "0.590793...
0.7407702
0
set Timeout to check the counter and heart and update the likes
function heartBeatChecker(){ if (!numbers[counter]){ let counterState = {num:counter, likes: likesState} numbers[counter] = counterState } else { numbers[counter].likes = likesState } // update number and count in li ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function doLike () {\n try {\n // await ig.login(username, password);\n let medias = await ig.getTimeLineFeed();\n medias.map(async ({ node }) => {\n let now = new Date().getTime();\n let fourHours = 3600 * 4 * 1000;\n let mediaTimePost = node.taken_at_timestamp * 1000;\n if (me...
[ "0.6641036", "0.63746315", "0.6248569", "0.62156135", "0.62026894", "0.60359854", "0.6006742", "0.5987326", "0.59871256", "0.59657747", "0.593869", "0.59284073", "0.59006274", "0.5887073", "0.58835435", "0.5875454", "0.58662283", "0.5857523", "0.58565193", "0.58239114", "0.58...
0.68165165
0
========== Cartridge Management ==========
async function load_cartridge(cart_data) { console.log("Attempting to load cart with length: ", cart_data.length); await rpc("load_cartridge", [cart_data]); console.log("Cart data loaded?"); g_game_checksum = crc32(cart_data); load_sram(); let power_light = document.querySelector("#power_light #led"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initCartridge(data) {\n this.cartridge = new Cartridge(data, this);\n\n this.initCore();\n this.reset();\n }", "function load_cartridge(cart_data) {\n load_rom(cart_data);\n set_audio_samplerate(44100);\n}", "initCore() {\n this.memory = new Memory(this);\n this.cpu = new CPU(this);\n this...
[ "0.74179494", "0.6333409", "0.5968401", "0.5950752", "0.52341187", "0.4993248", "0.49904007", "0.4969804", "0.49516976", "0.48908824", "0.48689336", "0.4866908", "0.48628235", "0.4824063", "0.48126274", "0.48124036", "0.4790997", "0.47786117", "0.477363", "0.47677815", "0.474...
0.63511235
1
Hand Constructor from Deck s with n number of cards
function Hand(s, n) { var Cards = []; Cards = Cards.concat(s.Deal(n)); //Getter this.getHand = function() { return Cards; }; //Adder this.addCards = function(c) { if(Array.isArray(c)) { Cards = Cards.concat(c); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(source, n) {\n if (source instanceof Hand) {\n this.cards = source.cards.slice(0);\n }\n else if (source instanceof Deck) {\n assert(n>=1);\n this.cards = source.GetCards(n);\n }\n else if (Array.isArray(source)) {\n this.ca...
[ "0.7822747", "0.7433453", "0.7167534", "0.7134807", "0.7056499", "0.70502543", "0.698746", "0.698029", "0.69567114", "0.69417274", "0.6915843", "0.6909159", "0.68726856", "0.6844628", "0.6843995", "0.6826749", "0.6799694", "0.67974794", "0.67929435", "0.6790187", "0.6755301",...
0.7741975
1
Sticking (includes Dealer play)
function stick() { dcards.innerHTML = "<p>" + dealersHand.printHand() + "</p>"; while ((dealersHand.getScore() < 17) && (dealersHand.getScore() !== 0)) { dealersHand.hitMe(stack); dcards.innerHTML = "<p>" + dealer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveSprikes() {\n setInterval(spikesComing, 4000);\n }", "function tickSnake() {\n\tsetDirection(snake, snake.nextdir);\n\tif (isEating(snake, food)) {\n\t\teat(snake, food);\n\t} else {\n\t\tmove(snake);\n\t}\n\t// snake.score++;\n}", "function repositionStoreItems() {\n if (...
[ "0.62365454", "0.6133338", "0.61297953", "0.61216575", "0.6095119", "0.60867774", "0.6077009", "0.607617", "0.60648656", "0.60476774", "0.60297054", "0.6008388", "0.59603345", "0.5917345", "0.59008557", "0.5865644", "0.5857013", "0.5830085", "0.58262926", "0.5814365", "0.5806...
0.6144104
1
deleting a meal from meals, by changing meal.isActive false
removeMeal(state, mealId) { state.meals = state.meals.map((meal) => meal.id === mealId ? { ...meal, isActive: false } : meal ); alert("Meal Removed") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_meal_from_meal_list()\n{\n if (!current_meal.is_calendar_meal) {\n if (confirm(\"Are you sure you want to remove \" + current_meal.name + \" from your meals? (This cannot be undone)\")) {\n // Get the meal id\n var meal_id = current_meal.id;\n\n // Remove ...
[ "0.66044", "0.6567616", "0.62298816", "0.6120382", "0.5811554", "0.5800343", "0.5778249", "0.57770556", "0.57622075", "0.5730038", "0.5717137", "0.568867", "0.5668557", "0.5662821", "0.565524", "0.56358397", "0.56206566", "0.5596868", "0.55905384", "0.5549442", "0.5521848", ...
0.7357692
0
recovering the meal to meals, by changing meal.isActive true
recoverMeal(state, mealId) { state.meals = state.meals.map((meal) => meal.id === mealId ? { ...meal, isActive: true } : meal ); alert("Meal Recovered") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeMeal(state, mealId) {\r\n state.meals = state.meals.map((meal) =>\r\n meal.id === mealId ? { ...meal, isActive: false } : meal\r\n );\r\n alert(\"Meal Removed\")\r\n }", "function edit_current_meal()\n{\n // Toggle edit mode\n is_edit_mode = true;\n\n // Save the current m...
[ "0.61782664", "0.5752719", "0.5629672", "0.5450106", "0.5314919", "0.5308226", "0.52931905", "0.52572477", "0.5241914", "0.5241007", "0.51964414", "0.51924556", "0.51451874", "0.5107716", "0.5106519", "0.50700974", "0.50608295", "0.50419587", "0.5026847", "0.49956763", "0.495...
0.7369112
0
Make a popup dialog box title => Title of the dialog box content => Description of event which is about to occur options => Array of output options. each index should be an object with a key and value pair Return Promise
static popup(title, content, options, container){ const dialogPromise = new Promise((resolve, reject) => { try{ const id = Date.now(); let outputOptions = options .filter((value) => typeof value === 'object' && typeof value...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static input(title, content, defaultValue = \"\", confirmLabel = \"Ok\", cancelLabel = \"Cancel\", container){\r\n const inputPromise = new Promise((resolve, reject) => {\r\n try{\r\n const id = Date.now();\r\n let outputOptions = `<div class='btn confirm'>${confirmL...
[ "0.61245036", "0.5938836", "0.5851408", "0.5821678", "0.57873446", "0.5770513", "0.57427233", "0.5735153", "0.56897366", "0.56858194", "0.5659511", "0.5596412", "0.5595525", "0.5592486", "0.5590929", "0.55666405", "0.5534269", "0.55180615", "0.5488458", "0.5442199", "0.543217...
0.7283358
0
Make a input dialog box title => Title of the dialog box content => Description of event which is about to occur defaultValue => Default input value (Defaults to empty) confirmLabel => Text for the confirmation label (Defaults to Ok) cancelLabel => Text for the cancel label (Defaults to Cancel) Return Promise
static input(title, content, defaultValue = "", confirmLabel = "Ok", cancelLabel = "Cancel", container){ const inputPromise = new Promise((resolve, reject) => { try{ const id = Date.now(); let outputOptions = `<div class='btn confirm'>${confirmLabel}</div> <div cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prompt(browserWindow, message, defaultValue = '') {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n // build the dialog's inner DOM\n const messageElement = document.createTextNode(me...
[ "0.6781549", "0.6724491", "0.65050644", "0.63267255", "0.63149977", "0.62388116", "0.62371284", "0.6188439", "0.61843014", "0.618244", "0.6172441", "0.61651015", "0.60798913", "0.6024033", "0.6013657", "0.5971692", "0.59631014", "0.595831", "0.59243256", "0.5890426", "0.58815...
0.7988342
0
Returns an object with substring and percents from 100 value
function percent(str) { var num = '', percentPos = str.indexOf('%'), leftNumPos = -1, rightNumPos = percentPos - 1; for (var i = rightNumPos; i >= 0 && (isFinite(str[i]) || str[i] == '.'); i--) { num += str[i]; leftNumPos = i; } num = num.split('').reverse().join(''); return { substr: num + '%', num: num /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConvertPercentByItem(vString) {\n // Check name of properties have supported\n var nameIndex = $.inArray(name, aNamePercent);\n if (nameIndex !== -1) {\n // Convert '%' unit depends on size of Item\n vString = parseFloat(vS...
[ "0.7253555", "0.680925", "0.6801419", "0.6703862", "0.67035943", "0.6701781", "0.65917534", "0.65635806", "0.6558874", "0.6543878", "0.6533515", "0.6505682", "0.6503115", "0.64827865", "0.643276", "0.6419649", "0.64028126", "0.6398437", "0.638169", "0.637997", "0.6367798", ...
0.7538532
0
View the numbers of puzzle list Warning : only properties of local storage that start with "puzzleNamedListToSort" are taken into consideration. Otherwise, local storage has to be looked into !
function viewPuzzleList(p_puzzleName) { var resultDisplay = "Préfixe : "+p_puzzleName+" \n"; var numericListToSort = []; var puzzleNamedListToSort = []; var suffix, intToTest; const baseString = "grid_is_good_" + p_puzzleName; var conditionalComma; var conditionalBackLine="\n"; for (var i = 0, len ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortNumberBoard(){\n this.clearBoards()\n boardItems.sort();\n screenView()\n}", "function showRank(){\n\tvar nameArray = new Array();\n\tvar scoreArray = new Array();\n\tfor(var i = 0; i <= localStorage.length; i++){\n\t\tscoreArray.push(localStorage.key(i));\n\t}\n\tvar sortedScoreArray = scor...
[ "0.60809875", "0.60433906", "0.586418", "0.57700986", "0.5762207", "0.56327343", "0.55863374", "0.5575679", "0.5568617", "0.55507636", "0.5524891", "0.55211884", "0.5499433", "0.5466483", "0.54543823", "0.5451361", "0.54459685", "0.5443687", "0.54081345", "0.54000545", "0.539...
0.8288492
0
Returns the secretRef for the cluster, that hosts the terminal pods for the (virtual)garden
async function getGardenTerminalHostClusterSecretRef (client) { const refType = getGardenTerminalHostClusterRefType() switch (refType) { case GardenTerminalHostRefType.SECRET_REF: { const { items: runtimeSecrets } = await getGardenTerminalHostClusterSecrets(client) const secret = _.head(runtimeSecr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function ensureTrustedCertForGardenTerminalHostApiServer (client) {\n logger.debug('replacing resources on garden host cluster for webterminals')\n\n const refType = getGardenTerminalHostClusterRefType()\n\n switch (refType) {\n case GardenTerminalHostRefType.SECRET_REF: {\n const { name, namespac...
[ "0.50494015", "0.5035593", "0.50179255", "0.4968158", "0.48485124", "0.47794443", "0.47667715", "0.47215754", "0.46647155", "0.46357304", "0.46212986", "0.45518902", "0.45515144", "0.45515144", "0.45515144", "0.45515144", "0.45515144", "0.45515144", "0.45046", "0.44985944", "...
0.78360146
0
Currently the kube apiserver of a shoot presents a certificate signed by a custom CA root certificate which is usually not trusted by a browser. As for the web terminals, the frontend client opens a websocket connection directly to the kube apiserver. This requires a browser trusted certificate. Preferred, the gardener...
async function ensureTrustedCertForShootApiServer (client, shoot, seed) { const { namespace, name, deletionTimestamp } = shoot.metadata if (deletionTimestamp) { logger.debug(`Shoot ${namespace}/${name} is marked for deletion, bootstrapping aborted`) return } const seedName = seed.metadata.name if (i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function ensureTrustedCertForGardenTerminalHostApiServer (client) {\n logger.debug('replacing resources on garden host cluster for webterminals')\n\n const refType = getGardenTerminalHostClusterRefType()\n\n switch (refType) {\n case GardenTerminalHostRefType.SECRET_REF: {\n const { name, namespac...
[ "0.5952623", "0.49971822", "0.49693438", "0.49330166", "0.48833513", "0.48363808", "0.47442812", "0.46904007", "0.4682717", "0.46317345", "0.46251833", "0.4613447", "0.4585095", "0.45677954", "0.4551609", "0.45369917", "0.4484124", "0.4459269", "0.44005957", "0.438909", "0.43...
0.54994303
1
Make sure a a browsertrusted certificate is presented for the kubeapiserver of the garden terminal host cluster. This cluster runs the terminal pods of garden operators for the (virtual) garden.
async function ensureTrustedCertForGardenTerminalHostApiServer (client) { logger.debug('replacing resources on garden host cluster for webterminals') const refType = getGardenTerminalHostClusterRefType() switch (refType) { case GardenTerminalHostRefType.SECRET_REF: { const { name, namespace } = await ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifyCert(){\n\t//const cert = Verifier.Certificate.parseJson(data); // in the next two lines we are verifying the certificate inside the console.\n\t//console.log(cert);\n\tsetTimeout(alert(\"Verified!\"), 2500);\n}", "async function ensureTrustedCertForShootApiServer (client, shoot, seed) {\n const ...
[ "0.51103777", "0.48617086", "0.47980088", "0.4736251", "0.47136426", "0.4694236", "0.468165", "0.4634319", "0.46338028", "0.46256834", "0.46196917", "0.46170282", "0.4613266", "0.46114516", "0.46113732", "0.46046934", "0.4588983", "0.4588761", "0.4553936", "0.45488966", "0.45...
0.7138839
0
Outer lanes that are expired are to be considered, the other are updates so we need to take those out Here a outer lane is a lane with lane code that existed in the original but not in the modified configuration
function omitIrrelevantExpiredLanes() { var lanesToBeRemovedFromExpire = _.filter(assetsToBeExpired, function (lane) { return !_.isUndefined(self.getLane(getLaneCodeValue(lane))); }); _.forEach(lanesToBeRemovedFromExpire, function (lane) { _.remove(assetsToBeExpired, {'id': lane.id});...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async _updateInvalidatedAccessories() {\n /* Create the condition time */\n const d = new Date();\n d.setSeconds(d.getSeconds() - (MoxLtHome.FORCE_STATUS_UPDATE_INTERVAL / 1000));\n \n /* Fetch the old accessories */\n const accessories = await Accessory.find({ updatedAt: ...
[ "0.530782", "0.51825094", "0.508962", "0.5072893", "0.50620604", "0.5045246", "0.50135857", "0.5003481", "0.4998637", "0.49962667", "0.49890777", "0.49274877", "0.49274877", "0.4920585", "0.49128252", "0.49071833", "0.4898716", "0.4891007", "0.48505366", "0.48500705", "0.4850...
0.59554744
0
New function when mouse is released original red background color appears and the picture evolves again.
function mouseReleased(){ background("rgb(255, 24, 24)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorChanger(color){\n\n mouse.color = color;\n hold.style.background = color;\n\n\n\n\n}", "function mousePressed() {\n background(\"rgb(233, 255, 232)\");\n\n}", "function mouseReleased(){\n //unstretch foreo\n on();\n }", "function pressrestartcolor(evt){\n var mousePos = getMous...
[ "0.7203342", "0.7156078", "0.7111228", "0.69714063", "0.69543326", "0.6857208", "0.67993534", "0.66438377", "0.66006213", "0.6577555", "0.65496135", "0.64837754", "0.64657766", "0.64627314", "0.6398998", "0.63961476", "0.6373689", "0.63674664", "0.6366211", "0.6365213", "0.63...
0.77799046
0
Convenience function for creating the source of babel plugins.
function p (generalName, version) { return new PluginSource(`babel-plugin-${generalName}`, version) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get babelParserPlugins() {\n return [\"typescript\", \"classProperties\", \"decorators-legacy\"];\n }", "function build_pluginsjs(cb)\n{\n\t\tlet plugins = require('./src/js/plugins_draft.js');\n\t \n\t /** Filter minified files using gulp-if */\n\t return gulp.src(plugins)\n\t\t\t.pipe(sourcemaps.init({ ...
[ "0.6527648", "0.6319984", "0.60570985", "0.6015157", "0.59083474", "0.58657694", "0.5805744", "0.5764048", "0.5710652", "0.56722355", "0.5670487", "0.56700313", "0.5611104", "0.5518455", "0.5479978", "0.5478765", "0.5469419", "0.5468518", "0.5465158", "0.5452754", "0.5446573"...
0.6697516
0
push "Questions" into avaiableQuesion Array (let availableQuesion=[];)
function setAvailableQuesion(){ const totalQuesion=quiz.length for(let i=0 ;i<totalQuesion ;i++) availableQuesion.push(quiz[i]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAvailableQuestion()\n{ \n const totalques=quiz.length;\n \n for(let i=0;i<totalques;i++)\n {\n \n availableQuestion.push(quiz[i]);\n \n \n }\n \n}", "function setAvailableQuestions() {\n const totalQuestion = quiz.length;\n for (let i = 0; i < tota...
[ "0.82608956", "0.81650656", "0.81629145", "0.8153145", "0.8135321", "0.8104424", "0.79886305", "0.79458404", "0.72682786", "0.6943187", "0.68989795", "0.68728334", "0.68704766", "0.6844084", "0.68381536", "0.6837985", "0.68262094", "0.6800927", "0.6787405", "0.67848855", "0.6...
0.8390774
0
skonczyc ta funkcje!!! / ocenia pozycje algorytmem alfabeta: glebia_ob obecna glebia: od 0 w polruchach glebia_maks maksymalna glebia, do ktorej analizujemy rowniez ruchy bez bicia glebia_maks_zapisz_ruch maksymalna glebia, do ktorej do tablicy transpozycji zapisujemy rowniez ruchy
function alfa_beta(glebia_ob, glebia_maks, glebia_maks_zapisz_ruch, alfa, beta) { let ruchy_teraz, element, bierka_zbita; if(tablica_transp[szachownica.hash]) { if(tablica_transp.glebia > glebia_ob - glebia_maks) return tablica_transp[szachownica.hash].ocena; else if(tablica_tra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wykonaj_ruch_SI()\n{\n let ruchy = generuj_ruchy(), ruch_t;\n\n // sprawdzanie czy jest mat/pat\n if(ruchy.ruchy.length + ruchy.zbicia.length === 0)\n {\n if(czy_szach(szachownica.biale_ruch))\n {\n // mat, SI przegralo\n napisz_wynik(szachownica.biale_ruch ...
[ "0.7145512", "0.6913795", "0.6693489", "0.66394234", "0.65433776", "0.6496257", "0.64420277", "0.63143474", "0.62321454", "0.607818", "0.6062601", "0.6059923", "0.6051383", "0.6038342", "0.60312665", "0.6009595", "0.60078543", "0.60020226", "0.59942806", "0.5993361", "0.59852...
0.70295626
1
Adds a new item to the list and emits a CHANGED event.
_addNewTodo(item) { _todolistState.push(item); this.emit(CHANGE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onAddItem () {\n const newItem = this.get('bunsenModel').items.type === 'object' ? {} : ''\n const items = this.get('items')\n const index = items.length\n\n items.pushObject(newItem)\n this.notifyParentOfNewItem(newItem, index)\n }", "addItem(item) {\r\n this.list.push(item);\...
[ "0.6907995", "0.68217164", "0.65740705", "0.64897597", "0.6432424", "0.64172286", "0.6390231", "0.6383099", "0.63740915", "0.6353285", "0.63394487", "0.6319018", "0.6301824", "0.6280599", "0.6273205", "0.6256951", "0.625352", "0.62282544", "0.62143004", "0.62025106", "0.61679...
0.76328653
0
This throws an error if the person with a given id is currently enabled and "want" is false or is currently disabled and "want" is false. It also throws an error if no person with the given id is found.
async function validateEnabled(id: string, want: boolean) { const person = await pg.getById('people', id); if (!person) throw new NotFoundError('no person with id ' + id); if (person.enabled !== want) { const kind = want ? 'disable' : 'enable'; throw new RequestError(`cannot ${kind} a person already ${kin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkForPlayer (id) {\n return this.turns.indexOf(id) >= 0\n }", "function check_in(id) {\n if(id.id !== undefined) {\n //perhaps this is an insure object\n id = id.id;\n }\n if(id in this.registry) {\n this.emit('check_in', this.registry[id]);\n this.registry[id].done = ...
[ "0.56207734", "0.5278514", "0.5198744", "0.50409687", "0.5014814", "0.49465904", "0.4944059", "0.49384224", "0.49032825", "0.48966834", "0.48651615", "0.4826604", "0.48136652", "0.48079205", "0.4805232", "0.48021197", "0.4799993", "0.47991908", "0.4798823", "0.47924623", "0.4...
0.80604494
0
render an entry in the leaderboard
function renderLeader(leader) { let $leaderRecordEl = document.createElement('tr'); let $leaderNameEl = document.createElement('td'); let $leaderScoreEl = document.createElement('td'); let $leaderTimeEl = document.createElement('td'); $leaderNameEl.textContent = leader.name; $leaderScoreEl.text...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLeaderboard () {\n // set font color/size\n OasisCanvasContext.fillStyle = 'black';\n OasisCanvasContext.font = \"17px Arial\";\n\n // render leaderboard title\n OasisCanvasContext.fillText(\n 'Leaderboard:',\n OasisCanvas.width - 200,\n 75\n );\n\n // rende...
[ "0.70090735", "0.6155723", "0.6154593", "0.6147875", "0.6043558", "0.5958599", "0.59088963", "0.58606505", "0.58371603", "0.5825468", "0.5776158", "0.5739668", "0.5730768", "0.57211125", "0.57187474", "0.5717536", "0.57144296", "0.5648803", "0.5625635", "0.5622122", "0.561895...
0.6939959
1
Example For a = "abc" and b = "abccba", the output should be stringsConstruction(a, b) = 2. We can construct 2 strings a with letters from b.
function stringsConstruction(a, b) { a = a.split(''); b = b.split(''); let index = 0; let count = 0; let numStrings = 0; while(b.length > 0){ if(b.indexOf(a[index]) >= 0){ count++; b.splice(b.indexOf(a[index]), 1); } else break; if(index ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function workOnStrings(a,b){\n let cc=x=>x==x.toLowerCase()?x.toUpperCase():x.toLowerCase(), arra=a.split(''), arrb=b.split(''), r, res;\n res = arra.map(x=>{r=new RegExp(x,'gi'); return (b.match(r)||[]).length%2?cc(x):x}).join('');\n res += arrb.map(x=>{r=new RegExp(x,'gi'); return (a.match(r)||[]).length%2?c...
[ "0.61716974", "0.5967596", "0.5585412", "0.5533295", "0.54856455", "0.5420642", "0.52576554", "0.52429676", "0.5234648", "0.50959027", "0.5078007", "0.50643086", "0.5049767", "0.50495255", "0.5043404", "0.5002662", "0.5002662", "0.5002662", "0.5002662", "0.5002662", "0.500266...
0.6958808
0
function that checks the user guess aganist the game word also displays word in _ _ _ and right letters guessed
function answerCheck() { gameWordDisplay = ""; //loops through the game word for (var i = 0; i < gameWord.length; i++) { //check the letters guessed by the user agains each position of the game word if (guessedLetters.includes(gameWord.charAt(i))) { //if the letter is there, displays it at the position game...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function correctGuess() {\n console.log(`\\n You guessed right!\\n`.bgBlue);\n if (\n chosenWord.replace(/ /g, \"\") == gameWord.displayWord().replace(/ /g, \"\")\n ) {\n console.log(gameWord.displayWord());\n console.log(`\\n You Win!!!!\\n`.bgMagenta);\n chosenWord = \"\";\n gameWord = \"\";\n ...
[ "0.7868464", "0.7851119", "0.78349525", "0.77577645", "0.77510196", "0.768955", "0.76218295", "0.7591297", "0.75826", "0.7582291", "0.75574917", "0.75538146", "0.7538418", "0.7521178", "0.75070834", "0.7506624", "0.7484353", "0.74808735", "0.7473454", "0.7460434", "0.7445478"...
0.8277791
0
resource_id computed: true, optional: false, required: false
get resourceId() { return this.getStringAttribute('resource_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get resourceIdInput() {\n return this._resourceId;\n }", "get resourceIdInput() {\n return this._resourceId;\n }", "set resourceId(value) {\n const {\n resource\n } = this; // When assigning a new id to a resource, it will update the resourceId of the assignment. But the assignme...
[ "0.659469", "0.659469", "0.6520737", "0.6502807", "0.6200246", "0.6047665", "0.6005498", "0.5849828", "0.5740266", "0.57253385", "0.57116127", "0.5696405", "0.5639498", "0.5637711", "0.5625531", "0.55082303", "0.55042326", "0.54881334", "0.5472222", "0.54550946", "0.53816", ...
0.7078388
0
resource_type computed: true, optional: false, required: false
get resourceType() { return this.getStringAttribute('resource_type'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getResourceType() {\n return super.getAsNullableString(\"resource_type\");\n }", "static get RESOURCE_TYPE() {\n return (RESOURCE_TYPE);\n }", "static get isResourceModel() {\n return true;\n }", "static get __resourceType() {\n\t\treturn 'Resource';\n\t}", "static get __resourceTyp...
[ "0.69967574", "0.6076458", "0.60049593", "0.57390463", "0.5699832", "0.56921256", "0.56466293", "0.5621059", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5518851", "0.5454637", "0.54178816...
0.6587106
1
find with the gid.
function find(gid, callback){ getHangoutModel().find({ "gid": gid }, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findOneWithGID(gid, callback){\n getHangoutModel().findOne({ \"gid\": gid }, callback);\n}", "function getgid() {\n // debug('getgid');\n return syscall(x86_64_linux_1.SYS.getgid);\n}", "function gid(id ){\n return document.getElementById(id);\n}", "function findGroup(groupId) {\n ...
[ "0.6273162", "0.60651135", "0.59251624", "0.59058005", "0.590137", "0.57641983", "0.5755229", "0.5697768", "0.5691025", "0.5636856", "0.5584494", "0.5516831", "0.5489522", "0.54683006", "0.5218637", "0.521487", "0.5152566", "0.5142685", "0.51212925", "0.51016694", "0.5092885"...
0.67436635
0
find with the gid.
function findOneWithGID(gid, callback){ getHangoutModel().findOne({ "gid": gid }, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find(gid, callback){\n getHangoutModel().find({ \"gid\": gid }, callback);\n}", "function getgid() {\n // debug('getgid');\n return syscall(x86_64_linux_1.SYS.getgid);\n}", "function gid(id ){\n return document.getElementById(id);\n}", "function findGroup(groupId) {\n for (var ...
[ "0.67436635", "0.60651135", "0.59251624", "0.59058005", "0.590137", "0.57641983", "0.5755229", "0.5697768", "0.5691025", "0.5636856", "0.5584494", "0.5516831", "0.5489522", "0.54683006", "0.5218637", "0.521487", "0.5152566", "0.5142685", "0.51212925", "0.51016694", "0.5092885...
0.6273162
1
move to left without going out of grid
function moveLeft() { undraw(); const isAtLeftEdge = current.some( (index) => (currentPosition + index) % width === 0, ); if (!isAtLeftEdge) { currentPosition -= 1; } if ( current.some((index) => squares[currentPosition + index].classList.contains("taken"), ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveLeft()\r\n {\r\n undraw()\r\n const isAtLeftEdge = currentTetromino.some(index => (currentPosition + index) % width === 0)\r\n\r\n if(!isAtLeftEdge)\r\n currentPosition -= 1\r\n if(currentTetromino.some(index => squares[currentPosition + index].classList.conta...
[ "0.7908706", "0.7899216", "0.78978896", "0.78811306", "0.78780305", "0.7859897", "0.7785276", "0.7763163", "0.77617216", "0.77538836", "0.7701967", "0.76352215", "0.75503737", "0.75298667", "0.75222003", "0.7446445", "0.7370905", "0.7363725", "0.7275917", "0.7209363", "0.7183...
0.7905406
1
Fetches all pages of the provided categories, calling the `callback` function for each page loaded.
async fetchPages(categories, callback) { let pages = []; for (const category of categories) { const pagesInCategory = await request.get( `${API_ROOT}/categories/${category}/docs`, this.httpOptions ); for (const json of pagesInCategory) { pages.push(this.fetchPage(json, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async fetchPages(categories, callback) {\n let pages = [];\n for (const category of categories) {\n const pagesInCategory = await request.get(`${API_ROOT}/categories/${category}/docs`, this.httpOptions);\n for (const json of pagesInCategory) {\n pages.push(this.fe...
[ "0.80205804", "0.6109288", "0.60559046", "0.60298157", "0.60056514", "0.5966224", "0.5921226", "0.589547", "0.5866959", "0.5855133", "0.58067447", "0.57970285", "0.5789833", "0.57654375", "0.57650155", "0.5732674", "0.5709004", "0.5662372", "0.5640316", "0.5625503", "0.562073...
0.81293035
0
Converts a `Page` object instance to JSON that ReadMe accepts as inputs for page modifications.
pageToJson(page) { const json = { title: page.title, excerpt: page.excerpt, hidden: page.hidden, body: page.content, next: { pages: [], description: "", }, }; if (page.headers.next) { json.next = Object.assign(json.next, page.headers.next); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "asJson() {\n return this.page;\n }", "function getPageObject () {\n return {\n title: $('#title').val(),\n tags: ($('#tags').val() || []).join(),\n text: $('#text').val(),\n alias: $('#alias').val(),\n stamp: $('#stamp').val()\n }\n }", "function Page() {\n\n /**\n ...
[ "0.69494677", "0.6167017", "0.6009792", "0.5774127", "0.5767355", "0.57631236", "0.57594126", "0.566651", "0.5544847", "0.55067134", "0.5470797", "0.53661656", "0.53436786", "0.53078187", "0.52965605", "0.5295171", "0.5295171", "0.5295171", "0.5295171", "0.52792364", "0.52790...
0.7626558
0
A helper function that simple rebuilds the subscribed status for each api in the catalog. Should be run every time either the catalog updates or the
function updateSubscriptionStatus (usagePlans) { if (usagePlans) { usagePlans.forEach(usagePlan => { const subscribed = !!getSubscribedUsagePlan(usagePlan.id) usagePlan.subscribed = subscribed usagePlan.apis.forEach(api => { api.subscribed = subscribed }) }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSubscribeUIStatus() {\n all_comic_data = settings.get('comic');\n if (all_comic_data == undefined) {\n all_comic_data = {};\n settings.set('comic', all_comic_data);\n }\n search_viewcontroller.updateSubscribeUI(all_comic_data);\n favorite_viewcontroller.updateSubscribeUI...
[ "0.6470446", "0.6186892", "0.6180879", "0.5901449", "0.5848206", "0.58410704", "0.5789244", "0.5643475", "0.56263036", "0.5574771", "0.55099404", "0.5482784", "0.54605854", "0.5391565", "0.53875935", "0.5339674", "0.53388983", "0.53358173", "0.5324116", "0.53129756", "0.52845...
0.6414705
1
Map body site type to color and order
getBodySiteInfo(metagenomes, siteData) { var order = {}; var color = {}; for (var i = 0; i < metagenomes.length; i++) { var mg = metagenomes[i]; var site = siteData.site[mg]; if (!(site in order)) { order[site] = siteData.order[mg]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colourType(){\n if (type.indexOf(\"normal\") >= 0) { mapColor = color(169, 168, 120) }\n if (type.indexOf(\"fire\") >= 0) { mapColor = color(240, 127, 47) }\n if (type.indexOf(\"water\") >= 0) { mapColor = color(104, 144, 240) }\n if (type.indexOf(\"grass\") >= 0) { mapColor = color(120, 200, 79) }\n ...
[ "0.5602677", "0.5450106", "0.5433624", "0.5378744", "0.53737825", "0.5278682", "0.5248376", "0.5237662", "0.519993", "0.5142367", "0.50542533", "0.5017471", "0.49885452", "0.49075595", "0.49048555", "0.4882521", "0.48385656", "0.48305276", "0.48259345", "0.48073238", "0.48050...
0.6538088
0
Function that produce a random number between 0 and inputAccess
function randomNumber(inputAccess) { return Math.floor(Math.random()*inputAccess); } //end function
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomNumber () {}", "function genRanNum(min,max){\r\n return Math.floor(Math.random() * (max - min)) + min;\r\n}", "function gen(input) {\n var seed = Long.fromNumber(input);\n seed = seed.mul(mul).add(0xB).and(mask);\n return seed.toNumber();\n}", "function genRandom(a) {\n retur...
[ "0.69492054", "0.6730477", "0.66831064", "0.66565853", "0.66332537", "0.66112", "0.66092587", "0.6606089", "0.6584004", "0.65600985", "0.6554921", "0.6544804", "0.6541002", "0.65145904", "0.6509439", "0.6506383", "0.64946014", "0.64847463", "0.6468991", "0.646237", "0.6462369...
0.9002127
0
Function that show random box when section "Insert" is clicked
function showrandomBox(objBox) { var randomNum = randomNumber(objBox.memoryCount); var randomColor = randomNumber(5)+1 objBox.resultBox[objBox.insertCount] = objBox.backupBox[randomNum]; objBox.backupBox.splice(randomNum, 1); $(objBox.resultBox[objchoice.insertCount]).css("background-image", "url('../i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showRandom(){\n\tdocument.getElementById('acceptRandoms').style.display='block';\n\tdocument.getElementById('finalRandField').style.display='block';\n}", "function dynamicAddBox() {\r\n\t\tif (objchoice.insertCount<6)\r\n\t\t{\r\n\t\t\tswitch (objchoice.insertCount)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t...
[ "0.62453", "0.6188678", "0.6091603", "0.60111004", "0.5949409", "0.58904356", "0.5890169", "0.5759115", "0.5757065", "0.57336456", "0.5729931", "0.5717476", "0.57123786", "0.5701933", "0.568229", "0.5674531", "0.5673926", "0.56706387", "0.5642073", "0.5627631", "0.5626978", ...
0.71507865
0
HELPER FUNCTIONS ////////// increment itemHeight
function addItemHeight(element) { //get key dimensions to calculate height let dimensions = [ parseInt(window.getComputedStyle(element, null).getPropertyValue('margin-top')), parseInt(window.getComputedStyle(element, null).getPropertyValue('margin-bottom')), parseInt(window.getComputedStyle(element, null)....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateHeight_() {\n const estScrollHeight = this.items.length > 0 ?\n this.items.length * this.domItemAverageHeight_() :\n 0;\n this.$.container.style.height = estScrollHeight + 'px';\n }", "function getCurrentHeight() {\n\t\t\treturn (lineHeight * Math.max(1, Math.min(5, items.length))) + ...
[ "0.71649337", "0.70225793", "0.69262326", "0.68930626", "0.6801263", "0.6763121", "0.65845364", "0.6561628", "0.6446939", "0.6444749", "0.6379859", "0.63414276", "0.6333437", "0.6333437", "0.6321643", "0.6312055", "0.62826484", "0.62749434", "0.6266864", "0.6256222", "0.62467...
0.7504769
0
Retrieve JSON data of champions and on success, show the champion icons
function champIcons() { $.ajax({ url: "champions/champs.json", type: "POST", dataType: "json", }) .done(function (data) { showIcons(data.data); }) .fail(function (jqXHR, textStatus, errorThrown) { console.log("Failed to retrieve champion data"); }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChamps(){\n $http.get('/api/champs')\n .then(function(response) {\n var champs = response.data;\n var length = response.data.length;\n var champImg= 'http://www.mobafire.com/images/champion/icon/';\n\n // loop through all champs & grab image URLs\n for (var i=...
[ "0.672195", "0.65860295", "0.639475", "0.6353061", "0.6310294", "0.62487257", "0.623626", "0.6218902", "0.6172985", "0.6142037", "0.6115571", "0.60951984", "0.60683215", "0.6032944", "0.5995248", "0.5977857", "0.59447205", "0.5914657", "0.59108156", "0.5905735", "0.5890091", ...
0.8603742
0
Given JSON data of champions, sort champions and their corresponding info display the champion icons that can be selected
function showIcons(data) { var names = []; var all = []; for(var x in data) { names.push(data[x].name); var obj = {name: data[x].name, id: data[x].id, key: data[x].key}; all.push(obj); } names.sort(); for (var i=0; i < names.length; i++) { for (var x in all) { if (names[i] == all[x].name) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function champIcons() {\n\t\t$.ajax({\n\t\t url: \"champions/champs.json\",\n\t\t type: \"POST\",\n\t\t dataType: \"json\",\n\t })\n\t\t .done(function (data) { \n\t\t \t showIcons(data.data); \n\t\t}) \n\t\t .fail(function (jqXHR, textStatus, errorThrown) { \n\t\t \tconsole.log(\"Fa...
[ "0.7084778", "0.61302763", "0.6035429", "0.6031352", "0.5842821", "0.5771626", "0.5746039", "0.5733051", "0.5684979", "0.56397074", "0.558381", "0.5546714", "0.553931", "0.5519015", "0.54926074", "0.54334694", "0.537696", "0.5368376", "0.53435177", "0.5342181", "0.5333241", ...
0.72605556
0
Create image of champion and display
function createImage(key, id, name) { var image = document.createElement("img"); $(image).attr("src", "http://ddragon.leagueoflegends.com/cdn/5.13.1/img/champion/"+key+".png"); $(image).attr("id", id); $(image).attr("alt", name); $(image).on("click", selected); $("#champIcons").append(image); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newChampion(championName){\n\t\n\t// animated title added\n\tdocument.body.innerHTML = '<img src=\"images/new-sun.jpg\" style=\"position: relative; width:100vw;height: 100vh; object-fit: cover\"; z-index: 2;>';\n\ttitleEl.style.display = \"none\";\n\tconst newChampionContainer = document.createElement(\"...
[ "0.67707765", "0.67183673", "0.66428226", "0.6467171", "0.6459027", "0.6444553", "0.63592684", "0.63259876", "0.63025314", "0.62717843", "0.6269127", "0.6260649", "0.62553734", "0.62436897", "0.62127", "0.62023485", "0.6198414", "0.61874914", "0.6182267", "0.61794305", "0.617...
0.68676263
0
Removes any image, selected class from any and add class to clicked image Also display character image on right
function selected() { var index = championsNames.indexOf($(this).attr("alt")); var key = championsKeys[index]; var name = championsNames[index]; // Display character image on right $("#right").html("<img src='http://ddragon.leagueoflegends.com/cdn/img/champion/loading/" + key + "_0.jpg' alt=" + name + ">"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectImage(e) {\r\n if(e.target.innerHTML === \"\") //ensures only images can be clicked\r\n removeClasses(e);\r\n\r\n }", "function onImgClick () {\n $ ('.img-wrap').one ('click', function (e) {\n console.log ('image clicked');\n console.log (characters);\n attac...
[ "0.69916975", "0.6903402", "0.68144566", "0.64540124", "0.64089715", "0.6342591", "0.6250052", "0.62462276", "0.6150273", "0.6132574", "0.6095086", "0.6086684", "0.60602695", "0.60546774", "0.6050626", "0.6035844", "0.6017595", "0.6014042", "0.6010121", "0.5993569", "0.599341...
0.7261173
0
Set position of marker on map based on selected role
function setRoles() { var role = $(this).val(); if (role == "Middle") { $("#marker").css('top', 45+"%"); $("#marker").css('left', 40+"%"); } else if (role == "Jungle") { $("#marker").css('top', 65+"%"); $("#marker").css('left', 60+"%") } else if (role == "Bottom") { $("#marker").css('top', 80+"%...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPosition(position) {\n let lat = position.coords.latitude\n let lng = position.coords.longitude\n\n let userLatLng = new google.maps.LatLng(lat, lng)\n\n let mapOptions = {\n zoom: 18,\n center: userLatLng\n }\n\n let userCurrentLocation = new google.maps.Marker({\n position: userLatLng,\n ...
[ "0.6625285", "0.6371463", "0.6312855", "0.6273443", "0.6216316", "0.6159101", "0.61587954", "0.61560917", "0.6146248", "0.6137694", "0.60871774", "0.60673445", "0.60415745", "0.60351175", "0.6026977", "0.6026212", "0.60189617", "0.6002258", "0.5952137", "0.5929377", "0.592251...
0.7121931
0
Check to make sure a champion was selected Send selected champion and lane and redirect page to show build of selected options
function findBuild() { var selected = $(".selected"); if (selected.length == 0) { alert("Please select a champion."); } else { var id = $(selected).attr("id"); var name = $(selected).attr("alt"); var key = championsKeys[championsNames.indexOf(name)]; var role = $("#selectRole").val(); window.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function workout(){\n var selection = document.getElementById(\"muscleGroup\").value;\n if(selection == \"chest\"){\n window.location.href=\"chest.html\";\n }\n\telse if(selection == \"back\"){\n\t\twindow.location.href=\"back.html\";\n\t}\n else if(selection == \"arms\"){\n window.location.href=\"arms.h...
[ "0.56363964", "0.56314474", "0.54134685", "0.5400924", "0.5298806", "0.52782834", "0.52624923", "0.5255159", "0.52490216", "0.5212996", "0.52117294", "0.5209259", "0.52065074", "0.5200707", "0.51905644", "0.51893336", "0.5172704", "0.5168333", "0.51452535", "0.513634", "0.513...
0.70873535
0
returns the pokemon id sliced from the url of pokemon link
function getPokemonId(url){ return url.slice(33, url.length-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPokemonId() {\n return window.location.search.split('=')[1];\n}", "function getLinkId(url) {\n\n var id = url.slice(url.lastIndexOf('/') + 1, url.length);\n //console.log(\"ID= \" + id);\n return id;\n\n}//get link id", "function getIdFromUrl(urlData,id){\n\t// let arr = ulr.split(\"-\");...
[ "0.7938111", "0.65627617", "0.6467316", "0.6456646", "0.64471513", "0.6444625", "0.6423503", "0.6417493", "0.63823086", "0.62959385", "0.6287115", "0.62849385", "0.6246122", "0.6203774", "0.60788804", "0.6077649", "0.60258085", "0.6001233", "0.59559345", "0.5930964", "0.59198...
0.84130186
0
Attach a set of tab configs to an entity
setTab(internal_name, tabs) { if (IsString(internal_name, true) && Array.isArray(tabs)) { PopLog.info(this.name, `Entity Tabs set for ${internal_name}`, tabs); this.asset.tabs.set(internal_name, tabs); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNewTabEntity(params) {\n return spEntity.fromJSON(\n _.chain(createNavElementFragment('New Tab', 'console:navSection', params))\n .extend({'console:isAppTab': true})\n .extend({'console:consoleOrder': params.consoleOrder...
[ "0.54814714", "0.52440584", "0.5105368", "0.50970644", "0.49898466", "0.49600655", "0.49396366", "0.49152222", "0.48850766", "0.48553354", "0.4843836", "0.48430622", "0.4724346", "0.47224367", "0.46964327", "0.46719038", "0.46306914", "0.454202", "0.449103", "0.4481833", "0.4...
0.5461032
1
Set the message dialog if message exists
function setMessageDialog(){ if($('#message').length){ showMessage($('#message').text()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_startDialogue () {\n this.app.DOM.messengerBtn.onclick = () => {\n let value = this.app.DOM.messengerInput.value;\n\n if (value != '') this._sendMessageFromUser(value);\n this.app.DOM.messengerInput.value = '';\n }\n }", "function callMessageDialog(title, messageContent){\n\t\t$(\"#message...
[ "0.6366213", "0.63478076", "0.63457704", "0.6324419", "0.62460303", "0.62364197", "0.6209564", "0.6129939", "0.6125017", "0.61060154", "0.60636586", "0.60580975", "0.6045131", "0.6042619", "0.6039301", "0.60221756", "0.60054314", "0.59607124", "0.5956554", "0.59551555", "0.59...
0.774768
0
Data model for music track search results First param indicates which service result is from
function Result(service, track, artist, album, cover, url, lyrics) { this.url = url || 'No Url'; this.artist_name = artist || 'No Name'; this.track_name = track || 'No Title'; this.cover = cover || 'images/nocover_owl.png'; this.lyrics_url = lyrics || '#'; this.service = service || 'unaffiliated'; this.al...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "searchIt(term) {\n const accessToken = Spotify.getAccessToken();\n return fetch(`${spotifyURIBase}search?type=track&q=${term}`, { // retrival of the info for the term supplied.\n headers: {\n Authorization: `Bearer ${accessToken}`\n }\n }\n ).then(response => { return response.json(); }\...
[ "0.64415455", "0.6402579", "0.63621455", "0.6357239", "0.62979966", "0.6290351", "0.62463546", "0.62451446", "0.6244215", "0.62440854", "0.6232527", "0.6194037", "0.6192916", "0.61704886", "0.6167629", "0.6150419", "0.61345005", "0.61300033", "0.60866404", "0.6081084", "0.605...
0.6647753
0
This function sets the link's media back to `all` so that the stylesheet applies once it loads It is designed to poll until document.styleSheets includes the new sheet.
function toggleMedia() { var defined; for (var i = 0; i < sheets.length; i++) { if (sheets[i].href && sheets[i].href.indexOf(href) > -1) { defined = true; } } if (defined) { ss.media = media || "all"; } else { setTimeout(toggleMedia); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleMedia(){\n\t\tvar defined;\n\t\tfor( var i = 0; i < sheets.length; i++ ){\n\t\t\tif( sheets[ i ].href && sheets[ i ].href.indexOf( href ) > -1 ){\n\t\t\t\tdefined = true;\n\t\t\t}\n\t\t}\n\t\tif( defined ){\n\t\t\tss.media = media || 'all';\n\t\t}\n\t\telse {\n\t\t\tsetTimeout( toggleMedia );\n\t\t}...
[ "0.68953365", "0.67526627", "0.6373686", "0.6236622", "0.6056462", "0.60414016", "0.60363585", "0.60107106", "0.59048116", "0.58977556", "0.587408", "0.58398414", "0.5823869", "0.5823869", "0.5823869", "0.5823869", "0.5823869", "0.5823869", "0.5823869", "0.57743603", "0.56776...
0.6843956
1
Patch jasmine's it and fit functions so that the `done` callback always resets the zone to the jasmine zone, which should be the root zone. (angular/zone.js91)
function apply() { if (!global.zone) { throw new Error('zone.js does not seem to be installed'); } if (!global.zone.isRootZone()) { throw new Error('The jasmine patch should be called from the root zone'); } // When you have in async test (test with `done` argument) jasmine will ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "afterEach() {}", "setup() {\n this.enqueueTearDownTask(() => this.clearStubs())\n }", "afterAll() {//\n }", "afterEach()\n {\n }", "patch() {\n }", "beforeAll() {}", "function jasmineDone() {\n _scenariooReporter.default.runEnded(options);\n }", "async waitForTasksOutsideAngular()...
[ "0.5880842", "0.5780044", "0.5738848", "0.5701717", "0.55821604", "0.5460673", "0.5376038", "0.5374463", "0.5359742", "0.5355566", "0.52324903", "0.51748466", "0.5166808", "0.5164675", "0.5164675", "0.5164675", "0.5155768", "0.5125224", "0.5123733", "0.50931484", "0.49962276"...
0.7798329
0
Function that preloads images and once all preloading is finished calls the callback function
function preLoadImages( callback){ var imagesLoaded=0; for(var i=0;i<gameConfig.sources.length;i++){ var image = new Image(); image.src= gameConfig.sources[i].url; images[gameConfig.sources[i].name]= image; image.onload=function(){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pre(allLoadedCallback) {\n \n var allImg = [],\n imgLoaded = 0,\n uncached = function (src) {\n if (!src || src=='') return false;\n var img = new Image();\n img.src = src;\n ret...
[ "0.74690455", "0.74465185", "0.74274564", "0.7414321", "0.73383087", "0.71947557", "0.7173816", "0.71366984", "0.71267754", "0.71023303", "0.71004915", "0.70948035", "0.70929617", "0.705741", "0.702889", "0.70211935", "0.70165175", "0.7013049", "0.69921046", "0.69855", "0.697...
0.78478545
0
Instatiate the rocks function makeRocks gets the total number of random rocks that will be created and place them into an array
function makeRocks(num) { allRocks = []; let randomXset = getX(num); // Get random, not repeated, 'x' coordinates for (let x of randomXset) { allRocks.push(new Rock(x, randomY())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRock(nbr, rocks) {\n\n var offset = 100;\n for (var i = 0; i < nbr; i++) {\n \n var rnd1 = game.rnd.realInRange(700, 3000);\n var rnd2 = game.rnd.realInRange(3010, 5000);\n var rnd3 = game.rnd.realInRange(5010, 7000);\n\n // DISPERSE ROCKS\n \n ...
[ "0.78406847", "0.73665094", "0.7197721", "0.6678676", "0.66504174", "0.6643646", "0.6579366", "0.64951754", "0.6403156", "0.6312583", "0.6284477", "0.62751853", "0.62132865", "0.62038994", "0.61886084", "0.61884534", "0.6152588", "0.6135189", "0.6128461", "0.6108756", "0.6107...
0.80698067
0
Check if is there is an item or an rock in the tile, if so this function assigns 'true' to 'bool' variable. This function is called in player.handleInput() method to prevent the player of moving over the rocks, and to check is there is a collectible in the tile, so the player can collect it. It takes two parameters: Th...
function checkSquare(nextSquare, entities) { let playerSquare = nextSquare; let entity; let i = 0; // Check if there is an entity in the tile that the player wants to move in // by using 2D - collision detection algorithm for (let ent of entities) { //arr.forEach(function(ent) { co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkNorth()\n{\n\tvar hit : RaycastHit;\n\tvar destinationSquare : int;\n\tsquareCheck = transform.TransformDirection (Vector3(0,1,0));\n if (Physics.Raycast(transform.position, squareCheck, hit, 1))\n {\n // This means there was a hit.\n if(hit.collider.gameObject.tag == \"Inactive ...
[ "0.62647694", "0.61624557", "0.6038476", "0.60199237", "0.5982173", "0.59751", "0.5958053", "0.59176064", "0.59098005", "0.5903094", "0.5899476", "0.5877613", "0.585162", "0.58444", "0.5841704", "0.5838025", "0.5814571", "0.58092153", "0.58026016", "0.57976305", "0.5789578", ...
0.659075
0
Constructor for Field List module
function FieldList(parent){this.parent=parent;this.addEventListener();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FieldList ( app ) {\n\t\tvar me = this;\n\t\tapp.getList( \"FieldList\", function ( reply ) {\n\t\t\tme.fields = reply.qFieldList.qItems;\n\t\t\tme.render();\n\t\t} );\n\t\tapp.getList( 'CurrentSelections', function ( reply ) {\n\t\t\tvar yearSel = reply.qSelectionObject.qSelections.filter( function ( val...
[ "0.6761501", "0.6602271", "0.6503878", "0.63702655", "0.6351079", "0.6251436", "0.62339073", "0.61983263", "0.61983263", "0.6177249", "0.617673", "0.6154935", "0.61313736", "0.610321", "0.61005735", "0.60772735", "0.60299957", "0.60299957", "0.6006661", "0.5982328", "0.598214...
0.7052968
0
Constructor for GroupingBar module
function GroupingBar(parent){/* eslint-enable */this.parent=parent;this.parent.groupingBarModule=this;this.resColWidth=this.parent.isAdaptive?180:249;this.addEventListener();this.parent.axisFieldModule=new AxisFields(this.parent);this.touchObj=new sf.base.Touch(this.parent.element,{tapHold:this.tapHoldHandler.bind(this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n\n this.groups = new Map();\n }", "makeBar(groups){\n \n let props = {\n x: this.xScale(groups.data[this.props.xName]),\n y: this.yScale(groups[1]),\n height: this.yScale(groups[0]) - this.yScale(groups[1]),\n width: 50 + 'px',\n ...
[ "0.65910995", "0.6572518", "0.65404606", "0.63929254", "0.6358386", "0.62173086", "0.6143388", "0.60812134", "0.607388", "0.6042632", "0.60116035", "0.59814113", "0.596457", "0.59619457", "0.593447", "0.5915236", "0.58992887", "0.58579326", "0.5850025", "0.5845745", "0.583823...
0.7646614
0
Generic Kinesis API utilities Configure a Kinesis client connection.
function getKinesis() { let params = { apiVersion: '2013-12-02', region: 'us-east-2', }; return new aws.Kinesis(params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connect() {\n if(!this.username || !this.password) {\n return;\n }\n slsk.connect({\n user: this.username,\n pass: this.password,\n }, (err, client) => this.onConnected(err, client));\n }", "connect() {\n this._firehose = new AWS.Firehose({\n region: this._awsRegion\...
[ "0.53550625", "0.533827", "0.5300255", "0.5293552", "0.5256087", "0.5234524", "0.52232206", "0.52023816", "0.51309645", "0.5102242", "0.5094277", "0.50737816", "0.50479716", "0.50201917", "0.49747342", "0.49747342", "0.49546042", "0.49478677", "0.49199307", "0.49162024", "0.4...
0.58146113
0
Asynchronously queries a stream for its shard map, returning a Promise which resolves to a list of all shard IDs.
function getShardsForStream(streamName) { let params = { StreamName: streamName, }; return kinesis.describeStream(params).promise() .then((data) => { let shards = []; data.StreamDescription.Shards.forEach((shard) => { if (shard.ParentShardId) { let i = shards.indexOf(shard.Pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function keylist() {\r\n const db = await connectDB();\r\n let keys = [];\r\n await new Promise((resolve, reject) => {\r\n db.createKeyStream()\r\n .on(\"data\", data => keys.push(data))\r\n .on(\"error\", err => reject(err))\r\n .on(\"end\", () => resolve(keys));\r\n });\r\n debug(`keylist:...
[ "0.52824724", "0.5249812", "0.5213171", "0.51755345", "0.51435786", "0.505306", "0.50156754", "0.50156754", "0.49987766", "0.49905446", "0.49872294", "0.4976827", "0.4959966", "0.49456632", "0.49372053", "0.49315882", "0.4906266", "0.4860856", "0.4848522", "0.48321965", "0.48...
0.5814845
0
Consume records from a single shard, starting at a given shard iterator. See consumeShard() for details.
function consumeShardFromIterator(shardIterator, eachRecord, onError) { let getRecordsParams = { ShardIterator: shardIterator, Limit: ITEM_LIMIT_PER_READ, }; kinesis.getRecords(getRecordsParams, (err, result) => { if (err) { if (err.code == 'ProvisionedThroughputExceededException') { // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function read(cb) {\n debug('(pair) yield read');\n queue.shift(function(err, msg) {\n if (err) return cb(err);\n debug('(pair) read complete');\n cb(null, msg);\n });\n }", "function _readFromCursor() {\n var _this6 = this;\n\n ...
[ "0.50102973", "0.4982882", "0.4594567", "0.45479554", "0.4538579", "0.45216823", "0.44712886", "0.44553354", "0.44547445", "0.44229192", "0.44146416", "0.44031417", "0.43940187", "0.43940187", "0.43896577", "0.43783525", "0.43727803", "0.43670326", "0.43508503", "0.43253613", ...
0.7691791
0
Event consumers and producers Posts an event to Kinesis asynchronously. Returns a Promise which resolves to the posted event on success, in case you need to chain.
function postEvent(event) { let data = JSON.stringify(event); if (disableKinesis) { //log(`Kinesis disabled: POST ${data}`); return Promise.resolve(event); } let partitionKey = event.userSessionId; if (partitionKey === undefined) { partitionKey = event.eventName; } let params = { Stream...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return utils.rejectedSyncPromise(new utils.SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = event.type === 'tr...
[ "0.57845783", "0.56896204", "0.5635444", "0.56322", "0.5562375", "0.54492277", "0.5375215", "0.5302783", "0.52884763", "0.5143716", "0.5101893", "0.5065859", "0.49849892", "0.49647245", "0.49348262", "0.49282947", "0.4926091", "0.49252304", "0.49249715", "0.49058843", "0.4900...
0.77480567
0
Interface: AppObject Description:This class represents a base object in the application. It contains name, id and parent/children relationship information. argList: name name of display (defaults to fftDisplay) id id of the display (defaults to fftDisplay + ObjectID) parent parent of the object
function AppObject(args){ // To do: create hash table that every object gets placed in to allow for // quick searching for objects inside of other objects? Maybe this functionality to go // in the MainApplication object this.args = cleanValue(args,{}); var params = {} if(this.args.instance != undefined){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kObjectDialog(parent){\r\n\tif(parent){\r\n\t\tthis.init(parent);\r\n\t\tthis.name = parent.getFullName();\r\n\t}\r\n}", "function Object_Base() {\n\n /**\n * @property subObjects\n * @type gs.Object_Base[]\n * @default []\n * A list of game-objects grouped under this game object.\n *...
[ "0.56327105", "0.5394405", "0.53069055", "0.52642876", "0.52632284", "0.52571446", "0.5221555", "0.5219226", "0.5161654", "0.51450366", "0.5142776", "0.51380354", "0.5137008", "0.513016", "0.51243836", "0.51154196", "0.50943923", "0.5050968", "0.5040379", "0.5036702", "0.5034...
0.6796949
0
Object: IntParameter Description:Specifies an integer parameter.
function IntParameter(parameterName,defaultVal,displayName){ ObjectParameter.call(this,parameterName,defaultVal,displayName); ObjectParameter.setPreprocessor.call(this,parameterName,function(val){ return parseInt(val); }) ObjectParameter.setValue.call(this,parameterName,defaultVal) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "defineIntegerParameter(definition) {\n return this._createParameter(definition, {\n type: 'int'\n }, definition.key);\n }", "set intValue(value) {}", "static SetInt() {}", "constructor(param\n /* : number */\n ) {\n this.param = param;\n }", "constructor(param\n /* : numb...
[ "0.6853412", "0.64762235", "0.61510533", "0.5956752", "0.5956752", "0.5930591", "0.5930591", "0.5912588", "0.59104", "0.57803434", "0.57410383", "0.56135786", "0.55463445", "0.55384696", "0.54201084", "0.5417481", "0.5407228", "0.54003805", "0.5370976", "0.53204036", "0.52695...
0.80583584
0
Object: FloatParameter Description:Specifies a float parameter.
function FloatParameter(parameterName,defaultVal,displayName){ ObjectParameter.call(this,parameterName,defaultVal,displayName); ObjectParameter.setPreprocessor.call(this,parameterName,function(val){ return parseFloat(val); }) ObjectParameter.setValue.call(this,parameterName,defaultVal) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static SetFloat() {}", "set floatValue(value) {}", "function LogicNodeFloat() {\n\t\t\tLogicNode.call(this);\n\t\t\tthis.logicInterface = LogicNodeFloat.logicInterface;\n\t\t\tthis.type = 'LogicNodeFloat';\n\t\t}", "function LogicNodeFloat() {\n\t\tLogicNode.call(this);\n\t\tthis.logicInterface = LogicNodeFl...
[ "0.7132069", "0.7053991", "0.6366603", "0.6292477", "0.61358124", "0.6079167", "0.6055082", "0.60273015", "0.6021713", "0.59968793", "0.5993569", "0.58705956", "0.5783027", "0.5665418", "0.566402", "0.5645315", "0.5640524", "0.5640524", "0.5623156", "0.5609394", "0.5609394", ...
0.79953974
0
checkForExtension handles 3 scenarios returns true (hederamicropayment tag is present and extension is installed) returns false (hederamicropayment tag is present but extension is NOT installed) return null (hederamicropayment is not present because this website does not implement hederamicropayment)
function checkForExtension(configurations) { if (!isChrome()) { redirectToError('/isnotChrome'); } else { let tags = configurations; // if tags.amount is null or undefined, we should assume that this is a free page and do nothing more if (tags.amount === null) return null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isExtensionInstalled() {\n // Get the article tag data set.\n let article = document.querySelector('#surveyArticle');\n let data = article.dataset;\n return data.browserExtensionVersion === currentBrowserExtensionVersionNumber;\n}", "hasExtension(extensionName) {\n return Boolean(this._ex...
[ "0.6717795", "0.5715263", "0.55948097", "0.55486476", "0.54756796", "0.53708804", "0.53411233", "0.53382665", "0.53375655", "0.53094006", "0.5291632", "0.5250901", "0.52461743", "0.5233683", "0.52114874", "0.51682884", "0.51664376", "0.51197517", "0.5114167", "0.5074688", "0....
0.7547315
0
function showDetail(....) > add ideal++, feat++, pricing desc
function showDetail(id, img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, name, cat, location, region, state, type, capacity, ideal1, ideal2, ideal3, ideal4, ideal5, ideal6, ideal7, ideal8, ideal9, ideal10, size, min, day, week, month, feat1, feat2, feat3, feat4, feat5, fe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayDetail(indice)\n{\n RMPApplication.debug(\"displayDetail : indice = \" + indice);\n v_ol = var_order_list[indice];\n c_debug(dbug.detail, \"=> displayDetail: v_ol (mini) = \", v_ol);\n\n // we want all details for the following work order before showing on the screen\n var wo_query ...
[ "0.66413206", "0.65223986", "0.6348802", "0.62535137", "0.6226586", "0.619327", "0.6069995", "0.60625595", "0.6041969", "0.6021103", "0.5976658", "0.59488434", "0.5938962", "0.5928446", "0.5908244", "0.59041387", "0.5901553", "0.58680964", "0.5852649", "0.58516663", "0.583592...
0.6577605
1
Sorts times by start date
function sortTimes(dateTimes) { dateTimes.sort(function(a, b) { if(a.start < b.start) { return -1; } if(a.start > b.start) { return 1; } return 0; }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortTimes(startTimes, endTimes, days, key) {\n for(var i = 0; i < startTimes.length - 1; i++) {\n var move = timeToInt(stringToTime(startTimes[i]));\n var where = i;\n for(var j = i + 1; j < startTimes.length; j++) {\n if((key == \"min\") ? timeToInt(stringToTime(startTi...
[ "0.74854153", "0.7217951", "0.71265393", "0.6983777", "0.6905207", "0.68163025", "0.6797602", "0.6790536", "0.65777785", "0.6455632", "0.6410835", "0.64073575", "0.6240508", "0.6240508", "0.6240508", "0.6240508", "0.6240508", "0.6240508", "0.6240508", "0.6240508", "0.6240508"...
0.761252
0
Takes in time object (time and period) and returns date object, with arbitrary but consistent date
function createDate(timeObj) { var date = new Date('01/01/2016 ' + timeObj.time); if(timeObj.period === 'PM') { addPM(date); } return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timeToDateObj(time) {\n\tvar date, colonIndex, hour, minute, xM;\n\tif (time == \"\") {\n\t\tdate = new Date(2020, 1, 2, 0, 0);\n\t} else {\n\t\tif (time.includes(\"Saturday\")) {\n\t\t\ttime = time.substring(time.indexOf(\">\")+1);\n\t\t}\n\t\tcolonIndex = time.indexOf(\":\");\n\t\txM = time.substring(ti...
[ "0.62111807", "0.59048796", "0.57102287", "0.5671383", "0.5616362", "0.5613247", "0.5601621", "0.5580793", "0.5566279", "0.5532345", "0.54657954", "0.53981465", "0.5299244", "0.5272865", "0.5271434", "0.5193863", "0.5192772", "0.51878905", "0.51781476", "0.51444006", "0.50808...
0.6657465
0
Takes in reference to date object and adds 12 hours
function addPM(dateObj) { dateObj.setTime(dateObj.getTime() + 12 * 60 * 60 * 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "advance12Hours(time) { \n if (time.getHours() >= 12){\n time = this.advance24Hours(time);\n time.setHours(time.getHours() - 12);\n } else {\n time.setHours(time.getHours() + 12); \n }\n return time;\n }", "function addHours(dateObj, hoursToAdd){\n ...
[ "0.73881745", "0.7188926", "0.6973478", "0.69063026", "0.68354964", "0.66126776", "0.6292498", "0.61747295", "0.61032647", "0.60667837", "0.59828013", "0.5938857", "0.59123707", "0.59054613", "0.5875553", "0.5829119", "0.5807053", "0.58066416", "0.5805583", "0.58023643", "0.5...
0.72165877
1
Binds events to the internal timer to draw stuff if necessary
bindTimerEvents (){ const timer = this.timer; const drawer = this.drawer; timer.on('start', drawer.toggleToPause.bind(this)); timer.on('pause', drawer.toggleToStart.bind(this)); timer.on('reset', drawer.reset.bind(this)); timer.on('stop', drawer.end.bind(this)); timer.on('end', drawer.end.b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onEventTimer() {\n triggerEvents(inbandEvents);\n triggerEvents(inlineEvents);\n removeEvents();\n }", "function statusChanged(){\n resetTimer();\n renderTimer();\n}", "function onTimeSelectionChange() {\n drawTimeBlocks();\n drawInfoBox(timeSelectionControl.value);\n ...
[ "0.7008175", "0.6533709", "0.62536824", "0.62432647", "0.6229302", "0.6187789", "0.6165787", "0.613283", "0.60526854", "0.60480756", "0.60480756", "0.60480756", "0.6005753", "0.60057104", "0.5986633", "0.5917667", "0.5886381", "0.58792615", "0.58760875", "0.5875382", "0.58561...
0.7403411
0
Binds actions to relevant buttons It enables controlling the timer API through DOM elements
bindControlEvents (){ Array.from(this.controls.querySelectorAll('[data-timer-action]')).forEach((el) => { el.addEventListener(this.interactionEvent, (event) => { this[el.getAttribute('data-timer-action')](); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindButtonActions() {\n // create a new project on click\n createProjectButton.onclick = createProject;\n\n // start the timer on button click\n timerButton.onclick = () => {\n if (timerButton.innerHTML == \"Start Timing\")\n {\n // change button text\n time...
[ "0.73294413", "0.6859561", "0.67159754", "0.6677854", "0.65298456", "0.64476377", "0.6417779", "0.6317331", "0.62992495", "0.6253073", "0.6239207", "0.6232077", "0.61932695", "0.6185534", "0.6180764", "0.61663306", "0.61447793", "0.61365056", "0.61286014", "0.6103885", "0.609...
0.7237835
1
Override the settings if geo mapping is defined, if not use the default geo settings
function overrideSettingByGeo() { var geotype, geo, i, candidates; for (i = 0; i < settings.geo_order.length; i ++) { geotype = settings.geo_order[i]; geo = request[geotype]; if (settings.geo_settings[geo] !== undefined && setting...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function overrideSettingByGeo() {\n\t\t\tvar geotype, geo, i,\n\t\t\tgeoCombined,\n\t\t\tcandidates,\n\t\t\t\tgeoSettings;\n\n\t\t\tfor (i = 0; i < settings.geo_order.length; i ++) {\n\t\t\t\tgeotype = settings.geo_order[i];\n\n\t\t\t\tif (geotype.indexOf('_') !== -1) {\n\t\t\t\t\t// Combined geo\n\t\t\t\t\tgeoCom...
[ "0.7180526", "0.62151635", "0.61818606", "0.61599356", "0.61599356", "0.61568856", "0.6127722", "0.60565656", "0.5990122", "0.5943181", "0.59408927", "0.59408927", "0.59408927", "0.5895027", "0.5871418", "0.582806", "0.5787994", "0.5775098", "0.57593304", "0.57474506", "0.573...
0.7074967
1
Sets the person component routes
initRoutes() { this.app.get( `${this.apiBasePath}/person/:personId/appearances`, (req, res, next) => { personController.getAppearances(req, res, next); }, ); this.app.get( `${this.apiBasePath}/person/:personId/movies`, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPublicRoutes() {\n}", "set routes(data) {\n _routes = data;\n }", "registerRoutes() {\n this.router.get(`/`, this.getAllAccounts.bind(this));\n }", "constructor(routes){\n this.routes=routes;\n this._loadInitialRoute();\n }", "_loadInitialRoute(){\n\n /*con...
[ "0.65467614", "0.5994443", "0.5599949", "0.55963045", "0.5545035", "0.5542396", "0.55186695", "0.5490146", "0.5490146", "0.54883087", "0.548599", "0.53881615", "0.53506994", "0.5294726", "0.5291394", "0.5283618", "0.52830505", "0.5241216", "0.5240627", "0.523542", "0.5227697"...
0.6259961
1