Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
listen for tab changes to trigger formdetection (no reload needed)
function handleActivated(activeInfo) { // console.log("Tab " + activeInfo.tabId +" was activated"); // sendMessageToContentScript("task_detect"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleUpdated(tabId, changeInfo, tabInfo) {\n //Request Running rules details from background script\n browser.runtime.sendMessage({event: \"Running-rules\"});\n}", "function on_tab_updated(id, change_info, tab)\n {\n if (tab.active && change_info.url) { update_in_tab(tab); }\n }", "fun...
[ "0.64422375", "0.6403356", "0.63863295", "0.63695955", "0.63191646", "0.6305107", "0.6263924", "0.6246248", "0.61896276", "0.6178994", "0.6176475", "0.6140175", "0.611296", "0.609954", "0.60966235", "0.6094441", "0.6094441", "0.6094441", "0.6064102", "0.605997", "0.60373366",...
0.0
-1
receives and answers messages from content_scripts [if needed]
function handleMessage(message, sender, sendResponse) { console.log("Message received: " + message); // console.log(sender); if(message.task == 'test'){ console.log(message.task); sendResponse("test received"); }else if(message.task == 'store'){ sendResponse({msg: 'ok'}); // console.log("store msg"); // T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleMessage(request, sender, sendResponse) {\r\n console.log(\"Message from the content script: \" + sender.url + \",\" + request.command);\r\n console.log(sender);\r\n console.log(request);\r\n switch (request.command) {\r\n case \"login\":\r\n showLoginScreen();\r\n ...
[ "0.70627224", "0.6727972", "0.6297496", "0.6238452", "0.6227633", "0.62228054", "0.61985767", "0.6144286", "0.61332417", "0.6120299", "0.60917914", "0.60636127", "0.6038372", "0.60379755", "0.6034951", "0.6034951", "0.6034951", "0.6003465", "0.5978948", "0.59753996", "0.59450...
0.5832257
30
programmatically preselect options in dropdown
function setSelectedIndex(select, index){ select.options[index-1].selected = true; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "select(value) {\n\n \n let selectables = this.object_item(value).selectables;\n let selections = this.object_item(value).selections;\n\n\n\n if (selectables.length > 0) {\n\n selectables.addClass('OPTION-selected')\n .hide(1000);\n\n...
[ "0.68908316", "0.66275054", "0.64846766", "0.64497006", "0.6391839", "0.63784665", "0.63549954", "0.6313525", "0.63003933", "0.62747633", "0.62591857", "0.6257454", "0.62531173", "0.625009", "0.6219929", "0.62089163", "0.6208373", "0.62009215", "0.62009215", "0.6173861", "0.6...
0.0
-1
Given an array of arbitrarily nested arrays, return n, where n is the deepest level that contains a nonarray value. Examples Input Output array: [ [ 5 ], [ [ ] ] ] ==>2 array: [ 10, 20, 30, 40 ] ==>1 array: [ [ 10, 20 ], [ [ 30, [ 40 ] ] ] ] ==>4 array: [ ] ==>0 array: [ [ [ ] ] ] ==>0
function arrayception(matrix){ var result = 0; for(var i = 0; i <matrix.lenght; i ++){ for( var j =0 ; j <matrix.length; j++){ if (!Array.isArray(matrix[i][j])){ return matrix } } } return matrix.push(result) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayCeption(array) {\n\tvar deepest = 0 ;\n\tfunction deepestLevel(array, level) {\n\t\tfor(var i = 0 ; i < array.length ; i++) {\t\t\t\t\t\t\t\t\t//i'll loop through all the array element\n\t\t\tif(Array.isArray(array[i]) && array[i].length > 0) {\t\t\t\t\t//i'll check if that element is an array and it...
[ "0.71657556", "0.6774297", "0.66148674", "0.6523984", "0.6279827", "0.6170151", "0.6148254", "0.5908738", "0.5801954", "0.57202995", "0.57159376", "0.56044894", "0.5588739", "0.5577539", "0.55745196", "0.55690473", "0.5533674", "0.54986835", "0.5471469", "0.5435588", "0.54336...
0.0
-1
Watches the file's changes.
_watch() { const watchHandler = this._createAppDefinitions.bind(this); this._componentFinder.watch(); this._componentFinder .on('add', watchHandler) .on('unlink', watchHandler) .on('changeTemplates', watchHandler); this._storeFinder.watch(); this._storeFinder .on('add', watchHandler) .on('unli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n fs.watchFile(this.watchDir, () => {\n this.watch();\n });\n }", "function watch(){\n //Watch for changes in json files\n gaze(path.join(process.cwd(), myOptions.watchedDir) + '/**/*.json', (err, watcher) => {\n // On changed/added/deleted\n watcher.on('all', (event, filepath) => {...
[ "0.76892084", "0.757606", "0.7536621", "0.74167883", "0.7399811", "0.7374542", "0.73138773", "0.7280547", "0.7263825", "0.72154427", "0.72130036", "0.71007067", "0.70893395", "0.7082815", "0.70728016", "0.7004622", "0.697816", "0.695292", "0.6947258", "0.6920368", "0.69101876...
0.62778634
83
Sets the list of current transformations to the bundler.
_setTransformations() { // traverse items in the reversed order var currentIndex = this._browserifyTransformations.length - 1; while (currentIndex >= 0) { const currentTransformation = this._browserifyTransformations[currentIndex]; currentIndex--; if (!currentTransformation || typeof (currentTransfo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setTransformations() {\n\t\t// traverse items in the reversed order\n\t\tvar currentIndex = this._browserifyTransformations.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentTransformation = this._browserifyTransformations[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentTransformation ||...
[ "0.7263447", "0.547929", "0.5444356", "0.5444356", "0.5444356", "0.5444356", "0.53676915", "0.530141", "0.5230234", "0.52164245", "0.5198078", "0.51966965", "0.5159227", "0.5158514", "0.5147033", "0.5098097", "0.5061689", "0.50538903", "0.5000126", "0.4947076", "0.49207065", ...
0.7211117
1
Sets the list of current plugins to the bundler.
_setPlugins() { var currentIndex = this._browserifyPlugins.length - 1; while (currentIndex >= 0) { const currentPlugin = this._browserifyPlugins[currentIndex]; currentIndex--; if (!currentPlugin || typeof (currentPlugin) !== 'object' || typeof (currentPlugin.plugin) !== 'function') { this._eve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setPlugins() {\n\t\tvar currentIndex = this._browserifyPlugins.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentPlugin = this._browserifyPlugins[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentPlugin ||\n\t\t\t\ttypeof (currentPlugin) !== 'object' ||\n\t\t\t\ttypeof (currentPlugin.plugi...
[ "0.8004924", "0.6818906", "0.6514046", "0.6487034", "0.6434609", "0.624967", "0.5965147", "0.58423436", "0.58362955", "0.57685685", "0.5765481", "0.5765481", "0.56770015", "0.56763065", "0.5641679", "0.5604519", "0.5581039", "0.55783546", "0.55635864", "0.55555177", "0.552398...
0.7972612
1
appending options in to and from
function appendCurrency(input) { var curr = input.currencies; for (key in curr) { $("#from").append( "<option value = " + key + ">" + key + " " + curr[key] + "</option>" ); } for (key in curr) { $("#to").append( "<option value = " + key + ">" + key + " " + curr[key] + "</option>" ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyAllOptions(from,to) {\n selectAllOptionsLeft(from);\n if (arguments.length==2) {\n copySelectedOptions(from,to);\n }\n else if (arguments.length==3) {\n copySelectedOptions(from,to,arguments[2]);\n }\n }", "combineOptions(options) {\n let defaults = {\n...
[ "0.6236526", "0.5907298", "0.58513254", "0.57572585", "0.57278323", "0.5713475", "0.5691599", "0.56842715", "0.5662344", "0.5653605", "0.5645397", "0.5645397", "0.5645397", "0.5645397", "0.5645397", "0.5645397", "0.5645397", "0.5645397", "0.5633803", "0.5622319", "0.5622319",...
0.0
-1
converting value from one currency to another
function convertCurrency(event) { $("#amountDisplay").html(""); $("#fromCurr").html(""); $("#result").html(""); $("#toCurr").html(""); event.preventDefault(); var amount = document.querySelector("#amount").value; var fromCrr = document.querySelector("#from").value; var toCrr = document.querySelector("#...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toCurrency(){\n\n}", "function calculateConvertedCurrency() {\n\tlet fromCurr = currFrom.value;\n\tlet toCurr = currTo.value;\n\t\n\tfetch(`https://api.exchangerate-api.com/v4/latest/${fromCurr}`)\n\t\t.then(res => res.json())\n\t\t.then(res => {\n\t\tconst rate = res.rates[toCurr];\n perRate.inn...
[ "0.7634135", "0.75559753", "0.7532878", "0.73953235", "0.73684686", "0.71612424", "0.708507", "0.6964059", "0.69600946", "0.69377804", "0.68886393", "0.6878825", "0.67927736", "0.669951", "0.66525894", "0.6634507", "0.6598264", "0.6593655", "0.65921944", "0.65058357", "0.6497...
0.67526597
13
document.getElementById("demo").innerHTML = "Paragraph changed."; }
function testFunction() { console.log("Hello World"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paragraph_changer(){\r\n\tdocument.getElementById('demo').innerHTML=\"The p-tag has been changed\"\r\n}", "function changePcontent() {\n let changeP = document.querySelector(\"div p\");\n changeP.innerText = \"now its changed\";\n}", "function change(){\n document.getElementsByTagName(\"p\")[1].i...
[ "0.8557043", "0.77509373", "0.74609566", "0.71230644", "0.70199394", "0.7013315", "0.7012713", "0.6918978", "0.6772314", "0.6768356", "0.67226976", "0.6713201", "0.6661681", "0.6660673", "0.66424197", "0.65993464", "0.65792656", "0.65667164", "0.65328026", "0.6526732", "0.652...
0.0
-1
get the chosen item that the user selected
function getChosenItemQty(item){ //get the item id out of the string var stock_quanity = 0; var id = parseInt(item.idBuy.slice(0, 1)) for(var i = 0; i < inventory.length; i++){ //get the items object if(inventory[i]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get selectedItem() {\n let selectedElement = this._widget.selectedItem;\n if (selectedElement) {\n return this._itemsByElement.get(selectedElement);\n }\n return null;\n }", "function selected() {\n return self.itemAt($scope.selectedIndex);\n }", "function getSelectedName() {\n\t\t\tif (i...
[ "0.7379858", "0.69741446", "0.6834397", "0.68296075", "0.68008846", "0.6710135", "0.66384375", "0.6601487", "0.6591867", "0.6551517", "0.65431035", "0.65364134", "0.64991397", "0.64766955", "0.6456781", "0.6456781", "0.6435702", "0.6412946", "0.6370634", "0.6369105", "0.63126...
0.0
-1
avant toute collision avec le pnj
function rencontre(pnj, textePnj) { // fonction gérant la collision avec un pnj if (joueur.posX + joueur.largeur > pnj.posX2 && joueur.posX - tailleTuile < pnj.posX2 && joueur.posY + joueur.hauteur > pnj.posY2 && joueur.posY - tailleTuile < pnj.posY2) { console.log(pnj.name); switch(dir) { // on va évaluer la d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collision (px,py,pw,ph,ex,ey,ew,eh){\nreturn (Math.abs(px - ex) *2 < pw + ew) && (Math.abs(py - ey) * 2 < ph + eh);\n \n}", "function collision(b, p) {\r\n //conocemos la altura del jugador\r\n p.top = p.y;\r\n //conocemos la parte inferior del jugador\r\n p.bottom = p.y + p.height;\r\n //la par...
[ "0.7506506", "0.7225124", "0.7194058", "0.71261394", "0.7066454", "0.70276684", "0.69875944", "0.692585", "0.69044", "0.6873446", "0.6845036", "0.67910284", "0.672938", "0.67030776", "0.6663254", "0.6656727", "0.66527855", "0.6643274", "0.663", "0.6629857", "0.66223836", "0...
0.7339713
1
Get the log file from the given S3 bucket and key. Parse it and add each log record to the ES domain.
function s3LogsToES(bucket, key, context, lineStream, recordStream) { // Note: The Lambda function should be configured to filter for .log files // (as part of the Event Source "suffix" setting). addFileToDelete(bucket, key); var s3Stream = s3.getObject({ Bucket: bucket, Key: key }).createReadStream(); v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function s3LogsToES(bucket, key, context, lineStream, recordStream) {\n // Note: The Lambda function should be configured to filter for .log files\n // (as part of the Event Source \"suffix\" setting).\n\n var s3Stream = s3.getObject({Bucket: bucket, Key: key}).createReadStream();\n\n // Flow: S3 file ...
[ "0.7192204", "0.7129934", "0.58190775", "0.56013477", "0.5531915", "0.5417477", "0.5398596", "0.5318489", "0.53021234", "0.5149168", "0.5094466", "0.50757706", "0.5023641", "0.5020895", "0.5007629", "0.49872974", "0.4980069", "0.49677464", "0.49657312", "0.49385136", "0.49237...
0.7220334
0
Add the given document to the ES domain. If all records are successfully added, indicate success to lambda (using the "context" parameter).
function postDocumentToES(indexName, doc, context) { doc = addCustomFields(doc); var req = new AWS.HttpRequest(endpoint); req.method = 'POST'; req.path = path.join('/', indexName, esDomain.doctype); req.region = esDomain.region; req.body = doc; req.headers['presigned-expires'] = false; req.headers['Host'] = e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postDocumentToES(doc, context) {\n var req = new AWS.HttpRequest(endpoint);\n\n req.method = 'POST';\n req.path = path.join('/', esDomain.index, esDomain.doctype);\n req.region = esDomain.region;\n req.body = doc;\n req.headers['presigned-expires'] = false;\n req.headers['Host'] = end...
[ "0.70508546", "0.6492602", "0.648254", "0.5959946", "0.5823006", "0.5642557", "0.56335896", "0.5618076", "0.5592447", "0.55520386", "0.5526502", "0.5523152", "0.5505608", "0.54886985", "0.5422777", "0.5386866", "0.5327589", "0.532641", "0.5308144", "0.5273793", "0.52727634", ...
0.6055897
3
Manual update (from user)
function handleChange(event, newValue) { setValue(newValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(){}", "update(){}", "update(){}", "function update() {}", "function adminUpdate(data) {\n\t\t\t\n\t\t\t\n\t\t}", "update(id, user) {\n return 1;\n }", "async update() {}", "async doUserUpdate () {\n\t\tconst now = Date.now();\n\t\tconst op = {\n\t\t\t$set: {\n\t\t\t\tisRegistered: true...
[ "0.7524758", "0.7524758", "0.7524758", "0.720637", "0.71719295", "0.70566857", "0.7047294", "0.6904037", "0.680546", "0.680546", "0.680546", "0.680546", "0.680546", "0.680546", "0.680546", "0.680546", "0.680546", "0.6728186", "0.67163545", "0.6683039", "0.6668849", "0.66558...
0.0
-1
import Left from "./Left";
function Right(props) { const [ProjectDetails, setProjectDetails] = useState({}); useEffect(()=>{ axios.get(process.env.REACT_APP_API_BASE_URL + "/project/details/" + props.project._id) .then(res =>{ setProjectDetails(res.data.result[0]); console.log("status: ", res.data.result[0].status); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Left(status) {\n \"use strict\";\n Leaf.call(this);\n this.state = status;\n}", "static get DIRECTION_LEFT() {\n return \"left\";\n }", "setLeft(newLeft) {\n this.#leftChild = newLeft;\n }", "function turnLeft() {\n baddie.classList.add(\"baddie-left\");\n }", "fun...
[ "0.5545154", "0.54690534", "0.5414841", "0.52136713", "0.5169579", "0.5163637", "0.514209", "0.5133449", "0.51323706", "0.50934166", "0.50323105", "0.503132", "0.5023523", "0.50225675", "0.5018412", "0.49874297", "0.49785885", "0.4963394", "0.49598336", "0.4931433", "0.491193...
0.0
-1
Copyright 2014 Software Freedom Conservancy 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 distributed under the License is distri...
function Oa(a,b){this.code=a;this.a=Pa[a]||"unknown error";this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "obtain(){}", "function exposeTestFunctionNames()\n{\nreturn ['XPathResult_resultType'];\n}", "function e(t,e,r,o){var i,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Refl...
[ "0.5123363", "0.49786115", "0.49725816", "0.49663672", "0.49649248", "0.49086165", "0.48621666", "0.48253107", "0.47874627", "0.47865483", "0.47808337", "0.47562635", "0.47442076", "0.47185218", "0.47185078", "0.4670678", "0.4668266", "0.46637774", "0.46481487", "0.4647086", ...
0.0
-1
The MIT License Copyright (c) 2007 Cybozu Labs, Inc. Copyright (c) 2012 Google Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to u...
function D(a,b,c){this.a=a;this.b=b||1;this.f=c||1}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.definePro...
[ "0.6921879", "0.5519261", "0.5273343", "0.5235905", "0.5002861", "0.49848893", "0.49768186", "0.49768186", "0.49768186", "0.49768186", "0.49768186", "0.49661732", "0.49661732", "0.49416947", "0.49241596", "0.4885842", "0.4877517", "0.48555717", "0.48481706", "0.48448783", "0....
0.0
-1
Discovery for discovering API endpoints
constructor(options) { this.transporter = new google_auth_library_1.DefaultTransporter(); this.options = options || {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async discoverAllAPIs(discoveryUrl) {\n const headers = this.options.includePrivate\n ? {}\n : { 'X-User-Ip': '0.0.0.0' };\n const res = await this.transporter.request({\n url: discoveryUrl,\n headers,\n });\n const items = res.data.items;\n ...
[ "0.74323714", "0.7372563", "0.67343646", "0.6592401", "0.6319553", "0.6132138", "0.59894264", "0.5960525", "0.584235", "0.57043034", "0.5701774", "0.5640919", "0.5640919", "0.5608991", "0.5608991", "0.5608159", "0.5574559", "0.5551448", "0.55217737", "0.5521378", "0.54896516"...
0.0
-1
Generate and Endpoint from an endpoint schema object.
makeEndpoint(schema) { return (options) => { const ep = new endpoint_1.Endpoint(options); ep.applySchema(ep, schema, schema, ep); return ep; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deriveEndpoint(edge, index, ep, conn) {\n return options.deriveEndpoint ? options.deriveEndpoint(edge, index, ep, conn) : options.endpoint ? options.endpoint : ep.type;\n }", "set endpoint(endpoint) {\n\t\tif (Array.isArray(endpoint)) {\n\t\t\tthis._endpoint = endpoint.map((i) => new R...
[ "0.6567618", "0.563212", "0.54849434", "0.54841", "0.5437757", "0.5389481", "0.5346032", "0.53214276", "0.52909744", "0.5205821", "0.5177365", "0.51664466", "0.5159697", "0.5092623", "0.5089627", "0.5069809", "0.5061949", "0.50262016", "0.5016462", "0.49969277", "0.49825656",...
0.7860793
0
Log output of generator. Works just like console.log
log(...args) { if (this.options && this.options.debug) { console.log(...args); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output() {\n if (debugEnabled) {\n return console.log.apply(this, arguments);\n }\n}", "function log()\n {\n var l = arguments.length;\n var thing;\n var obs_l;\n var ob;\n var output = \"\";\n\n for (var i = 0; i < l; i++)\n {\n ...
[ "0.6642426", "0.64244914", "0.6358331", "0.628039", "0.6263746", "0.6221142", "0.6221142", "0.6221142", "0.6221142", "0.6221142", "0.6221142", "0.6221142", "0.621446", "0.6173134", "0.6168273", "0.6126686", "0.6117331", "0.6096275", "0.6096275", "0.6094995", "0.6085013", "0...
0.5876745
42
Generate all APIs and return as inmemory object.
async discoverAllAPIs(discoveryUrl) { const headers = this.options.includePrivate ? {} : { 'X-User-Ip': '0.0.0.0' }; const res = await this.transporter.request({ url: discoveryUrl, headers, }); const items = res.data.items; const ap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateModels() {\n let models_constructor = new ModelConstructor(openapi_dictionary, guiModels);\n return models_constructor.generateModels(this.api.openapi);\n }", "async _generateAssets (apis, token) {\n\t\tconsole.log('Building Resources');\n\t\tconst assetParams = [];\n\t\tfor (let api of ...
[ "0.65616477", "0.6193087", "0.6144607", "0.60761553", "0.604633", "0.60436165", "0.60384524", "0.5923885", "0.5916891", "0.58548397", "0.5840231", "0.5826503", "0.5826503", "0.58237714", "0.58223194", "0.5743405", "0.573896", "0.57174766", "0.5708785", "0.56931084", "0.569171...
0.5934592
7
Generate API file given discovery URL
async discoverAPI(apiDiscoveryUrl) { if (typeof apiDiscoveryUrl === 'string') { const parts = url.parse(apiDiscoveryUrl); if (apiDiscoveryUrl && !parts.protocol) { this.log('Reading from file ' + apiDiscoveryUrl); const file = await readFile(apiDiscoveryUr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genApiURL ( offset ) {\n URL = gamesURL + apiKey + formatOffset + offset;\n return URL;\n}", "function buildSpecUrl() {\n let {protocol, host} = window.location\n let url = window.PRELOAD.swagger_url || '/docs?format=openapi'\n return `${protocol}//${host}${url}`\n}", "async discoverAllAPIs(disco...
[ "0.656145", "0.6030883", "0.5935256", "0.59350294", "0.58844376", "0.5838028", "0.57900196", "0.5760698", "0.57544667", "0.57283306", "0.5676726", "0.5670042", "0.5663588", "0.56103104", "0.55902857", "0.5535263", "0.55132025", "0.5500699", "0.5480999", "0.54696363", "0.54557...
0.71088165
0
Adds a bomb to the board at x,y
function makeExplosion(xPos, yPos){ console.log("makeExplosion at ", xPos,yPos); playSound("boom"); var size = 3; var width = 3 * 20; var offset = (width - 20) / 2; var x = xPos * 20 - offset; var y = yPos * 20 - offset; $(".border, .leader").addClass("shake"); $(".border").one("animationend",funct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function placeBomb(x,y) {\n with (cellArray[arrayIndexOf(x,y)]) {\n if ((! isBomb) && (! isExposed)) {\n isBomb = true;\n for (i=x-1; i<=x+1; i++) {\n for (j=y-1; j<=y+1; j++) {\n addNeighbor(i,j); } } \n return true;} \n else\n return false; } }...
[ "0.7952302", "0.72114384", "0.70820004", "0.7045776", "0.68686396", "0.68005866", "0.67621773", "0.64761996", "0.643432", "0.64154553", "0.6413736", "0.6398815", "0.63926667", "0.6384411", "0.63651574", "0.6342274", "0.63390434", "0.6338396", "0.6310249", "0.62979966", "0.627...
0.0
-1
not the best email regEx but works for now
function TestEmail(e) { var errorMsg = "* Please enter a valid email *"; var emailRegEx = new RegExp('[a-z0-9!#$%\&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%\&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'); if(!emailRegEx.test(e.target.value)){ document.querySelector("div.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validEmail(email) {\n var pattern = new RegExp(/^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x2...
[ "0.7514335", "0.7440035", "0.7354689", "0.73307407", "0.732569", "0.7324078", "0.7309591", "0.7285584", "0.72843444", "0.72276485", "0.7226466", "0.7184625", "0.71750504", "0.71750504", "0.71682286", "0.7148892", "0.71475875", "0.7121435", "0.71166396", "0.70960945", "0.70854...
0.0
-1
"estamos con la bola encima, podemos soltar"
function allowDrop(ev) { // Este ccódigo evita el comportamiento por defecto de este evento ev.preventDefault(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ispisCene(){\n \n let ispisCena=racunajCenu(findDestPrice(dest),brOsoba);\n document.querySelector(\"#cena\").innerHTML = `${ispisCena}&euro;`;\n }", "jubilar() {\n let jubilacion = this.edad >= 45 ? true : false;\n\n return (\"\" + jubilacion);\n }", "function main(){...
[ "0.6513028", "0.6451133", "0.6351627", "0.63440484", "0.6293781", "0.62623924", "0.6256874", "0.61911994", "0.6183974", "0.6123509", "0.61182415", "0.6112766", "0.6105381", "0.6055037", "0.6055037", "0.60407436", "0.603573", "0.60115165", "0.60095304", "0.59912765", "0.597904...
0.0
-1
Funcion a la que llamamos cuando se produce el "drag" Hacemos que el evento pueda transferir un dato ("informacion")
function drag(ev) { ev.dataTransfer.setData("Informacion", ev.target.id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drag(ev)\n{\n ev.dataTransfer.setData(\"message\", ev.target.id);\n}", "function dragInicio(ev) {\n ev.dataTransfer.setData(\"Text\", ev.target.id);\n}", "drag(event) {\n event.dataTransfer.setData(\"divId\", event.target.id);\n console.log(\"----drag----:\");\n }", "function drag (event...
[ "0.7279743", "0.7160809", "0.70878005", "0.70050955", "0.69658244", "0.69637895", "0.6928682", "0.69212824", "0.6917103", "0.68803", "0.68770295", "0.687124", "0.6871131", "0.6853929", "0.68068993", "0.6798106", "0.677846", "0.67727715", "0.675692", "0.6748166", "0.67340213",...
0.7715458
0
Funcion a la que llamamos cuando se produce el "drpop"
function drop(ev) { // Prevenimos su comportamiento por defecto ev.preventDefault(); // Hacemos que el evento reciba un dato ("informacion") var data = ev.dataTransfer.getData("Informacion"); // Si el elemento que hemos soltado era la bola if(data=="bola"){ document.getElementById("papelera").src="p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pop() {\n --topp;\n}", "Pop() {\n\n }", "pop() {\n\n }", "pop() {\n }", "pop(){\n let popped;\n if(this.isEmpty()){\n return ;\n }\n if (this.size==1) {\n popped = this.getAt(0);\n this.reset();\n this.size--\n ...
[ "0.65960455", "0.6482743", "0.64658666", "0.63852954", "0.6162876", "0.6151666", "0.6146722", "0.6090012", "0.6076205", "0.59674066", "0.59550023", "0.59516966", "0.5943689", "0.5901418", "0.582198", "0.58213735", "0.58200467", "0.58169854", "0.580626", "0.58025384", "0.57994...
0.0
-1
Stop execution, and display a message
function endGame(){ writeToConsole("Total moves = " + moves + " out of " + (game.board_size.width)*(game.board_size.height)); throw new Error('This is not an error.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stop() {}", "stop() {}", "function stop() {\n\t\trunning = false;\n\t}", "stop() { this.#runtime_.stop(); }", "function stop(){\n\tstopPressed = 1;\n\tenableRunBtn(true);\n\topt1.disabled = false;\n\tsaveBtn.disabled = false;\n\tloadBtn.disabled = false;\n\tprogramSelect.disabled = false;\n\tstepLabel.inne...
[ "0.7391522", "0.7187698", "0.68688756", "0.6823072", "0.68135434", "0.6739437", "0.6690364", "0.66731715", "0.6669365", "0.6596162", "0.65907514", "0.6568806", "0.6548563", "0.6547836", "0.6547836", "0.6547836", "0.6547836", "0.6547836", "0.6547836", "0.6547836", "0.6547836",...
0.0
-1
Load the game, and create the board.
function loadGame(){ game = getJSON("http://navy.hulu.com/create?user=rhassan@andrew.cmu.edu"); board = []; // Display game information writeToConsole("GAME ID = " + game.game_id); writeToConsole("SHIPS = [" + game.ship_sizes + "]"); writeToConsole("BOARD = (" + game.board_size.width + ", " + game.board_size.he...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_game_board(){\n update_number_of_players();\n create_player_areas();\n // create new game\n game_instance.deal_cards();\n \n render_cards();\n apply_card_event_handlers();\n \n game_instance.determine_winners();\n // determine_wi...
[ "0.7420864", "0.72548664", "0.7228805", "0.7216703", "0.715611", "0.70957667", "0.7085388", "0.70358056", "0.70005196", "0.692128", "0.691042", "0.6856177", "0.68503314", "0.6834303", "0.6823712", "0.68206155", "0.67755353", "0.6763411", "0.6713929", "0.67020357", "0.6700509"...
0.7423521
0
Check if (x,y) is a hit.
function isHit(x,y){ var move = makeMove(x,y); if (move!=null){ if (move.hit){ document.getElementById(y+'_'+x).setAttribute('class','hit'); //document.getElementById(y+'_'+x).innerHTML = moves; }else{ document.getElementById(y+'_'+x).setAttribute('class','miss'); //document.getElementById(y+'_'+x).in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "testHit(x, y) {\n for (const i in this.position) {\n // console.log('x ' + x + ' otherx ' + this.position[i][0])\n if (x == this.position[i][0] && y == this.position[i][1]) {\n this.hit();\n return true;\n }\n }\n return false;\n ...
[ "0.82810587", "0.7867772", "0.78559047", "0.7459645", "0.7459645", "0.7459645", "0.7459645", "0.7459645", "0.73976296", "0.73644", "0.7203255", "0.7178318", "0.7080101", "0.70623004", "0.701144", "0.700678", "0.6977696", "0.6976007", "0.69750476", "0.6967083", "0.6948406", ...
0.70968825
12
Given that a particular cell is a hit, try to find all blocks of the ship.
function exploreNeighbors(x,y){ function labelEmpty(x,y){ if (x>=0 && x<game.board_size.width && y>=0 && y<game.board_size.height){ document.getElementById(y+'_'+x).setAttribute('class','avoid'); board[x][y] = null; // Indicate that cell should never be examined } } function pursueShip(x,y, xp, yp){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findReachableTiles(x, y, range, isMoving) {\n var q = [];\n var start = [x, y, 0];\n var marked = [];\n marked.push(x * mapWidth + y);\n q.push(start);\n\n // Breadth first search to find all possible destinations\n while (q.length > 0) {\n\n pair = q.splice(0, 1)[0];\n // console.log(pair[0]...
[ "0.62348676", "0.6098137", "0.60531044", "0.6020119", "0.6004894", "0.5953157", "0.59371924", "0.59065086", "0.5859303", "0.58442813", "0.5824677", "0.58131856", "0.5758301", "0.5729595", "0.57244885", "0.567412", "0.56552833", "0.56080884", "0.5606305", "0.5575332", "0.55538...
0.5889154
8
Purpose: Starts searching through the grid. Starts by trying to find the largest ship by skipping to every nth blocks.
function startGame(){ var j = 5; // value by which to skip. while (j>0){ var max = 0; for(var m =0; m<ships.length; m++){ if (ships[m]>max){ max = ships[m];} } if (j>max){ j = max; } writeToConsole(ships); writeToConsole("Trying spacing by " + j); for (var i=0; i<=j; i++){ for(var x=0; x< Math....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exploreNeighbors(x,y){\n\tfunction labelEmpty(x,y){\n\t\tif (x>=0 && x<game.board_size.width && y>=0 && y<game.board_size.height){\n\t\t\tdocument.getElementById(y+'_'+x).setAttribute('class','avoid');\n\t\t\tboard[x][y] = null;\t\t// Indicate that cell should never be examined\n\t\t}\n\t}\n\tfunction pur...
[ "0.64079535", "0.6218261", "0.60234225", "0.5909205", "0.57952476", "0.57545716", "0.57543164", "0.56899416", "0.56549096", "0.56442755", "0.5643415", "0.5632637", "0.5629312", "0.56184286", "0.56154126", "0.56080747", "0.56049144", "0.5600821", "0.5574246", "0.55595684", "0....
0.624206
1
to get no of days in kgp
function no_of_days() { var d = new Date(), minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(), hours = d.getHours().toString().length == 1 ? '0'+d.getHours() : d.getHours(), ampm = d.getHo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateDays() {\n const secondsInADay = 86400;\n let seconds = this.calculateSeconds();\n this.daysCount = seconds / secondsInADay;\n this.daysCount = Math.floor(this.daysCount);\n\n return this.daysCount;\n }", "numberOfDays(){\n return ((this.endDate - this.startDate)/(1000*60*60*24));...
[ "0.67897034", "0.65952903", "0.6536408", "0.6521484", "0.61982596", "0.61929715", "0.6138811", "0.60371274", "0.59765095", "0.59604055", "0.59576684", "0.5890101", "0.58603126", "0.58555025", "0.58413243", "0.58301485", "0.58148503", "0.5812444", "0.58109355", "0.5765538", "0...
0.6867405
0
Worked, remaining, or overtime hours.
function createBar(type, percent, label) { return $('<div />', { 'class': type, 'style': 'width: ' + percent + '%;', 'text': label }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extraTime(hoursWorked, contractTime) {\r\n extraHours = hoursWorked - contractTime;\r\n return extraHours;\r\n}", "function getIdealSleepHours() {\n const idealHours = 8 * 7;\n return idealHours;\n}", "function GetWorkingHrs(empCheck)\n{\n switch(empCheck)\n {\n case IS_PRESENT_FULL_T...
[ "0.70213896", "0.6638103", "0.6562684", "0.6483491", "0.6468157", "0.64645904", "0.6411628", "0.6377517", "0.63768315", "0.63726354", "0.637182", "0.63563544", "0.63518", "0.625741", "0.6243014", "0.62320876", "0.6206406", "0.6155559", "0.61286294", "0.6114841", "0.6088599", ...
0.0
-1
Chose a position inside the array Random number 0, 1 or 2 (random position in array) Random Number between 0 and 2 Random Number
function computerplay() { var Computer = Math.floor(Math.random()*optionsarray.length); return optionsarray[Computer]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomIndexOf(arr) {\n if(arr.length < 1) return -1;\n return Math.floor(Math.random() * arr.length);\n}", "function randomnum() {\n //Sets var randArray to a random index of 0-3; relates to arrays: lower, upper, number, special\n var randArray = Math.floor((Math.random() * array.length));\...
[ "0.69577104", "0.68993795", "0.67307764", "0.66999847", "0.66443944", "0.66405565", "0.66326576", "0.6601008", "0.6575666", "0.6575666", "0.6573093", "0.65671355", "0.6547054", "0.6526048", "0.6526048", "0.6526048", "0.6514073", "0.6484289", "0.64811325", "0.647296", "0.64651...
0.0
-1
GET METHOD DATA TABLE OF CONTENTS 1. GET ALL DATA 2. GET CUSTOM ROW 3. GET STASTIC DATA
function doGet(request) { var ssID = SpreadsheetApp.openById(SHEETS_ID); var tableName = request.parameter.tableName; var sheet = ssID.getSheetByName(tableName); var action = request.parameter.action; switch (action) { case "read": return get_data(sheet, tableName); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getData(table) {\n return this.content.data[table];\n }", "function get_data() {}", "function dataFunc(data) {\n console.log(data.getData());\n console.log(data.getColumns());\n }", "function getDataFromPage () {\n return Array.from(document.querySelectorAll(\"table#...
[ "0.6732181", "0.6566939", "0.65340036", "0.6367356", "0.62488455", "0.62386715", "0.62085646", "0.6062533", "0.6038704", "0.6027271", "0.6015181", "0.6009554", "0.5979166", "0.5966316", "0.5948171", "0.5924445", "0.58910364", "0.5887343", "0.58678", "0.58669263", "0.5854592",...
0.0
-1
POST METHOD DATA THIS FUNCTION WILL BE HANDLE ALL FUNCTION WITH POST METHOD REQUEST Table of Contents 1. INSERT DATA 2. UPDATE DATE
function doPost(e) { var ssID = SpreadsheetApp.openById(SHEETS_ID); var tableName = e.parameter.tableName; var action = e.parameter.action; var sheet = ssID.getSheetByName(tableName); switch (action) { case "insert": return insert_data(e, sheet, "BELUM"); break; case "update": retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handlePost() {\n\tvar bodyStr = $.request.body ? $.request.body.asString() : undefined;\n\tif ( bodyStr === undefined ){\n\t\t $.response.status = $.net.http.INTERNAL_SERVER_ERROR;\n\t\t return {\"myResult\":\"Missing BODY\"};\n\t}\n\t\n\tvar conn = $.db.getConnection();\n\tvar data = $.request.body.asStr...
[ "0.67267084", "0.6569569", "0.65450704", "0.6374348", "0.63169354", "0.62919647", "0.6223695", "0.61838585", "0.61772543", "0.61515725", "0.6113738", "0.6101393", "0.6076545", "0.606265", "0.60592556", "0.6054877", "0.59549695", "0.5947963", "0.59464735", "0.5941304", "0.5939...
0.62282884
6
`scope` is just an element within which JS should search for the elements below This way you can have multiple sliders on one page, independent of each other
constructor(scope, options = {}) { this.el = { // The child elements of the `container` element become "slides" container: scope.querySelector('[data-slider-container]'), // Can have any number of `triggers`, located anywhere within the scope // Attribute value s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "find_slider()\n\t{\n\t\tif (this.slider) return this.slider; // slider already set\n\n\t\tlet q = `[${this.attr}=\"${this.name ? this.name : ''}\"]`;\n\t\tlet sliders = document.querySelectorAll(q);\n\t\tfor (let slider of sliders)\n\t\t{\n\t\t\tif (!slider.hasAttribute(this.attr + \"-set\")) return slider;\n\t\t}...
[ "0.5758135", "0.57480884", "0.5726139", "0.5655312", "0.54517543", "0.5424122", "0.5412569", "0.5405932", "0.5397236", "0.53809375", "0.5343786", "0.52980506", "0.5271649", "0.527095", "0.5255136", "0.52101815", "0.5193393", "0.51630175", "0.51552707", "0.5151086", "0.5148265...
0.5603838
4
This is a ConformanceMessaging resource
static get __resourceType() { return 'ConformanceMessaging'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messagingApi()\n{\n\n}", "sendMessageService(boatId) { \n publish(this.messageContext, BoatMC, {recordId:boatId});\n }", "get communication () {\n\t\treturn this._communication;\n\t}", "get communication() {\n\t\treturn this.__communication;\n\t}", "onWorkerMsg(msg){\n\n if (msg.replyTo!...
[ "0.61389846", "0.55454636", "0.5482138", "0.54554975", "0.54206866", "0.5387298", "0.53735256", "0.53735256", "0.53735256", "0.53735256", "0.53557914", "0.53556335", "0.5337448", "0.53085494", "0.53010654", "0.53010654", "0.52676386", "0.52588576", "0.5256887", "0.5248511", "...
0.7466156
0
An endpoint (network accessible address) to which messages and/or replies are to be sent.
get endpoint() { return this.__endpoint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get endpoint () {\n\t\treturn this._endpoint;\n\t}", "address() {\n const address = this.server.address();\n const endpoint = typeof address !== \"string\"\n ? (address.address === \"::\" ? \"localhost\" : address.address) + \":\" + address.port\n : address;\n ...
[ "0.60655105", "0.58461183", "0.58366686", "0.58366686", "0.58366686", "0.58349746", "0.58349746", "0.58349746", "0.58349746", "0.5667294", "0.55351883", "0.54919016", "0.5422372", "0.54212075", "0.5405083", "0.53320336", "0.52002597", "0.51635903", "0.5131667", "0.5127271", "...
0.6017733
1
Length if the receiver\'s reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).
get reliableCache() { return this.__reliableCache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "serializeLen() {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n\n let proxyResult;\n proxyResult = Module._vscr_ratchet_message_serialize_len(this.ctxPtr);\n return proxyResult;\n }", "function msgSizeTimer(msgContent) {\n let awrageCharacter...
[ "0.5973503", "0.57531095", "0.5705053", "0.56768143", "0.56340206", "0.56297034", "0.5623181", "0.56189734", "0.552696", "0.552696", "0.55250967", "0.5461184", "0.5461184", "0.5460237", "0.5415672", "0.540852", "0.5378659", "0.53432685", "0.53349996", "0.5307373", "0.5306705"...
0.0
-1
Documentation about the system\'s messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.
get documentation() { return this.__documentation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get __resourceType() {\n\t\treturn 'ConformanceMessaging';\n\t}", "function messagingApi()\n{\n\n}", "respondToMessages() { }", "function dmMessage(msg) {\r\n if (msg.content.startsWith(\"settings\")) {\r\n const list = [\"My current settings:\"];\r\n list.push(\"**showJoinMessages**:...
[ "0.5572481", "0.55370605", "0.52530557", "0.51645625", "0.49713972", "0.49469256", "0.48669818", "0.48559156", "0.48536", "0.4850188", "0.48455974", "0.48206833", "0.47483343", "0.47294652", "0.47022295", "0.4699534", "0.46933493", "0.46722656", "0.46611872", "0.46597084", "0...
0.0
-1
A description of the solution\'s support for an event at this endpoint.
get event() { return this.__event; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function help() {\n res.send(\n {\n \"response_type\": \"ephemeral\",\n \"text\": \"Type `/support` for status accross all filters. Add a case link `https://help.disqus.com/agent/case/347519` or an email `archon@gmail.com` to get specific.\",\n }\n )\n }", "function EventInfo() { }...
[ "0.59807265", "0.58813286", "0.58813286", "0.58709836", "0.5836992", "0.5833863", "0.5803397", "0.57737386", "0.57737386", "0.57737386", "0.5642711", "0.5619927", "0.56033987", "0.55560714", "0.55032957", "0.550193", "0.54894936", "0.5484305", "0.54589105", "0.545577", "0.536...
0.0
-1
Process the markdown source in a doc. The properties that should be processed are configurable, but always include "author", "classdesc", "description", "exceptions", "params", "properties", "returns", and "see". Handled properties can be bare strings, objects, or arrays of objects.
function process(doclet) { tags.forEach((tag) => { if (!doclet[tag]) { return; } if (typeof doclet[tag] === "string" && shouldProcessString(tag, doclet[tag]) ) { doclet[tag] = renderer.render(doclet[tag]) .replace(/\s+$/, "") .replace(/&#39;/g, "'"); } else if (Array.isArr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get properties(){return{source:{name:\"source\",type:\"String\"},hasSource:{name:\"hasSource\",type:\"Boolean\",computed:\"_calculateHasSource(source)\"},markdown:{name:\"markdown\",type:\"String\"}}}", "function process(data) {\n // Translate markdown to html\n return markedAsync(data.content, markedOp...
[ "0.60687476", "0.5744102", "0.5629463", "0.54854506", "0.5416786", "0.5379468", "0.5292718", "0.52916867", "0.52667874", "0.5248181", "0.52400845", "0.5222431", "0.519785", "0.5179497", "0.5172039", "0.5149535", "0.51466614", "0.51175636", "0.51146895", "0.51113397", "0.50640...
0.0
-1
This script was created by HarryTrinh, please don't make a copy with out my credit
function alignedPower(trainerElement, trainerPower, attribute1, attribute2, attribute3, attribute1Val, attribute2Val, attribute3Val, bonusPower){ attribute1Val = parseInt(attribute1Val); attribute2Val = parseInt(attribute2Val); attribute3Val = parseInt(attribute3Val); attribute1Val = calcAttribute...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "static private internal function m121() {}", "protected internal function m252() {}", "static final private internal function m106() {}", "static private protected internal function m118() {}", "transient protected internal fun...
[ "0.6420683", "0.6101661", "0.6100119", "0.5898372", "0.57818085", "0.5644934", "0.56343484", "0.560767", "0.5444407", "0.54394007", "0.5439112", "0.53767216", "0.53376806", "0.5326476", "0.525771", "0.52242565", "0.52150166", "0.52107114", "0.5195999", "0.51881397", "0.514826...
0.0
-1
Creation d'une fonction pour supprimer un article du panier
function deleteProduct(index) { //Creation de 2 paniers let panier = []; let newPanier = []; let strStorage = localStorage.getItem("panier"); /*On récupere le panier on effectue une boucle à l'interieur si l'id est différent du productId prit en paramétre un push est effectué dans newPanier av...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function suppr_art(){\n\tvar nb=document.querySelectorAll('.article').length; //ie8 ne supporte pas getElementsByClassName, on utilise querySelectorAll à la place\n\n\tif (confirm ('Voulez vous supprimer ces '+nb+' article(s) ?')){\n\t\tfor (var i=0;i<nb;i++){\n\t\t\tdocument.getElementById('tabArticle').deleteRow...
[ "0.7112562", "0.7020479", "0.6965465", "0.69086385", "0.6894984", "0.662584", "0.65662783", "0.6562634", "0.6542179", "0.6437033", "0.6387203", "0.6355308", "0.6337193", "0.6271713", "0.62660056", "0.6217893", "0.61961585", "0.6120943", "0.6090716", "0.60642904", "0.60430187"...
0.0
-1
Llenar el listado de Desembolsos
function all() { var deferred = $q.defer(); $http.get('/api/desembolsos/?format=json') .success(function (data) { deferred.resolve(data); }); return deferred.promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iniciarListaBusqueda(){\n var ciclos = selectDatoErasmu();\n for(var aux = 0, help = 0 ; aux < erasmu.length ; aux++){\n if(ciclos.indexOf(erasmu[aux].ciclo) != -1){\n crearListErasmu(erasmu[aux]);\n }\n }\n}", "function dibujarComentarios(_datos)\n{\n\tvar lista = $('#lista-comentarios');...
[ "0.6674509", "0.6460851", "0.6407208", "0.6366784", "0.6306566", "0.6185598", "0.6102222", "0.60410565", "0.60213345", "0.6008032", "0.6004217", "0.5990757", "0.598904", "0.5979011", "0.5972526", "0.59663796", "0.5965407", "0.5961293", "0.59405625", "0.5921241", "0.59082425",...
0.0
-1
Buscar un numero de cheque en especifico en listado de documentos
function byNoCheque(NoCheque) { var deferred = $q.defer(); all().then(function (data) { var result = data.filter(function (registro) { return registro.cheque == NoCheque; }); if(result.length > 0) { deferred.resolve(result); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contLike(elNum,elId){\nvar igualC = document.getElementById(arrComentarios.length + 1).value;\t\nvar contadorAux = document.getElementById(\"num\");\n\nconsole.log(contadorAux);\n\nvar recorreLike = arrComentarios.filter(function(c){\n\treturn c.id = igualC;\n})\n\t\tvar elNum = parseInt(elNum);\n\t\tvar ...
[ "0.57553023", "0.5551764", "0.53502184", "0.5320882", "0.5289834", "0.5248008", "0.51939994", "0.5192254", "0.5182573", "0.5130904", "0.51215017", "0.5098444", "0.5062239", "0.5060516", "0.50550854", "0.50253034", "0.50190943", "0.497711", "0.49726623", "0.49675027", "0.49449...
0.46761313
66
Buscar un desembolso en especifico (Desglose) By Cheque
function DocumentoByCheque(NoCheque) { var deferred = $q.defer(); var doc = NoCheque != undefined? NoCheque : 0; $http.get('/desembolsojson/?nocheque={NoCheque}&format=json'.replace('{NoCheque}', doc)) .success(function (data) { deferred.resolve(data); }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fBuscarEjsPE() {\n hideEverythingBut(\"#ejerciciosBusquedaPE\");\n //la limpieza de búsquedas se hará al terminar sesión, de modo que al volver a la búsqueda, se podrá ver la última búsqueda realiza y sus resultados\n}", "buscarDado(d) {\n\t\t// Intenta por si es un entero\n\t\tif (!isNaN(d)) {\n\...
[ "0.6125786", "0.59025437", "0.57932484", "0.5762509", "0.5747994", "0.57421374", "0.5737452", "0.573485", "0.573443", "0.56919545", "0.56745094", "0.5668218", "0.56661063", "0.5657739", "0.5622976", "0.5622175", "0.5620696", "0.55930334", "0.55802584", "0.55442864", "0.553300...
0.0
-1
Buscar un desembolso en especifico (Desglose) By ID
function DocumentoById(Id) { var deferred = $q.defer(); var doc = Id != undefined? Id : 0; $http.get('/desembolsojson/?id={id}'.replace('{id}', doc)) .success(function (data) { deferred.resolve(data); }); return deferred.promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCuponesPorIndustria(idIndustria){\n\t\n}", "obterPorId(_id){\n return this.lista.filter( aluno => aluno._id === _id )[0];\n }", "function buscarImagen(id, datos){\n const imagen = datos.includes.Asset.find((asset) => {\n return asset.sys.id == id; });\n return imagen...
[ "0.68603635", "0.68139905", "0.6617569", "0.6322625", "0.6321053", "0.630884", "0.62141055", "0.6195054", "0.61876005", "0.618343", "0.615696", "0.61434543", "0.6100849", "0.6077855", "0.60695535", "0.602773", "0.60158944", "0.60087883", "0.60066396", "0.6002418", "0.5987984"...
0.0
-1
Impresion de Desembolso (incrementa el campo de IMPRESO)
function impresionDesembolso(desembolso) { var deferred = $q.defer(); $http.post('/desembolso/print/{desembolso}/'.replace('{desembolso}', desembolso), {'desembolso': desembolso}). success(function (data) { deferred.resolve(data); }). error(function (data) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adicionar (){\n const valor = contador + 1\n setContador(valor) \n }", "function cumpleanosModificadonObjeto(persona) {\n persona.edad += 1;\n}", "increment() {\n\t\t++this.amount;\n\t}", "static increment(){\n return { \n type: 'INC'\n }\n }", "functi...
[ "0.6580336", "0.60892767", "0.60505396", "0.59683603", "0.5882958", "0.5852795", "0.58424515", "0.58356947", "0.5824835", "0.58118397", "0.5787494", "0.5783863", "0.5781738", "0.5739387", "0.57322735", "0.5667989", "0.56590635", "0.5649055", "0.5644376", "0.5641948", "0.56209...
0.0
-1
Functional component used to display a page not found message. Uses withRouter to link uses back to the App root.
function PageNotFound () { return ( <div> <div className="page-not-found"> <div className="page-not-found__copy"> Oops...Looks like something went wrong! </div> <div className="page-not-found__actions"> <Link to="/">Click here</Link> to return to the Readable home...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NotFound(){\n return(\n <PageDefault>\n <h1>Page not found</h1>\n <h2>Error 404!</h2>\n </PageDefault>\n )\n}", "function PageNotFound() {\n return (\n <>\n <div className=\"body-wrapper\">\n <h1>That is not a valid URL!</h1>\n <br />\n <br />\...
[ "0.7501168", "0.7420509", "0.74190855", "0.7300435", "0.70926124", "0.70417213", "0.703691", "0.6877237", "0.6804018", "0.67175037", "0.6623011", "0.6616456", "0.65986395", "0.65974677", "0.65944153", "0.6589223", "0.65851396", "0.65691113", "0.6529919", "0.6498586", "0.64131...
0.7389535
3
this closes the document.ready function functions: this area is for functions======================= updateEnemyBars: this function will update the health and counter bars of the enemies
function updateEnemyBars (fighterClass, fighterHealthClass, fighterCounterClass) { var healthPercent; var counterPercent; healthPercent = ((fighterClass.health * 100) / fighterClass.healthMax); counterPercent = ((fighterClass.counter * 100) / fighterClass.counterMax); console.log("enemy health percent: " + heal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function worldUpdate() {\r\n\t$('#distance').html(prettify(Game.world.distance));\r\n\t$('#zone').html(Game.zone);\r\n\r\n\t//enemy\r\n\t$('#enemyHealth').html(prettify(Game.enemy.health));\r\n\r\n\tvar enemyHealthBar = document.getElementById(\"enemyHealthBar\");\r\n\tvar hp = (Game.enemy.health / Game.enemy.tota...
[ "0.65949917", "0.64337116", "0.63488334", "0.633253", "0.6284872", "0.6261083", "0.62480927", "0.6132932", "0.60952646", "0.6084168", "0.6084016", "0.6065441", "0.60620546", "0.60593873", "0.6047584", "0.60468805", "0.60406053", "0.6039369", "0.6026554", "0.6007479", "0.59880...
0.702743
0
updateEnemyBars: ========================================= updatePlayerBars: this function updates the health and attack bars of the player
function updatePlayerBars (fighterClass, fighterHealthClass, fighterAttackClass) { var healthPercent; var attackPercent; healthPercent = ((fighterClass.health * 100) / fighterClass.healthMax); attackPercent = ((fighterClass.attack * 100) / fighterClass.attackMax); console.log("player health percent: " + healthP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateEnemyBars (fighterClass, fighterHealthClass, fighterCounterClass) {\n\tvar healthPercent;\n\tvar counterPercent;\n\n\thealthPercent = ((fighterClass.health * 100) / fighterClass.healthMax);\n\n\tcounterPercent = ((fighterClass.counter * 100) / fighterClass.counterMax);\n\n\tconsole.log(\"enemy healt...
[ "0.7557436", "0.6387888", "0.61090773", "0.5945519", "0.5880743", "0.57560307", "0.5620557", "0.5547833", "0.55426073", "0.55151325", "0.55141973", "0.54880273", "0.54811215", "0.544954", "0.54156166", "0.5412472", "0.54001355", "0.53820807", "0.53725255", "0.5326626", "0.530...
0.66340005
1
updatePlayerBars: ========================================== fight: this function controls the actual battle portion
function fight () { document.querySelector(".message").innerHTML = "You attack " + currentVillain.name + " for " + mainHero.attack + " damage. " //reduces villains health currentVillain.health = currentVillain.health - mainHero.attack; //increases hero's attack power mainHero.attack = mainHero.attack + mainHer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePlayerBars (fighterClass, fighterHealthClass, fighterAttackClass) {\n\tvar healthPercent;\n\tvar attackPercent;\n\n\thealthPercent = ((fighterClass.health * 100) / fighterClass.healthMax);\n\n\tattackPercent = ((fighterClass.attack * 100) / fighterClass.attackMax);\n\n\tconsole.log(\"player health p...
[ "0.7634496", "0.734443", "0.6687563", "0.6455987", "0.62879467", "0.607514", "0.6048259", "0.60472596", "0.60327476", "0.5959533", "0.59420156", "0.59389675", "0.5932808", "0.592017", "0.59044844", "0.5893292", "0.58797926", "0.5877983", "0.5862519", "0.58483964", "0.5848204"...
0.5784504
26
fight: ================================================ duelMove: this function moves the clicked enemy into the duel zone
function duelMove (fighterClass) { var duelistLocation; attackTime = true; document.querySelector(".message").innerHTML = "Click on Attack to fight. With each attack your character will get stronger." //who villain: this section of code figures out who the chosen duelist is if ($ (fighterClass).attr("id") ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveChar(){\n\t\t$(\".thumbnail\").on(\"click\", function(){\n\t\t\tvar parent = $(this).parent();\n\t\t\tvar selectedChar = $(this).attr(\"id\");\n\n\t\t\t//Moves the enemy character to the appropriate DIV, and adds the corresponding object to combatObj;\n\t\t\tif (lightSide && darkSide == undefined){\n\...
[ "0.62309426", "0.6194085", "0.61904204", "0.61862403", "0.615828", "0.6148708", "0.61429715", "0.60981095", "0.6059894", "0.6038212", "0.6012762", "0.6006209", "0.5988625", "0.5966156", "0.59660256", "0.59634364", "0.5920754", "0.59007365", "0.5900642", "0.58951914", "0.58929...
0.73192215
0
set random landing position / /preload function
function preload(){ //player image this.load.atlas('player','././media/players/player1/playerSprite.png','././media/players/player1/playerAtlas.json'); //enemy image this.load.atlas('enemy','././media/players/enemy1/enemySprite.png','././media/players/enemy1/enemyAtlas.json'); //map files...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLandingPosition(){\n landingPosition.x = Math.floor(Math.random() * (landingLimitCoordinates.right - landingLimitCoordinates.left + 1) + landingLimitCoordinates.left);\n landingPosition.y = Math.floor(Math.random() * (landingLimitCoordinates.down - landingLimitCoordinates.up + 1) + landingLimitCo...
[ "0.8184856", "0.6989794", "0.6848632", "0.66023177", "0.6522307", "0.6510295", "0.64572453", "0.6455885", "0.64536107", "0.6445708", "0.63958424", "0.6394101", "0.63374877", "0.6290366", "0.62876713", "0.6285816", "0.6257695", "0.6254049", "0.6234463", "0.62185955", "0.621022...
0.0
-1
function for getting the data from the server
function getData(page) { $('table tbody').empty() $.ajax({ 'url': 'http://localhost:8080/H2HBABBA1625/dummyServlet', 'type': 'GET', 'data': { page: page }, 'datatype': 'json' }).then(data => { data = JSON.parse(data) var tr = $('table tbody') data.map(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_data() {}", "getData(){}", "function getDataFromServer() {\n console.log('get server data')\n $.get('http://localhost:3000/getdata', function(result) {\n // console.log(result)\n\n result = JSON.parse(result)\n\n var carsData = result.cars.data\n var crime = resul...
[ "0.7574397", "0.73690146", "0.70125574", "0.69753534", "0.6917842", "0.68787664", "0.67791325", "0.6740077", "0.67112106", "0.6692892", "0.6654997", "0.6628924", "0.6593224", "0.6525021", "0.6505014", "0.648939", "0.6486086", "0.6475663", "0.6474108", "0.6449944", "0.644685",...
0.0
-1
Function to reset the stopwatch
function reset() { clearInterval(interval); ms = s = m = h = 0; document.getElementById("display").innerHTML = "00:00:00:00"; document.getElementById("startStop").innerHTML = "Start"; document.getElementById('lapText').innerHTML = ""; status = "stopped"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopwatchReset() {\r\n if (stopwatchStatus === 'started' || stopwatchStatus === 'paused') {\r\n window.clearInterval(interval)\r\n seconds = 0\r\n minutes = 0\r\n hours = 0\r\n\r\n document.querySelector('#counter').innerHTML = '00:00:00'\r\n stopwatchStatus = 'paused'\r\n }\r\n}", "...
[ "0.8263317", "0.78868407", "0.7865366", "0.7789778", "0.7786781", "0.7780326", "0.7780326", "0.7737294", "0.76871645", "0.7678454", "0.7571207", "0.7552051", "0.75146556", "0.7504237", "0.75001234", "0.74798685", "0.74745613", "0.74435246", "0.7404202", "0.7386709", "0.738473...
0.72891444
28
Function to display laps
function lap() { document.getElementById('lapText').innerHTML += `<p>${displayHours}:${displayMinutes}:${displaySeconds}:${displayMilliseconds}</p>`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "displayLasers(){\n for(let i = 0; i < lasers.length; i++){\n let laser = lasers[i];\n laser.move();\n laser.display();\n laser.laserTouch();\n }\n }", "show() {\n strokeWeight(2);\n fill(224, 65, 65);\n rect(this.x, this.y, this.w, this.h);\n\n // if the used job rectangle ...
[ "0.65363187", "0.64915174", "0.63877255", "0.63381916", "0.62199974", "0.6102788", "0.6068716", "0.594185", "0.5940676", "0.5936964", "0.58874375", "0.5881841", "0.58234876", "0.5788378", "0.5774092", "0.57665384", "0.57591915", "0.57575434", "0.5748277", "0.5740207", "0.5724...
0.66444856
0
Twitter Web Intent Button
function twitterButtonMeta() { if (quoteText.innerText !== "") { const webURL = `https://twitter.com/intent/tweet?text=${quoteText.innerText} - ${quoteAuthor.innerText}`; window.open(webURL, "_blank"); } else { alert("Tweet Data is not yet populated, try again later!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twitterButton() {\n var s = s_gi(s_account);\n s.eVar2 = 'Twitter';\n s.events = 'event12';\n s.trackExternalLinks = false;\n s.linkTrackVars = 'eVar2,events';\n s.linkTrackEvents = 'event12';\n s.tl(this, 'o', s.eVar2);\n}", "function tweet() {\n\ttweetBtn.setAttribute(\"href\", \"...
[ "0.7833138", "0.7645366", "0.76122415", "0.74459475", "0.742791", "0.73824614", "0.7353404", "0.7316075", "0.72729176", "0.7201847", "0.71545804", "0.7149022", "0.7009498", "0.68645614", "0.6812119", "0.676809", "0.6756128", "0.67309827", "0.6709654", "0.6700267", "0.6676779"...
0.7174491
10
input: filePath of excel file callback(records) records is array of arrays
function read_excel_file(filePath, callback){ excelParser.parse({ inFile: filePath, worksheet: 1, skipEmpty: false, },function(err, records){ if (err) console.error(err); typeof callback === 'function' && callback(records); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleExFile(e) {\n document.getElementById('excel').blur();\n\n\tNAME_LIST = [];\n\tvar files = e.target.files, f = files[0];\n console.log(excel.files[0].name.split('.').pop());\n\n\tif(!excelTypeCheck(excel.files[0])) {\n \treturn;\n \t}\n\n\tvar reader = new FileReader();\n\treader.onload = func...
[ "0.6457858", "0.6455349", "0.62296724", "0.6148661", "0.61139506", "0.60943913", "0.6035607", "0.58760744", "0.5739597", "0.57332444", "0.5687886", "0.5684987", "0.56793606", "0.5673345", "0.56569004", "0.56158", "0.55913126", "0.5586192", "0.556271", "0.5533437", "0.55055904...
0.7073651
0
this function excutes sql used by createDobTable()
function do_some_SQL (client, sql, callback) { client.connect(function(err){ if (err) { return console.error('could not connect to postgres', err); } client.query(sql, function(err, result){ if (err) { return console.error('query error', err) } //this disconnect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCreateTable() {\n\n var keyStr = '';\n var keyCol = '';\n\n var ddl = 'DROP TABLE IF EXISTS ' + gTblName + ';'\n\n ddl += newLine;\n\n // var ddl = 'CREATE TABLE ' + gTblNameUpper + ' (' + newLine;\n ddl += 'CREATE TABLE ' + gTblName + ' (' + newLine;\n\n for (var i = 1; i < gV...
[ "0.62008107", "0.6133881", "0.61106783", "0.6072589", "0.59852064", "0.5963423", "0.5882691", "0.5819846", "0.57646453", "0.5763504", "0.5757041", "0.57259274", "0.57155514", "0.56967837", "0.56907946", "0.5658477", "0.56051797", "0.56046075", "0.55897003", "0.5564893", "0.55...
0.0
-1
Contains a set of hooks to be called when various operations are performed on a hookable array's elements
function ElementHookCollection() { /** * @type {Function[]} */ this.onElementReferenceSetCallbacks = []; /** * @type {Function[]} */ this.onElementValueSetCallbacks = []; /** * @type {Function[]} */ this.onElementUnsetCallbacks = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hooks(){return hookCallback.apply(null,arguments)}", "function hooks(){return hookCallback.apply(null,arguments)}", "function applyHook (arr, arg1, arg2, arg3, arg4, arg5) {\n arr.forEach(function (fn) {\n fn(arg1, arg2, arg3, arg4, arg5)\n })\n}", "function callHooks(currentView,arr){for(var i...
[ "0.7317651", "0.7317651", "0.71452296", "0.64584", "0.63590115", "0.62486535", "0.62486535", "0.62486535", "0.6153869", "0.6037657", "0.6005855", "0.5946775", "0.593578", "0.5931732", "0.5931732", "0.5931732", "0.5931732", "0.589039", "0.58279073", "0.5819339", "0.58131236", ...
0.62751174
5
Try to map a node to all sides of this triangle that don't have a neighbor void MapTriangleToNodes(Triangle& t);
MapTriangleToNodes(t) { if (this.front_ === null) { throw new Error("this.front_ === null"); } for (let i = 0; i < 3; i++) { if (!t.GetNeighbor(i)) { // Node* n = front_->LocatePoint(t.PointCW(*t.GetPoint(i))); const n = this.front_.LocateP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rotateTrianglePair(t, p, ot, op) {\n var n1, n2, n3, n4;\n n1 = t.neighborCCW(p);\n n2 = t.neighborCW(p);\n n3 = ot.neighborCCW(op);\n n4 = ot.neighborCW(op);\n\n var ce1, ce2, ce3, ce4;\n ce1 = t.getConstrainedEdgeCCW(p);\n ce2 = t.getConstrainedEdg...
[ "0.57377946", "0.57224864", "0.54936296", "0.54827476", "0.54695934", "0.5370923", "0.5347439", "0.5266831", "0.5174743", "0.5151248", "0.50833434", "0.50790626", "0.50676394", "0.50285983", "0.4911989", "0.4893868", "0.48369232", "0.4821082", "0.4805183", "0.47834313", "0.47...
0.82703316
0
Point GetPoint(const int& index);
GetPoint(index) { return this.points_.at(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeInOffsetByIndex(x, y, index) {\n var outx = x + 15;\n var outy = y + 47 + index * 20;\n\n return { x: outx, y: outy };\n}", "function pointAt(index) {\n var y = Math.floor(index/w) * 1.5;\n var x = ((index + y/3) % w) * rt3;\n return {x: x, y:...
[ "0.7117669", "0.7050225", "0.6788835", "0.6652022", "0.6570453", "0.6551717", "0.64776117", "0.644447", "0.64352006", "0.6357566", "0.63529104", "0.6349525", "0.62419534", "0.6203459", "0.6184747", "0.6174074", "0.6151645", "0.6124953", "0.6121487", "0.6117371", "0.6091552", ...
0.76091355
0
for rounding to decimal places
function roundit(num,dex) { return parseFloat(num).toFixed(dex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundToDecimalPlace(value, decimal) {\r\n var factor = Math.pow(10, decimal);\r\n roundedValue = ((Math.round(value * factor))/factor).toFixed(decimal);\r\n return roundedValue;\r\n}", "function RoundDecimals(float) {\n var roundedFloat = Math.round(float * 10) / 10;\n return roundedFloat;\n ...
[ "0.711695", "0.7111932", "0.7093263", "0.69894254", "0.6966892", "0.69576955", "0.6957056", "0.69513786", "0.69166195", "0.68901163", "0.68674254", "0.68340963", "0.6805976", "0.67917323", "0.6777266", "0.67765355", "0.67475647", "0.6742682", "0.67203707", "0.67139536", "0.66...
0.7337368
0
enabling legend toggling without hanging in the last state
function legendClosure(name, key) { google.maps.event.addDomListener(document.getElementById(name + '_div'), 'click', function () { // the real legend toggling showDict[key] = !showDict[key]; if (showDict[key]!=true) { document.getElementById(name).src="https:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleLegend() {\n var button = d3.select(\"#btn_scene_toggleLegend\")[0][0];\n if(button.value == \"Remove Legend\") {\n button.value = \"Show Legend\";\n showLegend = false;\n } else {\n button.value = \"Remove Legend\";\n showLegend = true;\n }\n redraw(context.root);\n} // end toggleA...
[ "0.7705349", "0.7570516", "0.75012374", "0.728045", "0.72712314", "0.7142838", "0.7106217", "0.71001184", "0.70776147", "0.70358354", "0.69971377", "0.6935705", "0.6873846", "0.682868", "0.67633307", "0.6681451", "0.66568285", "0.66276896", "0.6617666", "0.66127104", "0.64246...
0.6837717
13
add data to map
async function addToMap(data, name) { let empty = Boolean(false); // scrape data from text callback response let rows = data.split('\n'); if (rows.length <= 1) { empty = Boolean(true); } if (empty === false) { for (let i = 0; i < rows.length - ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addData(key, value) {\n this.Serialize.addData(key, value);\n }", "function add(map, key, value) {\n fetch(map, key).add(value);\n}", "function add(map, key, value) {\n fetch(map, key).add(value);\n}", "function eqfeed_callback(data) {\n map.data.addGeoJson(data);\n }", "function eqfeed...
[ "0.65148616", "0.65142655", "0.65142655", "0.64365965", "0.64306176", "0.6401961", "0.63153934", "0.6273486", "0.62699276", "0.62332815", "0.6221927", "0.621562", "0.6175734", "0.6158281", "0.61183894", "0.6114473", "0.60513574", "0.60421544", "0.6038233", "0.5992232", "0.598...
0.62823504
7
for dynamic info windows
function setInfoWindow(allPage, k, i, marker, netDisplacement, totalDistance, avgVelocity, totalTime, legLength, legSpeed, legTime, GEBCODepth, EEZ, lat, lng) { // No more live requests since the data get read by grabIndData // makeWMSrequest(dataPoints[k]); google.ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InfoBarWindow(){}", "function information() {\n\t//alert(\"Created by Monica Michaud\\nIn the Institute for New Media Studies\\nAdviser: Gordon Carlson, PhD\\nDev Version: 0.2 (Apr 25)\");\n\n\tvar mapInfoBoxString;\n\t\n\tmapInfoBoxString = '<div id=\"content\"><h1 id=\"infoWindowHeading\" class=\"info...
[ "0.7568426", "0.73341227", "0.72246873", "0.7048647", "0.6988801", "0.6925267", "0.69147074", "0.68862957", "0.6785943", "0.6757487", "0.6754483", "0.67405164", "0.6734155", "0.6727168", "0.6710071", "0.6678896", "0.663082", "0.66148293", "0.6611635", "0.6611221", "0.6608989"...
0.62012273
83
delete all added markers
function clearMarkers() { for (let i = 0; i < markers.length; i++) { markers[i].setMap(null); } for (let i = 0; i < dropMarkers.length; i++) { dropMarkers[i].setMap(null); } markerNum=0; markers.length = 0; dropMarkers.length=0; dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteMarkers() {\r\n setMapOnAll(null);\r\n markers = [];\r\n }", "function deleteMarkers() {\n\n clearMarkers();\n markers = [];\n\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}",...
[ "0.8746498", "0.8729005", "0.87261117", "0.87261117", "0.87261117", "0.8722791", "0.8706614", "0.870597", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0.87028074", "0...
0.0
-1
close ALL info windows (stuff could have been left hanging if you click too quickly)
function closeIWindows() { for (let i = 0; i < iwindows.length; i++) { iwindows[i].close(); } iwindows = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeAllInfoWindows() {\n for (var i=0;i<infowins.length;i++) {\n infowins[i].close();\n infowins.splice(i, 1);\n }\n}", "function closeAllInfoWindows() {\n\tfor (var i=0;i<infoWindows.length;i++) {\n\t\tinfoWindows[i].close();\n\t}\n}", "function closeAllMarkersWindows() {\n\tvar keys = Obj...
[ "0.86925125", "0.8564588", "0.8192397", "0.8017867", "0.7920798", "0.7836474", "0.7820995", "0.7799062", "0.7748041", "0.76991296", "0.76485234", "0.7517645", "0.74641776", "0.7372011", "0.735043", "0.735043", "0.735043", "0.735043", "0.7267257", "0.7200919", "0.7182884", "...
0.68234515
31
handles async use of data
async function getFloatData(name) { clearMarkers(); let url; if (name === "all") { url = "https://geoweb.princeton.edu/people/simons/SOM/all.txt"; } else { url = "https://geoweb.princeton.edu/people/simons/SOM/" + name + showTail; } let dataPromi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "completed(data) {}", "function syncData() {}", "async processData(type, data) {\n const payload = {\n type, data\n }\n console.log(\"Calling handleData from cloudUser...\")\n return await handleData(payload)\n }", "async function StoredDataGetter(){\n\n return await updated_data;\n\n}", ...
[ "0.65509397", "0.6510695", "0.6394085", "0.6382737", "0.6298544", "0.6291526", "0.6281737", "0.6232637", "0.62081504", "0.61953175", "0.6182528", "0.6177811", "0.61770225", "0.6167254", "0.61538863", "0.6141359", "0.6121726", "0.6087322", "0.6086492", "0.6065808", "0.605562",...
0.0
-1
Grab float data from distances.txt
async function grabAllData(){ let dataArr=[]; let data = await fetchAndDecodeFloatData("https://geoweb.princeton.edu/people/sk8609/DEVearthscopeoceans/data/FloatInfo/distances.txt", 'text'); tempArr = data.split('\n'); for(let i=0; i<tempArr.length;i++){ let splitArr = tempAr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function grabIndData(Float){\n let dataArr=[];\n let data = await fetchAndDecodeFloatData(`https://geoweb.princeton.edu/people/sk8609/DEVearthscopeoceans/data/FloatInfo/${Float}.txt`, 'text');\n tempArr = data.split('\\n');\n for(let i=0; i<tempArr.length;i++){\n let sp...
[ "0.6266799", "0.58963054", "0.55773324", "0.5534366", "0.5458368", "0.5421081", "0.5285426", "0.52673453", "0.5235717", "0.52149403", "0.5201872", "0.51820207", "0.5136303", "0.5061028", "0.5058574", "0.5051513", "0.50466347", "0.50391406", "0.5024825", "0.496351", "0.4958854...
0.6627487
0
Gets time, distance, and depth
async function grabIndData(Float){ let dataArr=[]; let data = await fetchAndDecodeFloatData(`https://geoweb.princeton.edu/people/sk8609/DEVearthscopeoceans/data/FloatInfo/${Float}.txt`, 'text'); tempArr = data.split('\n'); for(let i=0; i<tempArr.length;i++){ let splitArr = te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Depth() {}", "get time ()\n\t{\n\t\tlet speed = parseInt (this.token.actor.data.data.attributes.movement.walk, 10);\n\t\t\n\t\tif (! speed)\n\t\t\tspeed = 30;\n\n\t\treturn speed / this.gridDistance;\n\t}", "get distance() {}", "function DISTANCE(here, there) {\n \n var mapObj = Maps.newDirectionFinder(...
[ "0.6271434", "0.6232298", "0.5984194", "0.5886497", "0.5882493", "0.58116114", "0.57304025", "0.57129747", "0.56929505", "0.56708187", "0.56501734", "0.559313", "0.5568701", "0.54554975", "0.5420293", "0.5389727", "0.53844094", "0.5362384", "0.5361103", "0.5351491", "0.534328...
0.0
-1
Injects compiled CSS/JS/HTML files into the main index page using gulpinject Also uses wiredep to include libs from bower_components
function inject(callback) { // Grab all of the compiled css files var injectStyles = gulp.src(path.join(config.paths.dev, config.paths.styles, '/**/*.css'), { read: false }); var injectStylesOptions = { ignorePath: [config.paths.src, path.join(config.paths.dev)], addRootSlash: false }; // Inject th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inject() {\n\n const injectStyles = gulp.src([\n 'src/assets/css/normalize.css',\n 'src/assets/css/topcoat/topcoat-desktop-light.css',\n 'src/assets/**/*.css'\n ], {read: false});\n\n const injectOptions = {\n ignorePath: ['src/'],\n addRootSlash: false,\n ...
[ "0.71322167", "0.7091961", "0.6842738", "0.6610468", "0.65285134", "0.6332572", "0.6306781", "0.6248213", "0.62262154", "0.6158753", "0.6129816", "0.6046693", "0.6044777", "0.60364723", "0.59398615", "0.59145343", "0.5904882", "0.5881265", "0.5879225", "0.58589405", "0.584977...
0.6465873
5
change color over hover function
function changeColor1() { console.log(this.id); const cDivChange = document.getElementById(this.id); cDivChange.style.backgroundColor = "pink"; // cDivChange.classList.add = "new-background"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseOverlink(){\n // Changed the color and background color in this function\n $(this).css('color', 'lime').css('background-color','blue');\n}", "function changeColor()\n\t{\n\t\t$('div div').mouseenter(function() \n\t\t{\n\t\t\t$(this).toggleClass('hover');\n\t\t});\n\t}", "function hoverButto...
[ "0.78836304", "0.76134425", "0.7598597", "0.7552804", "0.7435088", "0.7385897", "0.73299944", "0.72994447", "0.72788274", "0.72470504", "0.72297806", "0.7165106", "0.7149541", "0.71338016", "0.7092287", "0.7077333", "0.70342183", "0.69868296", "0.69224566", "0.69011366", "0.6...
0.0
-1
any special rendering we want to occur.
onclick(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_render() {}", "onBeforeRendering() {}", "static rendered () {}", "static rendered () {}", "function render() {\n\t\t\t}", "function render() {\n\n\t\t\t}", "function render() {\n\t\t\n\t}", "function render() {\n\t}", "function general_render(obj) {\n obj.render();\n }", "render() {}", "re...
[ "0.72275764", "0.71838546", "0.71016276", "0.71016276", "0.70250773", "0.69832045", "0.6942229", "0.68835384", "0.6879546", "0.6731949", "0.6731949", "0.6731949", "0.67253333", "0.6721431", "0.66653764", "0.6664835", "0.6664835", "0.6619843", "0.66169894", "0.6573162", "0.651...
0.0
-1
A Recursive promise call to load images one at a time
function loadImages(i=0,j=0){ return new Promise(function(resolve,reject){ if(j >= Object.keys(tiles).length){ resolve("Loaded all images"); return; } if(i >= Object.keys(tiles[Object.keys(tiles)[j]]).length){ loadImages(0,j+1).then(function(msg){ resolve(msg); }).catch(function(err){ reject(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadImages() {\n let data = arg.splice(1, arg.length - 1);\n let promise = [];\n data.forEach(img => {\n if(typeof img === \"string\") {\n let image = Canva2D.API.Preloader(\"singleImageOnly\", img);\n promise.push...
[ "0.78189987", "0.7396206", "0.71686983", "0.71121335", "0.69902384", "0.69570225", "0.69126505", "0.68489885", "0.6775809", "0.6747921", "0.6720045", "0.6715199", "0.66828054", "0.66714275", "0.6655029", "0.66428274", "0.66404057", "0.66297644", "0.6619906", "0.660698", "0.65...
0.71868724
2
REST This function register all listeners for the sockets server
registerListeners(){ this.io.on('connection', socket => { this.App.debug("Client connected", this.prefix); this.registerSocketListener(socket, 'send-message', data => { this.App.MessageOrm.getByChatName({chatName: data.room}, (err, rows) => { if (err)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_attachListeners () {\n const onListening = () => {\n const address = this._server.address()\n debug(`server listening on ${address.address}:${address.port}`)\n this._readyState = Server.LISTENING\n }\n\n const onRequest = (request, response) => {\n debug(`incoming request from ${reque...
[ "0.7682909", "0.73489237", "0.7195603", "0.7103228", "0.6906652", "0.6882505", "0.6839058", "0.6817593", "0.6777125", "0.6693215", "0.6668203", "0.6564401", "0.6546428", "0.65459555", "0.65360385", "0.65197814", "0.6514997", "0.64507025", "0.6449377", "0.6448341", "0.64393526...
0.7165871
3
Our Javascript will go here.
function initTrayPoints(nbPoints, opt, profile, threeDModel) { var points = profile.getPoints(nbPoints, threeDModel); trayDists = distanceMatrix(points); trayTsne = new tsnejs.tSNE(opt); // create a tSNE instance trayTsne.initDataDist(trayDists); if (threeDModel) { for (var i = 0; i ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dealers_page_elementsExtraJS() {\n // screen (dealers_page) extra code\n\n }", "function PaginaInicial_elementsExtraJS() {\n // screen (PaginaInicial) extra code\n\n }", "function jsOnLoad(){\n\n}", "function BaixarOrdemTV_elementsExtraJS() {\n // screen (BaixarOrdemTV) ex...
[ "0.6575352", "0.6517644", "0.65152514", "0.6373595", "0.6358351", "0.6320792", "0.6314898", "0.6306569", "0.6277005", "0.62477666", "0.62450266", "0.61967206", "0.6184761", "0.61219585", "0.61182165", "0.6116716", "0.6095176", "0.609028", "0.6088533", "0.60817116", "0.6077426...
0.0
-1
lodash (Custom Build) < Build: `lodash modularize exports="npm" o ./` Copyright jQuery Foundation and other contributors < Released under MIT license < Based on Underscore.js 1.8.3 < Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
function Unescape(text) { var INFINITY = 1 / 0; var symbolTag = '[object Symbol]'; var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g; var reHasEscapedHtml = RegExp(reEscapedHtml.source); var htmlUnescapes = { '&amp;': '&', '&lt;': '<', '&gt;': '>', '&quot;': '"', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function baseLodash() {}", "function baseLodash() {}", "function baseLodash() {}", "function baseLodash() {}", "function baseLodash() {}", "function baseLodash(){}", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// ...
[ "0.6757005", "0.6757005", "0.6757005", "0.6757005", "0.6757005", "0.6663067", "0.658102", "0.658102", "0.658102", "0.658102", "0.658102", "0.658102", "0.658102", "0.658102", "0.651845", "0.651845", "0.63910526", "0.629258", "0.62772447", "0.62772447", "0.6260932", "0.626093...
0.0
-1
youtube thumbnail (base) quality = empty or : 0, 1, 2, 3, low0, low1, low2, low3, medium0, medium1, medium2, medium3, high0, high1, high2, high3, max0, max1, max2, max3
function get_youtube_thumbnail(url, quality) { if (url) { var video_id, thumbnail, result; result = url.match( /(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/user\/\S+|\/ytscreeningroom\?v=))([\w\-]{10,12})\b/ ); video_id = result[1]; if (video_id) { let quality_key = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set quality(value) {}", "get quality() {}", "function getQuality(quality)\n{\n\tquality=decodeURIComponent(quality);\n\tif(quality.toLowerCase()==\"small\")\n\t\treturn \"240p\";\n\tif(quality.toLowerCase()==\"medium\")\n\t\treturn \"360p\";\n\tif(quality.toLowerCase()==\"large\")\n\t\treturn \"480p\";\n\tif(q...
[ "0.6840879", "0.6385369", "0.6355864", "0.629729", "0.61170053", "0.59873223", "0.5962237", "0.5956563", "0.5861067", "0.5855809", "0.5819462", "0.5806379", "0.5793285", "0.5788339", "0.573508", "0.573508", "0.573508", "0.573508", "0.5729142", "0.5709786", "0.5707149", "0.5...
0.69274455
0
It is adapted from
function openInfo(evt, tabName) { // Get all elements with class="tabcontent" and hide them tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } // Get all elements with class="tablinks" and remove the class "active" tabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "static private internal fun...
[ "0.6570817", "0.6472148", "0.63644534", "0.5997303", "0.59065104", "0.5903378", "0.5870434", "0.5775662", "0.5651806", "0.56272703", "0.55912364", "0.5484369", "0.54809904", "0.5395695", "0.5394636", "0.5382078", "0.5350636", "0.532121", "0.5320071", "0.5274764", "0.5261436",...
0.0
-1
generate a checkbox list from a list of products it makes each product name as the label for the checkbos
function populateListProductChoices(slct1, slct2) { var s1 = document.getElementsByName(slct1); var s2 = document.getElementById(slct2); var chosenPrefs = []; for (i = 0; i < s1.length; i ++) { if (s1[i].checked) { chosenPrefs.push(s1[i].value); } } // s2 represents the <div> in the Products tab, w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateListProductChoices(slct1, slct2) {\n var s1 = document.getElementById(slct1);\n\n var s2 = document.getElementById(slct2);\n\t\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\n s2.innerHTML = \"\";\n\t\t\n\t// obtain a reduced list...
[ "0.71238345", "0.7002626", "0.6842741", "0.68406904", "0.67195493", "0.66173613", "0.65710497", "0.654006", "0.650278", "0.6398395", "0.6384334", "0.6340262", "0.6336694", "0.62954986", "0.6278523", "0.6227908", "0.62262076", "0.61928904", "0.6191821", "0.6171947", "0.6137044...
0.6873513
2
This function is called when the "Add selected items to cart" button in clicked The purpose is to build the HTML to be displayed (a Paragraph) We build a paragraph to contain the list of selected items, and the total price
function selectedItems(){ var ele = document.getElementsByName("product"); var chosenProducts = []; var c = document.getElementById('displayCart'); c.innerHTML = ""; // build list of selected item var para = document.createElement("P"); para.innerHTML = "You selected : "; para.appendChild(document.createE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectedItems() {\n\n\tvar c = document.getElementById('displayCart')\n\tc.innerHTML = ''\n\n\n\t// build list of selected item\n\tvar para = document.createElement('P')\n\tpara.innerHTML = 'You selected : '\n\tpara.appendChild(document.createElement('br'))\n\tfor (i = 0; i < cart.length; i++) {\n\t\tpara...
[ "0.7670149", "0.7193816", "0.7171806", "0.70372707", "0.6934285", "0.68798023", "0.6806421", "0.67738956", "0.67636615", "0.66968435", "0.6645513", "0.6634592", "0.6633475", "0.66128176", "0.6612306", "0.66095614", "0.66038877", "0.65893686", "0.6585778", "0.65762156", "0.657...
0.7303101
1
capitalizes a sentence passed to it
function capitalize(string) { if (string.indexOf(" ") !== -1) { var arr = string.split(" "); var capitals = arr.map(capitalizeWord); return capitals.join(" "); } else { return capitalizeWord(string); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wordToUpper(strSentence) {\r\n return strSentence.toLowerCase().replace(/\\b[a-z]/g, convertToUpper);\r\n\r\n function convertToUpper() { \r\n\t\treturn arguments[0].toUpperCase(); \r\n\t} \r\n}", "function sentenceCapitalizer(text) {\n let words = text.toLowerCase().split(' ');...
[ "0.779856", "0.7724027", "0.75484776", "0.7546282", "0.7521908", "0.7505793", "0.7475641", "0.742737", "0.741969", "0.73814964", "0.73811716", "0.73753524", "0.73753524", "0.7375128", "0.73459774", "0.73022485", "0.72983915", "0.7291631", "0.72837454", "0.72716814", "0.726987...
0.0
-1
capitalizes a single word
function capitalizeWord(string) { return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function capitalize(str) {}", "function capitalise(word) {\n var lowerCase = word.toLowerCase();\n return lowerCase.charAt(0).toUpperCase() + lowerCase.slice(1).trim();\n}", "function CapitalizeWord(str)\n {\n return str.replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.s...
[ "0.8070783", "0.800358", "0.79591554", "0.78803617", "0.7834327", "0.7818528", "0.780849", "0.7802649", "0.77650654", "0.7759977", "0.7739598", "0.77263695", "0.7724416", "0.77139807", "0.7688254", "0.7677595", "0.7665198", "0.7629969", "0.76225066", "0.7563027", "0.75520056"...
0.7354588
53
Rotates a color through the color wheel
function Gradient(){ this.name = "Gradient" this.config = { color1: { type: 'color', value: { r: 255, g: 233, b: 61 } }, color2: { type: 'color', value: { r: 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorwheel(a,theta,x){return a*(1+cos(theta+x))}", "function colorwheel(pos) {\n pos = 255 - pos;\n if (pos < 85) { return rgb2Int(255 - pos * 3, 0, pos * 3); }\n else if (pos < 170) { pos -= 85; return rgb2Int(0, pos * 3, 255 - pos * 3); }\n else { pos -= 170; return rgb2Int(pos * 3, 255 - ...
[ "0.7527692", "0.68551666", "0.6577385", "0.64627516", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", "0.6375109", ...
0.0
-1
Middleware / This function gets latest 25 comments from a subreddit. After it serperates the string by spaces and removes any special characters it then iterates through every word and counts the frequency. Results are stored in a dictionary where the key is the word and the value is the words frequency. Then the resul...
function insertData(){ let words = new Array(); let commentlist = r.getSubreddit('wallstreetbets').getNewComments(); let cleanData = async () => { let result = await (commentlist); return result; }; cleanData().then(function(result) { let stopwords = ["still","W...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWordCounts(inputString){\n if(inputString !== \"\"){\n var words = inputString.split(' ');\n words.forEach(function(w) {\n if (!wordDict[w]) {\n wordDict[w] = 0;\n }\n wordDict[w] += 1;\n });\n if(showStats===1){\n ...
[ "0.5637976", "0.5623303", "0.5490218", "0.5443297", "0.5422858", "0.5367084", "0.5342306", "0.5306612", "0.52853423", "0.5262503", "0.5219673", "0.51815236", "0.5155438", "0.5144042", "0.51004237", "0.50947946", "0.50794876", "0.50735694", "0.5048024", "0.5044307", "0.5043653...
0.55298334
2
sort stocks by price
render() { let portfolioStocks = this.state.portfolio.map(id => this.state.stocks.find(stock => stock.id === id)) let displayStocks = this.sortStocks() return ( <div> <SearchBar sorted={this.state.sorted} changeSort={this.changeSort} changeFilter={this.changeFilter}/> <div classNam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortQuotes(){\n /**\n * sort all the prices from cheaper to expensive\n */\n quotes.sort(function(a, b) {\n return unformatNumber(a.price) - unformatNumber(b.price);\n });\n}", "static byPrice() {\n // how to sort in descending order\n // var points = [40, 100, 1, 5, 25, 1...
[ "0.77467066", "0.7579732", "0.7475155", "0.7466622", "0.7318676", "0.7292306", "0.72474754", "0.7224767", "0.72093093", "0.71159804", "0.7086753", "0.7059093", "0.70556825", "0.70179665", "0.6978014", "0.6960935", "0.6940291", "0.6936307", "0.6790045", "0.6771037", "0.6769535...
0.0
-1
creates a type object for the contract the function was defined in
function functionTableEntryToType(functionEntry) { if (functionEntry.contractNode === null) { //for free functions return null; } return { typeClass: "contract", kind: "native", id: import_1.makeTypeId(functionEntry.contractId, functionEntry.compilationId), ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _makeBaseContract_(type) {\n if(type == \"number\") return (typeOfNumber);\n else if(type == \"string\") return (typeOfString);\n else if(type == \"boolean\") return (typeOfBoolean);\n else if(type == \"undefined\") return (typeOfUndefined);\n else if(type == \"object\") return (typeOfObject);\n els...
[ "0.6744115", "0.6345683", "0.6112678", "0.6010924", "0.5800416", "0.5783162", "0.57617193", "0.5748591", "0.5701726", "0.56932753", "0.56841224", "0.566529", "0.5630398", "0.555061", "0.5545096", "0.5542358", "0.5505796", "0.54023504", "0.53929186", "0.53514946", "0.5346587",...
0.5997338
5
Adds disables cards so they cannot be clicked
function disable(){ Array.prototype.filter.call(cards, function(card){ card.classList.add('disabled'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disable() {\n openCards[0].classList.add('disabled');\n openCards[1].classList.add('disabled');\n allCards.forEach(function(card) {\n card.classList.add('disabled');\n });\n}", "function disable() {\n Array.prototype.filter.call(cards, function(cards) {\n card.classList.add(\"disa...
[ "0.79090816", "0.7895395", "0.7769206", "0.77558255", "0.7754847", "0.7651944", "0.75493187", "0.7502452", "0.7501851", "0.7492654", "0.74841756", "0.74680257", "0.7446873", "0.7397985", "0.7361252", "0.7357954", "0.7344112", "0.7286452", "0.72707963", "0.7255122", "0.7228226...
0.7510241
7
enable cards and disable matched cards
function enable(){ Array.prototype.filter.call(cards, function(card){ card.classList.remove('disabled'); for(var i = 0; i < matchedCards.length; i++){ matchedCards[i].classList.add("disabled"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enable() {\n Array.prototype.filter.call(cards, function(card) {\n card.classList.remove(\"disabled\");\n for (var i = 0; i < matchedCard.length; i++) {\n matchedCard[i].classList.add(\"disabled\");\n }\n });\n}", "function enable() {\n Array.prototype.filter.call(cards, function (card)...
[ "0.82927895", "0.8286131", "0.81580585", "0.8155706", "0.80238324", "0.79862046", "0.7738137", "0.7726482", "0.7612761", "0.74629796", "0.7360714", "0.7322394", "0.72261035", "0.72146314", "0.71507835", "0.7141866", "0.7128677", "0.7127913", "0.7119836", "0.71009874", "0.7093...
0.7960289
6
Check to see if cards are a match, if they are, adds match properties and if they are not, returns the cards back face down
function checkMatch(currentCard, previousCard) { setTimeout(function() { if (toggledCards[0].innerHTML === toggledCards[1].innerHTML) { toggledCards[0].classList.toggle("match", "disabled"); toggledCards[1].classList.toggle("match", "disabled"); matchedCards.push(toggledCards[0]); matchedC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForMatch() {\n let isMatch = (firstCard.dataset.name === secondCard.dataset.name); \n if (isMatch) {\n disableCards();\n matchCount += 2; \n } else {\n unFlipCards(); \n }\n}", "function cardMatch() {\n if(cardSelections[0].firstElementChild.className === car...
[ "0.73003346", "0.7269484", "0.7195039", "0.7188889", "0.7164889", "0.71636474", "0.7160941", "0.71304715", "0.7124965", "0.7103338", "0.7077882", "0.7072709", "0.7051769", "0.70117855", "0.7006389", "0.6997816", "0.69925463", "0.6977488", "0.6972607", "0.6961681", "0.6961133"...
0.0
-1
Count up timer provided from StackOverflow
function timeInterval() { interval = setInterval(displayTime, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countUp() {\n time = time + 1\n timer.innerHTML = time\n }", "function timer() {\n setInterval(() => {countUp();}, 1000);\n}", "function counter() {\n\ttimerNow = Math.floor(Date.now() / 1000);\n\tcurrentTimer = timerNow - timerThen;\n\treturn currentTimer;\n}", "function count() {\n time...
[ "0.74421453", "0.74304867", "0.7253707", "0.7228401", "0.71877944", "0.7177126", "0.7152808", "0.7103036", "0.705113", "0.7005871", "0.69851816", "0.69643825", "0.69495153", "0.68879944", "0.68807155", "0.6870092", "0.6867448", "0.68415177", "0.68358934", "0.6816967", "0.6816...
0.0
-1
Displays modal after winning
function checkGameOver() { if (matchedCards.length == 16) { gameOverText(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gameDraw(){\n $(\"#winMsg\").html(\"Game is a draw!! Play Again!\");\n $(\"#winModal\").modal(\"show\");\n }", "function showModalGameOver(){\n var stringGameOverModal=\"Felicidades! Su puntuación final es: \"+juego.getScore();\n var p=document.getElementById(\"gameOverModalP\");\n p.in...
[ "0.7775623", "0.76638955", "0.75036275", "0.74830043", "0.7405139", "0.7398907", "0.73937726", "0.7374621", "0.73305446", "0.72710156", "0.7241142", "0.7210416", "0.7180967", "0.7168", "0.7163231", "0.7126503", "0.711756", "0.7103465", "0.7099139", "0.7092228", "0.70862067", ...
0.0
-1
Rating system to show three stars and then removes stars after a certain amount of moves
function rating () { if (moves < maxStars) { ratingStar = "<i class= 'star fas fa-star'></i><i class= 'star fas fa-star'></i><i class='star fas fa-star'></i>"; } else if (moves < minStars) { stars[2].style.color = "#444"; ratingStar = "<i class='star fas fa-star'></i><i class= 'star fas fa-star'></i>"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function starRating() {\n if (moves > 13 && moves < 16) {\n starCounter = 3;\n } else if (moves > 17 && moves < 27) {\n starCounter = 2;\n } else if (moves > 28) {\n starCounter = 1;\n }\n showStars(starCounter);\n }", "function recalcStars() {\n const stars = document.querySele...
[ "0.8504081", "0.8085305", "0.8018432", "0.7990851", "0.7953461", "0.794036", "0.7937681", "0.7900717", "0.78490096", "0.7838171", "0.7827704", "0.7803736", "0.77422833", "0.7721286", "0.76983905", "0.7685585", "0.76812255", "0.7678665", "0.7662117", "0.76504904", "0.7639948",...
0.7420619
34
Method to load resource preference info from props and then run the Method to fetch books
loadFilter(token) { let url = hostUrl.url + "/instance-types?limit=30"; axios.get(url, { headers: { 'X-Okapi-Tenant': 'diku', 'X-Okapi-Token': token, }, }) .then((response) => { this.setState(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadBooks() {\n const data = {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n credentials: 'include',\n // Authorization: 'Kinvey ' + localStorage.getItem('authToken'),\n };\n\n fetch(url...
[ "0.62201107", "0.6143052", "0.6138654", "0.6130056", "0.60673875", "0.60673875", "0.6054763", "0.6031109", "0.5958807", "0.59501916", "0.5934147", "0.5915574", "0.58968735", "0.5858546", "0.58303344", "0.5803628", "0.5620129", "0.562", "0.561793", "0.5598792", "0.5580903", ...
0.0
-1