query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Check whether all tiles have loaded. | function ready() {
for (var i = 0; i < preloadTiles.length; i++) {
var state = layerAbove.textureStore().query(preloadTiles[i]);
if (!state.hasTexture) {
return false;
}
}
return true;
} | [
"function allLoaded() {\n for (var i = 0; i != images.length; ++i) {\n if (!images[i].loaded) return false;\n }\n return true;\n }",
"allLoaded() {\r\n if (this._resources.size > 0) {\r\n const resources = Array.from(this._resources.values());\r\n for (let resource of r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal: Computes the determinant of a matrix. matrix The matrix to get the determinant of. Returns the determinant. | function determinant(matrix) {
// Check if the matrix is a 2x2
if (matrix.rows === 2 && matrix.cols === 2) {
return (matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]);
}
// Otherwise, reduce the size by 1 and recurse
else {
var det = 0;
for (var i = 0; i < matrix.cols; i++) {
de... | [
"function determinant(matrix) {\n return S.Matrix(matrix).determinant();\n }",
"function computeDeterminant (matrix) {\n const data = toData(matrix)\n\n return determinant(data, Scalar, numRows)\n }",
"function determinant(m) {\n // return the determinant of the matrix passed in\n}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fill function for Scenario | function FillScenario()
{
weapon = localStorage.getItem(WEAPON);
$("Scenario1").innerHTML = weapon;
$("Scenario7").innerHTML = weapon;
$("Scenario11").innerHTML = weapon;
$("Scenario14").innerHTML = weapon;
monster = localStorage.getItem(MONSTER);
... | [
"function setScenario() {\n // reset data object to contain all scenarios\n data = allScenarios;\n // select data row based on value\n console.log(thisCity + \" \" + thisHousehold);\n for (i=0;i<data.length;i++) {\n if (data[i].city == thisCity) {\n if (data[i].household == thisHousehold) {\n da... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs whenever a page is modified. If the modified page is the one the players are playing on, the page's new settings are checked. If the pages new settings change whether the page is appropriate, `pageLoad()` is run. | function pageChange(p) {
if (p.id === Campaign().get('playerpageid')) {
const override = checkPage();
if (override !== STATE.get('PageLoad'))
pageLoad(override);
else {
setTimeout(() => {
calcAndSetAllBonuses();
... | [
"function onPageLoad()\n\t{\n\t\t//Set page size\n\t\tSetSize();\n\t\t//Persist page settings\n\t\tloadPreferences();\n\t}",
"function _updatePage() {\n $('main').removeClass('loaded loading');\n $('main').html(page_cache[encodeURIComponent(State.url)]);\n\n _showPage();\n _updateTitle();\n }",
"fu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Using the custom "Northwind" naming convention Populate the MetadataStore with Northwind service metadata | function makeNorthwindConventionMetadataStore() {
var metadataStore =
new MetadataStore({ namingConvention: new NorthwindNamingConvention() });
northwindMetadataStoreSetup(metadataStore);
return metadataStore;
} | [
"function northwindMetadataStoreSetup(metadataStore) {\n if (!metadataStore.isEmpty()) return; // got it already\n metadataStore.importMetadata(northwindMetadata);\n metadataStore.addDataService(\n new breeze.DataService({ serviceName: northwindService })\n );\n }",
"function importNorthwindMeta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Soal No. 2 Fungsi Kalikan / Buatlah sebuah fungsi bernama kalikan(), yang mengembalikan nilai berupa hasil kali dari dua parameter yang dikirim. CONTOH OUTPUT: kalikan(5, 4) akan memberikan output 20 Tampilkan jawaban dengan cara document.getElementById("jawaban2").innerHTML seperti di CONTOH | function kalikan(num1, num2) {
// Code kamu mulai dari sini
var kali = num1 * num2;
// Tampilkan jawaban dengan cara document.getElementById("jawaban2").innerHTML seperti di CONTOH
document.getElementById("jawaban2").innerHTML = kali;
} | [
"function kalikan(dua belas, empat) {\r\n document.getElementById(\"kalikan\").innerHTML = dua belas * empat\r\n }",
"function buatKalimat(nama, umur, alamat, hobi) {\n // Code kamu mulai dari sini\n var kalimat = \"Nama saya \" + nama + \", Umur \" + umur + \" Bertempat ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
change value of AS form 11 to 1 if result > 21 | function changeAsValue(result, table) {
if (result > 21) {
for ( let i = 0; i < table.length; i++) {
if (table[i].value == 11) {
table[i].value = 1;
countResultCroupier();
countResultPlayer();
}
}
}
} | [
"function rule11(num , readOut){\r\n if ( num%11 === 0 )\r\n readOut = \"Bong\";\r\n return readOut\r\n}",
"function showResult(result){\n if (String(result).length >= 11){\n result = parseFloat(result).toPrecision(8);\n }\n display.textContent = result;\n}",
"function correct(id){\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
display : constructs visuals using triangle and lines | display() {
fill(this.color);
triangle(this.x, this.y, this.x + 30, this.y - 55, this.x + 60, this.y);
strokeWeight(7); //important for line to be visible
strokeCap(SQUARE);
stroke(this.color);
//levitating line
line(this.x, this.lineY - 30, this.x + 60, this.li... | [
"display(){\n fill(this.fishColour);\n triangle(this.x, this.y, this.x - this.w, this.y - this.h, this.x - this.w, this.y + this.h);\n fill(255);\n ellipse(this.x - (20 * this.dir), this.y, 10, 10); \n fill(0);\n ellipse(this.x - (15 * this.dir), this.y, 5, 5);\n }",
"display(){\r\n lin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether touch point is inside the rectangle or not. | isInsideRect(x, y, width, height, touchPoint) {
if ((touchPoint.x > x && touchPoint.x <= x + width) && (touchPoint.y > y && touchPoint.y <= y + height)) {
return true;
}
return false;
} | [
"function mouseIsTouchingRect(x, y, w, h) {\n let left = x - w/2;\n let right = x + w/2;\n let top = y - h/2;\n let bot = y + h/2;\n\n // Check if the mouse is inside!\n if(mouseX > left && \n mouseX < right && \n mouseY > top &&\n mouseY < bot) {\n return true;\n } else {\n return false;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation:3 ends here To affect a change, the user will =send= an =event=. When a transition occurs, we also execute any actions described as side effects. See [[ Custom Interpreters]] for more info. [[file:../literate/XStateTestInterpreter.org::Implementation][Implementation:4]] | send (event) {
this.state = this.machine.transition(this.state, event);
this.S = this.state;
this.C = this.state.context;
// Get the side-effect actions to execute
this.state.actions.forEach(action => {
// If the action is executable, execute it
action.ex... | [
"trigger(event) {\r\n this.state = this.states[this.state].transitions[event];\r\n this.tmpTwo = this.state;\r\n if(this.states[this.state].transitions[!event]) {\r\n throw new Error(\"Error\");\r\n }\r\n }",
"function transition(action, newContext) {\n var stateDef = ch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds an attack/dmg ability to the character | function addAbility(str, charID, isRanged) {
if (str == null) return;
//strip links
var linkArray = getLinks(str);
str = removeLinks(str);
var abilityLink = getLinkStringFromArray(linkArray);
//extract damage
var dmgStr = getSubStr(str, "(",")");
str = str.replace("("+dmgStr+")... | [
"attack() {\n this.enemy.takeDamage(this.weapon.damage);\n }",
"function applyAttackModifiers(attack, description, attacker, target, move, environment) {\n var modifiers = [];\n if (target.ability === 'thick fat' && \n (move.type === TYPE_NAME_TO_ID.Fire || move.type === TYPE_NAME_TO_ID.Ice)) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the application must autoplay media | function mustAutoplayMediaInLessonViewer() {
return (!$.browser.ipad && !$.browser.iphone);
} | [
"check_autoplay() {\n if (this.getAttribute('autoplay') !== null) {\n const _this = this;\n this.pause_autoplay(_this);\n }\n }",
"function checkMutedAutoplaySupport() {\n videoContent.volume = 0;\n videoContent.muted = true;\n const playPromise = videoContent.play();\n if (playPromise !== un... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adding CSS to DOM adding individually let paragraph=document.getElementById("acess") console.log(paragraph.style.backgroundColor="maroon"); Adding using css text let paragraph1=document.getElementById("acess") console.log(paragraph1.style.cssText="backgroundcolor:maroon;color:white") let paragraph2=document.getElementB... | function addStyle(){
let paragraph=document.getElementById("acess");
paragraph.classList.add("textColor");
} | [
"function changeColor(){\n document.querySelector(\".first-paragraph\").classList.add(\"paragraph-color\");\n}",
"function changeClass(){\n\tconst tempP = document.querySelector('.first-paragraph')\n tempP.classList.add('paragraph-color')\n}",
"function addStyles() {\n document.body.previousElementSibl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send new citation to the remote server | function saveCitation(citation) {
let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
window.location = '/';
} else {
window.alert(`Erreur : ${xhr.statusText}.`);
}
... | [
"function sendCitation(citation) {\n\n let xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n if (xhr.status === 201) {\n window.location = '/';\n } else {\n window.alert(`Erreur : ${xhr.statusText}.`);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ellapse Time between to datetimes. If end is null it uses now() JS_VARIABLES :: PUBLIC/INCLUDES/quad_js_init.php | function ellapseTime (start, end) {
var endTime;
if (!start) {
alert('ellapseTime on QUAD_LIB: Please tell me where to get the begin date(time).');
} else {
start = Date.parse(start);
}
// ALL DATES -> NUMERIC format since desde 1 de janeiro de 1970 00:00:00 UTC
if (!end || end... | [
"function ellapseTimeAbreviated (start, end) {\n var endTime;\n if (!start) {\n alert('ellapseTime on QUAD_LIB: Please tell me where to get the begin date(time).');\n } else {\n start = Date.parse(start);\n\n }\n // ALL DATES -> NUMERIC format since desde 1 de janeiro de 1970 00:00:00 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays the CLI header including CLI version and local Nodewood library version (if applicable). | function displayHeader() {
log(chalk.yellow(figlet.textSync('Nodewood', { horizontalLayout: 'full' })));
const packageObj = readJsonSync(resolve(__dirname, '../package.json'));
log(`CLI Version ${packageObj.version}`);
if (existsSync(resolve(process.cwd(), 'wood/package.json'))) {
const nodewoodObj = read... | [
"printHeader ()\n {\n console.log(``);\n console.log(`${chalk.black(chalk.bgYellow(\" ~~~~~~~~~ \"))}`);\n console.log(`${chalk.black(chalk.bgYellow(\" 🍫️ kaba \"))}`);\n console.log(`${chalk.black(chalk.bgYellow(\" ~~~~~~~~~ \"))}`);\n console.log(``);\n\n let... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changes color scheme when mouse is clicked | function mouseClicked() {
colorindex = ((colorindex+1)%colors.length)
bgColor = colors[2][1]
circleColor = colors[2][0];
} | [
"function paletteColorOnClick() {\n\n // Un-highlight current palette color\n if (selectedColorElement) {\n $(selectedColorElement).removeClass('palette-color-selected');\n } \n\n if (selectedColorElement == this) {\n // Click was on already-selected color\n canvasRenderer.enable... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array of parameter permutations to a function. | function getParamPermutations(params) {
// Figure out which parameters are optional.
var optionalParams = []
var nonOptionalAfterOptional = false;
var i;
for (i = 0; i < params.length; i++) {
if (params[i].optional) {
optionalParams.push(i);
} else if (optionalParams.length > 0) ... | [
"function permutations(array) {\n\n}",
"function permutations() {\n var r = [], arg = arguments, max = arg.length-1;\n function helper(arr, i) {\n for (var j=0, l=arg[i].length; j<l; j++) {\n var a = arr.slice(0);\n a.push(arg[i][j]);\n if (i==max)\n r.push({\n brew: a[0],\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send notification whem mbs about to expired, before 2 days | static async notifyExpiredMembership(tokens, mbsUsage, mbsId) {
const noti = {
title: `Membership expiration.`,
body: JSON.stringify({
mbsUsage,
mbsId,
content: `Your Membership is going to expire in 2 days.`,
}),
};
... | [
"get expired() {\n return this.invokedAt + 1000 * 60 * 15 < Date.now();\n }",
"static async notifyExpireMbs(fbToken, expireTime, mbsUsageId, mbsId) {\n // const timestamp = new Date();\n // const sendTime = new Date(\n // \tnew Date().setTime(timestamp.getTime() + 1000 * 10)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the OSS Client Mode: SecurityToken (STS) | initWithSecurityToken(securityToken, accessKey, secretKey, endPoint, configuration = conf) {
RNAliyunOSS.initWithSecurityToken(securityToken, accessKey, secretKey, endPoint, configuration);
} | [
"init () {\n\t\t\tlet token = window.sessionStorage.getItem(\"token_client\");\n \tif(token !== null) store.dispatch('sesion/getSesion', token, { root: true });\n\t\t}",
"function init() {\n return getAccessToken()\n .then(data => data.access_token)\n .then(token => {\n const audience =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crea un array con los valores "true" o "false" dependiendo si el checkbox esta seleccionado | function getRespuestasCheckBox(object){
var respuestas = new Array(4);
for (var i=0; i < object.length ; i++ ){
if(object[i].checked){
respuestas[i] = true;
} else {
respuestas[i] = false;
}
}
return respuestas;
} | [
"function createBoolArray(){\n let boolArray = [];\n for(var x = 0; x < answerArray.length; x++){\n boolArray.push(false)\n }\n return boolArray\n}",
"function selectCheckbox() {\n var checkedCheckbox = [];\n\n var j = 0;\n for (var i = 0; i < checkboxes.length; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the closest bot to the castle at loc | function getClosestBotToCastle(bots, loc) {
var minDist = maxInt;
var minI = -1;
for (var i = 0; i < bots.length; i++) {
if (bots[i].wrenches >= wrenchesForHold) {
dist = getDistance(bots[i].x, bots[i].y, loc.x, loc.y);
if (dist < minDist) {
minDist = dis... | [
"getClosest() {\n let closest = null;\n let distance = 0;\n for (const target of this.targets) {\n const dist = target.position.distanceTo(this.bot.entity.position);\n if (closest == null || dist < distance) {\n closest = target;\n distance = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to restart after loss of life resets ball position and sets a new interval after ball his bottom of grid, it is invoked by keyup of spacebar | function restart(e) {
if (e.key === " ") {
console.log("you pressed the spacebar");
ballCurrentPosition = ballStartPosition;
timer = setInterval(moveBall, 25);
}
} | [
"restart() {\n ballx = Math.floor(yTab / 2);\n bally = Math.floor(xTab / 2);\n }",
"ballRestart() {\n this.speed = { x: 8, y: 8};\n\n // Define ball start location.\n this.position = { x: playableWidth / 8, y: playableHeight / 2.5 };\n }",
"function goFaster()\n{\n\tif(SPA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SETS THE TEXT VALUE FOR EACH ITEM RESULTED WITH INFODISPLAY CLASS WHICH IS ALL THE DATA FROM THE ZOMATO API RESETS EVERYTHING | function resetData(){
$(".info-display").each(function(){
$(this).text("");
})
} | [
"function updateDisplayValue(val){\r\n display.innerText = val;\r\n }",
"function showInfoText (sClassID, nArtefactType, sAttributeName)\n// ---------------------------------------------------------------------\n{\n checkParam (sClassID, \"string\");\n checkParam (nArtefactType, \"number\");\n checkP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays all tasks on page (called on load) | function displayTasks() {
// Loop through all tasks in the local array
for (let task of tasks) {
// Call helper function to add to UI
addTaskToDisplay(task);
}
} | [
"function displayTasks() {\n document.querySelector(\"#tasks\").innerHTML = \"\";\n sortTasks();\n for (let task of tasks) {\n new Task(task.content, task.date, task.time, task.pin, task.id).displayTask();\n };\n executeRotation();\n recolorPastTasks();\n}",
"displayTasks() {\n switch ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility function to show a loss message and reduce player money | function showLossMessage() {
credits -= bet;
$("div#winOrLose").text("You Lost!");
resetFruitTally();
} | [
"function showLossMessage() {\n playerMoney -= playerBet;\n resetTally();\n }",
"function showLossMessage() {\n playerMoney -= playerBet;\n resetditemTally();\n }",
"function showLossMessage() {\n playerMoney -= playerBet;\n //$(\"div#winOrLose>p\").text(\"You Los... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
default config for a clipboard button group: cut, copy, and paste | get clipboardButtonGroup() {
return {
type: "button-group",
subtype: "clipboard-button-group",
buttons: [this.cutButton, this.copyButton, this.pasteButton],
};
} | [
"function ContextMenuCopyPaste() {\n this.zeroClipboardInstance = null;\n this.instance = null;\n }",
"get copyButton() {\n return {\n command: \"copy\",\n icon: \"content-copy\",\n label: \"Copy\",\n shortcutKeys: \"ctrl+c\",\n type: \"rich-text-editor-button\",\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transforms pixel coordinate from image space to camera space | function pixelToCameraCoords(camera, i, j, width, height)
{
var bounds = camera.cameraBounds;
var u = bounds.l + (bounds.r - bounds.l) * (i + 0.5) / width;
var v = bounds.b + (bounds.t - bounds.b) * (j + 0.5) / height;
var w = -camera.near;
return [u,v,w];
} | [
"get worldToCameraMatrix() {}",
"function pixelCoordsToWorldCoords(x, y) {\n x -= panX;\n y -= panY;\n x /= SCALE;\n y /= SCALE;\n return createVector(x, y);\n}",
"cameraorigin(graphics_state) {\n var object = Vec.of(0, 0, 0);\n var position = Vec.of(0, 0, 35);\n\n graphics_s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
when resetButton is clicked, remove class divChanged then get a new gridSize from the user then start the main loop by making divs makeDivs() | function buttonClicked() {
let getGridSize = prompt("Please enter a new grid size (1-100)");
if (getGridSize >= 1 && getGridSize <=100){
Array.from(gridItem_div).forEach(function (e){
e.classList.remove("divChanged");
});
gridSize = getGridSize; //modify global variable
... | [
"function resetGrid() {\n let gridBlocks = document.getElementsByClassName('block');\n while(gridBlocks[0]) {\n gridBlocks[0].parentNode.removeChild(gridBlocks[0]);\n };\n //ask for new grid size\n gridSize = prompt (\"How many squares would you like per side?\", \"16\");\n\n //call functions to rebu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dial to the peer and try to use the most recent Paratii | _dialPeer (peer, callback) {
// Attempt Paratii 0.0.1
this.libp2p.dialProtocol(peer, PARATII001, (err, conn) => {
if (err) {
// Attempt Paratii 0.0.1
this.libp2p.dialProtocol(peer, PARATII001, (err, conn) => {
if (err) { return callback(err) }
callback(null, conn, PARA... | [
"async _dialPeer (peer) {\n try {\n // Attempt Bitswap 1.1.0\n return {\n conn: await this.libp2p.dialProtocol(peer, BITSWAP110),\n protocol: BITSWAP110\n }\n } catch (err) {\n // Attempt Bitswap 1.0.0\n return {\n conn: await this.libp2p.dialProtocol(peer, BITSWA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if this error is fixable, and fixes it | function fixError(r, code) {
// call fix function
if (errors.hasOwnProperty(r.raw)) {
errors[r.raw].fix(r, code);
}
} | [
"_fixProblems() {\n\t\tif (this._memory.mode === MayorManager.MODE_AUTO) {\n\t\t\t this.errors.forEach(error => {\n\t\t\t\t try {\n\t\t\t\t\t error.act();\n\t\t\t\t } catch (e) {\n\t\t\t\t\t info.error('Could not fix error \"' + error.text + '\": ' + e);\n\t\t\t\t }\n\t\t\t });\n\t\t\t this.warnings.forEach(warning... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets startDate and endDate to application state | updateDateRange(startTime) {
this.changeStateValue('timestamp', startTime.format('X'));
} | [
"updateProgramStartEndDate(state, payload) {\n if (payload.dateOfBirth) {\n const dateOfBirth = Date.create(payload.dateOfBirth);\n state.programList.forEach((program, index) => {\n if (index > 0) {\n program.startDate = new Date(dateOfBirth)\n .addMonths(program.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Purge the entire backing store cache. | function invalidateAllBackingStores () {
_backingStores = [];
} | [
"clearStoreCache() {\n this.get('store').unloadAll();\n }",
"function purge() {\n loadedDataSets = {};\n promises = {};\n cacheSizeInBytes = 0;\n}",
"cleanupCache() {\n // Remove what we have in cache\n this._cache.reset();\n }",
"async doPurge() {\n _.forOwn(this.cache, (cache, cac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enable or disable all filters in block | function enableFilters(block, enable = true) {
Object.keys(block.filters).forEach((filter) => {
block.filters[filter].disabled = !enable;
});
} | [
"function disable_other_filters()\n{\n $('#filter_lost').prop('disabled', function(i, v){ return !v});\n $('#filter_found').prop('disabled', function(i, v){ return !v});\n $('#filter_post_event').prop('disabled', function(i, v){ return !v});\n $('#filter_personal').prop('disabled', function(i, v){ return !v});\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the header and footer region. | closeHeaderFooter() {
this.disableHeaderFooter();
} | [
"goToFooter() {\n this.owner.enableHeaderAndFooter = true;\n this.enableHeadersFootersRegion(this.start.paragraph.bodyWidget.page.footerWidget);\n }",
"close() {\n this.header.on('mousedown', null);\n super.close();\n }",
"function close() {\n\n // If the footer is alrea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add an option with 'theText' and 'theValue' to selection list 'theSel' | function addOption(theSel, theText, theValue)
{
var newOpt = new Option(theText, theValue);var selLength = theSel.length;
theSel.options[selLength] = newOpt;theSel.options[selLength].selected=1; //select this option
} | [
"function appendToSelect(select, value, content, selected, text) {\n var opt;\n opt = document.createElement(\"option\");\n opt.value = value;\n opt.appendChild(content);\n if (selected) {\n opt.selected = 'selected';\n }\n select.appendChild(opt);\n}",
"function addToSelect(selectId, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scene_TextInput The scene class of the name input screen. | function Scene_TextInput() {
this.initialize(...arguments);
} | [
"function Scene_Input(){\n this.initialize.apply(this, arguments);\n}",
"function Window_NameInput() {\n this.initialize.apply(this, arguments);\n}",
"function Scene_Name() {\n this.initialize.apply(this, arguments);\n}",
"inputClass () {\n let klass = ''\n\n if (this.state.focus) {\n klas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates the cancel button, opens up the add section, focuses on first field. | function openRosterAdd() {
var btnGrp = me.$rosterAddNewContainer.find('.btn-group');
if ($('#cancelButton').length == 0) {
var cancelButton = $("<input/>", {
"class" : "cancel btn btn-default",
"type" : "button",
"id" : "cancelButton",
"click" : me.rosterCancelAction,
"value" : ap.co... | [
"function cancelAdd(key){\n\tvar newnode=\"#new_node_form_\"+key;\n\tvar addButton=\"#new_btn_\"+key;\n\t$(newnode).hide();\n\t$(addButton).show();\n\t$('.add_icon').show();\n\n\t\n}",
"focusCancel(){this.$.cancelButton.focus()}",
"function cancelButtonPressed() {\n \n // 0. Hide t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
just a dummy function to trick gettext tools | function $gettext (msg) {
return msg
} | [
"function t_translationstring_TranslationString() {}",
"function TextExt() {}",
"function n__(context,strings,stringp,n) {\n\t//return portal_translateOptionalContext_plural($strings,$stringp,$n,$context);\n \treturn _i18n.dcnpgettext(null, context, strings, stringp, n);\n}",
"function TextUtilities () {\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prompts the user for the current branch and validates that it is a branch on the current repo | async function getUserInput(branches) {
let response = await prompts({
type: 'text',
name: 'branch',
message: 'Enter the name of the branch you are on:',
validate: value => branches.includes(value) ? true : "That branch doesn't exist"
})
return response;
} | [
"function checkValidBranch() {\n if (!editor.call('permissions:read')) return;\n\n editor.call('branches:getCurrentBranch', function (status, data) {\n if (data && data.id !== config.self.branch.id) {\n console.log('Branch switched while refreshing. Reloading page...');\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function needed to change printer settings | function onSettingsChange(path, value) {
printerInterface.setProperty({ path: path, value: value });
requestUpdate();
} | [
"function onSettingsChange(path, value) {\n _printerDialog.setProperty({ path: path, value: value });\n component.forceUpdate();\n }",
"function init_print_options(){\n //alert(\"init_print_options\")\n document.getElementById('options_tile_width').value = tilewidth;\n document.getElementById('opt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
modval = no of images | function img_countp() { // function to increment c by 1 and keep its value between 0-6.
"use strict";
c += 1;
c %= modVal;
return c;
} | [
"set imageCount(value) {}",
"function imageNumber(){\r\n return $( \"#\" + imagelist + \" img\").length;\r\n }",
"function getImageCount() {\r\n return $(\"#gallery img\").length;\r\n}",
"getTotalNumber() {\n return this.IMAGE_LIST.length;\n }",
"function nextImage() {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the child node. Used when child changes fragment, so the parent needs to update the child fragment id in its children. | update_child(child) {
this.children[child.get_token_string()] = [child.get_fragment_id(), child.node_id]
this.notify_fragment_dirty();
} | [
"updateChildLink(parentId, oldChildId, newChildId) {\n if (parentId === null)\n return;\n let parent = this.nodes[parentId];\n if (parent.left === oldChildId) {\n parent.left = newChildId;\n }\n else if (parent.right === oldChildId) {\n parent.righ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Student code// Student() is a subclass of Person and creates a Student object. param: name, the name of the Student. param: birthdate, the birth date of the Student. param: friends, the list of friends of the Student. param: subject, the subject that the Student is studying. | function Student(name, birthdate, friends, subject) {
Person.call(this, name, birthdate, friends);
this.subject = subject;
} | [
"function Student(name, birthdate, subject){\n\tPerson.call(this, name, birthdate);\t\n\tthis.subject = subject;\n}",
"function Student(name, birth, subject) {\n Person.call(this, name, birth);\n this.subject = subject;\n}",
"function Student(firstName, lastName, age, gender, interests) {\n Person.call... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write into the inner Overlay | function writeOverlay(to) {
if (to != 'Empty') {
for (let i = 0; i < texts.length; i++) {
console.log(`Identifier: ${texts[i][0]}, Text: ${texts[i][1]}, Searching for: ${to}`);
if (texts[i][0] == to) {
$('#innerOverlayContainer').html(texts[i][1]);
ret... | [
"function layerWrite(txt) {\n if (ns4) {\n var lyr = document.overDiv.document\n lyr.write(txt)\n lyr.close()\n }\n else if (ie4) document.all[\"overDiv\"].innerHTML = txt\n\t\tif (tr) { }\n}",
"function layerWrite(txt) {\r\n if (ns4) {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reset Set the position to a random location and reset health and radius back to default | reset() {
// Random position
this.x = width;
this.y = random(0, height);
// Default health
this.health = this.maxHealth;
// Default radius
this.radius = this.health;
} | [
"reset() {\n // Random position\n this.x = random(0, width);\n this.y = random(0, height);\n // Default health\n this.health = this.maxHealth;\n // Default radius\n this.radius = this.health;\n }",
"reset() {\n // Random position\n this.x = random(50, 500);\n this.y = random(50, 400... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send the configuration to the device. | #send() {
const data = this.#parse();
if (data) {
this.#device.printDevice('Calling <b>writeConfiguration()</b>');
this.#device.sendRequest({
'method': 'writeConfiguration',
'configuration': data
});
this.#timeout = setTimeout(() => {
this.#timeout = null;
... | [
"function _sendDeviceConfig() {\n\n // Send device config to chat window\n pms.send(\n 'MyTimeDeviceConfig',\n {\n mobile: config.mobile,\n device: config.device,\n browser: config.browser\n },\n postMessageWindow,\n config.mytimeDomain\n );\n }",
"getConfig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Need to rename oSCB and oSCO. They were originally for holding the original chat movement functions that got overriden by my proxy functions. They now just add/remove the classes that move chat between being below the video, and beside it. | function moveChatBelow() {
overrideElems.forEach(function(elem){
document.querySelector(elem).classList.remove("swSide");
document.querySelector(elem).classList.add("swBel");});
$(".chatpositionswitcher").hide();
$(".chatpositionswitcherON").show();
} | [
"function switchChat(swMode) {\r\n var vHeight; //Contains the Calculated video height.\r\n var vWidth = window.innerWidth; //When chat is below, video width is just the window content width. Currently.\r\n isOverUnder = ((vWidth < 992) || (window.innerWidth < window.innerHeight)); //The Picart... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Take a potentially misbehaving resolver function and make sure onFulfilled and onRejected are only called once. Makes no guarantees about asynchrony. | function doResolve(fn, onFulfilled, onRejected) {
var done = false;
try {
fn(function (value) {
if (done) return;
done = true;
onFulfilled(value);
}, function (reason) {
if (done) return;
done = true;
onRejected(reason);
});... | [
"function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done) return;\n done = true;\n onRejected(reaso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
helper to restore video time. attempt to restore to 10 seconds prior to the last save point (to recapture frame of reference) | function restoreTime () {
const restoreTime = thiz.$videoPlayerRestoreTime(
videoUrl,
videoProgress
)
if (restoreTime > 0) {
player.mute()
player.playVideo()
setTimeout(function () {
player.pauseVid... | [
"function rewindVid() {\n if (video.currentTime <= 10) {\n video.currentTime = 0;\n } else {\n video.currentTime -= 10;\n }\n}",
"function saveVideoTime() {\n\n // Called after 1000 milliseconds (1 second)\n setTimeout(function () {\n if (player.getCurrentTime() != undefined) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
got finish event from vimeo player take some action, like redirecting somewhere | function onFinish() {
console.log('finished playing');
window.location = 'http://www.theplanaproj.com/';
} | [
"function onFinish() {\n\t\t\t\t\t\t\t$f(playerID).addEvent('finish',\n\t\t\t\t\t\t\tfunction(data) {\n\t\t\t\t\t\t\t\tonVideoEndTrigger();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}",
"function receiveVideoEndMessage() {\n window.location = '/';\n}",
"onEnd() {\n console.log('finished playing video');\n this.pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the timefield end time | function getTimefieldTimeEnd() {
return parseFloat($('#clipEnd').timefield('option', 'value'));
} | [
"function getEndTime() {\n\t\treturn endTime;\n\t}",
"get endTime() {\n return new Date(this[$timeScales].$endTime);\n }",
"static get _getStartFinishTime() {\n let arrDom = EventRecording._getElement;\n let timeVal = {};\n\n let timeStartVal = arrDom.timeStart.value;\n let timeFinishVal =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert backtrace from any format to Ruby format | function correct_backtrace(backtrace) {
var new_bt = [], m;
for (var i = 0; i < backtrace.length; i++) {
var loc = backtrace[i];
if (!loc || !loc.$$is_string) {
/* Do nothing */
}
/* Chromium format */
else if ((m = loc.match(/^ at (.*?) \((.*?)\)$/))) {... | [
"function caml_convert_raw_backtrace_slot(){\n caml_failwith(\"caml_convert_raw_backtrace_slot\");\n}",
"function normalizeStackTrace(stack) {\n\t\tvar lines = stack.replace(/\\s+$/, '').split('\\n');\n\t\tvar firstLine = '';\n\n\t\tif (/^(?:[A-Z]\\w+)?Error: /.test(lines[0])) {\n\t\t\t// ignore the first line i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An item only matches state if it passes the filter. | [symbols.itemMatchesState](item, state) {
const base = super[symbols.itemMatchesState] ?
super[symbols.itemMatchesState](item, state) :
true;
if (!base) {
return false;
}
const text = this[symbols.getItemText](item).toLowerCase();
const filter = state.filter && state.filter.toLower... | [
"filterMatchingItems(item) {\n if (this.state.shelf_life === 'All' && this.state.type === 'All') {\n return true;\n } else if (this.state.shelf_life === 'All' && this.state.type === item.type) {\n return true;\n } else if (this.state.shelf_life === item.shelf_life && this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If user select a selected alien from any gender, its remove it from the selection box | function removeSelection(id, gender) {
var selectionDiv = `<div align="center">
<div class="egg">
</div>
<h4>Select a alien as `+ gender + `</h4>
</div>
</div>`
i... | [
"function displayGender(genders){\n _.each(genders, function(g, i){\n var Template = $(\"#gender-opt\").clone().text(g).val(i);\n Template.removeAttr(\"id\");\n $(\"#gender-select\").append(Template);\n });\n // removes the first option in select box (which is blank)\n $(\"#gender-select ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
3. Create Method which calculates tree density (num of trees / park area) | calculateDensity() {
this.density = Math.round(this.amountOfTrees / this.area);
console.log(
`In ${this.name} park trees density is ${this.density} [tree/ha]`
);
} | [
"treeDensity() {\n let density = this.trees / this.parkArea;\n return density;\n }",
"calcTreeDensity () {\n return this.numberOfTrees / this.parkArea;\n }",
"reportTreeDensity() {\n const density = (this.numTrees / this.area).toFixed(2);\n console.log(`${thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update the d3 json tree | function updateRoot(){
root = JSON.parse(createD3Tree(null,riverNetwork.root));
} | [
"function update(data) {\n //first we are flatting the node from a json tree structure to an array\n var flattenedNodes = flattenTreeToNodesArray(data, cache.width / 2, consts.ROOT_Y_POSITION),\n nodesData = flattenedNodes,\n linksData = d3.layout.tree().links(nodesData); //we are us... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the percent down an edge that a point appears. | function _getPercentOfEdgeFromPoint(rect, direction, valueOnEdge) {
switch (direction) {
case RectangleEdge.top:
case RectangleEdge.bottom:
return rect.width !== 0 ? (valueOnEdge.x - rect.left) / rect.width * 100 : 100;
case RectangleEdge.left:
cas... | [
"function _getPercentOfEdgeFromPoint(rect, direction, valueOnEdge) {\n\t switch (direction) {\n\t case RectangleEdge.top:\n\t case RectangleEdge.bottom:\n\t return rect.width !== 0 ? (valueOnEdge.x - rect.left) / rect.width * 100 : 100;\n\t case RectangleEdge.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
first segment always remains unchanged, second could and will break into 0, 1 or 2 pieces | resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {
const result = [];
const isHorizontal1 = ax2 - ax1 > ay2 - ay1;
const isHorizontal2 = bx2 - bx1 > by2 - by1;
if (isHorizontal1 && isHorizontal2 &&
by1 === ay1 &&
((ax1 <= bx2 && ax1 >= bx1) || (ax2 <... | [
"function getSmallerSegment(input){\n\n}",
"_splitSafely(seg, pt) {\n // Rounding errors can cause changes in ordering,\n // so remove afected segments and right sweep events before splitting\n // removeNode() doesn't work, so have re-find the seg\n // https://github.com/w8r/splay-tree/pull/5\n thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Brute force check for tie, because I have given up | function checkForTie(){
let chk1 = false;
let chk2 = false;
let chk3 = false;
let tie = false;
if(gameState.board[0] != "" && gameState.board[1] != "" &&gameState.board[2] != "")
{
chk1 = true;
}
if(gameState.board[3] != "" && gameState.board... | [
"function checkTie() {\n if (activeSquares.length == (gridSize*gridSize)) {\n tie()\n }\n}",
"function tieBreaker(tied_players, pending_deck){\n let starting_idx = 0\n while((starting_idx + tied_players.length) <= pending_deck.length ){\n let score_arr = []\n for(let k in tied_pla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return startIndex of date array equal or after the start date. 1 if all dates are before start date eg. startIndex(["2014/03/27","2014/04/28","2014/04/30"], "2014/04/01") => 1 | function startIndex(dateArray, startDate) {
startDate = new Date(startDate);
if (true) { // TODO: check for date format
if ( (new Date(dateArray[0])) < (new Date(dateArray[1])) ) {// chronological
// iterate through dates
for (var i = 0; i < dateArray.length; i++) {
if ( startDate <= (new Date(da... | [
"function getDateIndex(date){\n return diffDays(arrayStartDate.getTime(),date);\n }",
"function findDateIndexes(startDate, endDate, dateArray){\n let startIndex, endIndex;\n for(let i = 0; i < dateArray.length; i++){\n let currentArrayDate = moment(dateArray[i]);\n\n if(startDate.isS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates in user/repo from in default branch. | createBranch(user, repo, branch, sha, accessToken) {
const path = API_URL_TEMPLATES.CREATE_REF
.replace('${owner}', user)
.replace('${repo}', repo)
const payload = {
ref: `refs/heads/${branch}`,
sha
}
return this.fetchPath(... | [
"function forkRepo(user, reponame, branch, cb) {\n var repo = getRepo(user, reponame);\n var forkedRepo = getRepo(app.username, reponame);\n\n // Wait until contents are ready.\n\n function onceReady(cb) {\n _.delay(function() {\n forkedRepo.contents(\"\", function(err, contents) {\n contents ? c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if an element is empty, accounting for void nodes. | isEmpty(editor, element) {
var {
children
} = element;
var [first] = children;
return children.length === 0 || children.length === 1 && Text.isText(first) && first.text === '' && !editor.isVoid(element);
} | [
"isEmpty(editor, element) {\n var {\n children\n } = element;\n var [first] = children;\n return children.length === 0 || children.length === 1 && Text.isText(first) && first.text === \"\" && !editor.isVoid(element);\n }",
"function isEmpty(node) {\n\t\treturn !node || (!node.childElementCount &... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display result from facebook album fetch | function showAlbumsResult(r)
{
if (!r.success) {
if (r.error) {
Ti.UI.createAlertDialog({title:L('error'),message:r.error}).show();
} else {
Ti.UI.createAlertDialog({title:L('error'),message:L('uns')}).show();
}
return;
}
//Convert the result to json
albumsJSON = JSON.parse(r.result).... | [
"function onSuccessAlbum(json){\n \t$('#results').html(\"\");\n \t$('#player').html('');\n \tvar albums = json.albums.items\n \talbums.map(function(album){\n \t\tvar uri = album.uri\n \t\t$('#results').append(`\n \t\t\t<div class=\"col-xs-12 col-sm-6 col-md-6 col-lg-6 result\">\t\n \t\t\t\t<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add accessory to platform. | _registerAccessory (params, accessory) {
if (!this._accessories[params.id]) {
if (
Object.keys(this._accessories).length >= context.maxAccessories
) {
this.error('too many accessories, ignoring %s', params.name)
return undefined
}
this._accessories[params.id] = access... | [
"function addAccessory (accessoryName) {\n\tthis.log('Add Accessory')\n\tvar platform = this\n\tvar uuid\n\n\t// Accessory must be created from\n\t// PlatformAccessory Constructor\n\tvar Accessory = platform.api.platformAccessory\n\n\t// Service and Characteristic are from hap-nodejs\n\tvar Service = platform.api.h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Looks up a typedLetter object by it's position (x, y) on the Grid. | findTypedLetterByPosition(position) {
let result = this.typedLetters.find(typedLetter => {
return typedLetter.position.x === position.x && typedLetter.position.y === position.y;
});
if (typeof result === 'undefined') {
result = null;
}
return result;
... | [
"function letterAt(x, y) {\n return grid[y][x];\n }",
"placeLetterOnGrid(letter, cell) {\n const {rowNumber, columnNumber} = cell;\n letter.setPosition(rowNumber, columnNumber);\n this.grid.setCellLetter(letter.letter, cell);\n }",
"updateTypedLetter(position, letter) {\n for (let i = 0, le... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This class defines a complete listener for a parse tree produced by XMLParser. | function XMLParserListener() {
antlr4.tree.ParseTreeListener.call(this);
return this;
} | [
"function Listener() {\n\tantlr.tree.ParseTreeListener.call(this);\n this.nodeMap = {};\n this.nodeEdges = [];\n this.trivialRoot = null;\n this.crnt_id = -1;\n this.makeCytoNode = makeCytoNode;\n\treturn this;\n}",
"function einfachListener() {\n\tantlr4.tree.ParseTreeListener.call(this);\n\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deletes a label from a fat fieldNode | deleteLabel(label) {
if (this.fieldNode) {
if ('labels' in this.fieldNode) {
if (this.fieldNode.labels[label]) {
// set to false instead delete
this.fieldNode.labels[label]._value = false;
}
} else {
// attention, this is for ui only, this label will never sen... | [
"removeLabel() {\n this._label = null;\n }",
"removeLabel(label) {\n // remove 3d object\n this.remove(label);\n\n // remove dom label\n this.domElements.labels.dom.removeChild(label.content);\n }",
"deleteLabel() {\n /** @type {number} */\n let rowIdx = this.labels.inde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes all min and max timestamps within a textgrid the same | _homogonizeMinMaxTimestamps () {
const minTimes = this.tierNameList.map(tierName => this.tierDict[tierName].minTimestamp);
const maxTimes = this.tierNameList.map(tierName => this.tierDict[tierName].maxTimestamp);
const minTimestamp = Math.min(...minTimes);
const maxTimestamp = Math.max(...maxTimes);
... | [
"alignRangeInterval() {\n const { controls } = this.props;\n\n if (\n controls.settings.range.value < controls.settings.interval.value ||\n controls.settings.interval.value == \"\"\n ) {\n controls.settings.interval.value = controls.settings.range.value;\n }\n\n controls.settings.inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
serialize the table cells | serializeCells(writer, cells) {
for (let i = 0; i < cells.length; i++) {
this.serializeCell(writer, cells[i]);
}
} | [
"serialize() {\n const cells = [];\n each(this._cells, cell => {\n let model = cell.model;\n if (isCodeCellModel(model)) {\n cells.push(model.toJSON());\n }\n });\n if (this.promptCell) {\n cells.push(this.promptCell.model.toJSON... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all sorters, turning store sorting off. | clearSorters() {
const me = this;
me.sorters.length = 0;
me.sort();
} | [
"clearSorters() {\n const me = this;\n\n me.sorters.length = 0;\n\n me.sort();\n }",
"clearSorters() {\n const me = this;\n me.sorters.length = 0;\n me.sort();\n }",
"clearSortBys () {\n this.globalStorage.delete(StorageKeys.SORT_BYS);\n }",
"clearSort() {\r\n this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ES7 static alive = 10; | static alive () {
return true;
} | [
"setAlive() {\n this.alive = true;\n }",
"get alive() {\n return this.__Internal__Dont__Modify__.alive;\n }",
"function alive()\n{\n var now = new Date();\n console.log(\"Server alive \" + now );\n}",
"setAlive() {\n this.currentlyAlive = true;\n this.aliveNext = true;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
thumbnail image hover event | function ADD_thumbnail_mouseover(){
// 일단 먼저 끈다.
$(document).off("mouseenter mouseleave", "li.twitch>a>img, li.kakao>a>img, li.youtube>a>img");
$(".ADD_thumb_elem_container").fadeOut("fast");
if(!ADD_config.thumbnail_mouse){
return false;
}
// 켠다.
$(document).on({
mouseente... | [
"function hover(e){\n let hovered = document.querySelector(\"#hover\");\n //Get the image file name to be from the small img so we can use it in the medium folder.\n let src = e.target.src.split('images/square-small/')[1]\n e.target.style.outline = 'solid';\n hovered.innerHTML = \"<img src=images/squ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display the harvesting of the specified from the current location; raise a runtime error if the current location is not a valid spot from which to gather that crop. This method is preferred over tryGetCrop for live operation (ie when actually displaying something to the user) | animateGetCrop(crop) {
const col = this.maze_.getPegmanX();
const row = this.maze_.getPegmanY();
const cell = this.getCell(row, col);
if (cell.featureType() !== crop) {
throw new Error("Shouldn't be able to harvest the wrong kind of crop");
}
if (cell.getCurrentValue() <= 0) {
thr... | [
"function inspect(){\n var inspectedLand = searchCropWithID(chosenPlotID);\n if (!inspectedLand){\n document.getElementById(\"plotInfo\").innerHTML = \"Nothing!\";\n }\n else{\n var infoString= \"Type: \"+ inspectedLand.name+\"<br/>State: \"+inspectedLand.state+\" <br/>Remaining Time: \"+... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called in the context of the SortableTable. Set properties nowDate, now, coords, for use in spec functions. | function onTableRefresh() {
this.nowDate = new Date();
this.now = Building.seconds( this.nowDate.getTime() );
} | [
"updateDateParameters() {\n this.year = this.date.getFullYear();\n this.month = MONTHS[this.date.getMonth()];\n this.day = this.date.getDay();\n this.generateViewData();\n }",
"function updateJsonTableDates() {\r\n\r\n if (!isLikeEmpty(G_tableObjects)) {\r\n\r\n // First, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Any logged user can follow any totem which will appear on facebook as an open graph action TODO : Create the opengraph action and submit it for review : not working now ! | function followFb(totem_name){
loggr("posting follow fb "+totem_name+ " " , "created likefb");
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
FB.api(
'me/wimhapp:follow_the_totem',
'post',
{
... | [
"handleFollow() {\n // debugger\n if (this.props.session.id !== this.props.user.id) {\n const follow = {\n follower_id: this.props.session.id,\n following_id: this.props.user.id\n }\n\n this.props.createFollow(follow)\n } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PUBLIC METHODS Gulp task that ensures the license header exists in all files. Adds the header to any files that do not already have it. | function ensureLicense() {
return through.obj((file, enc, cb) => {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new PluginError('gulp-license', 'Streaming not supported'));
return;
}
const text = file.contents.toString();
const type = toFil... | [
"async addLicenseFile() {\n const licensePath = helper.hostPath('LICENSE');\n\n if (await exists(licensePath)) {\n return;\n }\n\n const template = await read(helper.aberlaasPath('./templates/LICENSE'));\n const currentPackage = await readJson(helper.hostPath('package.json'));\n\n const conte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
minimize the svg graph | function minimizeSVG() {
$('#fullscreen').addClass('hidden');
applyPanZoom('#map');
} | [
"function minimize() {\r\n\r\n\t\tlegendContent.selectAll('*').style(\"visibility\", \"hidden\");\r\n\t\tplusSignVLine.style(\"visibility\", \"visible\");\r\n\t\tlegendsOn = false;\r\n\t}",
"function maximizeSVG() {\n $('#fullscreen').removeClass('hidden');\n applyPanZoom('#fullscreenSVG');\n}",
"function... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Age on Mercury in years | ageMercury() {
let mercurianAge = parseInt(this.ageEarthYears()/0.24); //I am 125 years old
return mercurianAge;
} | [
"mercuryYears(age) {\n let mercuryAge = age * 0.24;\n return mercuryAge;\n }",
"ageInYears() {\n let currentYear = new Date().getFullYear();\n return currentYear - this.birthYear() - 1;\n }",
"ageEarthYears() {\n const birthdate = new Date(this.dob);\n let today = new Date();\n let calcAg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asynchronously update the vis transform values this method is just for testing, if approved, it still needs the ajax call and routing set up as well as the dabatase. It also can be used with the tree visualization | function saveTransform(){
var visTransforms = {};
// for (var key = 0; key < data.length; key++) {
for (var key in data) {
var transformObject = d3.transform(d3.select("#vis"+key).select("g").attr("transform"));
visTransforms[key] = {
// "index": key,
"scale": parseFloat(... | [
"updateTransform(){}",
"function updateTree() {\n tree.loadData(document.getElementById(\"ranking-type-tree\").value);\n bio.loadData(document.getElementById(\"ranking-type-tree\").value);\n }",
"function update_preview() {\n\tvar settings = collect_settings();\n\tvar n = dijit.byId('preview_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse a postfix expression to a BoolExpr. For example, the postfix expression ["true", "false", "or", "not"] is interpreted as "not (true or false)". | function parsePostfix(tokens) {
const stack = [];
for (const token of tokens) {
if (token in UNARY_OPERATORS) {
const operand = stack.pop();
if (operand !== undefined) {
stack.push(new BoolExprUnary(token, operand));
}
}
else if (token ... | [
"function parseBooleanExpr() {\n if (tokenType() == T_PAREN_OPEN) {\n return subBooleanExpr1();\n } else {\n AST.addNode(tokenValue(), 'leaf', tokenStream[0]);\n return parseBoolVal();\n }\n }",
"boolean_expr() {\n const startToken = this.currentToken;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add an element to the left; | function AddLeft() {
CheckData();
while (Global.queue.length != 0) {
var newElement = document.createElement("div");
newElement.innerText = Global.queue.shift();
newElement.className += "output";
newElement.addEventListener("click", SelfDelete);
var firstchild = Global.output.firstChild;
Global.ou... | [
"function AddLeft() {\r\n\tif (!CheckData() || CheckIntermitate()) return;\r\n\tvar newElement = document.createElement(\"div\");\r\n\tGlobal.queue.unshift(newElement);\r\n\tnewElement.className += \"output\";\r\n\tnewElement.style.height = Global.number.value + \"px\";\r\n\tnewElement.style.left = parseInt(Global.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format a word. This removes any whitespace. | static formatWord(wd) {
return wd.replace(/\s+/g, "");
} | [
"function formatTheWordForDisplay(word) {\n\tvar formatWord = \"\";\n\tfor (let i = 0; i < word.length; i++) {\n\t\tformatWord = formatWord + word[i].toUpperCase() + \" \";\n\t}\n\treturn formatWord;\n}",
"function removeSpace(word)\r\n{\r\n var newWord=word.replace(/ /g,\"\");\r\n return newWord;\r\n}",
"fun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Variance = average squared deviation from mean | function variance(vals) {
vals = numbers(vals)
var avg = mean(vals)
var diffs = []
for (var i = 0; i < vals.length; i++) {
diffs.push(Math.pow((vals[i] - avg), 2))
}
return mean(diffs)
} | [
"function variance(arr) {\r\n let meanValue = mean(arr);\r\n let total = 0;\r\n\r\n for (let i = 0; i < arr.length; i++) {\r\n total += (arr[i] - meanValue) ** 2;\r\n }\r\n let varianceValue = total / arr.length;\r\n return varianceValue;\r\n}",
"function getVariance(){\n var add = 0;\n var variance = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
upload image to server from summernote editor | function sendFile(file, editor, welEditable) {
data = new FormData();
data.append("file", file);
$.ajax({
data: data,
type: "POST",
url: root_url + "/product/uploadimage",
cache: false,
contentType: false,
processData: false... | [
"function uploadImage_en(image) {\n\t\tvar data = new FormData();\n\t\tdata.append(\"image\", image);\n\t\t$.ajax({\n\t\t\turl: `${BASE_URL}Question/uploadImage`,\n\t\t\tcache: false,\n\t\t\tcontentType: false,\n\t\t\tprocessData: false,\n\t\t\tdata: data,\n\t\t\ttype: \"POST\",\n\t\t\tdataType: \"JSON\",\n\t\t\tsu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PrepareTests ID array JSON | PrepareTests(){
var arr=[];
for(var i in this.mytests){
arr.push(this.mytests[i]._id);
}//end-for-loop1
this.testStr=angular.toJson(arr);
} | [
"function generateID(questions){\n let IDs = [];\n $.each(questions, function (i) {\n let question = questions[i].question_json_representation;\n let type = question.type;\n let ID = questions[i].question_id;\n IDs.push(ID);\n });\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Installs Flowplayer on YouTube Adapted from | function installyoutube() {
/**
* Parses a StreamMap, pulls out the right url, takes 720p MP4 first, then 360p otherwise,
* then installs the player
* (@param) (string) streamMapHTML The StreamMap to be parsed
*/
function parseStreamMap(streamMapHTML) {
var streamMap = {};
streamMapHTML.sp... | [
"function setupFlowplayer() {\t\t\n\t\t\tflowplayer(\"a.flow-player-rtmp\", {src: \"/swf/flowplayer-3.1.0.swf\", wmode: \"transparent\"}, {\n\t\t\t\tkey: '#@0c6f31cd2fcf37df4b1',\n\t\t\t\tclip: { \n\t\t\t\t\turl: $('a .flow-player-rtmp').attr('href'),\n\t\t\t\t\tprovider: 'influxis',\n\t\t\t\t\tautoPlay: tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a list of strings and spans made from text according to spans. Spans is a list of [text segment length, span segment length, ...] repeating. | function renderSpans(text, spans) {
if (!spans) {
return [text];
}
if (spans.length > 1000) {
console.warn(`Not highlighting excessive number of spans to avoid browser hang: ${spans.length}`);
return [text];
}
var out = [];
var c = 0;
for (var i = 0; i < spans.length; i += 2) {
out.push(te... | [
"function getSpansAsArray(text) {\n // Get end index of each span\n var regex = /<\\/span>/gi;\n var result;\n var indices = [];\n while ( (result = regex.exec(text)) ) {\n var index = result.index + \"</span>\".length;\n indices.push(index);\n }\n // Get array of span strings\n var spans = [];\n var... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
insert asset into editor | function insert_asset(){
try{
var url = getUrl(this.href);
$.get(url,{}, function(data){
//insert into editor(tinyMCE is global)
tinyMCE.execCommand('mceInsertContent', false, data);
});
}catch(e){ alert("insert asset: "+ e);}
} | [
"function onAddAsset(context) {\n var artifactManager = context.artifactManager;\n var artifact = context.artifact;\n var name = artifact.attributes.overview_name;\n\n\n //Add the asset\n log.debug('about to add the asset : ' + artifact.name);\n\n //Store any resources in t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
helper method to parse a hazard from a JSON | parseHazard(hazard) {
const name = hazard.name;
const description = hazard.description;
const key = this.parseItem(hazard.key);
return new Hazard_1.default(name, description, key);
} | [
"static parse(json) {\n\n }",
"function parse_event_from_json(data) {\n var events = []\n $.each(data, function(index, element) {\n $.each(element, function(i, json) {\n event_id = json['identifier']\n event_title = json['title']\n event_location = json['location']\n event_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the property used to create the scrolling effect when using jQuery animations depending on the plugin direction option. | function getScrollProp(propertyValue){
if(options.direction === 'vertical'){
return {'top': propertyValue};
}
return {'left': propertyValue};
} | [
"get scrollDirection() {\n return this._getOption('scrollDirection');\n }",
"function getScrollProp(propertyValue){\n if(direction === 'vertical'){\n return {'top': propertyValue};\n }\n return {'left': propertyValue};\n}",
"static getScrollDirection() {\n return Input.scrollDirection;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Service nodes can be added multiple times to a layer config, but with different children activated. Create a unique key for a service+children combo so the state keys won't overwrite each other. However, existing permalinks would break if they don't contain the hash based on child ids, so this function makes the decisi... | function getServiceUniqueKey(serviceNode, stateObject) {
var childIds = _.pluck(serviceNode.children, 'layerId').join(''),
comboKey = serviceNode.name + childIds;
if (stateObject && stateObject.version) {
// State was passed in with a version
... | [
"function buildRecordServiceStateCacheKey(){return {type:RECORD_SERVICE_STATE_VALUE_TYPE,key:`record-service-state`};}",
"function buildCacheKey(){return {type:LDS_CACHE_DEPENDENCIES_VALUE_TYPE,key:\"DEPENDENCY_MAP\"};}",
"function addService(serviceName, servicesList, parentNodes, showProvidedServices) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an install specifier, attempt to resolve it from the CDN. If no lockfile exists or if the entry is not found in the lockfile, attempt to resolve it from the CDN directly. Otherwise, use the URL found in the lockfile and attempt to check the local cache first. All resolved URLs are populated into the local cache, ... | async function resolveDependency(installSpecifier, packageSemver, lockfile, canRetry = true) {
// Right now, the CDN is only for top-level JS packages. The CDN doesn't support CSS,
// non-JS assets, and has limited support for deep package imports. Snowpack
// will automatically fall-back any failed/not-found ass... | [
"async function resolveDependency(installSpecifier, packageSemver, lockfile, canRetry = true) {\n // Right now, the CDN is only for top-level JS packages. The CDN doesn't support CSS,\n // non-JS assets, and has limited support for deep package imports. Snowpack\n // will automatically fall-back any failed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if quad contains this body | in(quad) {
return quad.contains(this.rx, this.ry);
} | [
"in(quad) {\n return quad.contains(this.rx, this.ry);\n }",
"has(quad) {\n const quads = this.getQuads(quad.subject, quad.predicate, quad.object, quad.graph);\n return quads.length !== 0;\n }",
"has(quad) {\n const quads = this.getQuads(quad.subject, quad.predicate, quad.object, quad.graph... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Change a user's password by hashing and setting it | function changePassword(user, password) {
return User.hashPassword(password).then(hash => {
user.password = hash;
return user.save();
});
} | [
"function setPassword (user, cb) {\n \n}",
"setPassword(user, newPassword) {\n user.passwordHash = bcrypt.hashSync(newPassword);\n }",
"changeUserPassword (callback) {\n\t\tconst passwordData = {\n\t\t\texistingPassword: this.data.password,\n\t\t\tnewPassword: RandomString.generate(12)\n\t\t};\n\t\tthis.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function flattens holes in multipolygons to one array of polygons [ [ [ array of outer coordinates ] [ hole coordinates ] [ hole coordinates ] ], [ [ array of outer coordinates ] [ hole coordinates ] [ hole coordinates ] ], ] becomes [ [ array of outer coordinates ] [ hole coordinates ] [ hole coordinates ] [ arra... | function flattenMultiPolygonRings(rings){
var output = [];
for (var i = 0; i < rings.length; i++) {
var polygon = orientRings(rings[i]);
for (var x = polygon.length - 1; x >= 0; x--) {
var ring = polygon[x].slice(0);
output.push(ring);
}
}
return output;
} | [
"function flattenHoles(array){\n var output = [], polygon;\n for (var i = 0; i < array.length; i++) {\n polygon = array[i];\n if(polygon.length > 1){\n for (var ii = 0; ii < polygon.length; ii++) {\n output.push(polygon[ii]);\n }\n } else {\n output.push(polygon[0]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
14. Print an n x n grid using the '' character For example, something like 'printGrid(4)' should produce... | function printlineGrid(sidelength){
let temp = "";
for(let count = 0; count < sidelength; count++){
temp += "*";
};
return temp;
} | [
"function displayGrid () {\n\n for (var i = 0; i<solvedString.length; i+=9) {\n if (i%27 === 0) {\n finalGrid += \"+-------+-------+------+<br/>\";\n }\n finalGrid += \" | \" + solvedString[i] + \" \" + solvedString[i+1] + \" \" + solvedString[i+2] + \" | \" + solvedString[i+3] + \" \" + sol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
! PUKI ACTION EVENT This is the function that runs to check puki animation complete | function checkAnimationComplete(){
var targetName = '';
for(n=0;n<animation_arr.length;n++){
if($.pukiAnimation[animation_arr[n].name].visible){
targetName = animation_arr[n].name;
}
}
var _currentframe = $.pukiAnimation[targetName].currentFrame;
var _lastframes = $.pukiData[targetName].getAnimation($.pu... | [
"inAnimationComplete(){}",
"animationDidComplete() {}",
"if (GetActionMarker()->m_paaAction==PAA_WAIT) {\n // play still anim\n CModelObject &moBody = GetModelObject()->GetAttachmentModel(PLAYER_ATTACHMENT_TORSO)->amo_moModelObject;\n moBody.PlayAnim(BODY_ANIM_WAIT, AOF_NORESTART|AOF_LOOPIN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the underline style of selected contents. | set underline(value) {
if (value === this.underlineIn) {
return;
}
this.underlineIn = value;
this.notifyPropertyChanged('underline');
} | [
"function styleUnderline() {\n\t\tif (activeEl != undefined) {\n\t\t\t// if selected element actually has text to add style to\n\t\t\tif (activeEl.innerText != '') {\n\t\t\t\tif (activeEl.css(\"text-decoration\") == \"underline\") {\n\t\t\t\t\tactiveEl.css(\"text-decoration\", \"none\");\n\t\t\t\t}\n\t\t\t\telse {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
used to determine if it will take a long time to download all the headers in this folder so that we can do folder notifications synchronously instead of asynchronously readonly attribute boolean manyHeadersToDownload; | get manyHeadersToDownload()
{
return true;
} | [
"isClientDownloading() {\n return this._file.downloading;\n /*\n if (this._state == CLIENT_DOWNLOADING){\n return true;\n }else{\n return false;\n }\n */\n }",
"function FullyDownloaded() {\n}",
"get done()\n {\n return [\n nsIDM.DOWNLOAD_FINISHED,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |