query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Utility function to reload Blockly.Language functions. These next three functions are needed for any App Inventor blocks. Redefined here because we've redefined Blockly.Language TODO: This is a HACK that should be fixed, perhaps by writing a function to clear Blockly.Language of all its elements, preserving its functio... | function resetBlocklyLanguage() {
Blockly.Language.setTooltip = function(block, tooltip) {
block.setTooltip("");
}
Blockly.Language.YailTypeToBlocklyTypeMap = {
'number':Number,
'text':String,
'boolean':Boolean,
'list':Array,
'component':"COMPONENT",
'InstantInTime':Blockly.Language... | [
"function initQuizmeLanguage() {\n if (DEBUG) console.log(\"RAM: initQuizmeLanguage \");\n \n var whitelist = [];\n whitelist = whitelist.concat(MATH_BLOCKS).concat(LOGIC_BLOCKS).concat(VARIABLES_BLOCKS).concat(PROCEDURES_BLOCKS);\n whitelist = whitelist.concat(CONTROLS_BLOCKS).concat(LISTS_BLOCKS).concat(TEXT_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Team Constructor String TeamName String TeamColour Integer Number of Dice Integer Number of Backlog allowed Boolean true/false if backlog is prefilled // relevant only to first team Integer Maximum size of Activity > 7 means any activity can't take more than 7 units to finish | function Team(teamName, teamColour, numberOfDice, numberOfBacklog, backlogFilled, maximumTaskSize) {
this.teamName = teamName;
this.teamColour = teamColour;
this.numberOfDice = ((numberOfDice != null) ? numberOfDice : defaultNumberOfDice);
this.numberOfBacklog = ((numberOfBacklog != null) ? numberOfBac... | [
"function Team() {\n this.Team = undefined;\n this.Liga = undefined;\n this.Land = undefined;\n this.LdNr = 0;\n this.LgNr = 0;\n}",
"function Off_Teams(a_team){\n\tthis.against = a_team; // This is the team that the offense is built against\n\tthis.num = 0;\n\t\n\tthis.addTeam = function(team, sco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update movie collection changes from local storage | function updateLocalStorage(){
localStorage.setItem("movie_collection", angular.toJson($scope.movieList));
} | [
"updateListMovies() {\n this.listMovie.current.state.movies = this.state.moviesFiltred;\n this.listMovie.current.forceUpdate();\n }",
"addMovieToLS(data) {\n const movies = this.getMovieFromLS()\n movies.push(data)\n localStorage.setItem('movies', JSON.stringify(movies))\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
copy a key content | function copyKey(target, key) {
for (var i = 2; i < arguments.length; i++) {
if (key in arguments[i]) {
target[key] = arguments[i][key];
return;
}
}
} | [
"function copyTextToClipboard() {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = Key;\n textarea.style.display = \"hidden\";\n document.body.appendChild(textarea);\n textarea.focus();\n textarea.select();\n try {\n document.execCommand(\"copy\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the max height or width value from the given slice | function getMax(slice, prop) {
var max = 0;
slice.each(function () {
var size = $(this)[prop]();
if (size > max) max = size;
});
return max;
} | [
"function largestRectangle(h) {\n\n let stack = [];\n let mx = -1;\n stack.push(0);\n for (let i = 1; i < h.length; i++) {\n let last_index = stack.slice(-1)[0];\n let stack_h = h[last_index];\n let curr_h = h[i];\n if (curr_h > stack_h || stack.length == 0) {\n stack.push(i);\n }\n else ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update chart data on measure change | function measureChange() {
measure = document.getElementById(measureName + "-select").value;
updateColorAxis();
chart.series[0].setData(get_data());
} | [
"function measureChange() {\n measure = document.getElementById(measureName + \"-select\").value;\n updateData();\n }",
"function updateChartValue(){\r\n myChart.data.datasets[0].data[0] = sumNo;\r\n myChart.data.datasets[0].data[1] = sumYes;\r\n myChart.update()\r\n}",
"componentDidUp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when client changes the team. | function teamNameChanged(event, teamName){
self.teamName = teamName;
} | [
"acceptServerChanges() {\n this.props.updateCode(this.props.serverCode, this.props.projectName);\n this.props.startStreamingEditor();\n }",
"function goToTeamSelection(){\n clientValuesFactory.setActiveWindow(windowViews.selectTeam);\n }",
"changeName(newName) {\n this.name... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Turns projection depth coding on/off | function toggleDepthCoding(enabled) {
$('.proj-x, .proj-y, .proj-z').attr('depthCoded', enabled ? 1.0 : 0.0);
} | [
"function deOptimize() {\n\n\t\t// There is already no optimization occuring\n\t\tif ( params.level == 0 ) {\n\n\t\t\treturn\n\n\t\t// enable FXAA\n\t\t} else if ( params.level == 1 ) {\n\n\t\t\trenderer.setPixelRatio( window.devicePixelRatio );\n\t\t\tparams.level = 0 ;\n\n\t\t// set pixel ratio to the default dev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by PlSqlParsercluster_name. | visitCluster_name(ctx) {
return this.visitChildren(ctx);
} | [
"visitCreate_cluster(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitAlter_cluster(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitCluster_index_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"_createNodes() {\n // Test all statements for leadership\n // If they are leaders,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a videa is clicked and saves the videoId in SessionStorage | function videoClick(clickedVideo){
console.log('video es'+clickedVideo);
sessionStorage.setItem('videoid', clickedVideo);
} | [
"function video_click(e) {\n\t//console.log(e);\n\t//console.log(this);\n\tif (this.paused == true) {\n\t\tthis.play();\n\t} else {\n\t\tthis.pause();\n\t}\n}",
"function addVideo(e) {\n const id = (e.target.id !== 'addVideo')\n ? e.target.value\n : domCache['videoId'].value;\n const found... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is called when the split view changes based on the umbvariantcontent | function splitViewChanged() {
//send an event downwards
$scope.$broadcast("editors.content.splitViewChanged", { editors: vm.editors });
} | [
"function _handleSplitViewVertical() {\n MainViewManager.setLayoutScheme(1, 2);\n }",
"function closeSplitView(editorIndex) {\n // TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular\n var editor = vm.editors[editorIndex];\n ed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
change background color of bars | function changeBgColorOfBar(i, color) {
bars[i].style.backgroundColor = color;
} | [
"function highlightBar(bar) {\n bar.fillColor = \"rgba(186,0,0,0.1)\";\n bar.strokeColor = \"rgba(186,0,0,0.5)\";\n bar.highlightStroke = \"rgba(208,0,0,0.5)\";\n bar.highlightFill = \"rgba(186,0,0,0.05)\";\n}",
"function barColor(progress) {\n var intCol = interpolateColor(lowColor, medColor, prog... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the current window, but it assigns a returnValue first PARAM action String with the value that should be returned when the window closes (works for modal windows) | function closePopupForm(action) {
window.returnValue = action;
window.close();
} | [
"function exoduswindowclose(returnvalues) {\n\n //window.opener.gchildwin_returnvalue = returnvalues\n if (window.opener) {\n window.opener.focus()//for MSEDGE\n if (window.opener.exodus_setchildwin_returnvalue) {\n if (typeof returnvalues == 'undefined')\n returnvalues... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click to delete a task | 'click .delete'() {
Meteor.call('tasks.remove', this._id, (error) => {
if (error)
Bert.alert( 'An error occured: ' + error.reason + '! Only the creator of the task can delete it.', 'danger', 'growl-top-right' );
else
Bert.alert( 'Task removed successfully!', 'success', 'growl-top-right' );
});
} | [
"function deleteTask(){\n // get indx of tasks\n let mainTaskIndx = tasksIndxOf(delTask['colName'], delTask['taskId']);\n // del item\n tasks.splice(mainTaskIndx, 1);\n // close modal\n closeModal();\n // update board\n updateBoard();\n // update backend\n updateTasksBackend();\n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show a user's personal key information. | showPrivateKey() {
this.showKey(this.privateKey, true);
} | [
"formatUser() {\n\t\tconst user = this.currentUser();\n\t\treturn `\nName (Client Email): ${user.name}\nKey (Client ID): ${user.key}\nAPI Key ID: ${user.api_key_id}\nAPI Secret: ${user.api_secret}\nPublic Key: ${user.public_key}\nPrivate Key: ${user.private_key}\nPublic Signing Key: ${user.public_signing_key}\nPriv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Emits the change event as defined in AppConstants.CHANGE_EVENT | emitChange() {
this.emit(AppConstants.CHANGE_EVENT);
} | [
"on_change(ev){\r\n\t\tthis.val = this.get_value();\r\n\t\t// hack to get around change events not bubbling through the shadow dom\r\n\t\tthis.dispatchEvent(new CustomEvent('pion_change', { \r\n\t\t\tbubbles: true,\r\n\t\t\tcomposed: true\r\n\t\t}));\r\n\t\t\r\n\t\tif(!this.hasAttribute(\"noupdate\")){ //Send valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int Read (Variant, int) | Read(Variant, int) {
} | [
"function read(){\n\n }",
"function decodeTyped(){\n let res;\n let type = readByte();\n switch(type){ // Read Type\n case 0:\n res = readInt16();\n break;\n case 1:\n res = readAscii();\n break;\n case 2:\n res = readByte();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all displayed elements inside of a root node that match a provided selector | function getDisplayedNodes(rootNode, selector) {
if (!isHTMLElement(rootNode)) {
return;
}
const nodes = Array.from(rootNode.querySelectorAll(selector));
// offsetParent will be null if the element isn't currently displayed,
// so this will allow us to operate only on visible nodes
retur... | [
"function query(selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n }",
"function children(selector) {\n var nodes = [];\n each(this, function(element) {\n each(element.children, function(child) {\n if (!selector || (selector && matches(child, select... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the simulation modes to `sim_mode_id' dropdown | static fillSimModes(id, modes) {
const json = JSON.parse(modes);
const element =
document.querySelector(`#diseases-simulation-node_${id}-sim_mode`);
$(element).selectpicker('destroy');
CosmoScout.gui.clearHtml(element);
json.forEach((mode) => {
const option = document.createElement(... | [
"function select_simulations(itype, clusters, ligandonly, rev, stnd){\n \n //variables\n var simulationlist, code, URL, custombutton;\n\n //Get selected simulations dynIDs\n simulationlist = $(\".simulation_checkbox:checked\").map(function(){return $(this).attr(\"name\");}).get();\n\n //(Pseudo-)Random identi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
crop the image from the webcam region of interest: center portion | function cropImage(img) {
const size = Math.min(img.shape[0], img.shape[1]);
const centerHeight = img.shape[0] / 2;
const beginHeight = centerHeight - (size / 2);
const centerWidth = img.shape[1] / 2;
const beginWidth = centerWidth - (size / 2);
return img.slice([beginHeight, beginWidth, 0], [size, size, 3]);
} | [
"function cropCanvas(canvas, ctx) {\n var imgWidth = ctx.canvas.width;\n var imgHeight = ctx.canvas.height;\n var imageData = ctx.getImageData(0, 0, imgWidth, imgHeight),\n data = imageData.data,\n getAlpha = function (x, y) {\n return data[(imgWidth * y + x) * 4 + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates a new main_evolution_obj from the slider values. the main_evolution_obj is global. | function create_main_obj(){
chart_container.show();
var newValues={};
newValues.pop=population_slider.slider("value");
newValues.genome=genome_slider.slider("value");
newValues.mutate=mutation_prob_slider.slider("value");
newValues.fight=tournament_size_slider.slider("value");
newValues.gens... | [
"function createSlider() {\n\n //the value that we'll give the slider - if it's a range, we store our value as a comma separated val but this slider expects an array\n var sliderVal = null;\n\n //configure the model value based on if range is enabled or not\n if ($scope.model.config.enab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
logarithmic scaling all feature ranges so that circle radius always fits in [0,maxCircleRadius] for all properties | function featureLogScale(featureRange) {
let x = d3.scaleLog()
.domain([featureRange[0]+0.0001,featureRange[1]])
.range([1, maxCircleRadius]);
return x;
} | [
"function logMap(val, inMin, inMax, outMin, outMax) {\n\n // log( = infinity)\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[i] === 0) {\n arguments[i] = 0.0000000000000001;\n }\n }\n\n var minv = Math.log(outMin);\n var maxv = Math.log(outMax);\n\n var numerator = maxv - minv;\n v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by PlSqlParserdeallocate_unused_clause. | visitDeallocate_unused_clause(ctx) {
return this.visitChildren(ctx);
} | [
"visitSupplemental_plsql_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitUnpivot_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitDel_stmt(ctx) {\r\n console.log(\"visitSivisitDel_stmt\");\r\n return { type: \"DeleteStatement\", deleted: this.visit(ctx.exprlist()) };... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Button component that redirect to different page props: title: the title on the button target: the page the button is going to direct to size: aize of the button, must be Large or Small category: which category the button us linking to, optional category will also change the colour of the button options for category ar... | function LinkButton(props) {
const [title] = useState(props.title)
const [path] = useState(props.target)
const [category] = useState(props.category)
const [size] = useState(props.size + "Button")
let colour = "#F08A00"
let fontColour = "#F3EAC2"
//change the colour of the button based on th... | [
"renderPageButtons() {\n const { page, hits, perpage } = this.state;\n const last = Math.ceil(hits / perpage);\n const pages = pagination(page, last);\n const pageButtons = pages.map((pageNo) => {\n if (pageNo === 'First') {\n return <Button color=\"primary\" size=\"sm\" key={pageNo} onClick... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds to the builder the nodes in the form of a proper RDF list. | _addList(list) {
let head = rdf.nil;
const prefix = "list" + (++this.counters.lists) + "_";
for (let i = list.length - 1 ; i >= 0 ; --i) {
let node = N3.DataFactory.blankNode(prefix + (i + 1));
//this._addQuad(node, rdf.type, rdf.List);
this._addQuad(node, r... | [
"nodes(...args) {\n return this.node.list(...args);\n }",
"append(data) {\n if (this.head == null) {\n this.head = new Node(data);\n return;\n } \n\n let currentNode = this.head;\n while (currentNode.next != null) {\n currentNode = currentNode.next;\n }\n currentNode.next = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
args is an object that looks like the arguments for `getOptimizedRoutes` It can also have a `routeSortKey` property ('distance' or 'duration') | function getBestWaypoints (args) {
const routeSortKey = args.routeSortKey || 'distance'
return getOptimizedRoutes(args).then(function (routeWaypointPairs) {
return sortRoutesBy({routeWaypointPairs, routeSortKey})[0]
})
} | [
"function RouteSearchResultCollector() {\n\n}",
"routes(agencyTag, cb) {\n var routes = [ ];\n\n this._newRequest().query({ command: 'routeList', a: agencyTag }, function(e) {\n switch(e.name) {\n case 'error':\n cb(null, e.data);\n bre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a session with the set of launch parameters. | create(params) {
return __awaiter(this, void 0, void 0, function* () {
const session = new session_1.Session();
this.sessions.set(params.launchId, session);
session.onClose(() => this.sessions.delete(params.launchId));
session.onError(err => {
vsco... | [
"startNew(options) {\n let serverSettings = this.serverSettings;\n return session_1.Session.startNew(Object.assign({}, options, { serverSettings })).then(session => {\n this._onStarted(session);\n return session;\n });\n }",
"function buildInitialSession() {\n const ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get script object based on the `src` URL | function getScriptFromUrl(url) {
if (typeof url === "string" && url) {
for (var i = 0, len = scripts.length; i < len; i++) {
if (scripts[i].src === url) {
return scripts[i];
}
}
}
//return undefined;
} | [
"function extractScriptSrcs(scriptUrl) {\n return session.get$(scriptUrl).then(($) => {\n return $(SCRIPT_TAG_SELECTOR).toArray().map((el) => el.attribs.src);\n });\n}",
"function getSoleInlineScript() {\n\t var script;\n\t for (var i = 0, len = scripts.length; i < len; i++) {\n\t if (!scripts[i].... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds a `Touch` with a specific ID in a `TouchList`. | function findMatchingTouch(touches, id) {
for (var i = 0; i < touches.length; i++) {
if (touches[i].identifier === id) {
return touches[i];
}
}
return undefined;
} | [
"function finditembyid (id) {\n\tfor (var i = 0; i < food_pickup.length; i++) {\n\t\tif (food_pickup[i].id == id) {\n\t\t\treturn food_pickup[i]; \n\t\t}\n\t}\n\treturn false; \n}",
"function findPerson(id) {\n var foundPerson = null;\n for (var i = 0; i < persons.length; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get backgrounds elements in screen | function getElementsInScreen () {
return new Promise((resolve, reject) => {
elements.firstBackground = document.getElementById(firstBackground)
elements.secondBackground = document.getElementById(secondBackground)
if (elements.firstBackground && elements.secondBackground) resolve()
if (!elements.first... | [
"function getBackground() {\n if ($('body').css('backgroundImage')) {\n return $('body').css('backgroundImage').replace(/url\\(\"?(.*?)\"?\\)/i, '$1');\n }\n }",
"function get_background_image()\n{\n\t//Get bg image\n \t$('#instagram-feed .slick-active:not(.loaded)').each(function()\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the current host, including the protocol, origin and port (if any). Does not end with a trailing '/'. | function getHost() {
return location.protocol + '//' + location.host
} | [
"_getHostname() {\r\n let host = this._os.hostname() || '';\r\n if (host.indexOf('.') < 0) { // ignore if not FQDN\r\n host = '[127.0.0.1]';\r\n }\r\n else if (host.match(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/)) { // IP mut be enclosed in []\r\n host = `[${ho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
realestateobject update on PUT. | function realestateobject_update(req, res, next) {
console.log('Real estate object update');
RealEstateObjects.findByIdAndUpdate(req.params.id, req.body)
.then(realestateobject => {
res.send(realestateobject);
})
.catch(error => next(error));
} | [
"updateObject({dispatch, commit, state, getters}, data) {\n var config = {data: prepareData(data, state.prepare) };\n config.method = 'PUT';\n config.url = getters.urlID;\n return dispatch('callAPI', config, {root:true}).then(response=>{\n commit('updateModel', response.data);\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the center of the cluster by taking the mean of the x and y coordinates. | function computeClusterCenter(cluster) {
return [
d3.mean(cluster, function(d) { return d.x; }),
d3.mean(cluster, function(d) { return d.y; })
];
} | [
"static centroid(cluster) {\n // NOTE: latitude [-90, 90] (South-North)\n // longitude [-180, 180] (West-East)\n let x = 0, y = 0, z = 0 // Cartesian coordinates\n for (let i = 0; i < cluster.stops.length; ++i) {\n let lat = cluster.stops[i].latitude / 180 * Math.PI\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get html contents from assets directory | retrieveHtml() {
const html = fs.readFileSync('./assets/plano.html', 'utf-8')
return html
} | [
"function getHtmlContent(){\n \n }",
"function assetsTask() { return src('assets/**/*') .pipe(dest('dist/assets')) }",
"function getAllAssets() {\n return new Promise((resolve, reject) => {\n if (!process.env.API_URL_LIST) {\n console.log(process.env.API_URL_LIST);\n reject('No U... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lista todos os pedidos de um cliente especifico | async listAllClientRequests(req, res) {
try {
const id_cliente = req.clientId.id;
const requests = await Request.find({
id_cliente,
}).populate(["produtos", "id_empresa"]);
const count = requests.length;
if (count === 0)
return res.status(404).send({ NOTFOUND: "Nenhu... | [
"function mostrarProductoC(cliente) {\n console.log(\"***************************\");\n cliente.forEach((client) => {\n console.log(\"ID CLIENTE \" + client.id);\n console.log(\"NOMBRE CLIENTE \" + client.name);\n console.log(\"EMAIL \" + client.email);\n console.log(\"EDAD \" + client.age);\n cons... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reset callbacks that only fire once, so they can fire agan | resetCallbacks() {
for ( let i = 0; i < this._callbacks.length; ++i ) {
this._callbacks[ i ].called = false;
}
} | [
"clearCallbacks() {\n this._callbackMapper.reset();\n }",
"function resetAllEvents(){\n\t\t\tevents.forEach( ev => { \n\t\t\t\tev.button.gotoAndStop(0);\n\t\t\t\tev.button.cursor = \"pointer\";\n\t\t\t\tev.choosen = false; \n\t\t\t});\n\t\t\t// update instructions\n\t\t\tself.instructions.gotoAndStop(0)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses a time string and returns a Date | function parseTime(str) {
let segments = str.split(':');
let hour = parseInt(segments[0]) % 12;
let min = parseInt(segments[1].substr(0, 2));
let suf = segments[1].substr(2, 2);
if (suf === 'pm') hour += 12;
let date = new Date(1970, 1, 1, hour, min, 0);
return date;
} | [
"function parseTime(str) {\n\t if (!str) {\n\t return 0;\n\t }\n\t\n\t var strings = str.split(\":\");\n\t var l = strings.length, i = l;\n\t var ms = 0, parsed;\n\t\n\t if (l > 3 || !/^(\\d\\d:){0,2}\\d\\d?$/.test(str)) {\n\t throw new Error(\"tick on... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create an obscure path for calling cron in order to provide a little extra security | function _createCronPath(){
return new Promise(function(resolve, reject){
let len = 32;
crypto.randomBytes(len, function(err, cronPath){
if(err){ return reject(err); }
cronPath = cronPath.toString('base64'); // convert from buffer to text
// remove any percent signs as a precaution to ensur... | [
"function startCron() {\n fs.readdirSync(__dirname).filter(file =>\n (file.lastIndexOf('.js') >= 0) && (file !== 'index.js')\n ).map((file) => {\n const config = require(path.join(__dirname, file)).default;\n cron.schedule(config.expression, config.func, true);\n if (config.immediateStart) {\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cheking to see if a slider goes outside a swipable area. If so depending on the direction accordingly assigning a true value to the variables: leftSide and rightSide | function checkSlidersEdges () {
let outer = obj.getBoundingClientRect();
let inner = innerSlider.getBoundingClientRect();
// Check to prevent a swipe of the first slide to the right
if ( parseInt( innerSlider.style.left ) >= 0 ) {
settings[`${obj.id}`].boundary = true;
settings[`${ob... | [
"function checkBoundries() {\n if (x > 560) { // if ship is more than the right of the screen\n rightMove = false; // stop it moving\n } else if (x < 40) { // if ship is more than the left of the screen\n moveLeft = false; // stop it moving\n }\n if (y > 560) { // if ship is more than the bottom of the sc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens MOS card video overlay | function openOverlay(e) {
const videoWrapper =
e.target.parentNode.parentNode.parentNode.parentNode.children[0];
const videoWrapperInner = e.target.parentNode.parentNode;
const mosVideo = videoWrapper.children[0];
videoWrapper.style.display = "block";
videoWrapperInner.style.visibility = "hid... | [
"function openVideo() {\r\n\t\tTitanium.Platform.openURL(movie.trailerUrl);\r\n\t}",
"function w3_openvd() {\n\tdocument.getElementById(\"closevideo\").style.display = \"block\";\n}",
"addMedia() {\n\n this.mediaFrame.open();\n }",
"function startVideo() {\n mini_peer.setLocalStreamToElement({ vide... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asserts that an IndexedDbStore is associated with a database. | _assertDb () {
if (!this._db) throw new Error(IndexedDbStore.errMsgs.NO_DB)
} | [
"function createDb(){\n const createDb = window.indexedDB.open('crm',1);\n\n createDb.onerror = () => console.log('Hubo un error');\n\n createDb.onsuccess = () => DB = createDb.result;\n\n createDb.onupgradeneeded = e => {\n const db = e.target.result;\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add coin when switch button clicked | function addActiveCoin(inptSwtch, coin) {
inptSwtch
.unbind("click")
.bind("click", () => removeActiveCoin(inptSwtch, coin));
coin.checked = true;
//save in state active coins
state.activeCoins.push(coin);
let activeListFull = checkIfTheActiveListFull();
if (activeListFull) {
... | [
"updateCoinCount(){\n\t\t$(`#coinCount${this.playerId}`).text(`${this.coinCount}`);\n\t}",
"function addEventToSwitch(inptSwtch, coin) {\n let checkSelected = isCoinSelected(coin);\n if (checkSelected) {\n inptSwtch\n .attr(\"checked\", true)\n .bind(\"click\", () => removeActiveCoin(inpt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flattens the raw errors. | errors() {
return ys(this.rawErrors, (e) => e.join(`
`));
} | [
"rawErrors() {\n return p.validationErrors(this.stack);\n }",
"getErrorsAsString() {\n\t\tif (!this.items || !this.items.error || this.items.error.length <= 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tconst str = this.items.error.join(\". \");\n\t\treturn str;\n\t}",
"function transformAjvErrors() {\n\t var e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy longitude, latitude to clipboard | copyLnglat () {
const lnglat = `${this.clickLatlng.lng}, ${this.clickLatlng.lat}`
if (this.copyToClipboard(lnglat)) {
this.showSuccess(this.$t('mapLeftClick.lnglatCopied'), { timeout: 2000 })
}
} | [
"function copyToClipboard() {\n const el = document.createElement('textarea');\n el.value = event.target.getAttribute('copy-data');\n el.setAttribute('readonly', '');\n el.style.position = 'absolute';\n el.style.left = '-9999px';\n document.body.appendChild(el);\n el.select();\n document.execCommand('copy')... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a sign depending on the charge. | function getSign(charge) {
if (charge > 0) {
return '+';
} else if (charge < 0) {
return '-';
}
return '0';
} | [
"function charge(d) {\n return -Math.pow(d.radius, 2.0) / 8;\n }",
"function signTest() {\n var signFlag1 = (numbers[0].indexOf('-') !== -1); //true if there, false if not there\n var signFlag2 = (numbers[1].indexOf('-') !== -1);\n \n //If numerator and denominator are both n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to be called by clicking on buttons for setting the duration. Accepts a number of minutes or a string. | function setDuration (minutes) {
// sets etaDuration to passed in value
etaDuration = minutes;
var buttons = document.querySelectorAll("button");
for (var i = 0; i < buttons.length; i++) {
buttons[i].classList.remove('active');
}
document.getElementById('button'+minutes).classList.add("active");
} | [
"function increaseDuration() {\n let maxDuration = 4; // MODDABLE\n let durationDisplay = $(\"selectedDuration\");\n let duration = parseInt(durationDisplay.textContent);\n if (duration < maxDuration) {\n let hr = parseInt($(\"selectedHour\").textContent);\n // if n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the etag header if an entity was found. | function setEtag (ctx, entity, options) {
if (!entity) return
ctx.res.set('ETag', calculate(entity, options))
} | [
"function doesEtagMatch (request, response) {\n const etag = response.getHeader('etag')\n if (!etag) return false\n const target = request.getHeader('if-none-match')\n if (!target) return false\n return etag === target\n}",
"function ETagStream() {\n\n // Call super constructor.\n stream.Writable.call(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Concatenate a 2D source of sources, returning a new accumulatable 1D source where items are ordered by source order. concat([[1, 2, 3], ['a', 'b', 'c']]) >> | function concat(source) {
return accumulatable(function accumulateConcat(next, initial) {
function nextAppend(a, b) {
if(b === end) return accumulate(a, next, initial);
return a === null ? b : append(a, b);
}
accumulate(source, nextAppend, null);
});
} | [
"function Concatenate() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Concatenate);\n\n var _this = _possibleConstructorReturn(this, (Concatenate.__proto__ || Object.getPrototypeOf(Concatenate)).call(this, attrs));\n\n _this.layerClass ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new Vector4 set with the multiplication result of the current Vector4 and the given one. | multiply(otherVector) {
return new Vector4(this.x * otherVector.x, this.y * otherVector.y, this.z * otherVector.z, this.w * otherVector.w);
} | [
"multiplyToRef(otherVector, result) {\n return result.copyFromFloats(this.x * otherVector.x, this.y * otherVector.y, this.z * otherVector.z);\n }",
"clone() {\n return new Vector4(this.x, this.y, this.z, this.w);\n }",
"multiplyToRef(q1, result) {\n const x = this.x * q1.w +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
colorButton addEventListener click > / Turn off colors / window.localStorage.setItem('color', "false") | function startColor() {
// set color to true
window.localStorage.setItem("color", "true");
// remove eventListener
colorButton.removeEventListener("click", startColor);
colorButton.addEventListener("click", stopColor);
colorButton.textContent = "Turn colors off";
let html = document.querySelector("html");... | [
"function colorizeButton() {\n document.getElementById(\"colorizeBtn\").addEventListener(\"click\", function () {\n colorMode == \"Colorize\" ? colorMode = \"Normal\" : colorMode = \"Colorize\";\n });\n}",
"function shaderButton() {\n document.getElementById(\"shaderBtn\").addEventListener(\"click... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders the AWS CloudFormation properties of an `AWS::LookoutMetrics::Alert.Action` resource | function cfnAlertActionPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnAlert_ActionPropertyValidator(properties).assertSuccess();
return {
LambdaConfiguration: cfnAlertLambdaConfigurationPropertyToCloudFormation(properties.lambdaConfigura... | [
"function cfnAlertPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnAlertPropsValidator(properties).assertSuccess();\n return {\n Action: cfnAlertActionPropertyToCloudFormation(properties.action),\n AlertSensitivityThreshold: cdk.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add enemy kill count to the score bonus timer | addCount( points, isBoardWipeDeath ){
let self = this
this.points.push(points)
if( !isBoardWipeDeath ) this.hitCount++
if( !this.timer ){
this.timer = this.game.time.events.loop(100, ()=>{
self.interations++
if( !self.startTime ) self.startTime = self.game.time.totalElapsedSeconds()
//cons... | [
"function timeAttack() {\n ui.setText(\"EnemyCounter\", \"\");\n if (game.enemiesAlive == 0 && !game.waveActive) {\n ui.setText(\"Timer\", Math.floor(game.countDown));\n waveCooldown();\n } else if (game.waveActive) {\n game.countDown = game.countDown - (1 / 60);\n ui.setText(\"Timer\", Math.floor(ga... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a control that recenters the map on Chicago. | function createCenterControl(map) {
const controlButton = document.createElement("button");
// Set CSS for the control.
controlButton.style.backgroundColor = "#fff";
controlButton.style.border = "2px solid #fff";
controlButton.style.borderRadius = "3px";
controlButton.style.boxShadow = "0 2px 6px rgba(0,0,... | [
"function bicycleControl(map) {\n\n // Initialize control div\n var controlDiv = document.createElement('div');\n map.controls[google.maps.ControlPosition.TOP_RIGHT].push(controlDiv);\n controlDiv.id = 'maptype_button';\n controlDiv.title = 'Show bicycle map';\n controlDiv.innerHTML = 'Bicycling';\n\n // Ini... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
timerNav is how I created the timer | function timerNav() {
if (timerStart == false) {
setInterval(nextStudent, 5000);
timerStart = true;
};
} | [
"function timerJuego() {\n // Genera el letrero del timer\n mensajeTimer = pad(minutos) + \":\" + pad(segundos);\n // Muestra el timer en la página\n $(\"#labelTimer\").text(mensajeTimer);\n // Verifica si se debe pasar el siguiente minuto\n if (segundos == 59) {\n segundos = -1;\n minut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reports a list of PR base on the input array of github PR json objects | reportPRList( dataPR ) {
if( dataPR === undefined ) {
return(
<div><h3>Array was undefined</h3></div>
);
}
if( dataPR.length === 0 ) {
return(
<div><h3>Found no data</h3></div>
);
}
return(
dataPR.map( eachElement => (
<PullRequest key={eac... | [
"reportPRListDetailed( dataPR ) {\n if( dataPR === undefined ) {\n return(\n <div><h3>Array was undefined</h3></div>\n );\n }\n\n if( dataPR.length === 0 ) {\n return(\n <div><h3>Found no data</h3></div>\n );\n }\n\n var githubPRsDataDetailed;\n\n githubPRsDataDet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays a specific beer object to the user. | function displayBeer(beer) {
console.log(beer);
$(".beerList").hide();
// Assign beer display stuff
$('.singleBeer').show();
} | [
"function apiShow(req, res) {\n //console.log('GET /api/breed/:name');\n // return JSON object of specified breed\n db.Breed.find({name: req.params.name}, function(err, oneBreed) {\n if (err) {\n res.send('ERROR::' + err);\n } else {\n res.json({breeds: oneBreed});\n }\n });\n}",
"function ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns adventure chosen from home list | getChosenAdventure(){
return chosenAdventure;
} | [
"getCurrentAdventure() {\n\t\t\treturn currentAdventure;\n\t\t}",
"getCurrentAdventureName() {\n\t\t\treturn currentAdventure.adventure[0].title;\n\t\t}",
"setChosenAdventure(newAdventure){\n\t\t\tchosenAdventure = newAdventure;\n\t\t}",
"function getComputerChoice(){\n\t//constant variables \n\tconst choices... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the specified stream with the given code. The QuicStream object will be destroyed. | [kStreamClose](id, code) {
const stream = this.#streams.get(id);
if (stream === undefined)
return;
stream.destroy();
} | [
"[kClose](family, code) {\n // Do nothing if the QuicSession has already been destroyed.\n if (this.#destroyed)\n return;\n\n // Set the close code and family so we can keep track.\n this.#closeCode = code;\n this.#closeFamily = family;\n\n // Shutdown all pending streams. These are Streams t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return list of files on the remote directory. | function getRemoteFiles(remote) {
var deferred = Q.defer();
ftp.ls(remote, function(err, res) {
if (err) {
deferred.reject(new Error(err));
} else {
deferred.resolve(res);
}
});
return deferred.promise;
} | [
"function getLocalFiles(local) {\n return fs.readdirSync(local);\n}",
"async function getRemoteFileTree({path, fromName='getRemoteFileTree'}) {\n\treturn new Promise(async (resolve, reject) => {\n\t\ttry {\n\t\t\tconst command = buildRemoteFindCommand(path);\n\t\t\tconst result = await executeRemoteCommand(comma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns object with id and view params (if present) of the view | function parseViewData(view) {
var data = {};
var params = parseViewParams(view);
if (params != null) {
data = params;
}
var id = $(view).parseData('id');
data.id = id;
return data;
} | [
"getViews() {\n const viewMap = {};\n this.views.forEach(view => {\n viewMap[view.id] = view;\n });\n return viewMap;\n }",
"getViewState(viewOrViewId) {\n const view = typeof viewOrViewId === 'string' ? this.getView(viewOrViewId) : viewOrViewId; // Backward compatibility: view state for sing... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of a point in the polynomial. | function polynomialValue(poly, point) {
let value = new math.Fr(0n)
let pow = 1n
for (let i = 0; i < poly.length; i++) {
value = value.add(new math.Fr(poly[i]).multiply(pow))
pow *= point
}
return value.value
} | [
"function getFunctionValue(func, point) {\n return func[0] * point.x + func[1] * point.y + func[2] * point.x * point.y + func[3];\n }",
"function calculateCurvePoint(coeffs, x) {\r\n return Math.floor(Math.pow(x, 3) * coeffs[0] + Math.pow(x, 2) * coeffs[1] + x * coeffs[2] + coeffs[3])\r\n}",
"function po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new MachineDetectionConfiguration. | constructor() {
MachineDetectionConfiguration.initialize(this);
} | [
"constructor() { \n \n ComputeInfoProtocol.initialize(this);\n }",
"constructor() { \n \n ConfigHash.initialize(this);\n }",
"constructor() { \n \n DetectionDetailsResponse.initialize(this);\n }",
"function createInstance() {\n /**\n * Initialize the c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
General functions for access, creation and modification of the website returns all elements of a tag where attribute attr contains value | function getElementsByAttribute(tag, attr, value) {
return document.evaluate('//'+tag+'[contains(@'+attr+',"'+value+'")]', document, null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
} | [
"function getAttributes()\n{\n var u = document.getElementById(\"w3r\").href;\n alert(('href value is : '+u));\n\n var v = document.getElementById(\"w3r\").hreflang; \n alert((' hreflang is : '+v));\n\n var w = document.getElementById(\"w3r\").rel; \n alert(('Link value is : '+w));\n\n var x = document.getEleme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The function saveMeme attempts to save the meme to the database | function saveMeme() {
//Get the meme data as provided by the user
var title = document.getElementById("title").value;
var topText = document.getElementById("topText").value;
var bottomText = document.getElementById("bottomText").value;
var fontSize = document.getElementById("fontSize").value;
va... | [
"function addMemeToAccount(uid, meme) {\n let topText = meme.topText;\n let bottomText = meme.bottomText;\n let imageURL = meme.backgroundImage;\n let memeUri = meme.memeUri;\n var d = new Date().toString();\n db.ref(\"profile/\" + uid + \"/memes\")\n .push({\n topText: topText,\n bottomText: bot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: checkProjectName Checks whether the current projects name is a valid one or not. | function checkProjectName( name ) {
return !!name && name !== _projectTitlePlaceHolderText;
} | [
"hasProject(name) {\n return this.allWorkspaceProjects.has(name);\n }",
"function checkServerName(serverName) {\n const validationResult = validateProjectName(serverName);\n if (!validationResult.validForNewPackages) {\n error(\n chalk.red(`Cannot create a project named ${chalk.green(`\"${serverName... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the old translateNested2 helper function. Translates e.g. "health(e1)" to "e1_health". | function translateNested2(x){
var newX = x;
if (x.indexOf("(")>0){
// Find inner and outer terms.
var innerStart = x.indexOf("(");
var innerEnd = x.indexOf(")");
var inside = x.substring(innerStart+1,innerEnd);
var outside = x.substring(0,inner... | [
"function translateNested(x){\n var newX = x;\n if (x.indexOf(\"(\")>0){\n // Find inner and outer terms.\n var innerStart = x.indexOf(\"(\");\n var innerEnd = x.indexOf(\")\");\n var inside = x.substring(innerStart+1,innerEnd);\n var outside = x.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A function to switch between two objects | function toggleBetween(obj1, obj2) {
toggle(obj1);
toggle(obj2);
} | [
"switchPlayers(){\n if(this.currentPlayer == this.player1){\n this.currentPlayer = this.player2;\n }\n else this.currentPlayer = this.player1;\n }",
"_changeTarget() {\n this._targetPlanet =\n this._targetPlanet === this._redBigPlanet\n ? this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this will be responsible for updating the score | function updateScore() {
} | [
"set score(newScore) {\r\n score = newScore;\r\n _scoreChanged();\r\n }",
"function updateScore() {\n\t\t\t// Score rule: pass level n in t seconds get ((100 * n) + (180 - t)) points \n\tlevelScore = (levelTime + 100) + Math.floor(levelTime * (currentLevel-1));\n\t// Set original \"levelScore\" to extraLev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the items corresponding to the cases selected by the user. When no cases are selected, all the case are returned as "selected." | getSelectedItems(context) {
return this.codapInterface.sendRequest({
action: 'get',
resource: `dataContext[${context}].selectionList`
}).then(result => {
let selectedItems;
if (result.success) {
let caseIDs = result.values.map(v => v.caseID... | [
"get selectedDataItems() {\n return this.composer.queryItemsByPropertyValue('selected', true);\n }",
"function renderSelection()\r\n{\r\n var totalZbllSel = 0;\r\n for (var oll in zbllMap) if (zbllMap.hasOwnProperty(oll)) {\r\n var ollNoneSel = true, ollAllSel = true; // ollNoneSel = 0 sele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the new value in the patch if its actual value in the contact is different | function addInPatch(patch, contact, property, newValue) {
if (JSON.stringify(newValue) !== JSON.stringify(contact[property])) {
// adds the property:value in the patch
patch[property] = newValue;
// updates the contact property
contact[property] = newValue;
... | [
"function patchContact(contact) {\n var patch = { id: contact.id };\n if (rnd(-10)) {\n if (addInPatch(patch, contact, 'firstname', faker.name.firstName())) {\n addInPatch(patch, contact, 'homeemail', createEmailAddress(contact.firstname, contact.lastname));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the value at location index in the TensorArray. | read(index) {
if (this.closed_) {
throw new Error(`TensorArray ${this.name} has already been closed.`);
}
if (index < 0 || index >= this.size()) {
throw new Error(`Tried to read from index ${index}, but array size is: ${this.size()}`);
}
const tensorWithSt... | [
"getAt(idx) {\n try {\n if (idx >= this.length || idx < 0) throw new Error('Index is invalid!');\n return this._getNode(idx).val;\n } catch (e) {\n console.warn(e);\n }\n }",
"function getValueAtIndex(chart, index) {\n return chart.data()[0].values[index].value;\n }",
"readD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
loads JSON file and reinstantiates CARender based upon it | static LoadCARender(json, callback)
{
// stops attempting to load file if there is no file
if (json === undefined)
{
return;
}
json.text(); // begins asynchronous call to load json
json.text().then( (text) =>
{
var obj = JSONConverter... | [
"function LoadJson(){}",
"function init() {\n loadJSON(function(response) {\n let actual_JSON = JSON.parse(response);\n triggered(actual_JSON);\n });\n}",
"function initialize () {\n\n request(\"slideshow.json\", parseData);\n\n}",
"static loadJson(pathToJson) {\n\t\tconsole.log(\"Loadi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Map the given display option to a numeric point value. | mapDisplayToPoints(displayOption) {
switch (displayOption[0]) {
case 'one-third': return 1;
case 'two-thirds': return 2;
case 'full': return 3;
default: return 0;
}
} | [
"function updateDisplay(value) {\n string = value.toString();\n if (string.length > 11) {\n displayValue = value.toPrecision(11);\n }\n document.getElementById(\"output\").innerHTML = displayValue;\n return;\n}",
"getDisplayValue() {}",
"function csys_display(value)\n{\n //value can be: yes or... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether the given properties match those of a `CfnVirtualServiceProps` | function CfnVirtualServicePropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON... | [
"function CfnVirtualGatewayPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but receive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SVGR has dropped some elements not supported by reactnativesvg: filter | function SvgShop(props) {
return (
<Svg
width={27}
height={24}
viewBox="0 0 27 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className=""
{...props}
>
<G filter="url(#Shop_svg__filter0_ii)" fill="currentColor">
<Path d="M8.7 15.834h14.345a.791.791 0... | [
"function SvgProfile(props) {\n return (\n <Svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"\"\n {...props}\n >\n <G filter=\"url(#Profile_svg__filter0_ii)\">\n <Path\n d=\"M20.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return original DOM references which are polluted by tags | function getOriginalDomRefs( reference, relation, offset ) {
var refNodeFound = false,
prevSib;
if( relation === "prev-sib" ) {
offset += reference.innerHTML.length;
}
else if( relation === "parent" || relation === "none" ) {
relation = "prev-sib";
}
prevSib = reference.previousSibling;
while( ... | [
"visitReferencing_element(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"getDOMStrings() {\n return DOMstrings;\n }",
"getImagesTags() {\n return [...this._currentDom.getElementsByTagName(\"img\")];\n }",
"function preserveWrapperATag(newMarkup) {\r\n var range = sc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setUpListeners adds the annotationOnClick function to each of the tags encountered in the genius lyrics. this will be used instead of the href genius uses to bring up the annotations | function setUpListeners() {
var i = 0;
for(i = 0; i < linkIds.length; i++) {
var anchor = document.getElementById(linkIds[i]);
$('#'+linkIds[i]).click(function() {
annotationOnClick(this.id);
});
}
} | [
"function addOnClicks(relevantHtml) {\n var relHTML = relevantHtml.replace(\"<p>\", \"\");\n relHTML = relHTML.replace(\"</p>\", \"\");\n \n var html = $.parseHTML(relHTML);\n //console.log(relevantHtml);\n var links = $(\".lyrics\", html);\n //iterate over links and add onclick and remove href to <a>\n f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize communication with the parent frame. This should not be called until the app's custom listeners are registered (via our 'addListener' public method) because, once we open the communication, the parent window may send any messages it may have queued. Messages for which we don't have handlers will be silently ... | function initialize() {
if (isInitialized) {
return;
}
isInitialized = true;
if (window.parent === window) return;
// We kick off communication with the parent window by sending a "hello" message. Then we wait
// for a handshake (another "hello" message) from the parent window.
startP... | [
"init() {\n this._eventLoop.on(EventNames.APP_NAVIGATION_MENU_LOAD, () => this._loadMenu());\n this._eventLoop.on(EventNames.MENUITEMS_OPENPREFERENCES, (evt) => this._handleOpenPreferences(evt.evtData));\n this._eventLoop.on(EventNames.MENUITEMS_OPENGENIUS, (evt) => this._handleOpenGenius(evt.e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear the user projection if set. Note that this method is not yet a part of the stable API. Support for user projections is not yet complete and should be considered experimental. | function clearUserProjection() {
userProjection = null;
} | [
"function unproject(coord) {\n return map.unproject(coord, map.getMaxZoom());\n}",
"unproject(xy) {\n Object(_utils_assert__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(this.internalState);\n const viewport = this.internalState.viewport || this.context.viewport;\n return viewport.unproject(xy);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add controls to the figure for the current color system. This requires that the visualization is inside a .figure and that this .figure contains a .visualizationcontrols. | init_controls() {
if (this.$controls.length == 0) {
return;
}
this.color_system_controls = make_sliders_for_color_system(this.color_system, this.$controls);
// fullscreen button
if (!this.$figure.find('.fullscreen-button').length) {
// if no fullscreen bu... | [
"init_advanced_controls(color_system_name) {\n let that = this;\n if (this.$figure.find(\".visualization-controls-advanced-toggle\").length == 0) {\n /* Add toggle for showing/hiding controls. */\n this.$controls_advanced.before(\n '<h3 class=\"visualization-contro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GFV[] Get Freedom Vector 0x0C | function GFV(state) {
var stack = state.stack;
var fv = state.fv;
if (exports.DEBUG) { console.log(state.step, 'GFV[]'); }
stack.push(fv.x * 0x4000);
stack.push(fv.y * 0x4000);
} | [
"static FromFloatArrayToRef(array, offset, result) {\n Vector4.FromArrayToRef(array, offset, result);\n }",
"static FromFloatArray(array, offset) {\n return Vector3.FromArray(array, offset);\n }",
"static FromFloatArrayToRef(array, offset, result) {\n return Vector3.FromArra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to update the prominently displayed episode title and number | function updateEpisode(episode, episodeIndex) {
$('.episodeNumber')
.text(episodeIndex+1)
.next().text(episode.title);
} | [
"function UpdateDVDTitle() {\n\n\tif (g_bFirstPlaying) {\n\t\tTitleFull.Text = L_DVDPlayer_TEXT;\n\t\tTitle.Text = L_DVDPlayer_TEXT;\n\t}\n\n\telse {\n\t\ttry { \n\t\t\tnTitle = DVD.CurrentTitle;\n\t\t\tnChap = DVD.CurrentChapter;\n\n var tempstr = L_DVDPlayerTitleChapter_TEXT.replace(/%1/i, nTitle).repl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Event for pressing on open string to toggle it closed. | function toggleStringClosed(el) {
let isChecked = el.getAttribute('data-checked')
let colNum = parseInt(el.id.split('-')[1]);
isChecked == "false" ? isChecked = "true" : isChecked = "false"
// el.innerHTML = ( isChecked == "true" ? "X" : "O");
if(isChecked == "true") {
// set X and -1 for the pressed... | [
"_onOpen(ev) {\n ev.getData().set(this._tree.getOpenProperty(), true);\n }",
"function ontoggle() {\n selected = !selected;\n logic.ontoggle(selected);\n }",
"function open() {\n\n this.classList.toggle(\"open\");\n }",
"function toggle_button(event_target) {\r\n\tvar event_ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Website select The has_website function uses dc.js to make an HTML select element based on whewther or not the customer has a website. This function is called from the makeGraphs function. | function has_website(ndx) {
var dim = ndx.dimension(dc.pluck('website'));
var group = dim.group();
dc.selectMenu("#website-selector")
.dimension(dim)
.group(group)
.order(function (a,b) { return a.value > b.value ? 1 : b.value > a.value ? -1 : 0;});
} | [
"function displayWebsitesOnCategorySelect(websites) {\n\tdeleteAllWebsites();\n\n\tif(websites.length === 0) return;\n\n\tfor(var i = 0; i<websites.length; i++){\n\t\tcreateWebsiteElement(websites[i].name,websites[i].url);\n\t}\n}",
"function makeGraphs(data) {\n \n var ndx = crossfilter(data);\n \n has_web... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TimedEvent is a base type for any entity in the trace model with a specific start and duration. | function TimedEvent(start) {
tr.model.Event.call(this);
this.start = start;
this.duration = 0;
this.cpuStart = undefined;
this.cpuDuration = undefined;
// The set of contexts this event belongs to (order is unimportant). This
// array should never be modified.
this.contexts = Object.free... | [
"function FlowEvent(category, id, title, colorId, start, args, opt_duration) {\n tr.model.TimedEvent.call(this, start);\n\n this.category = category || '';\n this.title = title;\n this.colorId = colorId;\n this.start = start;\n this.args = args;\n\n this.id = id;\n\n this.startSlice = undefi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
START/STOP/PAUSE Bind start/stop/pause events from the clock and emit them. | _bindClockEvents() {
this._clock.on("start", (time, offset) => {
offset = new _Ticks.TicksClass(this.context, offset).toSeconds();
this.emit("start", time, offset);
});
this._clock.on("stop", time => {
this.emit("stop", time);
});
this._clock.on("pause", time => {
this.emit... | [
"function playbackEvents () {\n\n\t\tvar play = document.getElementById('play');\n\t\tvar overlayPlay = document.getElementById('overlay-play');\n\t\tvar pause = document.getElementById('pause');\n\t\tvar overlayPause = document.getElementById('overlay-pause');\n\t\tvar previous = document.getElementById('previous'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
si se usa este evento en otro js, borrar este y ejecutar la funcion loadUser() dentro de la otra funcion | function loadUser() {
makeHTTPRequest(`/usuarios/0`, 'GET', '', cbOk1);
} | [
"function loadUser() {\n console.log(\"loadUser() started\");\n showMessage(\"Loading the currently logged in user ...\");\n osapi.jive.core.users.get({\n id : '@viewer'\n }).execute(function(response) {\n console.log(\"loadUser() response = \" + JSON.stringify(response));\n user = response.data;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Global ToneDen configuration function. | function configure(parameters) {
_merge(ToneDen.parameters, parameters);
} | [
"setDefaultToneType(type) {\r\n this.out(\"Setting Tone Type: \" + type);\r\n if (type == Piano2.OSC_SINE || type == Piano2.OSC_TRIANGLE || type == Piano2.OSC_SAWTOOTH || type == Piano2.OSC_SQUARE) {\r\n this.toneType = type;\r\n } else { //Assume Int Index\r\n type = Math.abs(parseInt(type)) % P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: after the first call to _renderFood, we should just render the single food cell instead of rerendering all of the food cells. | _renderFood(foodCells) {
for (var key in foodCells) {
if (!foodCells.hasOwnProperty(key)) continue;
this._setCellStyle(foodCells[key].x, foodCells[key].y, 'food');
}
for(var i = 0; i < foodCells.length; i++) {
this._setCellStyle(foodCells[i].x, foodCells[i].y, 'food');
}
} | [
"function setFood() {\n\tvar empty = [];\n\t\n\t// find empty grid cells\n\tfor (var x = 0; x < grid.width; x++) {\n\t\tfor (var y = 0; y < grid.height; y++) {\n\t\t\tif (grid.get(x, y) === EMPTY) {\n\t\t\t\tempty.push({x:x, y:y});\n\t\t\t}\n\t\t}\n\t}\n\tvar randomPosition = empty[Math.floor(Math.random() * (empty... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a string db query for all the flat data we can get about the docks: 1 row per dock | getDockDataQuery() {
return 'SELECT d.id, d.loaders_count, ' +
'(SELECT COUNT(*) FROM Containers WHERE container_hold = d.id) as container_count, ' +
' (SELECT container_hold as ship_id FROM Ships WHERE dock_id = d.id) as connected_ship_id ' +
' FROM ContainerHold ch JOIN Doc... | [
"getDockScheduledShipsQuery() {\n return `SELECT DISTINCT(ship_id), eta, i.dock_id ` +\n `FROM Intervals i JOIN Timelines tl ON i.timeline_id = tl.id ` +\n `WHERE ship_id is not null ` +\n `AND i.timeline_id = \"${this.timeline_id}\" ` +\n `AND tl.simulation_id = \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A configuration object for notebook settings. | get notebookConfig() {
return this._notebookConfig;
} | [
"function SliderConfig() {\n\n _self = this;\n\n this.data = {\n barsCount: config.bars.count,\n maxDecibels: config.analyser.maxDecibels,\n minDecibels: config.analyser.minDecibels,\n playerWidth: config.player.width,\n rectPadding: config.rect.padding,\n rectVelocit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check the web console DOM element output for the given inputs. Each input is checked for the expected JS eval result. The JS eval result is also checked if it opens the inspector with the correct node selected on inspector icon click | function checkDomElementHighlightingForInputs(hud, inputs) {
function* runner() {
let toolbox = gDevTools.getToolbox(hud.target);
// Loading the inspector panel at first, to make it possible to listen for
// new node selections
yield toolbox.selectTool("inspector");
let inspector = toolbox.getCur... | [
"function checkOutputForInputs(hud, inputTests) {\n let container = gBrowser.tabContainer;\n\n function* runner() {\n for (let [i, entry] of inputTests.entries()) {\n info(\"checkInput(\" + i + \"): \" + entry.input);\n yield checkInput(entry);\n }\n container = null;\n }\n\n function* checkI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transation This class is to add items from basket into an order in the database. It has to get todays date for when the order was made. | transaction() {
let today = new Date();
let day = today.getDate();
let month = today.getMonth() + 1;
let year = today.getFullYear();
let time = today.getHours();
let minutes = today.getMinutes();
if (day < 10) day = '0' + day;
if (month < 10) month = '0' + month;
let orderType = 1;
... | [
"function updateOrderAndDate() {\n let date = new Date();\n date.setHours(0, 0, 0, 0);\n let lastDate = new Date(playlist[playlist.length - 1]['date']);\n let offset = 1;\n let newList = playlist.slice();\n\n // All dates in playlist already passed\n if (lastDate < date) {\n lastDate = new Date();\n of... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION NAME : portSlotContent AUTHOR : Krisfen G. Ducao DATE : March 7, 2014 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : PARAMETERS : | function portSlotContent(){
var content = "";
var a = conterninfor.num
var addinfo = conterninfor.str
content += "<table "+addinfo+" id='tabs-"+a+"-slot"+GlobalSlotId+"'";
content += " class='infoshowhide'>";
content += "<tr><td style='width: 90px;'>";
content += "<p>Physical port type: <br></td><td><br>";
cont... | [
"function slotPOrtContent(num,id,name,limit){\n\tvar tab = \"\";\n\tvar msg = \"Port per device is over the limit.\\nMaximum ports perr device is 256\"\n\t$('#devicetypetabs').tabs();\n\tif (num>=limit) {\n\t\terror(msg,\"Notification\")\t\n\t\tvar val = 0;\t\n\t\t$('#portperdevice').val(\"\");\n\t}\n\tif(num==\"\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find and return the dog breed with the highest count | function findMax() {
var max = dog.data[0].count;
var winner = dog.data[0];
for (var i = 0; i < dog.data.length; i++) {
if (dog.data[i].count > max) {
max = dog.data[i].count
winner = dog.data[i]
}
}
return winner;
} | [
"function mostProlificAuthor(authors) {\n // Your code goes here\n\n let x = bookCountsByAuthor(authors);\n // console.log(x);\n\n const compare = (a, b) => {\n let comparison = 0;\n if (a.bookCount > b.bookCount) {\n comparison = 1;\n } else if (a.bookCount < b.bookCount) {\n comparison = -1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
======================================== | Websocket send END GAME | function sendEndGameMSG() {
let message = {
messageType: "END GAME",
};
theSocket.sendJSON(message);
} | [
"function end_game(){\n\tsocket.emit(\"leave_game\");\n}",
"function sendRoundEndMSG() {\n let message = {\n messageType: \"END ROUND\",\n };\n\n theSocket.sendJSON(message);\n}",
"leavePlayerChannel() {\n this.sendMessage('/playerchannel leave');\n }",
"function hostMessage() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/motors/guide/id/plot.html. Motor guide plot motors page, renders with guide/plot.hbs. | function doPlotPage(req, res, rockets) {
loadGuideResult(req, res, function(result) {
res.render('guide/plot', locals(req, defaults, {
title: "Motor Guide Motor Plot",
rockets: rockets,
result,
stats: RESULT_STATS,
firstStat: RESULT_STATS[0],
secondStat: RESULT_STATS[1],
... | [
"function plotQtl(div, symptom){\n\t$.get('/scripts/plot_qtl/run?symptom='+symptom).done(function(data){\n\t\tvar data = extractBodyFromHTML(data);\n\t\t//var dataURI = createDataUri(data);\n\t\t$(div).html(data);\n\t\trunScanone();\n\t});\n}",
"constructor(p, x, y){\r\n\t\tsuper(\"plot\", x, y, \"Hoe\");\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setTimeout( next, ACTION_INTERVAL ) | function next () {
var a = actions.shift()
if ( a ) {
a( function ( err ) {
if ( err ) throw err
// setTimeout( next, ACTION_INTERVAL )
} )
} else {
setTimeout( finish, ACTION_INTERVAL )
}
} | [
"function schedule(action, delay=200) {\n cb.setTimeout(action, delay)\n}",
"continue(){\n\t\tthis.timeout = setTimeout( this.onTimeout.bind( this ), this.timer )\n\t}",
"function doAction(name, duration, next = null) {\n const now = new Date();\n\n // Check the time in milliseconds when something runs\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to check if a punishment must be applied, returns true if one has been applied, works in severity stages. More can be added, items can be changed, etc. | function PunishmentCheck() {
// We check if a restraint is invalid
for (let i = cursedConfig.punishmentRestraints.length - 1; i >= 0; i--) {
if (!Asset.find(A => A.Name === cursedConfig.punishmentRestraints[i].name && A.Group.Name === cursedConfig.punishmentRestraints[i].group)) {
delete cursedConfig.... | [
"_isModify(orgUnit) {\n return Object.keys(orgUnit).length > 0;\n }",
"function isPvP() {\n return !!(parent.is_pvp || get_map().pvp);\n}",
"isPermitted(user_id) {\n if (!user_id) return false;\n for(var permitted in this.permitted) {\n if ( permitted == user_id ) return this.permitted[p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
buffer the findUserStream by retrieving associated video refs | function bufferStream(){
var temp = new Array();
for(var i = 0; i< userStream.length; i++){
if(userStream[i].refs === undefined){
userStream[i].refs = null;
temp.push(userStream[i].FbId);
//R.request('getVideoRefs',{FromFbId: userStream[i].FbId,Type:"findUsers"});
}
}
if(temp.length >... | [
"function bufferLikers(){\r\n\t\tvar temp = new Array();\r\n\t\tfor(var i = 0; i< that.likers.length; i++){\r\n\t\t\tif(that.likers[i].refs === undefined){\r\n\t\t\t\tthat.likers[i].refs = null;\r\n\t\t\t\ttemp.push(that.likers[i].FbId);\r\n\t\t\t\t//R.request('getVideoRefs',{FromFbId:that.likers[i].FbId,Type:\"fin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |