query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
custom function to add an item to the favMeals state when <3 button pressed on top left corner of a meal card | function setFav(event) {
const name = event.target.parentNode.textContent.slice(
2,
event.target.parentNode.textContent.length - 1
); //kinda stupid way to get this, but the name of the mealcard is kept at the top of the parentNode mealcard as "<3`name`X", so here we just remove the first two charac... | [
"onAddMealButtonPressed(event) {\n\t\tthis.addMeal();\n\t}",
"handleFavouriteFoods(meal) {\n let favouriteButtonDOM = document.querySelector(\".favourite-button\")\n let iconDOM = document.getElementById(\"icon\")\n favouriteButtonDOM.addEventListener(\"click\", () => {\n if (iconD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the contents of the lootbox are empty. Removes the lootbox object and refreshes the contents, then respawns the lootbox after the set respawn time. | empty ()
{
this.active = false;
this.is_open = false; // No one can have it open because it will close when it is empty
loot.CallRemoteCell('loot/sync/set_active', this.cell.x, this.cell.y, this.id, this.active);
jcmp.events.Call('loot/lootbox_emptied', this.id);
if (this.... | [
"refresh ()\n {\n // If someone has it open, don't refresh\n if (!this.is_open)\n {\n this.contents = loot.generator.GetLoot(this.type, this.position);\n this.active = true;\n this.opened = false;\n this.sync_nearby();\n this.respawn_tim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if QoS rule string is valid or not QOS rules format: APP/GAME: ;;;; MAC : ;;;; PORT : ;;;; | function validRule(in_rule){
var rule = new String(in_rule);
if(rule.length > 6 && rule != "" && rule.indexOf("\x02")!=-1){
rule = rule.split("\x02");
if(rule.length >= 5)
return true;
}
return false;
} | [
"function parse_apply_qos_rules(){\n if(validRule(apply_qos_rules)){\n apply_qos_rules_list = apply_qos_rules.split(\"\\x01\");\n apply_qos = apply_qos_rules.split(\"\\x01\");\n if(parseQoSRule(apply_qos) ){\n apply_qos_rules_count = apply_qos.length;\n return 1;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an object with the list of properties named in |properties|. Every property access will be recorded in |record|, which will also be used to determine whether a particular property access should fail, or whether it should return an invalid value that will fail validation. | function createRecordingObjectWithProperties(record, properties) {
const recordingObject = {};
for (const property of properties) {
defineCheckedProperty(record, recordingObject, property, () => record.check(property) ? 'invalid' : undefined);
}
return recordingObject;
} | [
"function createResource(properties) {\r\n var resource = {};\r\n var normalizedProps = properties;\r\n for (var p in properties) {\r\n var value = properties[p];\r\n if (p && p.substr(-2, 2) == '[]') {\r\n var adjustedName = p.replace('[]', '');\r\n if (value) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by InputAdapter when an InputEvent resolves and is an Alt input. To handle events for nonAlt inputs, refer to onInputEvent(). Returns true if the event should be consumed. If consumed, the event will not propagate to other trigger other events. | onAltInputEvent(pointer) { return false; } | [
"function isAlt(event) {\n\t\tconst { altSecondaryEnabled } = getSettings();\n\t\treturn event && event.altKey && altSecondaryEnabled;\n\t}",
"handleAltLockChanged() {\n this.isAltitudeLocked = this._inputDataStates.altLocked.state;\n\n if (this.isAltitudeLocked) {\n\n if (this.currentVerticalActiveSta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Drink options for the app | get drinkOptions() {
return [
{ label: 'Apple juice', value: 'Apple juice' },
{ label: 'Lemonade', value: 'Lemonade' },
{ label: 'Ice Tea', value: 'Ice Tea' },
{ label: 'Cola', value: 'Cola' },
{ label: 'Diet Cola', value: 'Diet Cola' },
];
... | [
"function enableDrinkOptions() {\r\n // Enable the 'take a sip' button.\r\n let drink = document.getElementById(\"drink\");\r\n drink.disabled = false;\r\n drink.onclick = drinkCoffee;\r\n\r\n // Enable 'cream','sugar', 'submit' buttons.\r\n let cream = document.getElementB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use this function to use the world open food api | function getFoodInformation(Ean) {
//https://world.openfoodfacts.org/api/v0/product/
var opts = {
hostname: 'world.openfoodfacts.org',
path: '/api/v0/product/' + Ean,
method: 'GET',
headers: {
'connection': 'keep-alive',
"Content-Type": "application/json",... | [
"function getAPIdata() {\n \n var url = \"https://api.openweathermap.org/data/2.5/forecast\";\n var apiKey =\"b93f0214e63748be2fedba711c6f1709\";\n var city = \"florida\";\n\n //Test OWM weaterlayers\n //var weatherLayer = \"https://tile.openweathermap.org/map/{clouds_new}/10/5/5.png?appid={b93f02... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get one lottery for a league | function GetLottery(leagueId,lotteryId){
var urlLottery='http://bowling-api.nextcapital.com/api/leagues/'+leagueId+'/lotteries/'+'lotteryId';
return $http({
method: 'GET',
url: urlLottery,
headers: {
'Content-Type': 'application/json'
... | [
"function getGame(lobby) {\n return games.find(game => game.lobby === lobby);\n}",
"static async getLatestGame(teamId) {\r\n let latestGame = {};\r\n\r\n const options = await {\r\n method: 'GET',\r\n url: `https://api-nba-v1.p.rapidapi.com/games/teamId/${teamId}`,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Put thumbnail in the result zone part B, in order to execute after proper load | function show_thumbnail_part_b(work,thmli,thmimg,thmprg,thmsel,thmi) {
var width_orig = thmi.naturalWidth;
var height_orig = thmi.naturalHeight;
var width = 1000,height=200;
if(width_orig==0 || height_orig==0) {
work.status = 'error';
work.err='fail_load';
show_error(work);
width = height = 200;
... | [
"imageLoaded(){}",
"function loadOrRestoreImage (row, data, displayIndex) {\n // Skip if it is a container-type VM\n if (data.vm.type === \"container\") {\n return;\n }\n\n var img = $('img', row);\n var url = img.attr(\"data-url\");\n\n if (Object.keys(lastImages).indexOf(url) > -1) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
progress patient to the next queue | function progressPatient(queue) {
setShow('send');
} | [
"function processNextPatient() {\n\n if (0 === patientsToProcess.length) {\n // all done\n callback(null, zipId);\n return;\n }\n\n //alert('process next patient');\n\n // set the current patient i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to loop and see if the current peek image needs to be fetched from server | function updateCurImg(){
console.log('attempting to update current image');
//get the peek peekInsert
var peekInsert = document.getElementById('peekOutsideDiv');
if(peekInsert.currentId) var result = results[peekInsert.currentId];
if(peekInsert.currentId && !result.hasImg){
console.log('requesting imag... | [
"function checkImages(){ //Check if the images are loaded.\n\n if(game.doneImages >= game.requiredImages){ //If the image loads, load the page to the DOM.\n\n init();\n }else{ //loop until the images are lo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
cities: must have profit calculated and added into each item of each city returns true if items was filitered profitable, false if all items was removed | function filterDataByParameters(cities) {
// cities[0] is the blackMarket first for loop then starts from 1
for (var i = 1; i < cities.length; i++) { // Loop through every city
for (var j = 0; j < cities[i].length; j++) { // Loop through every item
var item = cities[i][j];
// the reason for 2 item.... | [
"function calculateProfits(cities) {\n printToConsole(\"Calculating profits...\\n\");\n var item;\n // starts from the last city (6: Caerleon) so the profit properites for Caerleon are calculated before looping\n // through the other cities in descending order. does not loop through i=0 because BM is the first ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert array of 2d polygons into noncombined array of array Vector3 objects. | function convertToV3NoCombine (points2d) // points2d is an array of 2d polygons.
{
var points_all =[]; //THREE.js Vector3 array.
var box = getDataRange(points2d);// for my own projection.
for (var i=0; i< points2d.length; i++)
{
var points = [];
for (var j=0; j<points2d[i].length; j++)
... | [
"createTransformedPolygon() {\r\n this.transformedPolygon = [];\r\n\r\n for(let i=0; i<this.polygon.length; i++) {\r\n this.transformedPolygon.push(\r\n [\r\n this.polygon[i][0] * this.scale + this.origin.x,\r\n this.polygon[i][1] * this.scale + this.origin.y\r\n ]\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for this.mood_check, tells the model whether to offer mood check at the end. | set_mood_check(value) {
this.mood_check = value;
return this;
} | [
"set_mood_induction(value) {\n this.mood_induction = value;\n return this;\n }",
"function increaseMood(amount, threshold) {\n\tif(!threshold || WORLD.AGENT.state.mood < threshold)\n\t\tWORLD.AGENT.state.mood += amount;\n\t\n\t// clamp the value between 0 and 1\n\tWORLD.AGENT.state.mood = Math.ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Change the color of the border depending on who is winning | function updateColor() {
if( userScore > compScore ) {
//Player is winning
table.style.border = "5px solid #38d020"
} else if ( compScore > userScore ) {
//Computer is winnning
table.style.border = "5px solid #d21f1f"
} else {
//If there is a draw
table.style.... | [
"hitBorder() {\n let head = this.state.rat[0]\n if (head[0] >= 100 || head[1] >= 100 || head[0] < 0 || head[1] < 0) {\n this.gameOver()\n }\n }",
"function matchMessageBoardColorTo(riskLevel) {\r\n if (riskLevel === \"lowRisk\") {\r\n document.getElementById(\"display-message\").style.backg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the given reference chain to its string representation. | function convertReferenceChainToString(chain) {
return chain.join(' → ');
} | [
"toString() {\n return `${changelogTitle}\n${changelogDescription}\n\n${stringifyReleases(this._releases, this._changes)}\n\n${stringifyLinkReferenceDefinitions(this._repoUrl, this._releases)}`;\n }",
"toString() {\n return `${this.constructor.name}( ${this._stack\n .map((rc) => rc.toString())\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a scheduled task profile. | static deleteAction(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('scheduledtask_scheduledtaskprofile', 'delete', kparams);
} | [
"static deleteAction(id){\n\t\tlet kparams = {};\n\t\tkparams.id = id;\n\t\treturn new kaltura.RequestBuilder('emailingestionprofile', 'delete', kparams);\n\t}",
"async function deleteSchedule(ctx) {\n const { usernamect, availdate } = ctx.params;\n try {\n const sqlQuery = `DELETE FROM parttime_sche... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For adding callbacks to right mouse button | onRightDown (callback) {
this._addDownEvent(this._buttonNames.right, callback)
} | [
"_handleRowRightClick(event)\r\n {\r\n if (this.view.contextMenu)\r\n {\r\n Radio.channel('rodan').request(RODAN_EVENTS.REQUEST__CONTEXTMENU_SHOW, {top: event.pageY,\r\n left: event.pageX,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Repopulates all other substantial data, including current county data, historical data, and county totals | async function repopulateCountyCollection() {
const County = mongoose.model("County");
const CountyTotal = mongoose.model("CountyTotal");
var fips = 34001;
for (var i = 0; i < zipcodesNJ.length; i++) {
await axios
.get(
`https://api.covidactnow.org/v2/county/${fips}.json?apiKey=${apiKey}`
... | [
"function doReferenceTotals() {\n if (verboseLogging) console.log(selectedCountry + 'All Countries: ' + startYear + '-' + endYear);\n\n httpGetAsync('freqs?start=' + startYear + '&end=' + endYear, function (response) {\n countryFreq = JSON.parse(response);\n var maxCorporaSize = countryFreq['max... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION NAME : modulePortContent AUTHOR : Krisfen G. Ducao DATE : March 12, 2014 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : PARAMETERS : | function modulePortContent(num,id,name,limit){
var tab = "";
var msg = "Port per device is over the limit.\nMaximum ports perr device is 256"
$('#devicetypetabs').tabs();
if (num>=limit) {
error(msg,"Notification")
var val = 0;
$('#portperdevice').val("");
}
if(num==""){return 0;}
for(var a=1; a<=num; a+... | [
"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"
]
]
}
} |
Check whether the specified matrix is equal to this matrix. | equals(matrix) {
//check if same size
if (this.height() === matrix.height() && this.width() === matrix.width()) {
//check each element
let flag = true;
for (let i = 0; i < this.height(); i++)
for (let j = 0; j < this.height(); j++) {
... | [
"equals(grid) {\n if (this.height !== grid.height) { return false; }\n if (this.width !== grid.width) { return false; }\n\n let ans = true;\n for (let r = 0; r < this.height; r++) {\n for (let c = 0; c < this.width; c++) {\n if (this.get(r,c) !== grid.get(r,c)) { ans = false; }\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Factory method returning all include reference resolvers, registered in the system. | function getIncludeReferenceResolvers() {
return [new JSONResolver(), new XMLResolver()];
} | [
"resolve() {\n this.resolver.resolveAll(this.sources.definitions);\n }",
"function generateResolversRecursively(path = '', module = {}) {\n /**\n * Create a resolver for the current level\n */\n resolvers.push(createResolver({ path, module }));\n\n /**\n * Recurse deeper if applicable\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
decreasing our character count | function decreaseCharCount(char, charCounts) {
charCounts[char]--;
} | [
"function erase() {\n\tif (eachLetter >= 0) {\n var str=openTo[adding].toString().substring(0, eachLetter);\n document.getElementById(\"demo\").innerHTML = str;\n eachLetter--;\n setTimeout(erase, speed-25);\n } else {\n adding++;\n if(adding>=openTo.length) \n adding=0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Exit a parse tree produced by KotlinParsertopLevelObject. | exitTopLevelObject(ctx) {
} | [
"visitExit_statement(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"exitNormalClassDeclaration(ctx) {\n\t}",
"exitBlockLevelExpression(ctx) {\n\t}",
"decreaseTopLevel() {\n if (last_default()(this.indentTypes) === INDENT_TYPE_TOP_LEVEL) {\n this.indentTypes.pop();\n }\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BasicTransition class changes slides without any animation. Do not remove this class, because carousels use it by default, if requested transition cannot be found. | function BasicTransition() {} | [
"function Transition() {}",
"function transition(){\r\n document.querySelector('#cover').classList.add('disappear');\r\n document.querySelector('.result-wrapper').classList.add('result-appear');\r\n document.querySelector('#next').classList.add('next-appear');\r\n}",
"function FadeInTransition() {}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks whether this socket id is source | function isSource(_socketid, _sourceList){
return _sourceList.hasOwnProperty(_socketid);
} | [
"isSource() {\n return this.mode == 'output' && this.high;\n }",
"isSink() {\n\n return this.type == 'sink';\n }",
"isSink() {\n return this.mode == 'output' && !this.high;\n }",
"getSource(day) {\n return this.sources[day] ? this.sources[day] : false;\n }",
"function isSourceSet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create root and layers | function create_root_and_layers(self)
{
var graph = self.config._mxgraph;
var root = null;
root = new mxCell();
root.setId("__mx_root__");
// Create the layer
var __mx_cell__ = root.insert(new mxCell());
graph.getModel().beginUpdate();
try {
... | [
"setupLayers() {\n this.d3.select(this.holderSelector).selectAll('*').remove();\n\n this.createSVGLayer();\n this.createPointsLayer();\n this.createTargetsLayer();\n }",
"async function createNewLayer() {\n const layerObject = {\n featureSet: document.getElementById(\"layer-... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the RGBA colors for a given frame Returns an array where: index 0 is the paper color index 1 is the layer A color 1 index 2 is the layer A color 2 index 3 is the layer B color 1 index 4 is the layer B color 2 index 5 is the layer C color 1 index 6 is the layer C color 2 | getFramePalette(frameIndex) {
assertRange(frameIndex, 0, this.frameCount - 1, 'Frame index');
const indices = this.getFramePaletteIndices(frameIndex);
return indices.map(colorIndex => this.globalPalette[colorIndex]);
} | [
"function getColors(){\n var rgb = mixerBottle.attr('style').replace('background-color: rgb(', '').replace(')', '').split(',');\n return rgb.map(x => parseInt(x));\n }",
"function getThemeColors(r, g, b) {\n var shades = [];\t\t\t\t\t\t\t\t\t\t\t\t\t // reset the shades array\n v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Add verification List songs by user, if tags present, use that to filter tags can be a list | static queryByUser(req, res) {
const { userId } = req.params
if (req.query.tags) {
var tags = JSON.parse(req.query.tags)
} else {
var tags = null
}
// If tag not given, return all the songs
var filterBy = {};
if (tags) {
... | [
"function getSongs(Query) {\n var spotify = new Spotify(LiriTwitterBOT.spotify);\n if (!Query) {\n Query = \"what's+my+age+again\";\n };\n spotify.search({ type: 'track', query: Query }, function(err, data) {\n if ( err ) {\n console.log('Error occurred: ' + err);\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for All zone transfer in reverse direction. Step1: Add the selected all zones to the existing zones in the zonemap. Step2: Remove All zones from selected_zone map to make it free/blank. Also make Free/Blank contract code map and Selected_contract code map. | function zoneReverseAll() {
window.cnt += 1; // global variable.
// alert(window.cnt);
// Step-1:
// -------- Collection of existing zone codes from zone map.
var len1 = $("#zone option").length; // length of not selected zone.
var html = '';
if (len1 > 0) {
var e1 = document.getElementById("zone")... | [
"function zoneReverse(){\r\n\twindow.cnt += 1; // global variable.\r\n\t//alert(window.cnt);\r\n\tvar e = document.getElementById(\"selected_zone\"); // contains selected zone list.\r\n\tvar fromDate = document.getElementById(\"fromDate\").value; // contains fromDate value.\r\n\tvar toDate = document.getElementBy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shortcut function called when a section block is selected by the Theme Editor 'shopify:block:select' event. | onBlockSelect() {
// Do something when a section block is selected
} | [
"blockHitAreaClicked(e) {\n // When you click on the text, the browser will automatically select the word.\n // Therefore, the editor shrinks spans instead of selecting spans.\n // Deselect the text.\n if (e.button === 2) {\n clearTextSelection()\n }\n\n const sele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of DefaultLinkHandler. | constructor() {
super();
this.handler = (e) => {
let {shouldHandleEvent, href} = DefaultLinkHandler.getEventInfo(e);
if (shouldHandleEvent) {
e.preventDefault();
this.history.navigate(href);
}
};
} | [
"_init() {\n try {\n if (!fs.existsSync(LINKS_DIR)) {\n fs.mkdirSync(LINKS_DIR);\n }\n this.links = require(LINKS_PATH);\n\n for (const key in this.links) {\n if (this.links.hasOwnProperty(key)) {\n const url = this.links[key].url;\n\n if (!this._urls[url]) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
draws bricks on canvas | function drawBricks() {
for (var c = 0; c < brickColumnCount; c++) {
for (var r = 0; r < brickRowCount; r++) {
if (bricks[c][r].status === 1) {
bricks[c][r].x = (c * (bricks[c][r].brickWidth + brickPadding));
bricks[c][r].y = (r * (bricks[c][r].brickHeight + brickPadding));
ctx.begin... | [
"draw(){\n\n for(let i=0; i<this.belt.length;i++){\n this.belt[i].draw();\n }\n }",
"function draw() {\n // clear the canvas\n canvas.width = canvas.width;\n drawBlocks();\n drawGrid();\n }",
"drawBall() {\n fill('#FFFFFF');\n circle(this.x, this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Injects the Report Dialog script | function injectReportDialog(options) {
if (options === void 0) { options = {}; }
if (!global.document) {
return;
}
if (!options.eventId) {
_sentry_utils__WEBPACK_IMPORTED_MODULE_4__.logger.error("Missing eventId option in showReportDialog call");
return;
}
if (!options.ds... | [
"function showReportDialog(options = {}) {\n core_1.getCurrentHub().getClient().showReportDialog(options);\n}",
"function Dialog() {}",
"function phpVATReport(params) {\n if (params) {\n var VATReportObject = Wtf.getCmp(params.reportID);\n if (VATReportObject == null) {\n VATRepor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for mapping content of success story | function successStoryContentMapping(successStoryData)
{
var mapping = {
'{title}': "Success Stories",
'{successStories}': removeNull(successStoryData)
};
return mapping;
} | [
"function loadSuccessStoryTuples(response)\n{\n var tupleStructure = $(\"#successStoryBasicdiv\").html(),ssTupleHtml=\"\",contentHtml=\"\",mapObj=\"\";\n var mainContentStructure = $(\"#successStoryMainStructure\").html();\n var tupleNo;\n $.each(response.stories,function( key, val ){\n tupleN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to get chart rersource at the first time | function getChartResource() {
if (isFirstTime) {
isFirstTime = false;
$.ajax({
type : "GET",
url : "getChartSourceContent",
success : function(data) {
$('#chartContents').html(data);
},
failure : function(errMsg) {
alert(errMsg);
}
});
}
} | [
"function initCharts() {\n xmlHttpReq('GET', '/storages_data', '', function(responseText) {\n var response = JSON.parse(responseText);\n if (response.success) {\n drawCharts(response.data);\n } else {\n snackbar(response.message);\n }\n });\n}",
"init() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fetch and save xbrl link form web scrape query | async function fetch_save_xbrl_instance(link, date, ticker, type){
let body =await rp(link)
let file = link.split('/')
let filename = file[file.length-1]
logger.log({filename})
fs.writeFile(`./xbrl_files_2/${ticker}-${date}-${filename}`, body)
/* OR.... Just parse and save in db? */
// let body = aw... | [
"function XML_(){\n let url = `https://${domain}/API/Account/${rad_id}/${APIendpoint}.json?offset=${pagenr}`;\n if (relation.length > 0) {\n url += `&load_relations=[${relation}]`;\n }\n if (query.length > 0) {\n url += query;\n }\n console.log(url);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch all existing project issues from GitLab assigns gitLab.gitlabIssues | function getGitLabProjectIssues() {
return getRemainingGitLabProjectIssues(0, 100)
.then(function(result) {
log_progress("Fetched " + result.length + " GitLab issues.");
var issues = _.indexBy(result, 'iid');
return gitLab.gitlabIssues = issues;
});
} | [
"function getIssues() {\n TestService.getTestCaseWorkItemsByType(test.id, 'BUG').\n then(function(rs) {\n if (rs.success) {\n vm.issues = rs.data;\n if (test.workItems.length && vm.attachedIssue) {\n angular.copy(vm.attach... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns compiled solidity code. | eth_compileSolidity(code) {
return this.request("eth_compileSolidity", Array.from(arguments));
} | [
"function compile(code, output) {\n\tvar syntax = esprima.parse(code);\n\tvar compiler = new FirstPassCodeGen();\n\tvar module = compiler.compile(syntax);\n\tmodule.resolve();\n\tmodule.output(output);\n\treturn true;\n}",
"eth_compileSerpent(code) {\n return this.request(\"eth_compileSerpent\", Array.from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns any array containing the default middleware installed by `configureStore()`. Useful if you want to configure your store with a custom `middleware` array but still keep the default set. | function getDefaultMiddleware(options) {
if (options === void 0) {
options = {};
}
var _options = options,
_options$thunk = _options.thunk,
thunk$1 = _options$thunk === void 0 ? true : _options$thunk,
_options$immutableChe = _options.immutableCheck,
immutableCheck = _options$immutable... | [
"function getDefaultMiddleware() {\n var middlewareArray = [redux_thunk__WEBPACK_IMPORTED_MODULE_4__[\"default\"]];\n\n if (false) { var createImmutableStateInvariantMiddleware; }\n\n return middlewareArray;\n}",
"getMiddleware() {\n var ref;\n const manifest = this.getMiddlewareManifest();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Patch various jQuery functions to handle tinymce specific attribute and content behavior we don't patch the jQuery.fn directly since it will most likely break compatibility with other jQuery logic on the page. Only instances created by TinyMCE should be patched. | function patch(jq) {
// Patch some functions, only patch the object once
if (jq.css !== css) {
// Patch css/attr to use the data-mce- prefixed attribute variants
jq.css = css;
jq.attr = attr;
jq.tinymce = editor;
// Each pushed jQuery instance needs to be patched
// as well for e... | [
"function initTinyMCE(options){\n // default options:\n var defaults={\n relative_urls: false,\n remove_script_host: false,\n skin_variant: 'ocms',\n mode: \"exact\",\n theme: \"advanced\",\n file_browser_callback: 'cmsTinyMceFileBrowser',\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get GUID of the Current Record | function GetGuidOfTheRecord(executionContext) {
try {
//Get the form context
var formContext = executionContext.getFormContext();
//Get the current Record Guid
var recordGuid = formContext.data.entity.getId();
Xrm.Utility.alertDialog(recordGuid);
}
catch (e) {
... | [
"findUniqueIdentifier() {\n const metadataId = this.attributes[\"unique-identifier\"];\n if (metadataId) {\n const uidMetadata = this.metadata.findItemWithId(\n \"dc:identifier\",\n metadataId\n );\n if (uidMetadata) {\n return uidMetadata.value;\n }\n }\n }",
"f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runtime helper for merging vbind="object" into a VNode's data. | function bindObjectProps(data,tag,value,asProp){if(value){if(!isObject(value)){process.env.NODE_ENV!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;for(var key in value){if(key==='class'||key==='style'){hash=data;}else{... | [
"function bindElement(element, object) {\n setPropertyOnElement(element, DATA_BINDING_ID, object);\n}",
"function applyData(object, data) {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n object[key] = data[key];\n }\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new button. | function createButton(inrTxt) {
const elem = document.createElement(`button`);
elem.classList.add(`buttons`);
elem.innerText = `${inrTxt}`;
active.buttons.push({
e: elem
});
box.appendChild(elem);
} | [
"createButton () {\n\n this.button = document.createElement('button')\n\n this.button.title = 'This model has multiple views ...'\n\n this.button.className = 'viewable-selector btn'\n\n this.button.onclick = () => {\n this.showPanel(true)\n }\n\n const span = document.createElement('span')\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove a query from the state. | function removeQuery(state, queryId) {
const new_order = [];
for(const id of state.order) {
if(id !== queryId) {
new_order.push(id);
}
}
const new_state = Object.assign({}, state, {order: new_order});
delete new_state[queryId];
return new_state;
} | [
"function clearCurrentQuery() {\n // don't clear the history if existing queries are already running\n if (cwQueryService.executingQuery.busy || pastQueries.length == 0)\n return;\n\n pastQueries.splice(currentQueryIndex,1);\n if (currentQueryIndex >= pastQueries.length)\n currentQ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setLeafletMap :: (Map, L.Map) > Map | function setLeafletMap(self, map) {
_private(self).leafletMap = map;
getOptions(self).setLeafletMap(map);
return self;
} | [
"function setMap(linkMap) {\n $('.map-google iframe').attr('src', linkMap);\n}",
"function afterMapInit(map) {\n $scope.mapObj.yaMap = map;\n }",
"function Map() {\n _classCallCheck(this, Map);\n\n this[map] = {};\n this[zoom] = 16;\n this[init]();\n }",
"function initOpenLayersMap()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
:: Display user greetings or terminal signature | function show_greetings() {
if (settings.greetings === undefined) {
// signature have ascii art so it's not suite for screen readers
self.echo(self.signature, {finalize: a11y_hide});
} else if (settings.greetings) {
var type = typeof settings.... | [
"function massage() {\n console.log(\"****************************************************************\")\n console.log(\"Sorry honey, that service isn't digital\")\n console.log(\"But I'd recommend going to a really nice hotel spa & resort\")\n console.log(\"and request their relaxing massage package\")\n con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes worldData.emoScores and generates a bundle of usable data: flattenedArr (array) A version of emoScores that is magnified, padded, smoothed and flattened so that it maps to the correct number of veritices for the terrain later used to generate geometry. In sum, a 1d array in which each element represents the heigh... | function generateTerrainData(emoScores,paddingSize,scaleUp,smoothingRadius){
//Make sure emoScores contains only numbers
emoScores=numifyData(emoScores);
//Create a helper array that will undergo the same transformations as the main array,
//but preserve its path number (anger=0/joy=1/fear=2) and chunk ... | [
"function makeTerrain(){\n //Parameters affecting terrain generation\n var paddingSize=5;\n var scaleUp=4;\n var smoothingRadius=3;\n //Get terrain data\n var terrainData=generateTerrainData(worldData.emoScores,paddingSize,scaleUp,smoothingRadius);\n //Unpack terrain data\n var flattenedArr=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get timeout for token refresh | function getTokenRefreshTimeout(token) {
if (token) {
var decoded = jwt.decode(token);
// expiry date in future?
if (decoded.exp && 1000 * decoded.exp > Date.now()) {
// refresh once a day or halfway to expiry
var timeo... | [
"setupTokenReconnectTimer(){\n log.debug('[PageSharedDB] setting up timer for token refresh')\n let reconnectInMilliseconds = (this.expires_at * 1000) - Date.now() - 5000\n clearTimeout(this.tokenReconnectTimer)\n\n this.tokenReconnectTimer = setTimeout(() => {\n this.tokenReconnect()\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write `value` as an 8bit signed integer and move pointer forward by 1 byte. | writeInt8(value) {
this.ensureAvailable(1);
this._data.setInt8(this.offset++, value);
this._updateLastWrittenByte();
return this;
} | [
"pushByte(value) {\n this.write(\">\" + \"+\".repeat(value));\n this.stack.push(StackEntry(DataType.Byte, 1));\n }",
"function UInt32toUInt8(value) {\n console.log(value);\n t = [\n value >> 24,\n (value << 8) >> 24,\n (value << 16) >> 24,\n (value << 24) >> 24\n ];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Chapter 101 RopeGroup Introduction done | function C101_KinbakuClub_RopeGroup_Introduced() {
C101_KinbakuClub_RopeGroup_IntroDone = true;
} | [
"function gotHamletTestamentData () {\n // Join the two texts together into a single string\n let allText = hamletText + ' ' + oldTestamentText;\n // Create a Markov chain generator\n markov = new RiMarkov(4);\n // Load the string of both books into the Markov generator\n markov.loadText(allText);\n // Gener... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recover child by username. | function getChildByUsername(username) {
return new Promise((resolve, reject) => {
httpClient
.get(`${ACCOUNT_URL_BASE}/v1/children?limit=1&username=${username}`)
.then((result) => {
if (result.data && result.data.length >= 1) {
return resolve(resul... | [
"async function unregisterNfcByUsername(req, res) {\n try {\n // 1. Check if the child exists\n const child = await getChildByUsername(req.params.username)\n if (!child) { // child not found by given username\n return res.status(400).send(msgChildNotFoundUsername(req.params.userna... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function extracts a zone (which is a cells array) from a point array Mainly to help rmgen compatibility. | function pointsToZone(points)
{
let zone = [];
for(let p of points) {
zone.push(g_TOMap.gCells[p.x][p.y]);
}
return zone;
} | [
"function zoneToPoints(zone)\n{\n\tlet points = [];\n\tfor(let c of zone) {\n\t\tpoints.push(new Vector2D(c.x,c.y));\n\t}\n\treturn points;\n}",
"static from(array) {\n return new Point(array[0], array[1]);\n }",
"extractPoints(e) {\n return {\n shape: this.getPoints(e),\n holes: this.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function verifies the validity of OTP (token) entered by the user from an authenticator app, for example, the Google Authenticator app. The secret passed here as argument must match with the secret in the authenticator app. | function verifyTOTP(otp, secret, window = 1, timeStepInSeconds = 30, initialTime = 0, otpLength = 6) {
try {
otp = parseInt(otp, 10);
if (isNaN(otp)) {
throw new Error();
}
} catch (e) {
throw new Error('Invalid OTP');
}
if (Math.abs(+window) > 10) {
throw new Error('W... | [
"function onVerifyOTPClicked (event) {\n let isValid = true;\n let { userType } = event.target.dataset;\n if (!userType) {\n userType = 'student'\n }\n\n const phoneNumber = window.sentOTPtoPhoneNumber;\n const otp = $('.otp-input').toArray().map((input) => input.value).join('');\n if (otp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is the Mover in the Liquid? | boolean contains(Mover m) {
PVector l = m.location;
if (l.x > x && l.x < x + w && l.y > y && l.y < y + h) {
return true;
}
else {
return false;
}
} | [
"isOnTheWater() {\n return this.y <= 0;\n }",
"function PopUp_Hover() {\n var _return = false;\n\n\n if ((_mouse[\"x\"] > _popUp.offset().left) && _mouse[\"x\"] < (_popUp.offset().left + _popUp.outerWidth())) {\n if ((_mouse[\"y\"] > _popUp.offset().top) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: preventFileActivity Description: Standard report API, gets called just before report is to be run. We check here to see if any report wants to prevent file activity during its run. | function preventFileActivity()
{
return true;
} | [
"function beginReporting()\n{\n if (site.serverActivity())\n {\n alert(MSG_CantRun_FileActivity);\n return false;\n }\n return true;\n}",
"function eventLogRecordingsFileSelectionCancelled() {\n dumpCreator.disableEventLogRecordings();\n}",
"function ActivityDeclined(){\n\n\tif (g_bFullScreen) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
F U N C T I O N S This function updates the letters already pressed field on the HTML page. Array g_LettersAlreadyPressed contains the letters entered by the user, so far. | function updateLettesAlreadyPressedField() {
var lettersAlreadyPressedId = document.getElementById('letters-already-pressed');
var word2Display = "";
// building a string, so as to have a space between the guessed characters
for (var i = 0; i < g_LettersAlreadyPressed.length; i++) {
word2Displ... | [
"function clearLettersAlreadyPressedField() {\n\n // First Clear the array holding the letters already pressed \n g_LettersAlreadyPressed = [];\n\n // update the Card Area on the HTML page where these letters are displayed\n updateLettesAlreadyPressedField();\n\n}",
"function updateLetters(words, keyP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
used to clear the shoes state object after average is calculated | handleClearShoes() {
this.setState({
shoes: []
})
} | [
"reset() {\r\n\t\tthis.number = this.props.index + 1\r\n\t\tthis.counters = {\r\n\t\t\tfigure: 0\r\n\t\t}\r\n\t\t// TODO: Incorporate equation numbers.\r\n\t}",
"function reset() {\n svg_g.selectAll(\".brush\").call(brush.move, null);\n svg_g.selectAll(\".brushMain\").call(brush.move... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is first given the select menu object who's options are being set. Secondly, an array of all options is passed and finally, an array of options not to be included in the menu is passed. Each item in the first array is compaired to each item in the second array. If the item from the first array is found in... | function setOptions(select_menu, main_array, subtract_array) {
// Get the value of the currently selected item.
var selected_value = select_menu.options[select_menu.selectedIndex].value;
// Clear the select menu except for the first option.
select_menu.length = 1;
// Loop through all the values in the main arr... | [
"function copySelectedOptions(from,to) {\n\tvar options = new Object();\n\tfor (var i=0; i<to.options.length; i++) {\n\t\toptions[to.options[i].value] = to.options[i].text;\n\t\t}\n\tfor (var i=0; i<from.options.length; i++) {\n\t\tvar o = from.options[i];\n\t\tif (o.selected) {\n\t\t\tif (options[o.value] == null ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mark the KalturaDrmPolicy object as deleted. | static deleteAction(drmPolicyId){
let kparams = {};
kparams.drmPolicyId = drmPolicyId;
return new kaltura.RequestBuilder('drm_drmpolicy', 'delete', kparams);
} | [
"deletePolicy(callback) {\n return this.deletePolicyRequest().sign().send(callback);\n }",
"function deleteTablePolicy(table, name, options, _) {\n var deletePolicySettings = createTablePolicySetting(options);\n deletePolicySettings.resourceName = interaction.promptIfNotGiven($('Table name: '), table, _... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Try to fetch the next generation; if not cached, wait till we receive an alert from `calculatorListener` | fetchNextGeneration() {
// helper to resolve the promise and start a new batch of generations to compute if need be
const resolveGeneration = (resolve, i, currState) => {
resolve({i, nextGen: currState});
// we are at the end of the batch, generate a new one
if (i % 10 == 0) {
this.ge... | [
"async getNextGeneration() {\n const {i, nextGen} = await this.fetchNextGeneration();\n canvasScript.displayNewGeneration(i, nextGen);\n }",
"_checkGeneratorIsAlive() {\n this._log('Checking generator is alive...');\n this._client.existsAsync(LAST_GENERATOR_TIME).then((reply) => {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by InputAdapter before an InputEvent begins. Returns true if the event should be consumed. If consumed, the event will not begin. | onPreInputEvent(pointer) { return false; } | [
"function atBeginning() {\n\treturn currentSceneIndex === 0;\n}",
"preStep() {\n if (this.controls) {\n if (this.controls.activeInput.up) {\n this.sendInput('up', { movement: true })\n }\n\n if (this.controls.activeInput.left) {\n this.sendInput('left', { movement: true })\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
override the rotation for the editor(w,a,s,d) | function calibrateMovementEditor() {
if(Input.GetKey("w")){
RotateUpDown(1.5);
}
if(Input.GetKey("s")){
RotateUpDown(-1.5);
}
if(Input.GetKey("a")){
RotateRightLeft(1.5);
}
if(Input.GetKey("d")){
RotateRightLeft(-1.5);
}
} | [
"setRotations() {\n this.r3a1_exitDoor.angle = 270;\n }",
"startRotation() {\n this._options.rotation.enable = true;\n }",
"function rotationLeft() {\n var deg = 36;\n rotation = rotation - deg;\n //wheel.style.transform = rotate(\"rotation\" - \"deg\")\n wheel.style.transform =`rotate(${ro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is for reading the GP data from local JSON file and insert it to MongoDB. | function insertData(){
var obj = JSON.parse(fs.readFileSync('C:\\Users\\Tiankun\\Downloads\\doctors2.json', 'utf8'));
mdb.collection('gp').insertMany(obj);
} | [
"function uploadLocalJsonCollectionToDB(client, dataBaseName, collectionName) {\n\t\t\n\t\t//////////////////////////// Read json by nodejs fs (start) ////////////////////\n\t\t// var jsonObject;\n\t\tfs.readFile('db/sportsDB.json', 'utf8', function (err, data) {\n\t\tif (err) {\n\t\t\tconsole.error(\"Unable to rea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Walk the input `node` and statically evaluate if it's truthy. Returning `true` when we're sure that the expression will evaluate to a truthy value, `false` if we're sure that it will evaluate to a falsy value and `undefined` if we aren't sure. Because of this please do not rely on coercion when using this method and ch... | function evaluateTruthy() {
var res = this.evaluate();
if (res.confident) return !!res.value;
} | [
"function assertIsTruthy(a){\n return a_is_truthy(a);\n }",
"function falsy_QMRK_(a) {\n return ((a === null) || (a === false));\n}",
"function TrueNode() {\n}",
"isBool(expression) {\n doCheck(\n this.typesAreEquivalent(expression.type, BoolType),\n \"Not a boolean\"\n );\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Populates the vine array with chosen vines below. | function addVine(vineSentence, vineAnswer, vinePossibleAnswers, vinePhoto, vineGif) {
var vineObject = { sentence: "", answer: "", possibleAnswers: [], photo: "", gif: ""};
vineObject.sentence = vineSentence;
vineObject.answer = vineAnswer;
vineObject.possibleAnswers = vinePossibleAnswers;
vineObjec... | [
"function InitMvvLva() {\n\tvar Attacker;\n\tvar Victim;\n\t\n\tfor(Attacker = PIECES.wP; Attacker <= PIECES.bK; ++Attacker) {\n\t\tfor(Victim = PIECES.wP; Victim <= PIECES.bK; ++Victim) {\n\t\t\tMvvLvaScores[Victim * 14 + Attacker] = MvvLvaValue[Victim] + 6 - (MvvLvaValue[Attacker]/100); // Gives a higher score th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Battery status for Android | function getBatteryStatusForAndroid()
{
var BatteryStatus = {};
var KonyMain = java.import("com.konylabs.android.KonyMain");
var Intent = java.import("android.content.Intent");
var IntentFilter = java.import("android.content.IntentFilter");
var BatteryManager = java.import("android.os.BatteryManager"); ... | [
"function getBatteryStatusForIphone()\n{ \n var BatteryStatus = {};\n\n var UIDevice = objc.import(\"UIDevice\");\n\n var currentDevice = UIDevice.currentDevice();\n currentDevice.batteryMonitoringEnabled = true;\n\n var batteryLevel = currentDevice.batteryLevel;\n\n // BatteryStatus.BateryLevel=BateryLevel;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
WRITE A NEW TWITTER NAME AND HANDLE | function writeTwitter(nam,handl){
// takes twitter name from link area box and writes it
// check for blanks
if ((nam=="") || (handl=="")){
alert("Real name and Twitter handle are both required. Quitting.");
return
}
// check for dupes
var i;
var found = -1;
for (i=0; i < t... | [
"function createTweet(input) {\n\tif (!input.quoteAuthor.length) { //czyli jeśli autor cytatu jest pusty, to wejdziemy do treści warunku\n\t\tinput.quoteAuthor = \"Unknown author\";\n\t}\n\tvar tweetText = \"Quote of the day - \" + input.quoteText + \" Author: \" + input.quoteAuthor;\n\tif (tweetText.length > 140)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CSS styles for the track fill element. | _getTrackFillStyles() {
const percent = this.percent;
const axis = this.vertical ? 'Y' : 'X';
const scale = this.vertical ? `1, ${percent}, 1` : `${percent}, 1, 1`;
const sign = this._shouldInvertMouseCoords() ? '' : '-';
return {
// scale3d avoids some rendering issu... | [
"setStyle() {\n this.lineStyle = {\n color: globalStore.getData(keys.properties.trackColor),\n width: globalStore.getData(keys.properties.trackWidth)\n }\n }",
"function colorCheckMark()\n{\n document.getElementById(\"mood-logged-checkmark\").style[\"fill\"] = moodColorsL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
showHudForSchematic function. Takes in a schematic and prepares it to be shown | function showHudForSchematic(newSchematic : Schematic, newObjectWithSchematic : GameObject) {
objectWithSchematic = newObjectWithSchematic;
schematic = newSchematic;
slotOrigin = new Vector2(Screen.width / 2, Screen.height / 2);
toolOrigin = new Vector2(slotOrigin.x, slotOrigin.y - 50);
setTiles();
setToolOrigi... | [
"function showViz() {\n viz.show();\n}",
"function displayHud() {\n // 2D screen-aligned rendering section\n easycam.beginHUD()\n // this._renderer._enableLighting = false // fix for issue #1\n let state = easycam.getState()\n\n // Get number of points\n let numPoints = 0\n\n if (letters) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compares documents as specified in ReQL. Treats undefined as maxval (because we want missing columns to be at the end). | static compareReqlDocs(a, b) {
// Handle undefined case, which may happen.
if (a === undefined) {
return b === undefined ? 0 : -1;
}
else if (b === undefined) {
return 1;
}
// The logic here is cribbed from datum_t::cmp_unchecked_stack.
con... | [
"static pseudo_cmp(a, b) {\n if (a['$reql_type$'] === 'BINARY') {\n if (!('data' in a && 'data' in b)) {\n console.error(\"BINARY ptype doc lacking data field\", a, b);\n throw \"BINARY ptype doc lacking data field\";\n }\n const aData = rethinkd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A manifold point is a contact point belonging to a contact / manifold. It holds details related to the geometry and dynamics / of the contact points. / The local point usage depends on the manifold type: / e_circles: the local center of circleB / e_faceA: the local center of cirlceB or the clip point of polygonB / e_fa... | function b2ManifoldPoint()
{
this.localPoint = new b2Vec2(); ///< usage depends on manifold type
this.normalImpulse = 0; ///< the non-penetration impulse
this.tangentImpulse = 0; ///< the friction impulse
this.id = new b2ContactID(); ///< uniquely identifies a contact point between two shapes
} | [
"function b2CollidePolygonAndCircle(manifold,\n\t\t\t\t\t\t\t polygonA, xfA,\n\t\t\t\t\t\t\t circleB, xfB)\n{\n\tmanifold.pointCount = 0;\n\n\t// Compute circle position in the frame of the polygon.\n\tvar c = b2Mul_t_v2(xfB, circleB.m_p);\n\tvar cLocal = b2MulT_t_v2(xfA, c);\n\n\t// Find the min separating edg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Div element for all the midi options for the track | function elemTrackMidiOptions(track_element) {
var track_midi_options = document.createElement("div");
track_midi_options.id = "track_midi_options_" + track_element.track_num;
// create a list of output midi device names
var device_names = []
for (const device of track_element.device_list) {
... | [
"function trackMidiSelected(track_element) {\n // get the selectede midi options\n const device_idx = getUserSelection(\"track_device_\" + track_element.track_num) - 1;\n const channel_idx = getUserSelection(\"track_channel_\" + track_element.track_num);\n const device = track_element.device_list[device... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add new stock data for redrawing chart | addStockToChart(symbol, data) {
this.stockChart.addSeries({
name: symbol,
data: data
});
} | [
"getStock(stockSymbol) {\n stockService.data(stockSymbol, (err, data) => {\n if (err) return this.handleError(err);\n\n const stock = JSON.parse(data);\n let stockData = stock.data.reverse().map(info => {\n return [\n (new Date(info[0])).getT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
=========================== Patching ================================ [ patchStyleSheet() ] Scans the passed cssText for selectors that require emulation and creates one or more patches for each matched selector. | function patchStyleSheet( cssText ) {
return cssText.replace(RE_PSEUDO_ELEMENTS, PLACEHOLDER_STRING).
replace(RE_SELECTOR_GROUP, function(m, prefix, selectorText) {
var selectorGroups = selectorText.split(",");
for (var c = 0, cs = selectorGroups.length; c < cs; c++) {
var selector = normaliz... | [
"function applyPatches(uniDiff, options) {\n\t if (typeof uniDiff === 'string') {\n\t uniDiff = (0, _parse.parsePatch) (uniDiff);\n\t }\n\t\n\t var currentIndex = 0;\n\t function processIndex() {\n\t var index = uniDiff[currentIndex++];\n\t if (!index) {\n\t return options.complete();\n\t }\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
INSTRUCCION DECLARACION DE VECTOR CON TIPO Y VALOR | function declaracionArrayCTV(ele, mod, ambi) {
var encontreError = false;
//BUSCANDO VECTOR EN LOS AMBITOS SI NO ESTA SE REALIZA DECLARACION
if (!buscarVariable(ele.identificador)) {
//VERIFICAR EXPRESIONES
var v = [];
//console.log(ele);
//VERIFICANDO TAMAñO DE VECTOR DE VALORES PARA SABER SI ES ... | [
"static translation(v) {\r\n\t\tres = identity(); \t\tres.M[3] = v.x; \r\n\t\tres.M[7] = v.y; \t\tres.M[11] = v.z; \r\n\t\treturn res; \r\n\t}",
"static vAdd(a,b) { return newVec(a.x+b.x,a.y+b.y,a.z+b.z); }",
"static mxVMult(v,m) {\r\n\t\tvar res = new mVec3(); \r\n\t\tres.x = (v.x * m.M[0]) + (v.y * m.M[4]) + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is called when the bing map module has completely loaded It will attempt to recreate the geocodeCallback but will only succeed if the geocodeCallback had previously occoured prematurely | function bingCallback()
{
bingLoaded=true;
if (resultRef)
{
MapPlugIn.geocodeCallback(resultRef);
}
} | [
"onMapsReady(){\n\n }",
"function afterMapInit(map) {\n $scope.mapObj.yaMap = map;\n }",
"function mapLoaded(map) {\n console.debug('map has been loaded', map);\n }",
"function geocode(e) {\n //prevent actual submit\n e.preventDefault();\n var location = document.getElementById('... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
resetCalculations To optimize the calculations, these functions work like singletons and simply return the last value if already calculated. However, since it's possible that the original caluclation was incorrect (due to system load, etc.), this function is placed in a timed interval to preiodically reset the calculat... | function resetCalculations() {
calculatedBogoMips = null;
clientEffectsLevel = null;
calculateJsBogoMips();
} | [
"function clearCalculation() {\n calculation = [];\n displayCalculation();\n }",
"reset () {\n this.total = this.seconds * 1000.0;\n this._remaining = this.total;\n this._clearInterval();\n this.tick();\n }",
"function resetCacheInterval() {\n const hourDiff = dayjs().diff(cacheRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recibe un codigo de curso, compara y devuelve los datos del curso del codigo | function buscarCursoPorCod(codCurso) {
let listaCursos = getListaCursos();
let cursoEncontrado = [];
for (let i = 0; i < listaCursos.length; i++) {
if (listaCursos[i][0] == codCurso) {
cursoEncontrado = listaCursos[i];
}
}
return cursoEncontrado;
} | [
"function obtenerValoresProteccion(cod_usuario,cod_inspeccion){\n db.transaction(function (tx) {\n var query = \"SELECT k_coditem,v_sele_inspector,v_sele_empresa,o_observacion FROM escaleras_valores_proteccion WHERE k_codusuario = ? AND k_codinspeccion = ?\";\n tx.executeSql(query, [cod_usuario,cod_inspeccio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Leftalign a string to width `width` using `fill` (default is a space) to fill on the right. | function pad_right(s, width, fill) /* (s : string, width : int, fill : ?char) -> string */ {
var _fill_23035 = (fill !== undefined) ? fill : 0x0020;
var w = $std_core._int_to_int32(width);
var n = s.length;
if ((w <= n)) {
return s;
}
else {
return (s + (repeat32(string(_fill_23035), ((w - n)|0))))... | [
"function leftPad(string, length, fillCharacter) {\n var newString = \"\";\n if (string.length < length) {\n for (let i = 0; i < (length - string.length); i++) {\n newString += fillCharacter\n }\n return newString + string;\n } else {\n return string\n }\n}",
"al... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fires a warning toast message. | showWarningToast(title = 'Warning', message = 'A warning occurred during the operation.') {
this.showToast(title, message, 'warning');
} | [
"function myWarning( _msg )\n{\n\tif( _msg.length != 0 )\n\t{\n\t\t$('#alert-warnings').html('<div style=\"margin-top: 6px; margin-bottom: 0px;\" class=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button><strong>Warning!</strong> ' + _msg + '</div>' )\n\t\t$('#alert-warnings').c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION: isSiteRootSane DESCRIPTION: Check to see if site root is writable or unlocked if it exists. RETURNS: folderSane Boolean of whether or not the folder is OK to copy assets into. | function isSiteRootSane() {
var siteRoot = dw.getSiteRoot();
var folderSane = true;
//Is site root defined?
if (siteRoot != "file:///") {
//Is defined site root writable/unlocked?
folderSane = dwscripts.isFileWritable(siteRoot);
}
return folderSane;
} | [
"function checkSite()\n{\n var path = \"./public\";\n var ok = fs.existsSync(path);\n if(ok) path = \"./public/index.html\";\n if(ok) ok = fs.existsSync(path);\n if(!ok) console.log(\"Can't find\", path);\n return(ok);\n}",
"function browseFolder() \n{\n\t//Is the folder writable/unlocked?\n\tif (isSiteRoot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compacts either a particular folder, or all folders | compactFolder(aCompactAll, aFolder) {
let folder = aFolder || GetSelectedMsgFolders()[0];
let isImapFolder = folder.server.type == "imap";
// Can't compact folders that have just been compacted
if (!isImapFolder && !folder.expungedBytes && !aCompactAll)
return;
// Reset thread pane for non-im... | [
"function folderCleanUp() {\n DriveApp.getFoldersByName('test1').next().setTrashed(true);\n DriveApp.getFoldersByName('test2').next().setTrashed(true);\n}",
"onUpdateFolder() {\n this.store.query(\"folder\", {})\n .then((results) => {\n // Rebuild the tree\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An animation step is called on each animation interval. | function animationStep() {
if (_currentInterval === _noOfIntervals) {
document.dispatchEvent(new Event('animation.finished'));
window.clearInterval(_interval);
_currentInterval = 0;
_isPlaying = false;
_visualization.next(_currentInterval);
document.querySelector('.current-step').textContent = _curr... | [
"animate () {\n if (this.multiStep) this.animateSteps()\n this.animateDraws()\n }",
"run() {\n this.pid = setInterval(animate, 200, this);\n //let pathInterval = null;\n //animates the visit portion of the animation then passes on to path\n function animate(animation) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for a selected pattern, set disabled on the inputs for each exported feature | function set_features_enabled(){
var featuresmap = {
color: '.form-group:has(input#colorinput)',
period: '.form-group:has(input#period)',
intensity: '.form-group:has(input#intensity)'
};
for (feature in featuresmap) {
var selector = $(featuresmap[feature]);
var enabled = false;
if (data.pa... | [
"enable() {\n const eqs = this.equations;\n for (let i = 0; i < eqs.length; i++) {\n eqs[i].enabled = true;\n }\n }",
"onDisabled() {\n this.updateInvalid();\n }",
"function hideInputs() {\n var selectedDistribution = jQuery(\"#distribution\").val();\n for (inputName in fEnableObj... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This object is responsible for managing the keys for a proxy. | function ProxyKeystore(config) {
// Define this property so it doesn't show up as enumerable or writable.
Object.defineProperty(this, 'oauth_secret_dir', { value: config.oauth_secret_dir });
// The count property will keep count of the valid keys exposed by this object.
Object.defineProperty(this, 'count', { v... | [
"createProxy() {\n\t\treturn new Proxy(this, {\n\t\t\tget(target, prop, receiver) {\n\t\t\t\tlet x = +prop;\n\t\t\t\treturn new Proxy(target, {\n\t\t\t\t\tget(target, prop, receiver) {\n\t\t\t\t\t\tlet z = +prop;\n\t\t\t\t\t\tlet { zSize, data} = target;\n\t\t\t\t\t\treturn data[ x*zSize + z];\n\t\t\t\t\t}\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function converts text into an entry | function toEntry(text) {
let lines = text
.split('\n')
.map(line => trim(line))
.filter(line => line !== '');
if (lines.length === 0) {
throw new Error('Reminder deleted');
} else if (lines.length < 2) {
throw new Error('Invalid reminder format');
}
let main = trim(lines[0]);
let subs = ... | [
"function bibtexFormat(entry, config) {\r\n let s = '';\r\n s += '@' + entry.entryType + '{' + (entry.internalKey ? entry.internalKey : '');\r\n // Find the longest field name in entry\r\n let maxFieldLength = 0;\r\n entry.content.forEach(field => {\r\n maxFieldLength = Math.max(maxFieldLength... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constraint equation GaussSeidel solver. | function GSSolver(){Solver.call(this);/**
* The number of solver iterations determines quality of the constraints in the world. The more iterations, the more correct simulation. More iterations need more computations though. If you have a large gravity force in your world, you will need more iterations.
* @pr... | [
"function gauss(x, s) {\n // 2.5066282746310005 is sqrt(2*pi)\n return Math.exp(-0.5 * x*x / (s*s)) / (s * 2.5066282746310005);\n}",
"deleteVertex(vertex) {\n\t\t\tlet freeOfConstraint;\n\t\t\tlet iterEdges = new FromVertexToOutgoingEdges();\n\t\t\titerEdges.fromVertex = vertex;\n\t\t\titerEdges.realEdgesOn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
whoss Utility to parse npm packages used in a project and generate an attribution file to include in your product. | function whoss(options) {
taim_1.default('Total Processing', bluebird_1.default.all([
taim_1.default('Npm Licenses', npm_1.getNpmLicenses(options)),
]))
.catch(function (err) {
console.log(err);
process.exit(1);
})
.spread(function (npmOutput) {
var o = {};
... | [
"_installNPMPackages() {\n\n var done = this.async();\n\n // Spawn dev dependencies\n this.npmInstall(['install',\n 'handlebars-template-loader'\n ], [\n '--save-dev',\n '--no-shrinkwrap'\n ]);\n\n // Spawn dependencies\n this.npmInst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute the number of exhausted votes | updateExhaustedVotes() {
const votesSum = this.count[this.round].reduce((a, b) => a + b);
const exhausted = (this.p * this.numBallots) - votesSum;
this.exhausted[this.round] = exhausted;
} | [
"function election(votes) {\n for(var student in votes) { \n var votesCast = votes[student];\n \n var counter = 1;\n for(var officer in votesCast) { //targeting the officer position and voted name\n var officerName = votesCast[officer];\n if (voteCount[officer][officerName]) {\n voteCoun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
THREEcap EffectComposer pass for capturing and encoding a Three.js app's render output Supports jpg, png, gif, and mp4 output Video encoding capabilities provided by FFmpeg, crosscompiled to JavaScript using Emscripten | function THREEcap(args) {
this.settings = {
width: 320,
height: 240,
fps: 25,
time: 5,
srcformat: 'raw',
format: 'mp4',
quality: 'ultrafast',
useWorker: true,
inWorker: false,
scriptbase: '',
canvas: false,
composer: false,
renderpass: false
};
// Update settin... | [
"setupEffectComposer() {\n if (this.nature.WebGLRendererParameters) {\n if (this.nature.WebGLRendererParameters.effectComposer) {\n if (this.SceneDispatcher.currentVLabScene) {\n /**\n * Postprocessing EffectComposer\n * @se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the parent directory of a filename, if it does not already exist | mkParentPath(dir, cb) {
var segs = dir.split(/[\\\/]/);
segs.pop();
if (!segs.length) {
return cb && cb();
}
dir = segs.join(path.sep);
return this.mkpath(dir, cb);
} | [
"createFolder(parentPath, name, callback) {\n\t\tlet params = {\n\t\t\tBucket: this._bucket,\n\t\t\tKey: parentPath + name\n\t\t};\n\t\tthis._s3.putObject(params, function (err, data) {\n\t\t\tcallback(parentPath + name);\n\t\t});\n\t}",
"function createDirectoryForFile(source, output, filePath, verbose) {\n var... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Refreshes content queries for all directives in the given view. | function refreshContentQueries(tView) {
if (tView.contentQueries != null) {
for (var i = 0; i < tView.contentQueries.length; i += 2) {
var directiveDefIdx = tView.contentQueries[i];
var directiveDef = tView.data[directiveDefIdx];
directiveDef.contentQueriesRefresh(directi... | [
"function notifyObservers() {\n _.each(views, function (aView) {\n aView.update();\n });\n } // notifyObservers",
"function refresh_content() {\n $('.refresh').on('click', function() {\n show_content();\n });\n }",
"function refreshFields(view,focus,changes,path,iserror) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get an item by primary key (User ID and SN) | async get(userID, sn) {
const params = {
Key: {
user_id: userID,
sn: sn
},
TableName: devicesTable
};
const res = await this.db.get(params).promise();
return res;
} | [
"getUserFromUhId(uhID) {\n check(uhID, String);\n return this._collection.findOne({ uhID });\n }",
"function getRowId(req, res) {\n db.data.get(`SELECT rowid FROM users WHERE username = '${req.username}'`, function(err, user) {\n if (err) {\n console.error(\"There was an error retrievi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Receives a number and returns its CSS pixel value. | function pixelValue(value)
{
return value + 'px';
} | [
"function toCSSPixels(number) {\r\n if (Object.isString(number) && number.endsWith('px'))\r\n return number;\r\n return number + 'px'; \r\n }",
"function rgbToCmy(n) {\n return Math.round((rgbInvert(n) / 255) * 100);\n}",
"function setNumber(value, element)\n {\n var percentage = (valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a module, print a skylark `node_module` rule. | function printNodeModule(mod) {
const deps = mod.deps;
print(``);
printJson(mod);
print(`node_module(`);
print(` name = "${mod.yarn ? mod.yarn.label : mod.name}",`);
// SCC pseudomodule wont have 'yarn' property
if (mod.yarn) {
const url = mod.yarn.url || mod.url;
const sha1 = mod.yarn.sha1... | [
"function printNodeModuleAll(modules) {\n print(``);\n print(`# Pseudo-module that basically acts as a module collection for the entire set`);\n print(`node_module(`);\n print(` name = \"_all_\",`);\n print(` deps = [`);\n modules.forEach(module => {\n print(` \":${module.yarn ? module.yarn.la... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear Clears the session from local storage and cookies | function _clear() {
// Delete from localStorage
delete localStorage['_session'];
// Delete the cookie
Cookies.remove('_session', '.' + window.location.hostname, '/');
} | [
"clearSession() {\n ['accessToken', 'expiresAt', 'idToken'].forEach(key => {\n sessionStorage.removeItem(key);\n });\n\n this.accessToken = '';\n this.idToken = '';\n this.expiresAt = '';\n }",
"function clearWebStorage(){\r\n\t\t\t//Clearing session storage\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
implementation of District Population Chart | function createDistrictPopulationChart(district_data_object){
// let try_var = district_data_object;
// console.log(try_var);
//array for chart dataset usage
let district_array = district_data_object["Districts"];
let male_array = [];
let female_array = [];
//remove district array from th... | [
"function undergradbyCollegeChart() {\r\n\t\t\tvar undergradData = getundergradbyCollegeChart(ualbyCollege);\r\n\r\n\t\t\tvar data = google.visualization.arrayToDataTable([\r\n\t\t\t\t['College', 'Student Enrollment'],\r\n\t\t\t\t['College of Arts and Sciences', undergradData.artsAndScience],\r\n\t\t\t\t['College o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ The Rules class /////////////////////////////////////////////////////////// | function Rules() {
var rules = this;
Rules.METHODS.forEach(function (name) {
rules[name] = function () {};
});
} | [
"function genRule() {\n\t//Rule is an object storing these three properties.\n\tvar rule = {\n\t\trType,\n\t\trNumber,\n\t\trColor,\n\t\tcompareColor: function(item) {\n\t\t\t\treturn ((rColor == item.color) || (rColor == 0));\n\t\t},\n\t\tcompareNumber: function(item) {\n\t\t\t\treturn ((rNumber == item.number) ||... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the training status of a person group (completed or ongoing). Training can be triggered by the Person Group Train Person Group API. The training will process for a while on the server side.. Http Method GET | personGroupGetPersonGroupTrainingStatusGet(queryParams, headerParams, pathParams) {
const queryParamsMapped = {};
const headerParamsMapped = {};
const pathParamsMapped = {};
Object.assign(queryParamsMapped, convertParamsToRealParams(queryParams, PersonGroupGetPersonGroupTrainingStatusGet... | [
"getVersionTrainingStatus(params) {\n return this.createRequest('', params, 'get');\n }",
"get participantStatus() {\n\t\treturn this.__participantStatus;\n\t}",
"function getTraining() {\n if ($(\"#lblTrainingName\").size() > 0) {\n return $(\"#lblTrainingName\")\n .text()\n .replace(/[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |