query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
The datatype IRI of this literal | get datatype() {
return new NamedNode(this.datatypeString);
} | [
"get rdfaDatatype() {\n if (this.args.datatype) {\n return this.args.datatype;\n }\n\n return this.normalizedRdfaBindings[this.args.prop]?.datatype;\n }",
"function getTypeIdentifier(Repr) {\n\t return Repr[$$type] || Repr.name || 'Anonymous';\n\t }",
"get dtype() {\n return this.dtypes[0]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders list data based on the view xml provided | async renderListData(viewXml) {
const q = List(this, "renderlistdata(@viewXml)");
q.query.set("@viewXml", `'${viewXml}'`);
const data = await spPost(q);
return JSON.parse(data);
} | [
"function listUsersView(targetid, users){\n apply_template(targetid, \"users-list-template\", {'users': users});\n}",
"function renderCafe(doc){\n let li = document.createElement('li');\n let name = document.createElement('span');\n let city = document.createElement('span');\n\n li.setAttribute('data-id', ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check Input birthday Correct or InCorrect | function checkInputBirthday() {
var txb_birthday = document.getElementsByName("birthday")[0].value;
var check_birthday = document.getElementById("error_birthday");
check_birthday.innerHTML = "";
var rule = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
var regexp_birthday = new RegExp(rule);
if(!regexp_birthday.test(txb_birth... | [
"function isBirthday(day, month){\n\treturn month == 7 && day == 24;\n}",
"function sayBirthday(x, y) {\n var month = 1;\n var day = 12;\n // if (((x === month) && (y === day)) || ((y === month) && (x === day))) {\n if ((x === month && y === day) || (y === month && x === day)) {\n console.log(\"How did you... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end CVietString charactermap template | function CVietCharMap() {
this.vietchars = null;
this.length = 149;
return this;
} | [
"function buildCharMapIndex() {\n // Unicode Blocks\n let basicLatin = []; // Block: 00..7E; Subset: 20..7E\n let latin1 = []; // Block: 80..FF; Subset: A0..FF\n let latinExtendedA = []; // Block: 100..17F; Subset: 152..153\n let generalPunctuation = []; //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The function to check a cell that has not been leftclicked | function check_unclicked_cell(cell) {
if ((!cell.hasClass("clicked"))&&(!cell.hasClass("flag"))){
var cell_adjacent = get_adjacent(cell);
/* If a cell with mine is left-clicked and it is not marked as mine, the user lose
the game */
if (cell.hasClass("mine")) {
lose_game();
cell.css("background-color", "... | [
"function navigateCells(e) {\n if($(\"div.griderEditor[style*=block]\").length > 0)\n return false;\n\n var $td = $table.find('.' + defaults.selectedCellClass);\n var col = $td.attr(\"col\");\n switch(e.keyCode) {\n case $.ui.keyCode.DOWN:\n //console.log($td);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A draft interaction was started. Update the timebetweeendraftactions timer. | recordDraftInteraction() {
// If there is no timer defined, then this is the first interaction.
// Set up the timer so that it's ready to record the intervening time when
// called again.
const timer = this._timers.timeBetweenDraftActions;
if (!timer) {
// Create a timer with a max... | [
"function resetOwnActionTimer() {\n actionTimer = new Date()\n }",
"function startBattle(client, msg) {\n sample(client, msg, \"start\");\n timeleft(client, msg, \"start\");\n submit(client, msg, \"start\");\n}",
"function ActivityStarted(){\n\n\tif (g_bFullScreen) {\n\t\tOnResize(g_ConWidth,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a XYcoordinatearray to an A1notation string. | function from_XY_to_A1(xy) {
return from_X_to_A(xy[0]) + from_Y_to_1(xy[1]);
} | [
"function from_A1_to_XY(a1) {\n return [from_A_to_X(a1.charAt(0)), from_1_to_Y(a1.charAt(1))];\n }",
"function convertArrayToXY(array) {\n const newArray = [];\n for(let i = 0; i < array.length; i += 2) {\n newArray.push({\n x: array[i],\n y: array[i + 1]\n });\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sectionend Input Validation sectionbegin Interactions Top row is an area, that holds currency code and exchange input, if user clicked or tapped in this area, focus on input. | _handleTopRowClick(){
this.amountInput.focus();
} | [
"focusInput(){\n this.amountInput.focus();\n }",
"function enterqty(){\n var qtytempfield = $( \"#qtytempfield\" ).val();\n $( \"#barcode\" ).val(qtytempfield);\n $( \"#qtytempfield\" ).val('');\n $.modal.close();\n if(qtytempfield.length > 7) {\n //BARCODE\n getplu(qtytempfield);\n } else {\n //QTY\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
makeBox Create a box with vertices, normals and texCoords. Create VBOs for each as well as the index array. Return an object with the following properties: normalObject WebGLBuffer object for normals texCoordObject WebGLBuffer object for texCoords vertexObject WebGLBuffer object for vertices indexObject WebGLBuffer obj... | function makeBox(ctx)
{
// box
// v6----- v5
// /| /|
// v1------v0|
// | | | |
// | |v7---|-|v4
// |/ |/
// v2------v3
//
// vertex coords array
var vertices = new Float32Array(
[ 1, 1, 1, -1, 1, 1, -1,-1, 1, 1,-1, 1, // v0-v1-v2-v3 fr... | [
"makeCube(cx, cy, cz, sx, sy, sz) {\n let v0 = [ cx - sx / 2, cy - sy / 2, cz - sz / 2 ];\n let v1 = [ cx - sx / 2, cy - sy / 2, cz + sz / 2 ];\n let v2 = [ cx - sx / 2, cy + sy / 2, cz - sz / 2 ];\n let v3 = [ cx - sx / 2, cy + sy / 2, cz + sz / 2 ];\n let v4 = [ cx + sx / 2, cy ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A shortcut to creating a chart instance. The first argument is either a reference to or an id of a DOM element to be used as a container for the chart. The second argument is the type reference of the chart type. (for plain JavaScript users this can also be a string indicating chart type) ```TypeScript let chart = am4c... | function create(htmlElement, classType) {
// This is a nasty hack for the benefit of vanilla JS users, who do not
// enjoy benefits of type-check anyway.
// We're allowing passing in a name of the class rather than type reference
// itself.
var classError;
if (_Type__WEBPACK_IMPORTE... | [
"function chartBuild(chartCanvas, chartType, chartData, chartOptions) {\n let newChart = new Chart(chartCanvas, {\n type: chartType,\n data: chartData,\n options: chartOptions\n });\n} //END: chartBuild",
"function makeChart(type, chart, scale, swich)\n{\n var maxTicks = 10;\n if(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
draw() Handles input, movement, eating, and displaying for the system's objects | function draw() {
// Clear the background to black
background(0);
// Handle input for the tiger
tiger.handleInput();
lion.handleInput();
// Move all the "animals"
tiger.move();
lion.move();
antelope.move();
zebra.move();
bee.move();
// Handle the tiger eating any of the prey
tiger.handleEati... | [
"function render() {\n\t//clear all canvases for a fresh render\n\tclearScreen();\n\t\n\t//draw objects centered in order\n\tfor (let i = 0; i < objects.length; ++i) {\n\t\tdrawCentered(objects[i].imgName,ctx, objects[i].x, objects[i].y,objects[i].dir);\n\t}\n\t\n\t//finally draw the HUD\n\tdrawHUD();\n}",
"draw(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
init flot chart: horizontal bar chart | function chartBarHorizontal(placeholder) {
var basic = [
[188, 1], [200, 2], [225, 3], [230, 4], [250, 5]
];
var gold = [
[200, 1], [220, 2], [210, 3], [240, 4], [240, 5]
];
var platinum = [
[100, 1], [90, 2], [150, 3], [200, 4], [235, 5]
];
var plot = $.plot(placeholder,
[
{
data... | [
"function createHorizontalBarchart(className,svgWidth,svgHeight,x,y,data,xTitle){\n //set width and height of bar chart\n let svg = d3.select(className)\n .attr(\"width\",svgWidth)\n .attr(\"height\",svgHeight)\n .attr(\"transform\",`translate(${x},${y})`);\n \n //Gaps between the b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This takes the array of all employees and asks the user to choose one. It passes that ID to loadRoles, and tells it to call updateEmployeeRolePrompt when it's done | function updateEmployeeRolePickEmp(empArray){
let eChoice=[];
for(e of empArray){
eChoice.push({name:(e['First Name']+" "+e['Last Name']), value:e.ID});
}
inquirer.prompt({
message:"Choose Employee.",
type:"list",
name:"emp",
choices:eChoice
}) .then(function... | [
"function updateEmployeeManagerPickEmp(empArray){\n let eChoice=[]; \n for(e of empArray){\n eChoice.push({name:(e['First Name']+\" \"+e['Last Name']), value:e.ID});\n }\n inquirer.prompt({\n message:\"Choose Employee.\",\n type:\"list\",\n name:\"emp\",\n choices:eCho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal API Return the full path to the desired PNG | function pngPath(size) {
return path.join(cacheDir, baseName + '-' + size + '.png')
} | [
"function getQrImagePathToSave()\n{\n return path.join(__dirname,'../../../client/qr-images/');\n}",
"function getImagePath(source){\n\tvar urlPath = url.parse(source).path;\n\tvar lastPath = _.last(urlPath.split(\"/\"));\n\tvar savePath = ORGINAL_IMAGE_PATH + lastPath;\n\treturn savePath;\n}",
"function findP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor to create a new mempool | constructor(){
this.mempool = {};
this.timeoutRequests = {};
} | [
"create_tx(tx) {\n this.mempool.push(tx);\n }",
"static allocate(params) {\n let data;\n let keys;\n\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given grid, returns a list of indices of rows in the grid that are full | function getFullRows (grid) {
let rowList = [];
for (let i = 0; i < grid.length; i++) {
if (sumRow(grid[i]) >= cols) {
//console.log("SUM: ", i, sumRow(grid[i]));
rowList.push(i);
}
}
return rowList;
} | [
"function checkGrid(grid){\n \n let result = []\n let count = 0;\n\n for (let rowIndex = 0; rowIndex < grid.length; rowIndex += 1){\n \n let row = grid[rowIndex];\n\n for (let index = 0; index < row.length; index += 1){\n\n if(index === 1){\n count = count ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
initPaging Initializes the paging | function initPaging() {
vm.pageLinks = [
{text: "Prev", val: vm.pageIndex - 1},
{text: "Next", val: vm.pageIndex + 1}
];
vm.prevPageLink = {text: "Prev", val: vm.pageIndex - 1};
vm.nextPageLink = {text: "Next", val: vm.pageIndex + 1};
} | [
"function Pager(){\n\tthis.routes = {};\n\n\tthis.ctx = new PageContext();\n\n\tthis.start();\n\n\tbindEvents();\n}",
"function initPage(sMode) {\n bindGrid();\n setDefaultValues();\n var sPageTitle = getPageTitle();\n el(\"hdnPageTitle\").value = sPageTitle;\n el(\"lstBack\").style.display = \"non... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the path/identifier to the WebBrowserProcessor responsible for handling the InviwoAPI calls. The path will be sent to supplied onSuccess callback. | async getParentWebBrowserProcessor(
onSuccess, onFailure = function(error_code, error_message) {}) {
window.cefQuery({
request: JSON.stringify({'command': 'parentwebbrowserprocessor'}),
onSuccess: function(response) {
if (typeof onSuccess === 'function') {
... | [
"function getPlatformId(){\n return getURLParameter('platform');\n}",
"getCurrentWebIdentity(webUrl, formDigestValue) {\n const requestOptions = {\n url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,\n headers: {\n 'X-RequestDigest': formDigestValue\n },\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get bank at index | function getBankAtIndex(inIdx) {
logInfo('Selected bank at index: ' + inIdx);
gBankInfoSelected = objJSON.rows[inIdx].CODE + "#" + objJSON.rows[inIdx].SHORT_NAME + "#" + objJSON.rows[inIdx].NAME_VN
+ "#" + objJSON.rows[inIdx].NAME_EN ; //save bank info raw data
navController.pushToView("corp/transfer/trans-input-c... | [
"function findObject(index) {\n return repository[index];\n }",
"getAccount(pin){\n for (let i = 0; i < this.accounts.length; i++) {\n if (this.accounts[i].pin === pin) {\n //return the bank account that matches our pin\n console.log (\"GetAccount\");\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Main function creates a migration file and a schema file by the parameters It compares between schemas (current schema and old schema), and writes the migration file | static create(name, version, oldVersion, path) {
if (_.isUndefined(oldVersion)) throw new Error('oldVersion is mandatory param');
var currentSchema = this.createSchema(name, version, path);
path = path + MigrationsBL.MIGRATION_DIR;
// Fetching old schema (if not exists, returns an empty schema)
v... | [
"newSchema() {\n const { ctx } = this;\n if (!this.useModelAsBase && this.isNewFile) {\n if (!this.options.name) {\n this.log.error('Missing schema name: yo labs:schema [name] \\n');\n this.log(this.help());\n process.exit(1);\n }\n const fileName = this.options.name\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION NAME : fetchPortForManageConnectivity AUTHOR : marlo agapay DATE : January 6, 2014 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : get all available ports connected and available on the on the line PARAMETERS : lineId | function fetchPortForManageConnectivity(lineId){
window['variable' + dynamicManagePortArr[pageCanvas]] = [];
var line = lineId.split("||");
var des = line[0];
var destSplit = des.split(".");
var sor = line[1];
var sorSplit = sor.split(".");
var destinationDevice = destSplit[0];
var sourceDevice = sorSplit[0];
... | [
"function getPortIdforManageConnectivity(portObj,action){\n\tvar port =\"\";\n\tif(globalInfoType == \"JSON\"){\n\t\tvar ojb = portObj.split(\".\")[0];\n\t\tvar objArr = obj.split(\".\");\n var prtArr = getAllPortOfDevice(objArr[0]);\n }else{\n var prtArr= portArr;\n }\n\tfor (var a=0; a<prtArr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert float to Decimal | function floatToDecimal(float) {
return Math.round(float*100)+'%';
} | [
"function fracToDec (fractionalValue) {\n return parseFloat(`.${fractionalValue}`);\n}",
"function moeda2float(moeda){\r\n\r\nmoeda = moeda.replace(\".\",\"\");\r\n\r\nmoeda = moeda.replace(\",\",\".\");\r\n\r\nreturn parseFloat(moeda);\r\n\r\n}",
"function float(val, def)\n {\n if (isNaN(val)) retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accepts input to connect two nodes | function addEdge() {
//source input box
twoNodesinp1 = createInput('');
twoNodesinp1.input(myInputEvent);
twoNodesinp1.position(800,50);
twoNodesinp1.size(80,40);
twoNodesinp1.changed(connectingText1);
//var s = twoNodesinp1.value();
//target input box
twoNodesinp2 = createInput('');
twoNodesin... | [
"function connection(x,y,z,a){\n\t\n\tvar weight = x;\t\t\t//a postive or negative double value\n\tvar inputNode = y;\t\t// the input Node of this connection\n\tvar outputNode = z;\t\t//the output node this connection is targeted to\n\tvar instantCorrection = 0;\n\tvar id = a;\n\t\n\t//get functions\n\t\n\tthis.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sorts the painting array by year | function sortYear() {
document.querySelector('#yearH').addEventListener('click', function (e) {
const year = paintings.sort((a, b) => {
return a.YearOfWork < b.YearOfWork ? -1 : 1;
})
displayPaint(year);
})
} | [
"get sortedProgramYearObjectives() {\n return this._programYearObjectives?.slice().sort(sortableByPosition);\n }",
"iYearToJYear(iYear) {\n // console.log('** iYearToJYear ' + iYear + ' **');\n const jYears1 = []; // fill with tuple(s) of (startYear, eraCode) for matching era(s), then sort it\n const... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates routeslist to be a sorted by duration list of roads based on "roads" variable. | function renderList() {
// First, we need to put the objects into an array.
var roadsList = Object.values(roads);
// Then, we need to sort the array.
roadsList.sort((a, b) => -a.duration + b.duration);
// Then, we need to clear the list and add new elements
var listElement = document.getElementById("routeslist"... | [
"function calcRoute() {\n\t// Prepare the API call\n\tvar start = start_location.geometry.location;\n\tvar end = end_location.geometry.location;\n\tvar request = {\n\t\torigin: start,\n\t\tdestination: end,\n\t\ttravelMode: 'DRIVING'\n\t};\n\n\t// Call Google Maps API\n\tdirectionsService.route(request, function (r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function takes mentor's sheet and create mentor's collection | function getMentors(sheetOfMentors) {
const objectOfMentors = {};
sheetOfMentors.forEach((mentorElement) => {
const fullMentorName = `${mentorElement.Name} ${mentorElement.Surname}`;
const githubLink = mentorElement.GitHub;
const github = getGithubLogin(githubLink);
// Create mentor object and add... | [
"function insertMember(name, index)\n{\n //Contact Sheet\n contact_sheet.insertRowsBefore(2 + (index * 3), 3);\n var color_cells = contact_sheet.getRange(4 + (index * 3), 1, 1, 7);\n color_cells.setBackground(\"#E0E0E0\");\n var cell = contact_sheet.getRange(2 + (index * 3), 1);\n cell.setValue(name);\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add pending task placeholder | function addPendingPlaceholder() {
pendingPlaceholder = document.createElement("li")
pendingPlaceholder.id = "pendingPlaceholder"
pendingPlaceholder.className = "task-box placeholder"
let pendingPlaceholderDiv = document.createElement("div")
let pendingPlaceholderText = document.createElement("div")... | [
"function add(task){\n\n // check whether tasks have been run\n if (tasksRun){\n\n // run the task asynchronously\n window.setTimeout(task, 0);\n\n }else{\n\n // add the task to the list\n tasks.push(task);\n\n }\n\n }",
"function createNewTask(task) {\n storeTaskLocalStorage(t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the near frustum plane transformed by the transform matrix | static GetNearPlaneToRef(transform, frustumPlane) {
const m = transform.m;
frustumPlane.normal.x = m[3] + m[2];
frustumPlane.normal.y = m[7] + m[6];
frustumPlane.normal.z = m[11] + m[10];
frustumPlane.d = m[15] + m[14];
frustumPlane.normalize();
} | [
"static GetTopPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] - m[1];\n frustumPlane.normal.y = m[7] - m[5];\n frustumPlane.normal.z = m[11] - m[9];\n frustumPlane.d = m[15] - m[13];\n frustumPlane.normalize();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
triggerAttackRelease is shorthand for triggerAttack, then waiting some duration, then triggerRelease. | triggerAttackRelease(duration, time, velocity = 1) {
time = this.toSeconds(time);
this.triggerAttack(time, velocity);
this.triggerRelease(time + this.toSeconds(duration));
return this;
} | [
"attemptAttack() {\n if (!this.target)\n return;\n if (!this.wasInRange) {\n this.timeToNextAttack = this.meleeAttackRate.getTicks(this.bot);\n return;\n }\n const queue = new mineflayer_utils_1.TaskQueue();\n const target = this.target;\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find information for the visual line (see / [`visualLineAt`](view.EditorView.visualLineAt)) at the given / vertical position. The resulting block info might hold another / array of block info structs in its `type` field if this line / consists of more than one block. / / Heights are interpreted relative to the given `e... | visualLineAtHeight(height, editorTop) {
this.readMeasured();
return this.viewState.lineAtHeight(height, ensureTop(editorTop, this.contentDOM));
} | [
"visualLineAtHeight(height, editorTop) {\n this.readMeasured();\n return this.viewState.lineAtHeight(height, ensureTop(editorTop, this.contentDOM));\n }",
"visualLineAt(pos, editorTop = 0) {\n return this.viewState.lineAt(pos, editorTop);\n }",
"lineBlockAtHeight(height) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates state to animate haduken | haduken() {
this.updateState(KEN_SPRITE_POSITION.haduken, KEN_IDLE_ANIMATION_TIME, false);
} | [
"function animate() {\n requestAnimationFrame(animate);\n // Insert animation frame to update here.\n }",
"animateReducingStatus() {\n this._reducingTime = 0;\n let twn = new mag.IndefiniteTween((t) => {\n stage.draw();\n\n this._reducingTime += t;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Launches a manual ripple at the specified coordinated or just by the ripple config. | launch(configOrX, y = 0, config) {
if (typeof configOrX === 'number') {
return this._rippleRenderer.fadeInRipple(configOrX, y, Object.assign(Object.assign({}, this.rippleConfig), config));
}
else {
return this._rippleRenderer.fadeInRipple(0, 0, Object.assign(Object.assign... | [
"function makeRunAdviseJob(adviseLaunchInfo) {\n \n var resourceCredentials = adviseLaunchInfo.resourceCredentials,\n eedURL = adviseLaunchInfo.eedURL,\n eedTicket = adviseLaunchInfo.eedTicket,\n decodeJobXML = htmlUnescape(adviseLaunchInfo.encodedJobXML),\n runInfo = adviseLaunchI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a background task with the specified taskEntryPoint, taskName, trigger, and condition (optional). | function registerBackgroundTask(taskEntryPoint, taskName, trigger, condition) {
var builder = new background.BackgroundTaskBuilder();
builder.name = taskName;
builder.taskEntryPoint = taskEntryPoint;
builder.setTrigger(trigger);
if (condition !== null) {
bui... | [
"function add(task){\n\n // check whether tasks have been run\n if (tasksRun){\n\n // run the task asynchronously\n window.setTimeout(task, 0);\n\n }else{\n\n // add the task to the list\n tasks.push(task);\n\n }\n\n }",
"enqueueTask(task) {\n this.forceReschedule = true;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the amount of chips changed, we need to update the key manager state and focus the next closest chip. | _updateFocusForDestroyedChips() {
// Move focus to the closest chip. If no other chips remain, focus the chip-list itself.
if (this._lastDestroyedChipIndex != null) {
if (this.chips.length) {
const newChipIndex = Math.min(this._lastDestroyedChipIndex, this.chips.length - 1);
... | [
"function nextKnCell(e){\n\tvar previousKnCell = keynapse.currentKnCell;\n\tpreviousKnCell.knCellHint.removeClass('kn-cell-hint-current');\n\n\tvar currentKnCell;\n\tif (keynapse.currentKnCellIndex == keynapse.knCells.length - 1 ){\n\t\tkeynapse.currentKnCellIndex = 0;\n\t\tkeynapse.currentKnCell = keynapse.knCells... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add event to the puzzle elements | function addDraggableEvent(){
const Puzzles = document.querySelectorAll('.puzzle');
Puzzles.forEach(puzzle => {
// Drag events
puzzle.addEventListener('dragstart', dragStart);
puzzle.addEventListener('dragenter', dragEnter);
puzzle.addEventListener('dragover', dragOver);
puzzle.addEventListen... | [
"function addEvent() {\nfor (let i = 0; i < card.length; i++) {\n\tcard[i].addEventListener('click', function() {\n\t\tmoveCounter();\n\t\tmatchingTestArr.push(this);\n\t\ttestArr();\n\t\tremoveStars();\n\t\tearnedStars();\n\t});\n }\n}",
"function asignacionEvento() {\n for (let i = 3; i < 8; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides a list of the message headers for the currently selected messages. If summarizeSelectionInFolder is true, then any collapsed thread roots that are selected will also (conceptually) have all of the messages in that thread selected and they will be included in the returned list. If the user has rightclicked on a... | get selectedMessages() {
if (!this.view.dbView) {
return [];
}
return this.view.dbView.getSelectedMsgHdrs();
} | [
"selectMessages(aMessages, aForceSelect, aDoNotNeedToFindAll) {\n let treeSelection = this.treeSelection; // potentially magic getter\n let foundAll = true;\n if (treeSelection) {\n let minRow = null,\n maxRow = null;\n\n treeSelection.selectEventsSuppressed = true;\n treeSelection.cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to remove the video recorder dot | function removeDot() {
const dot = document.getElementById('etave-recorder-dot');
if (dot) dot.parentElement.removeChild(dot);
} | [
"deleteDots() {\n let room_buffer = this._room_canvas;\n let canvas_objects = room_buffer.getObjects();\n canvas_objects.forEach(function (item, i) {\n if (item.type == 'debug') {\n room_buffer.remove(item);\n }\n });\n room_buffer.renderAll();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs the given application JSON | function runApp($location, $scope, $http, KubernetesApiURL, json, name, onSuccessFn, namespace, onCompleteFn) {
if (name === void 0) { name = "App"; }
if (onSuccessFn === void 0) { onSuccessFn = null; }
if (namespace === void 0) { namespace = null; }
if (onCompleteFn === void 0) { onComp... | [
"function f_ProcessJSONData_Main(frame){\n\t//\tlog AppID received\t\t\t\n\t//f_RADOME_log(frame.AppID);\n\t//Check AppID and do what fit with that\n\tvar id = parseInt(frame.AppID);\n\tswitch(id) // inspect id found to dispatch the appropriate processing\n\t{\n\t\tcase APP_ID.LIST:\n\t\t\t// load JSON data (into ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log that the article was viewed by this ip address so that we don't count any more views from this ip address for a while. | function updateShouldIncrementViews(db, articleId, ipAddress) {
db.collection('views', (err, viewsColl) => {
if (err !== null) {
logError(err);
} else {
viewsColl.insertOne({
articleId: articleId,
ipAddress: ipAddress,
timestamp: new Date()
}).catch(function(err) {
... | [
"function getShouldIncrementViews(db, articleId, ipAddress) {\n const prom = new Promise(function(resolve, reject) {\n db.collection('views', (err, viewsColl) => {\n if (err !== null) {\n reject(err);\n } else {\n const threshold = new Date(Date.now() - 1000 /*sec*/ * 60 /*min*/ * 60 /*h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Floor an order amount to the supported market precision | floor_amount(market, amount) {
return this.floor_num(amount, market.precision.amount);
} | [
"getOrderMinAmount() {\n const { amount, presets } = this.getTier() || {};\n if (isNil(amount) && isNil(presets)) return 0;\n return min(isNil(amount) ? presets : [...(presets || []), amount]);\n }",
"function calculate_amount_buy (tokenPrice, howMuchInETH, sellPrecision) {\n\n var sellPrecisionMulti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[MSOSHARED] 2.3.7.6 URLMoniker TODO: flags | function parse_URLMoniker(blob) {
var len = blob.read_shift(4), start = blob.l;
var extra = false;
if(len > 24) {
/* look ahead */
blob.l += len - 24;
if(blob.read_shift(16) === "795881f43b1d7f48af2c825dc4852763") extra = true;
blob.l = start;
}
var url = blob.read_shift((extra?len-24:len)>>1, 'ut... | [
"function getUrlType() {\n let url = document.location.href\n\n if(url.match(/http(s)?:\\/\\/open\\.spotify\\.com\\/playlist\\/.+/) != null)\n return 'playlist'\n\n if(url.match(/http(s)?:\\/\\/open\\.spotify\\.com\\/album\\/.+/) != null)\n return 'album'\n\n if(url.match(/http(s)?:\\/\\/open\\.spotify\\.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last path component in the URL. If the URL does not have a path component, undefined is returned. Example: navigationUrl().url is: navigationUrl().getLastPath() returns: 4 navigationUrl().url is: navigationUrl().getLastPath() returns: undefined | function getLastPath() {
if (url.path.components.length > 0) {
return url.path.components[url.path.components.length - 1];
}
} | [
"function last() {\n return _navigationStack[_navigationStack.length - 1];\n }",
"function get_last_word_in_path(req) {\n\t\tconst parts = req.path ? req.path.split('/') : [];\t\t\t\t\t// grab the last word in the request's path\n\t\treturn parts[parts.length - 1] || '-';\t\t\t\t\t\t\t\t// return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do something when dragging stops on agenda div | function myAgendaDragStop(eventObj, divElm, agendaItem) {
//alert("drag stop");
} | [
"function dragEnd() {\n console.log('drag end');\n }",
"function stopDrag(){\n\t detector_container.removeEventListener(\"pressmove\", moveDrag); \n}",
"function orderedReadyList() {\n $('.draggable').draggable({\n \n containment: '#draggable-area',\n revert: true,\n start: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load shared asset FOOTER | function loadFooter() {
loadSection("/Frontend/shared/footer/footer.html")
.then(html => {
document.getElementById("footerContainer").innerHTML = html;
})
.catch(error => {
console.warn(error);
});
} | [
"function loadFooter() {\n $(\"#footer\").load(\"/partials/footer.html\");\n}",
"_defaultFooterRenderer() {}",
"refreshFooter() {}",
"addLayoutScriptsAndStyles() {\n this.asset.layoutScript = path.join(this.pageConfig.layoutsAssetPath, this.layout, 'scripts.js');\n this.asset.layoutStyle = path.join(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads a KEEPALIVE frame from the buffer and returns it. | function deserializeKeepAliveFrame(buffer, streamId, flags, encoders) {
(0, _invariant2.default)(
streamId === 0,
'RSocketBinaryFraming: Invalid KEEPALIVE frame, expected stream id to be 0.'
);
let offset = FRAME_HEADER_SIZE;
const lastReceivedPosition = (0, _RSocketBufferUtils.readUInt64BE)(
buffe... | [
"function getNextFrame() {\n if (length >= frameByteSize) {\n // copy the frame\n buf.copy(frameBuffer, 0, 0, frameByteSize);\n // move remaining buffer content to the beginning\n buf.copy(buf, 0, frameByteSize, length);\n length -= frameByteSize;\n return frameBuffer;\n }\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills HSV text boxes with values from _color. | function displayNumericHsv() {
$.each(_color.toHsv(), function(part, num) {
$("#s-c-p-txt-" + _id + "-hsv-" + (part === "v" ? "b" : part), _dom.el).val(Math.round(num));
});
} | [
"function update_color_choosen_indicator(){\n r = red_slider.value;\n g = green_slider.value;\n b = blue_slider.value;\n choosen_color_indicator.style.backgroundColor = toRGB(r,g,b); \n}",
"function color() {\n let hue = Math.round(Math.random()*360);\n let matches = this.style.backgroundColor.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convertToSecs takes minutes and seconds and combines them into purely seconds | function convertToSecs(minutes, seconds) {
return minutes * 60 + seconds * 1;
} | [
"function secConverter(min)\n{\n return min*60;\n}",
"function convertMinutesToSeconds(timeToConvert) {\n var minutes = timeToConvert.slice(0,2);\n var seconds = timeToConvert.slice(-2);\n return parseInt(minutes) * 60 + parseInt(seconds);\n}",
"function convert(minutes) {\r\n var seconds = minutes * 60;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to illustrate usage, we'll create a utility function to request and pipe to stdout | function request(opts) { http.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') } | [
"function pipeAndWrap (res, stream) {\n res.on('close', function () { stream.emit('close') })\n stream.httpVersion = res.httpVersion\n stream.headers = res.headers\n stream.trailers = res.trailers\n stream.setTimeout = res.setTimeout.bind(res)\n stream.method = res.method\n stream.url = res.url\n stream.sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tear down method for the client's websocket instance. This method undoes the work in setupWebsocket(url). | teardownWebsocket() {
if (this.websocket !== undefined) {
this.websocket.removeAllListeners('open');
this.websocket.removeAllListeners('close');
this.websocket.removeAllListeners('error');
this.websocket.removeAllListeners('message');
this.websocket = ... | [
"deregister() {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n }",
"function wsCloseConnection(){\n\twebSocket.close();\n}",
"function stop_ws() {\n if (CLIENT) {\n userDisconnectFlag = true;\n CLIENT.disconnect();\n }\n}",
"deregister(clientID, ws) {\n var... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the GeoPoint to a google.type.LatLng proto. | toProto() {
return {
geoPointValue: {
latitude: this.latitude,
longitude: this.longitude,
}
};
} | [
"latLng(){\r\n return L.latLng(this.latitude, this.longitude);\r\n }",
"function parseLatLng(self, latLng) {\n return _private(self).positionParser.parse(latLng);\n }",
"toUTM() {\n return new UTMPoint().fromLatLng(this);\n }",
"function latLngToPrecisionLocation(lat, lng, precis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to check if value is a non primitive. | function isNonPrimitive(value) {
return ((value !== null && typeof value === 'object') ||
typeof value === 'function' ||
typeof value === 'symbol');
} | [
"function convertible(value, ty) {\n if (ok(value, ty)) {\n return true;\n }\n if (isNull(value) || isUndefined(value)) {\n return false;\n }\n if (ty === tyNumber && isNaN(value)) {\n return false;\n }\n // TODO: refine\n return true;\n }",
"fun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Split snapshots into chunks of shards according to the provided size, count, and index | function shardSnapshots(snapshots, { shardSize, shardCount, shardIndex }) {
if (!shardSize && !shardCount) {
throw new Error("Found '--shard-index' but missing '--shard-size' or '--shard-count'");
} else if (shardSize && shardCount) {
throw new Error("Must specify either '--shard-size' OR '--shard-count' no... | [
"chunk(arr, size) {\n if(typeof size === 'undefined') {\n size = 1;\n }\n let arrayChunks = [];\n for(let i = 0; i < arr.length; i+=size) {\n let arrayChunk = arr.slice(i, i+size);\n arrayChunks.push(arrayChunk);\n }\n return arrayChunks;\n }",
"function chunk(array, size) {\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for updating context menu whenever engine is changed. | function update()
{
chrome.contextMenus.update(contextMenu, {title: "Search " + localStorage["search"] + " for '%s'", contexts:["selection"], onclick: searchText} );
console.log("updates now");
} | [
"function updateContextMenuCaches(event) {\n var cache = $(event.target).attr(\"for\");\n var add_context_menu = !$(\"#\" + cache).is(\":checked\");\n add_context_menu ? createContextMenu(cache) : removeContextMenu(cache);\n}",
"function setupContextMenu(){\n chrome.contextMenus.create({\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A class for controlling concurrent access to a limited resource. | function Semaphore( limit ) {
this.limit = limit;
this.calls = 0; // The number of active operation calls.
} | [
"function SingletonLock() {}",
"throttle(callback) {\n if (this._queuing < this._concurrency)\n callback();\n else\n this.once('ready', ()=> this.throttle(callback));\n }",
"async function setPublicResourceAccess(resource, access, options = internal_defaultFetchOptions) {\n return await setA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resolves unpaid bets by first interrogating scores API, and writing scores returned to the scores collection. Take note that scores API is not quick // about posting new scores; can sometimes take many hours or even overnite for the source data to update. Debugging and testing should be done by betting on games that ha... | async function resolve() {
console.log("inside resolve at " + Date());
const bets = await db.bets();
const bettors = await db.bettors();
await scores.seed();
let cur = bets.aggregate([
{ $match: { paid: null } },
{ $lookup: {
from: "scores",
localField: "gameid",
foreignFiel... | [
"async triggerMatch(){\n const teams = this.teams;\n\n let fetchTeamsPromises = [];\n teams.forEach((teamId) => {\n let team = new Team(teamId, this.tournamentId);\n fetchTeamsPromises.push(team.fetchTeamDetails());\n });\n\n // 1. Get individual Team info.\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the function below takes in the employee input and adds it to the employee array also clears input boxes | function addEmployeeToArray() {
let firstName = $('#firstNameInput').val();
$('#firstNameInput').val('');
let lastName = $('#lastNameInput').val();
$('#lastNameInput').val('');
let id = $('#idInput').val();
$('#idInput').val('');
let title = $('#titleInput').val();
$('#titleInput').val('... | [
"function submitClick() {\n let firstName = $('#firstNameInput').val();\n let lastName = $('#lastNameInput').val();\n let id = $('#idNumberInput').val();\n let jobTitle = $('#jobTitleInput').val();\n let salary = $('#annualSalaryInput').val();\n\n // if any inputs are blank, call the errorMessage function\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show or Hide Block | function handleBlockView(id,status='hide') {
if(status == 'hide') {
document.getElementById(id).style.display = 'none';
} else {
document.getElementById(id).style.display = 'block';
}
} | [
"function showHideBlocks(){\n\t\tm_AnswerBlocks = randomBlock();\n\t\t\n\t\t//Show blocks to the users\n\t\tfor(var k = 0; k<m_AnswerBlocks.length; k++ ){\n\t\t\tvar n = m_AnswerBlocks[k];\n\t\t\t$(\".cell\").eq(n).addClass(\"change\").addClass(\"answer\");\n\t\t}\n\t\t\n\t\t//Hide blocks\n\t\twindow.setTimeout(fun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Upload a document file to Kaltura, then the file can be used to create a document entry. | static upload(fileData){
let kparams = {};
let kfiles = {};
kfiles.fileData = fileData;
return new kaltura.RequestBuilder('document_documents', 'upload', kparams, kfiles);
} | [
"static addFromUploadedFile(documentEntry, uploadTokenId){\n\t\tlet kparams = {};\n\t\tkparams.documentEntry = documentEntry;\n\t\tkparams.uploadTokenId = uploadTokenId;\n\t\treturn new kaltura.RequestBuilder('document_documents', 'addFromUploadedFile', kparams);\n\t}",
"function uploadDocumentAttachment() {\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Main function for solving shortest unique prefix | function shortestUniquePrefix(words) {
// Create the root of the trie
const root = new Node(words[0]);
// Add in the additional words to the trie
for (let i = 1; i < words.length; i++) {
root.addNewWord(words[i]);
}
// Go over each word and get the unique prefix
const results = [];
for (let i = 0; i < words... | [
"function mask2prefix(s_ip){\r\n\tvar a_ip = s_ip.split('.');\r\n\tvar i_ip = ip_num(a_ip);\r\n\tvar b_ip_r = i_ip.toString(2).split('').reverse().join('');\r\n\tvar i_ip_r = parseInt(b_ip_r,2);\r\n\tvar prefix = 0;\r\n\t\r\n\twhile(i_ip_r & 0x1){\r\n\t\t\tprefix++;\r\n\t\t\ti_ip_r = i_ip_r>>>1;\r\n\t}\r\n\tif(i_ip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The AWS::ApiGateway::UsagePlanKey resource associates an Amazon API Gateway API key with an API Gateway usage plan. This association determines which users the usage plan is applied to. Documentation: | function UsagePlanKey(props) {
return __assign({ Type: 'AWS::ApiGateway::UsagePlanKey' }, props);
} | [
"function UsagePlan(props) {\n return __assign({ Type: 'AWS::ApiGateway::UsagePlan' }, props);\n }",
"function ApiKey(props) {\n return __assign({ Type: 'AWS::ApiGateway::ApiKey' }, props);\n }",
"function ApiKey(props) {\n return __assign({ Type: 'AWS::AppSync::Ap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BonusOneTotal is total number of points expected with random play | function calculateRandomPlayPoints () { //expected points earned by picking A or B randomly
randomPoints = [];
for (var i = 0; i <= game.maxturn-1; i++) {
randomPoints[i] = .5*pDry[i]*game.discrete.payoutAdry + .5*pWet[i]*game.discrete.payoutAwet +
.5*pDry[i]*game.discrete.payoutBdry + .5*pWet[i]*game.d... | [
"function addBonus1 () {\n\t\tgame.realDollars += game.bonusOneDollars; //add value of bonus to realDollars\n\t\t$(\"#dollars_counter\").html(\"$\"+game.realDollars);\n\t}",
"function givePoints1() {\n sumScore = sumScore + number1;\n console.log(\"Total score: \" + sumScore);\n $(\"#totalSco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Keeps track of the percentage of images that have been loaded | getLoadingCompletionPercentage(){
return this.getNumberOfImagesLoaded()/this.getTotalNumberOfImages();
} | [
"function imageLoaded() {\n imagesLoaded++\n if (imagesLoaded == totalImages) {\n allImagesLoaded()\n }\n }",
"function imageLoaded() {\n noOfImageLoaded++;\n if (noOfImageLoaded == 10) {\n onLoadFinish();\n }\n}",
"getNumberOfImagesLoaded(){\n\t\treturn this.loadedImages.length;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the given object is an instance of Output. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process. | static isInstance(obj) {
return utils.isInstance(obj, "__pulumiOutput");
} | [
"static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === MountTarget.__pulumiType;\n }",
"static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Using the .filter() function, create a new array from characters that ONLY contains characters of the race Hobbit. | function filterByHobbits(input) {
return input.race === 'Hobbit';
} | [
"function acceptedWords(arr) {\n\treturn arr.filter(x => !x.startsWith(\"C\"))\n}",
"function filterByHairColor(arr, hairColor) {\n}",
"function getHires(array,hired){\n return array.filter(stu => {return !hired.includes(stu.name)}\n )}",
"function onlyOneWord(arr){\n\n \treturn arr.filter(a=>!(a.includes(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for class decorator | function ClassDecoParm(NAME) {
return function (target) {
console.log(`Class Decorator`);
console.log(`My Name is :${NAME} Target ${target}`);
};
} | [
"enterClassModifier(ctx) {\n\t}",
"function cls(body) {\n return \"class Foo { \" + body + \" }\";\n}",
"enterClassParameter(ctx) {\n\t}",
"static lokify() {\n var args = Array.prototype.slice.call(arguments)\n if (args && args.length > 0) {\n args.forEach((klass) => {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
default encode making logic. And the default rule should depends on series? consider 'map'. | function makeDefaultEncode(seriesModel, datasetModel, data, sourceFormat, seriesLayoutBy, completeResult) {
var coordSysDefine = getCoordSysDefineBySeries(seriesModel);
var encode = {}; // var encodeTooltip = [];
// var encodeLabel = [];
var encodeItemName = [];
var encodeSeriesName = [];
var seriesT... | [
"encodeData(type, value) {\n return this.getEncoder(type)(value);\n }",
"static encode(domain, types, value) {\n return (0, index_js_4.concat)([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
error for when the content type is not something we can use | function ContentTypeError(message) {
this.name = "ContentTypeError";
this.message = message || "Content type is invalid or couldn't be determined";
} | [
"function checkContentType (name) {\n var val = contentTypes[name];\n\n Assertion.addProperty(name, function () {\n var contentType = getHeader(this._obj, 'content-type');\n\n this.assert(\n contentType && contentType.indexOf(val) >= 0,\n 'expected the response type to be #{exp} but go... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the normal vectors in the shader for the given mesh | function setNormals(mesh) {
gl.bindBuffer(gl.ARRAY_BUFFER, buffers.normal);
gl.vertexAttribPointer(shader.faceNormal, 3, gl.FLOAT, false, 0, 0);
gl.enableVertexAttribArray(shader.faceNormal);
gl.bufferData(gl.ARRAY_BUFFER,
MV.flatten(mesh.normals),
gl.STATIC_DRAW);
... | [
"uploadNormalMatrixToShader() {\r\n mat3.fromMat4(this.nMatrix,this.mvMatrix);\r\n mat3.transpose(this.nMatrix,this.nMatrix);\r\n mat3.invert(this.nMatrix,this.nMatrix);\r\n gl.uniformMatrix3fv(shaderProgram.nMatrixUniform, false, this.nMatrix);\r\n }",
"function uploadNormalMatrixToShader(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show information about the available templates | function templateDetails() {
console.log('');
console.log(chalk.green("Available template details:"), chalk.grey("(npx 11up list)"));
templates.forEach(template => {
console.log("");
console.log(`🎈 ${chalk.green(template.name)}`);
console.log(template.description);
console.log(template.url);
})... | [
"function getAllTemplates() {\n $.ajax({\n type: \"GET\",\n url: \"https://www.couponbooked.com/scripts/getAllTemplates\",\n datatype: \"json\",\n success: function(data) {\n data = JSON.parse(data);\n processTemplates(data);\n },\n error: function(XMLHttpRequest, textStatus, errorThrow... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This render() function renders the AR Scene in with the defined in figment.js Rest of the components in ... render 2D UI components (ReactNative) | render() {
return (
<View style={localStyles.flex}>
<StatusBar hidden={true} />
<ViroARSceneNavigator
style={localStyles.arView}
apiKey="YOUR-API-KEY-HERE"
initialScene={{
scene: () => {
return <InitialScene viroAppProps={this.state.viroA... | [
"render() {\n // Render as usual\n super.render();\n\n // render depth map as texture to quad for testing\n // this.renderDepthMapQuad();\n }",
"initialize() {\n //console.log(`@@@ narrative.initialize():`);\n // canvas DOM-singularity, and webgl2-context\n canv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the username is available. | async function isUsernameAvailable(username) {
const url = `https://passport.twitch.tv/usernames/${username}?users_service=true`;
const response = await axios.head(url);
return response.status === 204;
} | [
"function validUsername(username) {\n return (username.trim().length) >= 3;\n}",
"function checkUsernameChange(data){\n data.toLowerCase();\n var result = data.match(/\\/nick/i);\n if(result === null || result.length!=1)\n return false;\n else\n return true;\n}",
"function check_nam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
delays start of sequence so user sees it | function delayedSequenceStart() {
setTimeout(finalSequenceStart, 4000)
instructions()
} | [
"function transitionSequence() {\r\n let interval = setInterval(() => {\r\n while (tranGen.done !== true) {\r\n tranGen.next()\r\n return\r\n }\r\n clearInterval(interval)\r\n }, 500)\r\n }",
"function delayedStart () {\n setTimeout(() => {\n active = true;\n }, Ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates summary text of the target of the edit | genDataSummaryText()
{
let target = this.state.target;
let summary = genSummary(target)
return summary === "Entire Corpus" ? "No Data Selected" : summary
} | [
"updateSummary() {\n const summary = this.details.drupalGetSummary();\n this.detailsSummaryDescription.html(summary);\n this.summary.html(summary);\n }",
"function output(target, value){\n $(target).text(value);\n }",
"function getComplexActionSummary(currentRobotNumber, labels, robots, se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Coding in function ```pickIt```, function accept 1 parameter:```arr```, it's a number array, we need traverse ```arr``` by using ```for``` loop, if element is odd number, push it to array ```odd```, if it's a even number, push it to array ```even```. I've defined two array ```odd``` and ```even``` in the function, and ... | function pickIt(arr){
var odd=[],even=[];
for(let i = 0; i < arr.length; i++) {
if(arr[i] % 2 === 0) even.push(arr[i])
else odd.push(arr[i])
}
return [odd,even];
} | [
"function odds(arr) {\n oddArr = [];\n each(arr, function(element) {\n if (element % 2 !==0) {\n oddArr.push(element);\n };\n });\n return oddArr;\n}",
"function evenIndexedOddNumbers(arr) {\n var output = [];\n each(arr, function(e, i) {\n if ((e % 2 !== 0) && (i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Download a tool from an url and stream it into a file | function downloadTool(url) {
return __awaiter(this, void 0, void 0, function* () {
// Wrap in a promise so that we can resolve from within stream callbacks
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
try {
const http = new httpm.... | [
"function d(){\n var filename = \"file.mei\";\n downloadFile(filename, output);\n}",
"function downloadTorrentFile(url, cookie, callback) {\n post({\n method: 'web.download_torrent_from_url',\n params: [url, cookie]\n }, callback);\n }",
"function download(year) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function showMap function displayMap This function is called to display a Google maps map of the location. Input: latlnginstance of google.maps.LatLng for center of map zoomlevelthe zoom level for displaying the map | function displayMap(latlng, zoomlevel)
{
if (latlng !== null)
{ // location resolved
var button = document.getElementById('showMap');
var form = document.locForm;
var readonly = form.Zoom.readOnly;
var notes = form.Notes;
mapDiv = document.getElementById("... | [
"function displayMap(){\n var coordinates = infoForMap();\n createMap(coordinates);\n}",
"function ShowLocation( latlng, address)\n{\n // Center the map at the specified location\n map.setCenter( latlng );\n\n // Set the zoom level according to the address level of detail the user specified\n va... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
handleSolveClick() will solve the board for the user. | handleSolveClick() {
const history = this.state.history.slice(0, this.state.currStep + 1);
const currBoard = this.state.history[this.state.currStep].board.slice();
const currNotes = JSON.parse(JSON.stringify(this.state.history[this.state.currStep].notes.slice()));
const startingBoard = this.state.histor... | [
"solveSudoku(){\n\n const arr = game.collectInput();\n\n // if(!isSolvable(arr)){\n // alert('Not solvable');\n // return;\n // }\n\n if(solve(arr)){\n game.fillTiles(arr);\n }\n\n }",
"__handleClick(evt) {\n // get x from ID of clicked cel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws the outline of an entity's hitbox for debugging purposes. | function drawDebugHitbox(entity) {
let canvas = document.getElementById('gameWorld');
let ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.strokeStyle = entity.isRecoiling ? 'orange' : 'green';
ctx.lineWidth = 2;
ctx.rect(entity.hitbox.x, entity.hitbox.y, entity.hitbox.width, entity.hitbox.he... | [
"function drawHitBox() {\n for (let i = 0; i < aliens.length; i++) {\n aliens[i].individualHitBox();\n }\n}",
"function drawOutline(){\n fill(125);\n stroke(125);\n index = buttonArr.indexOf(buttonVal2);\n rect(windowWidth/2 - 394 + 1920/42 * (index+1), windowHeight - 104, 39, 39, 4, 4) \n}",
"_paintO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the selected messages | function deleteMessage() {
var selectedCheckBox = $('input:checkbox:checked').map(function() {
return this.getAttribute('messageid');
}).get();
for (var i = 0; i < selectedCheckBox.length; i++) {
$("#messageBox").find(".messageTr" + selectedCheckBox[i]).remove();
}
// Fetch Members Locations
$.ajax({
url :... | [
"function prevMsgDelete() {\n message.delete([300])\n .then(msg => console.log(`Deleted message from ${msg.author.username}`))\n .catch(console.error);\n }",
"deleteVoicemailMessages() { \n\n\t\treturn this.apiClient.callApi(\n\t\t\t'/api/v2/voicemail/messages... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this.printTime(stringify(hours),stringify(minutes),stringify(seconds)); let that = this; 1. Create a Date object. 2. Store the hours, minutes, and seconds. 3. Call printTime. 4. Schedule the tick at 1 second intervals. | printTime() {
// Format the time in HH:MM:SS
// Use console.log to print it.
console.log(this.hours + ':' + this.minutes + ':' + this.seconds);
} | [
"function func8() {\r\n setTimeout(function tick() {\r\n let hours = new Date().getHours();\r\n let minutes = new Date().getMinutes();\r\n let seconds = new Date().getSeconds();\r\n console.log(`${hours}:${minutes}:${seconds}`);\r\n setTimeout(tick, 1000);\r\n }, 1000);\r\n}",
"function displayTi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear the selected image annotation in the image iframe READ MODE | function clearSelectedImage() {
var image_iframe = document.getElementById('image-input');
image_iframe.contentWindow.clearSelectedImage();
} | [
"function removePreviousImage() {\n $capturedImage.empty();\n $capturedImage.removeAttr('style');\n $fridge.removeClass('hide');\n}",
"deselectAnnotation() {\n if (this.activeAnnotation) {\n this.activeAnnotation.setControlPointsVisibility(false);\n this.activeAnnotation = fa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
audio play progress handle | onAudioProgress(audioInfo) {
// console.log('audio progress',audioInfo);
} | [
"onAudioProgress(audioInfo) {\n // console.log('audio progress', audioInfo)\n }",
"onplay(song) { }",
"async processQueue() {\n if (this.queueLock || this.audioPlayer.state.status !== AudioPlayerStatus.Idle || this.queue.length === 0) return;\n this.queueLock = true;\n const nextTrack = this.queue.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves the initial board | saveInitialBoard() {
this.initialBoard = this.gameboard.toString()
} | [
"function saveBoard() {\n window.localStorage.setItem(\"board\", board.toJSON());\n}",
"Save()\n {\n\n // Check if the board is not alrady in the array of boards\n if(AppState.GetBoards().find(x => x.id == this.id) == undefined)\n {\n AppState.GetBoards().push(this)\n AppState.Save()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds 1 to the variable 'images', thereby deciding which value of n will be displayed in full:image(n) | function change_image(n) {
full_image(images += n);
} | [
"function current_image(n) {\n full_image(images = n);\n}",
"function full_image (n) {\n var full_size = document.getElementsByClassName('fullSizeImage')\n if(images <= 0) {\n images = 1\n return\n }\n if(images > image_gallery.length) {\n images = image_gallery.length\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the correct delimeter for this sheet/key combo. | function getDelim(meta_data_collection, spreadsheet_collection_key, sheet_name) {
for (var i = 0; i < meta_data_collection.length; ++i) {
if (meta_data_collection[i].spreadsheet_collection_key == spreadsheet_collection_key &&
meta_data_collection[i].sheet_name == sheet_name) {
re... | [
"function getDelimiter (){\n\t\treturn prompt.delimiter;\n\t}",
"get seperator() { return this._seperator }",
"function getDelimiter(theForm){\n var retVal;\n var selInd = theForm.Delimiter.selectedIndex;\n\n switch (selInd){\n case 0:\n\t retVal = \"\\t\";\n\t\t break;\n\t case 1:\n\t retV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the location of the shader variables. | function _getLocationOfShaderVariables() {
a_Color_location = gl.getAttribLocation(program, 'vertexColor');
a_Vertex_location = gl.getAttribLocation(program, 'vertexPosition');
} | [
"function variables() {\n\t\treturn State.variables;\n\t}",
"static getStandardAttribLocation(gl, program){\n return {\n position: gl.getAttribLocation(program, ATTR_POSITION_NAME),\n norm: gl.getAttribLocation(program, ATTR_NORMAL_NAME),\n uv: gl.getAttribL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the given value is an Immer draft /__PURE__ | function isDraft(value) {
return !!value && !!value[DRAFT_STATE];
} | [
"isEditor(value) {\n if (!isPlainObject(value)) return false;\n var cachedIsEditor = IS_EDITOR_CACHE.get(value);\n\n if (cachedIsEditor !== undefined) {\n return cachedIsEditor;\n }\n\n var isEditor = typeof value.addMark === 'function' && typeof value.apply === 'function' && typeof ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
showing accepted user input hint | function showAcceptedUserInputHint(input, label) {
label.classList.add("active");
label.textContent = acceptedInputHints[input.id];
} | [
"function hint(bool){\n\t/** SWITCH THIS STATEMENT TO TRUE IF WANT TO SHOW MORE ACCURATE HINT */\n\tvar showAnswer = false;\n\tvar hints = document.getElementById('hints');\n\t/** ADD IN THIS PART IF NEED THE HINT BAR TO SAY CORRECT. BUT REDUNDANT IN MESSAGE BOX ALREADY.\n\tif(bool == (colorCheck() && numberCheck()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If there is no cycle, return null. To represent a cycle in the given linked list, we use an integer pos which represents the position (0indexed) in the linked list where tail connects to. If pos is 1, then there is no cycle in the linked list. Note: Do not modify the linked list. | function detectCycle(head) {
let p1 = head;
let p2 = head;
while (p2) {
if (!p2.next) {
return null;
}
p1 = p1.next;
p2 = p2.next.next;
if (p1 === p2) {
p1 = head;
while (true) {
if (p1 === p2) {
return p1;
}
p1 = p1.next;
p2 = p2.next;
}
}
}
return null;
} | [
"shift() {\n if (!this.head) return undefined;\n let removed = this.head;\n if (this.length === 1) {\n this.head = null;\n this.tail = null;\n } else {\n this.head = removed.next;\n this.head.prev = null;\n removed.next = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an EntriesCollector for the given grouping. | function asEntriesFactory(groups) {
return ((options) => {
var _a, _b;
const keyName = (_a = options === null || options === void 0 ? void 0 : options.keyName) !== null && _a !== void 0 ? _a : 'key';
const itemsName = (_b = options === null || options === void 0 ? void 0 : options.itemsName)... | [
"function group(items) {\n const by = (key) => {\n // create grouping with resolved keying function\n const keyFn = typeof key === 'function' ? key : (item) => item[key];\n const groups = createGrouping(items, keyFn);\n // return collectors\n return Object.freeze({\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
unhighlight the graph line for a particular station... | function unHighlightStationGraph(station) {
d3.select('g.lines').selectAll('polyline').each(function (d) {
var sel = d3.select(this);
if (station == sel.attr('station')) {
sel.transition()
.duration(500)
.attr('stroke-width',1)
.attr('stroke','slategray');
}
});
} | [
"function unHighlightStationMap(station) {\n\tconsole.log(station);\n\tm = locData.get(station).marker;\n\tm.setMap(null);\n\tm.icon = defaultMapIcon;\n\tm.setMap(map);\n}",
"clearHighlight () {\n this._vizceral.setHighlightedNode(undefined);\n }",
"function highlightStationMap(station) {\n\tconsole.log(st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add a worker to the worker pool | addWorker(){
if(this.workerPool.length<FATUS_MAX_WORKER){
let worker = new FatusWorker(this);
this.initWorker(worker);
this.workerPool.push(worker);
console.log(MODULE_NAME + ': new worker created %s',worker.name);
worker.run();
}else{
... | [
"addPriorityWorker(){\r\n if(this.priorityWorkerPool.length<10) {\r\n console.log(MODULE_NAME + ': adding priority worker');\r\n let worker = new FatusPriorityWorker(this);\r\n this.initWorker(worker);\r\n worker.setStackProtection(3);\r\n this.priorityW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the "first seen" time for a user. the time will only be set once for a given mpid after which subsequent calls will be ignored | function setFirstSeenTime(mpid, time) {
if (!mpid) {
return;
}
if (!time) {
time = new Date().getTime();
}
var cookies = getPersistence();
if (cookies) {
if (!cookies[mpid]) {
cookies[mpid] = {};
}
if (!cookies[mpid].fst) {
cookies[... | [
"function setUserID(){\n if(isNew){\n spCookie = getSpCookie(trackerCookieName);\n getLead(isNew, spCookie, appID);\n }\n }",
"function changeDefaultTimeOut() {\n let user = db.ref('users/' + userId);\n\n const newDefaultTime = app.getArgument('newDefaultTime');\n\n if (newDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End Function printHelp ////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// Function Title: printSettings Description: This function prints the internal settings object using its toString method. Parameters: None Preconditions: The settings object... | function printSettings() {
var soutput = '', i;
soutput += 'bhelp: ' + osettings.bhelp + '\n' +
'bpre: ' + osettings.bpre + '\n' +
'srepo: ' + osettings.srepo + '\n' +
'sdest: ' + osettings.sdest + '\n' +
'aign:\n';
for (i = 0; i < osettings.aign.l... | [
"function displaySettings() {\r\n\t\t// Hide other menus\r\n\t\taddClass($('#main_menu #shortcuts'), 'hide');\r\n\t\taddClass($('#main_menu #story'), 'hide');\r\n\t\taddClass($('#main_menu #spellbook'), 'hide');\r\n\t\taddClass($('#main_menu #stats'), 'hide');\r\n\r\n\t\t// Show settings screen\r\n\t\tremoveClass($... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cleans up sync and async directive validators on provided form control. This function reverts the setup performed by the `setUpValidators` function, i.e. removes directivespecific validators from a given control instance. | function cleanUpValidators(control, dir, handleOnValidatorChange) {
if (control !== null) {
if (dir.validator !== null) {
const validators = getControlValidators(control);
if (Array.isArray(validators) && validators.length > 0) {
// Filter out directive validator func... | [
"clearValidations() {\n this.validateField(null);\n setProperties(this, {\n '_edited': false,\n 'validationErrorMessages': [],\n validationStateVisible: false\n });\n }",
"function clearInvalidValidatorsInSummary(obj) {\n var self = this;\n if (typeof obj === \"undefined\" || ty... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
v1 v2/price >= 0, makerNote > (newNoteToTaker, Change), takerNoteToMaker > newNoteToMaker price == 1 all note type == 0 taker tried to buy some of makerNote's amount | function test1() {
// makerNote's variables
// hash(makerNote) : 'ef17beaef3f11a36a7e22d4d6e03cee6bd059ec8fa9553d16223a1859f22b48b'
// makerNote --> (newNoteToTakerNote, ChangeNote)
makerNoteOwner = '1aba488300a9d7297a315d127837be4219107c62c61966ecdf7a75431d75cc61';
makerNoteValue = '7';
makerNoteType = '0'... | [
"function test2() {\n // makerNote's variables\n // hash(makerNote) : 'ef17beaef3f11a36a7e22d4d6e03cee6bd059ec8fa9553d16223a1859f22b48b'\n // makerNote --> (newNoteToTakerNote, ChangeNote)\n makerNoteOwner = '1aba488300a9d7297a315d127837be4219107c62c61966ecdf7a75431d75cc61';\n makerNoteValue = '7';\n makerNot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a license, e.g.: ```TypeScript am4core.addLicense("xxxxxxxx"); ``` ```JavaScript am4core.addLicense("xxxxxxxx"); ``` Multiple licenses can be added to cover for multiple products. | function addLicense(license) {
_Options__WEBPACK_IMPORTED_MODULE_12__["options"].licenses.push(license);
} | [
"function _updateLicense() {\n\t\tvar s = _shareSettings.sharing;\n\t\tvar a = _shareSettings.adaptations;\n\t\tvar c = _shareSettings.commercial;\n\n\t\tif (s == 'cc0' || s == 'reserved') {\n\t\t\t_license = s;\n\t\t} else\n\t\t{\n\t\t\t_license = 'cc-by';\n\t\t\tif (c == 'no') {\n\t\t\t\t_license += '-nc';\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove all currencies from the table | function clearTable(){
cTable = document.getElementById("conversionTable");
itemList = cTable.childNodes;
if(cTable.childElementCount<=2){return;}
//Store the header and "add currency" rows
header = itemList[0];
footer = itemList[cTable.childElementCount-1];
//Clear the table and used currencies
c... | [
"function removeCurrency(id){\r\n\trow = document.getElementById(id);\r\n\t//Remove the index out of the used currencies\r\n\tusedCurrencies = removeFromArray(parseInt(row.value),usedCurrencies);\r\n\t//Remove the row of the currency\r\n\trow.parentNode.removeChild(row);\r\n\t//Add the currency back to the dropdown... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display the information of all the declined donations in the Donation datastore | function listDeclinedInbox(){
getDonations("/inbox-declined").then((donations) => {
dataElement.innerHTML = "";
donations.forEach((donation) => {
const div = document.createElement("div");
div.className = "card";
const header = document.createElement("h3");
... | [
"function listUnreadInbox() {\n getDonations(\"/inbox-unread\").then((donations) => {\n dataElement.innerHTML = \"\";\n donations.forEach((donation) => {\n const div = document.createElement(\"div\");\n div.className = \"card\";\n\n const header = document.createEle... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the case where lf.index.slice() is called with an explicit DESC order. | function testSlice_Desc() {
checkSlice(lf.Order.DESC);
} | [
"function testSlice_Asc() {\n checkSlice(lf.Order.ASC);\n}",
"function testSlice() {\n checkSlice();\n}",
"sortBookmark() {\n let bookmarks = this.props.bookmarks.slice();\n if (this.state.sortby === 'addTime') {\n bookmarks.sort((a,b) => {\n return compareTime(a.addTime, b.addTime) ? 1 : -1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |