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
Get function to Hash an x, y point to a nonnegative integer
function getXYHash() { var buf = new ArrayBuffer(16), floats = new Float64Array(buf), uints = new Uint32Array(buf); return function(x, y) { var u = uints, h; floats[0] = x; floats[1] = y; h = u[0] ^ u[1]; h = h << 5 ^ h >> 7 ^ u[2] ^ u[3]; return h & 0x7fffffff; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_hash(pt) {\n return (15485867 + pt.X) * 15485867 + pt.Y;\n }", "function getXYHash(size) {\n var buf = new ArrayBuffer(16),\n floats = new Float64Array(buf),\n uints = new Uint32Array(buf),\n lim = size | 0;\n if (lim > 0 === false) {\n throw new Error(\"Invalid size param: \...
[ "0.7709853", "0.75021654", "0.67758495", "0.6655951", "0.6448601", "0.64115644", "0.6392743", "0.63514024", "0.63148755", "0.61845344", "0.61531144", "0.6106934", "0.60665053", "0.60361093", "0.60361093", "0.6003059", "0.599446", "0.599446", "0.5973372", "0.5825896", "0.58088...
0.8051604
0
(YSegmentedDisplay accessors declaration) Returns the text currently displayed on the screen.
get_displayedText() { return this.liveFunc._displayedText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "retriveText() {\n let exactText;\n let currentElement;\n if (!isNullOrUndefined(this.currentContextInfo) && this.currentContextInfo.element) {\n currentElement = this.currentContextInfo.element;\n exactText = this.currentContextInfo.element.text;\n this.viewer....
[ "0.6613349", "0.64848584", "0.62142277", "0.61651033", "0.61651033", "0.6144403", "0.6073552", "0.60626304", "0.60613376", "0.6055256", "0.6038833", "0.5991117", "0.59629273", "0.58833975", "0.58483845", "0.58413", "0.5836971", "0.58367926", "0.5811047", "0.5811047", "0.58078...
0.6618632
0
Class Sealed Manage the Sealed Game
function Sealed(nbPlayers, cardPools, nbStarters, nbBoosters, useOneCardPool, version) { // CONSTRUCTOR this.mNbPlayers = nbPlayers; // Number of Players this.mCardPools = cardPools; // Available CardPools in the Sealed this.mNbStarters = nbStarters; // Number of Starters per player this.mNbBoosters ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ClassicGame(){}", "function GameState() {\n}", "function Game() { }", "function game() {\n dessinerSerpent();\n dessinerPomme();\n detectionCollision();\n verifMangerPomme();\n gestionVieSerpent();\n gestionBonus();\n }", "function Game(){\n\t}", "initGame() {\n\n this....
[ "0.6005553", "0.5939165", "0.58869237", "0.58508366", "0.57786316", "0.5712088", "0.5675827", "0.56598127", "0.562264", "0.56173533", "0.55583084", "0.55419147", "0.5528321", "0.5523111", "0.5520744", "0.5504681", "0.5478612", "0.5452966", "0.5437512", "0.5430409", "0.5427788...
0.6182593
0
Remove card from lightbox on exit
function removeCard() { if ($('#light2').css('display') == 'none') { $('#light2 img').remove(); } if ($('#light5').css('display') == 'none') { $('#light5 img').remove(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanLightbox() {\n\t\timages.length = 0;\n\t\tcurrentImageOrder = 0;\n\t\tisClosed = true;\n\t\tloading.hide();\n\t}", "function removeLightBox() {\n\t\t\tlbContainer.addEventListener('click', () => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tchangeScreens('default');\n\t\t\t});\n\t\t}", "function se...
[ "0.70004314", "0.69665927", "0.688007", "0.6879", "0.6819873", "0.6770223", "0.6756028", "0.675504", "0.6700268", "0.6653916", "0.6590803", "0.65797913", "0.6558949", "0.653618", "0.65340465", "0.6527489", "0.6506456", "0.6480522", "0.645794", "0.6414649", "0.64089656", "0....
0.74045116
0
}, (oldProps, newProps) => noChange(oldProps, newProps))
function noChange(oldProps, newProps){ let hoverDelta = oldProps.node.hovering !== newProps.node.hovering let draggingDelta = oldProps.node.dragging !== newProps.node.dragging let openDelta = oldProps.node.open !== newProps.node.open return(hoverDelta || draggingDelta || openDelta) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "diffProps(newProps, oldProps) {\n const changeFlags = diffProps(newProps, oldProps);\n\n // iterate over changedTriggers\n if (changeFlags.updateTriggersChanged) {\n for (const key in changeFlags.updateTriggersChanged) {\n if (changeFlags.updateTriggersChanged[key]) {\n this.invalidat...
[ "0.6971098", "0.66334754", "0.6612227", "0.6469841", "0.6452973", "0.64487004", "0.6430092", "0.6428819", "0.6428819", "0.6428819", "0.635317", "0.6322346", "0.63198024", "0.63048154", "0.6296819", "0.62901235", "0.6279737", "0.6250983", "0.6242621", "0.6235182", "0.62311345"...
0.74420595
0
Transducers will eagerly (recursively) consume the available data or return undefined (to indicate completion) if xdr returns undefined then terminate and return the results so far The xdr will use a step function provided in the outer closure (when initialised) to get items (targets back to the super._get) Tail Recurs...
_xdr(xdr, acc = []) { let res = xdr(acc); if (res === utils.END_OF_SEQUENCE) { acc.push( utils.END_OF_SEQUENCE); } if (res === undefined || res === utils.END_OF_SEQUENCE) { return acc.length > 0 ? acc : undefined; } else { return this._xdr(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_nextItemFunc(chunk = false) {\n\n if (chunk) {\n return this._parent._get();\n }\n\n if (this._cachedResult === null) {\n let parentRes = this._parent._get();\n if (parentRes && utils.isArray(parentRes)) {\n this._cachedResult = new ArraySequenc...
[ "0.55579394", "0.5396701", "0.53335553", "0.5312347", "0.52975434", "0.5215328", "0.51787484", "0.5112271", "0.50596976", "0.5037496", "0.5037496", "0.5037496", "0.5037496", "0.5037496", "0.5032778", "0.49794102", "0.49620467", "0.4941301", "0.4941301", "0.4941301", "0.494130...
0.5882426
0
get display name for a given key from VariantTable.js column specification, if we are in summary view mode, search summary view names then fall back to all data, otherwise go straight to all data. Finally, if key is not found, replace _ with space in the key and return that.
function getDisplayName(key) { const researchMode = (localStorage.getItem("research-mode") === 'true'); let displayName; if (!researchMode) { displayName = columns.find(e => e.prop === key); displayName = displayName && displayName.title; } // we are not in summary view anymore, or k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getColumnNameValueByKeys(colKey){\r\n\r\n // columnKeys\r\n if(columnKeys.hasOwnProperty(colKey)){\r\n return columnKeys[colKey]\r\n }\r\n return colKey;\r\n }", "translateKey(key) {\n switch(key) {\n case 'firstName':\n return 'First Name';...
[ "0.5832302", "0.5791837", "0.5696559", "0.5622927", "0.5510912", "0.54756224", "0.54725933", "0.54162294", "0.5293996", "0.5271245", "0.5243631", "0.5225034", "0.5195483", "0.5185648", "0.516508", "0.516508", "0.51647663", "0.5149347", "0.51430506", "0.5141455", "0.51287013",...
0.78380775
0
Make this app a single instance app. The main window will be restored and focused instead of a second window opened when a person attempts to launch a second instance. Returns true if the current version of the app should quit instead of launching.
function makeSingleInstance () { if (process.mas) return false return app.makeSingleInstance(function () { if (mainWindow) { if (mainWindow.isMinimized()) mainWindow.restore() mainWindow.focus() } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeSingleInstance() {\n if (process.mas) return false\n\n return app.makeSingleInstance(() => {\n if (mainWindow) {\n if (mainWindow.isMinimized()) mainWindow.restore()\n mainWindow.focus()\n }\n })\n}", "function makeSingleInstance() {\n if (process.mas)...
[ "0.7826709", "0.74726546", "0.7428346", "0.74134105", "0.74039215", "0.70563006", "0.64267707", "0.60976607", "0.58297145", "0.5666259", "0.54795456", "0.53998566", "0.53475296", "0.53390485", "0.5317287", "0.51622707", "0.5158232", "0.5131059", "0.5107743", "0.50966", "0.507...
0.78429306
0
Reconstructs read's sequence by cigar list, different bases (= mismatches) and reference's sequence from read's start index to end of read's length. In case smth not M put '', for S multiplies by count, for H nothing. If read should be fliped, bases are changed to complementary one and sequence are reversed.
getReadSequence(index, differentBase, cigarList, items, isFlip) { let readSequence = []; for (let i = 0; i < cigarList.length; i++) { const letter = cigarList[i].slice(-1); const count = cigarList[i].slice(0, -1); switch (letter) { case CIGAR.M: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alignSeqUsingCigar(rawseq, rawquals, cigar) {\n var ops = parseCigar(cigar);\n var seq = [];\n var quals = [];\n var cursor = 0;\n for (var ci = 0; ci < ops.length; ++ci) {\n var co = ops[ci];\n if (co.op == 'M') {\n seq.push(rawseq.substr(cursor, co.cnt));\n ...
[ "0.5892264", "0.52091575", "0.5077448", "0.49182835", "0.48620743", "0.48493683", "0.46292934", "0.46190482", "0.45927054", "0.4586336", "0.45098567", "0.45095456", "0.44894865", "0.44624397", "0.44595215", "0.4459125", "0.4458025", "0.44439206", "0.4438864", "0.44301882", "0...
0.66814494
0
Returns segment of reference's sequence by read coordinates. If read was fliped takes reverse items and reverses its. Fills empty spaces.
getRefSequence({isFlip, startIndex, endIndex}) { let refSequence = []; const items = isFlip ? this._reverseItems : this._items; for (let i = startIndex; i <= endIndex; i++) { refSequence.push(items[i] ? items[i].toLowerCase() : '-'); } refSequence = isFlip ? refSequen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRead(block) {\n const self = this;\n const {startIndex, endIndex, cigarString, differentBase, renderDump, flagMask} = block;\n if (endIndex < self.startIndex || startIndex > self.endIndex) {\n return null;\n }\n const isFlip = (({strand, firstInPair}, flagMask) => {...
[ "0.5790549", "0.5778239", "0.57641417", "0.52729285", "0.5232888", "0.5188698", "0.5147598", "0.5101578", "0.5084942", "0.5039579", "0.5000909", "0.49918687", "0.4991303", "0.49226308", "0.49039942", "0.48779932", "0.48262918", "0.48051152", "0.47997323", "0.47990897", "0.479...
0.600378
0
Gets a substring in the sequence by current mode's length and Cbase position. E.g.: sequence = AAATCGCCA and position = 4 for 'CG' 'CG'; for 'None' 'C'; for ('CHH', 'CHG') 'CGC'; for ('HCG', 'GCH', 'WCG', 'NOMeSeq') 'TCG'.
getCBaseContext (sequence, i, bisulfiteMode) { const startIndex = SECOND_C.includes(bisulfiteMode) ? (i - 1) : i; let length = bisulfiteMode.length; if (bisulfiteMode === NONE.name) { length = NONE.length; } if (bisulfiteMode === NOME_SEQ.name) { length = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubstr(strSource,intStartPosition,intOverPosition,cPosition)\r\n{\r\n\tvar strTarget = \"\";\r\n\tvar cTemp = \"\";\r\n\tvar intLoop = 0;\r\n\tvar intCount = 0;\r\n\ttry\r\n\t{\r\n\t strSource = trim(strSource);\r\n\t\tintCount = strSource.length;\r\n\t\tif (intStartPosition>intCount) intSta...
[ "0.59752625", "0.55708957", "0.54690915", "0.5448651", "0.5217934", "0.5217934", "0.5217934", "0.5217934", "0.52146494", "0.5156316", "0.509795", "0.50390494", "0.5027477", "0.50144565", "0.4997578", "0.49866056", "0.49429423", "0.49206692", "0.48699582", "0.48598474", "0.485...
0.6149918
0
Returns array of relative positions of Cbases which have context corresponds to current mode For NOMeSeq mode it's array of arrays with position and exact mode (GCH or HCG)
getReferenceParts(read, bisulfiteMode) { const refSequence = this.getRefSequence(read); const result = []; if (!refSequence.length) return result; for (let i = 0; i < refSequence.length; i++) { let context, match; let nomeSeqMatchGCH, nomeSeqMatchHCG; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCBaseContext (sequence, i, bisulfiteMode) {\n const startIndex = SECOND_C.includes(bisulfiteMode) ? (i - 1) : i;\n let length = bisulfiteMode.length;\n if (bisulfiteMode === NONE.name) {\n length = NONE.length;\n }\n if (bisulfiteMode === NOME_SEQ.name) {\n ...
[ "0.52705175", "0.5225541", "0.5188656", "0.51622516", "0.5154443", "0.5103165", "0.5009134", "0.49795708", "0.4963887", "0.4955864", "0.49305767", "0.48937303", "0.48890433", "0.48540947", "0.4853554", "0.47803304", "0.47713467", "0.47309354", "0.4724775", "0.4720854", "0.471...
0.5739558
0
Base is methylated if on the position, where the reference has C, the read has C, and unmethylated when the read has T. For NOMeSeq mode colors are different, so types are different too.
getMethylationType(isNomeSeq, mode, readContext, cBase) { let type; if (isNomeSeq) { if (mode === GCH && (readContext.match(METHYLATED_MODES.GCH) || readContext.match(UNMETHYLATED_MODES.GCH)) ) { if (cBase === BASE.C) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function base(aReading) {...}", "getReadMethBase(refParts, read, bisulfiteMode) {\n const result = [];\n const isNomeSeq = bisulfiteMode === NOME_SEQ.name;\n for (let i = 0; i < refParts.length; i++) {\n const [mode, position] = isNomeSeq ? refParts[i] : [bisulfiteMode, refParts[i...
[ "0.557402", "0.5519426", "0.50424045", "0.49902487", "0.49762067", "0.4815911", "0.4691233", "0.46749604", "0.46445623", "0.46385282", "0.46372864", "0.463348", "0.46172464", "0.4611684", "0.46048114", "0.46015772", "0.45776913", "0.45773134", "0.45666626", "0.449389", "0.448...
0.67951757
0
For each reference's Cbase's position in the read's sequence, the context is checked and, if it matches the mode, the corresponding objects are returned for methylated and unmethylated bases. For fliped reads relative position is reculculated.
getReadMethBase(refParts, read, bisulfiteMode) { const result = []; const isNomeSeq = bisulfiteMode === NOME_SEQ.name; for (let i = 0; i < refParts.length; i++) { const [mode, position] = isNomeSeq ? refParts[i] : [bisulfiteMode, refParts[i]]; const readContext = this.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReferenceParts(read, bisulfiteMode) {\n const refSequence = this.getRefSequence(read);\n const result = [];\n if (!refSequence.length) return result;\n for (let i = 0; i < refSequence.length; i++) {\n let context, match;\n let nomeSeqMatchGCH, nomeSeqMatchHCG;\n...
[ "0.6921445", "0.6173118", "0.59310925", "0.5673636", "0.54480976", "0.54376", "0.5234471", "0.49382594", "0.48512834", "0.46621776", "0.45564392", "0.44612992", "0.44603437", "0.44603437", "0.44603437", "0.44578007", "0.44567448", "0.44567448", "0.44567448", "0.44567448", "0....
0.71362114
0
Every read's different base is checked is it cytosine (guanine for fliped case). CYTOSINE_MISMATCH and NONCYTOSINE_MISMATCH have different color on track.
getReadCytosineMismatch(read) { const {isFlip, startIndex, endIndex, differentBase} = read; const result = []; for (let i = 0; i < differentBase.length; i++) { let type = TYPE.NONCYTOSINE_MISMATCH; const {relativePosition, base} = differentBase[i]; const flipR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkTerr(x, y, c){\n var liberty = 4;\n //check for white token\n if(x != 0){\n if(state.board[x+1][y] != 0)\n liberty--;\n\n if(state.board[x-1][y] != 0)\n liberty--;\n \n if(state.board[x][y-1] != 0)\n liberty--;\n \n if(stat...
[ "0.54871035", "0.54710555", "0.54655176", "0.53511834", "0.52051324", "0.5179351", "0.517744", "0.5144914", "0.51008916", "0.5097723", "0.50831866", "0.505012", "0.5001552", "0.49938247", "0.4983501", "0.49782106", "0.4964713", "0.49567607", "0.49547392", "0.49341327", "0.491...
0.7238807
0
Hides shape except on tether mouseover, or shape mouseover
function setHideable(shape, tether) { tether.on("mouseover", function() { shape.visible(true) stage.batchDraw() }) tether.on("mouseout", function() { shape.visible(false) stage.batchDraw() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hideHoverEffect() {\n this._changeShape.hideHoverEffect();\n if (this._rangeShape) this._rangeShape.hideHoverEffect();\n }", "function hideDrawingControl() {\n drawingManager.setOptions({\n drawingControl: false\n });\n drawingManager.setMap(null);\n // In case the user drew anything, get rid...
[ "0.78888446", "0.66563886", "0.66551524", "0.6633115", "0.6544582", "0.647842", "0.64346945", "0.64245456", "0.6381573", "0.6381198", "0.6300503", "0.62991524", "0.6293994", "0.6288906", "0.6248394", "0.6232561", "0.62148947", "0.61843693", "0.61569566", "0.6130316", "0.61005...
0.76859164
1
Shows the create account section for the login page. Clears any of data previously input
function showCreateAccount() { document.getElementById("login").style.display="none"; //document.getElementById("forgotPassword").style.display="none"; document.getElementById("newAccount").style.display="block"; document.getElementById("newUsername").value = ""; document.getElementById("newPassword...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCreateAccount()\n{\n hideOrShow(\"helloButtons\", false)\n hideOrShow(\"createAccount\", true)\n hideOrShow(\"login\", false)\n hideOrShow(\"text\", false)\n hideOrShow(\"backButton\", true)\n}", "createAccount() {\n if (document.getElementById('newaccount-name').value == '')\n ...
[ "0.71631825", "0.6809437", "0.65452456", "0.6493315", "0.6458461", "0.6343435", "0.6292009", "0.62318337", "0.6182611", "0.6140509", "0.61378264", "0.61129135", "0.6110901", "0.6083176", "0.6071992", "0.6041722", "0.604039", "0.6027097", "0.6019099", "0.59967095", "0.59836614...
0.7158445
1
Remove o telefone da tela e permite cadastrar mais um telefone
function remover_telefone(id){ jQuery('#'+id).remove(); //Quando remove, atualiza a lista com a quantidade de inputs para desbloquear o botão jQuery("#botao_add_other").prop("disabled",false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EliminarTel(indice) {\n telefonoItems.Eliminar(indice);\n MostrarTelefonos(true);\n return false;\n}", "function remover_poligono()\n{\n\tif(creator){\n\t\tcreator.destroy();\n\t\tcreator=null;\n\t}\n}", "delete(nombre) {\n \n const usuario = this.read(nombre);\n const index ...
[ "0.68709975", "0.640225", "0.6375338", "0.6345671", "0.6274661", "0.62191564", "0.61931366", "0.6187909", "0.6120915", "0.6080936", "0.6075317", "0.6069632", "0.60526615", "0.60346895", "0.5998724", "0.599811", "0.5995952", "0.59952325", "0.5982942", "0.59415686", "0.5913176"...
0.71060145
0
RETURNS 'true' IF 'access_token_str' IS VALID, 'false' OTHERWISE 'user_email_str' IS THE USER (PRIMARY SUBJECT) OF AN API ENDPOINT 'disable_str' WILL DISABLE THE SECURITY FIX THAT RESOLVED THE ISSUE IN ALLOWING 'VALID'.. ..TOKENS TO BE USED FOR ANOTHER USER TO DISABLE, ENTER A VALUE OF 'd' OR 'D'
function is_token_valid(access_token_str, user_email_str, disable_str) { // IF THE SECURITY FIX HAS NOT BEEN DISABLED if(disable_str !== "d" && disable_str !== "D") { let jwt = require("jsonwebtoken"); let user_data = jwt.decode(access_token_str, {complete:true}); // IF TOKEN HAS BEEN T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function authenticateDevToken(req, res, next) {\r\n //jwt\r\n const authHeader = req.headers[\"authorization\"];\r\n const token = authHeader && authHeader.split(\" \")[1];\r\n if (token == null) {\r\n return false;\r\n }\r\n\r\n return jwt.verify(token, process.env.ACCESS_TOKEN, async (err, user) => {\r\...
[ "0.62437814", "0.6211703", "0.61747205", "0.6154994", "0.61425817", "0.61289746", "0.6101602", "0.60513246", "0.5959176", "0.59343797", "0.5860244", "0.58266157", "0.5815519", "0.5813762", "0.58084977", "0.5804317", "0.5798073", "0.5778267", "0.5753004", "0.5749506", "0.57211...
0.8216219
0
////////////////////////////////////////////////////////////////////////// This function returns the parameters needed for the php files which will populate the lists (ajax)
function getparameters(list) { switch(list) { case 1: strpost = "id_country="+document.createitem.clubcountry.value; break; case 2: strpost = "id_country=" + document.createitem.clubcountry.value; strpost = strpost + "&id_region=" + document.createitem.clubregion.value; break; case 3: strpost ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadWorksList() {\n\t\t\t\tvar param_year = Array();\n\t\t\t\t$('input[name=\"year\"]:checked').each(function(idx){\n\t\t\t\t\tparam_year.push($(this).val());\n\t\t\t\t});\n\t\t\t\tparam_year = param_year.join(\"^\");\n\n\t\t\t\tvar param_cate = 0;\n\t\t\t\t$('input[name=\"cate\"]:checked').each(function(...
[ "0.64683217", "0.62339807", "0.62024397", "0.61696815", "0.6165142", "0.613257", "0.6108472", "0.6106802", "0.6064141", "0.6040158", "0.5987567", "0.59786844", "0.593274", "0.5913918", "0.59055495", "0.59055495", "0.5899339", "0.58853066", "0.5881406", "0.5873497", "0.5861422...
0.65168816
0
Render activations of neural network layers
function renderConvLayers() { tf.tidy( () => { // Slice one image from the input tensor out_val = inputs.slice( [num_data - 1], [1] ); // Loop through each layer of the network for (let j = 0; j < num_vis_layers; j ++) { console.log('j __________') // Generate layer output o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "activate_layer(inputs, yd){\n let sum = 0.0;\n this.output_values = [];\n //console.log(\"neurons\" + this.numberOfNeurons);\n //returns output\n for(var i = 0; i < this.numberOfNeurons ; i++){\n var tem = this.neurons[i].activate(inputs);\n this.output_valu...
[ "0.5903012", "0.590137", "0.587908", "0.5796254", "0.57732916", "0.57615584", "0.5709875", "0.5670508", "0.56668335", "0.5634973", "0.56239355", "0.55510175", "0.5542583", "0.55040365", "0.547411", "0.5463433", "0.5455413", "0.5416323", "0.5372699", "0.5332342", "0.532571", ...
0.6331187
0
Creates a statsView with 'name' as title and uses 'index' as index of stats
function statsView(name, index) { return ( <View style={styles.statContainer}> <Text style={styles.pokemonStatHeaderText}>{name}</Text> <View style={styles.progressBarBody}> <View style={{ ...styles.progressBar, width: (100 * Math.min(props.sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(name, index) {\n super(name);\n this.index = index;\n }", "createStats() {\n if (this.showStats) {\n this.stats = new Stats();\n this.stats.showPanel( 0 ); // 0: fps, 1: ms, 2: mb, 3+: custom\n this.container.append( this.stats.dom );\n }\n }", "function AggregateIndexV...
[ "0.596354", "0.5779914", "0.563883", "0.55808145", "0.55135965", "0.5397977", "0.5282313", "0.5282313", "0.5282313", "0.5282313", "0.52542657", "0.5246747", "0.5230845", "0.52033716", "0.52026784", "0.51996684", "0.5191952", "0.5176974", "0.5165867", "0.5159239", "0.5143537",...
0.69045234
0
change context to webview
function changeContextToWebView(){ return driver.contexts() .then(function (ctxs) { console.log("switch to WEBVIEW"); return driver.context(ctxs[1]); //return driver.context("WEBVIEW"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WebviewWebRequest() {}", "configure() {\n this.webview.html = this.html;\n // NOTE: let webview fire refresh message\n // when vega preview DOM content is initialized\n // see: this.refresh();\n }", "function setContextURL(url){\n if(!window.contextFrame) {\n initCon...
[ "0.6603602", "0.6312624", "0.6059351", "0.6059351", "0.5994217", "0.5933961", "0.5845686", "0.5760328", "0.57186013", "0.56814206", "0.5661156", "0.5651201", "0.55674744", "0.5562152", "0.55570984", "0.55508393", "0.5535002", "0.5500688", "0.54370517", "0.5374878", "0.5351691...
0.78375417
0
load flowers from a JSON object
async load(obj) { console.log("loadGardenJSON"); var gtool = this.gtool; var inst = this; if (obj.flowers) { obj.flowers.forEach(flower => { console.log("flower:", flower); gtool.addFlower(flower); }); } if (obj.pict...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor (json) {\n\t\tthis.loadJSON(json);\n\t}", "function loadJSON(data, next) {\n var err, obj;\n\n try {\n\tobj = JSON.parse(data);\n } catch (x) {\n\terr = x;\n }\n next(err, obj);\n}", "function loadActivities(){\n var activitiesJSONified = JSON.parse(Activities); //read the JSON file...
[ "0.58587533", "0.57668054", "0.5621335", "0.553343", "0.5501385", "0.55000395", "0.5481506", "0.5479913", "0.5454709", "0.54459274", "0.5434606", "0.54212683", "0.5397402", "0.53347814", "0.533034", "0.5318621", "0.5220857", "0.5218932", "0.5201724", "0.51906866", "0.5184046"...
0.6835399
0
collect the whiteboardId. Use it to extract the wbObject which is clicked. keep a count of clicks. Update the count in the browser memory. Extract the updated object. If it hasn't been clicked before, pass it to getHierarchy function to get list of cuboids under that particular whiteboard.
function goInWhiteboard(a){//from displayWhiteboard.js var receivedWbId = a.nextSibling.innerHTML; wbNameData = JSON.parse(localStorage.getItem(receivedWbId)); wbNameData.count += 1; localStorage.setItem(receivedWbId, JSON.stringify(wbNameData)); wbNameData = JSON.parse(localStorage.getItem(received...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickedEl(event) {\n //while (board != null) {\n \n if (event.target.id === 'board0') {\n index = 0;\n }\n else if (event.target.id === 'board1') {\n index = 1;\n }\n else if...
[ "0.5668292", "0.5433813", "0.53823423", "0.5379451", "0.51161313", "0.5087219", "0.5039609", "0.50357425", "0.500427", "0.50027835", "0.49775878", "0.49765885", "0.49571502", "0.4947801", "0.49382186", "0.49377415", "0.49191147", "0.49065185", "0.4897759", "0.4894156", "0.489...
0.5652683
1
Translate object to AWS format.
function translate(input) { var output = {}; // Iterate over keys, add key, value, type to awsData. if (typeof input === "object") { for (var key in input) { if (input[key] === undefined) continue; output[key] = { "S": input[key] + "" }; } } else { output = { "S": input + "" };...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatObj(obj){\n for (var x in obj){\n if (obj.hasOwnProperty(x)){\n switch (x){\n case 'price_usd':\n obj[x] = '$'+numberWithCommas(twoFloat(obj[x]));\n break;\n case 'market_cap_usd':\n case '24h_volume_usd':\n obj[x] = '$' + nu...
[ "0.532484", "0.5071886", "0.506178", "0.49655926", "0.4922989", "0.4901591", "0.48918346", "0.48658168", "0.48658168", "0.485571", "0.48315594", "0.4820844", "0.4820844", "0.4813409", "0.48005965", "0.47722167", "0.476984", "0.47666356", "0.47654465", "0.47578716", "0.4727244...
0.7241079
0
Wrapper function for getting items via table scan.
function getItems(table, params, cb) { var awsFilter = getFilter(params); log("requesting data from table " + table); // Get entries based on params. dynDb.scan({ "TableName": table, "Select": "ALL_ATTRIBUTES", "ScanFilter": awsFilter }, function(error, data) { if (data) { log("It...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItems(lastEvaluatedKey, cb) {\n\t\t\t\t\t\t\tvar params = {\n\t\t\t\t\t\t TableName: table,\n\t\t\t\t\t\t Limit: scanLimit\n\t\t\t\t\t\t };\n\t\t\t\t\t\t if(lastEvaluatedKey) {\n\t\t\t\t\t\t \tparams.ExclusiveStartKey = lastEvaluatedKey;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\tdocClien...
[ "0.70023793", "0.66495913", "0.6312196", "0.62890655", "0.61454445", "0.61199415", "0.6080865", "0.60609776", "0.60045856", "0.5986269", "0.58549255", "0.58355373", "0.57759655", "0.57570994", "0.575573", "0.5739474", "0.57200587", "0.5682415", "0.5612809", "0.5608789", "0.55...
0.7031828
0
Utility to get random array of numbers with min and max
function getRandomArray(min, max) { const randomNumbers = new Set() const range = max - min while (randomNumbers.size < range) { randomNumbers.add(~~(Math.random() * range)) } return [...randomNumbers] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomArray(min, max) {\n var arr = [];\n var pool = [];\n var randomNumber;\n for (var i = 0; i < max; i++) {\n pool[i] = i;\n }\n while(pool.length > 0) {\n randomNumber = getRandomInt(0, pool.length-1);\n arr.push(pool[randomNumber]);\n pool.splice(rando...
[ "0.79137594", "0.7888493", "0.7878201", "0.78424674", "0.7831183", "0.7808814", "0.78055674", "0.77793604", "0.77620935", "0.7691022", "0.7676453", "0.76495165", "0.76188684", "0.76188684", "0.75976694", "0.7556731", "0.7548252", "0.75445503", "0.7463449", "0.745372", "0.7450...
0.81425726
0
set custom select values after color palettes populated
function setCustomSelects() { document.querySelectorAll('.custom-select').forEach(customSelect => { turnRegenBtnBlue() var selectedValue = customSelect.value; var selectedHTML = customSelect.querySelector('.custom-select-option[value="'+selectedValue+'"]'); customSelect.querySelector...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_inpt_formulario_cargar_categoria_color() {\n var selectColor = mdc.select.MDCSelect.attachTo(document.querySelector('#slc-color'));\n\n selectColor.listen('MDCSelect:change', () => {\n var indexOfChild = selectColor.foundation_.selectedIndex_ + 1;\n var liSelected = $(\"#slc-color...
[ "0.68205464", "0.6814065", "0.6633113", "0.6619387", "0.6473", "0.64516246", "0.6447832", "0.6421436", "0.6400547", "0.63042355", "0.62801063", "0.6233387", "0.6229065", "0.6165468", "0.614881", "0.61412525", "0.6137493", "0.6129888", "0.6117791", "0.6053778", "0.60276455", ...
0.6898906
0
Turn regenerate button blue on input change
function turnRegenBtnBlue() { document.getElementById('regenerateBtn').classList.add('primary-btn'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateOn() {\n handleClearButton.disabled = true;\n handleReadTextButton.disabled = true;\n handleSubmitButton.disabled = false;\n}", "function updateColor(e) {\n var colorHasChanged = !tinycolor.equals(get(), colorOnShow);\n\n if (colorHasChanged) {\n if (click...
[ "0.63986987", "0.63095415", "0.62527436", "0.6097999", "0.60384476", "0.60281414", "0.6014187", "0.59740895", "0.5900665", "0.5890531", "0.58387053", "0.5832731", "0.58232826", "0.5821398", "0.5812321", "0.5805102", "0.5794541", "0.57773197", "0.5764966", "0.5759018", "0.5744...
0.63598686
1
fetch issue data from Github API
_onFetchGithubIssue () { if (!this.card.note && this.card.content_url) { this.__fetcher.getIssueData(this.card.content_url) .then(result => { this.card.note = `&num;${result.number} - ${result.title}`; }) .catch(error => console.error(error)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIssue(callback) {\n chrome.storage.local.get(TOKEN_KEY_GITHUB, function (result){\n var url = '/repos/' + owner + '/' + repo + '/issues/' + issueId;\n axios({\n baseURL: GITHUB_URL,\n headers: {\n 'authorization': 'bearer ' + result[TOKEN_KEY_GITHUB...
[ "0.7280051", "0.71494544", "0.7066609", "0.70208174", "0.69727093", "0.6926803", "0.6893266", "0.6866014", "0.67266023", "0.670088", "0.66255724", "0.66048354", "0.6559893", "0.64398724", "0.6393829", "0.6379301", "0.6371308", "0.634869", "0.6300186", "0.62952554", "0.6260240...
0.7497096
0
move card to another column
_moveCardToSelectedColumn (columnId) { this.__fetcher.moveCardToAnotherColumn(this.card.id, columnId) .then(result => { bus.$emit("move-card-to-column", columnId); }) .catch(error => console.error(error)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveToColumn() {\n\n\t$('.ordCont').each(function (index, value){\n\n\t\tvar columnID = $(this).attr('column');\n\n\t\t$(this).appendTo('#' + columnID);\n\t});\n}", "function move(clmn, toClmn) {\r\n\r\n var popped = null;\r\n\r\n if(clmn.length > 0) {\r\n\r\n popped = clmn.pop();\r\n addToColum...
[ "0.70512193", "0.68077356", "0.6500412", "0.63204175", "0.6310028", "0.6218194", "0.61430347", "0.6049835", "0.6032491", "0.60247797", "0.6022611", "0.59845936", "0.59627473", "0.5952935", "0.59376746", "0.59241354", "0.5884415", "0.5884012", "0.587228", "0.5865721", "0.58646...
0.72769475
0
This function will be called for every tag used in each vue component It should return an array, the first element will be inserted into the components array, the second should be a corresponding import originalTag the tag as it was originally used in the template kebabTag the tag normalised to kebabcase camelTag the t...
match (originalTag, { kebabTag, camelTag }) { if (kebabTag.startsWith('core-')) { return [camelTag, `import ${camelTag} from '@/components/core/${camelTag.substring(4)}.vue'`] } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_tags() {\n const react_types = fs.readFileSync('node_modules/@types/react/index.d.ts', 'utf8');\n const html_prop_types = react_types.split('interface IntrinsicElements {')[1]\n .split('}')[0];\n const lines = html_prop_types.split('\\n')\n .map(s => s.trim())\n .filter(l...
[ "0.5824182", "0.5800136", "0.57352066", "0.57078296", "0.5703075", "0.5639531", "0.5613712", "0.5572754", "0.54087126", "0.53433406", "0.5310342", "0.52457386", "0.51653874", "0.51196575", "0.50778747", "0.5073809", "0.5022876", "0.49877095", "0.49506512", "0.49355388", "0.48...
0.6994812
0
Iterates through the downloaded JSON and writes avatars to ./avatars/ as .jpg KNOWN BUG: Will throw an error if ./avatars/ does not exist. KNOWN BUG: Does not distinguish filetype of target avatar. As a result, if the written file is not formatted as a jpeg, it will not open.
function processResponse(err, result) { console.log("Errors:", err); console.log("Results:\n\n") for (const i of result) { downloadImageByURL(i.avatar_url, "./avatars/" + i.login + ".jpg"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveAvatars(json) {\n for(var i =0; i < json.length; i++){\n var contributor = json[i]['login'];\n var contributorAvatarURL = json[i]['avatar_url'];\n downloadImagebyURL(contributorAvatarURL, contributor);\n numAvatar += 1;\n console.log(\"Downloading avatar no:\", numAvatar)\n...
[ "0.7970884", "0.6154511", "0.5929211", "0.5697306", "0.5692138", "0.5666117", "0.5634891", "0.5625868", "0.5617118", "0.560626", "0.5594578", "0.55547", "0.54770154", "0.5467517", "0.5433479", "0.53932226", "0.53448623", "0.5344592", "0.5343263", "0.529375", "0.52876806", "...
0.6184843
1
document.getElementById("counter").innerHTML = "Correct answers: " + correct.toString() + "Incorrect answers: " + incorrect.toString(); factorize
function factorize() { var correct_ans = factors(num_1).sort(); var ans = document.getElementById("ans").value; ans = ans.split(" ").sort(); removeItem(ans, ""); for (var i = 0; i < ans.length; i++) { ans[i] = parseInt(ans[i], 10); } //check if the answer is just whitespace...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function answerIsCorrect(){\r\n qscore++;\r\n score.innerHTML = \"<p>Score: \" + qscore + \"</p>\";\r\n}", "function quizResult(){\n document.querySelector(\".total-questions\").innerHTML=myApp.length;\n document.querySelector(\".correct\").innerHTML=score;\n document.querySelector(\".wrong\").inn...
[ "0.71118355", "0.7051615", "0.7048462", "0.704706", "0.7004478", "0.6931442", "0.6893839", "0.68880415", "0.683744", "0.6836423", "0.67818713", "0.6769972", "0.6731326", "0.67140293", "0.6713698", "0.6699767", "0.6684787", "0.6674019", "0.66231513", "0.66187114", "0.66058075"...
0.721929
0
For a11y, highlight the currently selected screen button
focusHighlightedScreenButton() { for ( let i = 0; i < this.screenButtons.length; i++ ) { const screenButton = this.screenButtons[ i ]; if ( screenButton.screen === this.selectedScreenProperty.value ) { screenButton.focus(); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setActiveButton(button, rectTop) {\n button.classList.add('selected-button');\n window.scrollTo(0, rectTop);\n}", "function highlightButton(currentButton) {\n const buttons = ['about', 'portfolio', 'contact'];\n buttons.forEach(function(button) {\n if (button === currentButton) {\n ...
[ "0.6862657", "0.66207093", "0.6520622", "0.6454606", "0.6454463", "0.63798636", "0.6289303", "0.62309057", "0.6196856", "0.6194904", "0.6190759", "0.61628085", "0.61561185", "0.615486", "0.61427397", "0.61151475", "0.60978687", "0.6086412", "0.6064587", "0.60539526", "0.60516...
0.7750801
0
Render the entire tree block
render() { return ( <div className="tree-view"> <h1>Crafting Tree</h1> <div className="tree-items"> <div className="main-item">{this.renderItem()}</div> {this.renderTree()} </div> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render()\n {\n if (me.triggerEvent('renderBefore', data) === false)\n return;\n\n // remove all child nodes\n container.html('');\n\n // render child nodes\n for (var i=0; i < data.length; i++) {\n data[i].level = 0;\n render_node(data[i], container);\n }\n\n me.trigge...
[ "0.7468504", "0.6964566", "0.68603754", "0.6808491", "0.6602247", "0.65585953", "0.6536222", "0.64520925", "0.64520586", "0.6431678", "0.63161874", "0.63143116", "0.63123167", "0.6270159", "0.6222385", "0.6205662", "0.61672163", "0.6152625", "0.61507094", "0.61469036", "0.613...
0.7122425
1
an item that can be grouped (a tune, a set, etc)
function groupItem(nId, nItemType, priority){ this.id = nId; this.type = nItemType; this.priority = priority; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GroupItem(nId, strTitle, status, priority, entryDate){\n\tthis.id = nId;\n\tthis.title = strTitle;\n\tthis.itemsArr = new Array();\n\tthis.status = status;\n\tthis.priority = priority;\n\tthis.entryDate = entryDate;\n\t\n\tthis.itemType = ITEM_TYPE_GROUP;\n\t\n\t// checks if group contains a specific item...
[ "0.6383489", "0.57216203", "0.5686085", "0.5565262", "0.5467655", "0.53805536", "0.5318686", "0.52979696", "0.52803695", "0.5262674", "0.5222799", "0.5219436", "0.52143854", "0.51835424", "0.51667297", "0.5165731", "0.5156796", "0.5099887", "0.5096708", "0.505396", "0.5034273...
0.5851712
1
a group of groupable items (sets, tunes, etc). can contain mixed items (eg tunes and sets)
function GroupItem(nId, strTitle, status, priority, entryDate){ this.id = nId; this.title = strTitle; this.itemsArr = new Array(); this.status = status; this.priority = priority; this.entryDate = entryDate; this.itemType = ITEM_TYPE_GROUP; // checks if group contains a specific item this.hasItem = function...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupItems(items, groupInfo) {\n var groupMap = {};\n var maxGroupRank = 0;\n var ungroupedItems = [];\n var groups = groupInfo || [];\n // gather known groups\n if (groups.length > 0) {\n maxGroupRank = groups.reduce(function (max, g) { return (g.rank || 0 > max ? g.rank : max); ...
[ "0.59661996", "0.5828636", "0.58174753", "0.58108324", "0.5808896", "0.58075607", "0.580174", "0.56573355", "0.55903226", "0.55625576", "0.55277205", "0.55205554", "0.5473569", "0.546746", "0.5448792", "0.54373795", "0.5415553", "0.53997445", "0.53815734", "0.53282017", "0.53...
0.70818347
0
when a components root VNode is also a component, we can run into issues this will recursively look for vNode.parentNode if the VNode is a component
function updateParentComponentVNodes(vNode, dom) { if (vNode.flags & 28 /* Component */) { var parentVNode = vNode.parentVNode; if (parentVNode) { parentVNode.dom = dom; updateParentComponentVNodes(parentVNode, dom); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateParentComponentVNodes(vNode, dom) {\r\n if (vNode.flags & 28 /* Component */) {\r\n var parentVNode = vNode.parentVNode;\r\n if (parentVNode) {\r\n parentVNode.dom = dom;\r\n updateParentComponentVNodes(parentVNode, dom);\r\n }\r\n }\r\n}", "functio...
[ "0.6951624", "0.6883568", "0.6883568", "0.6522325", "0.6133537", "0.6075966", "0.6075966", "0.6051739", "0.6051739", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "0.6010079", "...
0.700274
0
Series of action to perform after a listing link is clicked.
function linkOnClickHandler(_e) { // switch back to map view if on mobile showMap(); // Update the currentFeature to the art associated with the clicked link // var clickedListing = data.features[this.dataPosition]; var clickedListing = this.listingFeature; if (!clickedListing.geometry.coordina...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function summaryAddLinksHandler()\n\t{\n\t\tvar $summaryAddLinks = $('.configurator-summary-article__link');\n\n\t\t$summaryAddLinks.on('click', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar $$tabTargetIndex = $(this).data('stepTabIndex');\n\t\t\tvar $accordionItemTargetindex = $(this).data('itemIndex');\n\n...
[ "0.6041457", "0.59463257", "0.5934572", "0.5862094", "0.5794622", "0.5786878", "0.57651037", "0.5762466", "0.57150126", "0.5713262", "0.57059884", "0.5693046", "0.56895477", "0.5687623", "0.55743605", "0.5566158", "0.55222404", "0.55207187", "0.55188805", "0.55136615", "0.549...
0.65105766
0
Initializes a new instance of the NotificationsPaneComponent class.
function NotificationsDialogComponent(appContextService, alertBarService, dialogService) { var _this = _super.call(this, dialogService) || this; _this.appContextService = appContextService; _this.alertBarService = alertBarService; _this.msgs = []; _this.selectedNotification = nul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NotificationPanel() {\n\tthis.isHidden = true;\n\tthis.notifications = new Array();\n\tthis.createPanel();\n\tthis.isHovered = false;\n\tthis.timeout = null;\n}", "function init() {\n\tvar\n\t\tnotificationsFilterOverlay = require( './notificationsFilterOverlay.js' ),\n\t\tnotificationsOv...
[ "0.71803755", "0.58965945", "0.58846605", "0.5847114", "0.5774617", "0.5716914", "0.56634367", "0.5661138", "0.55606526", "0.55540836", "0.55493534", "0.5520839", "0.54905355", "0.54610556", "0.54128134", "0.5373162", "0.53431", "0.52995104", "0.52882475", "0.52347326", "0.52...
0.592524
1
Given the numbers in accum, attempt to construct an addition chain that reaches to the specified sum with the specified number of numbers added. Alternatively, explore the branch specified by accum.
function explore(sumLeft, accum, numsLeft) { if ((sumLeft <= 0 && numsLeft != 0) || (numsLeft <= 0 && sumLeft != 0) || (maxTreeSum(accum[accum.length - 1], numsLeft) < sumLeft)) { // Overshot/undershot target return null; } if (sumLeft == 0 && numsLeft == 0) { return accum; } for (var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recur(sum, num, ...nums){\n sum += num;\n if (nums.length == 0) return sum;\n return recur(sum, ...nums); //sum is returned back in\n }", "function addNumbers(num) {\n if(num <= 1) {\n return num\n }\n return num + addNumbers(num - 1)\n}", "function sum(accumulator,value,index,arr){\n ...
[ "0.58459437", "0.5831085", "0.5760489", "0.5737386", "0.57197815", "0.568971", "0.56815207", "0.56595993", "0.56560194", "0.56559956", "0.5644424", "0.5640875", "0.56300116", "0.5622268", "0.5590572", "0.55680954", "0.55660844", "0.5551523", "0.5549544", "0.55380404", "0.5524...
0.62928367
0
manejo del panel de opciones
function OptionPanel(Opc) { Campo = Opc; switch (Opc) { case "C": $("#block_search_PC").css("display", "none"); $("#Block_Insert_PC").css("display", "block"); $("#Bloque_estado").css("display", "none"); $("#BtnSave").attr("value", "Crear"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TcPermDetailsPanel() {}", "function sel_panel(id) {}", "function PanelHelper() {\n\t}", "make_control_panel() {\n this.key_triggered_button(\"Hover in Place\", [\"m\"], () => {\n this.hover = !this.hover;\n });\n this.key_triggered_button(\"Pause Time\", [\"n\"], () =...
[ "0.65485233", "0.598184", "0.59611255", "0.5913883", "0.58762443", "0.5857043", "0.5841365", "0.5826121", "0.5722047", "0.57042336", "0.5673538", "0.5666842", "0.5660708", "0.5639568", "0.56333023", "0.5617949", "0.56088686", "0.56083614", "0.55951643", "0.5584048", "0.558207...
0.61092484
1
Fetch 20 random page ids on the wikipedia API
async function reloadRandomPages() { try { const response = await fetch(`https://${lang}.wikipedia.org/w/api.php?action=query&format=json&origin=*&list=random&rnnamespace=0&rnfilterredir=nonredirects&rnlimit=20`, {mode: 'cors'}) const data = await response.json() const articles_ids = data.query.random.map...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewRandomWiki() {\n $.ajax({\n type: 'GET',\n url: 'https://simple.wikipedia.org/w/api.php?action=query&generator=random&grnnamespace=0&prop=extract&format=json&callback=?',\n contentType: 'application/json; charset=utf-8',\n async: false,\n dataType: 'json',\n ...
[ "0.68808806", "0.6441434", "0.6245208", "0.62111056", "0.6177207", "0.6119795", "0.6023821", "0.6000673", "0.59280384", "0.5879147", "0.58237785", "0.5820421", "0.57987285", "0.5700298", "0.5693944", "0.5687617", "0.5673461", "0.56729543", "0.5672761", "0.5645962", "0.5635085...
0.7860222
0
Fetch articles and enqueue them in our currently available ones
async function fetchAndQueue() { const rnpages = await reloadRandomPages() const npages = rnpages && rnpages.filter(e => e !== null) if (npages && npages.length > 0) { Array.prototype.push.apply(articles, npages) } return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getArticles() // Gets all the articles and then finish filling the main page with articles (unless the main page was changed)\r\n{\r\n loadingArticles = true;\r\n mainContent.loading(true);\r\n\r\n await articles.getAllArticles(25);\r\n\r\n loadingArticles = false;\r\n mainContent....
[ "0.6752779", "0.6691059", "0.64783084", "0.63707507", "0.6359395", "0.63482547", "0.6270408", "0.6220599", "0.6212273", "0.61533326", "0.6127577", "0.61060995", "0.6100849", "0.60669804", "0.6027565", "0.60221386", "0.5993318", "0.5968225", "0.5967584", "0.5947048", "0.594052...
0.7063616
0
Get the slider image's width
getImageWidth() { return document.querySelector('.slider__image').clientWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSliderWidth() {\n return this.slider.innerWidth() - parseInt(this.slider.slick('slickGetOption', 'centerPadding')) * 2;\n }", "get width() {\n if (this.image) {\n return this.image.width;\n }\n return 0;\n }", "function getWidth() {\n\tlet item = $('.team-slider ...
[ "0.79383475", "0.78367764", "0.7545281", "0.74445206", "0.7308486", "0.72843033", "0.726432", "0.70035374", "0.6904663", "0.68714356", "0.6856484", "0.68381524", "0.6791727", "0.6787974", "0.6756284", "0.6756284", "0.6751183", "0.6749075", "0.67442656", "0.67188704", "0.67185...
0.8523254
0
end Node The link data object does not have direct access to both nodes (although it does have references to their keys: .from and .to). This conversion function gets the GraphObject that was databound as the second argument. From that we can get the containing Link, and then the Link.fromNode or .toNode, and then its ...
function linkColorConverter(linkdata, elt) { var link = elt.part; if (!link) return "blue"; var f = link.fromNode; if (!f || !f.data || !f.data.critical) return "blue"; var t = link.toNode; if (!t || !t.data || !t.data.critical) return "blue"; return "red"; // when both Link.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assignLinkColor(link) {\t\t\r\n\tif(link.type === \"npe\") {\r\n\t\t// Non-provenance edges are styled as blue.\r\n\t\treturn d3.rgb('rgb(0,0,255)').toString();\r\n\t} else { \r\n\t\treturn d3.rgb('rgb(0,0,0)').toString();\r\n\t}\r\n\t\r\n\t// Alternatively, we could return a color depending on whether th...
[ "0.56644046", "0.5622738", "0.5460205", "0.5408646", "0.53910935", "0.534705", "0.5319056", "0.52998394", "0.51967835", "0.5168262", "0.51058793", "0.5076556", "0.50512195", "0.5044679", "0.50144565", "0.50093013", "0.5008855", "0.50045574", "0.50036365", "0.49995682", "0.499...
0.6119528
0
function for generate random number for HEX color
function randNumForHexColor(){ return Math.floor(Math.random() * hexColor.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genColorVal(){\r\n return Math.floor(Math.random() * 256);\r\n }", "function randomColor(){\n\tvar chars = '0123456789abcdef'\n\tvar value = '#';\n\tfor(var i=0; i < 6; i++){\n\t\tvalue += chars[Math.floor(Math.random() * 16)];\n\t}\n\treturn value;\n}", "function randomHexaNumberGenerator()...
[ "0.83705896", "0.8362482", "0.8359228", "0.83217615", "0.83207107", "0.8317098", "0.8311735", "0.82872635", "0.8281823", "0.8265833", "0.8219077", "0.8218518", "0.82160795", "0.8188685", "0.81772083", "0.8173403", "0.8171679", "0.816126", "0.81565017", "0.81461775", "0.814397...
0.8690393
0
Callback when requests are deleted.
function requestsDeleted(status) { $('request-queue-actions-info').textContent = status; browserProxy.getRequestQueue().then(fillRequestQueue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callback(error, response, body) {\n \t //console.log(response);\n \t\t if (!error && response.statusCode == 200) {\n \t\t console.log(\"successfully deleted\");\n \t\t}\n \t}", "function deleteRequest (req, res) {\r\n\tconsole.log ('DELETE /requests/:requestID');\r\n\t// delete the target from the...
[ "0.66622055", "0.656268", "0.65168023", "0.6492215", "0.6420493", "0.6388108", "0.63643104", "0.6327104", "0.63236797", "0.63081104", "0.62901366", "0.6284469", "0.62825406", "0.6272044", "0.627188", "0.6258206", "0.6253783", "0.6243353", "0.62296575", "0.61939955", "0.616492...
0.70554477
0
Calls scheduleNwake and indicates how long the scheduled delay will be.
function ensureBackgroundTaskScheduledWithDelay() { browserProxy.scheduleNwake() .then((result) => { // The delays in these messages should correspond to the scheduling // delays defined in PrefetchBackgroundTaskScheduler.java. if ($('limitless-prefetching-checkbox').checked) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wake() {\n sendRemindersIfItIsTime();\n setTimeout(wake, howOftenToWake);\n}", "function sleepn(n) {\n var start = new Date().getTime();\n while (true) if (new Date().getTime() - start > n) break;\n}", "function scheduleNextTick() {\n\t\t\tvar delta = time() - settings.lastTick,\n\t\t\t\ti...
[ "0.56119967", "0.5313081", "0.53043044", "0.522526", "0.51934105", "0.5191386", "0.51415944", "0.5126686", "0.51200056", "0.51118904", "0.50597185", "0.5026608", "0.50037265", "0.498334", "0.49750978", "0.49743193", "0.49370262", "0.4920849", "0.4920516", "0.4919004", "0.4919...
0.5362812
1
Returns an angle (0360) for the current hour in the day, including minutes
function hoursToAngle(hours, minutes) { let hourAngle = (360 / 12) * hours; let minAngle = (360 / 12 / 60) * minutes; return hourAngle + minAngle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clockHandAngles(num)\n{\n var day = 3600 * 12;\n\n var minute = num / 60;\n var hour = minute / 60;\n console.log(day);\n}", "function angleCalculation(){\n\n var newDate = new Date();\n\n var seconds = newDate.getSeconds(),\n minutesL = newDate.getMinutes(),\n ...
[ "0.6848586", "0.6708407", "0.6664473", "0.6560168", "0.6560168", "0.65582967", "0.6293926", "0.6278324", "0.62669456", "0.61876667", "0.6167297", "0.6115086", "0.6078804", "0.60484153", "0.60398847", "0.5997209", "0.5950402", "0.5941513", "0.5925417", "0.5896262", "0.5895814"...
0.68697053
0
Returns an angle (0360) for minutes
function minutesToAngle(minutes) { return (360 / 60) * minutes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minutesToAngle(minutes, seconds) {\n let minAngle = (360 / 60) * minutes;\n let secondAngle = (360/ 60 / 60) * seconds;\n return (minAngle + secondAngle) - 180;\n}", "function DegtoMOA(deg) { return deg * 60; }", "function hoursToAngle(hours, minutes) {\n let hourAngle = (360 / 12) * hours;\n le...
[ "0.7501343", "0.7379667", "0.71479166", "0.71479166", "0.7082285", "0.7082285", "0.7082285", "0.7043259", "0.68687564", "0.68617815", "0.68083596", "0.68083596", "0.6523904", "0.63771003", "0.6362484", "0.63317376", "0.6270775", "0.6258841", "0.6248207", "0.6246768", "0.62134...
0.8360448
0
Returns an angle (0360) for seconds
function secondsToAngle(seconds) { return (360 / 60) * seconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minutesToAngle(minutes) {\n return (360 / 60) * minutes;\n}", "function minutesToAngle(minutes) {\n return (360 / 60) * minutes;\n}", "function angleCalculation(){\n\n var newDate = new Date();\n\n var seconds = newDate.getSeconds(),\n minutesL = newDate.getMinutes(),\n ...
[ "0.7594874", "0.7594874", "0.7395701", "0.73686075", "0.719973", "0.70573294", "0.6948209", "0.6837839", "0.6828376", "0.67408746", "0.6678899", "0.66080815", "0.66080815", "0.65950316", "0.6562241", "0.65579367", "0.6541143", "0.6496093", "0.6496093", "0.6449102", "0.6441611...
0.83609533
0
based on Mikola Lysenko's ndarrayhomography see
function fnHomography(out, inp, X) { var w = X[8] + X[2] * inp[0] + X[5] * inp[1]; out[0] = (X[6] + X[0] * inp[0] + X[3] * inp[1]) / w; out[1] = (X[7] + X[1] * inp[0] + X[4] * inp[1]) / w; return out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matrix_pseudoinverse(m1) {\n\n var mat = [];\n var i,j;\n if (m1.length == m1[0].length){\n return numeric.inv(m1);\n }\n else{\n var m1_T = matrix_transpose(m1);\n if (m1.length > m1[0].length){\n return matrix_multiply(numeric.inv(matrix_multiply(m1_T,m1)),...
[ "0.5257385", "0.5189274", "0.5160509", "0.51525754", "0.508318", "0.505621", "0.50537676", "0.50318736", "0.502289", "0.5001431", "0.49958265", "0.4992963", "0.4982045", "0.48904616", "0.48836032", "0.48708346", "0.48701063", "0.486127", "0.48455968", "0.48217392", "0.4800161...
0.67767006
0
based on Mikola Lysenko's ndarraywarp see
function warp(dest, src, func, X) { var warped = [0, 0]; var ni = dest.shape[0]; var nj = dest.shape[1]; for(var i = 0; i < ni; i++) { for(var j = 0; j < nj; j++) { func(warped, [i, j], X); dest.set(i, j, ndarrayInterp2d(src, warped[0], warped[1])); } } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "map(fullImage, srcCorners, width, height) {\n let data = fullImage.data\n let destination = [[0, 0], [width, 0], [width, height], [0, height]]\n\n this.transformationMatrix(destination, srcCorners)\n let img = document\n .createElement('canvas')\n .getContext('2d')\n .createImageData(wid...
[ "0.53988254", "0.535099", "0.52746135", "0.5238584", "0.52343976", "0.5162406", "0.5131129", "0.51300657", "0.5075673", "0.507469", "0.50438756", "0.50431955", "0.5034454", "0.5028666", "0.50137717", "0.4987309", "0.49698925", "0.49607846", "0.49559072", "0.49550104", "0.4953...
0.7047887
0
funcion registrarEventos. Carga los lanzadores de eventos.
function registrandoEventos() { $('#pizarra').hide(); $('#primero').click(function(){navegador('primero')}); $('#anterior').click(function(){navegador('anterior')}); $('#buscar').click(buscarRegistro); $('#reset').click(resetearCampos); $('#siguiente').click(function(){navegador('siguiente')}); $('#ultimo').click...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function asignarEventos(){\n\tdocument.addEventListener(\"backbutton\", onBackKeyDown, false);\t//Evento al pulsar botón back\n\t\n\t/******** Events ************/\n\t//Pages\n\t$(\"body\").on(\"change\", \".slmarcador\", grabarPronostico);\n\t\n\tmostrarPartidos();\n\tpaginaCompleta();\n}", "function cargarEven...
[ "0.6713342", "0.6703405", "0.64431804", "0.62527907", "0.6086924", "0.6058943", "0.5906659", "0.58831716", "0.5826486", "0.5813082", "0.57989943", "0.57600826", "0.5744559", "0.5718573", "0.5702139", "0.56989586", "0.5697708", "0.56914276", "0.56802714", "0.5668678", "0.56596...
0.7289511
0
Funcion resetearCampos. Pone a blanco los campos del Formulario.
function resetearCampos() { $("#formGenerico input[@type=text]").attr("value",""); $("#formGenerico select").attr("value",""); $("#formGenerico textarea").attr("value",""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function limpiarCamposForm(idForm){\n\n idForm.each (function(){\n \n this.reset();\n\n });\n\n }", "function limpiaCampos(){\n $(\"#name2\").val('');\n $(\"#email2\").val('');\n $(\"#password2\").val('');\n $(\"#repassword2\").val('');\n $(\"#telefono2\").val('');\n $(\"#empre...
[ "0.78825444", "0.74792224", "0.74116576", "0.7378727", "0.73591214", "0.735517", "0.73290765", "0.7288014", "0.71951675", "0.7190219", "0.7155654", "0.7137963", "0.7129848", "0.7114112", "0.71115005", "0.7110478", "0.70862126", "0.70811665", "0.70763206", "0.7065926", "0.7041...
0.81664455
0
Funcion rellenoBusqueda. Se encarga de Rellenar los campos con los valores obvtenidos luego de una busqueda.
function rellenoBusqueda() { campoId = this.id; campoId = $('#'+campoId).attr('campo'); campoVal = this.title; procesando("Buscando Informacions ..."); tabla = $("#tabla").attr('value'); cadena = "sstm__tabla="+tabla+"&campoId="+campoId+"&campoVal="+campoVal; // Lanzo el Ajax para Insertar Registro ajaxTablas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function busquedaPrincipalPorDefecto(){\n construirFiltros(\"HideDuplicateItems\", \"true\");\n buscarPorClave(\"Deporte\",12,1);\n search(\"Sports\",null,1,\"customerRating\",\"desc\",12);\n}", "function recogerBusqueda(e) { \n\n let palabraBuscar = e.target.value.toLowerCase();\n\n var listaBusq...
[ "0.58359843", "0.5525442", "0.5460626", "0.53349257", "0.5262612", "0.5104332", "0.5048461", "0.50402254", "0.50112134", "0.5002836", "0.49937725", "0.498141", "0.4966172", "0.4951989", "0.49403638", "0.49369216", "0.49332628", "0.49262786", "0.49222034", "0.49208865", "0.491...
0.68568456
0
Truncate description with given length and replace line breaks with spaces
parseDescription(string, length) { return string.substring(0, length).replace(/\n/g, ' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "truncDesc() {\n let description = this.props.data.description;\n if (description == null) {\n return \"\";\n }\n else if (description.length <= 105) {\n return description;\n }\n else if (description.split(\" \").length === 1) {\n return de...
[ "0.7635273", "0.69410145", "0.6628076", "0.65434635", "0.6417781", "0.6340682", "0.6316469", "0.63148874", "0.62767464", "0.6251981", "0.6247079", "0.6247079", "0.62452936", "0.6243827", "0.62429404", "0.6218308", "0.61852926", "0.6173204", "0.61401284", "0.61165124", "0.6094...
0.74921346
1
Return true if time has passed enough for the map to be refreshed
mapShouldUpdate() { var difference = + new Date() - Global.lastRefreshTimestamp; if (difference < Config.REFRESH_THRESHOLD) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n }", "get shouldRefresh() {\n v...
[ "0.67076427", "0.67076427", "0.67076427", "0.67076427", "0.67076427", "0.67076427", "0.66875273", "0.65547097", "0.65547097", "0.65111697", "0.65111697", "0.65111697", "0.65111697", "0.65111697", "0.65111697", "0.64038557", "0.6386804", "0.6310111", "0.62700677", "0.6226432", ...
0.8174305
0
change size depending on whether pre/post covid data is selected
changeSize( preCovid ) { if ( preCovid ) { // larger the frequency, bigger the size if ( this.size < this.preCovidSize ) { this.size++; } else if ( this.size > this.preCovidSize ) { this.size--; } } else { if ( this.size < this.postC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeSize(val) {\n\tvar s = String(val).split(\",\");\n\td3.select('#viz_container').style('width', s[0] + 'px').style('height', s[1] + 'px');\n\tviz.update();\n}", "function changeSize(val) {\n\tvar s = String(val).split(\",\");\n\td3.select('#viz_container').style('width', s[0] + 'px').style('height'...
[ "0.64406365", "0.64406365", "0.6283435", "0.6121032", "0.60766536", "0.6055732", "0.59922713", "0.5928477", "0.59244806", "0.5780527", "0.5779172", "0.5774577", "0.5765699", "0.5754653", "0.575365", "0.5723973", "0.5717474", "0.5699154", "0.5685792", "0.5651617", "0.56348693"...
0.711376
0
get logo into it's sorted position
moveToPosition ( preCovid ) { this.changeSize ( preCovid ); // if freq 0, don't draw the logo if ( this.size ) { push (); imageMode ( CENTER ); translate ( this.xCoord, this.yCoord ); rotate ( angle ); // once they are in the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logoSwitch () {\n $('.altLogo').each(function() {\n $(this).css('top',\n $('.startLogo').offset().top - $(this).closest('.row').offset().top\n );\n });\n }", "function logoToTopLeftAnimation() {\n let originalLogoPositon = getOffset(originalHeaderLogoClassName);\n let delayTim...
[ "0.6284324", "0.58587533", "0.5799961", "0.57625604", "0.5569006", "0.5564043", "0.55141675", "0.54415065", "0.54305595", "0.54189205", "0.5337156", "0.5309123", "0.52932173", "0.5281758", "0.5276534", "0.5275337", "0.5248194", "0.5238174", "0.5235027", "0.52330774", "0.52082...
0.6419759
0
chenge the isClicked field if logo was clicked
clicked () { if ( dist ( mouseX, mouseY, this.xCoord, this.yCoord ) < this.size / 2 ) { this.isClicked = !this.isClicked; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logo_click() {\n if (pasos.paso1.aseguradoraSeleccionada != null && pasos.paso1.aseguradoraSeleccionada.id == pasos.paso1.listaAseguradoras[$(this).index()].id) {\n componentes.progreso.porcentaje = 0;\n componentes.progreso.barra.css({width: '0px'});\n pasos.paso1....
[ "0.6571043", "0.65039974", "0.63406557", "0.6339628", "0.6308609", "0.62600136", "0.62593395", "0.6228419", "0.61663896", "0.6153182", "0.6149466", "0.60816044", "0.60695857", "0.6024215", "0.6013935", "0.60126036", "0.6004378", "0.5977124", "0.5942642", "0.5940595", "0.59302...
0.65109295
1
function to make output element blink on and off
function blink(outputelemnt) { let x = true; setInterval(() => { if (x) { document.getElementById(outputelemnt).style.visibility = "visible"; x = false; } else { document.getElementById(outputelemnt).style.visibility = "hidden"; x = true; } }, 2000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doBlink() {\n\t\t// Blink, Blink, Blink...\n\t\tvar blink = document.all.tags(\"BLINK\")\n\t\tfor (var i=0; i < blink.length; i++)\n\t\t\tblink[i].style.visibility = blink[i].style.visibility == \"\" ? \"hidden\" : \"\" \n\t}", "toggleBlink(domElem, val) {\n\n //if (val == true) { \n\n //v...
[ "0.7599225", "0.75727904", "0.7565729", "0.7056635", "0.7007492", "0.69955456", "0.69718313", "0.696481", "0.6956041", "0.692848", "0.6912123", "0.6862048", "0.6851261", "0.682104", "0.6807539", "0.670636", "0.66888565", "0.66755193", "0.66202915", "0.66202915", "0.6587652", ...
0.84824264
0
Ler a idade da pessoa em anos, meses e dias que ela possui ====> Expressar o tempo de vida dessa pessoa (a idade dela) em dias.
function idadePessoa(ano, mes, dias) { //return ano + " " + mes const diasAno = 365; const diasMes = 30; const idadeEmAnos = ano * diasAno //console.log(idadeEmAnos) const idadeEmMeses = mes * diasMes //console.log (idadeEmMeses) const idadeEmDias = idadeEmAnos + idadeEmMeses + dias; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _AtualizaPontosVida() {\n // O valor dos ferimentos deve ser <= 0.\n var pontos_vida_corrente =\n gPersonagem.pontos_vida.total_dados + gPersonagem.pontos_vida.bonus.Total() + gPersonagem.pontos_vida.temporarios\n - gPersonagem.pontos_vida.ferimentos - gPersonagem.pontos_vida.ferimentos_nao_le...
[ "0.65822417", "0.64658254", "0.63526815", "0.6345038", "0.6342801", "0.6308801", "0.62426656", "0.61788327", "0.61620563", "0.6148312", "0.61412716", "0.6133411", "0.61103266", "0.60700303", "0.5968848", "0.5963195", "0.594731", "0.5932698", "0.59277713", "0.59200466", "0.589...
0.67424184
0
Transform a table to a jqGrid.
function tableToGrid(selector, options) { jQuery(selector).each(function() { if(this.grid) {return;} //Adedd from Tony Tomov // This is a small "hack" to make the width of the jqGrid 100% jQuery(this).width("99%"); var w = jQuery(this).width(); // Text whether we have single or multi select var inputChec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "serializeTableGrid(writer, table) {\n writer.writeStartElement(undefined, 'tblGrid', this.wNamespace);\n if (table.grid.length !== 0) {\n this.serializeGridColumns(writer, table.grid);\n }\n writer.writeEndElement();\n }", "function dataTableFromTable(t) {\n\t\tvar tbl =...
[ "0.6295634", "0.62792337", "0.60762364", "0.5927709", "0.58075047", "0.5805463", "0.5767218", "0.5764076", "0.560453", "0.5571345", "0.54972523", "0.54833037", "0.548137", "0.54659164", "0.54504323", "0.54475313", "0.5441423", "0.53677154", "0.5349776", "0.5324778", "0.531372...
0.7012404
0
Query localStorage for integer by key. Return 0 if does not exist or nonint.
function getIntItem(key){ var val = 0; try{ val = parseInt(window.localStorage.getItem(key)); }catch(e){} if(val == null || val == ""){ val = 0; } return val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInt(key) {\r var value = retrieve(key);\r if (value != null) {\r try {\r return parseInt(value, 10);\r }\r catch (e) {\r return 0; \r }\r }\r else {\r return 0; \r }\r}", "function getJsonItem(iD, key){\n\tvar jsonData = J...
[ "0.7129384", "0.6909899", "0.6892", "0.6641427", "0.6641427", "0.6549504", "0.6494287", "0.62918603", "0.62671465", "0.62285507", "0.6001009", "0.59772384", "0.5912943", "0.583031", "0.5803954", "0.5790087", "0.57596856", "0.57443285", "0.57295287", "0.57295287", "0.5710512",...
0.8028066
0
Remove the www and subdomain from the URL.
function removeWWW(url) { if (typeof (url) == "undefined") { return; } var retval = url; if (url.indexOf("www") != -1) { retval = url.substring(url.indexOf(".") + 1, url.length); } var domainCount = retval.split(".").length - 1; while (domainCount > 1) { retval = retval.substring(ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function omn_deleteWWW(url){\n var subString=\"\";\n var posicion= url.indexOf(\"www\", 0);//search sub-string www in start of the string\n if(posicion==0){//if found, then delete the sub-string www\n subString= url.substring(4);\n url= subString;\n }\n return url;\n}", "function str...
[ "0.76897", "0.667764", "0.6646212", "0.65920866", "0.65920407", "0.65647876", "0.6454713", "0.6426312", "0.6393893", "0.61361253", "0.61190027", "0.5975321", "0.5955321", "0.59533197", "0.59456956", "0.5924218", "0.59090704", "0.5901821", "0.5872801", "0.58707577", "0.5869381...
0.78091407
0
This method sends the redirect message to a specific tab on 'port' telling the contentscript to run the redirect.
function sendRedirectMessage(port, url) { if (!port) { log("TL:: ERROR: PORT NOT FOUND!"); return; } var flag = pXtn.isRedirect(cleanURL(url)); if (flag && !pXtn.hasRedirectRun(cleanURL(url))) { // We are clear to redirect and has not run before this call. log("TL:: CALL EX:: Red...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirect(tab, params) {\n $.post(\"/execute\", JSON.stringify(params), function(data){ location.href = \"/\" + tab; location.reload(); });\n}", "function redirect(newPortConnect, newHostConnect) {\n peer.connect({ port: newPortConnect, host: newHostConnect }, function () { });\n}", "function onCon...
[ "0.5742777", "0.55941486", "0.54936427", "0.5485884", "0.5480513", "0.54573214", "0.5422081", "0.54105437", "0.5394733", "0.53935903", "0.5385616", "0.53636324", "0.5346005", "0.5313977", "0.5299665", "0.52890843", "0.52877057", "0.5279478", "0.5278941", "0.5268035", "0.52480...
0.66083777
0
updates 'proj_mat' from 'fovy_deg', 'viewport', 'near', 'far', 'half_size_y'
updateProjMat() { if ( this.proj_type_str == 'Perspective' ) this.proj_mat = Mat4_Perspective( this.fovy_deg, this.viewport.ratio_yx, this.near, this.far ) else if ( this.proj_type_str == 'Orthogonal' ) { const near_adjust = 5.0 // this is used so the grid is not clip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(viewMatrix, projectionMatrix) {\n _math_Matrix44__WEBPACK_IMPORTED_MODULE_0__[\"default\"].multiplyTo(projectionMatrix, viewMatrix, this.__vp);\n this.zNear.x = this.__vp.m20 + this.__vp.m30;\n this.zNear.y = this.__vp.m21 + this.__vp.m31;\n this.zNear.z = this.__vp.m22 + this.__...
[ "0.70885265", "0.6861501", "0.6859272", "0.6662419", "0.66309494", "0.65205216", "0.64965826", "0.6492693", "0.6440772", "0.63785565", "0.6326502", "0.628405", "0.6206308", "0.6116119", "0.60875285", "0.6027731", "0.60104007", "0.59726727", "0.5949755", "0.5947444", "0.592683...
0.7597272
0
Generates a ray through the center of a pixel in world coordinates
genRay( pix_x, pix_y ) { const fname = 'SimpleCamera.genRay():' Check( 0 <= pix_x && pix_x < this.viewport.width ) Check( 0 <= pix_y && pix_y < this.viewport.height ) // compute ray origin and direction in Eye Cords, according to camera type let org_ec = null, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rayCasting(){\n var window = windowCorners();\n var width = context.canvas.width;\n var height = context.canvas.height;\n var imagedata = context.createImageData(width, height);\n\n for(var x=0; x<width; x++){\n for(var y=0; y<height; y++){ // for each pixel\n\n ...
[ "0.65671843", "0.6458788", "0.64173263", "0.63752794", "0.63005006", "0.6273138", "0.6096188", "0.59946764", "0.5934153", "0.59201926", "0.5815804", "0.57845813", "0.57836366", "0.5767921", "0.57461995", "0.57101506", "0.57039195", "0.56987786", "0.56343186", "0.56330985", "0...
0.653524
1
Compiles and returns an array of transition hook functions that should be called before we transition to a new state. Transition hooks receive the history and nextState as arguments. Additionally, routes may have onLeave and/or onEnter methods that will be called when they enter and leave the active route tree. These h...
_getTransitionHooks(nextState) { var { history } = this.context; var prevState = this.state; var fromRoutes = prevState.branch; var toRoutes = nextState.branch; var hooks = this.transitionHooks.map(function (hook) { return hook.bind(this, history, nextState); }, this); if (fromRoutes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTransitionHooks(prevState, nextState) {\n\t var _computeDiff = computeDiff(prevState, nextState);\n\n\t var leavingRoutes = _computeDiff[0];\n\t var enteringRoutes = _computeDiff[1];\n\n\t var hooks = getTransitionHooksFromRoutes(leavingRoutes, 'onLeave');\n\n\t hooks.push.apply(hooks, getTransiti...
[ "0.746188", "0.6508246", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.64912975", "0.6490236", "0.64851743", "0.64851743", "0.64851743", "0.64851743", "0.64851743", ...
0.80642754
0
Runs all transition hooks needed to get to the nextState. Returns true to allow the transition, false to prevent it.
_runTransitionHooks(nextState) { var hooks = this._getTransitionHooks(nextState); var nextLocation = this.nextLocation; try { for (var i = 0, len = hooks.length; i < len; ++i) { hooks[i](); if (this.nextLocation !== nextLocation) break; // No need to proceed further. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stateTransition(){return}", "_doTransitionToIdle() {\n return false\n }", "run(){\n var a = this.action();\n while (a.isComplete()) {\n a.cleanUp();\n var oldState = this.state;\n this.preStateChange(a);\n this.stateTransition();\n this.enterState(oldState);\n if (oldSta...
[ "0.59098536", "0.5769376", "0.57622576", "0.57212067", "0.57002527", "0.5674836", "0.5581129", "0.5563478", "0.55108577", "0.5490581", "0.54819256", "0.54633224", "0.5442896", "0.5437431", "0.5416095", "0.5390802", "0.53724945", "0.53705573", "0.5335382", "0.53250027", "0.532...
0.7595742
0
Select brush region to zoom into
function selectBrushRegion() { var selectedRegion = d3.event.selection; if (!selectedRegion) { // selection event is null if (!idleTimeout) return idleTimeout = setTimeout(idled, idleDelay); x.domain(d3.extent(scatterData, function (d) { return d.compareValue.relative; })).nice(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectbrush(evt){\n\t$(\"#brushHolder\").children().css({backgroundPosition: \"top left\"})\n\t$(evt.currentTarget).css({backgroundPosition: \"top right\"})\n\tcurrentCursor=$(evt.currentTarget).attr(\"id\").split(\"brush_\").join(\"cursor_\")\n\t$(\"#canvas\").css({cursor: \"url(images/\"+currentCursor+\...
[ "0.7197293", "0.6680054", "0.6680054", "0.63076955", "0.62364113", "0.6213396", "0.61850816", "0.61666524", "0.61586875", "0.6132021", "0.61135465", "0.6103942", "0.6103405", "0.6087602", "0.6075992", "0.60545677", "0.60424566", "0.60122263", "0.59983546", "0.5996517", "0.597...
0.7853028
0
Delete subtask from list
deleteSubtask(event) { let idToDelete = event.target.name; let subtasks = this.subtasks; let subtaskIndex; let recordIdToDelete; this.processing = true; for (let i = 0; i < subtasks.length; i++) { if (idToDelete === subtasks[i].id) { subtask...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteTask(id) {\n var index = this.list.map(i => i.id).indexOf(id);\n this.list.splice(index, 1);\n ls.deleteItem(id);\n }", "function deleteTask()\n {\n var child = this.parentNode.parentNode;\n var parent = child.parentNode;\n parent.removeChild(child);\n var id= parent.id;\n ...
[ "0.7773084", "0.7418176", "0.73951536", "0.73681223", "0.7308734", "0.7158941", "0.71575034", "0.71472514", "0.7132934", "0.7130009", "0.7124885", "0.7113877", "0.7102189", "0.7094256", "0.7077569", "0.7069916", "0.70511854", "0.7045471", "0.7039574", "0.70349294", "0.7019669...
0.7898153
0
Will freeze the scoreboard in the last x minutes
function freezeScoreboard(competition) { let endTime = new Date(competition.endTime); let freezeTime = new Date(endTime.getTime() - competition.frozenMinutes * 60000).getTime(); return Date.now() >= freezeTime && Date.now() < endTime.getTime() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function freeze() {\n if (curT.some(index => squares[curPos + index + width].classList.contains('taken'))) {\n curT.forEach(index => squares[curPos + index].classList.add('taken'))\n setNew()\n draw()\n displayShape()\n addScore()\n gameOver(...
[ "0.6787239", "0.6720702", "0.66622657", "0.6649635", "0.66307217", "0.6524521", "0.63026834", "0.6204165", "0.6187083", "0.61257863", "0.6090886", "0.6032027", "0.6029363", "0.60153776", "0.60124946", "0.5994705", "0.59680265", "0.5960937", "0.5953828", "0.59513617", "0.59452...
0.7362299
0
A Factory foi inicializada na controller usuarioController
function detalhesUsuarioController($scope, usuarioFactory, $rootScope) { $scope.usuarioSelecionado = usuarioFactory.usuarioSelecionado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createUsuario(username) {\n /* Crea un artista y lo agrega a unqfy. */\n this._validarParametros({username:username}, [\"username\"]);\n this._validarDisponibilidadNombreUsuario(username, \"createUsuario\");\n\n const usuarioNuevo = new Usuario(username);\n this._usuarios.push(usuarioNuevo);\n re...
[ "0.67855036", "0.6696722", "0.6561427", "0.64631015", "0.6435544", "0.64320606", "0.62159604", "0.61863244", "0.61706316", "0.61693835", "0.61255985", "0.6047431", "0.59872484", "0.5983373", "0.5963101", "0.59399784", "0.58880615", "0.58782256", "0.58634967", "0.5850024", "0....
0.7219992
0
Topic Publisher (not a subtype of publisher, a different interface)
function TopicPublisher() { this.subscribers = { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "publish(topic, payload) {\n const me = this;\n\n me.publisher.publish(`message`, {\n topic: topic,\n payload: payload,\n id: me.id\n });\n }", "function Publisher() {\r\n this.subscribers = [];\r\n }", "async publish () {}", "function Publisher() {...
[ "0.7076313", "0.6677276", "0.6637315", "0.65786093", "0.6495757", "0.64041865", "0.63932353", "0.63411915", "0.6305922", "0.62541366", "0.6233299", "0.6182744", "0.61783576", "0.61662984", "0.61433536", "0.61155415", "0.61155415", "0.6026352", "0.6026352", "0.60196185", "0.59...
0.7983649
0
Currently supported opts: wsport: web socket port (other than default 8181) host: if defined, is the host address to use
function createWebSocket(opts, _host_) { var wsport = (opts && opts.wsport) || null; webSockOpts = opts; // preserved for future calls host = _host_ || $loc.host(); url = ufs.wsUrl('core', wsport, _host_); $log.debug('Attempting to open websocket to: ' + url); ws = wso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configurar() {\n if (socket) {\n socket.close()\n }\n let host = document.getElementById(\"hostip\").value\n socket = new WebSocket(host)\n setupSocket(socket)\n\n}", "connect(url) {\n if ( ! url ) {\n url = window.location.href; // http://localhost:8080/console.html\n ...
[ "0.6951505", "0.64137626", "0.63465846", "0.6337942", "0.6329352", "0.6267428", "0.6255362", "0.6198704", "0.6187173", "0.61485463", "0.60675234", "0.6056454", "0.60125804", "0.5968437", "0.5929013", "0.59170073", "0.59118056", "0.5898808", "0.5853822", "0.5848843", "0.584659...
0.68906695
1
Binds the message handlers to their message type (event type) as specified in the given map. Note that keys are the event IDs; values are either: the event handler function, or an API object which has an event handler for the key
function bindHandlers(handlerMap) { var m, dups = []; if (noHandlersWarn(handlerMap, 'bindHandlers')) { return null; } m = d3.map(handlerMap); m.forEach(function (eventId, api) { var fn = fs.isF(api) || fs.isF(api[eventId]); if (!...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindHandlers() {\n wss.bindHandlers(handlerMap);\n $log.debug('topo2 event handlers bound');\n }", "function messageHandler(event, handlers) {\n\tvar data = JSON.parse(event.data);\n\tif(handlers[data.type]){\n\t\thandlers[data.type](data);\n\t} else {\n\t\tconsole.warn(\"unable to hand...
[ "0.61792547", "0.60304123", "0.5896724", "0.5845439", "0.5834308", "0.5790365", "0.5521729", "0.549188", "0.54647744", "0.54018575", "0.53882366", "0.537197", "0.5248518", "0.52355874", "0.5233159", "0.5233159", "0.51969665", "0.5193942", "0.5165496", "0.5161052", "0.5156715"...
0.6940307
0
Unbinds the specified message handlers. Expected that the same map will be used, but we only care about keys
function unbindHandlers(handlerMap) { var m; if (noHandlersWarn(handlerMap, 'unbindHandlers')) { return null; } m = d3.map(handlerMap); m.forEach(function (eventId) { delete handlers[eventId]; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unbindKey(key, scope) {\n\t var multipleKeys, keys,\n\t mods = [],\n\t i, j, obj;\n\t\n\t multipleKeys = getKeys(key);\n\t\n\t for (j = 0; j < multipleKeys.length; j++) {\n\t keys = multipleKeys[j].split('+');\n\t\n\t if (keys.length > 1) {\n\t mods = getMods(keys);\n\t...
[ "0.62912697", "0.62912697", "0.6286316", "0.62363064", "0.62260187", "0.6203251", "0.6203251", "0.6203251", "0.62024665", "0.6179876", "0.6176016", "0.61087626", "0.60612476", "0.5958147", "0.59423566", "0.59095746", "0.5885199", "0.5885199", "0.582456", "0.5802585", "0.57465...
0.7365789
0
Binds the veil service as a delegate
function setVeilDelegate(vd) { vs = vd; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DelegateService() {\n this._instances = [];\n }", "function DelegateService() {\n this._instances = [];\n }", "function Delegate(service, context) {\n\tthis.eventlist = {};\n\tthis.service = service;\n\tthis.context = context;\n}", "bindFactoryService() {\n\t\tthis.app.single...
[ "0.5434502", "0.5434502", "0.5416401", "0.52619344", "0.511441", "0.504723", "0.5009292", "0.49631494", "0.49631494", "0.49573508", "0.48811173", "0.48316756", "0.48159283", "0.48136565", "0.48106197", "0.4804449", "0.47759864", "0.47750777", "0.47712883", "0.4760098", "0.474...
0.623111
0
Binds the loading service as a delegate
function setLoadingDelegate(ld) { ls = ld; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_initLoaders () {\n this.options = this.ControllerHelper.request.getArrayLoader({\n loaderFunction: () => this.LogsOptionsService.getOptions(this.serviceName)\n });\n this.currentOptions = this.ControllerHelper.request.getArrayLoader({\n loaderFunction: () => this.LogsOpt...
[ "0.6186569", "0.6078182", "0.5778219", "0.574702", "0.5734844", "0.56854063", "0.5638001", "0.56342065", "0.5632848", "0.55563754", "0.5547879", "0.5543249", "0.5543249", "0.5539723", "0.55048287", "0.55043197", "0.55000734", "0.5465889", "0.5449537", "0.54468", "0.54462487",...
0.7122059
0
Wrap current block into a code block.
function wrapCodeBlock(opts, change) { var value = change.value; var startBlock = value.startBlock, selection = value.selection; // Convert to code block (0, _wrapCodeBlockByKey2.default)(opts, change, startBlock.key); // Move selection back in the block change.collapseToStartOf(chang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mk_block_toSource() {\n\t return \"Markdown.mk_block( \" +\n\t uneval(this.toString()) +\n\t \", \" +\n\t uneval(this.trailing) +\n\t \", \" +\n\t uneval(this.lineNumber) +\n\t \" )\";\n\t}", "function mk_block_toSource() {\n return \"Markdown.mk_b...
[ "0.64552104", "0.642966", "0.642966", "0.642966", "0.642966", "0.642966", "0.642966", "0.642966", "0.642966", "0.642966", "0.6283267", "0.6215619", "0.62096834", "0.6199813", "0.6127562", "0.6126671", "0.6124765", "0.6103966", "0.6103966", "0.6103966", "0.6103966", "0.61039...
0.64925563
0
Function which creates the data folder
function createDataFolder(){ if(!fs.existsSync('./data')){ console.log('Creating data folder'); fs.mkdirSync('./data'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createDataDirectory() {\n const dir = `./${this.config.directory}`;\n\n if (!fs.existsSync(dir)){\n fs.mkdirSync(dir);\n }\n }", "function makeDataDirs() {\n if (!data_dir_exists()) {\n console.log(\"Running for first time!\".green);\n console.log(\"Creating data directo...
[ "0.8376851", "0.8033048", "0.72853446", "0.7051449", "0.7026069", "0.69464207", "0.6745143", "0.6734357", "0.65699744", "0.64698386", "0.6429355", "0.6423541", "0.6421417", "0.639312", "0.63802797", "0.6356085", "0.6352682", "0.6341708", "0.6292621", "0.6260795", "0.6246027",...
0.8569923
0
Business Intelligence Check Code
function BusinessIntelligenceCheck(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_and_report() {\n \n }", "function check() {}", "function _checkAi(){return true;}", "function AutomationPredicate() {}", "function validateCheck() {\n\n setActivityCardRules($scope.cardRules.value());\n setSpecialUsePackages($scope.specialPackages.value());\n ...
[ "0.63171583", "0.60494536", "0.59694344", "0.5844485", "0.5762477", "0.5730468", "0.56265855", "0.55853707", "0.55515283", "0.55344665", "0.5501309", "0.5494725", "0.5462885", "0.5460621", "0.5398924", "0.5396409", "0.5379929", "0.53576297", "0.5349806", "0.5344071", "0.53402...
0.869833
0
Parses a property from a health check into the tokens used for checking
function parseHealthCheckProperty(property) { if (!property) { return ''; } var parsedProperty = property; parsedProperty = parsedProperty.replace(/(\r\n|\n|\r)/gm, " "); parsedProperty = parsedProperty.replace(/\s+/g, ""); parsedProperty = parsedProperty.split(','); for (var index i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseProperty(key, pluralPhrase, resultType) {\n var singularPhrase, indexType, directObjectType;\n\n var parts = splitProperty(key, ' of ');\n\n if (parts.length !== 1 && parts.length !== 2) {\n throw new Error('Invalid property: ' + key);\n }\n\n var match = parts[0].match(/^([^<]*)( <([^>]*)>)?...
[ "0.52982897", "0.5278404", "0.52505004", "0.52505004", "0.52274626", "0.52255553", "0.5216217", "0.5180389", "0.516899", "0.516899", "0.516899", "0.516899", "0.516899", "0.51632816", "0.5126925", "0.5043829", "0.50267047", "0.5006306", "0.49871802", "0.49753445", "0.49564514"...
0.63335955
0
Initializes a Health Check Object from a database result
function createHealthCheckFromDatabaseResult(result) { var type = result.check_type; if (HealthCheckTypes[type]) { var healthCheck = new HealthCheckTypes[type](); healthCheck.loadResult(result); return healthCheck; } else { logger.error('invalid health check: ' + ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HealthCheckResult() {\n _classCallCheck(this, HealthCheckResult);\n\n HealthCheckResult.initialize(this);\n }", "static initialize(obj, status, successful) { \n obj['status'] = status;\n obj['successful'] = successful;\n }", "static initialize(obj, result, msg) { \n obj[...
[ "0.6345685", "0.5632201", "0.55186355", "0.55131054", "0.52944875", "0.52533305", "0.52451414", "0.52451414", "0.5200469", "0.5155257", "0.5149076", "0.51277095", "0.4986579", "0.49743253", "0.49646553", "0.49309644", "0.49165335", "0.49125364", "0.4902849", "0.48890898", "0....
0.71966815
0
Convert an array bytes to an array of littleendian words Characters >255 have their highbyte silently ignored.
function bytesToWords(input) { if (input.length === 0) { return []; } var length8 = input.length * 8; var output = new Uint32Array(getOutputLength(length8)); for (var i = 0; i < length8; i += 8) { output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bytesToWords(input) {\n var i;\n var output = [];\n output[(input.length >> 2) - 1] = undefined;\n\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0;\n }\n\n var length8 = input.length * 8;\n\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n ...
[ "0.7168494", "0.71074295", "0.70816743", "0.70816743", "0.70816743", "0.70816743", "0.6904962", "0.6855157", "0.6807172", "0.6612748", "0.6484283", "0.6415348", "0.6371551", "0.6257897", "0.61460245", "0.6137803", "0.6116412", "0.60348827", "0.6020071", "0.5993795", "0.599165...
0.7200717
0
Accepts a map of Storybook channel event listeners, returns an emit function
function useChannel(eventMap) { var deps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var channel = dist$3.addons.getChannel(); useEffect(function () { Object.entries(eventMap).forEach(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), type = _ref3[0], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useChannel(eventMap) {\n var deps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var channel = _index__WEBPACK_IMPORTED_MODULE_22__[/* addons */ \"a\"].getChannel();\n useEffect(function () {\n Object.entries(eventMap).forEach(function (_ref2) {\n var _ref3 = _slice...
[ "0.69187874", "0.62044364", "0.56004137", "0.5559318", "0.5540505", "0.5385458", "0.5381405", "0.53757757", "0.5359445", "0.53541434", "0.53541434", "0.53541434", "0.53541434", "0.53541434", "0.53541434", "0.53541434", "0.53541434", "0.53490436", "0.53490436", "0.53490436", "...
0.6714951
1
Returns current story context
function useStoryContext() { var _getHooksContextOrThr = getHooksContextOrThrow(), currentContext = _getHooksContextOrThr.currentContext; if (currentContext == null) { throw invalidHooksError(); } return currentContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentStory() {\n if (currentStory === null) {\n currentStory = _.clone(story);\n }\n return currentStory;\n }", "static get() { return currentContext; }", "getChildContext() {\n return {\n // story is passed along context to handle entities rendering\n ...
[ "0.73756015", "0.6722223", "0.65928376", "0.6581929", "0.6581929", "0.6581929", "0.6549078", "0.6549078", "0.6549078", "0.6522543", "0.6461144", "0.6461144", "0.6436821", "0.6398322", "0.625441", "0.60407674", "0.60407674", "0.6037487", "0.60097", "0.5997105", "0.5997105", ...
0.75239617
0
Execute the sort using the input array and a second buffer as work space. Returns one of those two, containing the final result.
function exec(arr, comp) { if (typeof(comp) !== 'function') { comp = function (a, b) { return String(a).localeCompare(b) }; } // Short-circuit when there's nothing to sort. var len = arr.length; if (len <= 1) { return arr } // Rather than dividing input, simply it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exec(arr, comp) {\n\t if (typeof(comp) !== 'function') {\n\t comp = function(a, b) {\n\t return String(a).localeCompare(b);\n\t };\n\t }\n\n\t // Short-circuit when there's nothing to sort.\n\t var len = arr.length;\n\t if (len <= 1) {\n\t return arr;\n\t ...
[ "0.7206004", "0.7206004", "0.7200179", "0.7200179", "0.60550696", "0.60221404", "0.5990433", "0.5969484", "0.593911", "0.5901983", "0.58832926", "0.5866606", "0.5865964", "0.5840389", "0.58122754", "0.5805034", "0.5777863", "0.5774391", "0.57684696", "0.57622784", "0.5755879"...
0.7237316
0
Replace all invalid characters, set $ instead of space (to get a valid label in the charmap) and call the draw function() when things went well
function sanitise(s){ s = s.toLowerCase(); if(!valid.test(s)){ s = s.replace(rep,''); } input.value = s; s = s.replace(/\s/g,'$'); if(s){ draw(s); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hackString(event){\n let inputText = document.querySelector(\"#string\").value.toLowerCase();\n\n for (var i = 0; i < inputText.length; i++) {\n switch(inputText[i]){\n case 'a' :\n inputText = replaceLetter(inputText, inputText[i], i, 4);\n break;\n\n ...
[ "0.5727196", "0.5667104", "0.5636981", "0.5626328", "0.56173533", "0.5607521", "0.5603811", "0.560311", "0.5520013", "0.5470553", "0.5446471", "0.5431453", "0.5382265", "0.5362566", "0.53449196", "0.53179145", "0.5308193", "0.53036743", "0.5293888", "0.52898115", "0.5281833",...
0.6523086
0
Generate 'Start' and 'End' date as time range parameters, also calculate time duration in sec unit. Ex. Now is 20170703T18:00Z. Input: startNumdays,startNumHours,endNumDays,endNumHours = 7,0,2,0 Output: [ startTime: 20170626T18:00Z endTime: 20170701T18:00Z, startDuration: 7606024, endDuration: 2606024]
function getStartEndDate(startNumDays,startNumHours,endNumDays,endNumHours){ hour = 60 * 60; day = hour * 24; startDuration = startNumDays * day + startNumHours * hour; endDuration = endNumDays * day + endNumHours * hour; var date = new Date(); startTimeMilisec = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function durationFromDates(){\n var h1 = date_start.getHours();\n var m1 = date_start.getMinutes();\n var s1 = date_start.getSeconds();\n var ms1 = date_start.getMilliseconds();\n \n var h2 = date_end.getHours();\n var m2 = date_end.getMinutes();\n var s2 = date_end.getSeconds();\n var ms2 = date_end.getM...
[ "0.6697309", "0.6557403", "0.6353248", "0.62687564", "0.6192224", "0.6176533", "0.6161937", "0.60324687", "0.5947842", "0.59428895", "0.5928036", "0.5905291", "0.5898481", "0.5863471", "0.5854784", "0.58503515", "0.5830451", "0.58228284", "0.58051777", "0.5798156", "0.5792340...
0.7926801
0
Make an ajax call to ApplicationController's function to retrieve studio list by given machine/product.
function loadStudioList(machineName,product){ function retrieveStudioList(){ $.ajax({ type:'GET', async: false, url:"get_studio_list", data:{ 'product':product, 'machineName': machineName }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOurProducts() {\n $.ajax({\n type: \"GET\",\n url: \"http://localhost/ger/Product/Get\",\n statusCode: {\n 200: function (response) {\n \n renderProducts(JSON.parse(response));\n }\n }...
[ "0.65024364", "0.6470294", "0.64251405", "0.6380662", "0.6348951", "0.6342542", "0.6332732", "0.6329108", "0.6305386", "0.63041866", "0.62829113", "0.62532306", "0.6215312", "0.6182883", "0.6156907", "0.6127417", "0.6122897", "0.6121031", "0.6083023", "0.6065614", "0.5999364"...
0.7952693
0
jQuery version of fillPreloads
function fillPreloads() { if( !$( '#lf-preload' ).length ) { return; } $( '#lf-preload' ).attr( 'style', 'display: block' ); $.get( wgScript, { title: 'Template:Stdpreloads', action: 'raw', ctype: 'text/plain' } ).done( function( data ) { var $preloadOptionsList, lines = data.split( '\n' ); $preloadOpt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillPreloads() {\n\n\tif( !$( '#lf-preload' ).length ) {\n\t\treturn;\n\t}\n\n\t$( '#lf-preload' ).attr( 'style', 'display: block' );\n\n\t$.get( wgScript, { title: 'Template:Stdpreloads', action: 'raw', ctype: 'text/plain' } ).done( function( data ) {\n\t\tvar\t$preloadOptionsList,\n\t\t\tlines = data.sp...
[ "0.7177933", "0.6355994", "0.63393235", "0.61803037", "0.6173154", "0.59998375", "0.5916574", "0.5901358", "0.58847207", "0.583553", "0.5820765", "0.58055633", "0.57756877", "0.5775241", "0.57751656", "0.5770869", "0.5757243", "0.5746131", "0.57364106", "0.5727756", "0.571786...
0.7167604
1
Title rewrite Rewrites the page's title, used by Template:Title By Sikon jQuery version and new wikia skin fixes by Grunny
function rewriteTitle() { if( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) { return; } if( $('#title-meta').length == 0 ) { return; } var newTitle = $('#title-meta').html(); if( skin == "oasis" ) { $('header.WikiaPageHeader > h1').html('<div id="title-meta" style="disp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n \n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n \n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('...
[ "0.85002714", "0.84978503", "0.7908523", "0.77776355", "0.7322777", "0.7294612", "0.7287954", "0.72610676", "0.72561395", "0.72388154", "0.72139347", "0.7142845", "0.71381974", "0.71357346", "0.69657606", "0.69640297", "0.6931108", "0.69274336", "0.69034874", "0.68952674", "0...
0.8503316
0
remove all existing bodies for rerender
clear() { while (this.tBodies.length) { this.tBodies[0].remove() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n let toRemove = [];\n for (let i = 0; i < this.scene.children.length; i++) {\n let obj = this.scene.children[i];\n if (obj.userData && obj.userData.isBodyElement) {\n toRemove.push(obj);\n }\n }\n for (let i = 0; i < toRemove.le...
[ "0.721015", "0.70879674", "0.7082033", "0.69289154", "0.6718367", "0.66819036", "0.6673392", "0.6652211", "0.66077346", "0.6605237", "0.65266156", "0.65018934", "0.6386984", "0.63336694", "0.628014", "0.6279022", "0.62537855", "0.62389594", "0.6229042", "0.6226397", "0.617082...
0.7247312
0
I'm the function that loads your data. It must return an array of items where each item has a lat and lng property.
async function loadData() { let result = []; let resp = await fetch('./cats.geojson'); let data = await resp.json(); data.features.forEach(f => { result.push({ lat:f.geometry.coordinates[1], lng:f.geometry.coordinates[0] }); }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMapData(data) {\n\n\tfor (var i = 0; i < data.length; i++) {\n loc[i] = data[i].loc;\n locX[i] = data[i].locx;\n locY[i] = data[i].locy;\n }\n\n//console.log(data[1]);\n}", "function loaded(evt) {\n var fileString = evt.target.result;\n lines = fileString.spl...
[ "0.6568166", "0.6341855", "0.62783647", "0.62171286", "0.6182569", "0.61753553", "0.61468226", "0.613401", "0.6118995", "0.6092856", "0.6051468", "0.6047752", "0.6034413", "0.6028245", "0.602569", "0.60085386", "0.6000156", "0.5965042", "0.59507966", "0.59437084", "0.5921415"...
0.68253076
0