query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
Function: highlight Highlights individual square. Paramaters: i I iterator of array j J iterator of array isEmpty If the square is empty or not
function highlight(i,j,isEmpty) { var highlightColor; if (isEmpty) highlightColor = emptyColor; else highlightColor = enemyColor; var tileToHighlight = lookupTile(2,i,j); tileToHighlight.setFill(highlightColor); tileToHighlight.highlighted = true; fgTileLayer.draw(); }
[ "function squareColor(i) {\n var remainder;\n remainder = (i + j) % 2;\n if (remainder == 1) {\n fill('black');\n } else {\n fill('white');\n }\n\n}", "function highlightRook(i,j) {\n\tvar enemyToken;\n\tif (isWhite)\n\t\tenemyToken = 'b';\n\telse\n\t\tenemyToken = 'w';\n\thelper(i,j,1,0);\n\thelper(i,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add covid in screen
function addCovid() { const covid = document.createElement("div"); covid.setAttribute("class", "covid") const position1 = Math.floor(Math.random() * 800) // position 1: x const position2 = Math.floor(Math.random() * 400) // position 2: y covid.setAttribute("style", "left:"+position1+"px;top:"+posi...
[ "function myCharactorOnScreen (){\n\t\t\t\t$(\"<div>\").addClass(\"col-3\").attr('id', myCharacter.name).appendTo($(\".row_1\"));\n\t\t\t\t$(\"<div>\").addClass(\"card\").attr('id', \"card\" + myCharacter.name).appendTo(\"#\" + myCharacter.name);\n\t\t\t\t$(\"<img>\").attr(\"src\", \"assets/imgs/\" + myCharacter.na...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Embed attachment from raw data inside content using `cid`
embedData(content, cid, options) { if (this.deferred) { throw new Error('Cannot attach raw data when using "Mail.sendLater" method'); } this.nodeMailerMessage.attachments = this.nodeMailerMessage.attachments || []; this.nodeMailerMessage.attachments.push({ content...
[ "embed(filePath, cid, options) {\n this.nodeMailerMessage.attachments = this.nodeMailerMessage.attachments || [];\n this.nodeMailerMessage.attachments.push({\n path: filePath,\n cid,\n ...options,\n });\n return this;\n }", "function sendInline(sessi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rewrite the Duration field of the Segment with the newlydiscovered video duration.
function rewriteDuration() { let buffer = new ArrayBufferDataStream(8), oldPos = blobBuffer.pos; // Rewrite the data payload (don't need to update the id or size) buffer.writeDoubleBE(clusterStartTime); ...
[ "function rewriteDuration() {\n var\n buffer = new ArrayBufferDataStream(8),\n oldPos = blobBuffer.pos;\n\n // Rewrite the data payload (don't need to update the id or size)\n buffer.writeDoubleBE(clusterStartTime);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getAt(idx): get val at idx.
getAt(idx) { return this._get(idx).val; }
[ "getAt(idx) {\n return this.val[idx]\n }", "getAt(idx) {\n if(idx >= this.length || idx < 0) {\n throw new Error(\"Invalid index.\");\n }\n return this._get(idx).val;\n }", "getAt(idx) {\n\n const currNode = this.positionToIdx(idx);\n\n return currNode.val;\n\n }", "getAt(idx) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate and Send a Min Message
function genAndSendMinMessage (values){ var message = { "concept": msg.concept, "person": msg.patient, "obsDatetime": msg.obsDatetime, "encounter": msg.encounter, "value": min(values) } pipeMessage(client,message); }
[ "async sendMin({ to, value }) {\n const txHash = await this.send({ to: to, value: 1000000000000 })\n console.log(\"TX:\", txHash)\n return true\n }", "function sendRandomMessage() {\n let room = randFromArr(rooms);\n safeSend(req, ws, {\n room,\n message: loremIpsum(),\n user: randF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the state of the servo
setState(newState) { console.log("setting state to " + newState); this.state = newState; switch(this.state) { case states.CLOSING: if (!isDarwin()) { this.motor.servoWrite(config.servoStates.CLOSING) console.log(config.servoStates.CLOSING); ...
[ "function set_motor_mode(index, isMotor)\r\n{\r\n\tif (index < 1 || index > 2)\r\n\t\treturn;\r\n\tservo_states[index] = isMotor;\r\n\tif (isMotor)\tsend_motor_noreply(\"S \" + index + \" m\");\r\n\telse\t\t\tsend_motor_noreply(\"S \" + index + \" s\");\r\n\tstop_motor(index);\r\n\tcenter_servo(index);\r\n}", "fu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.
function compileNgModuleDefs(moduleType, ngModule) { ngDevMode && assertDefined(moduleType, 'Required value moduleType'); ngDevMode && assertDefined(ngModule, 'Required value ngModule'); var declarations = flatten$1(ngModule.declarations || EMPTY_ARRAY$2); var ngModuleDef = null; Object.defineProper...
[ "function compileNgModuleDefs(moduleType,ngModule){ngDevMode&&assertDefined(moduleType,'Required value moduleType');ngDevMode&&assertDefined(ngModule,'Required value ngModule');var declarations=flatten$1(ngModule.declarations||EMPTY_ARRAY$2);var ngModuleDef=null;Object.defineProperty(moduleType,NG_MODULE_DEF,{confi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remove selected exam from list
function removeThisExam(id) { vm.selectedExams.splice(id, 1); setTotal(); }
[ "removeStudentFromStudentsExams(studentID){\n let check = this.checkIfStudentInExamList(studentID);\n if(check[0]){\n this.students_exams.splice(check[1], 1);\n }\n }", "function removeQuestion(){\n\tquestion_arr.splice(sequenceCountNum, 1);\n\t$(edit.xmlFile).find('item').eq(sequenceCountNum).remo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stuff the filter operator dropdowns with appropriate values ==========================================================================================
function initializeFilterOperators() { // Get our current column filter property var filter = properties.activeColumn.enhancedTable.filter; // Get our operator contentItems var operatorContentItems = []; operatorContentItems.push(properties.screen.findConten...
[ "function initializeFilterOperators() {\n\n // Get our current column filter property\n var filter = properties.activeColumn.enhancedTable.filter;\n\n // Get our operator contentItems\n var operatorContentItems = [];\n op...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setup traversal and start copying
function copy(){ Row.saveNotes = $('#copyNotes').is(':checked'); Row.saveSources = $('#copySources').is(':checked'); var traversal = FSTraversal(productionClient) .order('distance') .person(processPerson) .marriage(processMarriage) .child(processChild); var filter = $('input[name=trave...
[ "populate() {\n if (!this.node_) {\n this.finish_();\n return;\n }\n\n const root = AutomationUtil.getTopLevelRoot(this.node_);\n if (!root) {\n this.finish_();\n return;\n }\n\n this.walker_ = new AutomationTreeWalker(root, constants.Dir.FORWARD, {\n visit(node) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tells us whether we can expect a given wanderer now. Behaves differently for different types of wanderer. For deterministic wanderers, return whether the player will encounter the queried wanderer on the next turn For variable wanderers (window), return whether the player is within an encounter window for the queried w...
function isWandererNow(wanderer) { if (deterministicWanderers.includes(wanderer)) { return haveCounter(wanderer, 0, 0); } if (wanderer == Wanderer.Kramco) { return true; } if (wanderer === Wanderer.Vote) { return isVoteWandererNow(); } if (wanderer === Wanderer.Familiar) { return (0, _p...
[ "function isWandererNow(wanderer) {\n if (deterministicWanderers.includes(wanderer)) {\n return haveCounter(wanderer, 0, 0);\n }\n\n if (wanderer == Wanderer.Kramco) {\n return true;\n }\n\n if (wanderer === Wanderer.Vote) {\n return isVoteWandererNow();\n }\n\n if (wanderer === Wanderer.Familiar) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the restriction message.
function ResetRestrictoinMessage() { if ($('.languageRestrictionError').length > 0) { $('.languageRestrictionError').html(''); } }
[ "function resetMsg() {\n scMsg.text = '';\n scMsg.diff = 0;\n scMsg.shortcut = false;\n scMsg.regex = null;\n scMsg.targetWord = '';\n scMsg.source = null;\n}", "function clearRestriction() { \n var console = View.getControl('', 'request_console');\n\tconsole.setFieldV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the labels for each scene and the buttons to switch between scenes Along with adding the background to each scene
function createLabelsAndButtons() { //add background let bg = PIXI.Sprite.fromImage("media/background.png"); bg.position.x = 0; bg.position.y = 0; bg.width = 1280; bg.height = 720; let bg2 = PIXI.Sprite.fromImage("media/background.png"); bg2.position.x = 0; bg2.position.y = 0; bg...
[ "function createLabelsAndButtons(){\n mainMenuButtonsAndLabels();\n gameButtonsAndLabels();\n endMenuButtonsAndLabels();\n}", "function drawScene4() {\n currentScene = 4;\n background(112, 247, 90);\n //fill(100, 100, 100);\n //rect(20, 10, 580, 340);\n rectColorRules();\n fill(0, 0, 0);\n textSiz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to get Screen SIze
function getScreenSize() { var width = getScreenWidth(); var height = getScreenHeight(); //Check for Mobile if (width < 800) { return "Mobile"; } //Check for Desktop Normal if (width > 799) { return "Desktop"; } }
[ "function getCurrentScreen() { return hwc.getCurrentScreen(); }", "function getScreen(){\n\n\t\treturn g_screenBuf;\n\n\t}", "function getCurrentScreen() {\n return curScreenKey;\n}", "function get_current_screen (filesystem) {\n\treturn get_folder(filesystem, filesystem.currentDirectory).screen;\n}", "f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add symbol to given element.
function appendSymbol(parent, x, y, symbol, color) { if (symbol === 'none') { return; } parent.append("path") .attr("transform", function (d) { return "translate(" + x + ", " + y + ")"; }) .attr("class", "symbol") .attr("d", d3.svg.symbol() ...
[ "function symbol() {\n return document.createElementNS(Svg.svgNS, \"symbol\");\n }", "function addSymbol(numX, inputValue) {\r\n\treturn numX+inputValue;\r\n}", "set symbol(value) {\n\t\tif (value === this.symbol) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (value === 'x' || value === 'o') {\n\t\t\tthis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shop side bar offcanvas
function OsShopSidebarOffcanvas() { $(".shop-sidebar-toggle").each(function () { $(this).on('click', function (event) { event.preventDefault(); $('body').toggleClass('shop-sidebar-open'); }); $(window).on('resize', function () { ...
[ "function OsShopSidebarOffcanvas() {\n $(\".shop-sidebar-toggle\").each(function () {\n $(this).on('click', function (event) {\n event.preventDefault();\n $('body').toggleClass('shop-sidebar-open');\n });\n\n $(window).on('resize', function () {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WORKING HERE// this is what I need to do right now this generates sets like [9,10,10,10,10] and right now this generates sets like [10,9,10,10,10] and what we want this to do instead is taking the "writtenTo" array and in the last five positions make it ......A,B,B,B,B and in the last five positions make it ......B,A,B...
function binaryPlacement(pEn,pKay,set,pItemSet,writtenTo) { this.inPosition =[]; this.itemSet=pItemSet; this.kay=pKay; this.en=pEn; var low = ((this.en-this.kay)>this.kay)?this.kay:this.en-this.kay; var top = en-low; var curPosCapt =writtenTo.slice(); var lastStart=[0] var aftFirst = false; for (var ...
[ "function makeSetPatterns(en,zee)\n{\n\n//This function will provide the max and min value for the next item\n//in the pattern\nfunction maxAndMinNextValue(minSoFar,total,level)\n{\nvar quotient = Math.floor(total/level)\nvar dividend = total%level\n//th\n//because the level is greater than one we can spread the to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a string into a json object containing angles
function genAngles(s) { let angles = {}; for(let i = 1; i < 24; i++) { let angle = PI / 2 * parseInt(s[i-1]); if(angle > PI) { angle = angle - 2 * PI; } angles["angle" + i] = angle; } return angles; }
[ "toJSON() { return this.degrees; }", "function extractAnglesFromJson(filename) {\n // JSON contents\n var jsonData = JSON.parse(fs.readFileSync(filename, 'utf8'));\n var poseData = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];\n\n if (jsonData.people.length == 0) {\n return 0;\n }\n e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the current hds to edit_history at the current point
function save_history () { var ds = currHds(); edit_history [edit_history_index] = JSON.stringify(ds.toJSON()); }
[ "function _historySaveAction() {\n if (historyProcessing) return;\n\n const json = historyNextState;\n historyUndo.push(json);\n historyNextState = _historyNext();\n canvas.fire('history:append', { json: json });\n }", "saveInHistory(state) {\n let histName = state.currentHistoryName;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called from the new printwindow, and fills it with the current song.
function fillPrintWindow() { printWin.insertSong(document.getElementById('tekst_m_akk').innerHTML); printWin.focus(); }
[ "function loadSongInfoCurrentSong()\n{\n $('#song-title').html(current_song.title);\n $('#song-artist').html(current_song.artist);\n $('#song-genre').html(current_song.genre);\n $('#song-user').html(current_song.user);\n $('#song-score').html(current_song.score +\n '[' + current_s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set random phases of a collection of frames
function randomPhases (frames, { size }) { for (var n = 0; n < frames.length; n++) { var phases = frames[n].phases for (var i = 0; i < size; i++) { phases[i] = PI2 * random() } } }
[ "shuffleFrames() {\n this.frames = this._shuffle(this.frames);\n this.frames = this._reorder(this.frames);\n }", "function tubeSim() {\n if (activeIndex != 1) {return;}\n for (var i = 0; i < 3; i++) { //Left\n Math.random() > 0.5 ? $(bulbs[i]).attr(\"src\", \"./images/threeoldlightbulbs.png\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a column description.
async updateColumnDescription(model_name, column_property, verbose = false) { return Promise.resolve(); }
[ "pushDesc(column) {\r\n const d = column;\r\n d.accessor = d.accessor || rowGetter;\r\n d.label = column.label || d.column;\r\n this.columns.push(column);\r\n this.fire(__WEBPACK_IMPORTED_MODULE_2__ADataProvider__[\"a\" /* default */].EVENT_ADD_DESC, d);\r\n }", "dsUpdateTabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sort GUIDs of connected users sorted by playerindex, observers last. Requires g_PlayerAssignments.
function sortGUIDsByPlayerID() { return Object.keys(g_PlayerAssignments).sort((guidA, guidB) => { let playerIdA = g_PlayerAssignments[guidA].player; let playerIdB = g_PlayerAssignments[guidB].player; if (playerIdA == -1) return +1; if (playerIdB == -1) return -1; return playerIdA - playerIdB; }); }
[ "function userlistSort(u1, u2) {\n\t\tvar a = u1.nick.toLowerCase();\n\t\tvar b = u2.nick.toLowerCase();\n\t\tif (a < b) return -1;\n\t\telse if (a > b) return 1;\n\t\telse {\n\t\t\ta = u1.nick;\n\t\t\tb = u2.nick;\n\t\t\tif (a < b) return -1;\n\t\t\telse if (a > b) return 1;\n\t\t\telse return 0;\n\t\t}\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Event handler for when a month is clicked
function month_click(event) { $(".events-container").show(250); $("#dialog").hide(250); var date = event.data.date; $(".active-month").removeClass("active-month"); $(this).addClass("active-month"); var new_month = $(".month").index(this); date.setMonth(new_month); init_calendar(date); }
[ "function month_click(event) {\n $(\".events-container\").show(250);\n $(\"#dialog\").hide(250);\n var date = event.data.date;\n $(\".active-month\").removeClass(\"active-month\");\n $(this).addClass(\"active-month\");\n var new_month = $(\".month\").index(this);\n date.setMonth(new_month);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a file system path to look for, resolved against the defined current working directory (or `process.cwd()` otherwise).
lookupFilePath(filePath, cwd) { this.lookups.push({ path: Path_1.default.resolve(filePath, cwd), raw: Path_1.default.create(filePath), type: types_1.LookupType.FILE_SYSTEM, }); return this; }
[ "function appendCwd (givenPath) {\n return path.isAbsolute(givenPath) ? givenPath : path.join(process.cwd(), givenPath)\n}", "function resolvePath(inputPath, process) {\n return inputPath[0] === \"/\"\n ? inputPath\n : process.currentDirectory + \"/\" + inputPath;\n}", "function addPath(inputPath) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Place all flickr markers on map
function placeFlickrMarker(){ if(flickrPointsInfo.length > 0){ flickrPointsArray = new Array(flickrPointsInfo.length) flickrLineArray = new Array(flickrPointsInfo.length) for(var i=0; i<flickrPointsInfo.length; i++){ placeMarker( flickrPointsInfo[i].lat,...
[ "function placeMarkers() {\n\tfor (let i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(map);\n\t}\n\tmarkerEvents();\n}", "function placeInstaMarkers(data, map) {\n\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\tvar latLng = L.latLng(data[i].location.latitude, data[i].location.longitude);\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function saves selected grip name to a global variable called selectedGripBase
function setSelectedGripCookie(item, buttonID) { selectedGripBase = gripBaseNames[Number(buttonID)]; //THIS VARIABLE (and all other selectable variables) ABOVE NEEDS TO BE TURNED INTO A TEMPORARY COOKIE IN A TEXT FILE // that way it won't interfere with other grip variables document.cookie = (String(item)+ "=" + S...
[ "getCurrentBase() {\n return new Promise((resolve, reject) => {\n if (baseInstance.base_name != null) {\n resolve(baseInstance.base_name);\n } else {\n reject(\"No base highlighted\");\n }\n });\n }", "get selectionPath(){\r\n\t\treturn this.strPath + (this.selected || '') }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FORM PROCESSING / Returns an array of valid question types asociated with it handler
function questionHandlerForType() { return { "MultipleChoiceQuestionSingleOption": getJsonForMultipleChoiceQuestionSingleOption, "MultipleSelectionQuestion": getJsonForMultipleSelectionQuestion }; }
[ "function renderForm() {\n\t\tfor (var i = 0; i < questObj.length; i++) {\n\t\t\tconst formItem = []\n\t\t\tformItem.push(questObj[i].question);\n\t\t\tformItem.push(questObj[i].type);\n\t\t\tformItem.push(questObj[i].validation);\n\t\t\tconst answers = [];\n\t\t\tfor (var j = 0; j < questObj[i].answers.length; j++...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get total price of the selected plan including all additional options (whicha are already included)
getTotalPrice() { this.totalPrice = this.selectedPlan.getRenewablePrice(); const newEnvironmentPlanCode = find(this.selectedPlan.addonFamilies, { name: ADDON_FAMILY.ENVIRONMENT, }).addons[0]; const environmentAddon = new Plan( find(this.catalog.addons, { planCode: newEnvironmentPlanCode }), ...
[ "getTotalPrice () {\n return _.reduce(this.options.data, (total, option) => total + option.quantity * option.price, 0).toFixed(2);\n }", "get totalPrice() {\n if (this._ingredients === undefined)\n return 0;\n let total = 0;\n this._ingredients.filter(i =>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A Rank has three attributes: name: 'ace', 'two', 'three', etc. abbrev: '2', '3', 'K', 'A', etc. value: numeric value. Ace has value 14 (not 1)
function Rank(name, abbrev, value) { this.name = function () { return name; }; this.abbrev = function () { return abbrev; }; this.value = function () { return value; }; }
[ "setRank(rank) {\n // use this to simplify rank number\n if (rank <= 0) {\n this.rank = 1\n } else if (rank < 1000 && rank > 0) {\n this.rank = int(rank);\n } else if (rank >= 1000 && rank <= 9999) {\n let temp = rank.toString()[0];\n this.rank = temp + \"K\";\n } else if (rank >=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes an http GET request with name of task
function loadTaskName(name){ let reqUrl = `/task/${name}`; return fetch(reqUrl).then(response=>response.json()); }
[ "async getTask(input = { taskId: '0' }) {\n\n return await this.request({\n name: 'task.get',\n args: [input.taskId],\n page: Page.builder(input.pagination)\n });\n\n }", "static async getTasks() {\n const URL = TASK_URL;\n return Fetcher.call(GET, `...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper function to get a location key from searching an AccuWeather location. Pass in the AccuWeather API Key and a search query (e.g. a city) and in the return response will be a locationKey that can be used to get current conditions.
async function searchAccuWeatherLocations(req, res, next) { // Use request to call the AccuWeather text search API let getResponse = await requestLib.get({ "headers": { "content-type": "application/json", "Authorization": req.access_token }, "url": "https://dataservice.accuweather.com/locations/v1/search"...
[ "function getLocationKey (city){\n\tvar locationURL = 'http://dataservice.accuweather.com//locations/v1/search?apikey=xTHYAI2t6JF0YFftdoE70JSFwkQC6tLd=' + city;\n\treturn $.ajax({\n\t\turl: locationURL,\n\t\ttype: 'GET',\n\t\tdataType: 'jsonp',\n\t});\t\n}", "function getLocationByKey(cityKey) {\n const API_KE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function accepts the earlier sorted ratings array as an argument and calls addMovie to render to the DOM
function sortByRatings(ratingsArray) { return ratingsArray.map(val => { for (let key in myMovies) { if (myMovies[key].rating === val) { addMovie(myMovies[key].name, myMovies[key].rating) } } }) }
[ "function createMovieElements(movObj, ratingData) {\n for (var i = 0; i < movObj.movies.length; i++) {\n \n // create the movie object\n var movie = movObj.movies[i];\n \n // add a genre score to each year\n for (var j = 0; j < movie.genres.length; j++) {\n va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes notched outline selector to close the notch in the outline.
closeNotch() { const {OUTLINE_NOTCHED} = MDCNotchedOutlineFoundation.cssClasses; this.adapter_.removeClass(OUTLINE_NOTCHED); }
[ "closeNotch() {\n const {OUTLINE_NOTCHED} = MDCNotchedOutlineFoundation.cssClasses;\n this.adapter_.removeClass(OUTLINE_NOTCHED);\n }", "destroyOutline() {\n\t\tthis.revealOutline.style.background = ''\n\t\trenderQueue.delete(this.destroyOutline)\n\t}", "function desel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
count occurences of coins in text
function calculateCoinWeighting(text, coins = []) { var result = {}; // order by number of spaces (this is to catch e.g. "Bitcoin Cash" before "Bitcoin") coins.sort((a,b) => { if(a.name.split(" ").length > b.name.split(" ").length) return -1; else return 1; }); coins.forEach((coin) =...
[ "function countBs(text){\n return countChar(text,\"B\");\n}", "function indiccoinc(texte)\n{\n\tvar nombres=new Array(26); // Le nombre de fois que chaque lettre intervient dans le texte\n\tvar indice=0.0;\n\tvar nb=0;\n\t\n\t// On commence par réaliser les pourcentages...\n\tnombres=calculnombres(texte);\n\tfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given an int or string name of a fort, return the bonus
function fortBonus(fort) { var cb = getFort(fort); cb = Math.pow(1.25, cb); cb = Math.round(cb*1000)/1000; return cb; }
[ "function fortBonus(fort) {\n var cb = getFort(fort);\n cb = Math.pow(1.25, cb);\n cb = Math.round(cb * 1000) / 1000;\n return cb;\n}", "function bonus(meal_cost) {\n return Math.floor(meal_cost * .2) + 1;\n }", "function getChameleonBonus(){\n return getAttrByName(ChameleonChar.id,chameleonBonusAttr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registration numbers are conditional based on the organisation type This step can include a combination of company number, charity number, and/or department for education number.
function stepRegistrationNumbers() { const includeCompanyNumber = COMPANY_NUMBER_TYPES.includes( currentOrganisationType ); const includeCharityNumber = concat( CHARITY_NUMBER_TYPES.required, CHARITY_NUMBER_TYPES.optional ).includes(currentOrganisatio...
[ "function requirementLevel() {\n if ($('#gsc_prospecttype').val() == \"100000001\" || $('#gsc_prospecttype').val() == \"100000002\") {\n $('#gsc_birthday').next('div').css('display', 'none');\n $('#gsc_birthday').val('');\n document.getElementById('gsc_birthday').style.displa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the form: clear checkboxes, remove added option groups, hide sub options.
function resetForm() { console.log("Resetting form"); // Clear all checkboxes and radio buttons $('input:checkbox').each(function(index){ var $this = $(this); if ($this.attr('checked')) { $this.attr('checked', false).checkboxradio('refresh'); } }); $('inp...
[ "function resetForm() {\n // Clear all checkboxes and radio buttons\n $('input:checkbox').each(function(index){\n try {\n $(this).attr('checked', false).checkboxradio('refresh',true);\n } catch(e){}\n });\n $('input:radio').each(function(index){\n try {\n $(this).attr('checked', false).checkb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Win condition helper (count Down/Left)
function countDownLeft(x,y){ for(let i = y; i < rows - 1; i++){ for(let j = x; j > 0; j--){ if(boardArray[x + y * columns] == boardArray[(j - 1) + (i + 1) * columns]){ winConditionCount++; } else { return; } if(i + 1 < rows - 1){ i++; } else { return; } } } }
[ "function countUpLeft(x,y){\n\tfor(let i = y; i > 0; i--){\n\t\tfor(let j = x; j > 0; j--){\n\t\t\tif(boardArray[x + y * columns] == boardArray[(j - 1) + (i - 1) * columns]){\n\t\t\t\twinConditionCount++;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(i - 1 > 0){\n\t\t\t\ti--;\n\t\t\t} else {\n\t\t\t\treturn;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
dibujar una linea con cierto grosor
function dibujarLineaGrosor(color, grosor, x_inicial, y_inicial, x_final, y_final) { lienzo.beginPath(); lienzo.strokeStyle = color; lienzo.lineWidth = grosor; lienzo.lineCap = "round"; lienzo.moveTo(x_inicial, y_inicial); lienzo.lineTo(x_final, y_final); lienzo.stroke(); lienzo.closePath(); }
[ "function dibujarLineaGrosor(color, grosor, x_inicial, y_inicial, x_final, y_final) {\n lienzo.beginPath();\n lienzo.strokeStyle = color;\n lienzo.lineWidth = grosor;\n lienzo.lineCap = \"round\";\n lienzo.moveTo(x_inicial, y_inicial);\n lienzo.lineTo(x_final, y_final);\n lienzo.stroke();\n lienzo.closePath...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes the Jack, Queen, King, and Ace a numerical value
function fixValues() { if (currentCard.value === 'JACK') { currentCard.value = '11'; } else if (currentCard.value === 'QUEEN') { currentCard.value = '12'; } else if (currentCard.value === 'KING') { currentCard.value = '13'; } else if (currentCard.value === 'ACE') { currentCard.value = '1'; } }
[ "determineAcesValue() {\n let aceValue = \"high\";\n for (let i of this._hand) {\n if(i.getValue().rank === \"Ace\") {\n aceValue = \"low\"\n try {\n i.setAce(aceValue);\n } catch (e) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///delete the membership list product
function regMembershipListDeleteAction(productId) { return { type: ApiConstants.API_REG_MEMBERSHIP_LIST_DELETE_LOAD, productId, }; }
[ "registrationMembershipFeeListDelete(payload) {\n let productId = payload.productId;\n var url = `/api/membershipproduct/${productId}`;\n return Method.dataDelete(url, token);\n }", "deleteProduct(){\n this.category.removeProduct(this.id);\n }", "function delItem(){\n\t//determine all the se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PROTECTED Sets the items childs.
function setItemChilds(childList) { this.childs = childList; }
[ "function createChildren() {\n\t\t\t\tsuper();\n\t\t\t\tfor (var i = 0, kid; kid = this.children[i]; i++) {\n\t\t\t\t\tkid.id = this.id + this._itemIdPrefix + i;\n\t\t\t\t\tkid.template = this.itemtemplate;\n\t\t\t\t\tthis.items.push(kid);\n\t\t\t\t}\n\t\t\t}", "_setChildren(item,data){// find all children\nconst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
replaceBulk(args) Replace the cleanup replacements with their correct values.
function replaceBulk(args) { var solution = args.string; var replaceArray = args.replacements; var findArray = Object.keys(replaceArray); var regex = [], map = {}; for(var i = 0; i < findArray.length; i++) { var orig = findArray[i]; regex.push( findArray[i].replace(/([-[\]{}()*+?.\\^$|#,])/g,'\\$1')...
[ "function cleanupInput(args) {\n\t\tvar input = formatInput({'input':args.input});\n\t\t\n\t\tvar replacements = getCleanupReplacements();\n\t\t\n\t\treturn replaceBulk({\n\t\t\t'string':input,\n\t\t\t'replacements':replacements,\n\t\t});\n\t}", "function MultiReplace() {\n var strMR = MultiReplace.arguments[0];...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function: changeEpisode(elem) Called when a new item is selected in the menu; swaps out the episode info and track with the selected episode's. elem: episode menu element
function changeEpisode(elem) { var chosen = document.getElementById("episodeName").object.getSelectedIndex(); updateEpisode(results[chosen]); }
[ "function change_episode(elem) \n{\n\tvar chosen = elem.options[elem.selectedIndex].value;\n\tfor(var i=0; chosen != results[i].title; ++i) { }\t\n\tupdate_episode(results[i]);\n}", "function update_episode(elem)\n{\n\n\tif(isPlaying) { document.getElementById(\"episode_track\").Stop(); }\n\n\tdocument.getElement...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a variable by index.
variableAt(index) { return this._vars[index]; }
[ "function Var(index){ \n return {type:VAR, index:index}; \n }", "function indexVariable(name) {\r\n let parts = name.split(\".\");\r\n let result = Fields.variable(parts[0]);\r\n for (let index = 1; index < parts.length; index++) {\r\n result = Fields.index(result, Fields...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert object properties to definitions for images and hatch fills
function convertPropertiesToDefinitions(obj, defs) { procNode(obj); function procNode(obj) { if (obj.tag == 'path' && obj.properties['fill-pattern']) { convertFillPattern(obj.properties, defs); } if (obj.tag == 'image') { if (/\.svg/.test(obj.properties.href || '')) { ...
[ "function set_properties(obj) {\r\n select_layer(obj);\r\n if (obj.type == \"i-text\") {\r\n set_userinput_fill(obj.get('fill'));\r\n set_userinput_fontWeight(obj.get('fontWeight'));\r\n set_userinput_stroke(obj);\r\n set_userinput_shadow(obj);\r\n $(\"#font\").removeClass(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets this return statement's expression if it exists or throws.
getExpressionOrThrow() { return errors.throwIfNullOrUndefined(this.getExpression(), "Expected to find a return expression's expression."); }
[ "getExpressionOrThrow() {\r\n return errors.throwIfNullOrUndefined(this.getExpression(), \"Expected to find the throw statement's expression.\");\r\n }", "getExpressionOrThrow() {\r\n return errors.throwIfNullOrUndefined(this.getExpression(), \"Expected to find an expression.\");\r\n }", "fu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
external size: t > int Provides: ml_z_size const Requires: bigInt
function ml_z_size(z1) { // Claim to be a 32-bit architecture. return bigInt(z1).toArray(Math.pow(2, 32)).value.length; }
[ "function f_size(size) {\n // max function handles the size < 10MB condition\n return Math.max(0.1, Math.sqrt(size)) / 4;\n }", "ZLen() {\n return this.zmax - this.zmin;\n }", "function ml_z_of_int32(i32) {\n return bigInt(i32);\n}", "function zScale (z) {\n return M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subscribe to (possibly) several from a list of feeds for a site.
async subscribe(fc) { console.log(fc) let site = fc.site, list = fc.list, follows = [] let sel = list.filter(feed => feed.selected), errors = [] for (let feed of sel) { let follow = {url: feed.href, importance: site.importance, tags: site.tags, title: site.title, editedAt: new Date()} ...
[ "async subscribe(fc, sender) {\n // console.log(fc)\n let site = fc.site, list = fc.list, follows = []\n let sel = list.filter(feed => feed.selected), errors = []\n for (let feed of sel) {\n let follow = {url: feed.href, importance: site.importance,\n tags: site.tags, title: site.title, edit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
syncs the syncObject defined by path
function _syncPath(path) { var record = syncObjects[path]; if (!record) { return; } if (record.timeoutId) { clearTimeout(record.timeoutId); } record.timeoutId = setTimeout(function () { var iter = _model.getData(); var pathL...
[ "function _syncData(path) {\n if (!path) return;\n var keys = Object.keys(syncObjects);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var record = syncObjects[key];\n if (path.match(record.regex)) {\n _syncPath(key);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that all needed values are defined
function checkRequired(values, keys) { var i, undef = []; for (i = 0; i < keys.length; ++i) { if (!values[keys[i]]) { undef.push(keys[i]); } } if (undef.length > 0) { throw new Error('Please define these values in nuxeo.conf: ' + undef.join(', ')); } }
[ "_checkSetup() {\n if (!this.queryName) {\n this._fail('Query name is required.');\n }\n if (!this.queryHost) {\n this._fail('Query host is required.');\n }\n if (!this.queryUrl) {\n this._fail('Query URL is required.');\n }\n if (thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
simple diff for config for now, just treat all changes as equivalent
function diffConfig(oldConfig, newConfig) { var key; for (key in oldConfig) { if (key.charAt(0) === '_') continue; var oldVal = oldConfig[key]; var newVal = newConfig[key]; if (oldVal !== newVal) { if (Lib.isPlainObject(oldVal) && Lib.isPlainObject(newVal)) { if (diffConfig(oldVal, new...
[ "function diff(oldConfig, newConfig){\n return configDiff(oldConfig, newConfig).map(Action.toString);\n}", "diff() {\n return diff(this.stored, this.settings);\n }", "valuesDiffDumper(valuesDiff) {\n console.log();\n console.log('##############################################################');\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a function that replaces non breaking whitespaces in a text with
function replaceWhiteSpaces(text) { var i, result = '', len = text.length; for (i = 0; i < len; i += 1) { if (text[i] === ' ') { result += '&nbsp;'; } else { result += text[i]; } } return result; }
[ "function replaceNbsp(text){\n while (text.indexOf(\" \") != -1)\n {\n text = text.replace(\" \",\"&nbsp\");\n }\n return text;\n}", "function clearWhitespacesForPreview(text) {\r\n\twhile (text.indexOf(\" \\n\",1) > 0) {\r\n\t\ttext = text.replace(/ \\n/g,\"\\n\");\r\n\t}\r\n\twhile (text.inde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
handler for detail show event
function showDetailHandler() { //delay creation of options to pretend quicker reaction Ext.create('Ext.util.DelayedTask', function () { detail.fireEvent('showdetaildelayed'); }).delay(150); }
[ "notifyShowDetail(evt) {\n evt.preventDefault();\n\n this.dispatchEvent(\n new CustomEvent('showdetail', {\n bubbles: true,\n composed: true,\n detail: { productId: this.displayData.id }\n })\n );\n }", "function detailView...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a prefix to a field name, taking style guide into account
function prefixFieldName(prefix, fieldName) { if (prefix === undefined || prefix === "") { return fieldName; } return prefix + capitalize(fieldName); }
[ "function prefixFieldName(prefix,fieldName){if(prefix===undefined||prefix===\"\"){return fieldName;}return prefix+capitalize(fieldName);}", "function prefixFieldName(prefix, fieldName) {\n if (prefix === undefined || prefix === \"\") {\n return fieldName;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the number of sockets connected param roomId: optional id of room containing sockets param namespace: optional name of namespace containing sockets return res: array of sockets contained by io, namespace or room
function findClientsSocket(roomId, namespace) { var res = [] , ns = io.of(namespace ||"/"); // the default namespace is "/" if (ns) { for (var id in ns.connected) { if(roomId) { var index = ns.connected[id].rooms.indexOf(roomId) ; if(index !== -1) { ...
[ "function findClientsSocket(roomId, namespace) {\n var res = []\n , ns = io.of(namespace ||\"/\"); // the default namespace is \"/\"\n \n if (ns) {\n for (var id in ns.connected) {\n if(roomId) {\n var index = ns.connected[id].rooms.indexOf(roomId) ;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the text to the right in a rectangle, where the rectangle is delineated by the positions in which the three specified strings of (case sensitive) text are found.
function getRightText(elements, topLeftText, rightText, bottomText) { // Construct a bounding rectangle in which the expected text should appear. Any elements // over 50% within the bounding rectangle will be assumed to be part of the expected text. let topLeftElement = elements.find(element => element.tex...
[ "function getRightText(elements, topLeftText, rightText, bottomText) {\n // Construct a bounding rectangle in which the expected text should appear. Any elements\n // over 50% within the bounding rectangle will be assumed to be part of the expected text.\n let topLeftElement = findElement(elements, topLef...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion HEARTBEAT region SEND/GET STATUS REQUEST
function sendStatusUpdate() { var queryParamString = "type=heartbeat"; queryParamString += "&username=" + AccountServices.username; queryParamString += "&displayName=" + MyAvatar.displayName; queryParamString += "&status="; queryParamString += currentStatus; var uri = RE...
[ "function wrf_heartbeat(req, res) {\n\tconsole.log(\"WRF: heartbeat\");\n\tres.json({success: true, ready: true, status: \"Online\"});\n}", "function sendStats() {\n if (hostname.indexOf(\"local\") != -1) {\n cleanup();\n return;\n }\n var app = optio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
can you change the name of this folder? for example, newsgroups and some special folders can't be renamed readonly attribute boolean canRename;
get canRename() { return true; }
[ "function setFolderName(newFolderName) {\n if (newFolderName != '' && !fs.existsSync(newFolderName)) {\n return false;\n }\n folderName = newFolderName;\n return true;\n }", "function updateFolder(id, name, new_name) {\n\n if(!queryResource(2, 1, name, new_name, '')) return false;\n\n jQue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rm CSS file in the document
function rmCSSFile(name) { var cssPath = cssLists[name]; if(cssPath != undefined) { $("link").each(function(){ if($(this).attr("href") == cssPath) $(this).remove(); }); cssLists[name] = undefined; } }
[ "function removeCSS(filename){\r\n $('link[href=\"./src/css/' + filename + '.css\"]').remove();\r\n}", "function removeCSS() {\n return del(subsetDist + '/*.css');\n}", "function runCleanCss(cb) {\n del(global.getDest('scss'), cb);\n}", "function removeCss(id){\n\n if(id in cssRules){\n\n d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate items populates the screen with color objects
generateItems() { const itemCount = slider.value; let colors = this.generateColors(itemCount); while (screenDiv.firstChild) { screenDiv.removeChild(screenDiv.lastChild); } for (let i = 0; i < itemCount; i++) { let div = document.createElement("div"); div.classList.add("item...
[ "populateNewColors(){\n // give a new color to every relevant box\n for(var i = 0 ; i < this.colorBoxes.length ; i++){\n if(i < this.numberOfColors){\n ColorBox.setColor(this.colorBoxes[i]);\n }\n // set the display of the color box appropriately\n var displayVal;\n (i < this.n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to update no. of rooms and guests
function update_room_guest(n_room,n_adult,n_child){ var rooms = "room"; var guests = "guest"; if(n_room>1){ rooms = "rooms"; } if((n_adult+n_child)>1){ guests = "guests"; } $("#r-g-num #g-num").text(n_adult+n_child+" "+guests); $("#r-g-num #r-num").text(n_room+" "+rooms); }
[ "function updateNumberOfGuests() {\n \tcontainer.find(\"#numberOfGuests\").html(model.getNumberOfGuests());\n }", "onIncRooms() {\n let roomCount = this.state.rooms;\n let adultCount = this.state.adults;\n if (roomCount < roomValues.maxRoom) {\n\n roomCount += 1;\n\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Event used for delayed command completion. Clears BUSY, sets any additional bits specified, and generates a command completion interrupt.
done(bits) { this.status &= ~STATUS_BUSY; this.status |= bits; this.machine.diskIntrqInterrupt(true); }
[ "setStateBusy() {\n if (this._state === STATE.IDLE)\n this._state = STATE.RECV_BUSY;\n }", "async function blxDeviceCmd (cmd, timeout_ms = DEV_TIMEOUT_MS) { // case dep.\n if (blxCmdBusy === true) {\n console.warn('*** BLX BUSY (Since ' + (Date.now() - blxCmdBusy_t0).toFixed(0) + ' msec) ***')\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add contact to lease contacts table.
function addToLeaseContacts(leaseId, contactId, isLsContactsDef){ if (isLsContactsDef && valueExistsNotEmpty(contactId)) { var dataSource = View.dataSources.get('abRepmLsContacts_ds'); var restriction = new Ab.view.Restriction(); restriction.addClause('ls_contacts.ls_id', leaseId, '='); restriction.addClause...
[ "function addContact() {\n let contact = getContactFormData()\n if (!contact.contactId) {\n log('Cannot add a contact to the Address Book without a contact ID!')\n } else {\n client.contacts.add(getContactFormData())\n }\n}", "function addContact() {\r\n let getName = getNameInput();\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PasswordSet: Use password as key to decrypt RCTicket on data entry.
function PasswordSet() { if (window.event.keyCode == 13) { // // Decrypt the RCTicket // DecryptRCTicket(); } return; }
[ "function PasswordSet()\n{\t\n\tTraceFunctEnter(\"PasswordSet\");\n\tvar oBtn;\n\tif (g_IsIM)\n\t oBtn = btnYES_IM;\n\telse\n\t oBtn = btnYES;\n\tif( true == oBtn.disabled)\n\t{\n\t\toBtn.disabled = false;\n\t}\n\t\n\tif (window.event.keyCode == 13)\n\t{\n\t\t//\n\t\t// Decrypt the RCTicket\n\t\t//\n\t\tDecry...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=================================================================== from vm/instructions/NewList.java =================================================================== Needed early: Instruction Needed late: ListBuilder
function NewList() { }
[ "createList(newList) {\n let newContent = new List(newList)\n STORE.State.lists.push(newContent)\n }", "function List() {}", "buildList() {\n this.list = document.createElement('ul');\n }", "addList() {\n let data = {};\n data.title = \"New List\";\n const list = new List...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Home view. This view must contain recommended songs. Recommend all by default Reading value from Redux Store. Using Redux hooks.
function ViewHome() { const dispatch = useDispatch() // Redux dispatch hook useEffect(() => { // In the main view, we need both songs and albums info. // We fetch them both. const asyncGetServerData = async () => { dispatch(await getSongs()) dispatch(await getAlbums()) } asyncGet...
[ "render() {\n return (\n <div>\n <h1>Ja<span className=\"highlight\">mmm</span>ing</h1>\n <div className=\"App\">\n <SearchBar onSearch={this.search} />\n <div className=\"App-playlist\">\n <SearchResults searchResults={this.state.searchResults} onAdd={this.addTrac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Combines an arbitrary set of paths ensuring and normalizes the slashes
function combine() { var paths = []; for (var _i = 0; _i < arguments.length; _i++) { paths[_i] = arguments[_i]; } return paths .filter(function (path) { return !stringIsNullOrEmpty(path); }) .map(function (path) { return path.replace(/^[\\|/]/, "").replace(/[\\|/]$/, ""); }) ...
[ "function combinePaths() {\r\n var paths = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n paths[_i] = arguments[_i];\r\n }\r\n return paths\r\n .filter(function (path) { return !stringIsNullOrEmpty(path); })\r\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Common code for confirming and closing review requests. This will confirm that the user wants to close the selected review requests. Once they confirm, the review requests will be closed. Args: closeType (string): The close type to use.
async _closeReviewRequests(closeType) { try { const confirmed = await this._confirmClose(); if (confirmed) { const results = await this.model.closeReviewRequests({ closeType: closeType, }); this._showCloseResults(result...
[ "closeRequested() {\n const p = this.props;\n const unsavedChanges = p.editMode; // TODO: activate this appropriatly\n\n // obtain user confirmation when unsaved changes exist\n if (unsavedChanges) {\n Confirm.display({\n title: 'Course Edit',\n msg: 'You have un-saved changes ... i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a helper function for checking the user input for check rooms feature
function check_rooms_check_user_input(e){ let invalid = 0; let room_valid = 0; // 0 = false , 1 = true // First check to see if all the fields are not empty $.each(e.data, function (info){if (e.data[info].val() === "" && info !== "booked_times_body" && info !== "booked_times_header"){invalid = 1;}}); if (inv...
[ "function checkInputRoom(room_in) {\n if (checkRoom(room_in) === false)\n Api.replyRoom(Rooms.ADMIN, 'There have no input room :: \"' + room_in + '\"');\n}", "checkRoom(room){\n var res = false;\n\n if(room && typeof room === 'string')\n res = true;\n \n return res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parses the current cards in this.state.alerts some alerts have multiple values so the id's need to be compared before they are added to the array
renderCards(){ var cards = [] this.state.alerts.map((alert, index) =>{ cards.push(<AlertCard stations={this.state.stations} alerts={alert} deleteAlert={this.deleteAlert} index={index}/>) return null; }) return cards }
[ "renderHistoricCard(){\n var cards = []\n this.state.historicAlerts.map(alert => {\n // var filter = moment(this.state.date).format('YYYY-MM-DD');\n var filter = this.state.date;\n var alertTime = moment(alert.created_at).utc(alert.created_at).local().format('YYYY-MM-D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function updates the district bar chart each time it is call
function updateDistrictChart(district_chart,districts_name,districts_male,districts_female) { district_chart.data.labels = districts_name; district_chart.data.datasets = []; district_chart.data.datasets.push({ label:'Male population per district', data: districts_male, backgroundCol...
[ "update(districts, callBack = () => {}, transitionDuration = 500) {\n // update districts array from class\n this.districts = districts\n\n // filter only important districts\n let filtered_dat = _.filter(this.perDistrictData, (d) => districts.includes(d.name))\n\n /*\n Since we have grouped bar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a conformance statement and a resource type, returns the name of the URL parameter that can be used to scope the resource type by patient ID.
function getPatientParam(conformance, resourceType) { // Find what resources are supported by this server const resources = getPath(conformance, "rest.0.resource") || []; // Check if this resource is supported const meta = resources.find(r => r.type === resourceType); if (!meta) { throw new Error(`Resourc...
[ "function getPatientParam(conformance, resourceType) {\n // Find what resources are supported by this server\n var resources = getPath(conformance, \"rest.0.resource\") || []; // Check if this resource is supported\n\n var meta = resources.find(function (r) {\n return r.type === resourceType;\n });\n\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Close the select options box
function _close(e) { if ( currValue != selected ){ // Apply changed value to original select $original.prop('selectedIndex', currValue = selected); // Only trigger change event if function call came from a click if ( !e || e.type != 'click' ) $ori...
[ "function closeSelect() {\n select_popup_search.blur();\n select_popup.removeClass(settings.class_popup_visible);\n updatePlaceholder();\n \n //onClose Callback\n if($.isFunction(options.onClose)) {\n options.onClose(getValues());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
New instance for `save section collection event handler` class.
function SaveSectionCollectionEventHandler(sender){this.sender=sender;}
[ "function SaveSectionCollectionEventHandler(sender) {\n this.sender = sender;\n }", "function SaveSectionEventHandler(sender,state){this.sender=sender;this.state=state;}", "function SaveSectionEventHandler(sender, state) {\n this.sender = sender;\n this.state = state;\n }", "functio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a line object, find its line number by walking up through its parent links.
function lineNo(line) { if (line.parent == null) { return null } var cur = line.parent, no = indexOf(cur.lines, line); for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { for (var i = 0;; ++i) { if (chunk.children[i] == cur) { break } no += chunk.childr...
[ "function lineNo(line) {\n\t\t if (line.parent == null) { return null }\n\t\t var cur = line.parent, no = indexOf(cur.lines, line);\n\t\t for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t\t for (var i = 0;; ++i) {\n\t\t if (chunk.children[i] == cur) { break }\n\t\t no += c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the AssetLoader service with a generated assetmanifest.
function initialize(instance) { var service = instance.lookup('service:asset-loader'); service.pushManifest(_assetManifest.default); }
[ "function initialize(instance) {\n const service = instance.lookup('service:asset-loader');\n service.pushManifest(_assetManifest.default);\n }", "function initialize(instance) {\n var service = instance.lookup('service:asset-loader');\n service.pushManifest(_engineTestingConfigAssetManifest['default...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get current stock by farmer and item Name The name of the item. Farmer Farmer name. stock How much stock can this farmer offer this week.
function getStock(){ var items = [ {"Name":"appals", "Farmer": "Gal", "stock":3}, {"Name":"tomatoes", "Farmer": "Gal", "stock":12}, {"Name":"tomatoes", "Farmer": "Omer", "stock":4} ]; return items; }
[ "function getCurrentStocks(){\n return items.getCurrentItemStock();\n}", "function getStockInfo(param){\n\treturn stock.getStockInfo(param.name);\n}", "getStock(title) {\n return this.getItem(title).amount;\n }", "function getStockInfo(param) {\n\treturn stock.getStockInfo(param.name);\n}", "func...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `AlarmCapabilitiesProperty`
function CfnAlarmModel_AlarmCapabilitiesPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but r...
[ "function CfnApplication_AlarmPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reads the userPreferences object from local storage or returns a default one with empty values if it does not exist in local storage
function readUserPreferencesFromLocalStorage() { let userPrefences = readObjectFromLocalStorage(userPreferencesKeyInLocalStorage); if ( Object.keys(userPrefences).length > 0){ return userPrefences; } return { favouriteMeals : [], favouriteAreas : [], } }
[ "function getPreferences()\n{\n let prefs = localStorage.getItem(\"preferences\");\n return JSON.parse(prefs) || {};\n}", "function retrieveAndSetPreference(){\n if(typeof(Storage) !== \"undefined\") { //Check if the browser supports local storage\n if(localStorage.guddi_ca_xkcd_us...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds gold to a client
function addGold(client, gold) { if((!client) || (!gold)) return false; // Grab playerID var playerID = client.netprops.m_iPlayerID; if (playerID == -1) { return false; } // Give the gold dota.givePlayerGold(playerID, gold.r, true); dota.givePlayerGold(playerID, gold.u, false); // It worked return tru...
[ "function addGold(){\n user.gold += user.villagerCount * villager.goldPerSec;\n}", "function attackerAdd() {\n\n\t//remove 400 gold\n\tif (gold - 400 >= 0) {\n\t\tgold -= 400;\n\n\t\t//increase number of attackers by 1\n\t\tbuy.attack++;\n\n\t\t//update number of attackers in stats\n\n\n\t\t//update shoppe\n\t}\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dispose the existing platform.
function disposePlatform() { if (lang_1.isPresent(_platform) && !_platform.disposed) { _platform.dispose(); } }
[ "function disposePlatform() {\n if (lang_91.isPresent(_platform)) {\n _platform.dispose();\n _platform = null;\n }\n }", "function disposePlatform() {\n\t if (lang_1.isPresent(_platform)) {\n\t _platform.dispose();\n\t _platform = null;\n\t }\n\t}", "fu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles a `EchoTemperatureIntent`, which is when the user requests the temperature. This method: 1. Gets the address of the Echo, using the consent token, 2. Geocodes the address using the Google Maps API, 3. Gets the forecast for the address's coordinates from Dark Sky, and 4. Emits an Alexa response, with the tempera...
function echoTemperatureIntentHandler() { let device_id = this.event.context.System.device.deviceId; let consent_token = this.event.context.System.user.permissions.consentToken; getEchoAddress(device_id, consent_token). then(geocodeLocation). then(getForecast). then(forecast => { this.emit(':tell', t...
[ "function echoForecastIntentHandler() {\n let device_id = this.event.context.System.device.deviceId;\n let consent_token = this.event.context.System.user.permissions.consentToken;\n\n getEchoAddress(device_id, consent_token).\n then(geocodeLocation).\n then(getForecast).\n then(forecast => { this.emit('...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the OAuth custom parameters to pass in an OAuth request for popup and redirect signin operations.
setCustomParameters(customOAuthParameters) { this.customParameters = customOAuthParameters; return this; }
[ "setCustomParameters(customOAuthParameters) {\n this.customParameters = customOAuthParameters;\n return this;\n }", "function extendRequestWithOauth(pre)\n {\n //the sign functions\n pre.sign = function(oa, token, secret) {\n var additionalData = {}; //TODO: deal with body param...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pushes both taxonObj IDs onto the conflictedTaxaObj.
function addConflictedTaxa() { // console.log("conflicting parents pushed = old.%O- new.%O ", taxonRecrdObjsAry[existingTaxonObj.tempId], taxonRecrdObjsAry[tP.recrd.tempId]); var level = tP.fieldAry[lvlAry[conflictingLvl]]; var existingParentName = taxaNameMap[existingTaxonObj.pa...
[ "function addConflictedGenus() {\n conflictedTaxaObj.conflictedGenus[tP.role][taxonName].push(tP.recrd.tempId); \n }", "function mergeTaxaIntoInteractions() {\n \tvar recrdsObj = entityObj.curRcrds; \n\t var taxonObjs = entityObj.taxon.taxonObjs;\t\t\t\t\t\t\t //\tconso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates Notebooks from local storage
function createNoteBooksFromLocalStorage() { if (localStorage.getItem("lastVisitedNoteBook" != null)) { openNotebook = localStorage.getItem("lastVisitedNoteBook"); } if (getLocalStorageListsToArray("books") != null) { getLocalStorageListsToArray("books").forEach((element) => { createNoteBook(element...
[ "function loadNotebooks () {\n notebooks = localStorageService.get('Notebooks')\n\n if (!notebooks) {\n initNotebooks()\n }\n }", "function initNotebooks () {\n notebooks = []\n newNotebook('General')\n newNotebook('Study')\n newNotebook('Work')\n }", "function addNewNotebook()\n{\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sleepinessIncrease method will increase the currentPets current sleepiness by 1 every 25 seconds.
sleepinessIncrease() { if(this.timeSpan % 25 === 0) { this.currentPet.sleepiness += 1; } }
[ "function increaseHealth() {\n\tif (health < 250) {\n\t\thealth += 25;\n\t} else {\n\t\thealth = 250;\n\t}\n}", "boredIncrease() {\n\t\tif(this.timeSpan % 10 === 0) {\n\t\t\tthis.currentPet.boredom += 1;\n\t\t}\n\t}", "updateSleepNumber(value) {\n this.sleepNumber = value;\n }", "drinkSake() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
region Mark Conversation as Read function
function markConversationAsRead() { $(gSelectedElement).removeClass("unreadconversation"); $(gSelectedElement).addClass("readconversation"); app.selectedConversation.set({"Read": true}); //call the server to mark the conversation as read $.getJSON('Messages/MarkConversationAsRead', {...
[ "function markConversationAsRead() {\n $(gSelectedElement).removeClass(\"unreadconversation\");\n $(gSelectedElement).addClass(\"readconversation\");\n window.app.selectedConversation.set({ \"Read\": true });\n //call the server to mark the conversation as read\n $.getJSON('Conversations/MarkConversationA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create BigQuery table if it doesn't exist already
function createTableIfNotExists() { [projectId, datasetId] = getConfiguration(); try { BigQuery.Tables.get(projectId, datasetId, TABLE_NAME); } catch (e) { Logger.log('Table does not exist. Creating new table with ID: ' + TABLE_NAME); // Create time-series and data field schema const dateS...
[ "async createTable () {\n const tableList = await this.r.tableList()\n if (!tableList.includes(this.TABLE)) {\n await this.r.tableCreate(this.TABLE)\n }\n }", "async createTableIfNotExists(table) {\n return new Promise((resolve, reject) => {\n this.service.createTableIfNotExists(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `ByteMatchStatementProperty`
function CfnWebACL_ByteMatchStatementPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but rece...
[ "function CfnRuleGroup_ByteMatchStatementPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an ob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to insert links into collection of books, comments or shelves
function insertingLinksToCollection (item, linked) { let linksNumbering=0; for( let i=0; i<linked.length; i++ ) { item.links[linksNumbering++] = { 'rel': linked[i][0], 'href': linked[i][1], 'prompt': linked[i][0] } } }
[ "function insertLinks () {\n var pages = {\n RecentChanges: {\n title: i18n('recent_changes').escape(),\n links: ['WikiActivity', 'DiscussionsActivity']\n },\n WikiActivity: {\n title: i18n('wiki_activity').escape(),\n links: ['WikiActivity/watchlist', 'RecentChanges', ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
modified from iview ( Create sticks for "atoms". "bondR" is the radius of the sticks. "atomR" is the radius of the spheres in the joints. "scale" means scale on the radius. "bHighlight" is an option to draw the highlight for these atoms. The highlight could be outlines with bHighlight=1 and 3D objects with bHighlight=2...
createStickRepresentation(atoms, atomR, bondR, scale, bHighlight, bSchematic) { let ic = this.icn3d, me = ic.icn3dui if (me.bNode) return let factor = bSchematic !== undefined && bSchematic ? atomR / ic.cylinderRadius : 1 ic.reprSubCls.createRepresentationSub( a...
[ "createSphereRepresentation(atoms, defaultRadius, forceDefault, scale, bHighlight) {\n let ic = this.icn3d,\n me = ic.icn3dui\n if (me.bNode) return\n\n let thisClass = this\n\n ic.reprSubCls.createRepresentationSub(atoms, function (atom0) {\n thisClass.createSphere...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches the URL from the JWT header which exposes the verification key for that JWT.
function getVerificationKeyURL(token) { var decodedJwt = decodeJwtComplete(token); if (!decodedJwt.header.jku) { throw new Error('Field jku containing the URL for JWT verification not part of header.'); } return decodedJwt.header.jku; }
[ "function fetchJwtPublicKey(){\n var http = require('http');\n var options = {\n hostname: jwtCentralServerInfo.host,\n port: jwtCentralServerInfo.port,\n path: '/key',\n method: 'GET'\n };\n\n var req = http.request(options, function(res) {\n var publicKey = '';\n res.on('data', function (chu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if device platform is iOS and get the iOS version
function iOSversion(){ console.log(window.navigator.platform) if (/iP(hone|od|ad)/.test(window.navigator.platform)) { // supports iOS 2.0 and later: <http://bit.ly/TJjs1V> var v = (window.navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); return [parseInt(v[1], 10), parseInt(v[2], 10...
[ "function iOSversion() {\n if (/iP(hone|od|ad)/.test(navigator.platform)) {\n var v = (navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n return parseInt(v[1], 10);\n }\n }", "function iOSVersion() {\r\n\t\t\tvar oldios = false;\r\n\t\t\tif((navigator.userAgent.matc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if element needs to be transformed as jsx function call
function needsToBeJSXCall(path) { const { openingElement } = path.node; const { attributes, name } = openingElement; const tagName = name.name; // if its a component transform to jsx call if (!isHTMLElement(tagName)) return true; // if it has key attribute, convert to jsx call const hasKeyAttribute = a...
[ "transform () {\n if (this.node.type === 'tag') {\n return this.transformTag()\n } else if (this.node.type === 'text') {\n return this.transformText()\n } else if (this.node.type === 'script') {\n return this.transformScript()\n } else {\n return React.isValidElement(this.node) ? thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove member from a set.
rem(key, member, cb){ let set = this.setsMap.get(key), deleted = 0; if(set && set.delete(member)){ deleted = 1; if(set.size === 0){ this.setsMap.delete(key); } } cb && cb(null, deleted); }
[ "removeFromSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return set.slice(0, i).concat(set.slice(i + 1));\n return set;\n }", "removeSet(set)\n {\n if (!this.cleanup.has(set))\n {\n throw Error('Unknown set: ' + set);\n }\n this.sets = this.sets.fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Diff the children of an ElementNode.
function diffChildren (path, entityId, prev, next, el) { var positions = [] var hasKeys = false var childNodes = Array.prototype.slice.apply(el.childNodes) var leftKeys = reduce(prev.children, keyMapReducer, {}) var rightKeys = reduce(next.children, keyMapReducer, {}) var currentChildren =...
[ "function _updateChildren(DOMElement, changes, dispatch, context) {\n\t // Create a clone of the children so we can reference them later\n\t // using their original position even if they move around\n\t var childNodes = (0, _toArray2.default)(DOMElement.childNodes);\n\t changes.forEach(function (change) {\n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function moves the pipette from air into the beaker When it is clicked again. it moves back to its original position When it is clicked again, it moves towards the flask containing the magnet When clicked again, it creates the effect of drops of liquid falling into the flask
function callPipette(){ // Move the pipette from air into the beaker if(step_no == 4){ step_no++; $("#pipette_arrow").hide(); $("#pipette_arrow").rotate({angle:160}); $("#pipette_arrow").css("top","415%"); $("#pipette_arrow").css("left","37%"); $("#pipette_txt").css("top","300%"); $("#pipette_txt").css(...
[ "function movebackPipette() {\n elem = document.getElementById(\"pipette\");\n // Detect the current position of the pipette.\n initial_top = Math.round($('#pipette').position().top);\n initial_left = Math.round($('#pipette').position().left);\n // Initialise all the values for the motion of the imag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }