query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
parse the tweet string for a postcode
function getTweetPostcode(tweetString){ var postcodeRegEx = "^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z]0-9][A-Za-z])|([A-Z-z][A-Ha-hJ-Yj-y][09]?[A-Za-z])))) {0,1}[0-9][A-Za-z]{2})"; var match = tweetString.match(postcodeRegEx); var tweetPostcode = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPostcode (str) {\n return str.match(/[0-9]{4} ?[a-zA-Z]{2}/) !== null;\n }", "function isValidPostcode(p) {\n var postcodeRegEx = /[A-Z]{1,2}[0-9]{1,2} ?[0-9][A-Z]{2}/i;\n return postcodeRegEx.test(p);\n }", "function parseTweets(tweets) {\n return tweets.map(function(t...
[ "0.59605575", "0.56757414", "0.5586621", "0.5521154", "0.53705263", "0.5343695", "0.5254613", "0.5180446", "0.51688814", "0.5156728", "0.51413906", "0.5119535", "0.50873834", "0.50489455", "0.50329673", "0.5002846", "0.4965431", "0.4897226", "0.4859624", "0.48346633", "0.4821...
0.7480015
0
call to the API to convert postcode to lat/lon
function getLongLatFromPostcode(postCode, callback) { var longLatValue = {}; var postcodesAPI = new postcodesIO(); postcodesAPI.lookup(postCode, function (error, longLatValue) { if(error){ log("getLongLatFromPostcode - postcodesAPI error = " + error); return callback(error); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToLat(postal_code) {\n\tvar lat = -1; \n\t$.ajax({\n\t\tasync: false, \n\t\turl: \"http://maps.googleapis.com/maps/api/geocode/json?address=\" + postal_code, \n\t\tsuccess: function(result){\n\t\t lat = result.results[0].geometry.location.lat ; \n\t\t }\n\t}); \n \n return lat; \n}", "fun...
[ "0.66768426", "0.6459811", "0.64132696", "0.63870907", "0.63671464", "0.6367009", "0.63111365", "0.6304386", "0.6273726", "0.62529695", "0.62376297", "0.62124807", "0.61627775", "0.6105581", "0.6065148", "0.60544956", "0.6054452", "0.60384744", "0.603688", "0.602551", "0.6010...
0.72912663
0
using long and lat, look up the nearest pharmacy
function getNearestPharmFromLongLat(geoLocation, callback){ var serviceReply = {}; var requestUrl = env.nearby_service_api + "latitude=" + geoLocation.latitude + "&" + "longitude=" + geoLocation.longitude; request(requestUrl, function (error, response, body) { if(error){ log(error); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findCloseBy(lat,long,dist){\n let earthRadius = 6371000;\n let latDiff = this.toDegrees(dist/earthRadius);\n let longDiff = this.toDegrees(dist/(Math.cos(this.toRadians(lat)) * earthRadius));\n let latUpper = lat+latDiff;\n let latLower = lat-latDiff;\n let longUpper = lon...
[ "0.665428", "0.661225", "0.6591713", "0.65274286", "0.64820737", "0.6467048", "0.63408357", "0.62411875", "0.6234896", "0.62302226", "0.6225386", "0.62204057", "0.62072855", "0.6187239", "0.61702687", "0.61698306", "0.6165188", "0.61568356", "0.61550367", "0.61484677", "0.614...
0.7078124
0
Add number of goals for each team to teamGoals
function processTeam(team, goals) { // Add number of goals for the team to teamGoals if (goals > 0) { if (team in teamGoals) { teamGoals[team].push(goals); } else { teamGoals[team] = [goals]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goals (laLigaGoals, copaDelReyGoals, championsLeagueGoals) {\n let sum = laLigaGoals + copaDelReyGoals + championsLeagueGoals\n return sum\n}", "function goals(laLigaGoals, copaDelReyGoals, championsLeagueGoals) {\n return laLigaGoals + copaDelReyGoals + championsLeagueGoals;\n}", "function g...
[ "0.6818247", "0.6770292", "0.6730385", "0.66089416", "0.6592199", "0.6249314", "0.62461203", "0.6010488", "0.5949052", "0.5872901", "0.5807882", "0.56297064", "0.5625647", "0.5601589", "0.5546945", "0.55362666", "0.5510019", "0.54202366", "0.53867507", "0.53867507", "0.538675...
0.7631415
0
Overall Quarter Sales Amount Line Graph
function quarter() { $('#quarter').highcharts({ title: { text: 'Overall Quarter Sales', x: -20 //center }, xAxis: { categories: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'] }, yAxis: { title: { text: 'Sal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function employeeSalesGraph(r) {\n\n let employeeArray = []\n let employeeSalesArray = []\n let employeeSalesMaster = []\n\n // Creates the Employee Array for the Fetch Date Range\n r.forEach(item => {\n if (employeeArray.includes(item.Employee.full_name) === false) {\n employeeArray.push(item.Employe...
[ "0.5937321", "0.5708626", "0.5608259", "0.5591238", "0.547774", "0.5473805", "0.54433066", "0.53842163", "0.52844554", "0.5260964", "0.5194927", "0.51838934", "0.5163431", "0.5152338", "0.5131954", "0.51158017", "0.51108426", "0.5098288", "0.5049248", "0.5032134", "0.5030551"...
0.63917285
0
fucntion for copying file src:file to be read dist: target file :callback: callback function
function copyFile(src,dist, callback){ //read file fs.readFile(src,function(err,data){ if(err){ //使用回调函数返回错误对象err return callback(err); }else{ fs.writeFile(dist,data.toString(),function(err){ if(err){ return callback(err); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyFile(src, dest) {\n\tvar srcfile = path.join(rootdir, src);\n\tvar destfile = path.join(rootdir, dest);\n\tconsole.log(\"copying \"+srcfile+\" to \"+destfile);\n\tvar destdir = path.dirname(destfile);\n\tif (fs.existsSync(srcfile) && fs.existsSync(destdir)) {\n\t fs.createReadStream(srcfile).pipe(\n...
[ "0.72370064", "0.7130382", "0.70066994", "0.67390084", "0.67250687", "0.6645769", "0.6615362", "0.6613005", "0.65853363", "0.6562527", "0.65024847", "0.64835817", "0.6482566", "0.64590305", "0.6415619", "0.64102536", "0.6409947", "0.631089", "0.63085604", "0.6284929", "0.6271...
0.8211339
0
Email: Picture URL: Get data from business layer via a HTTP GET request to the /getuser/:useremail route
function getDataFromBusinessLayer() { event.preventDefault(); const email = $('#email').val(); console.log(email); // Perform the GET request to the business layer $.ajax({ url: `http://localhost:8081/get-user/${email}`, type: "GET", success: function (user) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getuserid(emailId) {\n return this.http.get(`${this.useridurl}/${emailId}`);\n }", "function getUserPictureLink(email) {\n return \"https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=\" + email + \"&UA=0&size=HR64x64\";\n}", "function lookupEmail(email) {\n $.ajax({\n ty...
[ "0.6635118", "0.6579665", "0.6455505", "0.64260733", "0.63808304", "0.6366576", "0.63476866", "0.6329999", "0.6308515", "0.6284315", "0.6246311", "0.6237382", "0.62326515", "0.61990297", "0.6197756", "0.6170263", "0.60397285", "0.6008033", "0.59725916", "0.59571135", "0.59361...
0.6867625
0
Will convert the difference in milliseconds to a whole number of days.
function ConvertDifferenceToDays(diff){ var result = diff / (1000*60*60*24) //Logger.log(result.toFixed()); return result.toFixed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDays(milliseconds) {\n return milliseconds / 1000 / 60 / 60 / 24;\n }", "function getDays(milliseconds)\n\t{\n\t\treturn milliseconds / 1000 / 60 / 60 / 24;\n\t}", "function numDays( ms )\n{\n return Math.round( (((ms/1000)/60)/60)/24 );\n}", "function getDiffInDays(date1, date2){\n ...
[ "0.75063205", "0.7416329", "0.68804604", "0.6789586", "0.6735888", "0.6669718", "0.66473025", "0.65974635", "0.65383285", "0.65220195", "0.6513175", "0.64388615", "0.63245916", "0.63006556", "0.62922686", "0.6278382", "0.62620187", "0.61863595", "0.6185894", "0.6185894", "0.6...
0.76925623
0
disable overlay and cleanup
function disable_overlay() { overlay.remove(); chrome.storage.sync.set({overlay_on: false}, function() { console.log('disable overlay'); }); document.documentElement.style.overflow = page_overflow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideOverlay(){\n overlay.hideNow()\n }", "function dontRemoveOverlay(e){\n e.stopPropagation();\n}", "function overlayOff(){\n\tdocument.documentElement.style.overflow = \"auto\";\n\tdocument.getElementById(\"overlay\").style.display = \"none\";\n\tdocument.getElementById(\"overlay-img\").style...
[ "0.7579333", "0.75232106", "0.74736685", "0.7364118", "0.73180544", "0.72764766", "0.7276381", "0.7268447", "0.72641253", "0.71575147", "0.7056669", "0.6975826", "0.69498426", "0.6889376", "0.6883814", "0.6870765", "0.6863573", "0.68447655", "0.6817866", "0.68039453", "0.6767...
0.7853947
0
Calling this method ensures thar the build folder exists
checkBuildFolder() { this.fs.mkdirSync(this.buildPath([BUILD_FOLDER]), {recursive: true}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static setupBuildDir() {\n\t\tif (!global.projRoot) {\n\t\t\tglobal.projRoot = '.';\n\t\t}\n\n\t\tconst\n\t\t\trootPath = path.join(global.projRoot, 'Build', `${global.hostOS}-${global.platformOS}`),\n\t\t\tappDir = path.join(rootPath, 'App'),\n\t\t\tmoduleDir = path.join(rootPath, 'Module'),\n\t\t\tappLog = path....
[ "0.71266264", "0.6927412", "0.65897393", "0.6469535", "0.62620366", "0.6239817", "0.62358195", "0.6231945", "0.62148565", "0.61717975", "0.61655563", "0.6127599", "0.6110325", "0.59603995", "0.5899835", "0.5820146", "0.5795101", "0.5792961", "0.57867455", "0.57736623", "0.577...
0.861213
0
List of all chapter file names
getChapterFiles() { const files = this.fs .readdirSync(this.buildPath([SRC_FOLDER]), { withFileTypes: true }) .filter(item => item.isFile() && item.name.split('.').pop() === FILE_EXTENSION); return files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChapterFilePaths() {\n const files = this.getChapterFiles()\n .map(item => this.buildChapterFilePath(item.name));\n return files;\n }", "function getFileNames() {\n\tvar fileNames = fs.readdirSync( config.sourceDirectory );\n\treturn fileNames.filter( fileMatch );\n}", "function ...
[ "0.7363814", "0.60339", "0.5919044", "0.58717096", "0.583997", "0.5801962", "0.57917726", "0.5733804", "0.57120025", "0.57120025", "0.5488976", "0.54333735", "0.54311645", "0.54154766", "0.53962314", "0.53910065", "0.5320033", "0.5316975", "0.5313427", "0.52870625", "0.528612...
0.7134117
1
List of all chapter file relative paths
getChapterFilePaths() { const files = this.getChapterFiles() .map(item => this.buildChapterFilePath(item.name)); return files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChapterFiles() {\n const files = this.fs\n .readdirSync(this.buildPath([SRC_FOLDER]), { withFileTypes: true })\n .filter(item => item.isFile() && item.name.split('.').pop() === FILE_EXTENSION);\n return files;\n }", "function walkContentDir() {\n\tlet paths = [];\n\n\tre...
[ "0.7057296", "0.5849329", "0.58481467", "0.5729879", "0.56955945", "0.5614706", "0.5568818", "0.5552404", "0.5521308", "0.5480319", "0.544916", "0.54174244", "0.53962815", "0.5383355", "0.5379426", "0.53749764", "0.5358884", "0.5358139", "0.535619", "0.53278756", "0.5322163",...
0.78437203
0
The chapter relative path for a given chapter number
getChapterFilePath(chapterNumber) { const file = this.getChapterFiles() .find(item => item.name.substring(0,2) === this.padChapter(chapterNumber)); const result = file ? this.buildChapterFilePath(file.name) : null; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildChapterFilePath(fileName) {\n return this.buildPath([SRC_FOLDER, fileName]);\n }", "buildChapterFilePathWithIndex(chapterIndex, title) {\n return this.buildChapterFilePath(this.buildChapterFileName(chapterIndex, title));\n }", "function getChapterNo(httpDoc) {\n var chapterNo, lastVal...
[ "0.6434629", "0.61606133", "0.6112753", "0.598411", "0.58825195", "0.5842785", "0.5788782", "0.5763339", "0.57349265", "0.5723161", "0.56690174", "0.5528637", "0.5455004", "0.54439676", "0.5432041", "0.533072", "0.53025496", "0.52607197", "0.51811564", "0.51679605", "0.515729...
0.75888467
0
List of all file names in the images folder for a given chapter number
getChapterImagesFiles(chapterNumber) { const folderName = this.buildChapterImagesPath(chapterNumber); return this.fs.readdirSync(folderName, { withFileTypes: true }) .filter(item => item.isFile() === true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFileNamesFromDirectory(num, path){\n\n\tlet photoArr = [];\n\n\tfor(let i = 1; i < (num +1); i ++){\n\t\tphotoArr.push(path+i+'.jpg');\n\t}\n\n\tputPhotosInModal(photoArr);\n}", "getChapterFilePaths() {\n const files = this.getChapterFiles()\n .map(item => this.buildChapterFilePath(...
[ "0.6899288", "0.6665701", "0.6476021", "0.6311054", "0.625766", "0.61372817", "0.5979099", "0.58467233", "0.567052", "0.5601507", "0.5491216", "0.5483165", "0.5473718", "0.5473718", "0.54581773", "0.5447219", "0.54025", "0.5377091", "0.5372457", "0.53392273", "0.532189", "0...
0.8077332
0
Total number of chapters in the book
chaptersCount() { const imagesFolders = this.getImagesFolders().length; return imagesFolders || 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function totalBooksCount(books) {\n return books.length;\n}", "function GetTotalNumberOfPages() {\n if (CategoryList.length > 0) {\n //get total number of pages in the published/previewed course\n TotalPagesInCourse = ((CategoryList[CategoryList.length - 1].LastQuestion) - (CategoryList[0].FirstQuestion)...
[ "0.7196353", "0.6991293", "0.6688848", "0.6625709", "0.65731645", "0.6520221", "0.6422741", "0.6350312", "0.6098643", "0.6095724", "0.60498357", "0.6037935", "0.60200864", "0.5962449", "0.59453493", "0.5933974", "0.59329534", "0.58961904", "0.5892321", "0.58668613", "0.586433...
0.7151474
1
Builds a relative path prepending all given path segments with the base path of the project
buildPath(parts) { const x = [ BASE_FOLDER, ...parts, ]; return x.join('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function relativeToProject(...pathSegments) {\n return path_1.join(process.cwd(), ...pathSegments);\n}", "function relativeToAcumen(...pathSegments) {\n return path_1.join(__dirname, \"../../../\", ...pathSegments);\n}", "function joinPaths(base) {\n var paths = [];\n for (var _i = 1; _i < argument...
[ "0.772794", "0.71549505", "0.70504993", "0.6732299", "0.6716261", "0.6675838", "0.66552436", "0.6652984", "0.6602928", "0.65299207", "0.6528959", "0.6528959", "0.6503126", "0.64935064", "0.6492264", "0.64335465", "0.6401045", "0.63947207", "0.6383297", "0.63687557", "0.632257...
0.74225235
1
Builds the file name for a chapter given its number and a title
buildChapterFileName(chapterIndex, title) { return this.padChapter(chapterIndex) + '-' + title + '.' + FILE_EXTENSION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildChapterFilePathWithIndex(chapterIndex, title) {\n return this.buildChapterFilePath(this.buildChapterFileName(chapterIndex, title));\n }", "getChapterFilePath(chapterNumber) {\n const file = this.getChapterFiles()\n .find(item => item.name.substring(0,2) === this.padChapter(chapte...
[ "0.7206978", "0.64616185", "0.60420513", "0.5742635", "0.56577164", "0.5612435", "0.5559951", "0.5528617", "0.549603", "0.54878604", "0.5471429", "0.5468147", "0.5451191", "0.54359907", "0.543554", "0.5394391", "0.5393392", "0.5375737", "0.53714144", "0.5333167", "0.5330128",...
0.8261733
0
Builds the file path for a chapter given its file name
buildChapterFilePath(fileName) { return this.buildPath([SRC_FOLDER, fileName]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChapterFilePath(chapterNumber) {\n const file = this.getChapterFiles()\n .find(item => item.name.substring(0,2) === this.padChapter(chapterNumber));\n const result = file ? this.buildChapterFilePath(file.name) : null;\n return result;\n }", "buildChapterFilePathWithIndex(cha...
[ "0.754818", "0.7110959", "0.6866287", "0.621971", "0.60768455", "0.58466417", "0.5698708", "0.53525937", "0.5315859", "0.5291459", "0.5281936", "0.52627575", "0.52515155", "0.52279633", "0.5226792", "0.51774365", "0.5147338", "0.51429147", "0.5125839", "0.5014311", "0.5006016...
0.7545024
1
Builds the file path for a chapter given its chapter number
buildChapterFilePathWithIndex(chapterIndex, title) { return this.buildChapterFilePath(this.buildChapterFileName(chapterIndex, title)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChapterFilePath(chapterNumber) {\n const file = this.getChapterFiles()\n .find(item => item.name.substring(0,2) === this.padChapter(chapterNumber));\n const result = file ? this.buildChapterFilePath(file.name) : null;\n return result;\n }", "buildChapterFilePath(fileName) {\...
[ "0.7978621", "0.6862729", "0.67357343", "0.63364995", "0.5628036", "0.55903405", "0.5540937", "0.5537059", "0.5417216", "0.5388247", "0.53542036", "0.53118277", "0.52603084", "0.5224268", "0.5173889", "0.5153706", "0.5151119", "0.51463515", "0.5117935", "0.5103759", "0.509745...
0.7313487
1
Builds the images path for a chapter given its number
buildChapterImagesPath(chapterIndex) { return this.buildPath([SRC_FOLDER, IMAGES_FOLDER, this.padChapter(chapterIndex)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChapterFilePath(chapterNumber) {\n const file = this.getChapterFiles()\n .find(item => item.name.substring(0,2) === this.padChapter(chapterNumber));\n const result = file ? this.buildChapterFilePath(file.name) : null;\n return result;\n }", "function generateURLForImage(chap...
[ "0.66113484", "0.64597815", "0.6438204", "0.59194314", "0.5898222", "0.58701915", "0.5842195", "0.57259125", "0.572502", "0.5722926", "0.561821", "0.56107575", "0.55097216", "0.5489379", "0.53472537", "0.5261107", "0.5212196", "0.5191735", "0.51227576", "0.5110691", "0.510664...
0.789188
0
Builds a chapter file name by changing the chapter number of an existing file name
changeChapterFileIndex(fileName, newIndex) { return this.padChapter(newIndex) + fileName.substring(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildChapterFileName(chapterIndex, title) {\n return this.padChapter(chapterIndex) + '-' + title + '.' + FILE_EXTENSION;\n }", "getChapterFilePath(chapterNumber) {\n const file = this.getChapterFiles()\n .find(item => item.name.substring(0,2) === this.padChapter(chapterNumber));\n ...
[ "0.7615675", "0.66516364", "0.6604297", "0.633919", "0.6188146", "0.5599921", "0.55575407", "0.5553405", "0.554842", "0.54897755", "0.54690796", "0.5416357", "0.5396837", "0.53541327", "0.534983", "0.5329045", "0.531665", "0.5312874", "0.5312073", "0.52855676", "0.5193034", ...
0.71764714
1
findReplacementIcon looks for id's specified and calls replace functions
function findReplacementIcons() { var replacementIconLabels = jQuery("#pageList span.label:contains('Replacement Icon')").addClass("replacementicon"); jQuery("#pageList span.replacementicon:contains('Everything Replacement') ~ span").find("img:first").attr("id", "replacementIcon"); var replaceAllIconsImg = jQuery(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replaceContentTypeIcon(contentIconSrc, textID, replacementIconID) {\n\tjQuery(\"#pageList span.replacementicon:contains('\"+textID+\" Replacement') ~ span\").find(\"img:first\").attr(\"id\", replacementIconID);\n\tif (jQuery(\"#\"+replacementIconID).length)\n\t\tjQuery(\"#pageList img[src*='\"+contentIcon...
[ "0.7197308", "0.6672921", "0.6581381", "0.6506607", "0.63603294", "0.6299352", "0.60493106", "0.6044318", "0.5862912", "0.58259046", "0.5763543", "0.5734125", "0.57133067", "0.57025623", "0.5683286", "0.5667091", "0.5667091", "0.5650147", "0.56370676", "0.5626607", "0.5613687...
0.72341925
0
content type replace call
function replaceContentTypeIcon(contentIconSrc, textID, replacementIconID) { jQuery("#pageList span.replacementicon:contains('"+textID+" Replacement') ~ span").find("img:first").attr("id", replacementIconID); if (jQuery("#"+replacementIconID).length) jQuery("#pageList img[src*='"+contentIconSrc+"']").attr("src", jQ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replacer(match,content) {\t//Replace with return value\n\t\t\t/**\n\t\t\t * Returns a new value to replace the match. This function is used as argument into the String.replace(regex[,rep_func]) function\n\t\t\t * match: full string '{X}'\n\t\t\t * content: inside string: 'X'\n\t\t\t */\n\t\t\t\n\t\t\tif (...
[ "0.5618799", "0.5587551", "0.5555053", "0.5413902", "0.540533", "0.54053277", "0.53120196", "0.5286519", "0.52761245", "0.52513266", "0.5185321", "0.51765156", "0.5146222", "0.5134403", "0.511407", "0.5088611", "0.5083665", "0.5058646", "0.50549257", "0.5043268", "0.49897835"...
0.5707653
0
scan rows for row specific icons
function replaceRowSpecificIcons() { jQuery("#pageList span.replacementicon:contains(':')").each(function(){ var replacementImage = jQuery(this).siblings("span").find("img:first"); var rowName = jQuery.trim(jQuery(this).text().replace("Replacement Icon:", "")); jQuery("#pageList span.label:contains('"+rowName+"'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get rowing () {\n return new IconData(0xe921,{fontFamily:'MaterialIcons'})\n }", "function filterByType(type){\n var tableBody = document.getElementById('tbody');\n var tableRows = tableBody.getElementsByTagName('tr');\n\n var iconContainer = document.getElementById('grid-container');\n var aTags...
[ "0.6012535", "0.6011866", "0.57924277", "0.5654763", "0.5651767", "0.5562056", "0.55426043", "0.5540916", "0.5540916", "0.5495266", "0.54945534", "0.54806256", "0.5479282", "0.5469279", "0.54648817", "0.54648817", "0.54648817", "0.54636747", "0.54569274", "0.54549474", "0.542...
0.658431
0
makes a call directly to the data center to obtain the previous movies watched for the logged in user
function GetPreviousMovies() { document.getElementById('recommendations').innerHTML = GetProcessingString(); document.getElementById('prevResults').innerHTML = GetProcessingString(); //post to the data centre with your UserID var client = http.createClient(3000, dataCentre); var jsonObject = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prev() {\r\n    var token = $('#prevbutton').data('token');\r\n    var q = $('#prevbutton').data('find'); \r\n   // clear it\r\n    $('#result').html('');\r\n    $('#buttons').html('');\r\n\r\n    q = $('#find').val(); \r\n    $.get(\r\n        \"https://www.googleapis.com/youtube/v3/search?&maxResults=21...
[ "0.6281981", "0.6130519", "0.60580033", "0.60485184", "0.6008812", "0.59766024", "0.5912342", "0.5889826", "0.5861406", "0.582927", "0.57531065", "0.57525706", "0.57276905", "0.57212955", "0.57136375", "0.5691723", "0.5686317", "0.56720316", "0.56645864", "0.5651719", "0.5609...
0.6275895
1
Get a recommendation from the edge nodes
function GetRecommendation() { if(previousResults == 'undefined' || previousResults == null || previousResults == "null" || previousResults.Results.length == 0) { //If the user has not watched any movies yet document.getElementById('recommendations').innerHTML = "Recommendation: <br>Not enough...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateSecondaryRecommendations(originalActivity){\n\n // get activities\n var recommendations = queryCluster(originalActivity);\n var cleaned_recommendations = [];\n\n // remove duplicates\n for(var i = 0; i < recommendations.length; i++){\n for(var j=0; j < USERrecommendations.len...
[ "0.565505", "0.5595113", "0.541317", "0.53390193", "0.5320993", "0.52841413", "0.5266984", "0.5227626", "0.51886904", "0.5181286", "0.5140279", "0.5126862", "0.5123955", "0.5117738", "0.5076117", "0.50700814", "0.5066391", "0.50468785", "0.5033709", "0.49994144", "0.49888325"...
0.59673345
0
make a call to the edge node to watch a random movie and receive a recommendation
function WatchRandomMovie() { document.getElementById('movieWatched').innerHTML = GetProcessingString(); document.getElementById('recommendations').innerHTML = GetProcessingString(); document.getElementById('prevResults').innerHTML = GetProcessingString(); var jsonObject = {}; //make the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WatchRecommendedMovie() \n{\n if(recommendedMovie == null || typeof(recommendedMovie) == 'undefined') \n {\n document.getElementById('recommendations').innerHTML = \"Recommendation: <br>Please watch a movie to get a recommendation\";\n return;\n }\n \n document.getElementById(...
[ "0.69353956", "0.6645733", "0.65284896", "0.6271705", "0.6177675", "0.61770606", "0.61416817", "0.6105342", "0.60359794", "0.60182464", "0.6003921", "0.5986861", "0.59533024", "0.5888119", "0.5881225", "0.5871364", "0.5870958", "0.5868432", "0.5863864", "0.58477354", "0.58375...
0.76140535
0
Returned a nicely formatted string containing the movie data
function FormatMovieString(movie) { return "Title: " + movie.Title + "<br>" + "Year: " + movie.Year + "<br>" + "Horror: " + movie.PercentageHorror + "<br>" + "Comedy: " + movie.PercentageComedy + "<br>" + "Action: " + movie.PercentageAction + "<br>" + "Adventure: " + mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayMovie(movie){\n console.log(movie.title + \" by \" + movie.director +\". Released in \" + movie.year + \". Length in Minutes: \" + movie.lengthOfFilm +\". Rating: \" + movie.rating + \".\")\n}", "function buildString(movie) {\n // loop logic line 40-49\n var result = \"You have \";\n // y...
[ "0.68871754", "0.6718539", "0.65510565", "0.6520644", "0.64952725", "0.64193213", "0.6340589", "0.6290061", "0.6278273", "0.62773323", "0.6264562", "0.6163043", "0.6149179", "0.6140165", "0.611714", "0.6061951", "0.6053241", "0.604448", "0.6033208", "0.5990631", "0.5979224", ...
0.76965916
0
returns a string to indicate processing
function GetProcessingString() { return "Title: Processing...<br>" + "Year: Processing...<br>" + "Horror: Processing...<br>" + "Comedy: Processing...<br>" + "Action: Processing...<br>" + "Adventure: Processing...<br>" + "Fantasy: Processing...<br>" + "Ro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function n(){if(g.current){var e=g.current.getName();if(e)return\" Check the render method of `\"+e+\"`.\"}return\"\"}", "function starusFormater(value){\n\t\tvar status = \"\";\n\t\tswitch(value){\n\t\t\t\tcase 1: \n\t\t\t\tstatus = 'Not yet started';\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tstatus = 'Underwa...
[ "0.5723464", "0.57095724", "0.5651524", "0.5650172", "0.55309665", "0.5514221", "0.5484173", "0.54553896", "0.544755", "0.5436762", "0.5375933", "0.53718686", "0.5353289", "0.5353289", "0.53335804", "0.5320653", "0.53195286", "0.53147537", "0.5272012", "0.5250522", "0.5213943...
0.73737025
0
Set/Update list of streamers
@action async updateStreamers() { let config = { url: "streams/followed", method: "get", baseURL: "https://api.twitch.tv/kraken", headers: { Accept: "application/vnd.twitchtv.v5+json", Authorization: `OAuth ${this.oAuth}` }, params: { limit: 100 } }; co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStreamers(){\n return users;\n}", "function refreshStreamList(elementId, streamNames) {\n var newStreamOptions = generateOptions(streamNames);\n $('#' + elementId).html(newStreamOptions);\n}", "set listByServer(list){\n this.list = list;\n }", "function start() {\n for (...
[ "0.6316154", "0.58414066", "0.57147723", "0.56877464", "0.5628355", "0.5612182", "0.5538156", "0.5523916", "0.5498228", "0.54861486", "0.5433037", "0.5414822", "0.5390445", "0.53841585", "0.53747356", "0.5340107", "0.53326875", "0.53310794", "0.5325403", "0.5319459", "0.53089...
0.6106738
1
Increment colorInt and make sure it doesn't go over max_length
@action handleColorIncrement() { const lastColorInt = this.colorInt; this.colorInt += 1; if (this.colorInt >= max_length) { this.colorInt = 0; } return lastColorInt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "currentColorIndex() {\n if (this.currentColorIndex > 3) {\n this.currentColorIndex = 0;\n }\n }", "function changeColor()\r\n{\r\n\tiColor++;\r\n}", "function countNumbers() { \n i++;\n if(i >= colorsArray.length) { i = 0; }\n}", "function changeColour() {\n\n if(counter >= colou...
[ "0.6445537", "0.6421973", "0.633359", "0.6155113", "0.60828817", "0.60163015", "0.6015084", "0.600564", "0.59963", "0.59452003", "0.5919945", "0.58969027", "0.58749706", "0.58483094", "0.584741", "0.5811754", "0.57405996", "0.57301664", "0.56819415", "0.56785715", "0.5660798"...
0.83619237
0
Initialize channel style sheet rules. Useful if it isn't initialized already
@action initializeChannelSheetRules() { jss.removeStyleSheet(this.channelsSheet); this.channelsStyles = {}; for (const k of this.joinedChannels) { this.channelsStyles[removeHashtag(k.key)] = { opacity: 1 }; } this.channelsSheet = jss .createStyleSheet(this.channelsStyles,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRules()\n {\n if (!elt.sheet)\n {\n // Stylesheet didn't initialize yet, wait a little longer\n window.setTimeout(setRules, 0);\n return;\n }\n\n elt.innerText = selectors;\n }", "function initStyleSheet() {\n var\n st...
[ "0.58802843", "0.57744277", "0.576", "0.56999224", "0.56339824", "0.5578787", "0.54951984", "0.54898053", "0.54543686", "0.54226124", "0.53980535", "0.52893776", "0.52855504", "0.52750874", "0.525313", "0.5240979", "0.5236176", "0.52292454", "0.5219034", "0.5170722", "0.51693...
0.77788454
0
Set all messages to have no color background.
@action toggleMessagesNoColor() { const color = store.theme.palette.background.default; if (this.messagesNoColor) { for (const [k, v] of Object.entries(this.channelsSheet.classes)) { this.channelsSheet.getRule(k).prop("background-color", `${color}`); } } else { for (const [k, v] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearAllMessages() {\n Chatty.removeAllMessagesInArray();\n $border.html(\"\"); //OR.empty();\n $clearAllButton.attr(\"disabled\", true);\n }", "async _setTransparentBackgroundColor() {\n await this._client.send('Emulation.setDefaultBackgroundColorOverride', {\n color: { r:...
[ "0.664819", "0.64560133", "0.6389137", "0.6282885", "0.6237753", "0.6209174", "0.6193157", "0.61841524", "0.61619514", "0.61372954", "0.6125773", "0.6071517", "0.6006872", "0.5996994", "0.59610695", "0.5940049", "0.59365016", "0.5927861", "0.59168726", "0.58703774", "0.585228...
0.7171297
0
Initialize and run the animation loop for the canvas canvasCmp is the Canvas component instance.
function handleCanvasDrawLoop (vnode, canvasCmp) { const elm = vnode.elm // Assign to both CanvasState and Canvas components to give access to this canvas elem const canvasState = canvasCmp.canvasState canvasState.elm = elm canvasCmp.canvas = elm elm.width = canvasState.canvasWidth elm.height = canvasStat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animloop(){\n init = requestAnimFrame(animloop);\n refreshCanvasFun(); //used to make the canvas update and work\n \n}", "function animloop() {\n init = requestAnimFrame(animloop);\n draw();\n }", "async run() {\n await this.initAssets();\n this.enab...
[ "0.72169745", "0.67442757", "0.66896194", "0.6530736", "0.65100086", "0.64487886", "0.64174926", "0.64118654", "0.6400496", "0.6387604", "0.6342608", "0.6342608", "0.63340974", "0.6319926", "0.62867725", "0.6281167", "0.62791765", "0.6253273", "0.62527376", "0.62428385", "0.6...
0.67989045
1
Set order mode (market or limit)
function setOrderMode(mode) { $el.removeClasses(/^is-order-mode/).addClass('is-order-mode-' + mode) $el.find('[data-order-mode="' + mode + '"]') .parent().addClass('active').siblings().removeClass('active') $el.find('input:visible:first').focus() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_mode(mode){\n\t\tself.cmode = mode;\n\t}", "function setMode(m){\n mode = m;\n }", "function setOrderType() {\n var cookie = Number(checkCookie(officeCookie)),\n baseItem = options.officeLoc,\n officeItem;\n\n isRandom = options.homeOfficeInfo[0].rando...
[ "0.5894396", "0.58316255", "0.5821599", "0.5818581", "0.58070993", "0.5781682", "0.57772565", "0.57772565", "0.57630837", "0.5702629", "0.56332016", "0.56051373", "0.5600524", "0.5486209", "0.5486209", "0.5486209", "0.5486209", "0.5478432", "0.5462034", "0.5451531", "0.543272...
0.720738
0
Complete the minimumSwaps function below.
function minimumSwaps(arr) { var swaps = 0; for (var i = arr.length - 1; i >= 0; i--) { if (arr[i] != i + 1) { swap(arr, i, arr.indexOf(i + 1)); swaps++; } } return swaps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minimumSwaps(arr) {\n let swap = 0;\n let origArray = arr.slice(0); \n let sortedArray = arr.sort((a,b) => a - b);\n \n for(var i = 0; i < origArray.length; i++) {\n if (origArray[i] != sortedArray[i]) {\n for (var j = i+1; j < origArray.length; j++) {\n if(...
[ "0.7156074", "0.689119", "0.6889449", "0.67947376", "0.6422686", "0.61561334", "0.6120924", "0.59137416", "0.5904418", "0.5872172", "0.585393", "0.5839052", "0.58358455", "0.5796844", "0.5717299", "0.5697877", "0.5695647", "0.5648379", "0.56192565", "0.5594437", "0.5593061", ...
0.72102845
0
for lan.html page checking Ip & Mask is valid value
function checkIp_Mask(lanIp,lanMask) { var count = 0; var count2 = 0; var l1a_n,l1m_n; var _lanIp = lanIp.split('.'); var _lanMask = lanMask.split('.'); for (i = 0; i < 4; i++) { l1a_n = parseInt(_lanIp[i]); l1m_n = parseInt(_lanMask[i]); if ((l1a_n & l1m_n)==0) count++; else if((l1a_n & l1m_n)==1) count2+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsLanIpValid(dev_ip, dev_mask, ip)\r\n{\r\n\treturn IsGatewayValid(dev_ip, dev_mask, ip);\r\n}", "function isValidNetmaskAddress(ipaddr,msg) {\r\n var re = /^255\\.255\\.255\\.\\d{1,3}$/;\r\n var ipaddress = ipaddr.value;\r\n if (re.test(ipaddress)) {\r\n\t var parts = ipaddress.split(\".\");\r\n...
[ "0.74503905", "0.70587313", "0.675488", "0.66310585", "0.6570443", "0.65496486", "0.6503809", "0.64733225", "0.64713174", "0.6469806", "0.64651436", "0.64459264", "0.64043444", "0.6401224", "0.63313246", "0.6296599", "0.6287243", "0.6283171", "0.6243358", "0.62189096", "0.620...
0.79153013
0
Sets Replay.headers to work with POST requests.
function setupReplayHeadersForPOST() { //remove the 'body' and 'content-type' headers from pattern matching since the values //are unique on each POST request and will cause the unit tests to fail Replay.headers = [ /^accept/, /^authorization/, /^host/, /^if-/, /^x-/ ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setHeaders() {\n if(this.headers && this.isType(\"object\", this.headers)) {\n for(let header in this.headers) {\n this.request.setRequestHeader(header, this.headers[header]);\n }\n this.setFormHeaders();\n }\n }", "setFormHeader() {\n if(this.method === \"POST\" || this.method ==...
[ "0.7124959", "0.66811067", "0.6311153", "0.6257472", "0.6048717", "0.5779478", "0.5677413", "0.5632839", "0.55660045", "0.5541673", "0.55192304", "0.5506778", "0.5475214", "0.5475002", "0.546587", "0.5451142", "0.54280883", "0.53466976", "0.53315663", "0.52980286", "0.5292793...
0.8450422
0
Restores Replay.headers to the default
function restoreReplayHeaders() { Replay.headers = origReplayHeaders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetHeaders() {\n\tconfig.headers = {};\n}", "function setupReplayHeadersForPOST() {\n //remove the 'body' and 'content-type' headers from pattern matching since the values\n //are unique on each POST request and will cause the unit tests to fail\n Replay.headers = [ /^accept/, /^authorization...
[ "0.686885", "0.6686253", "0.62418616", "0.61535716", "0.6039378", "0.60161686", "0.5993351", "0.58617294", "0.5845707", "0.5829901", "0.5786101", "0.5734339", "0.572927", "0.5713278", "0.5710586", "0.5638696", "0.5625653", "0.5618958", "0.5598569", "0.5577065", "0.55441904", ...
0.8626415
0
Returns a random string of digits with length 'len'. The string will be with random numbers of count 'len' 2, and the last two digits will be a check sum using the "ISO 7064 Mod 97,10" algorithm. In order to verify it the formula is: (num_to_check % 97) == 1
function randomDigitString(len) { var ret = ''; var randomLen = len - 2; while (randomLen--) { ret += this.randomElement(DIGITS); } var num = parseInt(ret); var verifyNumber = (98 - (num * 100) % 97) % 97; return num.toString() + (verifyNumber < 10 ? '0' : '') // adds leading...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randChars(len){\n if(isNumber(len)){\n for(var rdmString = \"\" ; rdmString.length < len; rdmString += Math.random().toString(36).substr(2));\n return rdmString.substr(0, len);\n }else{\n throw new Error('The value passed into randChars() is not a number.')\n }\n}", "function gener...
[ "0.75946134", "0.7427271", "0.7377959", "0.73502", "0.7328083", "0.7280488", "0.7241223", "0.71812963", "0.7171216", "0.71623677", "0.7160747", "0.7141671", "0.7129156", "0.7126092", "0.7073446", "0.70420265", "0.70329756", "0.70141447", "0.6999883", "0.69901246", "0.68543845...
0.82175136
0
Prepares input by changing it from string to an array of integers.
function prepareInput(strInput) { var arrStr = strInput.split(" "); var arrInt = []; for (var i =0; i < arrStr.length; ++i) { arrInt[i] = parseInt(arrStr[i], 10); } return arrInt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareInput(input) {\n const regex = /-?(\\d+)/gm;\n return input.match(regex)\n .map(element => parseInt(element, 10));\n}", "function getInputAsArray(int) {\n int = \"56\";\n const intArray = int.split(\"\");\n return intArray;\n }", "function makeIntArray(arr){\n ...
[ "0.7460718", "0.7436021", "0.6641071", "0.65767646", "0.64996976", "0.6491537", "0.6394045", "0.63777035", "0.6347236", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0.63315374", "0...
0.78434426
0
Toggle wrapper margin UP
function marginUp() { var el = document.getElementById("wrapper"); el.style.marginBottom="400px"; var el2 = document.getElementById("pre-wrapper"); el2.style.opacity="0"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function marginDown() {\n\n var el = document.getElementById(\"wrapper\");\n el.style.marginBottom=\"0px\";\n var el2 = document.getElementById(\"pre-wrapper\");\n el2.style.opacity=\"1\";\n}", "function containerMove_clearOffset(){\n $containerWidget.css(\"margin-top\", 0);\n }", "function r...
[ "0.6460919", "0.5995079", "0.5827089", "0.57919395", "0.5708907", "0.5671965", "0.5606258", "0.5536867", "0.54341584", "0.53827196", "0.53452003", "0.5335994", "0.5326566", "0.5301345", "0.5288231", "0.5281233", "0.5256957", "0.5249427", "0.52421504", "0.52296233", "0.5216114...
0.67275023
0
Toggle wrapper margin DOWN
function marginDown() { var el = document.getElementById("wrapper"); el.style.marginBottom="0px"; var el2 = document.getElementById("pre-wrapper"); el2.style.opacity="1"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function marginUp() {\n var el = document.getElementById(\"wrapper\");\n el.style.marginBottom=\"400px\";\n var el2 = document.getElementById(\"pre-wrapper\");\n el2.style.opacity=\"0\";\n}", "function containerMove_clearOffset(){\n $containerWidget.css(\"margin-top\", 0);\n }", "function red...
[ "0.67041934", "0.59207934", "0.585891", "0.58046913", "0.5777977", "0.5706412", "0.5470269", "0.54517573", "0.5428362", "0.54096144", "0.5397558", "0.53864264", "0.53610337", "0.5344355", "0.53006375", "0.5295366", "0.52795815", "0.52702504", "0.5260971", "0.52564585", "0.525...
0.6869543
0
fake pattern lab constructor: sets up a fake patternlab object, which is needed by the pattern processing apparatus.
function fakePatternLab() { var fpl = { graph: PatternGraph.empty(), partials: {}, patterns: [], footer: '', header: '', listitems: {}, data: { link: {}, }, config: require('../patternlab-config.json'), package: {}, }; // patch the pattern source so the pattern assem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compilePatternLab() {\n function compilePatternLabTask(done, errorShouldExit) {\n patternLab(done, true);\n }\n compilePatternLabTask.description = 'Compile Pattern Lab -- Exit If Error';\n compilePatternLabTask.displayName = 'patternlab:compile';\n return compilePatternLabTask;\n}", "constructo...
[ "0.5863988", "0.58576477", "0.55434155", "0.5539123", "0.5343401", "0.5321433", "0.524855", "0.51619065", "0.51303697", "0.51292014", "0.5128023", "0.51169515", "0.5088479", "0.5044056", "0.50413626", "0.5031991", "0.5030131", "0.5030131", "0.50136656", "0.49701002", "0.49602...
0.79408026
0
Map for Room Details Page
function initroomMap() { var options = { zoom: 11, center: { lat: 40.7128, lng: -74.006 }, styles: [ { featureType: 'all', elementType: 'geometry.fill', stylers: [ { weight: '2.00', }, ], }, { featureType: 'all', elementType: 'geometry.stroke', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getsMap() {\n hasMap = true;\n E.display.showMap();\n switch (E.navigation.getCurrentPage()) {\n case E.page.name.companyDetails:\n case E.page.name.routeResult:\n E.display.content.showToggle();\n break;\n }\n }", "function map() {\r\n\...
[ "0.62663347", "0.6149083", "0.61235106", "0.59977734", "0.5920327", "0.5796831", "0.57656074", "0.5702786", "0.56895345", "0.56772715", "0.56757486", "0.5615223", "0.56009823", "0.5600695", "0.5594592", "0.5566086", "0.5552608", "0.55369306", "0.55249995", "0.5509336", "0.550...
0.6260927
1
Tax Calculations ends Remove Item Function starts
function removeItem(idCart,idPrice) { document.getElementById(idCart).style.display='none'; const totalPricePhone = document.getElementById(idPrice).innerText; const totalPricePhoneInt = parseFloat(totalPricePhone); const subtotal= document.getElementById('subtotal').innerText; const subtotalInt ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteBudget () {\r\n\r\n //2. Delelt the itme from the data Arr\r\n \r\n var ids, id ,type;\r\n ids = $(this).closest('.item')[0].id.split('-');\r\n type = ids[0];\r\n id = parseFloat(ids[1]);\r\n\r\n calc.deleteItems(type, id);\r\n \r\n //3...
[ "0.6871725", "0.6797107", "0.66320235", "0.6499695", "0.6442513", "0.6408077", "0.6360858", "0.63582027", "0.6328503", "0.6324807", "0.6310774", "0.63098586", "0.6305629", "0.62938994", "0.6286828", "0.6284652", "0.62675405", "0.6264838", "0.6258862", "0.62316144", "0.6211442...
0.70100164
0
GIVES BACK COUNTY BASED ON COUNTRY (US/CA) AND PSSCCC DATA
function county_decode(input, COUNTRY) { var CCC, P, SS, SSCCC, county; [P, SS, CCC, SSCCC] = [input.slice(0, 1), input.slice(1, 3), input.slice(3), input.slice(1)]; if ((COUNTRY === "US")) { county = ((CCC === "000") ? "ALL" : US_SAME_CODE[SSCCC]); return [county, US_SAME_AREA[SS]]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCountryAndPPPData() {\n const year = new Date().getFullYear();\n return fetch(`https://api.worldbank.org/v2/en/country/all/indicator/PA.NUS.PPP?format=json&per_page=20000&source=2&date=${year - 5}:${year}`)\n .then(response => response.json())\n .then(data => data[WORLD_BANK_DATA_IN...
[ "0.60638595", "0.56810606", "0.5657258", "0.5618978", "0.5611433", "0.5595274", "0.5508129", "0.5448163", "0.54310125", "0.54185295", "0.54107004", "0.54050344", "0.535893", "0.5355295", "0.53358686", "0.5300447", "0.5287403", "0.52576494", "0.5247639", "0.5225951", "0.520887...
0.6628908
0
GETS THE END OF THE ALERT FRO JJJHHMM TO SEONDS, IN UTC
function alert_end(JJJHHMM, TTTT, format='LT') { var ts, utc_dt; utc_dt = moment.utc(JJJHHMM, 'DDDHHmm'); utc_dt.add(TTTT.substring(0, 2), "h").add(TTTT.substring(2, 4), "m") ts = moment(utc_dt).local().format('LT'); return ts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAbsoluteEndTime() {\n return this.get('metronome').beatToTime(this.get('endBeat'));\n }", "function get_end_dateTime() {\n return new Date().toJSON().slice(0, 10) + ' ' + new Date().toJSON().slice(11, 16);\n }", "getLastTime(messages){\n if(messages.length === 0){\n return \"\";\n ...
[ "0.63816684", "0.6251875", "0.6251869", "0.62028545", "0.600408", "0.59642315", "0.59571695", "0.584282", "0.5834054", "0.5825649", "0.5825649", "0.5825649", "0.5825649", "0.5825649", "0.5812435", "0.5809832", "0.5809832", "0.5809832", "0.5809832", "0.5809832", "0.5809832", ...
0.67661256
0
Display a button to augment or diminish the part duration.
function DurationButton(syn, type = "augment", update) { // console.log('part', part) // console.log("part duration: " , part.duration); const button = document.createElement('button'); button.classList.add('duration-button'); button.textContent = type; button.addEventListener('click', function changeDura...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showStopButton() {\r\n this.hideDigScrapeButtons();\r\n this.hideActionButtons();\r\n\r\n try {\r\n this.doc.getElementById(C.ELEMENT_ID.STOP_BUTTON_HOLDER).style.display = C.CSS_V.DISPLAY.BLOCK;\r\n }\r\n catch(error) {\r\n this.lm('Could not show stop butt...
[ "0.62604105", "0.6220952", "0.6051287", "0.6039509", "0.6036618", "0.59927183", "0.5952142", "0.5927588", "0.5925266", "0.58803797", "0.58729476", "0.58729476", "0.5828576", "0.5816251", "0.5808288", "0.5807385", "0.5806328", "0.58050364", "0.5803309", "0.57939994", "0.579263...
0.6811589
0
Sets the redux isLoggedIn state variable to reflect logout, Instead redux state is completly reset.
logout() { // set redux state variable // this.context.persistor.pause(); persistStore(this.context.store).purge().then((i) => { }) this.props.setLogin(false); this.props.dispatch( { type: 'RESET' }); // Redirect // this.props.history.push("/login"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAuth(state, payload) {\n state.isLoggedIn = payload;\n }", "function logOut(){\n dispatch({type: 'LOGOUT'});\n history.push('/');\n setUser(\"\");\n setPostForm(\"\");\n }", "setIsLoggedIn(){\n if(this.state.isLoggedIn==false){\n this.setState({isLogged...
[ "0.7002879", "0.69176", "0.6893315", "0.68535984", "0.68137157", "0.68130094", "0.67198944", "0.6680343", "0.6677475", "0.66415936", "0.66243714", "0.65880924", "0.6573898", "0.65651387", "0.6559425", "0.6550709", "0.6538654", "0.65188223", "0.65149575", "0.6505754", "0.64741...
0.7017784
0
Creates the Profit Table below the Menu on the left side
function createProfitTable() { const ml = multiLang[language]; var nixian = false; var menuList = document.getElementById("toolbarcomponent"); if (menuList == null){ menuList = document.getElementById("leftMenu"); } var table = document.createElement('div'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createTableResults(dataCtrl,appCtrl){\n this.deleteTableResults()\n const results = dataCtrl.filterProtocolos()\n const totais = dataCtrl.returnTotalAllowedPrioritizedQty()\n var innerTable = ''\n var innerTableTr =''\n var th = ''\n var tr = ''\n var header ...
[ "0.63454247", "0.6229641", "0.6212482", "0.6176278", "0.60059786", "0.59814686", "0.595718", "0.59120685", "0.59031", "0.5888535", "0.58823556", "0.5881871", "0.58689183", "0.5860207", "0.58388466", "0.5806273", "0.57811534", "0.5771934", "0.57540023", "0.57459676", "0.572983...
0.7806971
0
Creates an Expo Chart
function createExpoChart() { const ml = multiLang[language]; var total = 0; var type; const stats = []; const body = document.getElementById('ingamepage') var container = document.createElement('div'); var titlebar = document.createElement('div'); var titl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createChart(options) {\n const { data } = this;\n const normalizedData = normalizeData(data, options.reverseData, true);\n // Create new svg object\n const svg = createSvg(this.container, options.width, options.height, options.classNames.chart);\n this.svg = svg;\n // Cre...
[ "0.63032204", "0.62258327", "0.621553", "0.61524534", "0.61498713", "0.61392516", "0.6069001", "0.60624665", "0.6048939", "0.6024296", "0.6002514", "0.60017633", "0.59998965", "0.59952587", "0.59752756", "0.59752756", "0.59752756", "0.59752756", "0.59752756", "0.59752756", "0...
0.7320928
0
Parses a combat Report. It expects the data retrieved from the game and the apikey of the report to have a uniqueID
function parseCR(data, apikey, crId) { // define key for loops var key; var shipType; var resources = {'metal': 0, 'crystal': 0, 'deuterium': 0, 'dm':0 }; if(data.search("var combatData") !== -1 && data.search("var attackerJson") !== -1) { // Get start and end of JSON...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseDF(report, apikey) {\n const rr = \"([0-9\\\\.]{1,30})\";\n const mlR = multiLang[language].resources;\n const msgId = report.getAttribute('data-msg-id');\n const content = report.getElementsByClassName('msg_content')[0].innerHTML;\n const timestamp = parseDate(repo...
[ "0.6927674", "0.5612793", "0.55863065", "0.55591667", "0.55277944", "0.55259115", "0.54870397", "0.5428012", "0.5421348", "0.5347711", "0.5342033", "0.53112215", "0.52583927", "0.52448875", "0.52417356", "0.52413577", "0.51707953", "0.51557416", "0.51306015", "0.5106257", "0....
0.6498103
1
Adds an Expo Entry to the database for Statistics
function addExpoEntry(type) { if (typeof(expoDB[type]) === "undefined") { expoDB[type] = 1; } else { expoDB[type]++; } saveDB(expoDBName, expoDB); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEntry(events, squirrel) {\n journal.push({ events, squirrel });\n}", "function addEntry(events, squirrel){\n journal.push({events,squirrel});\n}", "addEntry(entry) {\n this.record.results.push(entry);\n this.record.length++;\n if(this.index !== -1)\n this.profile...
[ "0.6279583", "0.6192895", "0.6013762", "0.58613193", "0.5682581", "0.5571092", "0.5534267", "0.5446606", "0.54452306", "0.5297791", "0.51965076", "0.5190449", "0.51847625", "0.51785946", "0.517483", "0.50981456", "0.5093366", "0.50841206", "0.50807875", "0.5036841", "0.500333...
0.71677136
0
Little helper which calcs last x hours result and writes it to the expected field
function calcLastHours(hours, prefix) { const resources = {'metal': 0, 'crystal': 0, 'deuterium': 0, 'dm': 0}; const timeAfter = Math.round((Date.now() / 1000) - (hours * 60 * 60)); for (var id in profitDB) { if (profitDB[id].time > timeAfter) { resources.metal += pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hoursLeft (time) {\nvar hours = studio.facility[0].hours;\nvar hoursLeft = hours - time;\n\nconsole.log(\"We have \" + hoursLeft + \" hours to record in studio A \");\n\n\n\nif (hoursLeft <= 2) {\n\nconsole.log(\" We have have a limited amount of time!\");\n}\t\nif (hoursLeft == 0){ console.log(\"We have ...
[ "0.54959047", "0.5489098", "0.54750204", "0.54576737", "0.5387399", "0.53819185", "0.5367877", "0.53514856", "0.5342092", "0.53383905", "0.5328111", "0.52775174", "0.5276337", "0.5247624", "0.523103", "0.5218782", "0.5216244", "0.5203938", "0.51824975", "0.51805407", "0.51790...
0.63425833
0
Little helper which calcs last days result
function calcLastDay() { calcLastHours(24, 'd'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLastDays( exp, up) {\r\n\t\tif ( isNaN(up) ) {\r\n\t\t\treturn \"&nbsp;\";\r\n\t\t}\r\n\t\tvar last = 100 - exp;\r\n\t\tvar days = last / up;\r\n\t\treturn Math.ceil( days);\r\n\t}", "function getDaysOff() {\n var now = new Date();\n var oneDay = 24*60*60*1000; // hours*minutes*seconds*millisecond...
[ "0.6523922", "0.6494072", "0.648484", "0.63229793", "0.6311488", "0.6301994", "0.6247965", "0.6156535", "0.61310863", "0.60768384", "0.6035008", "0.6006724", "0.6006691", "0.60040724", "0.59822685", "0.5906443", "0.5856739", "0.58294296", "0.5827388", "0.58185554", "0.5816462...
0.74044067
0
Little helper which calcs last weeks result
function calcLastWeek() { calcLastHours(7*24, 'w'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getCurrentWeekEndDate() {\n try {\n let currentDate = new Date();\n let lastDayOfWeek = currentDate.getDate() - currentDate.getDay() + 6;\n currentDate.setDate(lastDayOfWeek-7);//added -7 to fetch the test data remove it later\n return libSup.formatDate(cur...
[ "0.7090178", "0.70053387", "0.6790406", "0.6789081", "0.6656545", "0.66298485", "0.6621645", "0.6580971", "0.6569015", "0.65683776", "0.65535325", "0.65159595", "0.64725316", "0.64623415", "0.6446103", "0.64453214", "0.64319", "0.64319", "0.64319", "0.64319", "0.64188385", ...
0.8151959
0
Little helper which calcs last months result
function calcLastMonth() { calcLastHours(7*24*4, 'm'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "monthsEndDate () {\n // In case we have middle of month date.\n let months = this.adjustDaysMonths(this.daysInMonth(this.endDate.year), this.endDate.year, this.endDate.month, this.endDate.day, 'end');\n // Includes any middle month, 1st or last.\n // Slice accordingly.\n return months.slice(0, this....
[ "0.668153", "0.66437733", "0.66046757", "0.6452431", "0.64335126", "0.6405205", "0.6394962", "0.63292545", "0.63194376", "0.63090336", "0.6287126", "0.6284743", "0.62491363", "0.6218299", "0.6214875", "0.6214308", "0.620647", "0.6201858", "0.62003535", "0.61956096", "0.617271...
0.79707587
0
Appends "logged" to a report based on its msgId
function logged(msgId) { addTextToMsgId(msgId, 'logged'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alreadyLogged(msgId) {\n addTextToMsgId(msgId, 'already logged')\n }", "function logMessage(msg, id) {\n if (!id) {\n id = \"output\";\n }\n document.getElementById(id).innerHTML += msg + \"<br>\";\n }", "function log ( msg, lvl ){\n if(!inUse) retur...
[ "0.6401254", "0.6243205", "0.6136061", "0.5949867", "0.59149504", "0.57396424", "0.5717053", "0.56716543", "0.56634796", "0.5638404", "0.5560821", "0.5554124", "0.5546545", "0.55075073", "0.54960376", "0.5491147", "0.5456785", "0.54522425", "0.54101324", "0.5314869", "0.53076...
0.7142757
0
Appends "already logged" to a report based on its msgId
function alreadyLogged(msgId) { addTextToMsgId(msgId, 'already logged') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logged(msgId) {\n addTextToMsgId(msgId, 'logged');\n }", "function appendReports(message) {\n $(\"#waiting\").fadeOut();\n // Remove Over line\n if ($(\"#log-list .log\").length > 1000) {\n $(\"#log-list .log\").last().remove();\n }\n $(\"#log-list\").prepend(message);\n ...
[ "0.6154777", "0.6012679", "0.57676846", "0.575279", "0.5678104", "0.56343406", "0.5584893", "0.5494543", "0.5338991", "0.5322012", "0.53056395", "0.5295989", "0.5286185", "0.5245582", "0.5245582", "0.5245582", "0.5245582", "0.5211948", "0.5171511", "0.51223254", "0.50879765",...
0.7162358
0
Adds green Text to the end of a Report based on its msgId
function addTextToMsgId(msgId, text, color = 'green') { const toAdd = '<span style="width:100%;float:left;color:' + color + ';">' + text + '</span><br>'; const messages = document.getElementsByClassName('msg'); for (var element in messages) { if (typeof(messages[element]) == "undefin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function append(id, message,color){\n\n const TXT_COLOR = `${color}Txt`;\n\n const detailMessage = document.createElement(\"span\");\n\n detailMessage.setAttribute(\"id\", `msg4${id}`);\n detailMessage.setAttribute(\"class\", TXT_COLOR);\n detailMessage.textContent = message;\n\n if(document.getE...
[ "0.6539654", "0.5665588", "0.5594021", "0.55927444", "0.55434775", "0.54651", "0.5456143", "0.54168534", "0.5375612", "0.53719896", "0.53681505", "0.5337991", "0.5317925", "0.5311037", "0.5310317", "0.52998185", "0.52950275", "0.52912366", "0.5290038", "0.52233785", "0.522232...
0.7365134
0
Creates the "Check Messages" Button in Messages Overviews.
function createButtonMessages(){ var listElement = document.createElement("li"); listElement.style="margin:5px;list-style:none;"; listElement.id = "ExpeditionCheck"; listElement.innerHTML = '<a class="btn_blue" id="checkMessages">Check Messages</a>' + '<div style="position:re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createOpenPOPupButton(cellvalue, options, rowObject) {\n return \"<input class='blue-btn' type='checkBox' id='\" + rowObject[0] + \"' >\";\n}", "function createButton(className, txt) {\n var newButton = document.createElement(\"label\");\n var input = document.createElement(\"input\");\n input.typ...
[ "0.59881496", "0.5933116", "0.5835788", "0.57723445", "0.57465494", "0.574181", "0.57322747", "0.5604737", "0.55708414", "0.5564899", "0.55586976", "0.553632", "0.55223507", "0.5510387", "0.5476504", "0.545612", "0.544874", "0.54475605", "0.544751", "0.5444697", "0.54055876",...
0.6342584
0
increases the reportsDone Counter and shows this in UI
function finishedReport() { reportsDone++; document.getElementById('reportsDone').innerText = reportsDone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queuedReport() {\n reportsToDo++;\n document.getElementById('reportsToDo').innerText = reportsToDo;\n }", "function reportComplete()\n{\n\t$('#foffbox-player-report').html('<span class=\"glyphicon glyphicon-ok foffbox-player-button-active\"></span>');\n}", "function updateCount() {\n\...
[ "0.7719374", "0.66179556", "0.6220641", "0.60847044", "0.6055302", "0.5972182", "0.5961632", "0.58818376", "0.5879915", "0.58624834", "0.5856163", "0.5803528", "0.57818514", "0.5770168", "0.5755307", "0.57026863", "0.5702037", "0.56870264", "0.5643708", "0.5630843", "0.562516...
0.8195171
0
increases the reportsToDo Counter and shows this in UI
function queuedReport() { reportsToDo++; document.getElementById('reportsToDo').innerText = reportsToDo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finishedReport() {\n reportsDone++;\n document.getElementById('reportsDone').innerText = reportsDone;\n }", "function counterTasks (count) {\n if (count === 0) {\n counterTitle.innerHTML = 'No Tasks To Do';\n counterText.innerText = '';\n } else {\n counterTit...
[ "0.63535047", "0.5703291", "0.5669607", "0.5655205", "0.55922854", "0.5575758", "0.5516594", "0.5471074", "0.5441333", "0.5400004", "0.5395569", "0.5308445", "0.52919966", "0.5277362", "0.5267324", "0.5247316", "0.52412164", "0.5238054", "0.5225351", "0.52146703", "0.51999253...
0.78824776
0
Given an array, "findShortestWordAmongMixedElements" returns the shortest string within the given array. Notes: If there are ties, it should return the first element to appear in the given array. Expect the given array to have values other than strings. If the given array is empty, it should return an empty string. If ...
function findShortestWordAmongMixedElements(arr) { var result = ""; var newString; var count = 100; for(var i = 0; i < arr.length; i++){ if (typeof arr[i] === "string"){ newString = arr[i].length; if (newString < count){ count = newString; result = arr[i]; } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getShortest(wordArray) {\n let minlength = wordArray[0].length;\n let shortString = wordArray[0];\n for (let i of wordArray){\n if (i.length < minlength){\n minlength = i.length;\n shortString = i;\n }\n }\n return shortString;\n \n}", "function getL...
[ "0.75477624", "0.7412954", "0.6978759", "0.69488513", "0.66998893", "0.66248405", "0.6504769", "0.64699954", "0.6401509", "0.62873536", "0.62708676", "0.6253079", "0.6246433", "0.6221847", "0.61983174", "0.6170543", "0.61250496", "0.60194474", "0.6019285", "0.5995151", "0.596...
0.8050285
0
Received the position of the servo
function onPositionUpdate(d) { // We expect numbers between 0-180, but sometimes this can be a bit // screwy due to calibration errors. Therefore, first sanitise var pos = d.float; setStatus(`Position: ${pos}`); if (pos < 0) pos = 0; if (pos > 180) pos = 180; lastPos = pos; // K...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendPosData() {\n // console.log(\"Sending position data...\");\n socket.emit(\"sendPosData\", {\n \"id\": currentPlayer.id,\n \"x\": currentPlayer.x,\n \"y\": currentPlayer.y,\n \"rotation\": currentPlayer.rotation\n });\n }", "function setPosition() {\n ...
[ "0.6371833", "0.6363742", "0.6049568", "0.5968771", "0.59422183", "0.5840243", "0.57870144", "0.5786593", "0.57206535", "0.5699366", "0.5696374", "0.56825083", "0.5670154", "0.5655928", "0.5645842", "0.56455785", "0.5638454", "0.5610879", "0.55469793", "0.5522676", "0.5520321...
0.6510723
0
Combine all the different search refinement options of a search into one value
function combineSearchRefinements(){ var temp = ''; if(s.eVar5) {temp += ',PropertyType'} if(s.eVar3) {temp+= ',PriceBand'} if(s.eVar4) {temp += ',Bedrooms'} if(s.eVar34) {temp += ',MinCarSpaces'} if(s.eVar41) {temp += ',MinLand'} if(s.eVar42) {temp += ',Bathrooms'} if(s.eVar33) {temp += ',Keywords'} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateAdvancedSearchOptions(searchResults) {\n // remove duplicate ingredients, appliances and ustensils from search results\n removeDuplicateValues(Array.from(searchResults));\n // fill advanced search fields with values matching the results of the search query\n\n createAdvancedSearchOptions(ingredi...
[ "0.604602", "0.57800436", "0.5761495", "0.5601157", "0.5579851", "0.5530141", "0.552905", "0.5473511", "0.5431672", "0.54161125", "0.5411682", "0.53709525", "0.52738124", "0.5265909", "0.52553755", "0.5234163", "0.5190371", "0.5164604", "0.5149172", "0.5143025", "0.5137872", ...
0.75659454
0
============== DO NOT ALTER ANYTHING BELOW THIS LINE ! =============== AppMeasurement for JavaScript version: 2.4.0 Copyright 19962016 Adobe, Inc. All Rights Reserved More info available at
function AppMeasurement(r){var a=this;a.version="2.4.0";var k=window;k.s_c_in||(k.s_c_il=[],k.s_c_in=0);a._il=k.s_c_il;a._in=k.s_c_in;a._il[a._in]=a;k.s_c_in++;a._c="s_c";var p=k.AppMeasurement.Pb;p||(p=null);var n=k,m,s;try{for(m=n.parent,s=n.location;m&&m.location&&s&&""+m.location!=""+s&&n.location&&""+m.location!="...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AppMeasurement(){var s=this;s.version=\"1.2.1\";var w=window;if(!w.s_c_in)w.s_c_il=[],w.s_c_in=0;s._il=w.s_c_il;s._in=w.s_c_in;s._il[s._in]=s;w.s_c_in++;s._c=\"s_c\";var k=w.fb;k||(k=null);var m=w,i,n;try{i=m.parent;for(n=m.location;i&&i.location&&n&&\"\"+i.location!=\"\"+n&&m.location&&\"\"+i.location!=\...
[ "0.70143706", "0.69822884", "0.6934684", "0.6912637", "0.6894163", "0.67077094", "0.6317799", "0.59564894", "0.5953098", "0.5625143", "0.5559125", "0.55447096", "0.55381495", "0.55018675", "0.54972196", "0.5481971", "0.54529995", "0.54281586", "0.54174924", "0.5417381", "0.53...
0.7072559
0
Button functionality Reveal content A (Welcome)
function showWelcome(){ const welcomeContent = document.querySelector('.content-container-a') welcomeContent.classList.add("selected") const clearBtn = document.querySelector('.content-container-a .inside-content__clear') clearBtn.addEventListener("click", () => { welcomeContent.classList.remove...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function button_clicked() {\n var welcome = document.getElementById(\"welcome\")\n welcome.style.display = \"none\";\n welcome.innerText(\"I\")\n}", "function customWelcome() {\n $('.banner p').html(\n userName + ' we are happy that you come to our wedding ' + ' <i class=\"fa fa-heart\" aria-hid...
[ "0.6721904", "0.6574012", "0.6542532", "0.6348248", "0.63434047", "0.6317388", "0.6308719", "0.6303521", "0.6296364", "0.62904775", "0.62719893", "0.626794", "0.6236084", "0.6220828", "0.6189974", "0.61895376", "0.61515063", "0.6140732", "0.6132574", "0.61197674", "0.6110589"...
0.6872456
0
Reveal content T (Testimonial)
function showTestimonials(){ const testimonialContent = document.querySelector('.content-container-t') testimonialContent.classList.add("selected") const clearBtn = document.querySelector('.content-container-t .inside-content__clear') clearBtn.addEventListener("click", () => { testimonialContent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start_testimonials() {\n\tif (total_testimonials > 1) {\n\t\tswith_testimonials();\n\t} else {\n\t\tif (typeof(testimonials_el) != undefined && testimonials_el != null) {\n\t\t\ttestimonials_el.innerHTML = '<span class=\"testimonial_quotes\">\"' + testimonials[0]['text'] + '\" - </span><span class=\"testi...
[ "0.6252994", "0.62096", "0.6172448", "0.6030403", "0.5980717", "0.5977159", "0.5964412", "0.5908594", "0.5841188", "0.58341396", "0.5823364", "0.581241", "0.58063", "0.57445437", "0.56840324", "0.567687", "0.567356", "0.5668758", "0.56652236", "0.5662845", "0.5657678", "0.5...
0.6769091
0
True or false Checks if a stopper exists in the DOM or number defined
function checkStopper() { if (0 < $(settings.stopper).length || typeof settings.stopper === 'number') { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkStopper() {\r\n\r\n if ( 0 < $(settings.stopper).length || typeof settings.stopper === 'number' ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "checkForWin() {\n\n return ($('#phrase ul .hide').length === 0); //will return if phrase ul . hi...
[ "0.7397799", "0.6141369", "0.59310436", "0.57753575", "0.5770703", "0.57634383", "0.5742778", "0.5727651", "0.57040435", "0.5679731", "0.5675339", "0.56473786", "0.5646573", "0.56243837", "0.5582016", "0.55809873", "0.5561179", "0.55360115", "0.5525278", "0.5513134", "0.54851...
0.7375901
1
PickerInstance.prototype Wrap the picker holder components together.
function createWrappedComponent() { // Create a picker wrapper holder return PickerConstructor._.node( 'div', // Create a picker wrapper node PickerConstructor._.node( 'div', // Create a picker frame PickerConstructor._.node( 'div', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWrappedComponent() {\n\n // Create a picker wrapper holder\n return PickerConstructor._.node( 'div',\n\n // Create a picker wrapper node\n PickerConstructor._.node( 'div',\n\n // Create a picker frame\n PickerConstructor._.node( 'div'...
[ "0.7055872", "0.7055872", "0.7055872", "0.7055872", "0.7055872", "0.7020631", "0.7012551", "0.6987112", "0.6948545", "0.6774784", "0.6754687", "0.67472017", "0.67034316", "0.66791046", "0.6654615", "0.6654615", "0.6654615", "0.6654615", "0.66374034", "0.66369617", "0.66369617...
0.70671076
0
de aici function to scale up the game to full screen
function goFullScreen() { // setting a background color // this.stage.backgroundColor = "#555555"; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; // using RESIZE scale mode game.scale.scaleMode = Phaser.Scale.RESIZE; game.scale.setScreenSize(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeF()\n\t\t{\n\t\tvar scaleX = window.innerWidth / 320;\n\t\tvar scaleY = window.innerHeight / 608;\n\t\tvar scale = Math.min(scaleX, scaleY);\n\t\tgame.scale.scaleMode = Phaser.ScaleManager.USER_SCALE;\n\t\tgame.scale.setUserScale(scale, scale);\n\t\tgame.scale.pageAlignHorizontally = true;\n\t\tgame...
[ "0.7729142", "0.7658194", "0.73616666", "0.7249343", "0.7235765", "0.71733016", "0.7152327", "0.7018243", "0.69949526", "0.6965015", "0.68629247", "0.68427503", "0.68164766", "0.6804434", "0.6774158", "0.67408055", "0.6661271", "0.6637822", "0.6626968", "0.66246057", "0.66206...
0.7922491
0
function to adjust the min and max numbers while user guesses either to high or too low
adjustMinMax(guess){ if (guess<this.secretNum){ this.smallestNum=guess} else if (guess>this.secretNum){ this.biggestNum=guess } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMinMax() {\n currentGame.curMin = parseInt(minNumField.value);\n currentGame.curMax = parseInt(maxNumField.value);\n updateMinMaxDisplay();\n currentGame.newRandomNumber(currentGame.curMin, currentGame.curMax);\n}", "increaseGuessRange(){\n this.curMin = this.curMin - 10;\n this.curMax =...
[ "0.7623516", "0.7532607", "0.7296917", "0.7004886", "0.6864302", "0.68419737", "0.6778684", "0.6635338", "0.6583034", "0.65721804", "0.6552648", "0.65503716", "0.6511567", "0.6475795", "0.6451839", "0.64447224", "0.644463", "0.64093006", "0.63590944", "0.63182896", "0.6315545...
0.7942748
0
request user input to set the guessing range
setRange() { do{ this.smallestNum = parseInt(prompt(`Please enter the lowest number you would like to guess: `)) } while (Number.isNaN(this.smallestNum)) do { this.biggestNum = parseInt(prompt(`Please enter the highest number you would like to guess: `)) } while (Number.isNaN(this.bi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "increaseGuessRange(){\n this.curMin = this.curMin - 10;\n this.curMax = this.curMax + 10;\n }", "function storeMinMaxRange() {\n min = parseInt(minRangeInput.value);\n max = parseInt(maxRangeInput.value);\n generateNumberToGuess(min, max);\n}", "function suggest() {\n let min = 1;\n let max = 100;\...
[ "0.7296922", "0.6948586", "0.6786025", "0.678013", "0.66629624", "0.66442853", "0.63947713", "0.63639605", "0.62815255", "0.6255322", "0.6239009", "0.62235427", "0.62218076", "0.6158776", "0.61464065", "0.6143404", "0.61085236", "0.610763", "0.6105574", "0.609592", "0.6079277...
0.7480723
0
returns the covariance of X and Y
function cov(x, y, size) { let sum = 0; for (let i = 0; i < size; i++) { sum += (x[i] * y[i]); } sum /= size; let covariance = sum - (avg(x, size) * avg(y, size)); return covariance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sample_covariance(x, y) {\n\n // The two datasets must have the same length which must be more than 1\n if (x.length <= 1 || x.length != y.length){\n return null;\n }\n\n // determine the mean of each dataset so that we can judge each\n // value of the dataset...
[ "0.74561894", "0.74561894", "0.7444109", "0.7434722", "0.63192534", "0.57707846", "0.57707846", "0.57707846", "0.57256705", "0.56778044", "0.5601454", "0.5313841", "0.52541214", "0.5221195", "0.51849526", "0.5026468", "0.50041264", "0.49930596", "0.49698415", "0.4965111", "0....
0.8041002
0
returns the deviation between point p and the line
function dev(p, l) { let yOnLine = (l.a * p.x) + l.b; let distance = p.y - yOnLine; return Math.abs(distance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function distance(line, point) {\n const {a, b ,c} = line;\n const {x, y} = point;\n //line is : {a, b, c} which is : ax + by + c = 0\n //point is {x, y}\n return Math.abs(a*x + b*y + c) / Math.sqrt(a*a + b*b);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "pD...
[ "0.6955225", "0.667869", "0.63436645", "0.63243586", "0.62700444", "0.6252086", "0.6131035", "0.6089269", "0.6077504", "0.6077504", "0.6011693", "0.60114586", "0.60017574", "0.60010415", "0.5995526", "0.59889203", "0.59629774", "0.5936867", "0.59333694", "0.58894396", "0.5888...
0.77838683
0
TODO maybe put this in ItemUtils.js estimate manufacturing time
estimateManufactureTime() { let days_needed_parallel = 5; let days_needed_serial = 0; let items = this.state.contents; ItemUtils.recurseAssembly(items, (component) => { // hardcoded defaults, if not set. let default_manufacture_time = { parallel: 5, serial: 0, } /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calcTime() {\n //assumption that we need 15 mins for 3 ingredients\n const periods = Math.ceil(this.ingredients.length / 3);\n this.time = periods * 15;\n }", "calcTime(){\n const numIng=this.ingredients.length;\n //Assuming that we need 15 minutes for 3 ingredients\n const periods...
[ "0.6823373", "0.6757623", "0.6628171", "0.6471294", "0.6118861", "0.5976781", "0.58916163", "0.57780135", "0.5713887", "0.56365556", "0.55941457", "0.55899525", "0.55706066", "0.55446714", "0.5540627", "0.5529309", "0.55141366", "0.544185", "0.5422255", "0.5405146", "0.540514...
0.78023463
0
Make Ajax request for user positions (and names) in datastore
function findOthers(user_pos) { var login = "RichardDrake"; request = new XMLHttpRequest; request.open("POST", "https://mmap-db.herokuapp.com/sendLocation"); request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); request.onreadystatechange = parseResponse; var params = "login=" + login +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_positions() {\n\t$.ajax({\n\t\t\turl: '../data/get_all_positions.php',\n\t\t\ttype: 'post',\n\t\t\tsuccess: function (data) {\n\t\t\t\t$('#positions').html(data);\n\t\t\t},\n\t\t\terror: function(){\n\t\t\t\talert('Error: L643+');\n\t\t\t}\n\t\t});\n}//end get_positions", "function geo_success(posit...
[ "0.63007057", "0.59850436", "0.59635824", "0.5693091", "0.5670327", "0.56665957", "0.5653218", "0.5647579", "0.55934966", "0.5583708", "0.55510247", "0.5499971", "0.54930556", "0.54805666", "0.546641", "0.5462727", "0.5448202", "0.54402035", "0.54382443", "0.54258865", "0.539...
0.63943493
0
Deprecated; use AsyncMirror.Create() method instead. Mirrors the synchronous file system into the asynchronous file system. IMPORTANT: You must call `initialize` on the file system before it can be used.
function AsyncMirror(sync, async, deprecateMsg) { if (deprecateMsg === void 0) { deprecateMsg = true; } var _this = _super.call(this) || this; /** * Queue of pending asynchronous operations. */ _this._queue = []; _this._queueRunning = false; _this._isIni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function mirror() {\n\tconst SRC_PATH = path.join('..', PRIVATE_MODULE_NAME);\n\tconsole.log('- Mirroring ', SRC_PATH);\n\tvar mirroredPaths = [\n\t\t'android',\n\t\t'ios',\n 'src'\n\t];\n\n\tmirroredPaths.forEach(function(dir) {\n var src = path.join(SRC_PATH, dir);\n var dest = path.join('.', dir)...
[ "0.5470339", "0.5418026", "0.5323751", "0.5289475", "0.5264535", "0.525802", "0.525802", "0.525802", "0.5241733", "0.52146333", "0.52146333", "0.52146333", "0.52146333", "0.52146333", "0.52146333", "0.5039384", "0.4946542", "0.4919616", "0.4919616", "0.48984385", "0.4888799",...
0.7516782
0
Should message input be focused? When viewing on mobile we need to prevent this, because it opens a (system) keyboard that covers half of the screen
uiFocusMessageInput () { return this.uiIsWide() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keepKeyboardOpen() {\n txtInput.one('blur', function() {\n txtInput[0].focus();\n });\n }", "function keepKeyboardOpen() {\n // console.log('keepKeyboardOpen');\n // txtInput.one('blur', function () {\n // \ttxtInput[0].focus()...
[ "0.7111882", "0.704108", "0.6924682", "0.6892733", "0.68697035", "0.6799224", "0.66432816", "0.6510631", "0.6491504", "0.6463448", "0.64562213", "0.63809556", "0.625718", "0.6235333", "0.6223406", "0.61908585", "0.6157748", "0.61380774", "0.6120839", "0.6120839", "0.6111021",...
0.7248772
0
Funciones para recargar el valor del input=areaName Usamos ajax para modificar el input despues de que se cambie el valor del select
function cambiaSelectAreaByAjax(){ var idArea = $("#idArea").val(); $.ajax({ url: '/shopMadrid/admin/getAreaAction.do', data: 'idArea='+idArea, success: modificarInputArea }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recargarListaEdit() {\n $.ajax({\n type: \"POST\",\n url: \"?controller=Charge&method=chargesArea\",\n data: \"area=\" + $('#areas').val(),\n success: function (r) {\n $('#charge_id').html(r);\n }\n });\n}", "function getAreasAjaxSelect(){\n\n $.aja...
[ "0.6680464", "0.6512197", "0.64354336", "0.6429562", "0.6239887", "0.6237354", "0.62140846", "0.60846794", "0.6030277", "0.59680575", "0.59383917", "0.5937618", "0.592167", "0.59136224", "0.59123117", "0.59047085", "0.5901278", "0.5881772", "0.5841661", "0.58152443", "0.58069...
0.7219143
0
Funciones para recargar los input de la pagina marketUpdate.jsp Usamos ajax para modificar el input despues de que se cambie el valor del select
function cambiaMarketByAjax(){ var idMarket = $("#idMarket").val(); $.ajax({ url: '/shopMadrid/admin/getMarketAction.do', data: 'idMarket='+idMarket, success: modificarInputMarket }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargaEmpresas() {\n\tvar warehouse_id = $('#warehouse_id option:selected').val();\n\tvar page =\"/distribuidorByWarehouse/\" + warehouse_id;\n\tif(warehouse_id !== ''){\n\t\t$.get(page, function(data){\n\t\t\t//console.log(data);\n\t\t\t$('#company_id').val(data.company_id);\n\t\t\t$('#provider_id').val(d...
[ "0.66213924", "0.63338953", "0.6287133", "0.62661123", "0.62656397", "0.6258777", "0.62496704", "0.62412596", "0.621582", "0.6210473", "0.6207038", "0.6198637", "0.6194225", "0.6185248", "0.6167966", "0.6161945", "0.614882", "0.6145536", "0.61433077", "0.61365724", "0.6136475...
0.66417485
0
Get month returns all the days that a month has. If no month or year provided current ones will be used.
function getMonth(month,year){ month = month || curMonth; year = year || curYear; var monthData = store[year][month], result = []; for(var day in monthData ) result.push( monthData[day] ); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDaysInMonth(year = this.today.getFullYear(), month = this.today.getMonth()) {\n return Array.from({ length: this.getDaysCountInMonth(year, month) }, (_, i) => {\n return new Date(year, month, i).getDay();\n });\n }", "_get_days_in_month(year, month) {return [31, this._is_leap_year(year)?29:28, 31,...
[ "0.70270383", "0.69081235", "0.68584013", "0.6818357", "0.680872", "0.6807023", "0.6800703", "0.6742778", "0.6740008", "0.6729995", "0.6726348", "0.6697364", "0.66708064", "0.6667716", "0.66597605", "0.6659324", "0.6659188", "0.66316557", "0.66198903", "0.6611424", "0.6601347...
0.6982907
1
Get month report returns a report of the days that a month has. If no month or year provided current ones will be used.
function getMonthReport(month,year){ month = month || curMonth; year = year || curYear; var result = [], monthData = getMonth(month,year); monthData.forEach( function(day) { result.push( digitsToString("-",day.day,month,year) +":"+ day.amount); }); return result.length > 0 ? result.join("\n") : ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDaysInMonth(year = this.today.getFullYear(), month = this.today.getMonth()) {\n return Array.from({ length: this.getDaysCountInMonth(year, month) }, (_, i) => {\n return new Date(year, month, i).getDay();\n });\n }", "function getAllMonth() {\n\n\n\n //Generate Token API Pass Call\n ...
[ "0.65810585", "0.6577195", "0.6425183", "0.64195234", "0.63518417", "0.6348824", "0.63306683", "0.62992793", "0.6269944", "0.6248268", "0.6214737", "0.6195974", "0.61918616", "0.6185346", "0.6181983", "0.616218", "0.61471957", "0.61440885", "0.6137592", "0.6135584", "0.612713...
0.73744243
0
Ex.1 Write the function Dice that randomize an integer number between 1 and 6
function Dice (){ return Math.floor(Math.random()*6)+1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dice(){\n return Math.floor(Math.random()*6)+1\n}", "function dice() {\n return Math.floor(Math.random() * (6 - 1 + 1) + 1);\n}", "function dice() {\r\n randomNumber = Math.trunc(Math.random() * 6) + 1;\r\n return randomNumber;\r\n}", "function diceRoll()\r\n{\r\n return Math.floor(Math.ran...
[ "0.86898845", "0.86171806", "0.8545334", "0.8529079", "0.8390128", "0.83513546", "0.83079463", "0.8275181", "0.82653946", "0.82439494", "0.82425225", "0.82273626", "0.81809783", "0.81726474", "0.8169949", "0.81658673", "0.81398845", "0.8139751", "0.81086993", "0.81023544", "0...
0.8806387
0
Ex.9 Write the function HowManyDays that receives a Date and return the number of days that has passed since that day.
function HowManyDays (Date2){ const anyDate = new Date(2020, 1, 7); const oneday = 24 * 60 * 60 * 1000; numberofdays = Math.abs( Math.ceil((anyDate.getTime() - Date2.getTime())/(oneday))); return numberofdays }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyDays(d){\n let oneDay = 1000 * 60*60*24;\n let today = new Date()\n let someDate = new Date(d)\n console.log(someDate.getFullYear());\n\n let dayDiff = Math.floor((today.getTime() - someDate.getTime())/oneDay);\n console.log(`${today} - ${someDate} = ${dayDiff}`);\n \n\n return...
[ "0.7309567", "0.7156171", "0.7054349", "0.6930057", "0.68699896", "0.66519415", "0.65522915", "0.63959575", "0.6390668", "0.6384805", "0.6355421", "0.63510215", "0.6338302", "0.6308916", "0.6306344", "0.6296071", "0.6244579", "0.62360317", "0.61993897", "0.6169131", "0.612969...
0.75281394
0
EQUIPO TEST Creamos un equipo usando function test Para el movimniento se podria usar test.move() aunque en este momento se esta usando la function moveTest() que es llamado en la function animation
function equipoTest() {//Enviamos directo a la funcion animation for (var i = 0; i < 5; i++) {//filas for (var j = 0; j < 3; j++) {//columnas var test = new Test(YellowX + 30 * j, YellowY + 30* i, sizeTest, "yellow"); //test.move(); test.dibuja(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveTest() {\r\n //Limites de movimiento\r\n\tif( testX > canvas.width - sizeTest) {\r\n testX = canvas.width - sizeTest;\r\n }else\r\n if( testX < 0) {\r\n testX = 0;\r\n }else\r\n if( testY > canvas.height - sizeTest) {\r\n testY = canvas.height - sizeTest;\r\n }el...
[ "0.7316719", "0.6336999", "0.6222316", "0.6011877", "0.5966194", "0.59467053", "0.5888582", "0.5869978", "0.586879", "0.58497673", "0.5844288", "0.58239007", "0.5799264", "0.5797908", "0.57874215", "0.5768482", "0.57671267", "0.57616687", "0.5740819", "0.5735126", "0.5726511"...
0.7835343
0
COLLISION TEAMS PLAYER COLLISION TEAM BLUE Se esta usando como imagen de collision para equipoBluePlayer
function collisionBlue() { ctx.fillStyle = "#526af290";//se usa transparencia ctx.fillRect(X, Y, COLLISION_BLUE_X, COLLISION_BLUE_Y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "playerCollision(rid, lid, uid, bid) {\n // if enemy comes in contact with \"moving blue\" tiles or the player itself\n if(lid == -1 || rid == -1 || uid == -1 || bid == -1 || dist(this.x, this.y, player.x, player.y) < 20){\n // play sound\n collisionsound.play();\n // reset player position, gra...
[ "0.670944", "0.65595675", "0.6470139", "0.64600426", "0.6416388", "0.637581", "0.6348069", "0.6345009", "0.6315982", "0.6313278", "0.629694", "0.6268919", "0.62680453", "0.626328", "0.62269205", "0.6220146", "0.61558515", "0.61547995", "0.61432564", "0.6115884", "0.6106534", ...
0.6721745
0
PLAYER COLLISION TEAM YELLOW Se esta usando como imagen de collision para equipoYellowPlayer
function collisionYellow() { ctx.fillStyle = "#c4f42390";//se usa transparencia ctx.fillRect(YellowX, YellowY, COLLISION_YELLOW_X, COLLISION_YELLOW_Y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yellowCyclists(){\n player2 =createSprite(1300,Math.round(random(30, 270)));\n player2.scale =0.06;\n player2.velocityX = -(6 + 2*distance/150);\n player2.addAnimation(\"opponentPlayer2\",oppYellow1Img);\n player2.setLifetime=170;\n player2.setCollider(\"circle\",...
[ "0.64350784", "0.6362668", "0.63481253", "0.63211596", "0.63188", "0.6298243", "0.62859493", "0.6277519", "0.62665516", "0.6251866", "0.62291306", "0.61513525", "0.61458355", "0.6111588", "0.6098379", "0.6079458", "0.60611075", "0.60306895", "0.6018377", "0.6013274", "0.60129...
0.7022401
0
Handle updated topics from the store
handleUpdatedTopicStore( state ) { this.setState( { topics: state.topics } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleUpdateTopics( topics ) {\n\n this.topics = _.sortBy(topics, 'volume');\n\n if ( this.activeTopicId === null && topics.length ) {\n this.handleUpdateActiveTopicId( topics[ 0 ].id );\n }\n\n }", "handleUpdateActiveTopicId( topicId ) {\n this.activeTopicId = topicId;\n }", "function updat...
[ "0.79430914", "0.6938872", "0.6748567", "0.63961035", "0.6225742", "0.600953", "0.59922725", "0.5975902", "0.59738266", "0.58782333", "0.585684", "0.58501154", "0.58501154", "0.58501154", "0.58501154", "0.58501154", "0.58501154", "0.58501154", "0.58501154", "0.58501154", "0.5...
0.7198634
1
Utility to sort topic IDs (by volume)
static sortTopicsByVolume( topics ) { return _.chain( topics ) .sortBy( topic => topic.volume ) .map( topic => topic.id ) .reverse() .value(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortData(num){\n var song_ids = [];\n for(i=0; i<data[num].length; i++){\n song_ids.push(\"spotify:track:\"+data[num][i][\"id\"]);\n }\n return song_ids;\n}", "handleUpdateTopics( topics ) {\n\n this.topics = _.sortBy(topics, 'volume');\n\n if ( this.activeTopicId === null && topics.length ...
[ "0.6099562", "0.60685194", "0.59123886", "0.5817491", "0.58041805", "0.5713828", "0.5664274", "0.5599436", "0.55918574", "0.55696774", "0.55638236", "0.554624", "0.55231184", "0.5518432", "0.5516671", "0.5458125", "0.5420117", "0.5377296", "0.5373375", "0.53357023", "0.533065...
0.8351804
0
Utility to return the weight of a topic, relative to the collection
static getTopicWeight( topic, sortedTopicIds ) { const index = _.indexOf( sortedTopicIds, topic.id ); const total = _.size( sortedTopicIds ); return Math.ceil( ( index + 1 ) / ( total / 6 ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getWeight() {\n let sum = 0;\n for (let i = 0; i < this._items.length; i++) {\n sum += this._items[i].getWeight() * this._items[i].count;\n }\n return sum;\n }", "get weights() {\n return this._fields.reduce((prev, curr) => prev + curr.weight, 0);\n }", "function g...
[ "0.673204", "0.6546627", "0.6474446", "0.63946575", "0.6241669", "0.6214805", "0.6190152", "0.6141138", "0.61193275", "0.61017066", "0.6050872", "0.59686863", "0.58901954", "0.5859114", "0.5790438", "0.57897985", "0.5780401", "0.576764", "0.5732778", "0.57277817", "0.5725085"...
0.7969103
0
Send the command to sshagent to create and set a device bound pin
function sshSetDevicePin() { showWarning('ssh', ''); setBusy(true); chrome.runtime.sendMessage( chrome.runtime.id, // to self { 'type': 'SSH_DEVICEPIN', }, function(reply) { if (reply.data && reply.data.length == 1 && reply.data[0] == SSH2_AGENT_SUCCESS) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCustomSSH(key, username, ipaddr, port) {\n return axios.default.post(`https://iterm.h-os.online/api/settings/save?key=${key}`,\n `{\"general\":{\"font_size\":11,\"custom_command\":\"ssh ${username}@${ipaddr} -p ${port}\",\"shell\":\"bash\",\"boldAsBright\":null},\"colors\":{\"palette\":[\"#2e3436\"...
[ "0.582676", "0.5675696", "0.5502949", "0.5437612", "0.52893704", "0.52166903", "0.51879394", "0.5181747", "0.5147213", "0.5145366", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", "0.5091851", ...
0.75213045
0
Helper to get new PINs.
function getNewPin(baseName) { var newPin = getBinaryPin(baseName); var newPin2 = getBinaryPin(baseName + '2'); // Check consistency. if (newPin && !UTIL_equalArrays(newPin, newPin2)) { UTIL_clear(newPin); UTIL_clear(newPin2); showWarning('ssh', '<a href="" id="fff">(new Sec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPins(arr) {\n var result = [];\n for (var i = 0; i < arr.length; i++) {\n result.push(window.createPin(arr[i]));\n }\n return result;\n }", "getPins() {\n\t\tlet pinList = [];\n\t\tfor (let input of this.myPublicInputs) {\n\t\t\tpinList.push(input);\n\t\t}\n\t\tfor (let output of...
[ "0.6224005", "0.60714895", "0.59410787", "0.58968", "0.56248635", "0.5613655", "0.5411849", "0.5339562", "0.53334934", "0.5304512", "0.52885294", "0.5262426", "0.5223248", "0.52197903", "0.5185245", "0.5159777", "0.5122709", "0.51025325", "0.5093338", "0.5090619", "0.507408",...
0.6400445
0
propiedad estatica, para acceder Coche.numRuedas() y es un metodo
static numRuedas(){ return 4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ex1(){\n const computador = 1000;\n const mouse = 50;\n const teclado = 75;\n const webcam = 200;\n const microfone = 100; \n \n const precoTotal = (computador + mouse + teclado + webcam + microfone);\n console.log(\"Preço total é: \"+ \"R$\" + precoTotal)\n }", "function obtene...
[ "0.6144276", "0.6135673", "0.60991144", "0.60519266", "0.6006162", "0.59740436", "0.5896897", "0.58794975", "0.5865696", "0.57706285", "0.5753938", "0.5753163", "0.57522887", "0.5738234", "0.57161397", "0.5708236", "0.56810665", "0.5665914", "0.56600845", "0.5628724", "0.5615...
0.6978243
0
This function receives an array of services and returns the object of services.serviceitems that matches the category and domain. Note: If the serviceitem doesn't exist, the function returns an empty object.
function findServiceItem(service, category, domain) { for (let item of service.serviceitems) { if (item.category == category && item.domain == domain) { return item; } } let unitItem = ''; if(category == 'voice'){ unitItem = 'minutes'; } else if (category == 'da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findChainServices(category) {\n let i,\n chainServices = [];\n\n for (i = 0; i < Object.keys(category).length; i += 1) {\n const key = Object.keys(category)[i];\n const child = category[key];\n\n if (typeof child.classes !== \"undefined\") {\n chainServices.push({\n servic...
[ "0.5849009", "0.5693693", "0.55155504", "0.55136865", "0.5420465", "0.5378461", "0.53091305", "0.5307513", "0.5161179", "0.5083392", "0.50477177", "0.50473666", "0.50424194", "0.5009982", "0.49494863", "0.49467978", "0.4932971", "0.48059192", "0.47968543", "0.47896463", "0.47...
0.73859614
0
This function receives a list and a sentence, the list is filled with the sentences that have not been insered yet. Then, we order the list. Example: this.getFilters(context.status, serv.status, 'string');
function getFilters(list, value, order) { let aux = value; if(aux.length >= 50){ aux = aux.substring(0, 50); aux = aux + '...'; } if (list.length == 0) { list.push(aux) } else { let ok = true; for (let a of list) { if (a == aux) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listFilter(filter, itemType) {\n let lst;\n charts.style.height = `${scrollHeight}px`;\n sortBtns.style.display = 'block';\n randomBtn.style.display = 'block';\n notificationText.innerHTML = `Sorting ${itemType}s...`;\n charts.innerHTML = '';\n chartsText.innerHTML = `<center><br> Sorted ${itemType...
[ "0.5738911", "0.55691135", "0.5561881", "0.5438019", "0.54366493", "0.53756744", "0.5327225", "0.5279903", "0.5248435", "0.52223164", "0.52078176", "0.5205065", "0.5202556", "0.50970525", "0.50966084", "0.50739837", "0.5021798", "0.50118834", "0.49920404", "0.4984584", "0.498...
0.6070243
0
This function receives a list of objects and different options. Then, we order the list. Example: deleteRepeated(list, attributeFilter, attributeOrder, type, order);
function deleteRepeated(list, attributeFilter, attributeOrder, type, order) { let aux = []; for (let l of list) { if (aux.length == 0) { aux.push(l); } else { let ok = true; for (let a of aux) { if (l.hasOwnProperty(attributeFilter) && a.hasOwn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleDelete(obj, list) {\n const listClone = [...list];\n const index = listClone.indexOf(obj);\n // Edit\n return listClone.splice(index, 1);\n }", "function Sortonetomanys(list, attr){\n\tprintToDiv('Function Sortonetomanys() list : ', list);\n\tprintToDiv('Function Sortonetomanys() a...
[ "0.5409112", "0.52574104", "0.5243946", "0.5110211", "0.509937", "0.5054053", "0.5014588", "0.4998743", "0.49548453", "0.49410594", "0.49401057", "0.49295238", "0.48850107", "0.48703974", "0.4833789", "0.48131713", "0.48051357", "0.48022598", "0.48007357", "0.47859108", "0.47...
0.8016716
0
When a touch ends, show key pad
function onTouchEnd(x, y, id) { // condition to show key pad if (!gameOver && touchID == id && selectedTiles.length > 0) { touchID = -1; setPaused(true); showKeyPad(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keyReleased() {}", "onTouchEnd() {\n try {\n if (this._touchStarted === true) {\n dismissKeyboard();\n }\n this._touchStarted = false;\n } catch (error) {\n ErrorHandler.WriteError('GiftedChat.js => onTouchEnd', error);\n }\n }", "onTouchEnd() {\n if (this._...
[ "0.6919197", "0.6870824", "0.67937493", "0.67937493", "0.6727873", "0.6538556", "0.652315", "0.6483863", "0.6439993", "0.6406153", "0.6380324", "0.637", "0.63561314", "0.629885", "0.62792534", "0.62771916", "0.62771916", "0.62771916", "0.62771916", "0.62771916", "0.62771916",...
0.71292555
0