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
This function is called within the incidentTemplate. It loops through however many icdcm categories there are and appends icdcm tabs for the icdcm tabpanes
function loadIcdcmTabs(icdcmCategorys) { var icdcmCategoryTabs = []; icdcmCategorys.forEach(function (category, index) { icdcmCategoryTabs += `<li id="ICDCMCategory_${category["DiagnosisID"]}"><a href="#ICDCMCategoryTabPane_${category["DiagnosisID"]}" data-toggle="tab">Diagnosis - ${category.Diagnosis |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadIcdcmTabPaneTemplate(icdcmCategories) {\n var icdcmTabPanes = [];\n icdcmCategories.forEach(function (category, index) {\n icdcmTabPanes += icdcmTemplate(category, category[\"DiagnosisID\"]);\n });\n return icdcmTabPanes;\n}", "function loadICDCMCategoriesControls(incident, incide...
[ "0.7288412", "0.70473176", "0.6531409", "0.6136041", "0.60675997", "0.60290325", "0.5977854", "0.5917899", "0.58577925", "0.58387184", "0.5799532", "0.5796573", "0.56993735", "0.56560105", "0.5648823", "0.56436884", "0.56405556", "0.5638293", "0.56346786", "0.5610137", "0.559...
0.7370607
0
clicking on a project highlights the current project and displays it's tasks
static projectClickHandler(e) { func.updateStateObject(e.target.textContent) this.highlightProject(); this.displayTasks(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _viewProjectList() {\n const userProjects = todo.returnAll().slice(1);\n _renderPanel(projectPanel, renderList, userProjects);\n }", "function navigateToTask() {\n const cursor = requireCursor();\n const isFilterView = getIsFilterView();\n if (viewMode === 'project' && !isFilte...
[ "0.68118566", "0.6755239", "0.6701311", "0.6605621", "0.6599784", "0.65966076", "0.6587288", "0.646723", "0.64648116", "0.6430112", "0.6411943", "0.63875765", "0.63831896", "0.63727975", "0.6364626", "0.63610035", "0.63588935", "0.6354555", "0.6354122", "0.63463056", "0.63213...
0.76462555
0
returning a list of all channel names
function getChannelNames(urls) { const chNames = [] urls.forEach(url => { let splittedUrl = url.split('/') let idn = splittedUrl[splittedUrl.length - 2] if (idn == 'channel'){ chNames.push("." + splittedUrl[splittedUrl.length - 1]) }else{ chNames.push(sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChannels() {\n const slack_channels = this.bot.getChannels()._value.channels;\n\n for (let item = 0; item < slack_channels.length; item++) {\n this.channels[slack_channels[item].id] = slack_channels[item].name;\n }\n }", "get channels() {\n return this.getAllElements('cha...
[ "0.7219333", "0.72135746", "0.7167968", "0.69319946", "0.6730346", "0.663214", "0.6630406", "0.6624541", "0.66126406", "0.65843904", "0.65254813", "0.6454372", "0.63560706", "0.635365", "0.6294799", "0.62068975", "0.61750287", "0.6172514", "0.6150449", "0.6144619", "0.614349"...
0.75274265
0
getting latest N videos : need to search for views and sort manually
async function getLatestVideos(upId, vidCount){ const getReqTemp = `https://www.googleapis.com/youtube/v3/playlistItems?playlistId=${upId}&key=${keys.apiKey}&part=snippet,contentDetails&maxResults=${vidCount}` const response = await fetch(getReqTemp) const data = await response.json() const videos = da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getMostWatched(chId, vidCount){\n // https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={ch_id}&key={key}&maxResults=5&order=viewcount\n\n const getReqTemp = `https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=${chId}&key=${keys.apiKey}&maxResults=${vidCount}&...
[ "0.63595754", "0.62813324", "0.6236744", "0.6174244", "0.61553836", "0.599396", "0.59421563", "0.58699286", "0.58170277", "0.5790625", "0.576441", "0.5742615", "0.57183295", "0.5717233", "0.57068896", "0.5691387", "0.568367", "0.56746936", "0.5670753", "0.56461203", "0.563992...
0.6731707
0
get a list of video_ids
function getVideoIds(videos){ const videoIds = [] videos.forEach(vid => { try { const id = vid.contentDetails.videoId videoIds.push(id) }catch (error){ const id = vid.id.videoId videoIds.push(id) } }) return videoIds }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllVideos(data){\n var videos = [];\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].videos.length; j++) {\n videos.push(data[i].videos[j].id);\n }\n }\n return videos;\n}", "function getVideoId(response) {\n\tvar srchItems = response.result.items;\n\t$.each(srch...
[ "0.69560236", "0.67515194", "0.63577116", "0.631633", "0.6304712", "0.62214893", "0.62214893", "0.618441", "0.6094904", "0.6092185", "0.6075966", "0.60425967", "0.6009425", "0.5991707", "0.5988427", "0.59653276", "0.5955365", "0.5940668", "0.5932647", "0.59299797", "0.5927086...
0.76839024
0
return top N videos on the channel
async function getMostWatched(chId, vidCount){ // https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={ch_id}&key={key}&maxResults=5&order=viewcount const getReqTemp = `https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=${chId}&key=${keys.apiKey}&maxResults=${vidCount}&order=vi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTopPlayers(n){\n return client({\n method: 'GET',\n path: PLAYER_SEARCH_ROOT+\"getAllByOrderByEloDesc\",\n params: {\n page: 0,\n size: n\n }\n })\n }", "async function getLatestVideos(upId, vidCount){\n const getReq...
[ "0.65928835", "0.64478445", "0.6422219", "0.6289578", "0.62766767", "0.6142369", "0.60586834", "0.59094", "0.59056574", "0.5893838", "0.5863313", "0.58493805", "0.58493805", "0.58409804", "0.58382016", "0.5810747", "0.5806001", "0.5803649", "0.5764011", "0.5737766", "0.573485...
0.7090885
0
Create a function to reset randomNumber, crystal14, totalScore, and empty div for total score
function resetScore(){ randomNumber = Math.floor(Math.random()*100); console.log("random number: " + randomNumber); crystal1 = Math.floor(Math.random()*15); console.log("crystal1 is: " + crystal1); crystal2 = Math.floor(Math.random()*15); console.log("crystal2 is: " + crystal2) crystal3= Mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n\t\ttotalScore = 0;\n\t\t$totalScore.html(totalScore);\n\t\trandomNumber = Math.floor(Math.random() * (120 - 19)) + 19;\n\t\t$(\"#random-number-section\").html(randomNumber);\n\t\tfirstCrystal = Math.floor(Math.random() * 12 + 1);\n\t\tsecondCrystal = Math.floor(Math.random() * 12 + 1);\n\t\tth...
[ "0.841112", "0.81068504", "0.8083409", "0.80769974", "0.8073208", "0.8054585", "0.8024661", "0.79999894", "0.79963773", "0.79815024", "0.7948176", "0.7915215", "0.79113925", "0.7903946", "0.7868136", "0.78672165", "0.7863483", "0.7849203", "0.7847068", "0.78027475", "0.779932...
0.84173036
0
generate a new URL stored in DB and return its short URL
function createNewURL(longURL, req) { let shortURL = generateRandomString(); urlDatabase[shortURL] = { userID: req.session["user_id"], longURL: longURL }; return shortURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeShortUrl() {\n \n var text = \"\";\n var charset = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\n for( var i=0; i < 5; i++ )\n text += charset.charAt(Math.floor(Math.random() * charset.length));\n \n var shortUrl = \"https://www.\" + text +...
[ "0.77088314", "0.75630534", "0.75344807", "0.74146515", "0.73246396", "0.71752775", "0.7167183", "0.7125908", "0.7068151", "0.69163764", "0.6874859", "0.6841403", "0.6813372", "0.680104", "0.67916685", "0.6745934", "0.6715949", "0.6671572", "0.6631705", "0.6556254", "0.654931...
0.7725426
0
Delete section from course.
function deleteSection(){ items_model.remove( ctrl.editedSection.id ).then(function(){ // Notify that section was successfully deleted. $translate('ntf.section_deleted').then(function( translation ){ notifier_service.add({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteSection() {\n if (currentPage.content.sections.length >= sectionIndex + 1) {\n // Remove the section at the given index\n const newSections = currentPage.content.sections\n newSections.splice(sectionIndex, 1)\n\n const patchDetails = { content: { sections: newSections } }\n\n ...
[ "0.78812915", "0.76509297", "0.71181023", "0.65882385", "0.6509031", "0.64768314", "0.64452964", "0.6444502", "0.6436057", "0.63780844", "0.6328116", "0.62877506", "0.627612", "0.62667704", "0.6231004", "0.6217418", "0.62004083", "0.61690795", "0.61622185", "0.60613257", "0.6...
0.78661513
1
change text style to italic
function changeItalic() { var fontStyle = document.querySelector("textarea").style.fontStyle; if (fontStyle == "italic") { document.querySelector("#text").style.fontStyle = ""; } else { document.querySelector("#text").style.fontStyle = "italic"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeItalic() {\r\n var fontStyle = document.querySelector(\"textarea\").style.fontStyle;\r\n if (fontStyle == \"italic\") {\r\n document.querySelector(\"#text\").style.fontStyle = \"\";\r\n } else {\r\n document.querySelector(\"#text\").style.fontStyle = \"italic\";\r\n }\r\n}", "function it...
[ "0.75611573", "0.7514904", "0.74453354", "0.74307764", "0.7387971", "0.73598963", "0.7347764", "0.7309535", "0.7309535", "0.7309535", "0.7309535", "0.7309535", "0.7309535", "0.72803205", "0.725167", "0.72393465", "0.7224335", "0.7184623", "0.71001285", "0.7078952", "0.7022584...
0.7562278
0
change align text to right
function rightMe() { $("#textarea").css("text-align", "right"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rightMe() {\r\n $(\"#textarea\").css(\"text-align\", \"right\");\r\n}", "function alinearALaDerecha(){\n comentarioModificado.style.textAlign = \"right\";\n\n}", "function jright() {\n\treachtext.document.execCommand('justifyRight',false,null);\n \n}", "get justifyRightButton() {\n return {\...
[ "0.719971", "0.71286565", "0.70471835", "0.70208263", "0.67031515", "0.6649992", "0.6573514", "0.6555365", "0.62731916", "0.62105227", "0.6196492", "0.61592287", "0.6146317", "0.6146203", "0.6144779", "0.6075566", "0.6057078", "0.60365355", "0.6004805", "0.59512514", "0.59367...
0.71297026
1
Problem with constructor approach is if you have methods to your class then it will be get repeated on each instance of that class Solution to this is to have move all the methods and properties to prototype
function PrototypeBasedClass () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function _construct()\n\t\t{;\n\t\t}", "consructor() {\n }", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "function...
[ "0.6744977", "0.6744977", "0.6744977", "0.65472674", "0.6496852", "0.64317656", "0.64317656", "0.64317656", "0.64317656", "0.64317656", "0.64317656", "0.64317656", "0.64311826", "0.64306635", "0.64108425", "0.64101535", "0.64047676", "0.64047676", "0.64047676", "0.64047676", ...
0.7014247
0
Acquire recipe instructions from spoonacular API to show on the modal
function getRecipeInstructions(recipeId, image_src, recipeName) { var queryURL = "https://api.spoonacular.com/recipes/" + recipeId + "/analyzedInstructions?apiKey=3d8504ff72124b3790e1881e4619a59c"; // console.log(recipeId); $.ajax({ url: queryURL, method: "GET" }).then(function (respon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openModal() {\n getRecipeDetails();\n handleShow();\n }", "function modalInformationFetchHandler(recipeId) {\n var modalFetchUrl = \"https://api.spoonacular.com/recipes/\" + recipeId + \"/information?includeNutrition=false&apiKey=1ce5503bf49b445b92a7267bc15d3d4f\"\n fetch(modalFetchUrl)\n ...
[ "0.6805439", "0.6632997", "0.65910625", "0.6458337", "0.6353264", "0.6267483", "0.6259948", "0.6255962", "0.62116665", "0.61887497", "0.6116857", "0.6105608", "0.60211784", "0.60162485", "0.6013618", "0.6000996", "0.59993565", "0.5987021", "0.598585", "0.5962656", "0.5937928"...
0.7200405
0
Textbox Class Constructor for Textbox objects to hold data for all drawn objects.
function Textbox(textObj) { this.div = document.createElement("div"); this.div.style.color = textObj.color || '#000'; this.div.innerHTML = textObj.text || "None"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Textbox(textObj, rectW) {\n this.x = textObj.x || 0; // Text setup\n this.y = textObj.y || 0;\n this.w = textObj.w || 1;\n this.h = textObj.h || 12;\n this.color= textObj.color || '#000';\n this.text = textObj.text || \"None\";\n this.rectW = rectW || 0; // If placed on Box, width of ...
[ "0.80876493", "0.7883636", "0.74078393", "0.72077763", "0.71168524", "0.68348795", "0.6732035", "0.66693485", "0.6578081", "0.6568938", "0.65429556", "0.6536523", "0.64999264", "0.6477092", "0.6471344", "0.6456571", "0.6441325", "0.64254063", "0.64071316", "0.6324699", "0.618...
0.79099405
1
CanvasState Class Constructor for CanvasState object
function CanvasState(canvas) { var html = document.body.parentNode; this.htmlTop = html.offsetTop; this.htmlLeft = html.offsetLeft; this.ctx = canvas; // Track the state this.valid = false; // When set to false, the canvas will redraw everything this.shapes = []; // Collection of things to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CanvasState(canvas) {\n // Setup\n this.canvas = canvas;\n this.width = canvas.width;\n this.height = canvas.height;\n this.ctx = canvas.getContext('2d');\n\n // This complicates things a little but but fixes mouse co-ordinate problems\n var stylePaddingLeft, stylePaddingTop, styleBor...
[ "0.80045426", "0.68701804", "0.6777399", "0.6686045", "0.66413146", "0.6546785", "0.65436155", "0.63668394", "0.63642305", "0.6350024", "0.63377166", "0.631492", "0.6310477", "0.62906593", "0.6275664", "0.62561333", "0.6250999", "0.6220785", "0.6211349", "0.61916256", "0.6190...
0.79837286
1
Take the (somewhat random) place name of the quake and attempt to return useful terms for use in a newspaper search. 1. If word "of" appears, extract string after it 2. If comma appears, extract string after it 3. If word "the" appears, extract string after it 4. Words from part of string still not ignored are combined...
function getSearchTerm(place) { var sliceStart; var ofLoc = place.indexOf(' of '); if (ofLoc !== -1) { sliceStart = ofLoc + 4; place = place.slice(sliceStart); } var commaLoc = place.indexOf(', '); if (commaLoc !== -1) { sliceStart = commaLoc + 2; place = place.slice(sliceStart); } var t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quibble(words) {\n if (!words.length) return `{}`;\n if (words.length === 1) return `{${words[0]}}`;\n if (words.length === 2) {\n words.splice(1, 0, \"and\");\n return `{${words.join(\" \")}}`;\n }\n let lastWord = words.pop();\n return `{${words.join(\",\")} and ${lastWord}}`;\n}", "functi...
[ "0.61055434", "0.5937755", "0.5735441", "0.5671512", "0.5642064", "0.55734843", "0.5527938", "0.54924047", "0.54732513", "0.5463126", "0.54492325", "0.5426543", "0.5414796", "0.5392325", "0.5389577", "0.53871226", "0.53751624", "0.53367156", "0.5304954", "0.52965033", "0.5280...
0.6781597
0
On color change event. Gets the color from the css class
function onColorUpdate(e){ current.color = e.target.className.split(' ')[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getColor(e) {\n color = e.value;\n }", "function handleColorClick(event) {\n event.preventDefault();\n var color = event.target.className;\n /* color should be valid following dell.led.colors array */\n dell.led.changeColor(color);\n chrome.runtime.sendMessage({\n color: color\n }, null);\n...
[ "0.74246514", "0.70602244", "0.6989028", "0.695008", "0.68892217", "0.68867683", "0.6861305", "0.6809262", "0.68008757", "0.6774424", "0.67332274", "0.6732014", "0.67086345", "0.6680976", "0.66715544", "0.6668369", "0.66292113", "0.6612484", "0.6603506", "0.65881085", "0.6582...
0.8082798
0
Adds an event listener to each square on the grid to change its background color on mouseover
function addSquareEventListeners() { const squareContents = document.querySelectorAll('.content'); squareContents.forEach(squareContent => { squareContent.addEventListener('mouseover', (e) => changeBackgroundColor(squareContent)); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n grid = document.querySelectorAll('.container > .cell');\n\n for (let i = 0; i < grid.length; i++) {\n grid[i].addEventListener('mouseover', function() {\n grid[i].style.backgroundColor = penColor;\n });\n }\n}", "function addMouseoverEventListener() { \n ...
[ "0.8092539", "0.7798614", "0.7703581", "0.7693681", "0.76847136", "0.76504433", "0.7569397", "0.7528275", "0.7415409", "0.7406564", "0.73972106", "0.73137623", "0.73077315", "0.72826123", "0.7276619", "0.7263195", "0.7257344", "0.7249657", "0.72201055", "0.71681434", "0.71536...
0.8038431
1
Changes the background color of a square
function changeBackgroundColor(squareContent) { const randomColor = Math.floor(Math.random()*16777215).toString(16); squareContent.style.backgroundColor = '#' + randomColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawBackgroundSquares() {\n for (var index = 0; index < self.allBackgroundSquares.length; index++) {\n var square = self.allBackgroundSquares[index];\n self.draw.fillStyle = square.color;\n self.draw.fillRect(square.x, square.y, square.width, square.height);\n }\n }", "function cha...
[ "0.7345707", "0.71420085", "0.70879173", "0.7062195", "0.7045658", "0.7041171", "0.7019577", "0.7013283", "0.69851625", "0.69719386", "0.69583553", "0.69561636", "0.6949468", "0.69413537", "0.6940135", "0.692618", "0.6920511", "0.69089544", "0.69010895", "0.6896232", "0.68819...
0.7330292
1
Adds or removes (toggles) the theme attribute of the document to facilitate a style change
function themeChange() { if (document.documentElement.hasAttribute('theme')) { document.documentElement.removeAttribute('theme'); } else { document.documentElement.setAttribute('theme', 'adult'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTheme(theme) {\n 'use strict';\n\n // Get reference to CSS file\n var css = document.styleSheets[0];\n\n if (css.deleteRule) { // Check if insertRule/deleteRule is supported (most modern browsers)\n switch (theme) {\n case 'aTheme':\n // Delete existing rule...
[ "0.72949106", "0.7089", "0.7063891", "0.7008102", "0.7003301", "0.69759536", "0.69759536", "0.69759536", "0.69759536", "0.69759536", "0.689851", "0.6871199", "0.68312657", "0.6787354", "0.67442495", "0.67271304", "0.66955394", "0.662075", "0.66122293", "0.65252936", "0.652529...
0.75102663
0
Stop bubble creation after chosen time limit
function startTimeLimit() { // plus one used to ensure timer does not stop early console.log(`Time limit ${gblS.timeLimit}s started`); return setTimeout(function () { console.log('countdown has ended, sorry'); cancelAnimationFrame(rAf); // remove any remaining bubbles from container ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function killBubble() {\n event.currentTarget.classList.add(\"dying\");\n window.setTimeout(destroyBubble, DEATH_DURATION, event.currentTarget);\n let pop = selectRandomElement(POPS);\n playSFX(pop);\n }", "function bubbleTrouble() {\n var delay = (3000 + Math.random() * 1000).toFixed(0); // mini...
[ "0.6647588", "0.60012114", "0.5945969", "0.58439916", "0.5720337", "0.5698104", "0.5658311", "0.5626207", "0.55612296", "0.554345", "0.5533712", "0.5490582", "0.5481103", "0.54805374", "0.54794854", "0.5468073", "0.5459036", "0.54587495", "0.5450271", "0.54397357", "0.543857"...
0.6026754
1
Convert a dual quaternion into a 4x4 matrix recommended reading:
function convertDualQuatToMatrix (dq) { // dq[0] dq[1] dq[2] dq[3] are our rotation quaternion elements // dq[4] dq[5] dq[6] dq[7] are our translation quaternion elements (the dual quaternion's imaginary component) return [ 1.0 - (2.0 * dq[1] * dq[1]) - (2.0 * dq[2] * dq[2]), (2.0 * dq[0] * dq[1]) + (2.0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toTRMat4x4(m) {\nreturn RQ.setTRMat4x4FromQV(m, this.xyzw, true, false, true);\n}", "toRotMat4x4(m) {\nreturn RQ.setRotMat4x4FromQV(m, this.xyzw, true, false, false);\n}", "toRotMatRows3x4(m) {\n//--------------\nreturn RQ.setRotMatRows3x4FromQV(m, this.xyzw, false, false, false);\n}", "function quatToRot(q)...
[ "0.68559784", "0.6731968", "0.66678727", "0.65467113", "0.63769555", "0.6352493", "0.6272812", "0.6226357", "0.609154", "0.6086984", "0.6046869", "0.6046869", "0.6046869", "0.6028525", "0.6017804", "0.59885657", "0.59885657", "0.59809387", "0.5899174", "0.5816535", "0.5795903...
0.7823416
0
Load the full list of categories and append to fieldCategory
function load_categories(){ connect('GET', 'index.php?q=/books/categories', {}) .done(function(response){ var cats = $('#fieldCategory'); cats.html(''); for (var x in response.data){ var id = response.data[x].id; var description = response.data[x].description; cats.append(`<option value=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadCategories() {\n\tjQuery.post(\n\t\tgetConnectorURL(),\n\t\t{\n\t\t\taction: 'get_categories'\n\t\t},\n\t\tfunction(result) {\n\t\t\tcategories = result.categories;\n\n\t\t\tdb.transaction(\n\t\t\t\tfunction (tx) {\n\t\t\t\t\ttx.executeSql(\"DROP TABLE IF EXISTS categories\");\n\t\t\t\t\ttx.executeSql...
[ "0.7280427", "0.67469764", "0.6589617", "0.64583635", "0.63651943", "0.63227344", "0.61650014", "0.6097116", "0.6082723", "0.6050924", "0.60333765", "0.60299104", "0.59642047", "0.59542733", "0.5885278", "0.5842914", "0.58392936", "0.5839117", "0.5823788", "0.58171827", "0.57...
0.67702866
1
Adds together values from ability bonus and the prof bonus if box is checked, just displays ability bonus if unchecked.
function skillBonus(ability, boxID, elementID) { const checkBox = document.querySelector(boxID); const skillAbility = abilityBonus[ability]; const totalBonus = skillAbility + profBonusValue; checkBox.addEventListener('change', function () { if (this.checked) { document.getElementById(elementID).value ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateProficiencyBonus() {\n const level = document.querySelector('#level');\n const bonus = document.querySelector('#proficiency-bonus');\n if (!isNaN(level.value)) {\n const proficiencyBonus = 1 + Math.ceil((level.value) / 4);\n if (bonus.textContent !== '+' + proficiencyBonus) {\...
[ "0.6451892", "0.60815", "0.5967161", "0.59033674", "0.58509606", "0.5793321", "0.57919466", "0.56315583", "0.54577285", "0.5456537", "0.5375118", "0.537337", "0.53685933", "0.53267944", "0.52994394", "0.5277753", "0.52594084", "0.5222201", "0.5215256", "0.521112", "0.51781946...
0.69193655
0
Called with first argument "this.reqId", means unique session string reqId shall be added into log message. The "this" in "this.reqId" is instance of koa. e.g logger.verbose(this.reqId, 'verbose');
doLog(level, parentArgs) { if (!this.initialized) { return; // no instance to log } let args = Array.prototype.slice.call(parentArgs); if (Buffer.isBuffer(args[0])) { // the first argument is "reqId" let reqId = args.shift().toString('base64'); args[0] = reqId + ': ' + args[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logger(req, res, next) {\n\n}", "function MCInitLog(req, routeName) {\n console.log( '\\n' + GetDateTime() );\n console.log('####################################');\n console.log('[' + count + '] ToL: request to \"' + 'mailchimp' + routeName + '\" ..');\n console.log( '<< MC (REQ): ' + J(req...
[ "0.577102", "0.57527196", "0.5712047", "0.5615035", "0.5597484", "0.5596482", "0.5592966", "0.5590859", "0.5552735", "0.5480502", "0.54446626", "0.54238737", "0.5416954", "0.54143786", "0.5408513", "0.54070216", "0.5398236", "0.53926617", "0.53422105", "0.53298223", "0.532192...
0.63349956
0
This function sets and clears node tooltip color names. According to the visjs docs, sending a null title to a node clears any existing tooltip. If this is done to a node without previous tooltip text, then a small empty box appears. The workaround solution implemented in this code is to clear only nodes that have exis...
function updateNodeTooltipColorNames(color_csv_index, tooltip_csv_index) { //var allUpdates = { updates: [] }; allUpdates = { updates: [] }; var listOfNetworkNodes = []; var color_index_to_set; if(color_csv_index >= 0) { // loop over all csv file rows in the network for(var j = 0; j ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetTooltipSelect(tooltip_csv_index) {\n nodeTooltipCSVIndex = tooltip_csv_index;\n console.log(\"resetTooltipSelect() called - tooltip_csv_index: \" + tooltip_csv_index);\n if((tooltip_csv_index == \"-1\") || (tooltip_csv_index == \"-2\")) {\n updateNodeTooltipColorNames(nodeColorCSVInde...
[ "0.66740894", "0.6381669", "0.58662295", "0.5376164", "0.5318463", "0.5207312", "0.5178474", "0.51395905", "0.50505483", "0.5042492", "0.5033018", "0.50249326", "0.5012831", "0.5004845", "0.49961662", "0.49840236", "0.49712226", "0.49602997", "0.49209878", "0.48956344", "0.48...
0.67068493
0
This function is a variation of updateNodeTooltipColorNames but only works on a single unique_index. Please see the explanatory notes for updateNodeTooltipColorNames. unique_index is an index into an array containing a list of unique values within a single network_node_csv_data column. currently not used
function updateNodeTooltipColorNames2(color_csv_index, tooltip_csv_index, unique_index) { //var allUpdates = { updates: [] }; allUpdates = { updates: [] }; var listOfNetworkNodes = []; var color_index_to_set; if(color_csv_index >= 0) { // loop over all csv file rows in the network fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateNodeTooltipColorNames(color_csv_index, tooltip_csv_index) {\n //var allUpdates = { updates: [] };\n allUpdates = { updates: [] };\n var listOfNetworkNodes = [];\n var color_index_to_set;\n if(color_csv_index >= 0) {\n // loop over all csv file rows in the network\n for(v...
[ "0.8078044", "0.62759674", "0.5577944", "0.53300935", "0.525821", "0.5246437", "0.5069489", "0.5068635", "0.48602873", "0.48556802", "0.4824798", "0.48224494", "0.48069304", "0.47862348", "0.47655952", "0.4754684", "0.46921092", "0.46920568", "0.46709797", "0.46708542", "0.46...
0.7961514
1
this function resets the node color, size, etc according to type this handles reset for all but color and opacity
function resetVisNodes(resetType) { allUpdates = { updates: [] }; var nodeList = getNodes(); //console.log("resetType is: " + resetType); if(resetType == "size") { for(var k = 0; k < nodeList.length; k++) { //allUpdates.updates.push({ var obj = {}; // obj[rese...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleResetNode(node, type){\n if(type === \"node\"){\n // get back color\n if (node.hiddenColor !== undefined) {\n node.color = node.hiddenColor;\n node.hiddenColor = undefined;\n }else{\n if(node.group !== undefined){\n node.color = undefined;\n } else {\n nod...
[ "0.80063015", "0.7072256", "0.6949439", "0.6683316", "0.65673524", "0.63728076", "0.6270832", "0.62101084", "0.6200388", "0.6197654", "0.6193624", "0.61094487", "0.6060014", "0.60513115", "0.60509783", "0.60215914", "0.60163885", "0.60153645", "0.60008675", "0.5987985", "0.59...
0.71171683
1
get a list of all nodes in the network
function getNodes() { var allNodes = nodes.get(); var nodeList = []; for(var i = 0; i < allNodes.length; i++) { nodeList.push(allNodes[i].id); } return nodeList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function list() {\n return request({\n url: `/nodes`,\n method: 'GET'\n })\n}", "getNodes() {\n return this.target.assignedNodes(this.options);\n }", "getAllNodes () {\n client.getAllNodes(this.host, 4369, function (err, nodes) {\n if (err) {\n console.error(err)\n return\n...
[ "0.75107765", "0.73230606", "0.7228972", "0.7228457", "0.71468574", "0.7119423", "0.70205134", "0.6997279", "0.6945214", "0.69331974", "0.68744516", "0.67981434", "0.6700371", "0.66883767", "0.668228", "0.6653832", "0.65026927", "0.6468632", "0.64098525", "0.6366587", "0.6360...
0.7406529
1
get a list of all edges in the network
function getEdges() { var allEdges = edges.get(); var edgeList = []; for(var i = 0; i < allEdges.length; i++) { edgeList.push(allEdges[i].id); } return edgeList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllEdges() {\n let edges = [];\n\n for (let [from, edgeList] of this.outboundEdges) {\n for (let [type, toNodes] of edgeList) {\n for (let to of toNodes) {\n edges.push({\n from,\n to,\n type\n });\n }\n }\n }\n\n return edge...
[ "0.79638386", "0.7209368", "0.7063907", "0.64901507", "0.6445384", "0.63474506", "0.6332117", "0.6324167", "0.6253682", "0.62409467", "0.6238958", "0.6226964", "0.6226964", "0.620178", "0.61632717", "0.61408937", "0.61107284", "0.6097275", "0.6015018", "0.59926337", "0.598368...
0.7613145
1
This function selects all nodes in selectedNodes in the network display. The array selectedNodes contains a list of nodes which have been recently selected in map or datagrid. Note that this function will only add to the previously selected node list it doesn't deselect any. This function is called from the event bus s...
function selectNodes(event,selectedNodes) { if(event.target.className !== "network") { //console.log("about to do a network.selectNodes off selectNodes called from EventBus with nodeNames: " + selectedNodes); /* note this should not be necessary since the network display is a superset of map and spr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ReselectNodes() {\n var selectedNodes = this._selectionHandler ? this._selectionHandler.getSelection() : [];\n for (var i = 0; i < selectedNodes.length; i++) selectedNodes[i].setSelected(true);\n }", "function selectNode(selectedNode) {\n if (selectedId === selectedNode.id) {\n selectedId = undefined\...
[ "0.69885796", "0.66922975", "0.66623485", "0.62457544", "0.61954474", "0.6180021", "0.6180021", "0.6180021", "0.6180021", "0.6180021", "0.61796796", "0.6130537", "0.6076018", "0.60278875", "0.60230285", "0.5939193", "0.589433", "0.5830518", "0.58284825", "0.57839775", "0.5783...
0.7399594
0
this function deselects a node with name nodeName in the network display this function is called from the event bus so responds to node deselections in map or datagrid
function deselectNodes(event,nodeNames) { //console.log("in network deselectNodes event.target.className: " + event.target.className); if(event.target.className !== "network") { //console.log("about to do a network.selectNodes off deselectNodes called from EventBus with nodeNames: " + nodeNames); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unselectNE() {\n\t\tvar ne = document.getElementById(this.rectid);\n\t\tne.fill.color = this.bgColor1;\n\t\tne.fill.color2 = this.bgColor2;\n\t\tif (this.bgType == BG_NONE) {\n\t\t\tne.fill.opacity = \"0%\";\n\t\t}\n\t\tthis.selected = false;\n\t\tif (this.miniNE != null) {\n\t\t\tthis.miniNE.writeMiniNet...
[ "0.6993384", "0.69922274", "0.6457876", "0.6233965", "0.6158734", "0.6140415", "0.61346", "0.61306083", "0.6101657", "0.60656345", "0.6053402", "0.5991774", "0.598178", "0.5940883", "0.5921588", "0.5887814", "0.5887814", "0.58858323", "0.5867405", "0.5845613", "0.5830718", ...
0.7465743
0
Function to send buttonValue to the PHP file
function sendData() { $.ajax({ type: 'POST', url: 'scripts/save.php', data: { 'tellSeverTheButtonValue': whatButtonWasPressed }, success: function() { window.console.log("success"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleButton(data) {\r\n console.log('Button: ', data);\r\n buttonValue = Number(data);\r\n}", "function sendKeyToPhp(e){\n if(isWASD(e)===false){\n return;\n } \n \n sendWithAJAX(e.key);\n changeBtnColor(e.key, 'o'); \n}", "btnClick() {\n\t\tthis.socket.emit(\"btn ...
[ "0.6536743", "0.62562054", "0.618808", "0.61444616", "0.61058813", "0.6076938", "0.6063692", "0.60528916", "0.6021046", "0.59612674", "0.5953988", "0.5951236", "0.5932861", "0.5831372", "0.5785517", "0.5776685", "0.5772299", "0.5736023", "0.5686495", "0.56472546", "0.56429213...
0.68954575
0
Cadastra um montadora no banco de dados
function addMontadora(montadora) { return new Promise((resolve,reject) => { let stmValidacao = db.prepare("select * from tbMontadoras where nome = ?") stmValidacao.get([montadora], (err, row) => { if(row !== undefined) { reject("Montadora já cadastrada!") } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function montaValorMes () {\r\n\t\t\t// laco de despesas\r\n\t\t\tfor (var x in $scope.despesas) {\r\n\t\t\t\t// separo a despesa\r\n\t\t\t\tvar despesa = $scope.despesas[x];\r\n\t\t\t\t// crio um atributo pres(array) na despesa\r\n\t\t\t\tdespesa.pres = [];\r\n\r\n\t\t\t\t// laco de meses até 8\r\n\t\t\t\t// for ...
[ "0.62380177", "0.587319", "0.5813353", "0.5625434", "0.5563143", "0.5456226", "0.5456008", "0.5454982", "0.5387116", "0.53463966", "0.5328447", "0.5327696", "0.53143364", "0.5310572", "0.5281773", "0.52357274", "0.5222107", "0.52048653", "0.51837415", "0.51817256", "0.5164607...
0.61748964
1
functions overview // ////////////////////////// Open Map // setEvents(jsonIn) Open Find // showFinds(name, event_name) >setEvent(jsonIn) >setFinds(jsonIn) showHeatmap() showTrajektiorien() resetTrajektorien() GoTo Events // showEvents() Zoom // showBalloon(event_name) >setEventZoomToBalloon(jsonIn) >setFindsZoomToBall...
function setEvents(jsonIn) { resetTrajektorien(); markers_events = null; markers_events = L.markerClusterGroup(); displayLayer = L.geoJson(jsonIn, { pointToLayer: function(feature, latlng) { var marker = L.marker(latlng, {icon: markerIconEvent}); var popupContent = ""; popup...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showOverlays()\n{\n setAllMap(map);\n}", "function eventShowMap() {\n // Create a map object and specify the DOM element for display.\n $.ajax({\n url: document.URL,\n method:'GET',\n dataType: 'JSON'\n }).done(function(response){\n eventLat = response[\"lat\"];\n eventLng = respons...
[ "0.66594607", "0.6651656", "0.65883756", "0.64496857", "0.6428371", "0.6415068", "0.64063674", "0.630852", "0.6225054", "0.62151074", "0.621082", "0.61999965", "0.6189886", "0.61736", "0.6142829", "0.61411256", "0.6134988", "0.6130985", "0.6130577", "0.611051", "0.6109648", ...
0.73644394
0
We use it to choose which color will be winning one
function pickWinningColor(){ const result = Math.floor(Math.random() * colors.length); return colors[result]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winningcolor(correctcolor) {\n\tfor ( var i=0; i < modeselect ; i++) {\n\t\tsqlist[i].style.backgroundColor = correctcolor;\n\t}\t\n}", "function pickColor(){\n\treturn colors[(Math.floor(Math.random() * difficulty))]\n}", "function pickColor(){\n\tvar random = Math.floor(Math.random() * difficulty);\...
[ "0.7495725", "0.73254085", "0.723259", "0.72216624", "0.7214456", "0.7147097", "0.71448874", "0.7082848", "0.7058128", "0.7047756", "0.70156944", "0.70084786", "0.70026916", "0.6989548", "0.697782", "0.6976657", "0.6969256", "0.6961071", "0.69510275", "0.6947277", "0.6936452"...
0.81025743
0
Generation of color string
function generateColor(){ const color="rgb("+genColorVal()+", "+genColorVal()+", "+genColorVal()+")"; return color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genColor() {\n var ret = []; // via http://stackoverflow.com/a/15804183\n\n if (next_color < 16777215) {\n ret.push(next_color & 0xff); // R\n\n ret.push((next_color & 0xff00) >> 8); // G\n\n ret.push((next_color & 0xff0000) >> 16); // B\n\n next_color += 10; // This is exaggerat...
[ "0.74077755", "0.74077755", "0.73435813", "0.72839874", "0.7274803", "0.71565706", "0.7155982", "0.7132919", "0.7098883", "0.7055093", "0.70406467", "0.7033854", "0.70324415", "0.702948", "0.7016789", "0.7016789", "0.6984711", "0.69477195", "0.69278353", "0.69181085", "0.6870...
0.7500538
0
Generation of one of three values of color
function genColorVal(){ return Math.floor(Math.random() * 256); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get colorValue() {}", "function generateColor(red, green, blue)\n{\n paintColor[0] = red;\n paintColor[1] = green;\n paintColor[2] = blue;\n}", "function colorValue() {\n return randomHex() + randomHex();\n}", "function randomColor(){\n return color3(Math.floor(Math.random()*256),\n Mat...
[ "0.73014474", "0.7168721", "0.7153105", "0.7081319", "0.7032432", "0.70108324", "0.69728005", "0.69728005", "0.6964967", "0.6945185", "0.6941386", "0.69360155", "0.69239014", "0.6912842", "0.6912451", "0.68990797", "0.68982375", "0.68776155", "0.6874912", "0.6841459", "0.6814...
0.74743253
0
Sanitize faces json to save in database
function sanitizeFacesJson(faces) { const newFacesJson = faces.map(face => { return { name: face.name, boundingBoxId: face.boundingBoxId, } }); return newFacesJson; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "scrubJSONData(data) {\n data = data.replace(/\" : /g, '\": ');\n // data = data.replace(/\"eventId\"/g, '\"eventID\"');\n return data;\n }", "function cleanupJSON(str) {\n str = str.replace(/ \"rules\": \\[/g, ' rules: [');\n str = str.replace(/ \"inclusive\": /g, ' inclusive: ');\n ...
[ "0.66592", "0.6334387", "0.6334387", "0.594698", "0.581458", "0.5796886", "0.5746413", "0.57217854", "0.5681455", "0.5533982", "0.5524354", "0.54850596", "0.54805064", "0.54732776", "0.5471968", "0.54590386", "0.5440912", "0.5390347", "0.5357733", "0.52366143", "0.5208763", ...
0.7346037
0
Implements the sequence of steps for cropping and saving faces in a photo
async function cropAndSaveFaces(photoDetails) { const photoFSDetails = { album: photoDetails.albumName, photo: photoDetails.photoName }; const photoFaceDetails = { bounding_boxes: photoDetails.boundingBoxes }; const faces = await cropfaces.cropFacesAndSave(photoFSDetails, pho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function cropFaces(call, callback) {\n const result = await cropAndSaveFaces(call.request);\n callback(null, result);\n}", "function cropImages ( f, index ){\n //face found\n if( f ){\n //get body\n var body = $('body')[0];\n //create new canvas for cropped Image\n c...
[ "0.650804", "0.6269158", "0.61293954", "0.5965919", "0.59354925", "0.5803127", "0.5751133", "0.5653384", "0.56198466", "0.559379", "0.5589565", "0.5587751", "0.5585866", "0.5514302", "0.5491107", "0.5485648", "0.54731876", "0.5439421", "0.5435895", "0.54245746", "0.5423033", ...
0.6332795
1
gRPC server method implementation for cropping faces in photo
async function cropFaces(call, callback) { const result = await cropAndSaveFaces(call.request); callback(null, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function cropAndSaveFaces(photoDetails) {\n const photoFSDetails = {\n album: photoDetails.albumName,\n photo: photoDetails.photoName\n };\n const photoFaceDetails = {\n bounding_boxes: photoDetails.boundingBoxes\n };\n const faces = await cropfaces.cropFacesAndSave(photoF...
[ "0.6254507", "0.5990563", "0.59891325", "0.5753979", "0.5543576", "0.5528645", "0.5448429", "0.5403728", "0.53938526", "0.5382725", "0.5281449", "0.526023", "0.52230185", "0.5219387", "0.521196", "0.51831806", "0.51218337", "0.5119555", "0.50842947", "0.5073094", "0.5063105",...
0.670043
0
Create a extractor plugin
constructor() { super("extractor"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getExtractor(extractorName) {\n try {\n let Extractor = require('./' + extractorName);\n return new Extractor();\n } catch (e) {\n let BaseExtractor = require('./baseExtractor/BaseExtractor');\n return new BaseExtractor();\n }\n }", "extract() {...
[ "0.60906327", "0.56267786", "0.52978945", "0.52739084", "0.5177456", "0.51543677", "0.5148287", "0.51272124", "0.51125795", "0.5077835", "0.50344336", "0.5011786", "0.5011786", "0.5006304", "0.4935686", "0.48931867", "0.4880854", "0.48801434", "0.48656747", "0.48424035", "0.4...
0.61932224
0
get the formatted headers for MimeMessage objects
function getRfc822Headers(headerArr, contentType, ignoreHeadersArr) { let hdrs = ""; let ignore = []; if (contentType.indexOf("multipart/") >= 0) { ignore = [ 'content-transfer-encoding', 'content-disposition', 'content-description' ]; } if (ignoreHeadersArr) { ignore = ignore.concat(ig...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessageHeaders() {\n var headerNames = context.getVariable('message.headers.names');\n var headerNamesArr = headerNames.toArray();\n var headersObj = {};\n for (var i = 0; i < headerNamesArr.length; i++) {\n // print(\"HEADER: \" + headerNamesArr[i] + \":\" + context.getVariable('mes...
[ "0.72716016", "0.6573093", "0.65542376", "0.63300186", "0.6233245", "0.61531234", "0.60410285", "0.6035654", "0.6009267", "0.6009267", "0.6009267", "0.60064346", "0.59751314", "0.59649134", "0.59649134", "0.59649134", "0.5923259", "0.5910983", "0.59100485", "0.59100485", "0.5...
0.6949054
1
This will kept poll in standby status. This accept two variables 1st = id. 2nd = the mode; / 1)when the page load. if set == 1 it means the function call is from server so set my global variable. else
function standby(val,set){ if(set == 1){ console.log("set1"); $.when( $.ajax({ url : "admin/poll/standby.php", type : "post", data : {data : val}, dataType : "json", success : function(res){ console.log("sushant"); console.log(res.start_date); startdate = res.start_date; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MhSet(obj, state) {\n var url='./set;Referrer?$' + obj + '=' + state;\n $.get(url, function (data) {\n //alert(data);\n if (obj == \"mode_occupied\") {\n GetMhMode(\"page\");\n }\n });\n}", "function ajax_status_call(funct) {\n\tif(!funct || funct==null || funct=='null') funct='default'...
[ "0.6032709", "0.5968643", "0.59537107", "0.58859295", "0.58836764", "0.5849511", "0.57665604", "0.5762623", "0.5722561", "0.5665666", "0.56554556", "0.5630694", "0.56079733", "0.56077015", "0.5578843", "0.55742437", "0.55620825", "0.5561702", "0.5544402", "0.5543892", "0.5543...
0.6162649
0
Given a string, find the length of the longest substring in it with no more than K distinct characters. You can assume that K is less than or equal to the length of the given string. The window will need to extend while checking to see if there are more than k distinct characters. When that occurs the window will move ...
function longest_substring_with_k_distinct(str, k) { // TODO: Write code here let windowStart = 0, maxLength = 0, characterFrequency = {}; if(str.length == 0 || k < 1) return 0; //extends the window for(let windowEnd = 0; windowEnd < str.length; windowEnd++){ const rightCharacter = str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longest_substring_with_k_distinct_characters(s, k) {\n //variables\n let maxLength = 0;\n let len = 0;\n const freq = {};\n\n let left = 0;\n //sliding window\n //loop\n //expand window right\n for(let right = 0; right < s.length; right++) {\n let c = s[right];\n /...
[ "0.86397153", "0.84063", "0.8361973", "0.80756325", "0.73880315", "0.714686", "0.70265514", "0.6799284", "0.672578", "0.6533317", "0.6489869", "0.6364779", "0.6298415", "0.6234067", "0.6183668", "0.6169496", "0.6053676", "0.60088027", "0.60010135", "0.5986897", "0.59601396", ...
0.8633309
1
Mascara IP // Valida IP
function validateIP(ip,showErrMsg){ a = (/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/).test(ip); if (!a && showErrMsg){ alert(ip+' não é um ip válido!'); } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validIP (ip) {\n return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ip);\n }", "function urlValidator(ip) {\n //TODO uncomment when not working ...
[ "0.78527844", "0.772128", "0.76448524", "0.7634427", "0.75327027", "0.74510473", "0.73848104", "0.7381864", "0.7298635", "0.72330695", "0.7204521", "0.717931", "0.7088301", "0.70796263", "0.70690894", "0.70587176", "0.7053473", "0.70434105", "0.698278", "0.6949265", "0.689559...
0.7963054
0
If not connected, reconnects, else sets connection isNotAlive and sends ping
sendPing(){ if(!this.isAlive()){ this.emit('noPong'); if(this.state === CONST.STATE.CONNECTED){ this.state = CONST.STATE.NOT_CONNECTED; } return; } this.setHalfDead(); this.ping(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkConnectionStatus() {\n if (!client.isConnected()) {\n connect();\n }\n}", "_reconnect () {\n if (this._reconnecting === true) return\n this._reconnecting = true\n\n log('Trying to reconnect to remote endpoint')\n this._checkInternet((online) => {\n if (!online && !cst.PM...
[ "0.71771675", "0.7072153", "0.70658344", "0.6923626", "0.6916625", "0.6901307", "0.67175573", "0.6674221", "0.65942264", "0.6524712", "0.6469758", "0.6459962", "0.6447769", "0.64055884", "0.6394571", "0.6368811", "0.6349819", "0.63272357", "0.63232064", "0.6308445", "0.626988...
0.7322577
0
extract and display a message which is sent in the (JSON) body of a response
function showMessageInJsonBody(resp) { if (resp.message != null) { appState.notify(resp.message); } else { resp.json().then(res => { appState.alert(res.message); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function message_from_response(result) {\n console.log(result);\n\n // result is dict\n if (result.hasOwnProperty(\"detail\") && result.detail) return result.detail;\n\n // result is object from XHR, check responseText first, it is always presented\n if (!result.responseText) return \"Critical error on server...
[ "0.7065211", "0.6810015", "0.65953124", "0.64871067", "0.6414999", "0.63214433", "0.6309886", "0.62429404", "0.6241231", "0.62383217", "0.6231545", "0.6216832", "0.6212084", "0.62092", "0.6177223", "0.61765456", "0.6146553", "0.6137817", "0.60965854", "0.60845065", "0.608186"...
0.6966316
1
import locked assignments from TAPP
function importAssignments() { appState.setImporting(true); return postHelper( '/import/locked-assignments', {}, () => { appState.setImporting(false, true); fetchAll(); }, showMessageInJsonBody ).catch(() => appState.setImporting(false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTask(creep, task)\n{\n creep.memory.lockedTask = task;\n}", "function setTask(creep, task)\n{\n creep.memory.lockedTask = task;\n}", "Lock() {\n\t\t\t\tDEFINE(THS, { Locked: HIDDEN(true) });\n\t\t\t}", "function assignTasks(){\n\t\t\t\tlet minorList = document.getElementById('minorList'...
[ "0.5170785", "0.5170785", "0.50201553", "0.48658818", "0.48648927", "0.4858102", "0.48242646", "0.48175892", "0.48066187", "0.47750315", "0.4744555", "0.47402474", "0.4659199", "0.46529675", "0.46191418", "0.46105826", "0.46105826", "0.45991603", "0.45816997", "0.45700127", "...
0.7261243
0
mark contracts as hr_processed
function setHrProcessed(offers) { return putHelper( '/offers/batch-update', { offers: offers, hr_status: 'Processed' }, fetchAll, showMessageInJsonBody ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function vesselFinalProcess(){\n let finalStats = await vessel.getVesselStats(vesselID)\n vesselStats.fill_level = finalStats.fill_percent\n vesselValidation = vessel.validate(finalStats)\n vessel.batchRecord(vesselStats, vesselValidation, {'start_time': startTime, 'end_time': endTime})\n}", "f...
[ "0.53247994", "0.5280758", "0.50372034", "0.502856", "0.5022323", "0.5022323", "0.4829362", "0.47859362", "0.47746313", "0.47418398", "0.4740577", "0.4711811", "0.47096917", "0.4706714", "0.46886572", "0.4687276", "0.46832547", "0.4655269", "0.46522033", "0.4647574", "0.46400...
0.5944805
0
mark contracts as ddah_accepted
function setDdahAccepted(offers) { return putHelper( '/offers/batch-update', { offers: offers, ddah_status: 'Accepted' }, fetchAll, showMessageInJsonBody ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async approveCompound(){\n let spender = Compound.util.getAddress(Compound.cDAI, process.env.ETH_NETWORK);\n //spender = '0xF0d0EB522cfa50B716B3b1604C4F0fA6f04376AD'; //cDAI\n console.log('spender: ' + spender);\n let param = cDAI.methods().approve.call({ spender: spender, amount: '3000...
[ "0.546718", "0.5462884", "0.5376473", "0.53274953", "0.53003204", "0.5237304", "0.5176593", "0.5158348", "0.51551235", "0.51441354", "0.51383096", "0.50958", "0.50797486", "0.50399286", "0.5000407", "0.4988379", "0.49624473", "0.49570292", "0.4952312", "0.49141768", "0.491170...
0.59765524
0
show the contract for this offer in a new window, as an applicant would see it
function showContractApplicant(offer){ window.open('/offers/' + offer + '/pdf'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showContractHr(offer){\n return postHelper('/offers/print',\n\t\t { contracts: [offer], update: false },\n\t\t resp => resp.blob())\n\t.then(blob => {\n\t let fileURL = URL.createObjectURL(blob);\n\t let contractWindow = window.open(fileURL);\n\t contractWindow.onclose = () => URL.re...
[ "0.75074667", "0.6410564", "0.64081013", "0.6303137", "0.6297803", "0.6287652", "0.62083143", "0.61675864", "0.61573243", "0.61416805", "0.60092115", "0.5987023", "0.59561056", "0.5934717", "0.59297377", "0.59288836", "0.58903086", "0.58342326", "0.5811843", "0.57989776", "0....
0.6675116
1
show the contract for this offer in a new window, as HR would see it
function showContractHr(offer){ return postHelper('/offers/print', { contracts: [offer], update: false }, resp => resp.blob()) .then(blob => { let fileURL = URL.createObjectURL(blob); let contractWindow = window.open(fileURL); contractWindow.onclose = () => URL.revokeObjectURL(fileUR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onShowContracts(){\n\tvar restriction = new Ab.view.Restriction();\n\trestriction.addClause(\"eq.eq_id\",$(\"wr.eq_id\").value,'=');\n\tView.openDialog(\"ab-helpdesk-request-equipment.axvw\", restriction, false); \n}", "function showContracts()\r\n{\r\n openModalDialog('../popup/cm_contracts_search_list...
[ "0.65091395", "0.6437761", "0.6379958", "0.6316583", "0.61799335", "0.61171216", "0.6087576", "0.60873103", "0.6029105", "0.6016644", "0.6015765", "0.5984747", "0.5940536", "0.5865689", "0.58497405", "0.5829036", "0.58123934", "0.5778878", "0.5763486", "0.57416195", "0.573766...
0.7747555
0
video event update icon
function updateIcon() { const ctrl = document.querySelector('.player__button[title="Toggle Play"]'); if(video_application.paused) { ctrl.textContent = '>'; } else { ctrl.textContent = '||'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateIcons() {\n // Check if video is paused or playing \n if (video.paused) {\n // if video is paused, show the play button \n play.innerHTML = '<i class=\"fa fa-play fa-2x\">'\n } else {\n // if video is playing, show the pause button\n play.innerHTML = '<i class=\"...
[ "0.69404376", "0.6748151", "0.6539072", "0.6409013", "0.63928616", "0.6277707", "0.6215413", "0.6174466", "0.6101796", "0.6093733", "0.60829467", "0.6008493", "0.60042536", "0.59548753", "0.5945305", "0.58496493", "0.57978505", "0.5783054", "0.578102", "0.5778401", "0.5764911...
0.68303466
1
Make bad grades red
function failGrade(res){ var value = $(res).text(); if(value<75){ $(res).addClass('failgrade'); }else{ $(res).removeClass('failgrade'); } value >100?$(res).addClass('invaliddata'):$(res).removeClass('invaliddata'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moreAccurateGrades(grade)\n{\n if(grade >= 93)\n {\n console.log(\"A\");\n }\n else if(grade >= 90)\n {\n console.log(\"A-\");\n }\n else if(grade >= 88)\n {\n console.log(\"B+\");\n }\n else if(grade >= 83)\n {\n console.log(\"B\");\n }\n ...
[ "0.6686807", "0.6682802", "0.66391355", "0.64839536", "0.64453155", "0.64014816", "0.6389708", "0.63769805", "0.6354577", "0.6336328", "0.6329735", "0.6327735", "0.6298229", "0.62882507", "0.62698996", "0.6264354", "0.625937", "0.6215064", "0.61765164", "0.61514586", "0.61507...
0.70264876
0
Return true if all of the terms in the array QUERY are found within the string STR, else false.
function matchesAll( query, str ) { for( const term of query ) { const regexp = new RegExp( term ); if( str.search( regexp ) == -1 ) { return( false ); } } return( true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchesAny (text, query) {\n const terms = tokenize(query)\n return terms.some(term => includes(text, term))\n}", "function matchesAll (text, query) {\n const terms = tokenize(query)\n return terms.every(term => includes(text, term))\n}", "function containsAny (myStr, mySearchWords) {\r myStr =...
[ "0.6771287", "0.6763745", "0.6745109", "0.647645", "0.6202656", "0.61940306", "0.60419166", "0.6006815", "0.59950274", "0.5993119", "0.5953036", "0.5924321", "0.5887887", "0.5853448", "0.58421904", "0.58216983", "0.58134556", "0.57929325", "0.5787716", "0.5780859", "0.5770033...
0.7896978
0
QUERY is an array of strings. INDEX is an array of arrays: [ id, index_string ]. Call hideElement for all elements with an id from INDEX where all of the strings in the QUERY array may be found as regular expressions in the corresponding index_string. Else call showElement for those ids.
function searchElements( query, index ) { let result = [] // console.log( "searchElements: index=[%s]\tquery=[%s]", index.join(", "), query.join(", ") ); indexLoop: for (const idx of index ) { const id = idx[0]; const index_string = idx[1]; // console.log( "\tid=[%s]\tindex_string=[%s]", id, index_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hide(array) {\n\tfor (i = 0; i < array.length; i++) {\n\t\tdocument.querySelector(array[i]).style.display = \"none\";\n\t} \n}", "function hideElements(elementsIDArray){\n\n elementsIDArray.forEach(function (elementID) {\n $(\"#\" + elementID).hide(0);\n })\n\n}", "function hideResult_box...
[ "0.5679634", "0.56691784", "0.55312854", "0.54352355", "0.5260236", "0.52534705", "0.5188404", "0.5143018", "0.5132606", "0.5115958", "0.5091335", "0.5091335", "0.5084537", "0.50754607", "0.506667", "0.50657374", "0.502968", "0.50296557", "0.49892294", "0.4983994", "0.4983258...
0.6760264
0
Assume the keyboard event has already been processed. Use the query in the query box to filter the page according to the recipeIndex
function keyboardHandler(e) { const key = String.fromCharCode( e.which || e.keyCode ).toLowerCase(); //console.log( "[%s] pressed", key ); let query = document.getElementById( "searchBox" ).value; query = query.replace( /[^0-9a-z ]+/g, "" ) //console.log( "query=[%s]", query ); searchElements( q...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleRecipeSearch(evt){\r\n\tevt.preventDefault();\r\n\tlet query = searchInput.value.trim();\r\n\r\n\tif(query.length < 1) return;\r\n\r\n\tgetData(query)\r\n\t\t.then(res => res.hits)\r\n\t\t.then(hits => {\r\n\t\t\tresponseHits = hits;\r\n\t\t\tresultsCount.textContent = hits.length;\r\n\t\t\trenderRe...
[ "0.661859", "0.65894425", "0.65563977", "0.6540191", "0.638545", "0.6304836", "0.6298424", "0.6259623", "0.62451595", "0.61824834", "0.61085725", "0.60791385", "0.60778815", "0.60529006", "0.60403687", "0.601212", "0.6002822", "0.5999281", "0.5979021", "0.596872", "0.59686637...
0.7131263
0
split accesskey according to
function splitAccesskey(val) { var t = val.split(/\s+/), keys = []; for (var i=0, k; k = t[i]; i++) { k = k[0].toUpperCase(); // first character only // theoretically non-accessible characters should be ignored, but different systems, different keyboard layouts, ... screw it. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitAccesskey(val) {\r\n\t\t var t = val.split(/\\s+/);\r\n\t\t var keys = [];\r\n\r\n\t\t for (var i = 0, k; k = t[i]; i++) {\r\n\t\t k = k.charAt(0).toUpperCase(); // first character only\r\n\t\t // theoretically non-accessible characters should be ignored, bu...
[ "0.73236954", "0.7144299", "0.7125983", "0.5883737", "0.58063513", "0.57705176", "0.5755602", "0.5437455", "0.5420553", "0.5406812", "0.53885263", "0.538687", "0.53659487", "0.5363268", "0.5361168", "0.5343682", "0.53388023", "0.53388023", "0.53234506", "0.53230405", "0.53130...
0.714521
1
checks if object is iterable and the object is iterable if he has iterator() method
function isIterable(obj) { // checks for null and undefined if (obj == null) { return false; } return typeof obj[Symbol.iterator] === 'function'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utilIsIterable(obj) {\n\t\treturn obj != null && typeof obj[Symbol.iterator] === 'function'; // lazy equality for null\n\t}", "function isIterable(obj) {\n // checks for null and undefined\n if (obj == null) {\n return false;\n }\n return typeof obj[Symbol.iterator] === \"function\";\n}", "func...
[ "0.8267174", "0.8237989", "0.79190105", "0.7828857", "0.7777098", "0.76293534", "0.76245284", "0.7513122", "0.71900564", "0.7055004", "0.6926545", "0.6926545", "0.6926545", "0.6895995", "0.6895995", "0.68784744", "0.68778616", "0.68778616", "0.68778616", "0.68778616", "0.6863...
0.8300301
0
factory function for tweening between two projection rotations
function pathTween(rotation0, rotation1) { var t = 0; var i = d3.interpolate(rotation0, rotation1); return function () { return function (u) { t = u; projection.rotate([i(u)[0], i(u)[1]]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveTransition(targetPosition, targetRotation) {\r\n // TWEEN\r\n const duration = 200;\r\n\r\n new Tween(this.object.position).easing(Easing.Cubic.Out).to({\r\n x: targetPosition.x,\r\n y: targetPosition.y,\r\n z: targetPosition.z\r\n }, duration).start();\r\n new Tween(this.mesh.pos...
[ "0.6260327", "0.62207437", "0.61607796", "0.609257", "0.6041248", "0.600521", "0.5854067", "0.5838392", "0.5724611", "0.57223886", "0.5647121", "0.5639286", "0.56320226", "0.56295943", "0.56139433", "0.56044894", "0.5579372", "0.55639684", "0.5560987", "0.55604196", "0.555955...
0.67049545
0
Calculates the Bloom filter containing all nonprivate contacts.
calculateBloomFilter1Hop() { let bf = new BloomFilter( 4314, // number of bits to allocate. With 300 entries, we have a false positive rate of 0.1 %. 10 // number of hash functions. ); for (let i = 0; i < this.contacts.length; i++) { if (!this.contacts[i].privateContact) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateBloomFilter1Hop() {\n let bf = new BloomFilter(\n 431328, // number of bits to allocate. With 30000 entries, we have a false positive rate of 0.1 %.\n 10 // number of hash functions.\n );\n for (let i = 0; i < this.contacts.length; i++) {\n if (!this.contacts[i].privateCon...
[ "0.7194747", "0.6123346", "0.5994788", "0.5508946", "0.5301775", "0.5258774", "0.5178928", "0.50670534", "0.5010372", "0.49947825", "0.49359798", "0.48985672", "0.4860577", "0.48462403", "0.48446342", "0.48322114", "0.47970077", "0.47914362", "0.47794548", "0.4754569", "0.474...
0.68932223
1
Whether the setting should take the full width of the settings panel. This is always false for array settings.
get fullwidth() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set minimumWidth(value) { }", "moreWidth() {\n return this.widthList_.length > 0;\n }", "get HasColumnSettings() {\n return !tp.IsEmpty(this.fColumnSettings) && (this.fColumnSettings.length > 0);\n }", "function fullSize() {\n return (self.ElementFieldSet.length > 4) || self.elem...
[ "0.59258556", "0.5911579", "0.5818003", "0.572439", "0.5700827", "0.5631881", "0.56231874", "0.56037134", "0.5595602", "0.55684066", "0.549602", "0.5469588", "0.5456531", "0.5453412", "0.54183483", "0.54170394", "0.5360906", "0.53440833", "0.53426033", "0.5339669", "0.533885"...
0.69859314
0
An array of SettingsCategory objects that each set in this setting should have.
get categories() { return this.args.categories || this.args.settings || []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCategories() {\n if (this._categories && this._categories.length > 0) return this._categories;\n return [this.getId().series];\n }", "getCategories() {\n return ['Snacks', 'MainDishes', 'Desserts', 'SideDishes', 'Smoothies', 'Pickles', 'Dhal', 'General']\n }", "function get_categories...
[ "0.659458", "0.64480853", "0.6159683", "0.613968", "0.6044581", "0.600912", "0.59038293", "0.5895174", "0.57305986", "0.56919795", "0.56619054", "0.56285983", "0.55894804", "0.5574267", "0.557164", "0.55397", "0.549306", "0.5469962", "0.545078", "0.54244417", "0.5423109", "...
0.6996806
0
An array of SettingsScheme objects that can be used in this array's sets.
get schemes() { return this.args.schemes || []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _getScopes(settings) {\n if (MP.DEBUG) {\n console.log('_getScopes(', settings, ')');\n }\n return new Promise((resolve) => {\n const scopeList = {};\n for (const setting of settings) {\n const index = Number(setting.scope);\n ...
[ "0.55792516", "0.54174644", "0.5072826", "0.49679267", "0.49679267", "0.49055722", "0.48947343", "0.484578", "0.48328596", "0.48328596", "0.47630477", "0.47586155", "0.47521642", "0.474636", "0.47459823", "0.4707808", "0.4707808", "0.4705399", "0.4684689", "0.46743047", "0.46...
0.646735
0
Load titulo and append to req.
function load(req, res, next, id) { Titulo.get(id) .then((titulo) => { req.titulo = titulo; // eslint-disable-line no-param-reassign return next(); }) .catch(e => next(e)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMovie(req, res, next) {\n //Get the id parameter\n let titleMovie = req.params.title;\n let fileName = path.join(\"jsonData/movies/\" + titleMovie);\n //If the movie exists, load it, parse object\n // and add the movie property to the request before\n // calling next middleware\n i...
[ "0.5442726", "0.5251773", "0.51175135", "0.5108671", "0.50116485", "0.4971971", "0.49168682", "0.49087673", "0.48920384", "0.48845512", "0.4882745", "0.4856789", "0.4854899", "0.47674492", "0.47385523", "0.47205842", "0.47001812", "0.46956533", "0.4688799", "0.46842825", "0.4...
0.63173735
0
This function will be called when the browser attempts to access the passive property.
get passive(){return passiveSupported=!0,!1}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get passive () {\n passiveSupported = true\n }", "get passive() {\n passiveSupported = true;\n return false;\n }", "get passive() {\n passiveSupported = true;\n return false;\n }", "get passive() {\n ...
[ "0.8207847", "0.80797005", "0.80105567", "0.80105567", "0.7949835", "0.7949835", "0.7949835", "0.7949835", "0.7881508", "0.7316496", "0.7316496", "0.7316496", "0.7316496", "0.7299922", "0.7299922", "0.72923934", "0.70560116", "0.70560116", "0.70236295", "0.70236295", "0.70144...
0.8095968
1
GET expanded all (gearuser,class,quality)
getAllGearExpanded() { let sessionUser = sessionStorage.getItem("userId") let sessionUserId = Number(sessionUser) console.log("userId", sessionUserId) return fetch(`${remoteURL}/gearItems?userId=${sessionUserId}&_expand=gearQuality&_expand=gearClass`) .then(e => e.json()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllGearItemsAndQualities() {\n return fetch(`${remoteURL}/gearItems?_expand=gearQuality&_expand=gearClass`).then(e => e.json())\n }", "getAllGearQualities() {\n return fetch(`${remoteURL}/gearQualities`).then(e => e.json())\n }", "getAllGearClasses() {\n return fetch(`${remoteURL}...
[ "0.70828635", "0.64554137", "0.58965796", "0.5709731", "0.5673535", "0.55477", "0.54531443", "0.5442964", "0.5442157", "0.5408122", "0.5388515", "0.53654796", "0.53208447", "0.53208447", "0.53208447", "0.53208447", "0.53208447", "0.53208447", "0.53208447", "0.53208447", "0.53...
0.64564246
1
GET gear borrowed by the logged in user
getBookedGear() { let sessionUser = sessionStorage.getItem("userId") let sessionUserId = Number(sessionUser) console.log("userId", sessionUserId) return fetch(`${remoteURL}/gearItems?borrowedUserId=${sessionUserId}&_expand=user`) .then(e => e.json()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRequest(borrowerId) {\n return $http({\n url: baseUrl + '/show/' + borrowerId,\n headers:{Authorization: $cookies.get('token'), user: storage.get('username')},\n method: 'GET'\n }).then(function(res){\n console.log(res);\...
[ "0.6290809", "0.6063522", "0.5998167", "0.5980662", "0.5980036", "0.5918888", "0.5905425", "0.58998126", "0.5822975", "0.57185763", "0.57096964", "0.57036006", "0.5669225", "0.5644964", "0.55783904", "0.557524", "0.55687714", "0.5561553", "0.55101365", "0.5480279", "0.5473408...
0.7149911
0
GET all gear qualities for addForm dropdown
getAllGearQualities() { return fetch(`${remoteURL}/gearQualities`).then(e => e.json()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllGearItemsAndQualities() {\n return fetch(`${remoteURL}/gearItems?_expand=gearQuality&_expand=gearClass`).then(e => e.json())\n }", "function getSupplierSelect() {\n\tajax('GET', 'suppliers', null, createSupplierSelect);\n}", "function populate_capacity_dropdown_by_query()\n{\n let select = d...
[ "0.63770956", "0.6051295", "0.5901524", "0.5891552", "0.5828339", "0.5823614", "0.57799023", "0.5736196", "0.5713182", "0.56831646", "0.5644113", "0.55563605", "0.55339754", "0.5528465", "0.5518211", "0.55168754", "0.5465858", "0.54613024", "0.5460293", "0.5449079", "0.543856...
0.6726471
0
GET all gear and expanded quality and class
getAllGearItemsAndQualities() { return fetch(`${remoteURL}/gearItems?_expand=gearQuality&_expand=gearClass`).then(e => e.json()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllGearQualities() {\n return fetch(`${remoteURL}/gearQualities`).then(e => e.json())\n }", "getAllGearClasses() {\n return fetch(`${remoteURL}/gearClasses`).then(e => e.json())\n }", "function getGears() {\n return $http.get('getGears').then((response) => {\n initGears...
[ "0.7460722", "0.66612244", "0.6478691", "0.6094347", "0.59457415", "0.572387", "0.5653835", "0.5649631", "0.5594687", "0.55748403", "0.5564412", "0.5554083", "0.5508229", "0.54687536", "0.5439338", "0.54276365", "0.540501", "0.53989565", "0.53902054", "0.5390047", "0.5360846"...
0.7977652
0
GET all gear classes for addForm dropdown
getAllGearClasses() { return fetch(`${remoteURL}/gearClasses`).then(e => e.json()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_classes_list(){\r\n\t// clean first\r\n\t$('select#div-class').empty();\r\n\t$('select#config-class-selected').empty();\r\n\t\r\n\t// add from css_classes object\r\n\tfor(let key in css_classes){\r\n\t\tlet tmp = $('<option></option').attr('value',key).text(key);// create node\r\n\t\t$('select#div-...
[ "0.6182137", "0.611387", "0.5721462", "0.5648831", "0.56257826", "0.5534999", "0.5492764", "0.5461829", "0.545814", "0.5451", "0.5447686", "0.5393713", "0.5390349", "0.5378454", "0.53520083", "0.53106534", "0.5297848", "0.52859503", "0.5279388", "0.52744174", "0.5268416", "...
0.62241554
0
POST new gear item
post(newGearItemObject) { return fetch(`${remoteURL}/gearItems`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(newGearItemObject) }).then(data => data.json()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitItem(item) {\n $.post(\"/addItem\", item)\n }", "function addItem(event) {\n event.preventDefault();\n\n const newItem = {\n title: item.title,\n description: item.description,\n };\n\n axios.post(\"/newitem\", newItem);\n\n setItem({\n title: \"\",\n d...
[ "0.7024014", "0.67957413", "0.6692", "0.6667768", "0.6665922", "0.66180634", "0.65707", "0.6564085", "0.6451445", "0.6446604", "0.6436888", "0.64076114", "0.63751787", "0.6345244", "0.632579", "0.63206065", "0.6258734", "0.6254915", "0.6249516", "0.6246868", "0.6237191", "0...
0.76380175
0
PUT (edit) gear item currently in JSON
put(gearId, eventObject) { return fetch(`${remoteURL}/gearItems/${gearId}`, { method: "PUT", headers: { "Content-Type": "application/json" }, body: JSON.stringify(eventObject) }).then(data => data.json()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateItem() {\n const itemId = document.getElementById('edit-id').value; // This will get the id of the item that has just been updated.\n\n // creates a json item of values that have been updated.\n const item =\n {\n entityId: itemId.toString(),\n starRating: parseInt(document...
[ "0.680749", "0.66842693", "0.66769135", "0.66341054", "0.65759015", "0.6489044", "0.6482159", "0.6470923", "0.64128774", "0.63984865", "0.63977605", "0.63725823", "0.63150316", "0.6292653", "0.6285948", "0.62812907", "0.61921215", "0.6185323", "0.612964", "0.6129013", "0.6108...
0.69334817
0
DELETE a gear item in the GearDetails page which deletes the item from the JSON
deleteGearItem(id) { return fetch(`${remoteURL}/gearItems/${id}`, { method: "DELETE" }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(item) {\n this.sendAction('delete', item);\n }", "function deleteMe(item){\n fetch(\"/remove/\" + item.innerText,{\n method: \"delete\"\n }).then(res=>res.json())\n .then(res2 => {\n // console.log(res2)\n location.reload()\n });\n }"...
[ "0.70407593", "0.6889687", "0.67987293", "0.6790019", "0.6784973", "0.66769946", "0.6655706", "0.66456944", "0.66053843", "0.6514131", "0.6475711", "0.6466578", "0.6453989", "0.6435184", "0.64178", "0.6396523", "0.63861847", "0.63741356", "0.63633335", "0.6355998", "0.634533"...
0.7584514
0
Converts a TimeInput to an HrTime, defaults to _hrtime().
function timeInputToHrTime(time) { // process.hrtime if (isTimeInputHrTime(time)) { return time; } else if (typeof time === 'number') { // Must be a performance.now() if it's smaller than process start time. if (time < getTimeOrigin()) { return hrTime(time); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert(input) {\n return moment(input, 'HH:mm:ss').format('h:mm:ss A');\n }", "function HourFromTime(t) {\n typeof t === \"number\";\n return modulo(Math.floor(t / msPerHour), HoursPerDay);\n } // 20.3.1.10 Hours, Minutes, Second, and Milliseconds", "function convertHoursToForm...
[ "0.6310332", "0.61947036", "0.60105044", "0.6004664", "0.5899333", "0.5877074", "0.5834055", "0.58103925", "0.58034235", "0.5793033", "0.5784925", "0.5757807", "0.5754698", "0.5725101", "0.5700249", "0.56476134", "0.56417966", "0.5630741", "0.56275874", "0.5627426", "0.562579...
0.82826656
0
Convert hrTime to timestamp, for example "20190514T17:00:00.000123456Z"
function hrTimeToTimeStamp(time) { const precision = NANOSECOND_DIGITS; const tmp = `${'0'.repeat(precision)}${time[1]}Z`; const nanoString = tmp.substr(tmp.length - precision - 1); const date = new Date(time[0] * 1000).toISOString(); return date.replace('000Z', nanoString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timeStampConvert(time){\n let date = new Date(time*1000);\n let hours = date.getHours();\n let mins = \"0\"+date.getMinutes();\n return hours+\":\"+mins.substr(-2);\n}", "function convertTime(time) {\n return moment.unix(time).tz('UTC').format('h A');\n}", "function dateStringToTs(time) {...
[ "0.67577505", "0.64906806", "0.6219995", "0.62004477", "0.615165", "0.60716194", "0.60624886", "0.59980506", "0.59953296", "0.5994376", "0.59566647", "0.59540236", "0.5896782", "0.58796746", "0.5876964", "0.58429366", "0.58411944", "0.58409035", "0.5830852", "0.5826418", "0.5...
0.8227377
0
Convert hrTime to nanoseconds.
function hrTimeToNanoseconds(time) { return time[0] * SECOND_TO_NANOSECONDS + time[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}", "function hrtimeNanosec(a) {\n\tassertHrtime(a);\n\n\treturn Math.floor(a[0] * 1e9 + a[1]);\n}", "function hrtimeNanosec(a)\n{\n\tassertHrtime(a);\n\n\treturn (Math.floor(a[0] * 1e9 + a[1]));\n}", "function hrti...
[ "0.65376043", "0.6387689", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.62363625", "0.6133303", "0.5987901", "0.5986383", "0.5914026", "0.582523", "0....
0.8005313
0
Convert hrTime to milliseconds.
function hrTimeToMilliseconds(time) { return Math.round(time[0] * 1e3 + time[1] / 1e6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hrtimeToMs(hrtime)\n{\n\treturn parseInt(1000*hrtime[0] + (hrtime[1]/1000000));\n}", "function hms_to_ms( time_array ) {\n\ttime_array = time_array.reverse();\n\t\t\t\t\n\tvar new_time = 0,\n\t\ti = 1;\n\tnew_time += time_array[ 0 ] * 1000;\n\t\t\t\t\n\twhile( i < time_array.length ) {\n\t\tvar times = ...
[ "0.77680594", "0.6969014", "0.69041854", "0.6900638", "0.67422986", "0.67403245", "0.673695", "0.6712471", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "0.65770555", "...
0.78167486
0
Convert hrTime to microseconds.
function hrTimeToMicroseconds(time) { return Math.round(time[0] * 1e6 + time[1] / 1e3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hrtimeToMs(hrtime)\n{\n\treturn parseInt(1000*hrtime[0] + (hrtime[1]/1000000));\n}", "function hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}", "function hrtimeMicrosec(a) {\n\tassertHrtime(a);\n\n\treturn Math.floor(a[0] * 1e6 + a[1] / 1e3);\n}", "function hr...
[ "0.6582432", "0.6382727", "0.6363734", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.6255819", "0.61418706", "0.6002431", "0.591584", "0.59077215", "0.58659804", ...
0.76863086
0
check if time is HrTime
function isTimeInputHrTime(value) { return (Array.isArray(value) && value.length === 2 && typeof value[0] === 'number' && typeof value[1] === 'number'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkTime(time){\r\n\tvar re = /^(([01][0-9])|(2[0-3])):[0-5][0-9]$/;\r\n\tif (re.test(time)) return true;\r\n\telse return false;\r\n}", "function timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\...
[ "0.71291155", "0.70453244", "0.6981322", "0.69701403", "0.69577", "0.6748687", "0.6672917", "0.65967524", "0.65924853", "0.6528633", "0.64942396", "0.6486679", "0.6478357", "0.64710295", "0.64710295", "0.64710295", "0.64710295", "0.64710295", "0.64710295", "0.6463243", "0.645...
0.7362206
0
check if input value is a correct types.TimeInput
function isTimeInput(value) { return (isTimeInputHrTime(value) || typeof value === 'number' || value instanceof Date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}", "function validTime(time, id) \n\t\t{\n\t\t\tvar isValid = false;\n\t\t\t\n\t\t\tif (time === \"\")\n\t\t\t\tisValid = true...
[ "0.78632927", "0.7554186", "0.74292994", "0.7226165", "0.720445", "0.71313053", "0.71272737", "0.71271765", "0.7107291", "0.706426", "0.6958379", "0.69470143", "0.68210953", "0.68011117", "0.6778872", "0.6720643", "0.67134935", "0.6712897", "0.67072797", "0.6663272", "0.66446...
0.8403438
0
Check 5 rounding digits if `repeating` is null, 4 otherwise. `repeating == null` if caller is `log` or `pow`, `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.
function checkRoundingDigits(d, i, rm, repeating) { var di, k, r, rd; // Get the length of the first word of the array d. for (k = d[0]; k >= 10; k /= 10) --i; // Is the rounding digit in the first word of d? if (--i < 0) { i += LOG_BASE; di = 0; } else { di = Math...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkRoundingDigits(d, i, rm, repeating) {\r\n var di, k, r, rd;\r\n\r\n // Get the length of the first word of the array d.\r\n for (k = d[0]; k >= 10; k /= 10) --i;\r\n\r\n // Is the rounding digit in the first word of d?\r\n if (--i < 0) {\r\n i += LOG_BASE;\...
[ "0.60951", "0.6044083", "0.6030936", "0.6025857", "0.6000619", "0.5251574", "0.5193438", "0.51521784", "0.4944759", "0.4884365", "0.48297757", "0.47670755", "0.47393394", "0.47067666", "0.47059762", "0.47033927", "0.47004515", "0.46919653", "0.46876192", "0.4680105", "0.46661...
0.60553384
1
Calculate the base 10 exponent from the base 1e7 exponent.
function getBase10Exponent(digits, e) { var w = digits[0]; // Add the number of digits of the first word of the digits array. for ( e *= LOG_BASE; w >= 10; w /= 10) e++; return e; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for ( e *= LOG_BASE; w >= 10; w /= 10) e++;\r\n return e;\r\n }", "function getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n...
[ "0.7587579", "0.75824785", "0.7568439", "0.75618774", "0.7531191", "0.75266165", "0.75236547", "0.7514103", "0.7458512", "0.73948216", "0.73621184", "0.69997346", "0.6988667", "0.69834334", "0.696903", "0.6960276", "0.6945767", "0.6923525", "0.691793", "0.6890375", "0.6848209...
0.75879884
0
Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant digits. ln(n) = NaN ln(0) = Infinity ln(0) = Infinity ln(1) = 0 ln(Infinity) = Infinity ln(Infinity) = NaN ln(NaN) = NaN ln(n) (n != 1) is nonterminating.
function naturalLogarithm(y, sd) { var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2, n = 1, guard = 10, x = y, xd = x.d, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; // Is x negative or Infinity, NaN, 0 or 1? if (x.s < 0 |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function naturalLogarithm(y, sd) {\n var c,c0,denominator,e,numerator,rep,sum,t,wpr,x1,x2,\n n = 1,\n guard = 10,\n x = y,\n xd = x.d,\n Ctor = x.constructor,\n rm = Ctor.rounding,\n pr = Ctor.precision;\n\n // Is x negative or Infinity, NaN, 0 or 1?\n if (x.s < 0 || !xd || !xd[0] || ...
[ "0.72742146", "0.72722304", "0.7269796", "0.72656274", "0.72535515", "0.7253037", "0.7249959", "0.60189277", "0.59859866", "0.5921057", "0.5921057", "0.5770956", "0.57209945", "0.56374556", "0.5621436", "0.55902904", "0.55465525", "0.54924625", "0.54588825", "0.54588825", "0....
0.727654
0
Initializes a new instance of the `PdfDrawElement` class.
function PdfDrawElement(pen) { var _this = _super.call(this) || this; if (typeof pen !== 'undefined') { _this.mpen = pen; } return _this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PdfDrawElement(pen){var _this=_super.call(this)||this;if(typeof pen!=='undefined'){_this.mpen=pen;}return _this;}", "function PdfFillElement(arg1,arg2){var _this=_super.call(this)||this;// Fields\n/**\n * Internal variable to store pen.\n * @private\n */_this.mbrush=null;if(typeo...
[ "0.7451135", "0.62379104", "0.6023711", "0.59228945", "0.5874824", "0.5709437", "0.56910133", "0.56881523", "0.56215465", "0.55981255", "0.5561087", "0.55484545", "0.5541559", "0.5531508", "0.5478008", "0.5470288", "0.54332715", "0.54201233", "0.5383698", "0.5378106", "0.5370...
0.71837276
1
function to add the linear timeline to indicate yearcluster membership after coclustering clabel: indicates which colcluster each column (from 1 to n) belongs to
function addTimeline (clabel) { // now the timeline is used to visualize the co-clustering results // and the one for the original data invisible // and the button of toggleTimeline visible d3.select('#btnTL').style('opacity', 1) timeLine.activeCo = true d3.select('#g-yAxisTLOri').style('opacity', 0) d3.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loopClusters(func) {\n \n for (var i=0; i<clusters.length; i++) {\n // { column, row, length, horizontal }\n var cluster = clusters[i];\n var coffset = 0;\n var roffset = 0;\n for (var j=0; j<cluster.length; j++) {\n func(...
[ "0.5634336", "0.5531072", "0.5531072", "0.5460595", "0.54567033", "0.5453878", "0.5447383", "0.54405624", "0.54172117", "0.5367002", "0.5367002", "0.53644663", "0.5347444", "0.53396887", "0.5337561", "0.52998596", "0.52945673", "0.52377766", "0.5230789", "0.5217098", "0.51941...
0.6774026
0
to use: highlight a domain/IP address, right click, and click "run ___ with test" happy hunting..
function genericOnClick(info, tab) { var input=info.selectionText.toLowerCase() //validate selection var domainoripre=/([a-z0-9\-]+(\.[a-z0-9-]+)*\.([a-z]{2,}|xn\-\-[a-z0-9\.]+))|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/ var m=domainoripre.exec(input) if (m){//valid //don't search local values if (/(^127\.)|(^10\.)|(^17...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkIPMain(ip,max) {\n if( isNumeric(ip, max) ) {\n ip.focus();\n return true;\n }\n}", "function chkip($this)\n{\n if ( /^([0-9]+\\.){3}[0-9]+$/.test($this.value) ) $this.style.color = \"green\";\n else $this.style.color = \"red\";\n}", "function main() {\n getIpLocation();\...
[ "0.53609014", "0.52739716", "0.5235389", "0.5173411", "0.51627356", "0.51387304", "0.5114805", "0.5097731", "0.5064785", "0.50309694", "0.49972862", "0.4982465", "0.49756232", "0.4958988", "0.495375", "0.49507177", "0.4949447", "0.49441448", "0.4901867", "0.48750776", "0.4873...
0.5355166
1
draw player to canvas
function drawPlayer() { playerImg.src = player.src; contxt.drawImage(playerImg, player.x, player.y, player.size, player.size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawPlayer() {\n ctx.fillStyle = this.sprite;\n ctx.fillRect(this.positionX, this.positionY, this.height, this.width);\n }", "function draw() {\n\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t\tctx.fillRect(0,0,canvasWidth, canvasHeight);\n\t\t\t\tplayer.draw();\n\t\t\t\tcomputer.draw();\n\t\t\t\tbal...
[ "0.823513", "0.7816983", "0.78115565", "0.7774828", "0.76946014", "0.76361233", "0.7596605", "0.75547606", "0.7329209", "0.72652406", "0.7256657", "0.7252526", "0.7226146", "0.7220274", "0.72106194", "0.7200823", "0.71721137", "0.71493864", "0.7135222", "0.7116665", "0.710396...
0.7825105
1
Account Link Event This event is called when the Link Account or UnLink Account action has been tapped.
function receivedAccountLink(event) { var senderID = event.sender.id; var recipientID = event.recipient.id; var status = event.account_linking.status; var authCode = event.account_linking.authorization_code; console.log("Received account link event with for user %d with status %s " + "and auth code %s "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receivedAccountLink(event) {\n var status = event.account_linking.status;\n\n if ('linked' == status) {\n messageHandler.doLinking(event);\n } else if ('unlinked' == status) {\n messageHandler.doUnlinking(event);\n } else {\n error('unknown linking event', event);\n }\n\n }"...
[ "0.80843335", "0.78563243", "0.78563243", "0.78511626", "0.7815522", "0.77419245", "0.7459353", "0.6509187", "0.62488043", "0.58437616", "0.5723318", "0.57083726", "0.56881905", "0.566858", "0.5598432", "0.5581104", "0.55662835", "0.54268914", "0.53917336", "0.538157", "0.533...
0.7857475
1
parameters (w1, w2, w3, w4, w5): Words and subdivided words parameters (l1, l2, l3): lexical categories for w1, w2, w3, w4, w5 respectively
constructor(w1, w2, w3, w4, w5, l1, l2, l3, l4, l5) { this.w1 = w1; this.w2 = w2; this.w3 = w3; this.w4 = w4; this.w5 = w5; this.l1 = l1; this.l2 = l2; this.l3 = l3; this.l4 = l4; this.l5 = l5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wordsComplex() {\n\n}", "function DoWords() \n{\n\tvar nWord = 0;\n\tvar nDiff = 0;\n\tvar olex = \"\";\n\n\t// Parse the input lexicon\n\tlex = rewrite(theform.ilex);\n\tnlex = lex.length;\n\n\tvar oldolex;\n\tvar localshowdiff = showDiff;\n\tif (showDiff) {\n\t\tvar sx = document.getElementById(\"olex...
[ "0.6277685", "0.59268665", "0.588508", "0.5842567", "0.56711626", "0.56504714", "0.54771405", "0.54364055", "0.53617483", "0.53433573", "0.5342012", "0.5339241", "0.5330731", "0.5327894", "0.5322962", "0.53159636", "0.5308894", "0.52942663", "0.5289958", "0.52226734", "0.5214...
0.59911144
1
Shows the instructions in the modal
function showInstructions() { const INSTRUCTIONS = "1. Identify the morphological boundaries. " + "When you mouse over the word, grey slashes will appear in the spaces between the letters, indicating possible morphological boundaries. <br><br>" + "a. To mark a morphological boundary, click on th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showInstructions() {\n\t\t\tclear();\n\t\t\tdiv.update('<span style=\"color: grey; font-style: italic;\">' + lang.instructions + '</span>');\n\t\t}", "function help_add() {\n\n $('#help_add').modal('show');\n}", "function nuvoInscPreli(){ \n $(\".modal-title\").html(\"Nueva incripción\");...
[ "0.7017173", "0.6787055", "0.67598015", "0.67491364", "0.6735288", "0.6704338", "0.6703239", "0.65341806", "0.6534012", "0.6482026", "0.64601797", "0.6443621", "0.6403767", "0.6347852", "0.63410395", "0.6313156", "0.6313156", "0.63067585", "0.6301083", "0.6295283", "0.6293043...
0.70828485
0
Start and end boxes are the same.
function sameStartAndEnd(start, end, box, startSide, endSide) { const h = isHorizontal(startSide); if (start[0] === end[0] && start[1] === end[1]) { return direct(start, end, startSide, endSide); } else if (startSide === endSide) { return addTwoPoints(start, end, extend(start, startSide), h); } else if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sameSides(start, end, startBox, endBox, startSide, endSide) {\n const h = isHorizontal(startSide);\n const bendsBackFromStart =\n isOuter(startSide) === value(start, h) > boxEdge(endBox, h, true);\n if (\n sameSidesSimpleBendIsPossible(\n bendsBackFromStart,\n start,\n end,\n ...
[ "0.6438205", "0.6138855", "0.60309696", "0.59921396", "0.5891178", "0.5813061", "0.5792708", "0.5764759", "0.5763066", "0.5739869", "0.5739151", "0.57100034", "0.5688639", "0.5678471", "0.5672571", "0.5661695", "0.5653138", "0.5636614", "0.56275004", "0.559459", "0.5564269", ...
0.6851191
0
Perpendicularside paths e.g. right to bottom, top to left, etc.
function perpendicularSides(start, end, startBox, endBox, startSide, endSide) { const h = isHorizontal(startSide); if (perpendicularSidesDirectIsPossible(start, end, startSide, endSide)) { return addOnePoint(start, end, h); } else if (perpendicularSidesFitsBetweenBoxes(start, endBox, startSide)) { const x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "perpendicular() {\n\t\tlet x = this.y;\n\t\tlet y = 0 - this.x;\n\t\t\n\t\treturn new Vector(x, y);\n\t}", "function mapSidePath(i) {\n // Added support for 0 value in columns, where height is 0\n // but the shape is rendered.\n // Height is used from 1st to 6th eleme...
[ "0.65730166", "0.62984234", "0.623539", "0.6164864", "0.615149", "0.61281455", "0.61261857", "0.59393275", "0.58576936", "0.58434695", "0.5721688", "0.57015234", "0.57008284", "0.57002884", "0.5668802", "0.56622267", "0.56271636", "0.5624636", "0.5611938", "0.560142", "0.5600...
0.6508585
1
Change template x: value of col2 y: value of col0
function changeTemplate(x,y){ var col1 = "col-xs-"+x; var col2 = "col-xs-"+y; document.getElementById("list-template-2").setAttribute("class",col1); document.getElementById("list-template-0").setAttribute("class",col2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Cell(x, y, x2, y2) {\n this.cur = [x, y];\n this.pre = [x2, y2];\n}", "function placeCell(cell, x, y) {\n\tcell.x = x;\n\tcell.y = y;\n\tplaceDiv(cell.div, x, y);\n}", "function /*DEPRECATEDs*/\r\n\tpaint_cell(x, y, color1) {\r\n\r\n\t\tvar tpoint = traslate_point(x, y);\r\n\t\tx = tpoint.x;\r\n...
[ "0.5802065", "0.5725254", "0.55993426", "0.55829406", "0.5575921", "0.5570444", "0.55589586", "0.5536492", "0.55311835", "0.5528144", "0.55217564", "0.5481552", "0.54706615", "0.5458473", "0.544821", "0.54433584", "0.5434798", "0.5419577", "0.54192305", "0.5403556", "0.539313...
0.6095615
0
true "an empty string is a valid isogram" Write a function, persistence, that takes in a positive parameter num and returns its multiplicative persistence, which is the number of times you must multiply the digits in num until you reach a single digit.
function persistence(num) { var times = 0; num = num.toString(); while(num.length > 1) { times++; num = num.split('').map(Number).reduce((a,b) => a * b).toString(); } return times; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function persistence(num) {\n var counter = 0\n while ((String(num).length) > 1) {\n var perkalian = 1\n for (var i = 0; i < String(num).length; i++) {\n perkalian = perkalian * String(num)[i]\n }\n num = perkalian\n counter++\n }\n return counter\n}", "f...
[ "0.68862575", "0.6759085", "0.67589533", "0.66832787", "0.66008884", "0.6539079", "0.64600694", "0.63250834", "0.632391", "0.6322591", "0.6309887", "0.6150379", "0.61425614", "0.6092882", "0.60463834", "0.5978328", "0.57544416", "0.56054616", "0.559535", "0.5507829", "0.54663...
0.6868555
1
Returns value with special chars converted to "\n", "\r" or "\t"
function convert_specials(x) { return (''+x).replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function escapeSpecialCharacter(character) {\n let retVal = character;\n \n if(character === '\\n') {\n retVal = 'NEWLINE';\n } else if(character === '\\r\\n') {\n retVal = 'CR-LF';\n } else if (character === '\\t') {\n retVal = 'TAB';\n }\n\n return retVal;\n}", "functi...
[ "0.6533869", "0.6483056", "0.6465745", "0.64636254", "0.644727", "0.6430509", "0.6430509", "0.6354646", "0.63518816", "0.6263028", "0.6223433", "0.61520183", "0.6136793", "0.60295826", "0.59896874", "0.59723264", "0.59723264", "0.59723264", "0.59723264", "0.59723264", "0.5972...
0.7145794
0
Chop too long values to specified limit
function chop_long_values(limit) { if(limit-3 < 1) { throw new TypeError("limit must be at least four (4) characters!"); } return function(x) { x = ''+x; if(x.length > limit) { return x.substr(0, limit-3) + '...'; } return x; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncate_values(selector, max) {\n\t\tvar rows = $(selector);\n\t\t$.each(rows, function(index, value){\n\t\t\t//alert($(value).text());\n\t\t\tvar length = max;\n\t\t\tvar myString = $(value).text();\n\t\t\tvar myTruncatedString = myString.substring(0, length);\n\t\t\t$(value).text(evaluate_length(myTrun...
[ "0.6147925", "0.6115849", "0.6115849", "0.61092615", "0.609478", "0.59000784", "0.58085334", "0.57273227", "0.57206476", "0.5713812", "0.5698848", "0.5682008", "0.5680667", "0.5670621", "0.5668749", "0.56588715", "0.56406826", "0.5625429", "0.5624206", "0.5611388", "0.5601132...
0.7479186
0
Returns the stack property of `x` if it exists, otherwise `x` itself.
function get_stack(x) { if(!(x && x.stack)) { return x; } var buf = ''+x.stack; var message = buf.split('\n')[0]; var extra = Object.keys(x).filter(function(key) { return (key !== 'stack') && (x[key] !== undefined); }).map(function(key) { return '> ' + key + ' = ' + inspect_and_trim(x[key]); }).join('\n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function x(p) {return p.x}", "function min(x) {\n \tif (x.left == null || x.left == undefined)\n \t\treturn x;\n \telse \n \t\treturn min(x.left);\t\n }", "function get(x) { return x; }", "function get(x, key) {\n while (x != null && x != undefined) {\n var cmp = key.localeCo...
[ "0.59939134", "0.5923558", "0.58221114", "0.56653816", "0.56526446", "0.56417406", "0.5605141", "0.55585366", "0.5484831", "0.5475523", "0.5425558", "0.5418294", "0.54156923", "0.54091066", "0.5358568", "0.5349478", "0.53375757", "0.53281355", "0.5303009", "0.5297793", "0.524...
0.6804665
0
This function builds the access permissions of a module from permissionsObj
function constructModulePermissions(scope, localStorage, access, permissionsObj, forceEnv) { function checkApiHasAccess(aclObject, serviceName, routePath, method, userGroups, callback) { var environments = Object.keys(aclObject); return validateAccess(environments, 0, callback); function validateAccess(enviro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bbedit_acpperms_init() {}", "function mapPermissions() {\n\t\t\tvar nav = {}, permissionList = [];\n\t\t\tfor(var permission in service.access.permissions) {\n\t\t\t\tif(inRole(service.access.permissions[permission])) {\n\t\t\t\t\tpermissionList.push(permission);\n\t\t\t\t}\n\t\t\t}\n\t\t\tservice.permi...
[ "0.563964", "0.55666405", "0.5531646", "0.5482658", "0.53882325", "0.5168946", "0.5152562", "0.51338714", "0.51191854", "0.5101643", "0.50738025", "0.5045058", "0.5023094", "0.5023094", "0.5021092", "0.50097054", "0.49752605", "0.49752605", "0.49737462", "0.49674508", "0.4962...
0.70052314
0