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
Extract factory or state names from frontendStats XML obj
function getFrontendGroupFoS(frontendStats, group_name, fos_tag_top, fos_tag_one) { factories=new Array(); if(group_name=="total") { for (var i=0; i<frontendStats.childNodes.length; i++) { var el=frontendStats.childNodes[i]; if ((el.nodeType==1) && (el.nodeName==fos_tag_top)) { for (var j=0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFrontendStats() {\n var request = new XMLHttpRequest();\n request.open(\"GET\", \"frontend_status.xml\",false);\n request.send(null);\n \n var frontendStats=request.responseXML.firstChild;\n return frontendStats;\n}", "function getFrontendGroupStates(frontendStats, group_name) {\n return get...
[ "0.6235806", "0.59479153", "0.57524455", "0.53430724", "0.51938176", "0.51843935", "0.5152079", "0.5014993", "0.49294022", "0.48363614", "0.4807616", "0.47988114", "0.4797342", "0.47867456", "0.4750577", "0.47401866", "0.4734842", "0.4731937", "0.47318882", "0.47311294", "0.4...
0.6398321
0
Extract factory names from frontendStats XML obj
function getFrontendGroupFactories(frontendStats, group_name) { return getFrontendGroupFoS(frontendStats, group_name, "factories", "factory") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFrontendGroupFoS(frontendStats, group_name, fos_tag_top, fos_tag_one) {\n factories=new Array();\n\n if(group_name==\"total\") {\n for (var i=0; i<frontendStats.childNodes.length; i++) {\n var el=frontendStats.childNodes[i];\n if ((el.nodeType==1) && (el.nodeName==fos_tag_top)) {\n ...
[ "0.7073569", "0.568916", "0.5316398", "0.51701933", "0.5125076", "0.4979101", "0.49157277", "0.49090022", "0.48819235", "0.48143658", "0.47769797", "0.47450325", "0.4744532", "0.4708083", "0.47076446", "0.4705605", "0.46985063", "0.4664771", "0.46623817", "0.46573576", "0.465...
0.5881557
1
Extract state names from frontendStats XML obj
function getFrontendGroupStates(frontendStats, group_name) { return getFrontendGroupFoS(frontendStats, group_name, "states", "state") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFrontendStats() {\n var request = new XMLHttpRequest();\n request.open(\"GET\", \"frontend_status.xml\",false);\n request.send(null);\n \n var frontendStats=request.responseXML.firstChild;\n return frontendStats;\n}", "function stateCheck() {\n var stateLog = document.querySelector(\".st...
[ "0.61183923", "0.548643", "0.5437344", "0.53172916", "0.5261587", "0.52326953", "0.5225342", "0.5213918", "0.51918083", "0.51730824", "0.5148306", "0.51475865", "0.508063", "0.5044911", "0.50335014", "0.49828327", "0.49828327", "0.49828327", "0.49828327", "0.49717852", "0.496...
0.6646915
0
We can't just pipe to conn because we don't want to end it when the dest closes. Instead we'll send a special packet to it (which is handled by the writer).
function maybePipeManually() { var chunk while ((chunk = writer.read())) { if (!conn.write(chunk)) { break } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DestHandler(id, conn, options) {\n function endListener() {\n conn.removeListener('drain', drainListener)\n writer.removeListener('readable', readableListener)\n this.emit('end')\n }\n\n function errorListener() {\n writer.end()\n }\n\n function readableListener() {\n maybePipeManually...
[ "0.6747399", "0.6366065", "0.6132076", "0.60781133", "0.5867306", "0.56866825", "0.56463397", "0.5578248", "0.5483205", "0.54222447", "0.53777367", "0.53078556", "0.52873933", "0.5276295", "0.51924103", "0.5154524", "0.5143763", "0.513157", "0.513157", "0.513157", "0.508523",...
0.66738045
1
Helper function that retrieves the value of a :root defined css variable
function getCssVariable(variable) { const root = document.querySelector(":root"); prop = window.getComputedStyle(root).getPropertyValue(variable); return parseInt(prop, 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCssVariable(variable) {\n const root = document.querySelector(\":root\");\n prop = window.getComputedStyle(root).getPropertyValue(variable);\n return parseInt(prop, 10);\n}", "get visibleRoot(){\n\t\treturn this.hasAttribute('visible-root') ? this.getAttribute('visible-root') : 'document';\n\t}", ...
[ "0.67126936", "0.6180836", "0.56029475", "0.54892063", "0.548242", "0.542506", "0.53921854", "0.52809805", "0.5274239", "0.52675265", "0.52675265", "0.52675265", "0.52675265", "0.52675265", "0.52675265", "0.5262931", "0.5255187", "0.5255187", "0.5255187", "0.5255187", "0.5218...
0.6786715
0
Run the carousel, this just ensures the carousel is correctly positioned and is updated with current values of the criticle variables
run() { this.update(); // scroll to starting position; this.slider.scrollLeft = this.startPos; this.scrollOffset = this.startPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run(x) {\n position = $(\"#carousel\").find(\".show\").index();\n if (x == 1)\n ++position;\n else\n --position;\n checker();\n changeCarousal(); //function call that actually changes slides\n }", "function onLoad() {\n\tcarouse...
[ "0.6827491", "0.64177996", "0.63988227", "0.63518876", "0.63161236", "0.62879443", "0.6286236", "0.6255644", "0.62289935", "0.6227588", "0.61732894", "0.61674166", "0.61023587", "0.6078027", "0.599533", "0.59923166", "0.59864455", "0.5983496", "0.5970187", "0.59691954", "0.59...
0.64506286
1
specifies which elements should show time+value label on mouseover
function createInteraction(elements, timeLabel, valueLabel) { for(var i = 0; i < elements.length; i++) { elements[i].mouseover(function () { timeLabel.show(); timeLabel.toFront(); valueLabel.show(); valueLabel.toFront(); }); elements[i].mouseout(function () { timeLabel.hide();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleMouseOver(d, i) { // Add interactivity\n\n // Specify where to put label of text\n svg.append(\"text\")\n .attr(\"id\", \"t\" + d.date.getTime() + \"-\" + d.time + \"-\" + i)\n .attr(\"x\", function() { return x(d.d...
[ "0.67602783", "0.6561459", "0.6444324", "0.63430244", "0.6285271", "0.6187891", "0.61302847", "0.6092303", "0.6046141", "0.6033738", "0.6021492", "0.6016499", "0.6001027", "0.59998924", "0.59863174", "0.5984262", "0.5969189", "0.5968459", "0.5968385", "0.59596187", "0.5933907...
0.6844083
0
serve the init page defaults to bundle.path / index.html
function serveInitPage(req, res, next) { var initPagePath = paths.bundle + "/index.html"; res.setHeader("Content-Type", "text/html; charset=utf-8"); fs.createReadStream(initPagePath).pipe(res); // awesome piping }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n // app.engine(\"html\", require(\"express-art-template\"));\n\n //Use css and javascript file\n app.use(\"/style/\", express.static(\"./style/\"));\n app.use(express.static(__dirname + \"/script\"));\n\n //Launch index.html\n app.get(\"/\", function (request, response) {\n response.sen...
[ "0.71664304", "0.69915646", "0.6854352", "0.67886806", "0.64038", "0.6239351", "0.62116873", "0.61869633", "0.61608404", "0.61544263", "0.61478055", "0.6078525", "0.6054358", "0.6042982", "0.60219693", "0.6011291", "0.6008821", "0.6003158", "0.59773344", "0.5971246", "0.59662...
0.7237825
0
the user went offline stop the intervals and redirect it.
function stopIntervalAndReturn(){ clearInterval(interval1) clearInterval(interval2) window.location = `${window.location.origin}/` }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connection_offline() {\n // Block.\n }", "function intervalHeartbeat() {\n if (document.webkitHidden || document.hidden) {\n clearTimers();\n document.location = \"http://bestpint.net\";\n }\n }", "function offlineDefault(){\n\n console.log( \"System lost co...
[ "0.66339946", "0.65791345", "0.6501447", "0.6191093", "0.61902994", "0.61734384", "0.61427414", "0.61427414", "0.6126003", "0.6116356", "0.60843295", "0.60598683", "0.6015824", "0.601015", "0.5979915", "0.594841", "0.59320843", "0.5931941", "0.59268874", "0.5909768", "0.58897...
0.68823284
0
(1) to ensure there is no order dependency in the tests we are not declaring a new instance of the bank, and we are not specifying an exchange rate and things still work, because they are order independent
testWhatIsTheConversionRateFromEURToUSD() { let tenEuros = new Money(10, 'EUR') this.bank.addExchangeRate('EUR', 'USD', 1.2) assert.deepStrictEqual( this.bank.convert(tenEuros, 'USD'), new Money(12, 'USD') ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setup() {\n this.bank = new Bank()\n this.bank.addExchangeRate('EUR', 'USD', 1.2)\n this.bank.addExchangeRate('USD', 'KRW', 1100)\n }", "charge(payee,atm){\nif(this.balance()>= atm){\n let charge = new transaction((amt * -1), payee)\n this.transactions.push(charge)\n} else {\n console.log(\"insuffic...
[ "0.7634618", "0.6115633", "0.61066765", "0.60913444", "0.6075091", "0.6066135", "0.59750104", "0.5959424", "0.593514", "0.5928915", "0.59028906", "0.5880673", "0.58302087", "0.5792257", "0.57831925", "0.57801443", "0.57646173", "0.57107174", "0.57051665", "0.5671449", "0.5671...
0.7161747
1
whether the given bridge is selected
isSelected(bridge) { return this.selectedBridges.indexOf(bridge) > -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isSelected (magnet) {\n return magnet.selected === vm.socket.id;\n }", "BlackBerry():boolean {\n\t\tthis.playbook = this.agent.match(/PlayBook/i) || false;\n\t\tthis.bb10 = this.agent.match(/BB10/i) || false;\n\t\treturn this.agent.match(/BlackBerry/i)||this.playbook||this.bb10 ? true ...
[ "0.57980233", "0.5675599", "0.56428933", "0.56301653", "0.560711", "0.55560297", "0.55324584", "0.5517773", "0.5509778", "0.5503263", "0.54931253", "0.5486731", "0.5467453", "0.54650974", "0.5343449", "0.5331991", "0.5325485", "0.53252435", "0.53168297", "0.53107595", "0.5283...
0.77411723
0
Walks the siblings of the given child, calling before for siblings before the given child, after for siblings after the given child, and at for the given child.
function walkSiblings(parent, beforeAfterChild, before, at, after, arg) { var fn = before; Dom.walk(parent.firstChild, function (child) { if (child !== beforeAfterChild) { fn(child, arg); } else { fn = after; at(child, arg); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ascendWalkSiblings(ascendNodes, atEnd, carryDown, before, at, after, arg) {\n\t\tvar i;\n\t\tvar args = [];\n\t\ti = ascendNodes.length;\n\t\twhile (i--) {\n\t\t\targ = carryDown(ascendNodes[i], arg) || arg;\n\t\t\targs.push(arg);\n\t\t}\n\t\targs.reverse();\n\t\t// Because with end positions like\n\t\t//...
[ "0.6577276", "0.56324744", "0.5534222", "0.5527762", "0.54181975", "0.5376187", "0.5372828", "0.5361679", "0.53506535", "0.5321718", "0.523162", "0.523162", "0.523162", "0.52205837", "0.51888126", "0.5151321", "0.51172674", "0.5107756", "0.5076318", "0.50758773", "0.5052626",...
0.79251635
0
Pushes down a context to the given range by clearing all overrides between pushDownFrom and range.commonAncestorContainer, and clearing all overrides inside and along the range's boundary (see walkBoundary()), invoking pushDownOverride on all siblings of the range boundary that are not contained in it. Requires range's...
function pushDownContext(liveRange, pushDownFrom, cacOverride, getOverride, clearOverride, clearOverrideRec, pushDownOverride) { // Because range may be mutated during traversal, we must only // refer to it before traversal. var cac = liveRange.commonAncestorContainer; walkBoundary(liveRange, getOverride, pushD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function expandRangeToSurround(range) {\n if (range.canSurroundContents()) return;\n\n var common = range.commonAncestorContainer,\n start_depth = getDepth(common, range.startContainer),\n end_depth = getDepth(common, range.endContainer);\n\n while(!range.canSurroundContents()) {\n...
[ "0.6051264", "0.6051264", "0.6027465", "0.5443479", "0.5443479", "0.53287256", "0.51786095", "0.51003", "0.5092895", "0.50741494", "0.4960444", "0.4929709", "0.4929709", "0.4929709", "0.4929709", "0.4929709", "0.4929709", "0.4929709", "0.49087918", "0.49059308", "0.48865953",...
0.74429667
0
Walks around the boundary of range and invokes the given functions with the nodes it encounters. clearOverride invoked for partially contained nodes. clearOverrideRec invoked for toplevel contained nodes. pushDownOverride invoked for left siblings of ancestors of startContainer[startOffset], and for right siblings of a...
function mutate(liveRange, formatter, rootHasImpliedContext) { if (liveRange.collapsed) { return; } // Because range may be mutated during traversal, we must only // refer to it before traversal. var cac = liveRange.commonAncestorContainer; var topmostOverrideNode = null; var bottommostOverrideNode = n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushDownContext(liveRange, pushDownFrom, cacOverride, getOverride, clearOverride, clearOverrideRec, pushDownOverride) {\n\t\t// Because range may be mutated during traversal, we must only\n\t\t// refer to it before traversal.\n\t\tvar cac = liveRange.commonAncestorContainer;\n\t\twalkBoundary(liveRange, g...
[ "0.59006906", "0.5389457", "0.5375593", "0.51788706", "0.5156016", "0.51498103", "0.51498103", "0.5113078", "0.5058723", "0.5058723", "0.50469446", "0.50449455", "0.5003518", "0.4932608", "0.4916275", "0.49159864", "0.49101058", "0.4869172", "0.4869172", "0.4864486", "0.48340...
0.63322645
0
Get the ids of all open nodes
function getOpenNodes() { value = new Array(); var myLists = document.getElementsByTagName("UL"); for(i=0;i<myLists.length;i++) { if(myLists[i].className == "Xtree" && myLists[i].style.display == "block") value += myLists[i].id + "-"; } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNodes() {\n var allNodes = nodes.get();\n var nodeList = [];\n for(var i = 0; i < allNodes.length; i++) {\n nodeList.push(allNodes[i].id);\n }\n return nodeList;\n}", "* iterNodeIds() {\n yield* this.nodes.keys();\n }", "function getTabIds() {\n Reporter_1.Rep...
[ "0.6919624", "0.6693937", "0.63014734", "0.62243795", "0.60338783", "0.60047334", "0.59232837", "0.59177846", "0.58355933", "0.57811356", "0.5780723", "0.5765891", "0.5747149", "0.572397", "0.5689797", "0.56850684", "0.5672054", "0.5580204", "0.555839", "0.55573213", "0.55356...
0.73128825
0
if user exists, return an array of his messages as string
readMessages(username) { if (this.findUser(username)) { return this.findUser(username).getMessagesAsString(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewMessages(user, messages){\n\tif(user.role === ROLE.ADMIN || user.role === ROLE.MODERATOR){\n\t\treturn messages;\n\t};\n\treturn messages.filter(messages => message.userId === user.id);\n}", "function toUserStr( msg ) {\n return \"<p class='random'>\" + msg.userName + toTimeStr(msg.messageT...
[ "0.6384492", "0.62740725", "0.61891574", "0.6176994", "0.61684287", "0.61356634", "0.61133766", "0.6108674", "0.60862213", "0.60762924", "0.6061004", "0.6036799", "0.6033241", "0.6010995", "0.5992327", "0.59584796", "0.5892337", "0.58341646", "0.5832928", "0.58293504", "0.581...
0.7098691
0
Verifica se um valor consta em uma lista
function naoConsta(valor, lista) { if (lista.indexOf(valor) == -1) { return true } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function css__VALUE__LIST_ques_(cssValueType) /* (cssValueType : cssValueType) -> bool */ {\n return (cssValueType === 3);\n}", "function contains(list, value) {\n\n}", "isElementList(value) {\n return Array.isArray(value) && value.every(val => Element.isElement(val));\n }", "function onList(arr, value...
[ "0.6383653", "0.6242", "0.62095296", "0.6048501", "0.59585613", "0.58280975", "0.5814449", "0.5798499", "0.57635117", "0.5733153", "0.57284284", "0.5717102", "0.57117164", "0.5700504", "0.5697107", "0.56966794", "0.5638677", "0.56329256", "0.56329256", "0.56319946", "0.561116...
0.63154536
1
Writes a system report containing the thumbnails.
function writeReport(system, games, thumbs) { if (!exists('out')) { fs.mkdirSync('out') } games = sort(games) let output = system + ' Missing\n\n' let count = { boxart: 0, snap: 0, title: 0, total: Object.keys(games).length } if (Object.keys(games).length <= 0) { output += 'Error parsing dat files.' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateReport(){\n\t//create reports folder (if it doesn't already exist)\n\tif(!fs.existsSync(\"reports\")){\n\t\tfs.mkdirSync(\"reports\");\n\t}\n\t\n\t//create a file called by timestamp\n\tvar date = new Date();\n\treportfile = \"reports/\"+date.getDate()+\"-\"+date.getMonth()+\"-\"+date.getFullYear(...
[ "0.54711324", "0.54070586", "0.5226068", "0.52180356", "0.5191352", "0.5102661", "0.5087877", "0.50626266", "0.5023288", "0.49990988", "0.49861047", "0.49678996", "0.49320263", "0.48822", "0.4874206", "0.48675162", "0.4856255", "0.4844748", "0.48435646", "0.4830532", "0.48221...
0.6760805
0
Downloads the index of all thumbnails.
function thumbnails(system) { const fileName = `${__dirname}/indexFiles/${system}.index` let content = fs.readFileSync(fileName, 'utf8') let files = content.split('\n').filter(Boolean) // let filePath = path.join(libretroThumbnailsPath, system) // try { // files = recursiveReadDirSync(filePath) // } // cat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayThumbnails() {\n // thumbnails.js started created thumbanils offscreen.\n // We're ready now to deal with them\n\n // Copy stuff to global variables\n // jshint ignore:start\n thumbnails = Thumbnails.container; // The element that holds the thumbnail\n thumbnailList = Thumbnails....
[ "0.5850658", "0.58499736", "0.571789", "0.5588676", "0.5536033", "0.55008507", "0.5485222", "0.5458353", "0.53483117", "0.5329259", "0.53273195", "0.5323819", "0.53106606", "0.52824765", "0.52450085", "0.52391016", "0.5230982", "0.522799", "0.52036667", "0.51989526", "0.51925...
0.59853023
0
type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
function isMomentInput(input) { return ( isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n ...
[ "0.76086086", "0.75747013", "0.75747013", "0.75747013", "0.7517728", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807", "0.74813807",...
0.76153016
0
give focus to comment box when clicking "comment" (HARD CODED!)
function commentOnClick() { document.getElementsByClassName("mainCommentBox")[0].focus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comment_focus() {\n location.href = '#comments';\n}", "function commentfocus(id){\n $(\"#comment_insert_\" + id.split(\"_\")[1]).focus();\n}", "function onCommentClick() {\n if (showComment) {\n setShowComment(false);\n } else {\n setShowComment(true);\n }\n }", "function btn...
[ "0.7839612", "0.7820399", "0.71462244", "0.7133757", "0.7112975", "0.71099836", "0.6908951", "0.6893957", "0.67883885", "0.67565286", "0.67342263", "0.6674031", "0.66171896", "0.66089576", "0.6560968", "0.653805", "0.6536879", "0.6536879", "0.6470759", "0.6416689", "0.6394381...
0.8915392
0
display & expand comment replies
function showReplies() { var displayReplies = this.parentNode.nextElementSibling; if (displayReplies == null) { createNewReplyBox(this); } else { displayReplies.style.display = "block"; this.removeEventListener("click", showReplies); this.addEventListener("click", collapseReplies); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cmtxViewReplies() {\n if (typeof(cmtx_js_settings_comments) != 'undefined') {\n jQuery('.cmtx_reply_counter').each(function() {\n var reply_counter = jQuery(this).text();\n\n if (reply_counter) {\n if (reply_counter == 1) {\n var view_repli...
[ "0.71742254", "0.68315804", "0.68177265", "0.68121773", "0.6705268", "0.6611754", "0.6579678", "0.6488269", "0.6446632", "0.6411832", "0.63849634", "0.63419753", "0.6271456", "0.6239555", "0.62329704", "0.6221339", "0.6177543", "0.61546665", "0.61458135", "0.6141778", "0.6122...
0.6966067
1
Share modal window (username is still hard coded)
function showShareModal() { current_username = document.getElementsByClassName("username")[0].textContent current_modal = document.getElementsByClassName("modal")[0]; document.getElementsByClassName("modal__title")[0].textContent = "Share " + current_username +"'s post"; share_text = document.getElementsB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doModalShare() {\n\tcustomModalBox.htmlBox('yt-ShareContent', '', 'Share'); \n\t$('mb_close_link').addEvent('click', function() {\n\t\t$('yt-ShareContent').injectInside($('yt-ShareContainer'));\n\t\tif($('yt-ShareError')) $('yt-ShareError').remove();\n\t});\n}", "function shareDialog_show(filename)\n{\n...
[ "0.7118439", "0.699358", "0.68293875", "0.67588246", "0.6655491", "0.66492504", "0.64949816", "0.64729404", "0.6461153", "0.64603174", "0.6403154", "0.6403154", "0.6403154", "0.63339436", "0.6263044", "0.6207171", "0.6206328", "0.6192701", "0.6191506", "0.6189671", "0.6185908...
0.7651946
0
Build initial event listeners and rebuild after comment addition.
function buildEventListeners() { //Modal window event listeners. var modalArray = document.getElementsByClassName("username") for (x = 0; x < modalArray.length; x++) { modalArray[x].addEventListener("click", showModal) } //Comments event listeners. var commentsArray = document.getElementsByClas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadEventListeners() {\n // DOM Load event\n document.addEventListener('DOMContentLoaded', getComments);\n // Add comment event\n form.addEventListener('submit', addComment);\n // Remove comment\n commentList.addEventListener('click', removeComment);\n // Clear comment event\n clearBtn.addEventLis...
[ "0.68167514", "0.6650023", "0.6370403", "0.6150969", "0.6090919", "0.6073721", "0.6066814", "0.6038685", "0.59999824", "0.5911072", "0.5866106", "0.5807596", "0.5785899", "0.5772889", "0.57410645", "0.5740774", "0.57392704", "0.57321596", "0.57163435", "0.57105917", "0.569235...
0.6916949
0
create new reply box
function createNewReplyBox(reply_location){ div_top = reply_location.parentElement.parentElement.childNodes[3]; debugger; div1 = document.createElement("div"); div1.className = "replies"; div1.style.display = "block"; div_top.parentNode.insertBefore(div1, div_top.nextSibling); blank1 = document.createTex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleReply(postNum) {\n\tdocument.getElementById('forumInputBoxHorzWrapper').appendChild(document.getElementById('replyButton'));\n\tdocument.getElementById('forumInputBoxHorzWrapper').appendChild(document.getElementById('makeNewPostButton'));\n\tdocument.getElementById('menu').appendChild(document.getEl...
[ "0.70548695", "0.6858571", "0.6813157", "0.67920357", "0.66407424", "0.6511476", "0.6485558", "0.64708394", "0.64438915", "0.64273757", "0.6387523", "0.63148826", "0.6309911", "0.62906945", "0.6191555", "0.6166777", "0.61527914", "0.61500156", "0.61434084", "0.6112658", "0.61...
0.75339246
0
Event to generate slug from field Generatint from title or heading field
function generateSlugFromField () { warningMessage.style.display = "none"; if(!currentRegion.getValue()){ warningMessage.style.display = "block"; warningMessage.innerText = 'Set the country before getting the slug!'; setStatus('error'); api.field.setInva...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleTitleChange () {\n if (!this.isSlugEditable || this.titleTarget.value.trim() === '') {\n return;\n }\n\n this.slugTarget.value = this.parameterize(this.titleTarget.value);\n }", "handleSlugData(){\n let self = this;\n $(this.wrapper).on('keyup', function(e) {\n e.pre...
[ "0.7015253", "0.68304205", "0.65905243", "0.6588661", "0.6451756", "0.63366103", "0.6278056", "0.62173283", "0.62042934", "0.61989135", "0.6175705", "0.609437", "0.60342604", "0.60287917", "0.6023069", "0.5980431", "0.5956676", "0.594671", "0.5946479", "0.59387726", "0.593277...
0.7750152
0
Check if slug is already in use. Resolves to 'true' if there are entries of the given content type that have the same 'slug' value.
function getDuplicates (slug) { if (!slug) { return Promise.resolve(false); } return api.space.getEntries({ 'query': slug }).then(res => { let items = res.items.filter(item => { // If its not the current page, if the current region ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isSlugUsed(slugstring, id) {\n // use global var to save id\n window.curTempId = new Array(0);\n App.Post.store.filter('post', function(post) {\n var slug = post.get('slug');\n if (slugstring == slug) {\n tempId = post.get('id');\n window.curTempId.push(tempId)\n re...
[ "0.6310106", "0.5864384", "0.5273673", "0.5212954", "0.5205967", "0.519906", "0.51670986", "0.51566374", "0.51362765", "0.50500983", "0.5040012", "0.5031193", "0.50268656", "0.50259227", "0.4991385", "0.49762878", "0.4961409", "0.49454358", "0.49344182", "0.49259686", "0.4917...
0.6817328
0
3x3 plane: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function createPlane (sx, sy, nx, ny, options) { sx = sx || 1 sy = sy || 1 nx = nx || 1 ny = ny || 1 var quads = (options && options.quads) ? options.quads : false var positions = [] var uvs = [] var normals = [] var cells = [] for (var iy = 0; iy <= ny; iy++) { for (var ix = 0; ix <= nx; ix++...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCube(x, y, z) {\n return [\n { x: x - 1, y: y, z: z + 1 }, // FRONT TOP LEFT\n { x: x - 1, y: 0, z: z + 1 }, // FRONT BOTTOM LEFT\n { x: x + 1, y: 0, z: z + 1 }, // FRONT BOTTOM RIGHT\n { x: x + 1, y: y, z: z + 1 }, // FRONT TOP RI...
[ "0.6881451", "0.6544397", "0.64463323", "0.6421222", "0.63946897", "0.6379311", "0.636381", "0.63601905", "0.6331802", "0.6252197", "0.6168195", "0.6138073", "0.6126927", "0.6102692", "0.6078641", "0.60672075", "0.6050298", "0.6050298", "0.6027735", "0.60192025", "0.60067505"...
0.6650595
1
Create an assignment object using state. The file type in the object is determined using the getFilenameAndExtension function. Do a POST request with the object ot the backend. Reset state values.
function createAssignment() { if (link === '') { return; } //we don't want to post an assignment with no links. const newAssignment = { fileName: title, link: link, dueDate: dueDate, type: uploadType === 'UPLOAD' ? getFilenameAndExtension(uploadResponse.secure...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async save_assign(assign) {\n //const {location_id, table_id, date_from, first_name, last_name, phone, email} = assign;\n try {\n /* NOTE: assign contains all key-value pairs to pass it as values-object */\n const result = await mAssign.create(assign, {raw: true});\n ...
[ "0.5748495", "0.57368034", "0.56317574", "0.5595822", "0.5512713", "0.5350935", "0.5339928", "0.5314209", "0.51709014", "0.5164208", "0.51593333", "0.51326084", "0.5132156", "0.5111928", "0.5086357", "0.50801754", "0.50578594", "0.50146574", "0.4999788", "0.4965091", "0.49578...
0.64461637
0
2018Aug01: AMAZON.FallbackIntent is only currently available in en locales. This handler will not be triggered except in those locales, so it can be safely deployed for any locale.
canHandle(handlerInput) { console.log('canhandle fallback'); const request = handlerInput.requestEnvelope.request; return request.type === 'IntentRequest' && request.intent.name === 'AMAZON.FallbackIntent'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fallback(agent) {\n\n agent.add(`Sorry, ich weiß gerade nicht was genau du suchst. Könntest du das noch mal anders formulieren?`);\n\n}", "function fallback(agent) {\n agent.add(`I didn't understand`);\n agent.add(`I'm sorry, can you try again?`);\n }", "function fallback(agent) {\n agent.a...
[ "0.61922115", "0.60138685", "0.60138685", "0.6007967", "0.6007967", "0.5948433", "0.58589745", "0.58312386", "0.58312386", "0.58312386", "0.58312386", "0.58312386", "0.5807304", "0.57668537", "0.5677108", "0.5568242", "0.54208004", "0.53414446", "0.533938", "0.5239546", "0.52...
0.626049
0
function to position targets
function positionTarget(newTarget) { positionX = Math.round(Math.random() * (screenWidth - 200)) + "px"; positionY = Math.round(Math.random() * (screenHeight - 200)) + "px"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set targetPosition(value) {}", "get targetPosition() {}", "function updateTargets() {\n\tfor (i=0; i < ducks.length; i++) {\n\t\tducks[i].targetX = Math.random() * (700-duckSize);\n\t\tducks[i].targetY = Math.random() * (550-duckSize);\n\t}\n}", "set targetPosition(pos) {\n this._targetPos = pos;\n thi...
[ "0.7288731", "0.6725497", "0.63291913", "0.6308867", "0.6291619", "0.6183792", "0.61659056", "0.61167824", "0.6112605", "0.60882103", "0.5976416", "0.59737056", "0.5946134", "0.5857849", "0.58456004", "0.583283", "0.58125234", "0.5808705", "0.58004445", "0.5794881", "0.579386...
0.6778371
1
function to end game if time reaches 0;
function countdown() { time = time-1; //decrease time by 1 if (time <= 0) { endGame(); }; //if time = 0, end the game }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame() {\n\n\tclearInterval(interval);\n\tinterval = null;\n\ttime = null;\n}", "function endGame()\n{\n stopTimer();\n $('#timer').text(\"\");\n $('#timer').css('width','0%');\n backgroundMusic.pause();\n disableUnflipped();\n gameOverPopup();\n return;\n}", "function endOfGame() {\n clear...
[ "0.76247907", "0.75478506", "0.7535146", "0.7467254", "0.74165225", "0.74152756", "0.7363172", "0.7351395", "0.73487604", "0.7343286", "0.73197836", "0.7287993", "0.7277055", "0.7256031", "0.7247659", "0.7245195", "0.72296447", "0.7212259", "0.7211907", "0.7153521", "0.715178...
0.81153923
0
function to make cursor invisible
function cursorInvisible() { cursorTime = cursorTime-1; //decrease time by 1 if(cursorTime == 0) { $('body').css("cursor", "none"); clearInterval(cursor); }; //if time = 0, cursor disappears }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noCursor() {\n _displaycontrol &= ~LCD_CURSORON;\n command(LCD_DISPLAYCONTROL | _displaycontrol);\n}", "function hide_cursor() {\n // canvas objects that show stim/probes\n var canvas = document.getElementById('task_box');\n canvas.style.cursor = 'none';\n }", "function Start()\n{\n Cur...
[ "0.77875066", "0.7757545", "0.7694327", "0.7572779", "0.7411746", "0.7322841", "0.7196951", "0.7112516", "0.70459896", "0.697542", "0.69465685", "0.69458675", "0.6900308", "0.68732476", "0.67550707", "0.67517096", "0.67381495", "0.67271894", "0.6717398", "0.6698888", "0.66495...
0.7878416
0
Function to animate the content of each page on enter
function contentAnimation() { var tl = gsap.timeline(); tl.from('.is-animated', { duration: 1, translateY: 60, opacity: 0, stagger: 0.4 }); tl.from('.fadein', { duration: 0.5, opacity: 0.9 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function page_animations() {\n\n var headerTl = new TimelineMax();\n\n headerTl.to('header', 0.25 ,{ opacity: 1})\n .to('header .logo h2', 0.25 ,{ opacity: 1})\n .staggerTo($('.color-box'), 0.3 ,{ opacity: 1}, 0.15, \"header\")\n .staggerTo($('#raw, #build'), 0.3 ,{ opacity: 0.3}, 0.15)\n .staggerTo($('.prev...
[ "0.6416028", "0.62999487", "0.6254916", "0.62194204", "0.61915314", "0.61150086", "0.607064", "0.6039399", "0.60079974", "0.60054344", "0.59196866", "0.5912925", "0.58949995", "0.588776", "0.58226997", "0.58041817", "0.5799932", "0.5797235", "0.57947403", "0.5780636", "0.5775...
0.6747342
0
Affiche les information de la station
displayInfoStation(station){ station.nameId.innerHTML = station.name.toLowerCase(); station.addressId.innerHTML = station.address.charAt(0).toUpperCase() + station.address.substring(1).toLowerCase(); if (station.status == "OPEN"){ station.statusId.innerHTML = "Ouverte"; } else if(station.statu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewAllStations(){\n console.log(\"Viewing All stations \\n\");\n connection.query(\"SELECT * FROM station\",function(err, res){\n if (err) throw err;\n console.table(res);\n lastQuestion()\n });\n}", "function load_station_info (station) {\n\t\tvar station_info_url = Urls....
[ "0.7007799", "0.6796596", "0.6722204", "0.65423816", "0.6512252", "0.65090483", "0.645776", "0.6328039", "0.6257115", "0.6179224", "0.61306375", "0.6115331", "0.609914", "0.60850614", "0.6076726", "0.6061717", "0.60464233", "0.6035487", "0.60173786", "0.5983861", "0.597811", ...
0.6920322
1
const para = document.getElementById('para_1'); para.addEventListener('click', handlerFn);
function handlerFn(evt){ para.textContent = "custom para with id 1"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requirement2() {\n var paras = document.getElementsByTagName(\"p\");\n\n for (let i = 0; i < paras.length; ++i) {\n paras[i].onclick = clickOnParagraph;\n }\n}", "function idClickListener(ele, func) {\r\n doc.i(ele).addEventListener('click', func);\r\n}", "function addEventHandler(han...
[ "0.7483094", "0.69506824", "0.6626791", "0.65958786", "0.6590507", "0.6590507", "0.6590507", "0.65552914", "0.65522337", "0.65500623", "0.65213156", "0.6431948", "0.6431815", "0.64235854", "0.630273", "0.6298999", "0.62953484", "0.62678784", "0.61743104", "0.6156941", "0.6151...
0.72694284
1
Saves a commit message SHA into an alias for later use.
function save (alias, sha) { alias = alias.toString().trim(); if (!sha) { missingInputError(MODE.SAVE); return; } else if (!alias.match(/^[a-zA-Z0-9-_]+$/)) { console.log(chalk.red.bold('Aliases must be alphanumeric.')); return; } jsonfile.readFile(STORAGE, function (error, aliases) { if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SaveHash() { }", "function saveCommitMessageDraft(basePath, commitMessage) {\n fs.writeFileSync(`${basePath}.ngDevSave`, commitMessage);\n}", "function writeSHA( currentSHA ) {\n\tconsole.log( \"Writing SHA\" );\n\tvar fileName = LOCAL_FOLDER + \"MostRecentSha.dontDeleteMe\"\n\t\n\tvar fs = require...
[ "0.57267", "0.54716974", "0.5452459", "0.532152", "0.5224708", "0.5160435", "0.5114031", "0.5055747", "0.5045608", "0.50065506", "0.49710518", "0.49501237", "0.49203292", "0.48992088", "0.48634496", "0.48546213", "0.48453856", "0.4827438", "0.47977394", "0.47632474", "0.47632...
0.7601442
0
Lists the aliases the user has created.
function list () { jsonfile.readFile(STORAGE, function (error, aliases) { if (error) { // TODO: Handle this error. } let hasAlias = false; for (let prop in aliases) { if (aliases.hasOwnProperty(prop) && prop !== 'cb6b7b52-ad1c-4a4e-a66a-fbc3a0c3b503') { hasAlias = true; c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createAlias(player, aliases) {\n const aliasFrequencyDays = this.getSettingValue('vip_alias_limit_days');\n const aliasLimit =\n player.isAdministrator() ? this.getSettingValue('vip_alias_limit_admin')\n : this.getSettingValue('vip_alias_limit_play...
[ "0.63601464", "0.62518823", "0.624577", "0.6044926", "0.5983978", "0.5798733", "0.55913454", "0.5418235", "0.5350291", "0.5300806", "0.52253175", "0.518694", "0.50573695", "0.5044244", "0.499057", "0.49691215", "0.49571413", "0.49127364", "0.49121788", "0.49005914", "0.490059...
0.6598829
0
Deletes the alias specified.
function deleteAlias (alias) { if (typeof alias === 'boolean' || alias.toString().trim() === '') { missingInputError(MODE.DELETE); return; } jsonfile.readFile(STORAGE, function (error, aliases) { if (error) { // TODO: Handle this error. } let aliasToDelete = alias; if (aliases[a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async deleteAlias(player, alias) {\n const aliasFrequencyDays = this.getSettingValue('vip_alias_limit_days');\n\n // Non-administrators are subject to limits in frequency for creating and removing aliases,\n // which means that aliases need a certain age before they can be deleted.\n co...
[ "0.72646344", "0.65353715", "0.64951086", "0.6145785", "0.5842291", "0.5626703", "0.5503798", "0.5476403", "0.5350978", "0.53434527", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133", "0.5330133",...
0.76061803
0
Does the git command to search for commit in branches.
function doGitCommand (commit, targetBranch) { childProcess.exec('git branch -r --contains ' + commit.sha, function (error, stdout, stderr) { if (error) { if (stderr.indexOf('malformed')) { if (commit.isAlias) { console.log(chalk.bold.red('The commit ' + chalk.bold.magenta(commit.alias) + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find (targetCommit, targetBranch) {\n if (!targetCommit) {\n missingInputError(MODE.FIND);\n return;\n }\n\n checkForAlias(targetCommit)\n .then(function (commit) {\n doGitCommand(commit, targetBranch);\n });\n}", "async branch({ branchName, commitHash }) {\r\n if (!branchName...
[ "0.6716078", "0.6240415", "0.61776555", "0.5993223", "0.5917278", "0.5885247", "0.577603", "0.57208604", "0.57130283", "0.5605145", "0.5544425", "0.55312407", "0.5489133", "0.54882914", "0.54761225", "0.54740185", "0.54688597", "0.54235697", "0.54183275", "0.5395847", "0.5364...
0.71175873
0
! dc.leaflet 0.5.2 Copyright 20142015 Boyan Yurukov and the dc.leaflet Developers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software d...
function kN(t,e,n,i){var r={version:"0.5.2",leafletBase:function(t){var e,i=new t;i.margins({left:0,top:0,right:0,bottom:0});var r=!1,o=!1,a=!1,s=!1,u=null,l=null,c={},h=function(t){var e=t.selectAll("div.dc-leaflet");return e=e.data([0]).enter().append("div").attr("class","dc-leaflet").style("width",i.effectiveWidth()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.map = this.createMap(this.state.mapid);\n this.featuregroup = L.featureGroup();\n this.featuregroup.addTo(this.map);\n }", "function createMap(){\n //create the map with a particular center and zoom\n var map = L.map('map', {\n center: [20.5, 79],\n zoom...
[ "0.67429346", "0.6647015", "0.6632876", "0.6595327", "0.6586246", "0.65632695", "0.65586424", "0.65506405", "0.65168446", "0.65161216", "0.6477286", "0.6455164", "0.64251053", "0.6418655", "0.64069664", "0.64028645", "0.6391057", "0.63808507", "0.63482344", "0.6322952", "0.63...
0.76180494
0
Call backend api storeExperimentResult to connect with FireBase and update Users Collection with experiment data.
function saveExperimentData(experimentData) { uploadSelectionResult(participantId, experimentId, experimentData); selectionTaskCompletionHandler(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_results(e_val, a_val, c_val, n_val, o_val) {\n let user_results = {\n e_val: e_val,\n a_val: a_val,\n c_val: c_val,\n n_val: n_val,\n o_val: o_val\n };\n //Get working with DB\n const url = \"/test\";\n var xhr = new XMLHttpRequest();\n xhr.open(\"PUT\", url, true);\n xhr.setReq...
[ "0.5463197", "0.53970104", "0.5338429", "0.53017586", "0.5300701", "0.5190826", "0.50308454", "0.5001014", "0.49990606", "0.49935025", "0.49444237", "0.4939766", "0.49345598", "0.48461235", "0.48375884", "0.4824329", "0.48236", "0.48111317", "0.48092338", "0.4805147", "0.4774...
0.54539835
1
Quantize This is the Quantize class. It takes an `Object` of settings as an argument. There are simple presets you can pass in defined later. If no settings are supplied, it defaults to a 5bit modified median cut. Possible settings:
function Quantize (settings) { this.settings = settings || { // `histogramPrecision` is a 3-element array defining the precision (in bits) // of each channel (R, G, and B). histogramPrecision: [5, 5, 5], // `fractByPopulace` is used with `Quantize.CutType.Leptonica` to determine // when to swich method...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "median() {}", "function shellSetQ (args)\n{\n if(args.length > 0)\n {\n krnSetQuantum(args[0]);\n }\n else\n {\n _StdIn.putText(\"Please supply a quanta.\");\n }\n}", "set quality(value) {}", "function marketCapFilter(dataFilters) {\n let filters = {};\n let all = dataFi...
[ "0.524838", "0.49689013", "0.47304145", "0.46386755", "0.4560368", "0.45453784", "0.45282245", "0.4481673", "0.44723618", "0.4431687", "0.43703532", "0.43378767", "0.43253", "0.43216443", "0.4319298", "0.43165946", "0.4309915", "0.43062502", "0.43016776", "0.43008837", "0.429...
0.79207724
0
Histogram This is the Histogram class used by Quantize. It takes the Quantize instance as its argument to pull its settings.
function Histogram(quantize) { this.precision = quantize.settings.histogramPrecision; this.shrink = [ 8 - this.precision[0], 8 - this.precision[1], 8 - this.precision[2] ]; this.grow = [ 1 << this.shrink[0], 1 << this.shrink[1], 1 << this.shrink[2] ]; this.mask = [ (1 << this.precision...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Histogram() {\n this.datasets = [];\n this.bins(10);\n this.barColor = '#555555';\n this.barWidth = 3;\n}", "constructor() {\n super();\n this.state = {\n histogram: null\n }\n }", "function Quantize (settings) {\n\t\tthis.settings = settings || {\n\t\t\t// `hist...
[ "0.7298804", "0.640661", "0.6295423", "0.6260179", "0.6244761", "0.59779865", "0.5788853", "0.5632692", "0.55965793", "0.559254", "0.559254", "0.54980963", "0.54885894", "0.5476395", "0.5472168", "0.54361814", "0.53972983", "0.5339728", "0.53357244", "0.52814066", "0.52803075...
0.78964233
0
get first data from source
function first(source) { source = Array.isArray(source) ? memset(source) : source; return dataset(source, { get: function (expressions) { expressions = expressions || []; let exp = this.dataset.getExpressions().concat(expressions); let anyFirst = exp.find(a => core_1....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "first(returnNode) {\n let node = this[this._start][this._next];\n return returnNode ? node : node.data;\n }", "get first() {\n return this.where.getFirst();\n }", "function extractFirstResult (neoData) {\n return extractFirstRow(row => row[0], {})(neoData);\n}", "static first() {\...
[ "0.64021003", "0.6308852", "0.6294935", "0.6260431", "0.6219726", "0.6201846", "0.60370713", "0.60362995", "0.5988869", "0.5986507", "0.59652543", "0.5956623", "0.58608156", "0.5828208", "0.58108056", "0.5777724", "0.57429034", "0.5731803", "0.57245004", "0.57217175", "0.5712...
0.7609193
0
end funcionarios list adendo a lista de dependente / Formatting function for row details modify as you need
function formatDependente ( d ) { // `d` is the original data object for the row return '<table cellpadding="5" cellspacing="0" border="0" class="table table-hover table-condensed">'+ '<tr>'+ '<td style="width:100px">Turno:</td>'+ '<td>'+d.turno+'</td>'+ '</t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function golist() {\n /*Ajustar la petición para mostrar la tabla de resultados procesos*/\n var columnasdata = [{ \"data\": \"AA\" },\n { \"data\": \"BB\" },\n { \"data\": \"CC\" },\n { \"data\": \"ACCIONES\" }];\n\n /*Consultar procesos y mostrar*/\n autogenDatatablesminHeaders(c...
[ "0.6299336", "0.62024367", "0.61163974", "0.60820496", "0.6033428", "0.60056645", "0.59914917", "0.5975979", "0.5972083", "0.59468716", "0.594632", "0.5935979", "0.5927511", "0.59141034", "0.59069264", "0.5895902", "0.588928", "0.5844355", "0.58357894", "0.58168477", "0.58087...
0.6331304
0
getVoices() method of the SpeechSynthesis interface returns a list of SpeechSynthesisVoice objects representing all the available voices on the current device
function getVoices() { // speechSynthesisInstance.getVoices() - returns A list (array) of SpeechSynthesisVoice objects. voices = speechSynthesis.getVoices(); // looping through each Voices Objects voices.forEach(voice => { // assigning each object into Option element to display it const option = docume...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GetVoices(){\n var voices = speechSynthesis.getVoices();\n for(var i = 0; i < voices.length; i++ ) {\n console.log(\"Voice \" + i.toString() + ' ' + voices[i].name + ' ' + voices[i].uri);\n }\n \n}", "function loadVoices()\n{\n\tvar synthesizer = window.speechSynthesis;\n\tsynthesizer.onvoi...
[ "0.85186255", "0.78170043", "0.7442936", "0.70452845", "0.69232833", "0.6795732", "0.6567172", "0.648301", "0.6467179", "0.645725", "0.6441283", "0.6438528", "0.6370904", "0.6339372", "0.62647706", "0.62024075", "0.62008655", "0.6168573", "0.6153256", "0.614439", "0.61211556"...
0.78589237
1
Hard mode sort function Needs MAJOR refactoring including a better way of handling the event listener
function sortSelector(event) { event.preventDefault(); if ($(".select-field").val() == 1) { var sortOrder = "asc"; var functionArray = currentSongResults[0]; var sortedResultsObj = _.orderBy(functionArray, ["title"], [sortOrder]); var track = sortedResultsObj.map(createListing); no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sort() {}", "function handleSort(e) {\n if (stateObject.isRunning) return;\n stateObject.isRunning = true;\n sortButton.classList.add(`disabled`);\n generateNewArray.classList.add(`disabled`);\n changeSize.classList.add(`disabled`);\n label.classList.add(`disabled`);\n ANIMATION_SPEED_MS = Math.f...
[ "0.7200537", "0.707435", "0.70429057", "0.7035468", "0.69288695", "0.6927927", "0.6927927", "0.6905713", "0.68973535", "0.6836831", "0.6796807", "0.6792101", "0.67478126", "0.67030406", "0.6663685", "0.6661282", "0.6650347", "0.6643466", "0.6623488", "0.6595381", "0.6582592",...
0.71606725
1
Funcion para verificar los checks points
function checksPoints(){ //llegada al checkpoint 1 por estrellas if ((score==40) && (checkpoints[0] == false)) { //Circulo Checks points checkp1 = this.physics.add.group(); var ch = checkp1.create(160,-50,"check1"); ch.setVelocity(0,120); //Annadir checkPoint al arreglo de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validatePoints() {}", "function checkOK(points) {\n for (let p of points)\n p.ok = isOnBoard(p) && canMoveTo(p);\n }", "function checkingFunction() {\n for(var i=endpoints.length; i>0; i--) {\n // Select the one furthest from the center of our circle and remove it\n ...
[ "0.7274894", "0.68858993", "0.6388103", "0.62739533", "0.6270796", "0.6268115", "0.62646383", "0.6232901", "0.6201021", "0.6143938", "0.6099958", "0.6098387", "0.6073828", "0.60352355", "0.60346013", "0.5999201", "0.59819216", "0.5958981", "0.5947031", "0.59392905", "0.593536...
0.68929833
1
End connections in connection pool.
function endConnections(){ if(pool == undefined){ log4js.shutdown(function(){}); return; } pool.end(function(err){ if(err){ logger.error(error.message); } log4js.shutdown(function(){}); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disconnect() {\n if (this.pool != null) {\n const pool = this.pool;\n this.pool = null;\n this.qi = null;\n pool.end();\n }\n }", "endConnection() {\n this.connection.end()\n }", "close() {\n let connection;\n let len = this._connections.length;\n this._close...
[ "0.7391175", "0.72367966", "0.71223396", "0.71223396", "0.71223396", "0.70192385", "0.69600296", "0.6945388", "0.6923353", "0.6915718", "0.6869171", "0.68415314", "0.6812657", "0.67923474", "0.67130095", "0.669472", "0.66875356", "0.66640586", "0.6610289", "0.6595685", "0.655...
0.8244945
0
get note from id
function getNote(id) { for (let i = 0; i < notes.length; i++) { if (i === (id - 1)) { return notes[i]; }; } return `There is no note with id=${id} on the list.`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNote(id) {\n\tfor (let i = 0; i < notes.length; i++) {\n\t\tif (notes[i].id === id) {\n\t\t\treturn notes[i];\n\t\t} else {\n\t\t\treturn 'throw it!';\n\t\t}\n\t}\n}", "function getNote(id) {\n const match = notes.find(note => typeof id === 'number' && note.id === id);\n return match ? match : ...
[ "0.81395006", "0.78270197", "0.7818152", "0.77981603", "0.76211476", "0.7512506", "0.73470527", "0.7267262", "0.7265506", "0.7149638", "0.7099408", "0.70464456", "0.70300096", "0.700731", "0.69702405", "0.6946817", "0.6942465", "0.69195324", "0.68862736", "0.6823482", "0.6811...
0.8251742
0
Validate Sign Up form and submit it
function validateSignUpForm(){ console.log("VALIDATE SIGN UP FORM") console.log("name: " + validName); console.log("email: " + validEmail); console.log("password: " + validPassword); console.log("c password:" + validConfirmPassword); if(validName && validEmail && validPassword && validConfirmPassword){ document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submit() {\n\t\t\t// make sure the form is submitted,\n\t\t\t$('#signUp').on('submit', function() {\n\t\t\t\t// and head to the dashboard state\n\t\t\t\t$state.go('dashboard');\n\t\t\t});\n\t\t}", "function submitForm() {\n if (theForm.usernameValid && theForm.passwordValid) {\n document.getEl...
[ "0.7292678", "0.7222884", "0.7212317", "0.7136476", "0.7122792", "0.70794266", "0.7076309", "0.6967207", "0.6945602", "0.6945602", "0.6921576", "0.69194067", "0.6896086", "0.6885956", "0.6881285", "0.6859439", "0.68558955", "0.68558013", "0.6855071", "0.68523026", "0.68318915...
0.7679611
0
initial wait For Text
function WaitForText(){ events.EventEmitter.call(this); this.startTimeInMilliseconds = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function waitMsg (text) {\n WaitMsg.textContent = text;\n}", "function updateText() {\r\n\r\n timeoutContainer.innerHTML = \"Text updated after waiting 2 seconds\";\r\n }", "async function waitUserText(vm, text){\n next = false;\n pushWinterText(vm, text);\n waitingSelectInput = false; // r...
[ "0.7387904", "0.6701738", "0.6675355", "0.65911037", "0.6402742", "0.6371374", "0.62996477", "0.6290985", "0.6282138", "0.62493294", "0.6197797", "0.6169048", "0.6168971", "0.61455905", "0.6099448", "0.6071287", "0.6038502", "0.60240376", "0.6013352", "0.60068625", "0.598642"...
0.7434355
0
set marker to null or true to make it visible
function setMarker(data) { // body... if (data.boolTest === true) { data.visible(true); data.marker.setMap(map); } else { data.visible(false); data.marker.setMap(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function togMark(i){\n if (myMarkers[i].getVisible()){\n myMarkers[i].setVisible(false);\n } else {\n myMarkers[i].setVisible(true);\n }\n}", "show(map) {\n this.marker_obj.setMap(map ? map.map_obj : null);\n }", "function showMarker() {\n for (var i = 0; i < self.markerArray().len...
[ "0.7489738", "0.73837835", "0.7285388", "0.7209235", "0.71177393", "0.7098469", "0.7053031", "0.7025499", "0.69580394", "0.68855435", "0.68816066", "0.68808377", "0.68606836", "0.68570554", "0.6852654", "0.6841801", "0.6830206", "0.6830206", "0.6820104", "0.6816624", "0.68143...
0.7392721
1
I am a writable stream that accumulates content across writes and emits a "content" event once the entirety of the content has been aggregated. The content is emitted as a UTF8 encoded value (for now).
function ContentStream(options) { options = options || {}; // Whether or not the stream.write(anyObj) is a valid operation. // If set you can write arbitrary data instead of only Buffer / String data. options.objectMode = (options.objectMode || false); // Call the super constructor. stream.Writable.call(this, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_flush() {\n this.push(this.contents);\n this.emit('end')\n }", "function createContentHashStream() {\n return through2.obj((record, enc, next) => {\n record.HASH = hash(record);\n next(null, record);\n });\n}", "collect () {\n const buf = []\n buf.dataLength = 0\n this.on('da...
[ "0.5749257", "0.5638501", "0.5527609", "0.55190873", "0.5496962", "0.5487966", "0.5384008", "0.5375048", "0.53422326", "0.53047585", "0.5218972", "0.5110615", "0.50881314", "0.5075975", "0.50700927", "0.5047659", "0.50308144", "0.5016065", "0.4988612", "0.4961615", "0.4954742...
0.6475773
0
1 The reference of outer environment Every execution contex has a reference to its outer environment. The outer environment of function b is the global context. The lexical environment function b is sitting at the same level as where 'var myVar = 1' JavaScript cares about the lexical environment when it comes to the ou...
function a() { var myVar = 2; function b() { console.log(myVar); } b(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo(){\n\t//child Scope\n\tvar b = 2;\n\tvar a = 2;\n\ta = 3;\n\tconsole.log(a);\n\t//console.log(window.a);\n}", "function a() {\n console.log(myVar);\n\n function b() {\n let myVar = 2;\n }\n\n b();\n}", "function a() {\n\n function b() {\n console.log(myVar);\n }\n\n let myVar = 2;\n ...
[ "0.71933436", "0.67516", "0.642", "0.637266", "0.6366092", "0.6328642", "0.631594", "0.6309216", "0.6294662", "0.6248383", "0.62057734", "0.61936325", "0.61936325", "0.6177197", "0.6168728", "0.6163313", "0.6158402", "0.6140918", "0.61154085", "0.61028224", "0.60768795", "0...
0.6850019
1
response to player hitting 'entergamebutton' requests game for a given game name from our API server note that this is an async functions. This means that within this function, we can use the keyword 'await'. this allows us to minimize the number of callbacks we have to use
async function createOrJoinGame() { // get deck name from input const gameName = document.getElementById('deckNameInput').value; // make API call to server to either continue an existing game or create a new game const gameData = await fetch(`/game/${gameName}/getOrCreate`); // get JSON body of AP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _handleRequestGames(data) {\r\n\tconsole.log('REQUESTED GAMES:', data.toString().trim());\r\n\tstate = SELECT_GAME;\r\n\r\n\tauthServer.write('N\\t' + game + '\\n');\r\n}", "async getGame() {\n return this.__request(`${this.api_url}/game/start`, \"POST\");\n }", "function gameRequest() {\n ...
[ "0.67915857", "0.6558355", "0.6479034", "0.6478749", "0.64666516", "0.6451599", "0.62229997", "0.6197576", "0.61954975", "0.6147343", "0.6146663", "0.6119967", "0.60889214", "0.6053527", "0.60317945", "0.60169053", "0.60025764", "0.5943873", "0.5932308", "0.5928779", "0.59246...
0.70724106
0
response to player clicking 'hitbutton' gets card from API server, determines if player has lost based on newly drawn card
async function hit() { // draw card from API const playerPile = await fetch(`/game/${game.deckId}/draw/player`); // update player pile with the pile retrieved from the API // note that playerPile.json() is an async function, so we have to await it before asking for .piles.player game.playerPile = aw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickResponse() {\n const card = this;\n // check for game start on first click\n if (!gameStarted) {\n gameStarted = true;\n stopWatch();\n }\n setTimeout(function() {\n showCard(card);\n}, 200);\n}", "hit() {\n if (!this.#gameStarted) {\n throw new Error(\"startGame should be ...
[ "0.7257527", "0.6964971", "0.69413316", "0.6859074", "0.68418604", "0.6834613", "0.67710495", "0.6754083", "0.6716192", "0.6653685", "0.664518", "0.6590819", "0.6579171", "0.65596825", "0.65591264", "0.6547752", "0.65399706", "0.6519404", "0.64875567", "0.64862823", "0.645770...
0.73890066
0
For example, the string aabcccccaaa would become a2b1c5a3. If the "compressed" string would not become smaller than the original string, your method should return the original string. You can assume the string has only upper and lowercase letters.
function compressString(str){ let currentLetterCount = 1; let currentLetter = str[0]; let compressedString = ""; for(let i = 1; i < str.length; i++){ if(currentLetter !== str[i]){ compressedString += (currentLetter + currentLetterCount); currentLetter = str[i]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringCompression(string) {\r\n let count = 0;\r\n let current = string[0];\r\n let compressedStr = \"\";\r\n for (let i = 0; i <= string.length; i++) {\r\n if (string[i] !== current){\r\n compressedStr = compressedStr + current + count;\r\n current = string[i];\r\n coun...
[ "0.79232055", "0.78104717", "0.77599007", "0.7717851", "0.75919145", "0.7590593", "0.74366665", "0.73409736", "0.7323272", "0.72954243", "0.7282539", "0.7089611", "0.6950721", "0.6947215", "0.68443185", "0.6814361", "0.67384374", "0.67083085", "0.66563463", "0.6589438", "0.63...
0.79406506
0
showCreateAccountDialog shows the create account dialog
function showCreateAccountDialog() { var createDialog = Alloy.Dialog.showCustomDialog({ controllerPath : 'checkout/confirmation/createAccount', continueEvent : 'createAccount:dismiss', continueFunction : function() { logger.info('createAccount dismiss called'); $.stop...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAccount () {\n var bip39 = require('bip39')\n var data = { passphrase: bip39.generateMnemonic() }\n\n function next () {\n if (!$scope.createAccountDialog.data.showRepassphrase) {\n $scope.createAccountDialog.data.repassphrase = $scope.createAccountDialog.data.passphra...
[ "0.7205799", "0.7107545", "0.68560624", "0.67713976", "0.6747931", "0.67024875", "0.66428167", "0.6517148", "0.6506841", "0.63818425", "0.6265005", "0.62067986", "0.6172559", "0.61118716", "0.60673153", "0.6059122", "0.60034144", "0.59856355", "0.5919964", "0.58911157", "0.57...
0.7294374
0
removeAllDrawers remove all the drawers
function removeAllDrawers() { if ($.size_chart_drawer) { $.appIndex.remove($.size_chart_drawer); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearDrawings() {\n if ($(\"#drawing_pen\").hasClass(\"pen_image_selected\")) {\n handleOpenPen();\n }\n if ($(\"#drawing_eraser\").hasClass(\"eraser_image_selected\"))\n {\n handleOpenEraser();\n }\n p = 0;\n $(\".pick_color\").removeClass(\"hover_class\");\n\n for (var ...
[ "0.6720116", "0.66074795", "0.6508593", "0.6492167", "0.63872623", "0.6383126", "0.6289682", "0.62020665", "0.61534697", "0.6120082", "0.611107", "0.608772", "0.6085699", "0.6085216", "0.6081408", "0.60782546", "0.6065712", "0.6058741", "0.6041655", "0.60293615", "0.601722", ...
0.8259488
0
removePaymentDeviceDialogInterval remove the interval to check the payment device
function removePaymentDeviceDialogInterval() { if (paymentDeviceDialogInterval) { logger.info('removing payment device dialog interval'); clearInterval(paymentDeviceDialogInterval); paymentDeviceDialogInterval = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPaymentDeviceDialogInterval() {\n if (!addPaymentDeviceTimer && paymentDeviceDialogInterval) {\n return;\n }\n if (Alloy.CFG.devices.payment_terminal_module != 'webDevice' && Alloy.CFG.devices.check_device_dialog_interval > 0) {\n logger.info('adding payment device dialog interva...
[ "0.73397803", "0.63095486", "0.6234961", "0.5281804", "0.5191434", "0.51403147", "0.5129054", "0.4982045", "0.49503133", "0.4894935", "0.48529977", "0.4837922", "0.4834782", "0.48306426", "0.4829269", "0.4829134", "0.4827153", "0.48194346", "0.4802162", "0.47938356", "0.47916...
0.8855411
0
addPaymentDeviceDialogInterval add the interval to check the payment device
function addPaymentDeviceDialogInterval() { if (!addPaymentDeviceTimer && paymentDeviceDialogInterval) { return; } if (Alloy.CFG.devices.payment_terminal_module != 'webDevice' && Alloy.CFG.devices.check_device_dialog_interval > 0) { logger.info('adding payment device dialog interval'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removePaymentDeviceDialogInterval() {\n if (paymentDeviceDialogInterval) {\n logger.info('removing payment device dialog interval');\n clearInterval(paymentDeviceDialogInterval);\n paymentDeviceDialogInterval = null;\n }\n}", "function setMoneyInterval(seconds) {\n\t\t//add a ...
[ "0.6880739", "0.4862479", "0.47620007", "0.4712109", "0.4649711", "0.45921093", "0.4535826", "0.44718847", "0.44543314", "0.44412088", "0.43655914", "0.43539208", "0.43493307", "0.42866653", "0.42851958", "0.42738405", "0.42552564", "0.42338854", "0.42326692", "0.4227856", "0...
0.89804333
0
onAppReady called after the login has occurred and gone to the home screen for the first time
function onAppReady() { var deferredStore = new _.Deferred(); // kiosk mode is handled in index for store password if (!isKioskMode()) { logger.info('onAppReady calling checkStorePasswordWarning'); deferredStore = storePasswordHelpers.checkStorePasswordWarning(); } else { deferr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeApp() {\n displayIsInClientInfo();\n registerButtonHandlers();\n\n // check if the user is logged in/out, and disable inappropriate button\n if (liff.isLoggedIn()) {\n $.blockUI({ message: \"<h3>Please wait...</h3>\" });\n document.getElementById('liffLoginButton').disa...
[ "0.7199745", "0.717109", "0.70220435", "0.6953687", "0.6935431", "0.69316506", "0.6885619", "0.68765706", "0.6876566", "0.6787579", "0.67839307", "0.6721001", "0.6718428", "0.6696251", "0.6678336", "0.6639547", "0.65983564", "0.65785235", "0.65610254", "0.6533277", "0.653291"...
0.73913586
0
Mostrar modal precargado para editar hospital
function editHospital(IdHospital,nombreHospital,direccionHospital, telefonoHospital, activoHospital ){ var idHospitalEdit = document.getElementById('idHospitalEdit') var nombreHospitalEdit = document.getElementById('nombreHospitalEdit') var direccionHospitalEdit = document.getElementById('direccionHospitalEdit'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editar() {\n\n\t$('#mdlAgendamento').modal('toggle');\n\t$('#mdlVerAgendamento').modal('hide');\n\n}", "function editarPopup(idReservacion,idHorariosReservados,nombre,fechaReservada, motivo){\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t//alert(idReservacion+\",\"+nombre+\",\"+fechaReservada+\",\"+motivo);\n\t\...
[ "0.73202354", "0.6892057", "0.68856853", "0.68279606", "0.6669741", "0.6669325", "0.66508794", "0.6610893", "0.6599097", "0.6546041", "0.6523878", "0.6431068", "0.64027417", "0.6398385", "0.6374551", "0.63446873", "0.6340598", "0.6339188", "0.63387275", "0.6334352", "0.633142...
0.7630316
0
ON CHANGE EVENT FOR SELECT SPECIALTY / 1. gets value (specialty.name) from the dropdown 2. finds the individual specialty object where value and specialty.name match 3. sets selected in state to the value (specialty name) 4. sets specialties_id in state to specialty.id
onValueChange(value: string) { let specialty = this.state.specialties.find(chSpecialty => chSpecialty.name === value) this.setState({ selected: value, specialties_id: specialty.id // selectedSpecialty_id: specialty.id, }) store.setState({ selectedSpecialty: value, selectedSpecialty_id: speci...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onValueChange (value: string) {\n //chosen is the condition the user selects from the drop down\n let chosen = this.state.specialtyConditions.find(chCondition => chCondition.name === value)\n\n store.setState({\n addedCondition: chosen,\n selected: value,\n })\n}", "function OnSpecialItemChange...
[ "0.6266709", "0.62113833", "0.58037376", "0.56660753", "0.56660753", "0.5621327", "0.5620331", "0.5572703", "0.5376911", "0.5372597", "0.5361728", "0.5340346", "0.5339339", "0.5331322", "0.532628", "0.5317588", "0.53100055", "0.5301598", "0.5295295", "0.5289246", "0.5276538",...
0.709553
0
Sends input to socketio server
function send (input) { socket.emit('sendMsg', { input, myName, type }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send() {\n var input = document.getElementById('input');\n socket.json.send({'message': input.value});\n input.value = '';\n}", "function onclickSocket() {\n input_text = input.value\n socket.emit('frontend message', {data: input_text})\n /*\n console.log('hhhhh');\n ...
[ "0.7409552", "0.72823954", "0.6881352", "0.68485117", "0.6757341", "0.672573", "0.6668026", "0.6644675", "0.6597612", "0.646037", "0.6442752", "0.6437653", "0.64325845", "0.64289755", "0.64289755", "0.6407453", "0.64013547", "0.63967216", "0.63948363", "0.63887686", "0.636707...
0.75282675
0
Called when Csound WASM completes loading
function onRuntimeInitialized() { cs = new CsoundObj(); //use this code to load a .csd file and have Csound compile and start it var fileManger = new FileManager(['csd'], console.log); fileManger.fileUploadFromServer("random.csd", function(){ cs.compileCSD("random.csd"); cs.start();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadHandler(event) {\n\t console.log('sound loaded');\n\t // This is fired for each sound that is registered.\n\t //var instance = createjs.Sound.play(\"sound\"); // play using id. Could also use full sourcepath or event.src.\n\t //instance.addEventListener(\"complete\", createjs.proxy(this....
[ "0.6325999", "0.63003635", "0.62239826", "0.6193234", "0.60435796", "0.6034917", "0.6034305", "0.6022298", "0.60044706", "0.5994636", "0.598205", "0.597792", "0.59685457", "0.59622025", "0.595279", "0.5935943", "0.5935917", "0.59260744", "0.59184176", "0.59107995", "0.5903858...
0.6970966
0
An HTTP(S) request that can be redirected
function RedirectableRequest(options, responseCallback) { // Initialize the request Writable.call(this); options.headers = options.headers || {}; this._options = options; this._redirectCount = 0; this._redirects = []; this._requestBodyLength = 0; this._requestBodyBuffers = []; // Since http.request trea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n options.headers = options.headers || {};\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0...
[ "0.6557291", "0.6515291", "0.648225", "0.648225", "0.648225", "0.64810747", "0.6474222", "0.64676344", "0.6452036", "0.6423966", "0.6423966", "0.64205337", "0.64012456", "0.64010006", "0.6398739", "0.6396192", "0.6153257", "0.6126499", "0.6122027", "0.60978913", "0.60978913",...
0.6552241
1
Create deprecate for namespace in caller.
function depd(namespace) { if (!namespace) { throw new TypeError('argument namespace is required'); } var stack = getStack(); var site = callSiteLocation(stack[1]); var file = site[0]; function deprecate(message) { // call to self as log log.call(deprecate, message); } deprecate._file = f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function depd(namespace) {\n if (!namespace) {\n throw new TypeError('argument namespace is required')\n }\n\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n var file = site[0]\n\n function deprecate(message) {\n // call to self as log\n log.call(deprecate, message)\n }\n\n depre...
[ "0.7781096", "0.7781096", "0.7781096", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", "0.77649444", ...
0.7807794
0
Determine if namespace is ignored.
function isignored(namespace) { /* istanbul ignore next: tested in a child processs */ if (process.noDeprecation) { // --no-deprecation support return true; } var str = process.env.NO_DEPRECATION || ''; // namespace ignored return containsNamespace(str, namespace); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isignored (namespace) {\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n if (process.noDeprecation) {\n ...
[ "0.77201766", "0.77201766", "0.77201766", "0.77159464", "0.77159464", "0.77159464", "0.7706156", "0.7706156", "0.7706156", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245", "0.7703245...
0.7751805
0
Generate a default message from the site.
function defaultMessage(site) { var callSite = site.callSite; var funcName = site.name; // make useful anonymous name if (!funcName) { funcName = '<anonymous@' + formatLocation(site) + '>'; } var context = callSite.getThis(); var typeName = context && callSite.getTypeName(); // ignore useless type nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaultMessage(site) {\n var callSite = site.callSite\n var funcName = site.name\n\n // make useful anonymous name\n if (!funcName) {\n funcName = '<anonymous@' + formatLocation(site) + '>'\n }\n\n var context = callSite.getThis()\n var typeName = context && callSite.getTypeName()\n\n // ignore...
[ "0.68806463", "0.68806463", "0.68806463", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176", "0.68761176"...
0.69187015
0
process params in order param callbacks can be async
function param(err) { if (err) { return done(err); } if (i >= keys.length) { return done(); } paramIndex = 0; key = keys[i++]; name = key.name; paramVal = req.params[name]; paramCallbacks = params[name]; paramCalled = called[name]; if (paramVal === undefined ||...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function param(err) {\n if (err) {\n return done(err);\n }\n\n if (i >= keys.length ) {\n return done();\n }\n\n paramIndex = 0;\n key = keys[i++];\n paramVal = key && req.params[key.name];\n paramCallbacks = key && params[key.name];\n\n try {\n if (paramCallbacks && undef...
[ "0.639055", "0.63051647", "0.624602", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.6163729", "0.61350316", "0.6128972", "0.6082403", "0.6017478", "...
0.63379633
1
Wraps the key/value object of protocols with redirect functionality
function wrap(protocols) { // Default settings var exports = { maxRedirects: 21, maxBodyLength: 10 * 1024 * 1024 }; // Wrap each protocol var nativeProtocols = {}; Object.keys(protocols).forEach(function (scheme) { var protocol = scheme + ":"; var nativeProtocol = nativeProtocols[protocol] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeP...
[ "0.59922564", "0.5990571", "0.5986085", "0.5986085", "0.59648246", "0.5948716", "0.5875732", "0.5875732", "0.5824588", "0.5824588", "0.5824588", "0.5824588", "0.5824588", "0.5824588", "0.55325955", "0.550334", "0.5463776", "0.5243312", "0.523982", "0.5020245", "0.49147564", ...
0.6047458
0
Wrap callback to nullify server after all open connections are closed.
function done() { self._server = null; if (callback) { callback.apply(null, arguments); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onUnload(callback) {\n try {\n this.unsubscribeFromVolumioNotifications();\n // Here you must clear all timeouts or intervals that may still be active\n if (this.checkConnectionInterval) {\n clearInterval(this.checkConnectionInterval);\n this.ch...
[ "0.726537", "0.70800203", "0.67226154", "0.67104715", "0.6701162", "0.6622043", "0.65745324", "0.6537018", "0.65245545", "0.6515762", "0.6503322", "0.64714414", "0.6470508", "0.6466187", "0.6463917", "0.6463917", "0.6463917", "0.6463917", "0.6463917", "0.6463917", "0.6463917"...
0.71583533
1
Except base64 encoder, which must keep its state.
function InternalEncoderBase64(options, codec) { this.prevStr = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encoderBase64() {\n return {\n write: encodeBase64Write,\n end: encodeBase64End,\n\n prevStr: '',\n };\n}", "function InternalEncoderBase64(options, codec) {\n this.prevStr = '';\n}", "function InternalEncoderBase64(options, codec) {\n this.prevStr = '';\n}", "functi...
[ "0.77186257", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", "0.7538109", ...
0.7556581
1
CESU8 encoder is also special.
function InternalEncoderCesu8(options, codec) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InternalEncoderCesu8(options, codec) {\n }", "function InternalEncoderCesu8(options, codec) {\n}", "function InternalEncoderCesu8(options, codec) {\n}", "function InternalEncoderCesu8(options, codec) {\n}", "function InternalEncoderCesu8(options, codec) {\n}", "function Intern...
[ "0.8085247", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "0.8060309", "...
0.82814044
1
Map visit over array of `nodes`.
function mapVisit(nodes, fn) { var len = nodes.length; var idx = -1; while (++idx < len) { visit(nodes[idx], fn); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }", "function ...
[ "0.79968286", "0.79968286", "0.79654074", "0.79458106", "0.79458106", "0.79346627", "0.67680585", "0.67680585", "0.67680585", "0.67680585", "0.6255968", "0.6202036", "0.6095507", "0.5952437", "0.5933138", "0.59159625", "0.5813836", "0.5722979", "0.571187", "0.5693442", "0.564...
0.80024064
1
Populate the extensions and types maps.
function populateMaps(extensions, types) { // source preference (least -> most) var preference = ['nginx', 'apache', undefined, 'iana']; Object.keys(db).forEach(function forEachMimeType(type) { var mime = db[type]; var exts = mime.extensions; if (!exts || !exts.length) { return; } // mime -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateMaps(extensions,types){// source preference (least -> most)\nvar preference=['nginx','apache',undefined,'iana'];(0,_keys2.default)(db).forEach(function forEachMimeType(type){var mime=db[type];var exts=mime.extensions;if(!exts||!exts.length){return;}// mime -> extensions\nextensions[type]=exts;// e...
[ "0.7303083", "0.7141253", "0.71156484", "0.7088489", "0.70797336", "0.7071166", "0.7071166", "0.70700127", "0.70689434", "0.70689434", "0.7059342", "0.70523834", "0.70523834", "0.70523834", "0.70523834", "0.70523834", "0.70523834", "0.70523834", "0.70523834", "0.70523834", "0...
0.7164928
1
Compose a matcher function with the given patterns. This allows matcher functions to be compiled once and called multiple times.
function compose(patterns, options, matcher) { var matchers; return memoize('compose', String(patterns), options, function () { return function (file) { // delay composition until it's invoked the first time, // after that it won't be called again if (!matchers) { matchers = []; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compose$1(patterns, options, matcher) {\n var matchers;\n\n return memoize$3('compose', String(patterns), options, function() {\n return function(file) {\n // delay composition until it's invoked the first time,\n // after that it won't be called again\n if (!matchers) {\n match...
[ "0.72548985", "0.7223017", "0.7223017", "0.7179876", "0.6148664", "0.60520416", "0.5842457", "0.57899076", "0.5763983", "0.57269496", "0.56227106", "0.56137115", "0.56130826", "0.55914587", "0.5569953", "0.5485279", "0.54703015", "0.54216206", "0.5412989", "0.53996915", "0.53...
0.72711307
0
Parse the AcceptCharset header.
function parseAcceptCharset(accept) { var accepts = accept.split(','); for (var i = 0, j = 0; i < accepts.length; i++) { var charset = parseCharset(accepts[i].trim(), i); if (charset) { accepts[j++] = charset; } } // trim accepts accepts.length = j; return accepts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseAcceptCharset(accept){var accepts=accept.split(',');for(var i=0,j=0;i<accepts.length;i++){var charset=parseCharset(accepts[i].trim(),i);if(charset){accepts[j++]=charset;}}// trim accepts\naccepts.length=j;return accepts;}", "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',')...
[ "0.70401126", "0.6785117", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6759398", "0.6688467", ...
0.68553674
1
Get the priority of a charset.
function getCharsetPriority(charset, accepted, index) { var priority = { o: -1, q: 0, s: 0 }; for (var i = 0; i < accepted.length; i++) { var spec = specify(charset, accepted[i], index); if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { priority = s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCharsetPriority(charset,accepted,index){var priority={o:-1,q:0,s:0};for(var i=0;i<accepted.length;i++){var spec=specify(charset,accepted[i],index);if(spec&&(priority.s-spec.s||priority.q-spec.q||priority.o-spec.o)<0){priority=spec;}}return priority;}", "function $lTqt$var$getCharsetPriority(charset, ...
[ "0.75151974", "0.69521564", "0.6920732", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257", "0.69198257",...
0.69566727
1
Get the preferred charsets from an AcceptCharset header.
function preferredCharsets(accept, provided) { // RFC 2616 sec 14.2: no header = * var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); if (!provided) { // sorted list of all charsets return accepts.filter(isQuality).sort(compareSpecs).map(getFullCharset); } var priorities = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preferredCharsets(accept,provided){// RFC 2616 sec 14.2: no header = *\nvar accepts=parseAcceptCharset(accept===undefined?'*':accept||'');if(!provided){// sorted list of all charsets\nreturn accepts.filter(isQuality).sort(compareSpecs).map(getFullCharset);}var priorities=provided.map(function getPriority(...
[ "0.7674386", "0.7328542", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.73191154", "0.72137964", ...
0.73804456
1
Parse the AcceptEncoding header.
function parseAcceptEncoding(accept) { var accepts = accept.split(','); var hasIdentity = false; var minQuality = 1; for (var i = 0, j = 0; i < accepts.length; i++) { var encoding = parseEncoding(accepts[i].trim(), i); if (encoding) { accepts[j++] = encoding; hasIdentity = hasIdentity || s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseAcceptEncoding(accept){var accepts=accept.split(',');var hasIdentity=false;var minQuality=1;for(var i=0,j=0;i<accepts.length;i++){var encoding=parseEncoding(accepts[i].trim(),i);if(encoding){accepts[j++]=encoding;hasIdentity=hasIdentity||specify('identity',encoding);minQuality=Math.min(minQuality,enc...
[ "0.71432865", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6649227", "0.6642721", "0.66337097", "0.6621949", "0.65052336", ...
0.67086786
1
Parse the AcceptLanguage header.
function parseAcceptLanguage(accept) { var accepts = accept.split(','); for (var i = 0, j = 0; i < accepts.length; i++) { var language = parseLanguage(accepts[i].trim(), i); if (language) { accepts[j++] = language; } } // trim accepts accepts.length = j; return accepts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseAcceptLanguage(accept){var accepts=accept.split(',');for(var i=0,j=0;i<accepts.length;i++){var langauge=parseLanguage(accepts[i].trim(),i);if(langauge){accepts[j++]=langauge;}}// trim accepts\naccepts.length=j;return accepts;}", "function parseAcceptLanguage(accept) {\n var accepts = accept.split(...
[ "0.7237931", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6902476", "0.6818877", "0.6818877", "0.6818877", "0.6818877", "0.6818877", "0.6818877", "0.6818877", "0.6818877", "0.68145174", "0.5779616", ...
0.7022243
1
Get the preferred languages from an AcceptLanguage header.
function preferredLanguages(accept, provided) { // RFC 2616 sec 14.4: no header = * var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); if (!provided) { // sorted list of all languages return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage); } var prioritie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preferredLanguages(accept,provided){// RFC 2616 sec 14.4: no header = *\nvar accepts=parseAcceptLanguage(accept===undefined?'*':accept||'');if(!provided){// sorted list of all languages\nreturn accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage);}var priorities=provided.map(function getPrior...
[ "0.7521029", "0.7240953", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72257656", "0.72138655", "0.7198304", ...
0.72875035
1
Parse the Accept header.
function parseAccept(accept) { var accepts = splitMediaTypes(accept); for (var i = 0, j = 0; i < accepts.length; i++) { var mediaType = parseMediaType(accepts[i].trim(), i); if (mediaType) { accepts[j++] = mediaType; } } // trim accepts accepts.length = j; return accepts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseAccept(accept){var accepts=splitMediaTypes(accept);for(var i=0,j=0;i<accepts.length;i++){var mediaType=parseMediaType(accepts[i].trim(),i);if(mediaType){accepts[j++]=mediaType;}}// trim accepts\naccepts.length=j;return accepts;}", "function parseAccept(accept) {\n\t var accepts = splitMediaTypes(a...
[ "0.7183107", "0.68863356", "0.68824416", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", "0.6857977", ...
0.69135046
1
Get the preferred media types from an Accept header.
function preferredMediaTypes(accept, provided) { // RFC 2616 sec 14.2: no header = */* var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); if (!provided) { // sorted list of all types return accepts.filter(isQuality).sort(compareSpecs).map(getFullType); } var priorities = provide...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preferredMediaTypes(accept,provided){// RFC 2616 sec 14.2: no header = */*\nvar accepts=parseAccept(accept===undefined?'*/*':accept||'');if(!provided){// sorted list of all types\nreturn accepts.filter(isQuality).sort(compareSpecs).map(getFullType);}var priorities=provided.map(function getPriority(type,in...
[ "0.81538457", "0.79791516", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.7963968", "0.79325587", "0.79089916", "0.76403767"...
0.8011841
1
Map function to remove index value from ranges.
function mapWithoutIndex(range) { return { start: range.start, end: range.end }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapWithoutIndex(range){return{start:range.start,end:range.end};}", "function mapWithoutIndex (range) {\n return {\n start: range.start,\n end: range.end\n }\n}", "function mapWithoutIndex (range) {\n return {\n start: range.start,\n end: range.end\n }\n}", "function mapWithoutIndex (...
[ "0.7433985", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.71780574", "0.6859308", "0.6620375", "0.6420587", "0.61929744", ...
0.72373205
1
Sort function to sort ranges by start position.
function sortByRangeStart(a, b) { return a.start - b.start; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByRangeStart(a,b){return a.start-b.start;}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n ret...
[ "0.82060945", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7910273", "0.7307118", "0.7004802", "0.6963427", "0.6952638", "0.6906382", ...
0.7957905
1
Set attribute for a node. The attribute value can be either string or Trusted value (if application uses Trusted Types).
function setAttribute(node, attributeName, attributeValue) { node.setAttribute(attributeName, attributeValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAttribute(node, attributeName, attributeValue) {\n node.setAttribute(attributeName, attributeValue);\n}", "function setAttribute(node, attributeName, attributeValue) {\n node.setAttribute(attributeName, attributeValue);\n}", "function setAttribute(node, attributeName, attributeValue) {\n node.se...
[ "0.7173905", "0.7173905", "0.7173905", "0.7173905", "0.7173905", "0.7173905", "0.67163414", "0.6712234", "0.6683204", "0.6674678", "0.66308975", "0.66120225", "0.6595591", "0.6478267", "0.6382973", "0.6326988", "0.6326988", "0.6304603", "0.6301143", "0.6275967", "0.6198269", ...
0.7256875
0
Set attribute with namespace for a node. The attribute value can be either string or Trusted value (if application uses Trusted Types).
function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) { node.setAttributeNS(attributeNamespace, attributeName, attributeValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n}", "function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) {\n node.setAttributeNS(attributeNamespace, attributeName, attribut...
[ "0.7478167", "0.7478167", "0.7478167", "0.7478167", "0.7478167", "0.7478167", "0.63192093", "0.62326825", "0.62326825", "0.62326825", "0.62326825", "0.62326825", "0.62326825", "0.5904155", "0.5857602", "0.5699733", "0.5669175", "0.5598826", "0.5558819", "0.5558819", "0.552478...
0.7596373
0
root; if a task was already scheduled, we'll check to make sure the expiration time of the existing task is the same as the expiration time of the next level that the root has work on. This function is called on every update, and right before exiting a task.
function ensureRootIsScheduled(root) { var lastExpiredTime = root.lastExpiredTime; if (lastExpiredTime !== NoWork) { // Special case: Expired work should flush synchronously. root.callbackExpirationTime = Sync; root.callbackPriority = ImmediatePriority; root.callbackNode = s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority...
[ "0.7649043", "0.7614597", "0.7614597", "0.7614597", "0.7614597", "0.7614597", "0.7614597", "0.7473916", "0.7473916", "0.7473916", "0.74707246", "0.74707246", "0.74582374", "0.74582374", "0.74582374", "0.74582374", "0.74582374", "0.74582374", "0.74582374", "0.74582374", "0.745...
0.7629933
1
Find the key in the map object given a header name. Returns undefined if not found.
function find(map, name) { name = name.toLowerCase(); for (var key in map) { if (key.toLowerCase() === name) { return key; } } return undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHeader(headers, headerName) {\n const headerFilter = matchHeaderPartialFn(headerName.toLowerCase());\n let firstItem;\n if (browserHasFind) {\n firstItem = headers[\"find\"](headerFilter);\n }\n else {\n firstItem = headers.map(headerFilter).pop();\n }\n return firstI...
[ "0.693107", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", "0.68123186", ...
0.6904281
1
Create a directory listener that just 404s.
function createNotFoundDirectoryListener() { return function notFound() { this.error(404); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNotFoundDirectoryListener(){return function notFound(){this.error(404);};}", "function createNotFoundDirectoryListener () {\n return function notFound () {\n this.error(404)\n }\n}", "function createNotFoundDirectoryListener () {\n return function notFound () {\n this.error(404)\n }\n}...
[ "0.8610769", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8593375", "0.8413079", "0.62932247", "0.6247809", "0.61698556", ...
0.8630809
0
Return true if val is an object
function isObject(val) { return typeOf(val) === 'object'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject(val) {\n return val && typeof val == \"object\";\n}", "is_object(val) {\n return (typeof val === 'object') && (!this.is_array(val));\n }", "function isObject(val) {\n return kindOf$3(val) === 'object';\n}", "function wkt_is_object(val) {\n return !!val && typeof val == 'object'...
[ "0.8155492", "0.81436896", "0.81316954", "0.7993793", "0.79373556", "0.7924539", "0.7924539", "0.7847143", "0.7677929", "0.7677929", "0.7677929", "0.7615883", "0.7598145", "0.7568892", "0.7568892", "0.7568892", "0.7568892", "0.7568892", "0.7568892", "0.7568892", "0.7568892", ...
0.81968373
1
Populate the statuses map for given codes.
function populateStatusesMap(statuses, codes) { var arr = []; Object.keys(codes).forEach(function forEachCode(code) { var message = codes[code]; var status = Number(code); // Populate properties statuses[status] = message; statuses[message] = status; statuses[message.toLowerCase()] = status; //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $kIvU$var$populateStatusesMap(statuses, codes) {\n var arr = [];\n Object.keys(codes).forEach(function forEachCode(code) {\n var message = codes[code];\n var status = Number(code); // Populate properties\n\n statuses[status] = message;\n statuses[message] = status;\n statuses[message.toLo...
[ "0.8444378", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094", "0.83198094",...
0.83560914
1
part 2: the initialization of the game, set the rule of the game and define the function of the game will be used this is the main function of the game it invloves the people in A side and B side and the boat and the move event
function init(){ //I build a function here called init, refresh the game start the new game, called when page is loading settime();//set the time counter and the step counter var peopleA=document.getElementById("A").getElementsByTagName("div"); var boats=document.getElementsByName("boat"); var peopleC=document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\nmove();\npickBeeper();\nmove();\n}", "function game() {\n dessinerSerpent();\n dessinerPomme();\n detectionCollision();\n verifMangerPomme();\n gestionVieSerpent();\n gestionBonus();\n }", "function Arbiter (aPlayer,aEnemy,game) {\n var _source=aPlayer;\n //var _game=gam...
[ "0.67671996", "0.67607534", "0.6683035", "0.66644526", "0.6556999", "0.65510356", "0.6481971", "0.64292556", "0.6418939", "0.64035165", "0.64030576", "0.63847715", "0.63698184", "0.6358518", "0.6338557", "0.6307319", "0.6298432", "0.6296496", "0.62877536", "0.6278583", "0.627...
0.73807263
0
this function define that prof enforce workA and B to study by a alert, when employer leave
function profCheck(){ //for workerA if(people[1]==people[5]) { if(people[4]!=people[1]) { alert("Prof enforce worker to study"); return false; } } //for workerB if(people[1]==people[6]) { if(people[4]!=people[1]) { alert("Prof enforce worker to study"); return false; } } return tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function employerCheck(){\n //for studentA\n if(people[4]==people[2])\n\t{\n\t\tif(people[1]!=people[4])\n\t\t{\n\t\t\talert(\"Employer enforce student to work\");\n\t\t\treturn false;\n\t\t}\n\t}\n\t//for studentB\n\tif(people[4]==people[3])\n\t{\n\t\tif(people[1]!=people[4])\n\t\t{\n\t\t\talert(\"Employer ...
[ "0.6105104", "0.5794891", "0.54580826", "0.53400576", "0.52703166", "0.52237195", "0.52127177", "0.51635873", "0.5108786", "0.5082873", "0.5068384", "0.50373", "0.5036147", "0.50226134", "0.5010606", "0.4999386", "0.49772716", "0.49658045", "0.49644685", "0.4963232", "0.49470...
0.59557307
1
this function define that employer enforce student to work by a alert, when prof leave
function employerCheck(){ //for studentA if(people[4]==people[2]) { if(people[1]!=people[4]) { alert("Employer enforce student to work"); return false; } } //for studentB if(people[4]==people[3]) { if(people[1]!=people[4]) { alert("Employer enforce student to work"); return false; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function C012_AfterClass_Amanda_AllowLeave() {\n\tC012_AfterClass_Amanda_CheckNotes();\n}", "function leaveRoom() {\n Swal.fire({ background: background, position: \"top\", title: \"Leave this room?\",\n showDenyButton: true, confirmButtonText: `Yes`, confirmButtonColor: 'black', denyButtonText: `No`, denyBu...
[ "0.56587654", "0.55836827", "0.55040807", "0.5481889", "0.5448016", "0.54413474", "0.54192066", "0.5419205", "0.5388084", "0.5378242", "0.53324306", "0.5323847", "0.5302715", "0.5280824", "0.5262372", "0.52401316", "0.5226433", "0.522004", "0.5216969", "0.5190597", "0.5177980...
0.6201144
0