query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
find roles in xml
function hlp_parse_load_xml(xml) { var xmlDoc = $.parseXML(xml); xml_file = $(xmlDoc); var new_roles = xml_file.find('role'); return new_roles; }
[ "visitRole_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "visitRole_name(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "function getAvailableRoles() {\n StaticDataFactory.getAvailableRoles().then(function (data) {\n vm.claimRoles = data.roles.role;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return an address for locations
function getLocation(name){ var location = _.detect(locations, function(location){ return name.match(location.re); }); return location ? location.address : ''; }
[ "function getLocationName() {}", "getPositionName(lat, lng){\n Geocoder.getFromLatLng(lat, lng).\n then(res=>\n {\n const formatted_address = res.results[0].formatted_address;\n const position = {\n lat:lat,\n lng:lng\n };\n\n this.setLocati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to finish fade effect of an element
function finishFadeEffect(element) { var listener = function() { element.style.webkitTransition = ''; element.removeEventListener('webkitTransitionEnd', listener, false); }; element.removeEventListener('webkitTransitionEnd', listener, false); element.style.webkitTransition = ''; element.style.o...
[ "function myFadeOut(element, howLong)\n{\n // Creates the Animation Which Carries the Element from Opacity 1 to Opacity 0.\n element.animate([\n {opacity: 1}, \n {opacity: 0}\n ], { \n // How long the Element's Transition from Opacity 1 to Opacity 0 Should Take.\n duration: howLong,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stop the gameloop. The handle is used
function stopLoop() { clearInterval (Defaults.game.handle); }
[ "stop() {\n if (!this.stopped) {\n for (let timeout of this.timeouts) {\n clearTimeout(timeout);\n }\n clearTimeout(this.mainLoopTimeout);\n this.stopped = true;\n }\n }", "function stopGame(){\n\tresetGame();\n\tgoPage('result');\n}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change instrument of a track
changeTrackInstrument(trackID, instrumentID) { let track = this.tracks[trackID]; let new_instr = instrumentArray[instrumentID]; track.instrument = new_instr; track.instrumentID = instrumentID; let trackName = this.generateTrackName(trackID, new_instr); this.trackNames[tra...
[ "function changeInstrument() {\n instrument = (instrument + 1) % instruments.length;\n console.log('change instrument');\n }", "changeCurrentTrackInstrument(instrumentID) {\n this.changeTrackInstrument(this.index, instrumentID);\n }", "updateAudioTrack(state, track) {\n\t\tVue.set(state.self.tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This lets you inspect a contact after the solver is finished. This is useful / for inspecting impulses. / Note: the contact manifold does not include time of impact impulses, which can be / arbitrarily large if the substep is small. Hence the impulse is provided explicitly / in a separate data structure. / Note: this i...
PostSolve(contact, impulse) { }
[ "set useContactForce(value) {}", "function pickContact() {\n var contacts = new Appworks.AWContacts(\n function (contact) {\n var output = \"\";\n if(contact == null) {\n output += \"No contact found\";\n } else {\n output += contactObjectToString(contact);\n }\n out(out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The villager just waits for the night to end
function villagerAction(){ dataStore.waitForAll("nightWait", postNightPhase, "$null"); document.getElementById("notice").innerHTML = "Waiting for night to end..."; document.getElementById("notice").style.display = "block"; }
[ "function waitForServantStartup(adviseLaunchInfo) {\n var waitLoop = setInterval(function() {\n monitorBulletinBoard(adviseLaunchInfo, waitLoop);\n }, 2000);\n}", "async afterBrowserStopped() {}", "async enterEndPhase() {\n let message = \"Het spel is bijna gedaan. Kom nu naar de tuin!\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses a given value into a float number.
function safeParseFloat(value) { if (!value) { return 0.00; } if (ok(value, tyString)) { return parseFloat(value); } if (ok(value, tyNumber)) { return value; } return 0.00; }
[ "function float(val, def)\n {\n if (isNaN(val)) return def;\n\n return parseFloat(val);\n }", "function checkIfFloat(value) {\r\n if (value.toString().indexOf('.', 0) > -1) {\r\n return parseFloat(value).toFixed(2);\r\n }\r\n else {\r\n return value;\r\n }\r\n}", "f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is an alias for `.declareType()`.
createOrReplaceType(name) { return this.declareType(name); }
[ "visitType_declaration(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "function addType() {\n\t\tvar args = extract(\n\t\t\t{ name: 'name', test: function(o) { return typeof o === 'string'; } },\n\t\t\t{ name: 'type', parse: function(o) {\n\t\t\t\treturn (o instanceof Type) ? o : new Type(this.name || o.name,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return an array of album ids of the artist.
function getAlbums(artistId) { var sp = getService(); var url = "https://api.spotify.com/v1/artists/" + artistId + "/albums"; var response = refreshToken(sp, function() { return UrlFetchApp.fetch(url, { headers: { Authorization: 'Bearer ' + sp.getAccessToken(), } }); }); ...
[ "function getArtistIDArray(artist_array) {\n\tvar artist_id_array = []\n\treturn new Promise((resolve, reject) => {\n\t\tfor (var index = 0; index < artist_array.length; ++index) {\n\t\t\tsearchForArtist(artist_array[index]).then(function (data) {\n\t\t\t\tartist_id_array.push(data)\n\t\t\t\tresolve(artist_id_array...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ENDS Function to validate site_privacy / Function to validate select_theme
function ssw_js_validate_theme() { var theme_button = document.getElementById('ssw-steps').select_theme; var theme_button_count = -1; for (var i=theme_button.length-1; i > -1; i--) { if (theme_button[i].checked) {theme_button_count = i; i = -1;} } if (theme_button_count > -1) { ...
[ "function ssw_js_validate_terms() {\n \n var terms_checkbox = document.getElementById('ssw-steps').site_terms;\n \n if (terms_checkbox.checked) {\n document.getElementById(\"ssw-site-terms-error\").style.display=\"none\"; \n return true;\n }\n else {\n document.getElementById(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calcSpeed(prevv, next) calculate speed based on old and new position
function calcSpeed(prev, next) { var x = Math.abs(prev[1] - next[1]); var y = Math.abs(prev[0] - next[0]); var greatest = x > y ? x : y; var speedModifier = 0.20; var speed = Math.ceil(greatest/speedModifier); //Keep speed at a constant if(speed < 3000 || spe...
[ "updateSpeedPhysics() {\n let speedChange = 0;\n const differenceBetweenPresentAndTargetSpeeds = this.speed - this.target.speed;\n\n if (differenceBetweenPresentAndTargetSpeeds === 0) {\n return;\n }\n\n if (this.speed > this.target.speed) {\n speedChange = -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
registered returns true if the client has registered with that ws.
registeredOf(ws) { return this.ws === ws; }
[ "get isConnected() {\n return this.wsSocket && this.wsSocket.readyState === WebSocket.OPEN;\n }", "async isRegistered() {\n this.logger.debug(GuildService.name, this.isRegistered.name, \"Executing\");\n let profile = null;\n try {\n this.logger.debug(GuildService.name, th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if we should display information about this message type
function displayType(msgType, args) { let display = true; if (args.type && args.type.toLowerCase() !== msgType.toLowerCase()) { display = false; } return display; }
[ "function supportMessage(layerType) {\n\t\t\tif (layerType === 0) {\n\t\t\t\t$('.layerTypePrecomps').html('precomps')\n\t\t\t\t$('.supportMessaging').addClass('visible');\n\t\t\t}\n\t\t\telse if (layerType === 2) {\n\t\t\t\t//$('.layerTypeImages').html('images')\n\t\t\t\t//$('.supportMessaging').addClass('visible')...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creamos una funcion decipher la cual descifrara el texto
function decipher (text, n) { // Creamos una variable result, donde se almacenara nuestro resultado en modo de string var result = " "; // Hacemos un bucle que pase elemento por elemento for (var i = 0; i < text.length; i++) { // Creamos una variable letters para almacenar el codigo ASCII de cada...
[ "function decipher(cifrado) {\n alert('Palabra Cifrada: ' + cifrado);\n var descifrado = '';\n\n // el for recorrera las letras del texto a descifrar//\n\n for (var j = 0; j < cifrado.length; j++) {\n var ubicacionDescifrado = (cifrado.charCodeAt(j) + 65 - 33) % 26 + 65;\n var palabraDescifrada = String.f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
THREE.js Object3D constructed from Vessel.js Ship object. There are some serious limitations to this: 1. null values encountered are assumed to be either at the top or bottom of the given station. 2. The end caps and bulkheads are sometimes corrected with zeros where they should perhaps have been clipped because of nul...
function Ship3D(ship, stlPath) { THREE.Group.call(this) this.ship = ship let hull = ship.structure.hull let LOA = hull.attributes.LOA let BOA = hull.attributes.BOA let Depth = hull.attributes.Depth //console.log("LOA:%.1f, BOA:%.1f, Depth:%.1f",LOA,BOA,Depth); this.position.z = -ship.designState.calculatio...
[ "function creaInfissiFinestra(PortdimX,PortdimY,PortPosX,PortPosY,PortPosZ){\nvar infissi = new THREE.Object3D();\n\nvar infisso1 = createMeshPortWindow(new THREE.BoxGeometry(0.1, 0.02, PortdimY), 'PortText.jpg');\ninfisso1.position.set(-(PortdimX+0.05),-0.05,0);\nvar infisso2 = createMeshPortWindow(new THREE.BoxGe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursive function that assign positions to each node
assignPosition(node, position) { node.position = position if (node.children.length){ for (let child_node of node.children){ position = this.assignPosition(child_node, position) } }else{ position++; } return position }
[ "assignPosition(node, position) {\n this.spot = Math.max(this.spot, position);\n node.position = position;\n if (node.children.length > 0) {\n this.assignPosition(node.children[0], position);\n }\n for (let i = 1; i < node.children.length; i++) {\n if (this.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This namespace allows uniqueness over a certain space (uuid string, in this case).
static uuidNamespace() { return '8605fc0f-99cc-4e78-a31b-45b1a7236d9f'; // Generated with uuid v4 }
[ "function TestUuid(uuid){\n let pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n let isValid = pattern.test(uuid);\n return isValid;\n }", "function compute_oid_uuid(data)\n{\n return hex_to_bin(uuid_v5(data, NAMESPACE_OID));\n}", "function unique_node_id(n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset zoom on the map to show all markers
function resetZoom() { map.setCenter({lat: 24.789973, lng: 46.656051}) map.setZoom(15) map.fitBounds(bounds) }
[ "function reset() {\n var browserWidth = $(window).width();\n if(browserWidth <= 1000) {\n map.setCenter(mapOptions.center);\n map.setZoom(11);\n } else if(browserWidth > 1000) {\n map.setCenter(mapOptions.center);\n map.setZoom(12);\n }\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stringify an array of property tuples.
function stringifyProperties(properties) { var result = []; var _loop_1 = function (name, value) { if (value != null) { if (Array.isArray(value)) { value.forEach(function (value) { value && result.push(styleToString(name, value)); }); ...
[ "function arrToStr(arr) {\n\t//initialize resulting string\n\tvar res = \"Array[\";\n\t//loop thru array elements\n\tfor( var index = 0; index < arr.length; index++ ){\n\t\tres += (index > 0 ? \", \" : \"\") + objToStr(arr[index]);\n\t}\n\treturn res + \"]\";\n}", "function arrayToString()\n{\n\tif ( ! arguments....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct type info for reflection. This iterates over the flattened list of uniform type values and smashes them into a JSON object. The leaves of the resulting object are either indices or type strings representing primitive glslify types
function makeReflectTypes(uniforms, useIndex) { var obj = {} for(var i=0; i<uniforms.length; ++i) { var n = uniforms[i].name var parts = n.split(".") var o = obj for(var j=0; j<parts.length; ++j) { var x = parts[j].split("[") if(x.length > 1) { if(!(x[0] in o)) { o[x[0]...
[ "function buildWebTypes() {\n const analysis = loadAnalysis();\n\n const packageJson = JSON.parse(fs.readFileSync(`./package.json`, 'utf8'));\n const entrypoints = analysis.modules.filter((el) => !el.path.startsWith('lib'));\n\n const plainWebTypes = createPlainWebTypes(packageJson, entrypoints);\n const plain...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
turn a string into yellow (for the interactive console)
function yellow(s) { return '\u001b[33m' + s + '\u001b[39m' }
[ "function analyzeColor(input) {\n if (input === \"blue\") {\n return \"blue is the color of the sky\";\n }\n if (input === \"red\") {\n return \"Strawberries are red\";\n }\n if (input === \"cyan\") {\n return \"I don't know anything about cyan\";\n } else {\n return \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a box data object for the given node. The values of the returned object are read only.
function createBoxData(node) { var style = window.getComputedStyle(node); var bt = parseInt(style.borderTopWidth, 10) || 0; var bl = parseInt(style.borderLeftWidth, 10) || 0; var br = parseInt(style.borderRightWidth, 10) || 0; var bb = pars...
[ "function makeCustomBox(boxData) {\n\t\tif (boxData.condition == null || boxData.condition()) {\n\t\t\tvar box = makeBox(boxData);\n\t\t\tif (boxData.img != null) {\t\t\t\t\t\t\t\t\t\t\t//pic boxes\n\t\t\t\tvar pic = document.createElement(\"img\");\n\t\t\t\tpic.classList.add(\"picBox\");\n\t\t\t\tpic.src = BOX_PAT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the total number of counters for the podCounters object
function podCounterTotal($podCounters) { var answer = 0; if ($podCounters) { angular.forEach(["ready", "valid", "waiting", "error"], function (name) { var value = $podCounters[name] || 0; answer += value; }); } return answer; }
[ "function createPodCounters(selector, pods, outputPods, podLinkQuery, podLinkUrl) {\n if (outputPods === void 0) { outputPods = []; }\n if (podLinkQuery === void 0) { podLinkQuery = null; }\n if (podLinkUrl === void 0) { podLinkUrl = null; }\n if (!podLinkUrl) {\n podLinkUrl =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pokeSubmit submits a poke to the server, which submits it to the Pokees chan. Pokee is the ID of the user that is being poked.
function pokeSubmit(pokee) { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ url: '/poke', type: 'POST', data: {pokee: pokee}, error: function(data) { console.log("Something caught fire, probably server related!"); } }); ...
[ "function instanzMessagePoke()\n\t{\n\t\tvar instanz\t\t\t\t\t\t=\t$(\"input[name='instanzMsgPoke']:checked\").val();\n\t\tvar message \t\t\t\t\t=\t$('#instanzMessagePokeContent').val();\n\t\tvar mode\t\t\t\t\t\t=\t$('#instanzMode').hasClass(\"active\");\n\t\t\n\t\tif(message != '')\n\t\t{\n\t\t\tvar dataString \t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculating whether the placeholder should be hidden
placeholderHidden() { return !!(this.labels.length > 0 || this.value); }
[ "function IsHidden(){\n\treturn !_showGizmo;\n}//IsHidden", "handlePlaceholderVisibility() {\n if (!this.multiple)\n return;\n const e = this.choicesInstance.containerInner.element.querySelector(\n \"input.choices__input\"\n );\n this.placeholderText = e.placeholder ? e.placehold...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
On load 1) current movie details are posted to backend and saved inn database to store history 2) Load the video callback, when video ends, return to homepage 3) Add event listener for handling keyboard navigation
componentDidMount() { let { postHistoryActions, movie } = this.props; if (movie === null || movie === undefined || !movie.contents[0].url) { return null; } let historyData = { username: username, title: movie.title, description: movie.description, videoUrl: movie.contents[...
[ "function search_for_video() {\n\n\t// console.log(\"search clicked\\n\");\n\n\tvar new_link = search_bar_input.value;\n\tif (new_link.length !== 0) {\n\n\t\tvar data_sections = new_link.split(\"&\");\n\t\t// console.log(data_sections);\n\n\t\tvar time = \"\";\n\t\tvar playlist = \"\";\n\t\tvar playlist_index = \"\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the todo cards and populates them with the data from the API
function createCards(json) { // Get the container element for the todo cards const todoContainer = document.getElementById("todoContainer"); // Dynamically create one card for each todo object in the json data json.forEach(todo => { // Create the 'assigned to' card header var userId = document.createElement("s...
[ "function getToys() {\n fetch('http://localhost:3000/toys')\n .then(resp => resp.json())\n .then(toys => toys.forEach(toy => createToyCard(toy)))\n}", "function initCards() {\n let cards = [];\n //TODO: FIX\n for (let i = 0; i < count; i++) {\n cards.push(JSON.parse(localStorage.getItem(`cards-${i}`)));\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function: main Loads the story from the storage div, initializes macros and custom stylesheets, and displays the first passages of the story. Returns: nothing
function main() { tale = new Tale(); // process title, subtitle, author passages setPageElement('storyMenu', 'StoryMenu', ''); setPageElement('storyTitle', 'StoryTitle', 'Untitled Story'); setPageElement('storySubtitle', 'StorySubtitle', ''); setPageElement('storyAuthor', 'StoryAuthor', ''); if (tale.has(...
[ "static start() {\n\t\tconsole.log(\"Starting story.js...\");\n\t\tthis.loadJson(this.getJsonPath());\n\t\tUI.init();\n\t}", "function SimpleStoryCreator() {\n // ************************************************************\n // * All required lists *\n // **********...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw (visible) content items
function drawContentItems() { // Get current range var range = Canvas.Timescale.getRange(); drawContentItemsLoop(_contentItems, range, true); drawContentItemsLoop(_contentItems, range, false); }
[ "function drawContentItem(range, contentItem) {\r\n // Check if content item visible in current range\r\n if (contentItem.getBeginDate() >= range.begin || contentItem.getEndDate() <= range.end) {\r\n contentItem.draw();\r\n }\r\n }", "draw() {\n push();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Response to client asking to reveal fastest finger results.
showHostRevealFastestFingerResults(socket, data) { this.currentSocketEvent = 'showHostRevealFastestFingerResults'; Logger.logInfo(this.currentSocketEvent); // Nothing needs to be done here, as fastest finger grading happens on the fly. ServerState will // pass the results to the client. this.playSo...
[ "showHostRevealFastestFingerQuestionChoices(socket, data) {\n this.currentSocketEvent = 'showHostRevealFastestFingerQuestionChoices';\n Logger.logInfo(this.currentSocketEvent);\n\n this.serverState.fastestFingerQuestion.revealAllChoices();\n this.serverState.fastestFingerQuestion.markStartTime();\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes the selected items from the invoice (submits the entire page)
function removeItems() { if (checklocked() == false) { if ((remove_trade.length || remove_sale.length || remove_return.length) && confirm('Are you SURE you want to remove these items from the invoice?')) { var frm = document.remfrm; frm.remove_sale.value = remove_sale; frm.remove_trade.value = remove_tra...
[ "function clearSelection() {\n currentPizza = undefined;\n $('input[name=\"e-item\"]').prop('checked', false);\n $('input[name=\"psize\"]').prop('checked', false);\n $(\".lists-wrapper\").hide();\n\n currentBeverage = undefined;\n $('input[name=\"bsize\"]').prop('checked', ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
handler for selecting a phrase in the original text
function selectPhrase(editArea) { var startPos = editArea.selectionStart; var endPos = editArea.selectionEnd; var selPhrase = editArea.value.substring(startPos, endPos); var _phrase = document.getElementById('phrase'); if (_phrase) { _phrase.value = selPhrase; } ...
[ "phrase(phrase) {\n for (let map of this.facet(EditorState.phrases))\n if (Object.prototype.hasOwnProperty.call(map, phrase))\n return map[phrase];\n return phrase;\n }", "phrase(phrase) {\n for (let map of this.facet(dist_EditorState.phrases))\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maintain max lines in log
function maintainLogSize() { while ($scope.logs.length > MAX_LOG_SIZE) { $scope.logs.shift(); } }
[ "set maxLines(value) {}", "get maxLines() {}", "function changeLogLimit(obj){\n var digitRgx = /^\\d+$/;\n if (digitRgx.test(obj.val())){\n rendererData.logLimit = obj.val();\n if ($(\"#logContainer\").find(\".msg\").length > rendererData.logLimit){\n var tmpCnt = $(\"#logContaine...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION NAME : queryAutoDiscoveryLogs AUTHOR : kmmabignay DATE : March 12, 2014 MODIFIED BY : Cathyrine C. Bobis REVISION DATE : REVISION : DESCRIPTION : query for auto discovery logs PARAMETERS : filename,user,ip RETURN : data
function queryAutoDiscoveryLogs(fname,user,ip,pIp){ //var infoType = "XML"; if(globalInfoType == "XML"){ //var urlx = "/cgi-bin/Final/AutoCompleteCgiQuerry_withDb/querYCgi.fcgi"; var urlx = getURL("RM"); var queryS = "filename="+fname+"&user="+user+"&ip="+ip; }else{ var urlx = getURL("ConfigEditor2","JSON");...
[ "function queryLoggerData(starttime,endtime,doOnSuccess) {\n\tif(endtime!=\"now\")\n\t$.couch.db(\"dripline_logged_data\").view(\"log_access/all_logged_data\", {\n\t\tstartkey: starttime,\n\t\tendkey: endtime,\n\t\tsuccess: function(data) {\n\t\t\tdoOnSuccess(data); },\n\t\terror: function(data) {\n\t\t\tdocument.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the math node into a string, similar to innerText. Applies to MathDomNode's only.
toText() { // To avoid this, we would subclass documentFragment separately for // MathML, but polyfills for subclassing is expensive per PR 1469. // $FlowFixMe: Only works for ChildType = MathDomNode. const toText = child => child.toText(); return this.children.map(toText).join(...
[ "toNode() {\n if (this.character) {\n return document.createTextNode(this.character);\n } else {\n const node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", \"mspace\");\n node.setAttribute(\"width\", this.width + \"em\");\n return node;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create the necessary PredictionLink to predict each candidate from the other
function linkCandidates(predictor, predictee) { message("linking candidates " + predictor.getName().getName() + " and " + predictee.getName().getName() + "\r\n"); var frequencyCountA = predictor.getNumFrequencyEstimators(); var ratingCountA = predictor.getNumRatingEstimators(); var frequencyCount...
[ "function predictBotOrTrolls(msgs) {\n // console.debug('predictBotOrTrolls:', msgs.length, msgs)\n\n // Will keep predictions in order after async POST to web service\n let predictions = []\n msgs.forEach((msg, m) => {\n const data = {\n ups: msg.ups,\n score: msg.score,\n controversiality: m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints the List forward
printForward() { // Only if the list is not empty if (this.#head) { let current = this.#head; let output = ""; do { output += current.value; if (current.next != this.#head) output += " -> "; current...
[ "printList() {\n // First, let's check if the list is empty\n if(this.isEmpty()) {\n console.log(\"The list is empty!\")\n return;\n }\n // Let's start a runner at the beginning of the singly linked list itself\n var runner = this.head;\n // This strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates commonAncestorContainer and collapsed after boundary change
function updateCollapsedAndCommonAncestor(range) { range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset); range.commonAncestorContainer = range.collapsed ? range.startContainer : dom.getCommonAncestor(range.startContainer, range.endContainer); ...
[ "childrenChanged() {\n if (true === this.adjustGroupWhenChildrenChange) {\n this.adjustChildrenVertically();\n this.adjustChildrenHorizontally();\n }\n }", "adjustContentAreaPositionAndDimension() {\n if (isNull(this.frame)) {\n if (0 !== this._contentX1 ||...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
shows the parents of an clicked node
function showParents(){ // empty map, then fill it if(nodeParentMap.size === 0) createNodeParentMap(); // old menu open ? then close it if(document.getElementById('contextmenuParent')) closeContextMenuParent(); let nodeId= $(clickedNode).attr('id'); let parents = nodeParentMap.get(node...
[ "function showParent($node) {\n // just show only one superior level\n var $temp = $node.closest('table').closest('tr').siblings().removeClass('hidden');\n // just show only one line\n $temp.eq(2).children().slice(1, -1).addClass('hidden');\n // show parent node with animation\n var parent = $temp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unused harmony export getBanner
function getBanner(state) { return state.banner; }
[ "function d_Banner(objName) {\n\tthis.obj = objName;\n\tthis.aNodes = [];\n\tthis.currentBanner = 0;\n}", "function setupBanner(){\n\t\n\t/**\n\t * @constructor\n\t * @type {Banner}\n\t */\n\tbanner = new Banner({\n\t\tbanner: '#banner', // String identifying banner id\n\t\tbannerPreloader: '#bannerPreloader', //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This auxiliary function is used to change Hex number.
function changeHex(h, n){ h=(typeof(h) == "string") ? parseInt(h,16) : h; if((h == 0 && n < 0)||(h == 255 && n > 0)){n = 0} h += n; h = (h > 255) ? 255 : (h < 0) ? 0 : h; return (h <= 15) ? "0" + h.toString(16) : h.toString(16); }
[ "function Hex(n) {\n n=Math.round(n);\n if (n < 0) {\n n = 0xFFFFFFFF + n + 1;\n }\n return n.toString(16).toUpperCase();\n}", "function fixedHex(number, length)\n{\n var str = number.toString(16).toUpperCase();\n while(str.length < length) {\n str = \"0\" + str;\n }\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setzt die Daten dieses Scriptes in der Scriptdatenbank, die einen Datenaustausch zwischen den Scripten ermoeglicht optSet: Gesetzte Optionen (und Config)
function updateScriptDB(optSet) { // Eintrag ins Inhaltsverzeichnis... __DBTOC.versions[__DBMOD.name] = __DBMOD.version; // Permanente Speicherung der Eintraege... __DBMEM.setItem('__DBTOC.versions', JSON.stringify(__DBTOC.versions)); __DBMEM.setItem('__DBDATA.' + __DBMOD.name, JSON.stringify(optSe...
[ "function initScriptDB(optSet) {\n const __INFO = GM_info;\n const __META = __INFO.script;\n\n //console.log(__INFO);\n\n __DBTOC.versions = getValue(JSON.parse(__DBMEM.getItem('__DBTOC.versions')), { });\n\n // Infos zu diesem Script...\n __DBMOD.name = __META.name;\n __DBMOD.version = __META....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The purpose of this kata is to implement the undoRedo function. This function takes an object and returns an object that has these actions to be performed on the object passed as a parameter: set(key, value) Assigns the value to the key. If the key does not exist, creates it. get(key) Returns the value associated to th...
function undoRedo(object) { function undoRedo(object) { var prevObj = []; var n = 0; var clone = {}; for(var keyC in object) { clone[keyC] = object[keyC]; } prevObj.push(clone); return { set: function(key, value) { object[key] = value; var cloneSet = {}; fo...
[ "function Undoable() {\n\n // Contains the undo-redo pair...\n function memento(undo, redo) {\n this.undo = undo;\n this.redo = redo;\n };\n \n var undoStack = new Array();\n var redoStack = new Array();\n\n this.clear = function() {\n undoStack = new Array();\n redo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the max limit to add a choise is reached.
hasReachedMaxLimit (list, maxLimit) { return list && list.length === maxLimit; }
[ "moreQuestionsAvailable() {\n\treturn (this.progress.qAnswered < this.progress.qTotal);\n }", "isMax() {\n if(this.weaponType == this.weaponTypeMax) {\n return true;\n }\n }", "function HasExceededclicklimit(selector)\n {\n var limit = Getclicklimit(selector);\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configures file logging based on settings
function configureFileLogging () { var isEnabled = ('true' === process.env.LOGGING_FILE_ACTIVE) // mandatory envVar , logsPath = process.env.LOGGING_FILE_PATH || 'logs/' , logFile = process.env.LOGGING_FILE_FILENAME || 'node.log' , logFilename = path.normalize(path.join(logsPath, logFile)) ...
[ "function configureLog() {\n\t\n\t/**\n\t * create log file path\n\t */\n\tvar logdir = path.join(__dirname, 'logs');\n\n\tif (!fs.existsSync(logdir)){\n\t fs.mkdirSync(logdir);\n\t}else {\n\t\t/**\n\t\t * Delete previous log files\n\t\t */\n\t\ttry {\n\t\t\tfs.unlinkSync(path.join(__dirname, 'logs/webapp.log'))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given two numbers, return true if the sum of both numbers is less than 100. Otherwise return false.
function lessThan100(num1, num2) { if (num1 + num2 < 100) { return true } return false }
[ "function checkNumbers(a, b) {\n if (a === 50 || b === 50 || a + b === 50) return true;\n}", "function checkTwoGivenIntegers(int1, int2) {\n let sum = 50\n if ((sum === int1 + int2) || ((int1 === 50) || (int2 === 50))) {\n return true\n } else {\n return false\n }\n}", "function check...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show or Hide Work Experience View Sub Div
function showHideWorkExperienceRoleDiv(){ if(document.getElementById('empExperienceMenuViewId').checked==true){ document.getElementById('workExperienceMenuSubTableDivId').style.display = "block"; }else{ document.getElementById('workExperienceMenuSubTableDivId').style.display = "none"; } }
[ "function showHideEducationRoleDiv(){ \n\tif(document.getElementById('educationMenuViewId').checked==true){\n\t\tdocument.getElementById('educationMenuSubTableDivId').style.display = \"block\";\n\t}else{\n\t\tdocument.getElementById('educationMenuSubTableDivId').style.display = \"none\";\n\t}\n}", "function alter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCION DE REGISTRAR CAUSA
function registrar_causa(codigo_causa_mant, descr_causa_mant) { let user = obtener_user(); let codigo_causa_mant2 = codigo_causa_mant.toUpperCase().trim(); let descr_causa_mant2 = descr_causa_mant; $.ajax({ type: 'POST', url: url + '/GestionProyectos/public/index.php/regi_caus', ...
[ "function comprobarAlias(a) {\n var contAlias = a.value;\n var expresionAlias = /^[A-Z,a-z,0-9]{3,14}$/;\n\n if(comprobarExpresion(a, expresionAlias)==true){\n validado[1] = true;\n if(debug){\n console.log(\"Validado 1=> \"+validado[1]);\n }\n }\n}", "function validaCl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Il permet de reconfigurer un item variant provenant d'un configurateur.
reconfigurer_item_variant(cdt, cdn) { var me = this; //Si un code à été saisit if (locals[cdt][cdn] && locals[cdt][cdn].item_code) { var soi = locals[cdt][cdn]; //Trouver le modele de l'item frappe.call({ method: "frappe.client.get_value", args: { "doctype": "Item", ...
[ "create_item_variant(cdt, cdn, validate_attributes) {\r\n\t\tvar me = this;\r\n\t\t//Si un code à été saisit\r\n\t\tif (locals[cdt][cdn] && locals[cdt][cdn].template) {\r\n\r\n\t\t\tvar soi = locals[cdt][cdn];\r\n\r\n\t\t\t//Lancer le call\r\n\t\t\tfrappe.call({\r\n\t\t\t\tmethod: \"radplusplus.radplusplus.controll...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
callback when create track button is clicked.
function createTrackClicked(track_element) { // Set the current track to active track_element.create_track_button.hidden = true; track_element.midi_options.hidden = false; track_element.pattern_chain.hidden = false; // and create a new track stub createTrack(); }
[ "function elemAddTrackButton(track_element) {\n var create_track_button = document.createElement(\"button\");\n create_track_button.id = \"track_create_\" + track_element.track_num;\n create_track_button.textContent = \"Create New Track\";\n create_track_button.onclick = () => createTrackClicked(track_e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col);
PrimRectUV(a, b, uv_a, uv_b, col) { this.native.PrimRectUV(a, b, uv_a, uv_b, col); }
[ "AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left) {\r\n this.native.AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left);\r\n }", "AddImage(user_texture_id, a, b, uv_a = ImVec2.ZERO, uv_b = ImVec2.UNIT, col = 0xFFFFFFFF) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the given object is an instance of Key. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Key.__pulumiType; }
[ "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === KeySigningKey.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FORM VALIDATION SCRIPTS function to get cookie by key
function getCookie(key) { var regexp = new RegExp("(?:^" + key + "|;\s*"+ key + ")=(.*?)(?:;|$)", "g"); var result = regexp.exec(document.cookie); return (result === null) ? null : result[1]; }
[ "function get_cookie(request){\n console.log(request.headers.get('Cookie'));\n if (request.headers.get('Cookie')) {\n const pattern = new RegExp('variant=([10])');\n let match = request.headers.get('Cookie').match(pattern);\n if (match) { \n return match[1]; \n }\n }\n return null\n}", "stati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up direct image editing implementation for a component with one image property.
function setupCommonDirectImageEditing(prototype, property, areafunction, sizefunction, isScalingFunction) { // implementation for IDirectImageEdit prototype.getImagePropertyPaths = function(instance) { return [ property ]; } // implementation for IDirectImageEdit prototype.getImageBounds = function(in...
[ "function ciniki_writingcatalog_images() {\n this.webFlags = {\n '1':{'name':'Visible'},\n };\n this.init = function() {\n //\n // The panel to display the edit form\n //\n this.edit = new M.panel('Edit Image',\n 'ciniki_writingcatalog_images', 'edit',\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the Position for the Dialog
function setDialogInPos(posEl){ var size = getSize(posEl); posEl.style.left = x - (size.width/2); posEl.style.top = y - (size.height); posEl.classList.add("is-shown") }
[ "function SetControlWinPosition(position : Vector2){\n\t_controlWinPosition = position;\n}//SetControlWinPosition", "function setMenuLocation() {\n\t\tlet menu = ActiveItem.element.getBoundingClientRect();\n\t\t\n\t\tlet x = menu.left + menu.width + 8;\n\t\tlet y = menu.top;\n\t\t\n\t\tctrColor.propMenu.style.lef...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
shown if any bulk could not be saved
function show_bulk_error() { var err = {}; err[that.form.entity_name] = { __all__: ["Some " + that.form.entity_name + " (in red below) could not be saved. To correct errors and try saving them again - open a new add form"] }; that.form....
[ "function giveSaveBtnFeedback() {\n if ($newSetNameInput.classList.contains('invalid-input')) {\n $saveSetBtn.classList.add('invalid');\n $saveSetBtn.title = 'Invalid Set Name';\n }\n else if (currentSet.ids.length === 0) {\n $saveSetBtn.classList.add('invalid')...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This parseJson function takes a json file and extract the alertId, alertType, assetId, siteId, comments, and statusType. Then connect to a database and: If the alertId does not exist in the database and the statusType is 'Initiate', insert it with the fields listed above. If the alertId is already in the database and t...
function parseJson (inJson) { var alertId = inJson['alert']['id']; var alertType = inJson['alert']['alertDefinition']['alertType']['name']; var assetId = 'TEST_ASSET_ID'; var siteId = inJson['alert']['alertDefinition']['locationId']; var comments = inJson['alert']['alertComments'][0]['alertComment'...
[ "function handleFile(err, data){\n if(err){\n console.log(err);\n }\n\n obj = JSON.parse(data);\n console.log(\"JSON FILE: \"+ obj.main.temp);\n }", "function handleJson(rawData) {\r\n\tparsed = JSON.parse(rawData).data;\r\n\tsortIOSAndroid(parsed);\r\n\tparsedIOS.forEach(app => {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
region Sucessful responses Responds as Accepted with status code 202 and optional data.
accepted(res, data) { this.send(res, data, 202); }
[ "static getSuccessCodes() {\n return [\n 200\n ];\n }", "ensureSuccessStatusCode() { \n if (!this.isSuccessStatusCode) {\n throw new Error(`Request didn't finished with success. Status code: ${this.statusCode}. Reason phrase: ${this.reasonPhrase}`);\n } \n }", "ok(res, da...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates product prices based on line item quantities.
function calculateProductPrices (basket) { // iterate all product line items of the basket and set prices var productLineItems = basket.getAllProductLineItems().iterator(); while (productLineItems.hasNext()) { var productLineItem = productLineItems.next(); var product = productLineItem.prod...
[ "function RefreshCost()\n{\n var TotalQuantity = 0;\n var Total = 0;\n var ThisItemTotal = 0;\n var LineCostItterator = document.getElementsByTagName(\"input\");\n for(var itt=0;itt<LineCostItterator.length;itt++)\n {\n // check if the ID starts with LINECOST\n if(LineCostItterator[itt].id.indexOf('L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
moved here to simplifiy dependencies (GHC.List) data Maybe a = Nothing | Just a deriving (Eq, Ord)
function Maybe(){}
[ "function maybe_5(xs) /* forall<a> (xs : list<a>) -> maybe<a> */ {\n return (xs == null) ? Nothing : Just(xs.head);\n}", "function Maybe(value){ \n this.value = value;\n }", "function maybe_3(m, nothing) /* forall<a> (m : maybe<a>, nothing : a) -> a */ {\n return $default(m, nothing);\n}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The world object contains abstract data about the world. This is essentially a singleton object that provides organization and access for other objects. World generation will likely go here if we decide to procedurally generate dungeons. / Constructor for the region (map)
function World() { var i; /* These are all the data arrays indexed by world location. * The default world is 1260x756 */ this.dirty = true; this.grid = [[],[]] /* Holds the 'symbol' for the world tile */ this.gridcol = [[],[]]; /* Holds the color assigned to the tile */ this.gridheight = [[],[]]; /*...
[ "constructor() {\n this.worldObjects = new Map();\n this.transform = mat4.create();\n }", "init() {\n this.worldMap.parseMap();\n }", "load () {\n this.world = new window.World(this.game.ressources['map'])\n }", "function worldly(world) {\n if (!exports.Worlds[world.name]) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unique user email checking
async uniqueEmail(email){ let user=await dao.find(this.USERS,{email: email}) if(user.length) return false return true }
[ "async ensureUnique () {\n\t\tconst user = await this.data.users.getOneByQuery(\n\t\t\t{\n\t\t\t\tsearchableEmail: decodeURIComponent(this.request.body.toEmail).toLowerCase()\n\t\t\t},\n\t\t\t{\n\t\t\t\thint: UserIndexes.bySearchableEmail\n\t\t\t}\n\t\t);\n\t\tif (user) {\n\t\t\tthrow this.errorHandler.error('email...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register a listener that will be used to analize each action dispatched by asking for the 'action' property inside the payload and comparing it with the action provided here. If the payload itself is the action it will also match properly. See listenTo for docs on the other arguments.
listenToAction(action, handler, deferExecution) { this.listenTo('action', action, handler, deferExecution); }
[ "listenToMatchingAction (matcher, handler, deferExecution) {\n this._actionListeners.push({matcher, handler, deferExecution});\n }", "listenTo(actionKey, action, handler, deferExecution) {\n var actionListener = {actionKey, action, handler, deferExecution};\n validateActionListener(actionListener);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the AWS CloudFormation properties of an `AWS::AppMesh::Route.HttpRouteHeader` resource
function cfnRouteHttpRouteHeaderPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnRoute_HttpRouteHeaderPropertyValidator(properties).assertSuccess(); return { Invert: cdk.booleanToCloudFormation(properties.invert), Match: cfnRouteHe...
[ "function cfnGatewayRouteHttpGatewayRouteHeaderPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnGatewayRoute_HttpGatewayRouteHeaderPropertyValidator(properties).assertSuccess();\n return {\n Invert: cdk.booleanToCloudFormation(proper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run all listsOprions methods and store them to this.lists
async buildLists () { console.log('Build Lists started') for ( const listOptions of this.listsOptions ) { const methodName = `Building ${listOptions.name}` console.time(methodName) const builtList = await listOptions.buildMethod() // Run the build met...
[ "function buildList() {\n $log.debug(\"Building list...\");\n vm.list = Object.keys(queryFields); //get the keys\n vm.definitions = queryFields;\n $log.debug(vm.definitions);\n }", "function mainLists() {\n\t$('ul.lists .toolEdit a').bind(\"click\", function () {\n\t\tvar s = $(this).closest('.s');\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts an ArrayBuffer to a base64 string and makes an image from that
static arrayBufferToImage(data) { var byteStr = ''; var bytes = new Uint8Array(data); var len = bytes.byteLength; for (var i = 0; i < len; i++) byteStr += String.fromCharCode(bytes[i]); var base64Image = window.btoa(byteStr); var str = 'data:image/png;base64,' + base64Image; var img = new Image(); i...
[ "static byteArrayToImage(data)\n\t{\n\t\tvar byteStr = '';\n\t\tvar bytes = new Uint8Array(data.arraybytes);\n\t\tvar len = bytes.byteLength;\n\t\tfor (var i = 0; i < len; i++)\n\t\t{\n\t\t\tbyteStr += String.fromCharCode(bytes[i]);\n\t\t}\n\t\tvar base64Image = window.btoa(byteStr);\n\t\tvar str = 'data:image/png;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method(` Creates a WithNestedExpression from the given nestedCompiledExpression and adds it to the current assertionExpression. `)
addWithNestedExpression({ nestedValueGetter: nestedValueGetter, nestedCompiledExpression: nestedCompiledExpression }) { const withNestedExpression = WithNestedExpression.new({ nestedValueGetter: nestedValueGetter, nestedCompiledExpression: nestedCompiledExpression, })...
[ "addWithEachExpression({ eachCompiledExpression: eachCompiledExpression }) {\n const withEachExpression = WithEachExpression.new({\n eachCompiledExpression: eachCompiledExpression\n })\n\n this.addAssertion({ assertion: withEachExpression })\n }", "function translateNested2(x){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses a string into an AST
parse(string) { this._string = string; this._tokenizer.init(string); // Prime the tokenizer to obtain the first // token which is our lookahead. The lookahead is // used for predictive parsing. this._lookahead = this._tokenizer.getNextToken(); return this.Program(); }
[ "function parse_StringExpr(){\n\tdocument.getElementById(\"tree\").value += \"PARSER: parse_StringExpr()\" + '\\n';\n\tCSTREE.addNode('StringExpr', 'branch');\n\t\n\tmatchSpecChars(' \"',parseCounter);\n\t\n\tparseCounter = parseCounter + 1;\n\t\n\tparse_CharList();\n\n\t\n\tmatchSpecChars(' \"',parseCounter);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new db proxy to this cluster.
addProxy(id, options) { return new proxy_1.DatabaseProxy(this, id, { proxyTarget: proxy_1.ProxyTarget.fromCluster(this), ...options, }); }
[ "function register_proxy (uri, succeed, fail)\n{\n var options = url.parse(url.resolve(base, uri));\n \n test_host(options.hostname, \n function () {\n // local host so use local thing\n var thing = registry[options.href];\n \n if (thing)\n succeed(thing.thing);\n else // not y...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set listeners on given date input
function setListenersDate(element){ element.addEventListener("focus", function(){eventFocusOnDate(element);}); element.addEventListener("blur", function(event){eventLostFocusOnDate(element, event);}); element.addEventListener("keyup", function(){eventKeyUp(element);}); }
[ "function setDateHandlers(field){\n \n $(field).on({\n \n // On focus...\n \n 'focus': function(event){\n \n // Remove validation\n \n $(this).removeClass('invalid');\n \n // Show date picker if not shown already\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION: extPart.getInsertString DESCRIPTION: Get the text to be inserted for at a given location ARGUMENTS: groupName ext data group filename partName ext data participant filename paramObj insertLocation RETURNS: array of strings to be inserted at the given location
function extPart_getInsertString(groupName, partName, paramObj, insertLocation) { var retVal = ""; if (!insertLocation || extPart.getLocation(partName).indexOf(insertLocation) == 0) { var paramArray = extPart.expandParameterObject(groupName, partName, paramObj); for (var i=0; i < paramArray.length; i++) {...
[ "function extGroup_getInsertStrings(groupName, paramObj, insertLocation)\n{\n var retVal = new Array();\n var partNames = extGroup.getParticipantNames(groupName);\n for (var i=0; i < partNames.length; i++)\n {\n theStr = extPart.getInsertString(groupName, partNames[i], paramObj, insertLocation);\n if (the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets specific listing by listing id
static async getListing(id) { const result = await db.query( `SELECT id, host_username, title, description, price FROM listings WHERE id = $1`, [id] ); let listing = result.rows[0]; return listing; }
[ "getListing(id, callback) {\n $.ajax({\n type: 'GET',\n url: `/listings${id}`,\n dataType: 'json',\n success: function(data) {\n callback(data);\n },\n error: function(err) {\n console.log('Could not retrieve listing: ', err);\n }\n });\n }", "one(id) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the next guess should be a lower or higher number
function lowerOrHigher(){ if(gameData.playersGuess > gameData.winningNumber){ return "Your guess is too high "; } else if (gameData.playersGuess < gameData.winningNumber){ return "Your guess is too low "; } }
[ "function rangeCheck(){\n\tvar num;\n\n\tif(Math.abs(gameData.winningNumber - gameData.playersGuess) > 50){\n\t\treturn \"and more than 50 digits away from the winning number.\";\n\t} else {\n\t\tif(Math.abs(gameData.winningNumber - gameData.playersGuess) <= 5){\n\t\t\tnum = 5;\n\t\t} else if(Math.abs(gameData.winn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the hashed struct for %%value%% using %%types%% and %%name%%.
static hashStruct(name, types, value) { return TypedDataEncoder.from(types).hashStruct(name, value); }
[ "hashStruct(name, value) {\n return (0, index_js_2.keccak256)(this.encodeData(name, value));\n }", "static hash(domain, types, value) {\n return (0, index_js_2.keccak256)(TypedDataEncoder.encode(domain, types, value));\n }", "function hashMember(name, value, configuration) {\n if (ok(va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hide create request container
function HideCreateRequestContainer() { selectedGraphics = null; map.infoWindow.hide(); map.getLayer(tempGraphicLayer).clear(); dojo.byId('divCreateRequestContainer').style.display = "none"; if (dojo.byId("divSubmitRequestContainer")) { dojo.destroy(dojo.byId("divSubmitRequestContainer")); ...
[ "constructor() {\n super();\n this.isContainer = false;\n }", "createContainer() {\n const existingContainer = document.querySelector('#bitski-dialog-container');\n if (existingContainer) {\n return existingContainer;\n }\n const container = document.createElement('di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs a function for side effects on the payload, only if the result is Ok.
function okDo(f) { return function (result) { if (isOk(result)) { f(result.ok); } return result; }; }
[ "function Action(event, next, fail){\n return function(err, data){\n if(err) return fail(err);\n event.data = data;\n next();\n }\n}", "function execute_application(fun, args, succeed, fail) {\n if (is_primitive_function(fun)) {\n succeed(apply_primitive_function(fun, args), fail);\n } e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delete button look through the new STATE called usersInDanger and finds where userID() matches id
function deleteUser(id) { // if it is NOT the same id return a list of all the users without that ID const updatedUsers_forDelete = usersInDanger_resc.filter(user => user.userID !== id); const deletedUser = usersInDanger_resc.filter(user => user.userID === id); setUsersInDanger_resc(upda...
[ "function deleteUserid(ev)\n{\n var iu = this.id.substring(\"delete\".length);\n var userid = document.getElementById('User' + iu).value;\n if (debug.toLowerCase() == 'y')\n {\n alert(\"Users.js: deleteUserid: {\\\"user name\\\"=\" + userid + \"}\");\n }\n var ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Este metodo renderiza todas las skills del usuario que fue seleccionado con el metodo "SelectCard()" y despliega el componente Skill en relacion con la cantidad que se haya encontrado en la base de datos.
renderSkils() { var me = this; const movieItems = []; (this.state.Skills[this.state.currentUser] && Object.keys(this.state.Skills[this.state.currentUser]).map((i) => { return (movieItems.push(<Skill type={i} amount={this.state.Skills[this.state.currentUser][i]} key={i} />)); ...
[ "function renderSelectedSkills() {\n // Get div\n let selected = document.getElementById(\"selected-skills\");\n \n // Clear old skills\n while (selected.firstChild) {\n selected.removeChild(selected.firstChild);\n }\n\n // Create the skill name text and dropdown selector for each selected skill\n for(le...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Here we are calling the discord api using the UrlFetchApp to send request with all the data The discord API can also take 'WEBHOOK' url as authentication rahter than access tokens This makes it extremely user friendly to use and execute The discord API takes the webhook url and 'params' Here, the params is the paramete...
function postMessageToDiscord(length,naam,discord,file) { //updating sharing options to be accessible anywhere outside and setting its permission as 'VIEW' can also change to 'EDIT' if you'd like file.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.VIEW); /* * this is the webhook url generated from d...
[ "function sendImage(date, id) {\n let year = date.getFullYear()\n let month = date.getMonth() + 1\n let day = date.getDate()\n //load the page\n request({\n uri: \"http://www.gocomics.com/calvinandhobbes/\" + year + \"/\" + month + \"/\" + day,\n }, function(error, response, body) {\n let $ = cheerio.lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
polyvecAdd adds two vectors of polynomials.
function polyvecAdd(a, b, paramsK) { var c = new Array(3); for (var i = 0; i < paramsK; i++) { c[i] = polyAdd(a[i], b[i]); } return c; }
[ "function polyAdd(a, b) {\r\n var c = new Array(384);\r\n for (var i = 0; i < paramsN; i++) {\r\n c[i] = a[i] + b[i];\r\n }\r\n return c;\r\n}", "static vAdd(a,b) { return newVec(a.x+b.x,a.y+b.y,a.z+b.z); }", "static Add(vector1, vector2) {\n return new Vector4(vector1.x, vector1.y, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calling the stacks ApI to get the questions
function callStackAPI() { $.ajax({ url: urlStack, method: "GET" }).then(function (response) { for (var i = 0; i < 5; i++) { var qstnObject = {}; var keywordURL = ""; var keywordTitle = ""; qstnObject.keywordURL = response.items[i].link; ...
[ "function getQuestion() {\n \n \n }", "function getQuestions() {\r\n\r\n\tclient = new XMLHttpRequest();\r\n\tclient.open('GET','http://developer.cege.ucl.ac.uk:30288/getquestions');\r\n\tclient.onreadystatechange = questionResponse;\r\n\tclient.send();\r\n}", "function fetchQuestions() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute the last step in a traversal that ends with an HTTP GET. This is similar to lib/transforms/fetch_resource.js refactoring potential?
function fetchLastResource(t, callback) { // always check for aborted before doing an HTTP request if (t.aborted) { return abortTraversal.callCallbackOnAbort(t); } httpRequests.fetchResource(t, function(err, t) { log.debug('fetchResource returned (fetchLastResource).'); if (err) { if (!err.abo...
[ "step() {\n const instruction = this.fetch();\n return this.execute(instruction);\n }", "function visitNextPage() {\n\t var _url = _this.visitableList.pop();\n\t\tvar getPage = request(_url, function(error, response, body){\n\t\t\t_this.totalVisit += 1;\n\t\t\tif(_this.toVisit>0 && _this.totalVis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether we should try to autoFill.
get _shouldAutofill() { // First of all, check for the autoFill pref. if (!Prefs.autofill) return false; if (!this._searchTokens.length == 1) return false; // autoFill can only cope with history or bookmarks entries. if (!this.hasBehavior("history") && !this.hasBehavior("bookma...
[ "checkUnrecognizedAutoFill() {\n if (this.state.username !== \"\" || this.state.password !== \"\") {\n return false;\n }\n let username = this.props.testBlankUsername\n ? this.props.testBlankUsername\n : this.usernameField.value;\n let password = this.props.testBlankPassword\n ? this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check to see if either player is blocking
function checkForBlocking(p1Action, p2Action) { // Since the player with the most stamina will set the current actionCount we // need to see which ones has less or if they're equal. If one has less stamina then // we'll set up which block they chose. (i.e. punch-blocking, low-lick-blocking, high-kick-blocking) if(p...
[ "is_blocker() {\n return true;\n }", "is_blocker() {\n return false;\n }", "playerWins(){ // i2 - put inline\n\t\tif (this.player === activePlayer && playing === false) {\n\t\t\treturn true;\n\t\t}\t}", "canSeePlayer(){\n\t\t//enemy should act like it doesn't know where the player is if th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert alert object (for watchdog) to string
function formatWatchdog(alert) { return getTimestampString((new Date()).toISOString()) + ' ' + '[' + getTimestampString(alert.startsAt) + '] ' + '(' + alert.status + ') ' + alert.alertname; }
[ "function createAlert_return(alert, textAlert) {\n var result = \"<div class=\\\"col-md-12\\\"><div class=\\\"alert alert-\" + alert + \"\\\">\"\n + \"<button aria-hidden=\\\"true\\\" data-dismiss=\\\"alert\\\" class=\\\"close\\\" type=\\\"buttonn\\\">&times;</button><p>\" + textAlert + \"</p></div></div>\";\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
presents the question based on which questions has been asked also writes the number of the question (Question 1, Question 2, etc.)
function presentQuestions(){ if (questionsAsked == 0){ document.getElementById("ask").innerHTML = questions[0]; document.getElementById("qnumber").innerText = questionsAsked + 1 } else if (questionsAsked < questions.length) { document.getElementById("ask").innerHTML = questions[questionsAsked]; document.ge...
[ "function nextQuestion(){\n deleteButton(buttonDiv);\n deleteButton(questionTitle);\n if (q !== questions.length - 1){\n q++;\n showNextQA();\n } else {\n finalScore();\n deleteButton(buttonDiv);\n deleteButton(questionTitle);\n }\n}", "function renderQuestion() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function creates and updates the tags and tagData props in the state to reflect the results in the objectList param
updateTags(objectList) { let self = this; const newTags = []; const newTagData = {}; for (let i = 0; i < objectList.length; i++) { const data = [objectList[i].Culture, objectList[i].Medium, objectList[i].Classification]; // New tags dynamically created from objects' culture, medium, and classifica...
[ "updateTagAll(value) {\n\t\tlet items = this.state.items;\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i].tag = value;\n\t\t}\n\t\tthis.setState({\n\t\t\ttagAll: value,\n\t\t\titems: items\n\t\t})\n\t}", "function generateTags(tagsObj){\r\n\tvar tags = tagsObj.photo.tags.tag;\r\n\tvar htmlBlock = '<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checkbox with no label (say, has to fit vertically & horizontally) helper
isThisCheckboxLabeless() { return this.type==='checkbox' && typeof this.label==="undefined"; }
[ "function renderCheckbox(val) {\n var checkedImg = '/bundles/netresearchtimetracker/js/ext-js/resources/themes/images/default/menu/checked.gif';\n var uncheckedImg = '/bundles/netresearchtimetracker/js/ext-js/resources/themes/images/default/menu/unchecked.gif';\n var result = '<div style=\"text-align:cente...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
handles click on tile FINISH
function handle_click(){ // which tile? var tile = $(this); // don't do anything if just clicked or already matched if (tile.hasClass('active') || tile.hasClass('matched')) { // we're done return false; } // keep track of number of clicks num_clicks++; //activate tile activate_tile(tile...
[ "function doTileExit() {\n\tremoveEventListeners();\n\tif (verboseDebugging){\n\t\tconsole.log(\"in doTileExit debugging\");\n\t\tconsole.log(\"this is good\");\n\t}\n\tmessageDiv.style.display = \"none\";\n\tpasswordDiv.style.display = \"none\";\n\n\t//make sure to return repromptPassword flag to default if change...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
clears compvared rows iterating through rows and columns to check whether any 0 is present
function clearRows() { var toBeCleared = []; for (var row = 0; row < grid.length; row++) { var withEmptySpace = false; for (var col = 0; col < grid[row].length; col++) { if (grid[row][col] === 0) { withEmptySpace = true; } } if (!withEmptySpace) { toBeCl...
[ "function RowClear(_board, _x, _numToCheck)\n{\n for (let i = 0; i < MBS; i++)\n {\n if(_board[_x][i] == _numToCheck)\n {\n return false;\n }\n }\n return true;\n}", "function clearCells() {\n\tfor(i = 0; i < maxRow; i++) {\n\t\tfor(j = 0; j < maxCol; j++) {\n\t\t\tcell...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set size of the tabs container
function setSize(container) { var opts = $.data(container, 'tabs').options; var cc = $(container); if (opts.fit == true){ var p = cc.parent(); opts.width = p.width(); opts.height = p.height(); } cc.width(opts.width).height(opts.height); var header = $('>div.tabs-header', container); ...
[ "resizeTabContents() {\n let change = $(`#pcm-tabbedPandas`).height() - this.tabNavHeight;\n if (change !== 0 && this.tabContentsHeight > 0) { $('#pcm-pandaTabContents .pcm-tabs').height(`${this.tabContentsHeight - change}px`); }\n if (MyPandaUI !== null) MyPandaUI.innerHeight = window.innerHeight;\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CINDEX[] Copy the INDEXed element to the top of the stack 0x25
function CINDEX(state) { var stack = state.stack; var k = stack.pop(); if (exports.DEBUG) { console.log(state.step, 'CINDEX[]', k); } // In case of k == 1, it copies the last element after popping // thus stack.length - k. stack.push(stack[stack.length - k]); }
[ "getVariable(index) {\n const depth = this.getLocalDepth(index); // depth of the local in the stack.\n const memoryOffset = this.getMemoryOffset(depth); // actual depth in BF memory.\n const size = this.sizeOfVal(index); // how many byes to copy.\n const type = this.typeOfVal(index);\n\n for (let i =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
oddsSmallerThan(n): receives a number n returns the number of ODD numbers smaller than n e.g. oddsSmallerThan(7) > 3 oddsSmallerThan(15) > 7
function oddsSmallerThan(n) { // Your code here return parseInt(n /2) }
[ "function randomOddSmallers (limit, min, max) {\n function getRandomInt (min, max) {\n min = Math.ceil(min)\n max = Math.floor(max)\n return Math.floor(Math.random() * (max - min + 1)) + min\n }\n var random = getRandomInt(min, max)\n if (random > 40) {\n limit = (limit % 2 === 0) ? (limit + 1) : li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a image path imgPath, return [ name, ext ].
function pathToNameExt(imgPath) { const typeDelimIndex = imgPath.lastIndexOf(TYPE_DELIM); const ext = imgPath.substr(typeDelimIndex + 1); const name = path.basename(imgPath.substr(0, typeDelimIndex)); return [name, ext]; }
[ "function GetImageExtension(image) {\n var partsOfImageName = image.name.split(\".\");\n var extension = (partsOfImageName.length > 1) ? partsOfImageName[partsOfImageName.length - 1] : \"jpg\";\n return extension;\n}", "function productNameFromImagePath(imagePath) {\n\t// This is the full filename, ex:\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Responding to the dropdown. The displayed list will contain the queues with the same businessdomain and applicationname.
function selectQueue() { if (vm.selecteditem === null) return; var myitem; for (var i =0 ; i, vm.queues.length ; i++) { if (vm.queues[i].name === vm.selecteditem) { vm.selectedservapp = vm.que...
[ "getQueueNames() {\n return Object.keys(this.queues);\n }", "get queues() {\n return Object.keys(this._queues).map(name => this._queues[name]);\n }", "updatePublishableBatches()\n {\n while (this.custom_queue.batch_sel.firstChild) {\n this.custom_queue.batch_sel.removeChild(this.custom_queue.ba...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
load model info on airplanes that matches the model ID
function loadAirplaneModelOwnerInfoByModelId(modelId) { var airlineId = activeAirline.id $.ajax({ type: 'GET', url: "airlines/"+ airlineId + "/airplanes/model/" + modelId, contentType: 'application/json; charset=utf-8', dataType: 'json', async: false, success: function(result) { ...
[ "function loadAirplaneModelOwnerInfo() {\r\n\tvar airlineId = activeAirline.id\r\n\tloadedModelsOwnerInfo = []\r\n\t$.ajax({\r\n\t\ttype: 'GET',\r\n\t\turl: \"airlines/\"+ airlineId + \"/airplanes?simpleResult=true&groupedResult=true\",\r\n\t contentType: 'application/json; charset=utf-8',\r\n\t dataType: 'js...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the login page, with a prompt to go Back to the page specified by the given page selector.
function showLoginPage(backPageSelector, retryCallback) { setWindowTitle(Messages.getMessage('reactions_widget__title_signin')); var options = { element: pageContainer(ractive), groupSettings: groupSettings, goBack: function() { setWindowTitle(Messages...
[ "function gotoLoginPage() {\n var url = $location.$$url;\n if ($location.$$path !== \"/login\") {\n $location.path(\"/login\").search({from: url});\n }\n }", "function browsePage (cat) {\n pref.browse = cat;\n storePref();\n window.location.href = '....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notifies all feature listeners about the addition of a new feature.
notifyFeatureListeners(feature) { this.featureListeners.forEach(function (callback) { callback(feature); }); }
[ "addFeatureListener(callback) {\n this.featureListeners.push(callback);\n }", "processNewFeature(newFeature) {\n //Notify listeners\n this.notifyFeatureListeners(newFeature);\n //Get corresponding old version of the feature\n le...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run nyc and AVA, then generate an lcov.info.
async function runCoverage() { // If cowboyhat is already running skip. if (locked) { return } locked = true // Await coverage and testing. await new Promise((resolve) => { spawn( 'node_modules/.bin/nyc', nycOptions...
[ "function main() {\n console.log(`testing ngtools API...`);\n\n Promise.resolve()\n .then(() => codeGenTest())\n .then(() => i18nTest())\n .then(() => lazyRoutesTest())\n .then(() => {\n console.log('All done!');\n process.exit(0);\n })\n .catch((err) => {\n cons...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }