query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
store new Addresses to localStorage and state | function changeAddresses(newAddresses) {
localStorage.setItem('addresses', JSON.stringify(newAddresses));
setAddresses(JSON.parse(localStorage.getItem('addresses')));
} | [
"function saveAddress(newAddress){\n if(localStorageEnabled()){\n localStorage.setItem(LISK_CONFIG_ADDRESS, newAddress);\n }\n}",
"function saveAddressToLocalStorage(key, value) {\n localStorage.setItem(key, value);\n}",
"function sendaddress(){\n localStorage.setItem(\"address\",address);\n}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the google spreadsheet values | function get_values() {
// Manual upload data
gapi.client.sheets.spreadsheets.values.get({
spreadsheetId: '1o_o4vil2VPIjO_XEECPz9yz3IAImEd8R1l9GQZkEeUY',
range: 'Manual Upload'
}).then(function (response) {
var manual_data = JSON.parse(response.body).values;
// Web-scraped data
gapi.client.sh... | [
"function getSheetValues() {\n var values = toWorksheet.getDataRange().getValues();\n return values;\n}",
"function fetchFromGoogle() {\n gapi.client.sheets.spreadsheets.values.get({\n spreadsheetId: '1vXopIhDPoF6nHQ9yAOBZzlT0NR5CmRVozPk6Ev0IfVs',\n range: 'Form Responses 1!A2:AD',\n }).then(function(re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns projected points from array of points | calcProjectionCoords(points) {
const projection = this.projection();
return (points.map(point => {
if ('geometry' in point) {
return (projection(point.geometry.coordinates))
}
return (projection(point.coordinates))
})
)
} | [
"function multiPointToGeo(points) {\n return $array.map(points, function (point) {\n return pointToGeo(point);\n });\n}",
"function multiPointToGeo(points) {\n return _core_utils_Array__WEBPACK_IMPORTED_MODULE_0__[\"map\"](points, function (point) {\n return pointToGeo(point);\n });\n}",
"func... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
just show index finger tips | function showIndexFingers(frame) {
var hands = frame.hands;
// iterate over all hands
for (var i = 0; i < hands.length; i++) {
// get the index finger
var hand = hands[i];
var finger = hand.indexFinger;
// draw it
var name = hand.type; // left or right
drawTip(finger, name);
// sa... | [
"function ShowTip(idx)\r\n{\r\n var t = $(\"#tip\");\r\n\r\n t.html(Icons[idx].tip);\r\n t.show();\r\n}",
"function showFingertips(frame) {\n\n var hands = frame.hands;\n\n // iterate over all hands\n for (var i = 0; i < hands.length; i++) {\n var hand = hands[i];\n\n // iterate over all finger names\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a complex number to a polar PolarCoordinate | function toPolar(complexNumber)
{
var r = Math.sqrt((complexNumber.real * complexNumber.real) + (complexNumber.img * complexNumber.img));
var theta = Math.atan2(complexNumber.img, complexNumber.real);
return new PolarCoordinate(r, theta);
} | [
"toPolarCoords() {\n return ({\n r: Math.sqrt(this.x ** 2 + this.y ** 2),\n a: Point.angle(this),\n });\n }",
"function PolarCoordinate(r, theta)\n{\n\tthis.r = r;\n\tthis.theta = theta;\n}",
"static fromPolar(r, θ) {\n return new Complex(r * Math.cos(θ), r * Math.sin(θ));\n }",
"toPolar(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TAGS: file, string LANG: node.js FUNCTION: file_to_string(path) | function file_to_string(path) {
const fs = require('fs')
return fs.readFileSync(path, 'utf8');
} | [
"stringContents(file) {\n if (typeof file.contents === 'string') {\n return file.contents;\n }\n return file.contents.toString();\n }",
"function fileToString(fileObject) {\n\tvar data = \"\";\n\ttry {\n\t\t// Read file to string (data)\n\n\t\tvar fstream = Components.classes[\"@mozilla.org/network... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used by external components to clear some memory when the coordinates are no longer required to be stored in this layer For example, you would want to clear the coordinates here after this layer is merged in something like the GeoJSONLayer | clearCoordinates() {
this._coordinates = null;
this._projectedCoordinates = null;
} | [
"clearCoordinates() {\n this._coordinates = null;\n this._projectedCoordinates = null;\n }",
"function resetCoordinates () {\n coordinates = [];\n }",
"function resetCoordinates() {\n console.log('resetCoordinates');\n coordi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
when element type (tag) change from keyboard select first of its type, E.g. when selected image default first image element | function tagChange()
{
if (!vm.element || vm.element.tag != vm.element)
{
var first_el;
if (ThemeService.view[vm.tag])
{
first_el = ThemeService.view[vm.tag][Object.keys(ThemeService.view[vm.tag])[0]];
}
... | [
"function _selectElement(type, $element) {\n\t\t\tif($element.isAvailable) {\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase 'room_choice':\n\t\t\t\t\t\tif(!$element.isCustom)\n\t\t\t\t\t\t\t$element.isAvailable = false;\n\t\t\t\t\t\t$element.css('color', 'white');\n\t\t\t\t\t\t$element.find(\"i\").fadeIn(200, function() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get item response from multiple textarea | function GetItemResponseMultiTextArea4(){
var val1 = $("#FormControlTextarea1").val();
var val2 = $("#FormControlTextarea2").val();
var val3 = $("#FormControlTextarea3").val();
var val4 = $("#FormControlTextarea4").val();
var returnval1;
var returnval2;
var returnval3;
var returnval4;
... | [
"function GetItemResponseMultiTextArea(){\n var val1 = $(\"#FormControlTextarea1\").val();\n var val2 = $(\"#FormControlTextarea2\").val();\n var val3 = $(\"#FormControlTextarea3\").val();\n var returnval1;\n var returnval2;\n var returnval3;\n if(val1 === null){\n returnval1 = \"N/A\";\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the email widgets into the builder iframe. Used during initial load of the builder. | function loadWidgets(emailContent, enableWidgetManipulation) {
if (!emailContent) {
return;
}
var $builderFrame = $(builderFrameSelector);
// Ensure loaded builder frame and render email configuration
frameLoader.frameLoaded($builderFrame, function () {
... | [
"function initIframe() {\n\n $builderContent = $('#' + emailBuilderData.builderIframeId).contents();\n $zones = $builderContent.find('.cms-zone');\n\n widgetSelection.init();\n\n if (enableWidgetManipulation) {\n // Initialize drop zones in the email builder\n $zone... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SYSTEM LIST CLASS END SYSTEM STORAGE CLASS | function SystemStorage(listTitle) {
this.listTitle = listTitle;
this.ensureStorage = function () {
return sp.ensureListStorage(this.listTitle);
};
this.put = function (key, value) {
return sp.saveKey(this.listTitle, key, value);
};
this.get = function (key) {
return sp.getKey(this.listT... | [
"createSystems()\n {\n }",
"getSystems() {\n return this.systemManager.getSystems();\n }",
"function getSavedLSystem() {\n let ls = JSON.parse(localStorage.getItem('SavedLSystem'));\n for (const i in ls) {\n Lsystems[i] = new LSystem(ls[i]);\n selectmenu[i] = i;\n }\n gui.remove(dropdown)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
middleware function to verify and return employee record | function verify_employee() {
return async (req, res, next) => {
try {
// using employee_num to restive employee record
let my_employee = await employee.find_by({employee_num: req.body.employee_num})
// check to return 400 if no employee found
if (!my_employee)... | [
"function validateEmployeeData(req, res, next) {\n const body = req.body;\n let employee = {};\n // validate firstName field\n if (body.firstName && typeof body.firstName === 'string') {\n employee.firstName = body.firstName;\n } else {\n return res.status(400).send(\"Missing employee's firstName in requ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
asyncCallback(msec, arg. callback) : node style normal callback callback : function (err, val) | function asyncCallback(msec, arg, callback) {
setTimeout(callback, msec, null, arg);
} | [
"function asyncThunk(msec, arg) {\n\t\treturn function (callback) {\n\t\t\tsetTimeout(callback, msec, null, arg);\n\t\t};\n\t}",
"async function helloCatAsync(callback) {\n console.log(\"2. callback here is the function passed as argument above...\")\n // 3. Start async operation:\n setTimeout(function () {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
finction that controls the reel 2 spinning | function spin2(){
i2++;
if (i2>=numeberReel2){
coin[1].play();
clearInterval(reel2);
return null;
}
reelTile = document.getElementById("slot2");
if (reelTile.className=="s1"){
reelTile.className = "s0";
}
reelTile.className = "s"+ question2
} | [
"function Spin() {\n wheel.AcclToRadsPerSec(Math.PI * 2, 3000, new ArcsinMapper_1.default());\n setTimeout(() => {\n console.log(\"slowing down\");\n //note this currently always decels to 0.\n wheel.AcclToRadsPerSec(0, 3000, new ArcsinMapper_1.default());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return bytes since position 'p'. | since(p)
{
return this.buf.subarray(p, this.o);
} | [
"async read(p) {\n let rr = p.byteLength;\n if (p.byteLength === 0) return rr;\n if (this.r === this.w) {\n if (p.byteLength >= this.buf.byteLength) {\n // Large read, empty buffer.\n // Read directly into p to avoid copy.\n const rr = awa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uses jQuery menu plugin to build a menu for the list with the given id | function createVerticalMenu(listId, options) {
jq(document).ready(function() {
jq("#" + listId).navMenu(options);
});
} | [
"function createVerticalMenu(listId, options) {\n jQuery(document).ready(function () {\n jQuery(\"#\" + listId).navMenu(options);\n });\n}",
"function ddlistmenu(id, className){\n\tvar menu=document.createElement('ul')\n\tif (id)\n\t\tmenu.id=id\n\tif (className)\n\t\tmenu.className=className\n\tthis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
:: _entries: Map _dirty: boolean // Used to determine if index needs to be saved to filesystem | constructor(entries) {
this._dirty = false;
this._entries = entries || new Map();
} | [
"constructor (entries) {\n this._dirty = false;\n this._entries = entries || new Map();\n }",
"function markDirty() {\n _indexListDirty = true;\n }",
"updateIndex(oplog, entries) {\n this._index = oplog.values\n }",
"constructor() {\n const savedIndex = Json2File.loadFromTextSync(c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stalewhilerevalidate (fetch from cache, then update cached with one from network) concept implementation | function staleRevalidate(evt, cache = dynamicCache) {
evt.respondWith(
// Look in cache first
caches.match(evt.request).then(res => {
// Start fetch promise for an update or a fallback if not found in cache
const fetchHandler = fetch(evt.request)
.then(res => {
if (res.type === '... | [
"function staleWhileRevalidate(event) {\n const fetchedVersion = fetch(event.request);\n // Since we _might_ be responding with the fetched response\n // and also using it to populate the cache, we need to make a copy.\n const fetchedCopy = fetchedVersion.then(response => response.clone());\n const cachedVersi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decode joint real and reference angle values. Get the coded_value and returns an array with the real and reference angles | function decodeRealRef(coded_values) {
// Receive data of the reference and real position of the left knee:
var sign_real_pos;
var interger_real_pos;
var decimals_1_real_pos; // No es necesario ya que los decimales nunca son mayores que 256
var decimals_2_real_pos;
var sign_ref_pos;
v... | [
"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 else {\n openposeData = JSON.pars... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adapted from d3regression by Harry Stevens License: / harmony default export | function __WEBPACK_DEFAULT_EXPORT__(data, x, y) {
let X = 0, Y = 0, XY = 0, X2 = 0, n = 0;
(0,_points__WEBPACK_IMPORTED_MODULE_1__.visitPoints)(data, x, y, (dx, dy) => {
++n;
X += (dx - X) / n;
Y += (dy - Y) / n;
XY += (dx * dy - XY) / n;
X2 += (dx * dx - X2) / n;
});
const coef = (0,_ols_... | [
"_extendD3(){\n d3.selection.prototype.first = function() {\n return d3.select(\n this.nodes()[0]\n );\n };\n d3.selection.prototype.last = function() {\n return d3.select(\n this.nodes()[this.size() - 1]\n );\n };... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to view students credentials | function viewStudent(req, res) {
let id = req.body.id;
Student.findById(id)
.then(users => res.json({ status: true, user: showStudent(users) }))
.catch(err => res.json({ status: false, error: err }));
//Function to show it
function showStudent(users) {
let password = users.password;
let decipher... | [
"function getClassCredentials(withScratch = false) {\n\n\tconst passwordLink = document.querySelector('th .pointer');\n\tpasswordLink.click();\n\n\tsetTimeout(() => {\n\t\tlet tableRows = Array.from(document.querySelector('table').querySelectorAll('tr'));\n\n\t\ttableRows.splice(0, 1);\n\n\t\tlet users = tableRows.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Params shouldn't be displayed when there are no descriptions and no subparams, because the information is already displayed in the type signature and redundant | get shouldDisplayParams() {
let params = this.args.item?.params || [];
return params.some((p) => p.description || p.name.includes('.'));
} | [
"function funcParamsDescriptionNoType (one: string, two: string): string {\n return `${one} and ${two}`;\n}",
"function noParams () {}",
"function noParams() {}",
"function noParametersToRender() {\n return props.parameters.length === 0;\n }",
"function paramTypeNotSpecified(p) {\n return p;\n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assemble content of other series | function assembleOtherSeries(series) {
return map(series, function (series) {
var data = series.getRawData();
var lines = [series.name];
var vals = [];
data.each(data.dimensions, function () {
var argLen = arguments.length;
var dataIndex = arguments[argLe... | [
"function assembleOtherSeries(series) {\n return zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_2__[\"map\"](series, function (series) {\n var data = series.getRawData();\n var lines = [series.name];\n var vals = [];\n data.each(data.dimensions, function () {\n var argLen = arguments.length;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the type and version of the repository | function checkVersions(conf, callback) {
if (conf.type === "jira") {
checkJiraVersion(conf, callback);
} else {
// The type of the repository is checked beforehand.
console.assert(false);
}
} | [
"function isValidRepo(repo) {\n if (repo instanceof Git.Repository) console.log('\\nRepo Cloned Successfully\\n');\n else console.log('\\nError Occurred, Repo Was Not Cloned Properly\\n');\n}",
"async gitVersion() {\n const gitVersionOutput = await execa.stdout('git', [ '--version' ]);\n const ver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Puts the scheduler in a `suspended` state and executes a task immediately. | function immediately(task){try{suspend();return task();}finally{flush();}} | [
"resume() {\n this._suspended = false;\n this.run(undefined);\n }",
"function immediately(task) {\n try {\n suspend();\n return task();\n } finally {\n redux_saga_core_esm_flush();\n }\n}",
"function immediately(task) {\n try {\n suspend();\n return task();\n } finally {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
See nodeId property docs below | __getNodeId() {
return this.part ? this.part.nodeId : '';
} | [
"function getNodeId() {\n\treturn node_id;\n}",
"function getNodeId(name) {\n return nodeNameToId[name];\n}",
"get nodeId() {\n return this.atoms[this.atoms.length - 1][1];\n }",
"setNodeId(id, index) {\n this.nodeIds[index] = id;\n }",
"setLocalNodeId(id) {\n this.nodeID = id;\n }",
"getNo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
createBooking() function that is run when the button called "book" is clicked. | function createBooking() {
//Taking the user input from the two inputs in the form and storing them in two different variables.
//Using the .value so we get the value of the input and not the input elements them selves.
var userName = document.getElementById("clientName").value;
var userEmail = document... | [
"function handleCreateBooking(event){\n if (DEBUG) {\n console.log (\"Triggered handleCreateBooking\");\n }\n var $form = $(this).closest(\"form\");\n var template = serializeFormTemplate($form);\n var url = $form.attr(\"action\");\n addBooking(url, template);\n reloadBookingsList();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
callback whenever the location changes so that it automatically refreshes. watchID: ?number = null; stage in the React Component Lifecycle; called after render() method has been executed; allows for manipulation of the dom lines 104137: this is where we are extracting geolocation data from the phone | componentDidMount() {
navigator.geolocation.getCurrentPosition(
(position) => {
this.setState(
{currentRegion: {
latitude: position.coords.latitude,
longitude: position.coords.longitude,
latit... | [
"function watchLocation(){\r\n\t\r\n\twatchID = navigator.geolocation.watchPosition(displayLocationHandler,displayError,options);\r\n}",
"function watch(handler) { if (!watchId) { watchId = navigator.geolocation.watchPosition(handler); } }",
"componentDidMount() {\n console.log(this.state.currentLocation... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert assignment array into appropriate form and send to server | function assignmentsSendToServer() {
// Since there are no references in JavaScript, we must use recursion to populate the tree
var assignmentTree = assignmentGetTreeNodes(0, 1);
// Submit via web service
var xmlhttp = new XMLHttpRequest();
var url = "/assignment/ws.php?action=updateAssignments&"+courseUrlPart;
... | [
"function parseAssignmentData(data) {\n return data.map(function(item) {\n return {\n className: item.groupname,\n id: item.assignment_id,\n indexId: item.assignment_index_id,\n type: item.assignment_type,\n title: item.short_description,\n description: item.long_description,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An empty icon. Constructor method Parameters: elem: The component to display. (The INPUT ELEMENT.) elemType: The type of the component to display. | constructor(elem : JQuery, elemType : COMPONENT_TYPE) {
this.elem = elem;
this.elemType = elemType;
this.yesIcon = $(`<img src="${site_url}/images/ok.png" alt="Yes">`);
this.noIcon = $(`<img src="${site_url}/images/notok.png" alt="No">`);
this.noneIcon = $(`<img src="${sit... | [
"function ELEMENT_ICON$static_(){IconWithTextBEMEntities.ELEMENT_ICON=( IconWithTextBEMEntities.BLOCK.createElement(\"icon\"));}",
"function icon(){}",
"addIconElement_() {\n const iconEl = htmlFor(this.element_)`\n <div class=\"i-amphtml-story-affiliate-link-circle\">\n <i class=\"i-amphtml-stor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When using streaming rendering, style blocks are emitted in chunks directly next to the HTML they reference. In order to prevent errors during rehydration (since React doesn't know about the style blocks we are interleaving) this method relocates all styledcomponent blocks to the end of ``. NOTE: this method MUST be ca... | function consolidateStreamedStyles() {
var blocks = Array.from(document.querySelectorAll('style[data-styled-components]'));
if (blocks.length) {
var frag = document.createDocumentFragment();
for (var i = 0, len = blocks.length; i < len; i += 1) {
// $FlowFixMe
frag.appendChild(blocks[i].parent... | [
"addAllStyles() {\n\t\tfor ( let style of this.stylesState ) {\n\t\t\tstyle.$tag = this.createStyleTag( style.id );\n\t\t\tstyle.$tag.html( style.css );\n\t\t\tthis.$head.append( style.$tag );\n\t\t}\n\t}",
"function renderStyles() {\n stylesCat = \"\";\n \n for (var i=0,l=styleBlocks.length; i<l; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We combine objects like this to keep from overriding objects mistakingly by reference | combine(obj1, obj2)
{
return _extend(_extend({}, obj1), obj2);
} | [
"function mergeObjs() {\n var outObj = {};\n for (var i in arguments) {\n if (arguments[i] instanceof Object) {\n /* jshint forin: false */\n for (var j in arguments[i]) {\n // Does not check fo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
2 Write a function that takes a string which has integers inside it separated by spaces, and your task is to convert each integer in the string into an integer and return their sum. | function summy(stringOfInts) {
var total = 0;
var nums = stringOfInts.split(" ");
for (i = 0; i < nums.length; i++) {
total += parseInt(nums[i]);
}
return total;
} | [
"function sumOfIntegersInString(s){\n\treturn s.split(/[\\D]+/g)\n\t//the /S matches anything but white space\n\t//.test is running the test on each array element\t\n\t.filter((arrElements) => /\\S/.test(arrElements))\t \n\t.map((num) => parseInt(num))\n\t.reduce((total,num)=>total+num, 0)\n}//sumOfIntegersInString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
consider any vertex not on the domain a leaf | function isLeaf (source) {
return source.indexOf(base) !== 0;
} | [
"function isSubgraph(g,v){return!!g.children(v).length}",
"isLeaf() {\n return this.left === null && this.right === null;\n }",
"isLeaf()\n {\n return (this.left() === null && this.right() === null);\n }",
"get isLeaf() {\n return !this.left && !this.right;\n }",
"function isSubgraph(g,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Actually get the component position from the DOM accounting for scroll position | getComponentPosition(){
//get the actual Element
let componentElement = this.$()[0];
//low-level DOM api for-the-win
let card = componentElement.getBoundingClientRect();
//create a json object that accounts for scroll position
let cp = {
top: card.top + window.pageYOffset,
left: card... | [
"getComponentPosition(){\n //get the actual Element\n let componentElement = this.$()[0];\n //low-level DOM api for-the-win\n let rect = componentElement.getBoundingClientRect();\n //create a json object that accounts for scroll position\n let cp = {\n top: rect.top + window.pageYOffset,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
alert noting the number of pies needed based on partic. var totalPies = apple + cherry + blueberry + peach; Normal function set up | function pies1(){
var apple = 50;//apple pies on hand
var cherry = 32;//cherry pies on hand
var blueberry = 12;//blueberry pies on hand
var peach = 12;//peach pies on hand
var piesOnhand = apple + cherry + blueberry + peach;
... | [
"function totalNumberOfruit(totalOrange, TotalBanana, TotalApple) {\n totalCalories = totalOrange*orange + TotalBanana*banana + TotalApple*apple;\n return totalCalories; \n \n}",
"function getNumNeededToTie(purpose,fruit) {\r\n if (!exists(fruit)) {\r\n return HOPELESS;\r\n }\r\n \r\n //th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ask to open urls of hashtag | function openByHashtagRequest() {
let value = document.getElementById('open_hashtags_select').value
openUrlByRequest('hashtag',value)
} | [
"function hashtag(word){ \r\n\r\n //Define the regex that identifies the hashtag\r\n\r\n var hashtagRegex = \"(#\\\\w+)\";\r\n\r\n //Return find\r\n\t \t \r\n\t if(word.value.match(hashtagRegex)){\r\n \r\n\t //If hashtag, return true\r\n\t \r\n return true;\r\n\r\n } else {\r\n\r\n\t //false for ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Misma funcion que en la practica pasada. Crea la tabla del horario | function crearHorario() {
var tabla = document.getElementById("horario");
//limpiarHorario(tabla);
for (var fila = 1; fila < tabla.rows.length; fila++) {//Empezamos en 1 para saltarnos el header
for (var col = 1; col < tabla.rows[0].cells.length; col++) {
var indiceAleatorio = Math.floor(Math.random() * ve... | [
"function createTable() {\n let container = document.querySelector(`.${this.parent}`);\n let table = document.createElement('table');\n table.id = this.id;\n table.className = `${this.period}-table`;\n\n switch ( this.period ) {\n case \"workweek\":\n createWeekTable(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new pixelation material. | function PixelationMaterial() {
classCallCheck(this, PixelationMaterial);
return possibleConstructorReturn(this, (PixelationMaterial.__proto__ || Object.getPrototypeOf(PixelationMaterial)).call(this, {
type: "PixelationMaterial",
uniforms: {
tDiffuse: new __WEBPACK_IMPORTED_MODULE_0_three__["_35" /* Un... | [
"function Material() {}",
"constructor(color, material)\n {\n this._color = color;\n this._material = material;\n }",
"function createMaterial(params, id) {\n let material = {\n id: `Custom:${id}`,\n title: `${params.thickName} ${params.name}`,\n sku: '',\n nominal_thickness: params.thickne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inicializa los elemento de clase bridjeaction. para que al ser accionados envien al servidor la accion de bridje que debe realizarse. | function initBridjeActionElements()
{
var el = $('#bridje-view-container');
el.find('a.bridje-action').click(postBridjeView);
el.find('button.bridje-action').click(postBridjeView);
el.find('select.bridje-action').change(postBridjeView);
} | [
"init() {\n this.Obniz.send({\n ble: {\n hci: {\n initialize: true,\n },\n },\n });\n }",
"constructor() { \n \n OutboundAction.initialize(this);\n }",
"constructor() {\n\n this.bizNetworkConnection =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate a random location for a level 0 element, store that default location in the element's data, and return the values in an object | function getStoreLevel0RandomLocation(element, index) {
// Calculate random default location values
var defaultTop = (Math.random() * level0Offset) + level0Top;
var startLocation;
// Assume that frontCount is either 2 or 3
if (frontCount === 2) {
startLocation = double[index];
}
else {
startLocat... | [
"function getStoreLevel1RandomLocation(element, index) {\n\n // Calculate random default location values\n var defaultTop = (Math.random() * level1Offset) + level1Top;\n var startLocation;\n // This level has 2 elements if frontCount is 3 and 3 elements if frontCount is 2\n if (frontCount === 3) {\n startLo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get top risky projects | async getTopRiskyProjects(ts, te) {
let token = localStorage.getItem("interset_token");
axios.defaults.headers.common['Authorization'] = token;
// console.log(ts);
let url = `${API_URL}/api/search/0/projects/topRisky?sort=maximum&markup=false&tz=UTC%2B8&count=10&keepAlive=300000`
if((ts!==0) && (te!... | [
"async function popularProjects () {\n const results = await Project\n .aggregate([\n {\n $match: { privacyLevel: 'global', status: 'active' }\n },\n {\n $lookup: {\n from: 'bookmarks',\n localField: '_id',\n foreignField: 'project',\n as: 'bookma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a route to a Hapi server instance which replicates an unsupported route. This supports testing that when we flag a route as 'unsupported' it behaves as we expect. For example, we are flagging that the /v1 versions of a number of endpoints are not supported in this project. | static addNotSupportedRoute (server) {
server.route({
method: 'GET',
path: '/test/not-supported',
handler: NotSupportedController.index,
options: {
auth: false
}
})
} | [
"static registerLegacyRouteHandler() {}",
"addRoute(route, handler) {\n if (route.indexOf('#') !== 0) {\n throw new Error('Your route should start with a #');\n }\n this.routes.push(route);\n this.matchers.push(new RegExp(route.replace(/:[^\\s/]+/g, '([\\\\w-]+)')));\n this.lookup[route] = () ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders the AWS CloudFormation properties of an `AWS::WAFv2::WebACL.ByteMatchStatement` resource | function cfnWebACLByteMatchStatementPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnWebACL_ByteMatchStatementPropertyValidator(properties).assertSuccess();
return {
FieldToMatch: cfnWebACLFieldToMatchPropertyToCloudFormation(properties.fi... | [
"function CfnWebACL_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 objec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
start starts the pipeline process with the given data, and returns a promise that resolves when the pipeline execution finishes. | start(data){
return new Promise((resolve, reject) => this._execute(0, data, resolve, reject));
} | [
"start () {\n this.stdin.setEncoding('utf8')\n\n this.stdin.on('readable', () => {\n const chunk = this.stdin.read()\n if (chunk) {\n const transformed = this.transform(chunk.trimRight())\n const filter = !!transformed\n if (filter) this.values = [...this.values, transformed]\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a car from request body parameters and send to CarData Res.end the created car | createCar(){
this.app.post(this.baseUrl + '/create', function (req, res) {
var car = new Car(0, req.body.name, req.body.color);
console.log("CarAPI: car to create " + car.name);
CarData.create(car).then(function (result) {
res = ResponseBuilder.createResponse(... | [
"static createCar() {\n const formData = {\n year: yearInput.value,\n make: makeInput.value,\n model: modelInput.value,\n image_url: imageInput.value,\n origin_id: dropdown.value\n }\n\n const configObj = {\n method: 'POST',\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get Period Game Odds Line Movement / / The ScoreID of an NFL score (game). ScoreIDs can be found in the Scores API. Valid entries are 16654 or 16667 | getPeriodGameOddsLineMovementPromise(scoreid){
var parameters = {};
parameters['scoreid']=scoreid;
return this.GetPromise('/v3/nfl/odds/{format}/AlternateMarketGameOddsLineMovement/{scoreid}', parameters);
} | [
"getPreGameOddsLineMovementPromise(scoreid){\n var parameters = {};\n parameters['scoreid']=scoreid;\n return this.GetPromise('/v3/nfl/odds/{format}/GameOddsLineMovement/{scoreid}', parameters);\n }",
"getInGameOddsLineMovementPromise(scoreid){\n var parameters = {};\n parame... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an event, returns another event which only fires once. | function _once(event) {
return function (listener) {
var thisArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var disposables = arguments.length > 2 ? arguments[2] : undefined;
// we need this, in case the event fires during the listener call
var didFire = false;
va... | [
"function once(event) {\n return (listener, thisArgs = null, disposables) => {\n // we need this, in case the event fires during the listener call\n let didFire = false;\n let result = undefined;\n result = event(e => {\n if (didFire) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CALCULATOR STUFF Given a root.Missions object, returns an html string representing the calculator (most of the mission popup content). | function renderCalculator(mission) {
let condition = mission.Condition;
let conditionType = condition.ConditionType;
if (["ResourceQuantity", "IndustryUnlocked", "ResourcesEarnedSinceSubscription"].includes(conditionType)) {
// First figure out which industry to display and calculate
let industryId = "";
... | [
"function renderCalculator(mission) {\n let condition = mission.Condition;\n let conditionType = condition.ConditionType;\n if ([\"ResourceQuantity\", \"IndustryUnlocked\", \"ResourcesEarnedSinceSubscription\"].includes(conditionType)) {\n // First figure out which industry to display and calculate\n let i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set up filename (and folder path) broke this out into a function so people could just copy/paste the screenshot line over and over | function getUniqScreenshotName() {
//use the current date/time "now" variable captured when the program first ran
//for the folder names
const todaysDate = dateFormat(now, "mm_dd_yy");
const startTime = dateFormat(now, "h_MM_ss_TT");
//folder to store the screenshots
const baseScreenshotFolder = "screen... | [
"function Screenshot() { }",
"function Screenshot() {\n}",
"function addScreenshot(screenshot)\n {\n //adding directories so the user can upload a screenshot\n //used https://attacomsian.com/blog/nodejs-create-directory#:~:text=In%20a%20Node.,directory%20at%20the%20given%20location as a reference\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function will grab either the value from the first searchBar or the second one | function grabCityVal() {
// The var whichSearch will tell the code which search bar to look for
// If the var whichSearch is set to the first search bar on the welcome screen
if (whichSearch === 'firstSearch') {
cityVal = $('.searchBar').val().trim();
}
// Otherwise it's the navbar search ... | [
"function getSearchCriteria()\n{\n var searchValue;\n if (document.getElementById('artist-radio').checked)\n {\n console.log(\"artist\");\n searchValue = \"artist\";\n return searchValue;\n }\n if (document.getElementById('song-radio').checked)\n {\n console.log(\"song\");\n searchValue = \"son... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the initial line and speed from the database when user first logs in. | function retrieveInitialLineAndSpeed(){
retrieveLineAndSpeedFromDb('initial');
} | [
"function getInitialProfile() {\n\tfetchProfileData(initialUsername);\n}",
"function sessionStart() {\n\t///////////////////////////////////\n\t// USED FOR TESTING! DELETES ALL LOCAL DATA!\n\t// ONLY UNCOMMENT IF YOU WANT TO DELETE LOCAL DATA!\n //localStorage.clear();\n\t///////////////////////////////////\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
write a prepend function that takes a value and a list and puts that value at the beginning of the list | function prepend(value, list) {
return {
value: value,
rest: list
};
} | [
"function prepend(value, list) { //this function takes the arguements value and list\n let arr = listToArray(list); //convert the list into an array with our listToArray function\n arr.unshift(value); //unshift the given value to the front of the list\n return arrayToList(arr); //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function which checks for any existing version of the system to install. | function checkInstalled(next) {
exports.read(system, function (err, install) {
if (install && install.history) {
system.history = install.history;
}
if (err) {
return err.code === 'ENOENT'
? next()
: callback(err);
}
else if (!install.system)... | [
"function checkVersion ()\n{\n return true;\n\n /***************************\n var ver = new String(InstallTrigger.getVersion(\"jslib\"));\n\n // strip off build info \n ver = ver.substring(0, ver.lastIndexOf(\".\"));\n\n return (G_VER >= ver);\n ***************************/\n}",
"function CheckInstallatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UpdateContacts() Detect contacts between all objects over time period t | function UpdateContacts(t)
{
// TODO: Spacial and Hierarchical Partitioning (Grid, BVH, etc.)
// TODO: Group related contacts (i.e. A<->B, B<->C, and C<->D) for simultaneous processing
// TODO: Consider resting contacts
// TODO: Consider contact resolution ordering
// TODO: Enable particles (particl... | [
"function ResolveContacts(t)\n{\n var a, b;\n\n // Go through all contacts\n for (var i in contacts)\n {\n a = contacts[i].a;\n b = contacts[i].b;\n\n // TODO: Physics contact resolution\n\n // Special Particle Actions\n // a object\n if (a instanceof PhysPartic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a constraint type and an value (or an array of values) retrives a more humanreadable value | function constraintValueText(type, values) {
var selectEl = null, valueText = '';
console.log("---- "+type+" - "+values+" ----");
switch (type) {
case 'category':
selectEl = document.getElementById('category-id');
break;
case 'o... | [
"function describeValue(value) {\n var type = betterTypeof(value);\n\n if (type === 'object' || type === 'array') {\n return util.inspect(value) + ' (' + type + ')';\n }\n\n if (type === 'null' || type === 'undefined') return type;\n\n if (type === 'string') {\n return \"'\" + value + \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count the number of unique items that can be equipped. | function canEquipItemCount() {
var stats = (0, _templateString.$stats)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Muscle, Mysticality, Moxie"]))).map(stat => Math.min((0, _kolmafia.myBasestat)(stat), 300));
if (stats.every((value, index) => value === cachedStats[index])) {
return cachedCa... | [
"function numberOfItemTypes(numbOfUniqueItems){\n //takes in the shopping cart as input\n //returns the number of unique item types in the shopping cart\n var ItemsThatAreUnique = [];\n for (let i = 0; i < numbOfUniqueItems.items.length; i++) {//took a while to find .items.length inorder to make this on... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ConversationBuilder class constructor. initialises the id with a guid | function ConversationBuilder() {
/**
* The conversation description
*/
this.description = undefined;
/**
* The conversation roles
*/
this.roles = {
"owner": {
"canSend": true,
"canAddParticipants":... | [
"function ConversationBuilder() {\n /**\n * The conversation description\n */\n this.description = undefined;\n /**\n * The conversation roles\n */\n this.roles = {\n \"owner\": {\n \"canSend\": true,\n \"canAddPart... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
openDecryptUI is executed when Decrypt password menu item is clicked. opens up a dialog box, rendering decryptPassword.html where user can add a new password, encrypt it with a shared secret and save it. | function openDecryptUI() {
var html = HtmlService.createTemplateFromFile('decryptPassword').evaluate()
.setWidth(400)
.setHeight(150);
SpreadsheetApp.getUi()
.showModalDialog(html, 'Decrypt password');
} | [
"function generate_password_item_click(e) {\n on_show_hide(\"popup\", \"generate\");\n}",
"function onSetPasswordModalClose(){\n\tpwd = $(\"#modalSetPasswordInput\").val();\n\t$(\"#modalSetPasswordInput\").val(\"\"); //Delete password from form\n\t\n\tif(pendingEncryptedJson){\n\t\tdecrypt(pendingEncryptedJson... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new `AWS::RUM::AppMonitor`. | constructor(scope, id, props) {
super(scope, id, { type: CfnAppMonitor.CFN_RESOURCE_TYPE_NAME, properties: props });
try {
jsiiDeprecationWarnings.aws_cdk_lib_aws_rum_CfnAppMonitorProps(props);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && error.name ===... | [
"function AppMonitor() {\n}",
"function createApp(){\n\tconsole.log('createApp: ')\n\tu.createMetroApp(app.name);\n}",
"function createApp() {\n LOG('::createApp::');\n var el = document.getElementById('main');\n app = global.app = new (global.App)(el);\n app.init();\n }",
"async _createApi(monit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function for resizing vertex(using for drawing dog) : using parameter "x". scale the vertex value | function resizeVertex(vertex, x) {
var newVertex = new Array();
for (var i = 0; i < vertex.length; i++) {
temp = vertex[i];
temp[0] *= x;
temp[1] *= x;
newVertex[i] = temp;
}
return newVertex;
} | [
"applyVertexSize(){\n if(this.settings.scaleVertices){\n const minSize = this.settings.minSize\n const maxSize = this.settings.maxSize\n for(let i = 0; i < this.vertices.length; i++){\n const v = this.vertices[i];\n v.size = Math.floor(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
snippetend:[s3.JavaScript.s3_PhotoViewer.listAlbums] snippetstart:[s3.JavaScript.s3_PhotoViewer.viewAlbum] Show the photos that exist in an album. | function viewAlbum(albumName) {
var albumPhotosKey = encodeURIComponent(albumName) + '/';
s3.listObjects({Prefix: albumPhotosKey}, function(err, data) {
if (err) {
return alert('There was an error viewing your album: ' + err.message);
}
// 'this' references the AWS.Request instance that repr... | [
"function listAlbums() {\n s3.listObjects({Delimiter: '/'}, function(err, data) {\n if (err) {\n return alert('There was an error listing your albums: ' + err.message);\n } else {\n var albums = data.CommonPrefixes.map(function(commonPrefix) {\n var prefix = commonPrefix.Prefix... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Force a value to be between MIN_RATING and MAX_RATING | function clamp(v) {
return Math.max(MIN_RATING, Math.min(MAX_RATING, v));
} | [
"set rating(r) {\n if (r < 6 && r > 0 && Number.isInteger(r)) {\n this._rating = r;\n }\n else {\n console.log('Rating must be an integer between 1 and 5')\n }\n }",
"constrainValue(value) {\n return Math.min(Math.max(value, this._min), this._max);\n }",
"function alterGamerRange(min,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove any event handlers and destroy the chart if it exists | _destroyChart () {
if (this.chart) {
// TODO: remove events once they're implemented
// if (this.chart.off) {
// this.chart.off();
// }
delete this.chart;
}
} | [
"function removeChart() {\n chart.destroy();\n }",
"function removeChart() {\n monte_vis.chart.destroy();\n // reset chart sizing\n chart_container.style = \"\";\n }",
"function destroy() {\n\t\t\t// Destroy the tracker group element\n\t\t\tif (chart.tra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve a map of addresses to all alarms stored in the database | mapAddressesToAlarm(addresses = []) {
return this.getAlarms({ addresses: addresses }).reduce(function (map, obj) {
if (!map[obj.address]) map[obj.address] = [];
map[obj.address].push(obj);
return map;
}, {});
} | [
"getAlarms(where = { id: undefined, addresses: [] }) {\n const internalWhere = {\n enabled: 1,\n };\n if (where.addresses && where.addresses.length) {\n internalWhere.address = {\n [Op.in]: where.addresses,\n };\n }\n\n if (where.id) {\n internalWhere.id = where.id;\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert lines at `start` index | insert(lines, start) {
return this.setLines(lines, {
start,
end: start,
strictIndexing: true,
});
} | [
"function addStart(start, index) {\n if (needsreset) {\n // Delete everything only for the first call to addStart by tracking needsreset\n resetNetwork(start);\n needsreset = false;\n } else {\n const startID = getNeutralId(start);\n startpages.push(startID);\n nodes.add([\n {\n id: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This object implements the Interpreter component in the Interpreter Style example. The Interpreter has a method "run" which should be called with an object representing the program to execute and an optional controller object where callbacks from buttons will be called. When the "run" function ends, it returns a elemen... | function Interpreter() {
this._createField = function (label, input) {
var root = document.createElement('div');
root.setAttribute('class', 'field')
if(label) root.appendChild(label);
if(input) root.appendChild(input);
return root;
};
this._interpretStringField = function(fieldData) {
... | [
"_runInterpreter() { \n this._parser.program.interpret();\n let result = '<h2>Program output</h2><pre>' + this._parser.program.output + '</pre>';\n document.getElementById('result').innerHTML = result;\n this._formButton.innerHTML = 'Run compiler';\n this._formButton.onclick = () ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
RUNS ALL THE FUNCTIONALITY FOR THE GRID OBJECT | run() {
//run the grid logic
this.updateMouseValues();
this.updateGridValues();
this.renderModules();
} | [
"function iterateGrid(func) {\n\tfor(var i = 0; i < WIDTH; i++) {\n\t\tfor(var j = 0; j < HEIGHT; j++) {\n\t\t\tfunc(i, j, GRID[i][j]);\n\t\t}\n\t}\n}",
"iterateGrid(func = function(comp, x, y){}){\n for(var x = 0; x < this.grid.length; x++)\n for(var y = 0; y < this.grid[x].length; y++)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Close the popup code description window when click on the cross image | function closeCodeDescriptionPopUp(){
$('#code_desc_popup').css('display','none');
} | [
"function closePictureByClick(){\n\topenPictureDim.addEventListener('click', function(){\n\t\topenPictureDim.style.display = \"none\";\n\t\tdocument.getElementsByTagName('body')[0].style.overflowY = \"scroll\";\n\t\tcommentsContainer.innerHTML = \"\";\n\t\tdocument.getElementById('big-instant-picture-image').src = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Jiggle the grid Called when algorithm fails | function jiggle(lim, i) {
if (i >= lim) {
$("#grid").css("top", 0).css("left", 0);
return;
}
if (!i) i = 0;
i++;
$("#grid")
.css("margin-top", Math.random() * 6)
.css("margin-left", Math.random() * 6);
setTimeout(function () {
jiggle(lim, i);
}, 5);
} | [
"function bang()\n{\n //creating a new grid array for seccond generation tiles to br wrote to\n var newGrid = [];\n\n //setting my new grid up as a 2d array\n for(var i = 0; i < rows;i++)\n { \n\n newGrid[i] = [];\n\n for (var j = 0; j < columns; j++)\n {\n\n newGrid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A TrackedArray of matching matchers. | get matches() {
if (this._matches.length) {
return this._matches;
}
return Ember.testing && this._mocked ? [this._mockedBreakpoint] : [];
} | [
"getMatches() {\n this.findMatches();\n const matches = [];\n for (const key in this.matchesObj) {\n matches.push(this.matchesObj[key]);\n }\n return matches;\n }",
"getMatchPatterns() {\n return [];\n }",
"getMatches () {\n return this.matches\n }",
"_matchingTriggers(triggerMatc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the original, unwrapped `enum`. | getEnum() {
return this.e;
} | [
"get Enum() {}",
"_clone(): EnumAttribute {\n return new EnumAttribute(this.values)._copyAttrProps(this);\n }",
"static fromEnum(enumType) {\r\n return new ValueType(ExtendedType.Enumeration, null, enumType);\r\n }",
"function _getEnum (name) {\n return _.findWhere(this.props._enums, { name: na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Import a customer managed policy from the managedPolicyName. For this managed policy, you only need to know the name to be able to use it. | static fromManagedPolicyName(scope, id, managedPolicyName) {
class Import extends core_1.Resource {
constructor() {
super(...arguments);
this.managedPolicyArn = core_1.Stack.of(scope).formatArn({
service: 'iam',
region: '',
... | [
"static fromManagedPolicyArn(scope, id, managedPolicyArn) {\n class Import extends core_1.Resource {\n constructor() {\n super(...arguments);\n this.managedPolicyArn = managedPolicyArn;\n }\n }\n return new Import(scope, id);\n }",
"attac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function that find the header row in spreadsheet, which is defined by a specific background color. | function getHeaderRow_(sheet) {
let headerRow;
for (let i = 1; i < sheet.getLastRow(); i++) {
let r = sheet.getRange(i.toString() + ":" + i.toString());
if (r.getBackground() === headerColor) {
headerRow = i;
break;
}
}
if (typeof(headerRow) === "undefined") {
throw new Error(`Erro... | [
"function get_header_row(sheet) {\n const headers = [];\n const range = XLSX.utils.decode_range(sheet['!ref']);\n let C;\n const R = range.s.r; /* start in the first row */\n for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */\n const cell = sheet[XLSX.utils.encode_cell({c: C, r:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets shouldSkip flag true so that this node will be skipped while visiting. | function skip() {
this.shouldSkip = true;
} | [
"function skip() {\n this.shouldSkip = true;\n}",
"function skip() {\n if (true) {\n assertNoChildrenDeclaredYet('skip', currentNode);\n setInSkip(true);\n }\n currentNode = currentParent.lastChild;\n}",
"function skip() {\n if (DEBUG) {\n assertNoChildrenDeclaredYet(\"skip\", ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return whether the given object is a Secret. | static isSecret(x) {
return x !== null && typeof (x) === 'object' && SECRET_SYMBOL in x;
} | [
"static isSecretValue(x) {\n return typeof x === 'object' && x && x[SECRET_VALUE_SYM];\n }",
"function isSecretOutput(o) {\n return isSecret(o);\n}",
"function isRpcSecret(obj) {\n return obj && obj[exports.specialSigKey] === exports.specialSecretSig;\n}",
"static isInstance(obj) {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates edit and delete buttons for user record's table row. | function createOperationButtonCell(user) {
var updateBtn = $('<button></button>');
updateBtn.addClass('btn');
updateBtn.addClass('btn-primary');
updateBtn.css({
width: '80px'
});
updateBtn.text('Edit');
updateBtn.click(function() {
editUser(user);
});
var deleteBtn = $('<button></button>');
... | [
"function renderEditBtn(data, type, row) {\n if (type == 'display') {\n return '<a class=\"btn btn-primary\" onclick=\"updateRow(' + row.id + ');\">' +\n '<span class=\"glyphicon glyphicon-edit\"></span></a>';\n }\n}",
"function renderEditMenuListBtn(data, type, row) {\n if (type == 'di... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a visitor instance, if it is leaving or not, and a node kind, return the function the visitor runtime should call. | function getVisitFn(visitor, kind, isLeaving) {
var kindVisitor = visitor[kind];
if (kindVisitor) {
if (!isLeaving && typeof kindVisitor === 'function') {
// { Kind() {} }
return kindVisitor;
}
var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisito... | [
"function getVisitFn(visitor, kind, isLeaving) {\n var kindVisitor = visitor[kind];\n if (kindVisitor) {\n if (!isLeaving && typeof kindVisitor === 'function') {\n // { Kind() {} }\n return kindVisitor;\n }\n var kindSpecificVisitor = isLeaving ? kindVisitor.leave : ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute the number of sample frames consumed by noteGrainOn with the specified |grainOffset|, |duration|, and |sampleRate|. | function grainLengthInSampleFrames(grainOffset, duration, sampleRate) {
var startFrame = timeToSampleFrame(grainOffset, sampleRate);
var endFrame = timeToSampleFrame(grainOffset + duration, sampleRate);
return endFrame - startFrame;
} | [
"function grainLengthInSampleFrames(grainOffset, duration, sampleRate) {\n let startFrame = timeToSampleFrame(grainOffset, sampleRate);\n let endFrame = timeToSampleFrame(grainOffset + duration, sampleRate);\n\n return endFrame - startFrame;\n}",
"getTotalSamples() {\n return this.streamInfo.readUIntBE(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves a point on a given rectangle to the target point. Does not change the rectangles orientation. | function _movePointOnRectangleToPoint(rect, rectanglePoint, targetPoint) {
var leftCornerXDifference = rectanglePoint.x - rect.left;
var leftCornerYDifference = rectanglePoint.y - rect.top;
return _moveTopLeftOfRectangleToPoint(rect, { x: targetPoint.x - leftCornerXDifference, y: targetPoint.y -... | [
"function _movePointOnRectangleToPoint(rect, rectanglePoint, targetPoint) {\n\t var leftCornerXDifference = rectanglePoint.x - rect.left;\n\t var leftCornerYDifference = rectanglePoint.y - rect.top;\n\t return _moveTopLeftOfRectangleToPoint(rect, { x: targetPoint.x - leftCornerXDifference, y: t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Looks up ERA factor in Plan E | function lookupERA (age) {
return eraFactors[age];
} | [
"function e_value() {\n\treturn (Math.E);\n}",
"getTemfEarth() {\n var tempEarth = this.getTempEarth();\n var temf = tempEarth - 459.6;\n\n if (temf <= 0.0) temf = 0.0;\n\n return temf;\n }",
"static ToMetres(ac) {\n if (AltitudeCode.IsMetric(ac)) {\n throw \"Metric ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the UI style of a set of radio buttons | get styleRadioSet() { return Object.assign({}, this.style.common); } | [
"get styleRadio() { return Object.assign({}, this.style.common); }",
"getRadioBtnCss() {\n /*\n * if the radio button is managed through the RadioGroup control, its checked property is determined by its props\n * If the radio button is a stand-alone one, its checked property is determined by its own st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse Hero class data | function treatData(heroInfos) {
var hero = new Hero(heroInfos.image.url,
heroInfos.name,
heroInfos.biography["full-name"],
heroInfos.biography.aliases[0],
heroInfos.biography["place-of-birth"],
heroInfos.biography["alter-egos"],
heroInfos.appearance.height[1],
... | [
"function makeHero(data) {\n console.log(\"MakeHero Initial Data\", data);\n let superHero = {};\n superHero.id = data.id;\n superHero.name = data.name;\n superHero.description = data.description;\n superHero.image = !_.isEmpty(data.thumbnail) && data.thumbnail.path ? data.thumbnail.path + '.' + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Change the saved property of an article when the user clicks the 'Remove from Saved' button. | function removeSaved(event) {
event.preventDefault();
// Hide the tooltip for this element so that they don't hang
// around (Resolves display issues with tooltips for removed
// articles).
$(this).tooltip('hide');
// Get the article _id that was clicked. This comes fro... | [
"function articleSave() {\n var savingArticle = $(this)\n .parent(\".card\")\n .data();\n $(this)\n .parent(\".card\")\n .remove();\n \n savingArticle.save = true;\n $.ajax({\n method: \"PUT\",\n url: \"/api/headlin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether the tabs handles are visible and the selected tab ID based on the opened tabs | async updateTabs() {
// Make sure the selected tab ID is valid
let tab = await this.getTab(this.state.selectedTabID);
if (!tab) {
tab = this.state.tabs.find(tab => tab.visible);
if (tab)
await this.selectTab(tab.ID);
}
// Only show ... | [
"function selectTab(tabNum) {\n\tg_SelectedTab = tabNum;\n\tfor(var num in g_TabContainers) {\n\t\tg_TabContainers[num].visible = num == tabNum;\n\t}\n}",
"function showHideTabs() {\n $.each(tabArray, function (index, value) {\n if (((index < firstVisibleTabIndex) || (index > lastVisibleTabIndex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to add a timestamp to keep track of how fast we are running | function addTimeStamp() {
// Track our Fps
// http://www.growingwiththeweb.com/2017/12/fast-simple-js-fps-counter.html
const currentHighResTime = getPerformanceTimestamp();
while (fpsTimeStamps && fpsTimeStamps[0] < currentHighResTime - 1000) {
fpsTimeStamps.shift();
}
fpsTimeStamps.push(currentHighResT... | [
"stamp(){\n var cur = (new Date()).valueOf(); \n if( 0 == this.run_time_last_ ){\n this.run_time_accu_ = 0 ;\n }else{\n this.run_time_accu_ += cur - this.run_time_last_;\n }\n this.run_time_last_ = cur;\n }",
"function trackTime() {\r\n const now ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes a story id to find the story object | function findStoryFromStoryId(storyId) {
for (let story of storyList.stories) {
if (story.storyId === storyId) {
return story;
}
}
} | [
"function getStory(id){\n for (let story of storyList.stories) {\n if (story.storyId === id) {\n return story;\n }\n }\n \n}",
"function getStoryById(id) {\n for (let story of storyList.stories) {\n if (story.storyId === id) {\n return story;\n }\n }\n}",
"getById (id) {\n\t\treturn t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert news items object to html | function returnHtml(item){
var output = `<div class="newsitem"><div class="itemleft"><div class="itemimg"><img src="`+item.thumbnail+`"></div></div>`
+ `<div class="itemright"><div class="itemtitle">`+item.title+`</div>`
+`<div class="itemabstract">`+item.abstract+`</div>... | [
"function createOneNewsItemMarkup(news) {\n\t\t// determine language\n if(window.location.pathname.search(/ru/) !== -1) {\n\t\t\t//console.log(lang);\n return '<li class=\"news__list-item\">' +\n '<a href=\"'+ news.news_code +'/\">' +\n '<div class... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
With this handler you could prefetch the data for a specific project the moment the user move the mouse over the link | function handleMouseEnter(event) {
// In our case we could get the ID from the href so we use that
prefetchItem(event.target.getAttribute("href").slice(1))
} | [
"fetchProjects() {\n actions.fetchProjects();\n }",
"function projectSearchResultEvent() {\n projectClickFetchEvent();\n editProjectClickFetchEvent();\n memberClickFetchEvent();\n}",
"function loadProductProjects(productID)\n{\n link = createLink('product', 'ajaxGetProjects', 'productID=' ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call git fetch with a prune and quiet flag | async function doFetchBranches() {
const args = ['fetch', '-pq'];
await execGit(args);
} | [
"static async fetch() {\n try {\n await this.git(['fetch', '--unshallow']);\n } catch (error) {\n core.warning(`Fetch --unshallow caught: ${error}`);\n await this.git(['fetch']);\n }\n }",
"function sometimesPrune() {\n var next = startFetch;\n if (shouldPrune()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a cryptogram from the entered text | function createCryptogram(){
vm.cipher = {};
if(vm.quote){
killGuess().then(function(){
$meteor.call('createCryptogram', vm.quote).then(function(result){
if(result){
var answer = vm.quote.toLowerCase().slice(0);
vm.result = result;
vm.... | [
"function construct() {\n\t\tpassword = '';\n\t\tcharPlaceNumbers = [];\n\t\tpassword = generatePass(sentence, passSentence);\n\t\tdocument.getElementById('plainTextPass').value = password;\n\t\tdocument.getElementById('encodedPass').value = charPlaceNumbers.toString();\n\t}",
"function generateCipher() { \n l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Code derived from Sorts the entries of a list of entries by the date created, Oldest first. | function sortEntriesOldest(entries){
// Comparison function for sort
var date_sort = function (entry1, entry2) {
var date1 = Date.parse(entry1.dateAdded);
var date2 = Date.parse(entry2.dateAdded);
if (date1 > date2) return 1;
if (date1 < date2) return -1;
return 0;
};
console.log("sort oldest!");
entrie... | [
"function sortEntriesNewest(entries){\n\t// Comparison function for sort\n\tvar date_sort = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAdded);\n\t\tvar date2 = Date.parse(entry2.dateAdded);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n console.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update values in state based on user input, greying out used characters | handleChange(i, event) {
let values = [...this.state.values];
values[i] = event.target.value.toUpperCase();
this.setState({
values: values
});
// converting arrays
const fullChars = this.state.words.join("").split("");
const usedChars = values.join("").split("");
const copy = [.... | [
"removeInputLetter () {\n\t\tconst existed = this.state.input;\n\t\tlet postInput = (existed.length === 1) ? \"0\" : existed.slice(0, existed.length - 1);\n\t\tthis.setState({ input: postInput })\n\t}",
"changeInput(text) {\n console.log('the word in change input is ', this.state.word);\n this.setState({use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
loop through the icons and set the style | function render(icons){
for (var i = 0; i < icons.length; i++) {
setStyle(icons[i]);
}
//set class of last icon
icons[icons.length-1].className += " soc-icon-last";
} | [
"updateIcons_() {\n var color = this.getColor();\n if (color) {\n adjustIconSet(this.getId(), osColor.toHexString(color));\n }\n }",
"function renderIcons() {}",
"function setIconStyles() {\n var currentStyleSheet;\n for (var i = 0; i < document.styleSheets.length; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function triggered when the user clicks on the button allowing to create a new partition this button is showing a table where all attributes of a new partition need to be provided | function add_new_partition() {
//console.log ( ' ajouter une nouvelle partition ');
// show the table allowing to enter the new partition
$("#table_new_partition").show();
// hide the button
$("#button_new_partition").hide();
// show the button to record a new partition
$("#button_record_new_partition").show();
... | [
"function newPartitionOnChange() {\n\t//console.log ( ' new partition - something has changed ');\n\t// set the record button disabled\n\t$('#button_record_new_partition').prop('disabled', true);\n\t// filter the table with the patterns of the artist name and song name\n\tfilterPartitionsTable();\n\t// check if at ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper that does a preflight request to check auth, and prints the appropriate error message if auth fails or if this is a legacy passwordprotected app. If auth succeeds, then it runs the actual RPC. 'site' and 'operation' are the site and operation for the RPC. 'what' is a string describing the operation, for use in e... | function checkAuthThenSendRpc(site, operation, what) {
var preflight = authedRpc({
operation: operation,
site: site,
preflight: true,
promptIfAuthFails: true,
printDeployURL: true
});
if (preflight.errorMessage) {
Console.error("Couldn't " + what + ": " + preflight.errorMessage);
retu... | [
"function authedRpc(options) {\n var rpcOptions = Object.assign({}, options);\n var preflight = rpcOptions.preflight;\n delete rpcOptions.preflight;\n\n // Fetch auth info\n var infoResult = deployRpc({\n operation: 'info',\n site: rpcOptions.site,\n expectPayload: [],\n qs: options.qs,\n printD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows the horizontal scrollbar. | _showHorizontalScrollbar(show) {
const that = this;
that.showHorizontalScrollbar = show;
that._updateWidgetHeight('showHorizontalScrollbar');
if (show === true) {
that.$horizontalScrollbarContainer.removeClass('jqx-hidden');
if (that.type !== 'none') {
... | [
"function setupHorizontalScroll() {\n\t\t// Set horizontal scroll!\n\t\tvar sum = 0;\n\t\t$('.flow .primary > li').each( function(){ \n\t\t\tsum += $(this).outerWidth(); \n\t\t});\n\t\t$('.flow .primary').width( sum + 100 );\n\n\t\t// Set it the way I want it to look\n\t\t$('.overview .tab, #toggle-second').click()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializing a search on the store data | startSearching() {
// Initializing the pre search data so that the data can be recovered when search is finished
this._preSearchData = this.crudStore.getData();
} | [
"function initSearch() {\n\n let query = encodeURIComponent(`PREFIX skos:<http://www.w3.org/2004/02/skos/core#>\n PREFIX dcterms:<http://purl.org/dc/terms/>\n PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the selection cookie is not set, the page should give a message to the user informing them to go make a selection. | function selectItem(selectedItem){ //function built to select item store data of what was chosen and send what you chose to the selection.html
Cookies.set("color", selectedItem);
location.href = "/pages/selection.html";//makes it so when user choses an object it goes directly to page
} | [
"function checkSelection() {\n if (!store || store === \"Costco_invalid\") {\n feedback.innerHTML = \"Please select a valid Costco location\"\n $(feedback).css({\n color: \"red\"\n });\n $(feedback).show(0);\n $(feedback).fadeOut(2500);\n noStoreSelected = tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rolls back the most recent transaction | rollback() {
if (this.transactions.length === 0) {
return 'TRANSACTION NOT FOUND';
}
this.transactions.pop();
this.currentTransactionIndex--;
} | [
"rollback() {\n logMsg(`Rolled back order ${orderId} total calculation.`);\n }",
"function rollback() {\n var self = this;\n\n self._rollback.apply(self, arguments);\n}",
"rollback() {\n this.index = this.previous;\n }",
"function rollback(){\n if(state_log && state_log.leng... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |