query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Retorna nome do Customer | function customerName(item) {
if (!item.customer || !item.customer.firstname)
return "Não identificado";
var r = item.customer.firstname;
r += item.customer.lastname ? " " + item.customer.lastname : "";
return r;
} | [
"function customerName(item) {\r\n if (!item.customer || !item.customer.firstname)\r\n return \"Não identificado\";\r\n\r\n var r = item.customer.firstname;\r\n r += item.customer.lastname ? \" \" + item.customer.lastname : \"\";\r\n\r\n return r;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
used to hold the JSON sent from server used to build .... everything /These Function are used to build buttons on the screen ButtonBuilder(): IN: obj a json parentKey a key for the obj id location of element in json, id = [key][key]etc..., used as html id for element created PURPOSE: iterate a json object, recursively ... | function ButtonBuilder(obj,parentKey,id) {
//PAGE_IS_READY will be 1 when the whole JSON is traversed
if (!PAGE_IS_READY) {PAGE_IS_READY = 2;}
else {PAGE_IS_READY += 1;};
var id = id || "";
var childKey = Object.keys(obj[parentKey]);
//special attributes related to the HTML view and item details
//they need... | [
"function HTMLgenerator(id,parentDiv,CustomStyle) {\n\t\n\tif (parentDiv===\"\") {parentDiv='terminal';};//the root element of JSON is added to the terminal\n\t\n\t\t//isolate just the name of the item\n\t\tvar nm = id.substring(id.lastIndexOf(ELMNT_ID_SPACE_CHAR)+1);//string split ID for elements name attribute\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sort questions into categories. | static _sortQuestionsIntoCategories(questions) {
const nameToCategoryMap = {};
for (let question of questions) {
const category = question.category;
if (!(category in nameToCategoryMap)) {
nameToCategoryMap[category] = new Category(category);
}
question.category = category;
... | [
"function filterCategoryQuestion(){\n\tsequence_arr = [];\n\tfor(n=0;n<question_arr.length;n++){\n\t\tsequence_arr.push(n);\n\t}\n\t\n\tif($.editor.enable){\n\t\treturn;\n\t}\n\t\n\t//do nothing if category page is off\n\tif(!categoryPage){\n\t\treturn;\n\t}\n\t\n\t//do nothing if category all is selected\n\tif(cat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a document to the word index. (allWords: array of strings) | function addDocument(docId, allWords) {
let hist = createWordHistogram(allWords);
let words = Object.keys(hist);
// find the largest term frequency using hist
let largestTF = words.map(k => hist[k]).reduce((a, b) => Math.max(a, b), 1);
// make sure all words are in the database
let wordObject... | [
"addWords(words) {}",
"async addContent(name, contentText) {\n //TODO\n allWords = await this.words(contentText);\n docCount++;\n await db.collection(docContent_table).insertOne(\n {_id: docCount,docN: name, content: contentText}\n );\n for(let [word,offsets] of allWords){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle asteroid creation events | function createAsteroid() {
if (!state.running) {
return;
}
console.log('Spawning asteroid...');
// NOTE: source - http://www.clipartlord.com/wp-content/uploads/2016/04/aestroid.png
var asteroidDivStr = "<div id='a-" + asteroidIdx + "' class='asteroid'></div>"
// Add the rocket to the screen
gwhGame.... | [
"function createAsteroidHandler(){\n let xPos = Math.floor(Math.random() * WIDTH);\n let yPos = 0;\n let asteroidName = ASTEROID_NAMES[Math.floor(Math.random() * ASTEROID_NAMES.length)]; \n let asteroid = asteroids.create(xPos, yPos, asteroidName);\n // The offset is for users to be able to se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Location is a subclas of gMaps | function Location(location) {
gMaps.call(this, location); // properties from gMaps
this.name = ko.observable(location.name);
this.city = ko.observable(location.city);
this.mapcenter = ko.observable(location.mapcenter);
this.selected = ko.observable(location.selected);
thi... | [
"function Location() {\n this.type = objectType.location;\n}",
"function location(lat, longi) {\n this.latitude = lat;\n this.longitude = longi;\n}",
"function VenueMapStep() { this.init(\"map-location\"); }",
"function Location(lat, lon) {\n this.lat = lat;\n this.lon = lon;\n}",
"function Locat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an array of hours objects for Tullys Stores in this city | function GetTullyStoreHoursForCity(city) {
var maxHours = 3 + Math.floor(Math.random() * 15);
var hourSets = new Array(maxHours);
for (var hr = 0; hr < maxHours; hr++) {
hourSets[hr] = { hoursHeader: GenerateBoeingBuildingName(), hours: GenerateHoursSet() };
console.info("Set for " + hr + " is [ " + hourSets[hr]... | [
"function GetAveCStoreHoursForCity(city) {\n\tvar maxHours = 3 + Math.floor(Math.random() * 15);\n\tvar hourSets = new Array(maxHours);\n\tfor (var hr = 0; hr < maxHours; hr++) {\n\t\thourSets[hr] = { hoursHeader: GenerateBoeingBuildingName(), hours: GenerateHoursSet() };\n\t\tconsole.info(\"Set for \" + hr + \" is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of rows modified, inserted or deleted by the most recently completed INSERT, UPDATE or DELETE statement on the database Executing any other type of SQL statement does not modify the value returned by this function. | 'getRowsModified'() { return sqlite3_changes(this.db); } | [
"get affectedRows() {\n this._ensureOpen();\n return this._connection.affectedRows;\n }",
"get statementCount() {\n return this.statements.length;\n }",
"get count() {\n return (this.statements.length)\n }",
"get insertedCount() {\n var _a;\n return (_a = this.result.nInsert... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pobiera z lokalnej tablicy przystankow (obiekty openlayers.feature.vector) indeks obiektu przystanku o zadanym id | function getIPrzystnekFromId(id) {
var i = 0, id_tmp = 0;
for (i = 0; i < przystanki.length; ++i) {
id_tmp = przystanki[i].attributes.id;
if (id == id_tmp)
return i;
}
return null;
} | [
"function dskLbl2Idx(id) {\r\n for (var i = 0; i < dsks.length; i++) {\r\n if (dsks[i].id == id) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }",
"devolerIndex(id){\n\t\treturn this.provincias.findIndex(prov=> prov.id === id);\n\t}",
"function getTableIdIndx(table) {\n var cu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Showing different number of projects in different size of devices | function showProjects(project) {
if (bodyWidth < 741 && state == 'less') {
for (; i < 5; i++) {
projectCreation(project[i]);
}
}
else if (bodyWidth > 740 && state == 'less') {
for (; i < 9; i++) {
projectCreation(project[i]);
}
}
else if (state... | [
"function projectHeight_phone(){\n\n\t\tw = window.innerWidth;\n\n\t\tif (w >= 400) {\n\t\t\tproject_w = w/3;\n\n\t\t\n\t\t} else {\n\t\t\tproject_w = w/16*9;\n\t\t\t\n\t\t}\n\n\t\t$('.project').css('height', project_w + 'px');\n\t\t$('#hp_logo').css('height', project_w + 'px');\n\t\t$('#hp_logo').css('background-i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: arenaController.editarenainfo functionality: this function edits the arena info | function editarenainfo(req, res) {
var arenaid = req.params.arenaid;
Arena.findOne({ _id: arenaid }, function (err, arena) {
if (err) {
return res.status(500).json({ error: err.message });
}
if (!arena) {
return res.status(400).json({ error: 'the arena is not found' });
}
if (req.use... | [
"function editarena(req, res) {\n var arenaid = req.params.arenaid;\n Arena.findOne({ _id: arenaid }, function (err, arena) {\n if (err) {\n return res.status(500).json({ error: err.message });\n }\n if (!arena) {\n return res.status(400).json({ error: 'the arena is not found' });\n }\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changes the state of playerCreatureId and creatureObj | toggleCreatureSelect(id, creatureObj) {
this.setState({
playerCreatureId: id,
creatureObj: creatureObj
});
} | [
"function controllerSetStatus(creatureId, status){\n\tvar creature = currentBattle.getCreature(creatureId); \n\n\tif(creature.status == status){\n\t\treturn; \n\t}\n\n\tvar command = new SetCreatureStatusCommand(currentBattle.getCreature(creatureId), status); \n\texecuteCommand(command);\n\n\tif(this.currentBattle.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getCardImageTag() Maak de image tag af met een kaart op basis van de kaartnummer Een kaartnummer loopt van 0 t/m 15 | function getCardImageTag(card_index)
{
/*
Onderstaande opdracht levert bijvoorbeeld het volgende op als card_index gelijk is 1
en op cards[1] staat het afbeeldingsnummer 8:
<img class="play-card-img" src="img/8.jpg" />
*/
return '<img class="play-card-img" src="img/' + cards[card_... | [
"function getCardImage( player, n )\n\t{\n\tvar\tv;\n\tn = player * 12 + n;\n\tv = getItem( \"card\" + n, \"pic\" + n );\n\treturn v;\n\t}",
"function showcard(no) {\r\n var kind = card.kind(no);\r\n var number = card.no(no);\r\n var img = kind + number;\r\n}",
"getImageNameForTag(tag, length) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fitToPage() function Changes the size of the 'textContainer' div to be slightly smaller than the page. | function fitToPage(){
$('#textContainer').height($(window).height() - ($('#toolBar').height()*2) - 20);
} | [
"function fitText($container) {\n // pixels available for text\n const availHeight = $(window).height() - $container.position().top;\n const resultHeight = $container.height();\n\n if (resultHeight > availHeight) {\n const fontSize = (availHeight / resultHeight) * parseFloat($(\".result-area\").css(\"font-si... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorts an array of results which have scores, ordering them in descending order of score. | function sortResults(results) {
results.sort(compareResultScores);
} | [
"sortResultsByScore() {\n this.data.sort((a, b) => parseInt(b.score) - parseInt(a.score));\n }",
"function sortScores() {\n scoresArray.sort(function (a, b) {\n return b.score - a.score;\n });\n scoresArray = scoresArray.slice(0,10);\n}",
"function sortByScoreDown() {\n arrayLivros.sort((a, b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Concatenates and uglifies JS files to all.js | function compileToMinifiedJS() {
return src([srcFiles.pathJS])
.pipe(concat("all.js"))
.pipe(uglify())
.pipe(dest(destFolders.minified));
} | [
"function jsTask() {\n return src(files.jsPath)\n .pipe(concat(\"all.js\"))\n .pipe(uglify())\n .pipe(dest(\"dist\"));\n}",
"function uglifyScripts(){\n var uglified = uglify.minify(getScripts());\n fs.writeFile(path.join(__dirname, '../', 'preload/scripts.js'), uglified.code, function (err){\n if(er... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
and a target number (num). It should return pairs of indices whose elements multiply to `num`. No pair should appear twice in the result. Use only `while` loops. No `for` loops. Examples: pairProduct([1,2,3,4,5], 4); //=> [ [ 0, 3 ] ] pairProduct([1,2,3,4,5], 8); //=> [ [ 1, 3 ] ] pairProduct([1, 2, 3, 12, 8], 24); //=... | function pairProduct(arr, num)
{
var multiples = [];
for(var i = 0; i<= arr.length - 1; i++)
{
var outerNum = arr[i];
for(var j = i + 1; j<= arr.length - 1; j++)
{
var innerNum = arr[j];
if(outerNum * innerNum === num)
{
multiples.push([i,j]);
}
}
}
return multiples;
} | [
"function product(numbers){\n //calculate product of array\n\tfor(var i = 0; i < numbers.length; i++){\n //return product;\n\t numbers[i] * numbers[i];\n\t}\n}",
"function findProduct(arr) {\n const sumWithoutNumAtIndex = currArr => currArr.reduce((acc, n) => acc * n)\n const removeNumAtIndex = n => arr.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find output DOM associated to the DOM element passed as parameter | function findOutputForSlider(element) {
var idVal = element.id;
var outputs = document.getElementsByTagName('output');
for (var i = 0; i < outputs.length; i++) {
if (outputs[i].htmlFor == idVal)
return outputs[i];
}
} | [
"function findOutputForSlider(element) {\n var idVal = element.id;\n outputs = document.getElementsByTagName('output');\n for (var i = 0; i < outputs.length; i++) {\n if (outputs[i].htmlFor == idVal)\n return outputs[i];\n }\n }",
"function findOutputForSlider(element) {\n var idVal = element.id;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the current platform. | function platform() {
return os.platform();
} | [
"function getPlatform() {\n\t return lang_1.isPresent(_platform) && !_platform.disposed ? _platform : null;\n\t}",
"function getPlatform() {\n return platforms[getPlatformName()];\n}",
"function getPlatform() {\n return isPresent(_platform) && !_platform.disposed ? _platform : null;\n }",
"fun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Track the position of mouse cursor | function trackPosition(e) {
mouse.x = e.pageX;
mouse.y = e.pageY;
} | [
"function CursorTrack() {}",
"function trackCursorMove(e){\r\n //console.log(e);\r\n if(e.clientX > (boardElement.clientWidth) || e.clientY >(boardElement.clientHeight)){\r\n \r\n } else{\r\n cursor.setAttribute(\"style\", \"top: \"+(e.clientY-50)+\"px; left: \"+(e.clientX-50)+\"px;\")\r\n }\r\n\r\n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders the AWS CloudFormation properties of an `AWS::Serverless::Function.AlexaSkillEvent` resource | function cfnFunctionAlexaSkillEventPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnFunction_AlexaSkillEventPropertyValidator(properties).assertSuccess();
return {
Variables: cdk.hashMapper(cdk.stringToCloudFormation)(properties.variables)... | [
"function overSkill0() {\r\n\tget(\"tooltip-display\").style.display = \"block\";\r\n\tget(\"tooltip-text\").innerHTML = skillsDescArray[0]\r\n}",
"renderProperties(x) { return ui.divText(`Properties for ${x.name}`); }",
"function CfnFunction_AlexaSkillEventPropertyValidator(properties) {\n if (!cdk.canInspe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an error to be thrown when there is no row definitions present in the content. | function getTableMissingRowDefsError() {
return Error('Missing definitions for header, footer, and row; ' + 'cannot determine which columns should be rendered.');
} | [
"function getTableMissingRowDefsError() {\n return Error('Missing definitions for header, footer, and row; ' +\n 'cannot determine which columns should be rendered.');\n}",
"function getTableMissingMatchingRowDefError(data) {\n return Error(\"Could not find a matching row definition for the\" + \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CheckboxWidget :: Boolean Create an input widget with a single checkbox. | function CheckboxWidget(initVal) {
InputWidget.apply(this,[INPUT({type:'checkbox','checked':(initVal ? true : false)})]);
} | [
"function BoolWidget(id, value){\n constructor_for(BoolWidget, this);\n this.jel = $('<input>');\n this.jel.prop('type', 'checkbox');\n this.jel.prop('checked', value);\n this.jel.prop('id', id);\n this.jel.prop('name', id);\n}",
"function AntObject_FieldInput_Bool(fieldCls, con, options)\r\n{\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the original type of a method. This is only used for prototypical methods defined in Files | getOriginalType () {
if (!this.originalType) {
this.originalType = this.getDoc().originalType
}
return this.originalType
} | [
"function _getMethodType(obj, name) {\n if (obj === void 0) return void 0;\n if (obj == null) return void 0;\n let sigObj = obj.__proto__.constructor[_methodSig];\n if (sigObj === void 0) return void 0;\n let parts = sigObj[name];\n if (parts === void 0) return void 0;\n return functionType.app... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
refresh the mcl count | function refreshMCLCount() {
NonMutantCellLineMCLCountAPI.search(vm.results[vm.selectedIndex].cellLineKey, function(data) {
vm.mcl_count = data.total_count;
});
} | [
"function refreshTotalCount() {\n NonMutantCellLineTotalCountAPI.get(function(data){\n vm.total_count = data.total_count;\n });\n }",
"function refreshTotalCount() {\n MutantCellLineTotalCountAPI.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tokenizes text into (auto)completion phrases. Removes first word, second word, etc. | tokenize(text) {
text = text.toLowerCase();
const phrases = [ text ];
let matches = text.match(/\s+/);
let i = -1;
if (matches && matches[0]) {
i = matches.index + matches[0].length;
}
let ctr = 0;
while (i !== -1 && ctr < 4) { // insert 4 more phrases
text = text.substring(... | [
"complete(text) {\n //@TODO\n\tlet suggestionlist = new Array();\n\tlet lastchar = text.substr(text.length-1);\n\tlet reg1 = new RegExp(/^[a-zA-Z]/);\n if(!reg1.test(lastchar)){\n return [''];\n } \n\telse{\n\tlet comp = text.split(/\\s+/).map((w) => normalize(w)); // t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert pixels back to dips | function toDips(px) {
return px / react_native_1.PixelRatio.get();
} | [
"function toDips(px) {\n return px / PixelRatio.get();\n}",
"function toDips(px) {\n\t return px / PixelRatio.get();\n\t}",
"function getPixels(pixel, dx, dy, imgWidth, imgHeight){\n let res = [];\n for(let h = dy; h < dy + blockHeight; h++){\n\tres = res.concat(pixel.slice(h*imgWidth+dx, h*imgWidth+(dx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes a given array and grows its values (starting with the smallest) until the total reaches a given limit | function growValuesToMatch(values, limit) {
var totalSize = 0;
var lowValue = -1;
for (i = 0; i < values.length; i++) {
totalSize += values[i];
if (values[i] < lowValue || lowValue == -1) {
lowValue = values[i];
}
}
while (tota... | [
"function arrayChange(inputArray) {\n let steps = 0;\n \n for (let i = 0; i < inputArray.length - 1; i++) {\n while (inputArray[i] >= inputArray[i + 1]) {\n inputArray[i+1] += 1;\n steps += 1;\n }\n }\n return steps;\n}",
"function increaseArray(array, max) {\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getResDays() gets the response array in DayAPI | getResDays() {
return this.response;
} | [
"getDays() {\n return fetch(this.baseUrl).then(res => res.json())\n }",
"function getAllDays() {\n for (var x = 0; x < self.dates.length; x++) {\n for (var z in self.dates[x]) {\n self.allDays.push(self.dates[x][z]);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To configure form for different data sources according to MODE variable. Arguments: Any number of Mode and Div ID pairs Sample Call: SP_ConfigureDataSource(SUPPLIERMODE,"div_SUPPLIER_MCD","div_SUPPLIER_EDS","div_SUPPLIER_MCSM"); | function SP_ConfigureDataSource()
{
if(arguments.length > 1)
{
var sMODE = arguments[0].toLowerCase();
for(i=1; i<arguments.length; i++)
{
var container = document.getElementById(arguments[i]);
if(container != null)
{
if(container.id.toLowerCase().indexOf(sMODE) > 0)
{
SP_RemoveClass(conta... | [
"function SP_SetModeBasedConfigs()\n{\n\tif(arguments.length >= 4)\n\t{\n\t\tvar MODE = arguments[0];\n\t\tvar mainContainer = document.getElementById(arguments[1]);\n\t\tvar launchButtonContainer = document.getElementById(arguments[2]);\n\t\tvar oRefField = document.getElementById(arguments[3]);\n\t\tif (arguments... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
start new switch for multichar search for two or more chars then look to see if it matches any keywork listed bellow | function amIMultiChar(forward, newToken, inputText){
tempVar = '';
state = 0;
var runMultiCheck = true;
while (runMultiCheck){
switch(state){
case 0:
if((inputText[forward]).search(T_char) != -1){
tempVar += inputText[forward];
forward++;
state = 1;
break;
}//closes if
else{
... | [
"checkLetter(keyClicked) {\r\n if (this.phrase.includes(keyClicked)) {\r\n console.log('Yeah bitch');\r\n return true;\r\n } else {\r\n console.log('No Bitch');\r\n return false;\r\n }\r\n }",
"notGuessed (letter) {\r\n let keys = keyboard.children;\r\n for (let... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the MPS AST according to the incoming MPS edit | handleMpsEdit(data, updateParsafix, callback)
{
var nodeId = '';
console.log("Incoming MPS edit: ", JSON.stringify(data));
//The MPS edit gets triggered earlier, so we wait for that (not ideal)
setTimeout(() => {
var opType = data["opType"];
switch ... | [
"function mutate() {\n\tvar editorContent = editor.getValue();\n\tvar newContent;\n\n\tTokens = [];\n\ttry {\n\tINIT.lex(editorContent)\n\t} catch(e) {console.log(e);} \n\n\tpickMutatableTokenAndMutateIt(Tokens);\n\tnewContent = emit(Tokens);\n\n\teditor.setValue(newContent);\n}",
"function updateNodeData() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(required) should fetch has precedence over the value returned by local in determining whether remote should be called in this particular example if the value is present locally it would return but still fire off the remote request (optional) | shouldFetch(state) {
return true
} | [
"fetchLocalPlaces() {\n let endpoint = 'data/places.json';\n if (debugWithErrorLocal) {\n // Ensure a failed fetch by obstructing the url\n endpoint += 'error';\n }\n const headers = {\n Accept: 'application/json',\n 'Content-Type': 'application/json'\n };\n fetch(endpoint, {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets if the provided structure is a EnumMemberStructure. | static isEnumMember(structure) {
return structure.kind === StructureKind_1.StructureKind.EnumMember;
} | [
"static isEnum(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.Enum;\r\n }",
"static isEnumMember(node) {\r\n return node.getKind() === typescript_1.SyntaxKind.EnumMember;\r\n }",
"static isTypeElementMembered(structure) {\r\n return structure.kind === Structu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load notification list modal | function loadNotificationListModal(){
$('#modal-body-contect').fadeOut('1000', function() {
$('#modal-body-contect').load('notifications/notification-list', { _csrf: csrf_token });
}).fadeIn('1000');
} | [
"function loadNotificationModal() {\n if (document.getElementById(\"highlightNotification\") === null)\n appendToBase(templates.notificationDiv);\n }",
"function processNotifications(notifList) {\n let html = \"\";\n let notification = null;\n if (notifList.hasNotifications) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo per ottenere il reverse geocoding a partire da latitudine e logitudine | function reverseGeocoding(latitude, longitude) {
$.get('https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=' + latitude + '&longitude=' + longitude + '&localityLanguage=en', function(response) {
generateGPSInfo(response);
});
} | [
"function reverse(lat,lon,key,language){\n var query = lat + '%2C' + lon;\n return geocode(query,'reverse',key,language);\n}",
"function OpenStreetMapNominatimGeocoder() {\n}",
"function geoCode(){\n\t/* Initialise Reverse Geocode API Client */\n var reverseGeocoder=new BDCReverseGeocode();\n\t/* You c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a cell model from optional cell content. | function CellModel(options) {
var _this = _super.call(this, { modelDB: options.modelDB }) || this;
/**
* A signal emitted when the state of the model changes.
*/
_this.contentChanged = new signaling_1.Signal(_this);
/**
* A signal emitted when a model state cha... | [
"function CellModel(cell) {\n this._metadata = Object.create(null);\n this._cursors = Object.create(null);\n this._source = '';\n if (!cell) {\n return;\n }\n this.source = cell.source;\n var metadata = utils.copy(cell.metadata);\n if (this.type !==... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Plays the current video. | function playCurrentVideo() {
isPlaying = true;
video.playVideo();
} | [
"playVideo() {\n\t\tthis.player.play();\n\t}",
"play() {\n\t\tif (this._videoRequested === false) this.loadVideo()\n\t\tthis._video.play()\n\t}",
"function videoPlay () { \n player.playVideo()\n }",
"play() {\n this.video.play();\n }",
"play() {\r\n // console.log('play:', this.name)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the menu from the controller | initMenu() {
this.on('menu-selected', event => {
// Focus on search bar if in most popular tab (labeled All)
if (event.choice === 'most-popular') {
this.focusSearchBar();
}
this.currentlySelected = event.choice;
}, this);
// call init menu from sdk
initNavbar(this.menu)... | [
"function MenuController() {\n\t\tthis.menuItems = new Array();\n\t\tthis.log = LogUtil.createLogger(\"MenuController\");\n\t}",
"function initMenu() {\n var ul;\n\n ul = addMenu();\n addWatchMenu(ul);\n addUnwatchMenu(ul);\n addSettingsMenu(ul);\n addVersionMenu(ul);\n}",
"function initMenu() {\n let ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display where the probe is located relative to the transcript | function displayLocation(name){
$( ".probe" ).remove();
var spliceVariants= $(".SV").map(function() {
return $(this).val();
}).get();
var longestSeq = spliceVariants.sort(function (a, b) { return b.length - a.length; })[0];
spliceVariants= $(".SV").map(function() {
return $(this).val();
}).get();
var... | [
"getProbePosition(){\n return this.signals[0].getProbePosition() ;\n }",
"function printLocation() {\n console.log(`you are at this postiosn ${position}`);\n }",
"function displayProbeInfo() {\n // feature is an XML DOM document which holds the feature data\n\n var object_html = \"<div sty... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write the current configuration in CSV format with a row layout of [intersection name][zone][direction][entry, entry, entry, entry, entry, entry]. Automatically initiate a download for the completed CSV contents. | exportConfigToCSV() {
var headers = ["configuration", "zone", "direction", "left lanes", "through lanes", "right lanes", "shared left", "shared right", "channelized right"];
var csvContent = "data:text/csv;charset=utf-8,";
// For each header string in the headers array, add it to the CSV co... | [
"exportToCSV() {\n\t\tvar element = document.createElement('a');\n\n\t\tvar data = 'ID,Eval,Date,HB,PB,Density,Type,Aliquots,Initial storage conditions,Additives,Other treatments,Foil wrapped,Unrestricted consent,Notes\\n';\n\n\t\tfor (var i = 0; i < this.state.samples.length; i++) {\n\n\t\t\tfor (var key in this.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========================================================== Read 40 lines of history and send to Master window ========================================================== | function readHistMaster(item) {
if (item.window) {
for (var id = 1; id <= 3; id++) {
let port_id = "port" + id;
if (item[port_id].state === "running") {
readLastLine
.read(item[port_id].simulator_points, 35)
.then(function (lines) {
item.window.webContents.send... | [
"function load_history() {\n var success = function(data) {\n var lines = \"\";\n data = jQuery.parseJSON(data);\n for (var i = 0; i < data.length; i++ ) {\n lines = lines + data[i]['login'] + \": \" + data[i]['message'] + \"\\n\";\n }\n $(\"textarea#chat_area\").val... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
var _in = "fe80:0000:0000:0000:0204:61ff:fe9d:f156"; var _out = IPv6.best(_in); var _expected = "fe80::204:61ff:fe9d:f156"; console.log(_in, _out, _expected, _out === _expected); | function best(address) {
// based on:
// Javascript to test an IPv6 address for proper format, and to
// present the "best text representation" according to IETF Draft RFC at
// http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04
// 8 Feb 2010 Rich Brown, Dartware, LLC
// Plea... | [
"function ipv6() {\n function checkLetter(c) {\n return (c >= 'g' && c <= 'z') || (c >= 'G' && c <= 'Z');\n }\n\n let countRow = 0;\n let countCol = 0;\n\n for (let i = 0; i < ip.length; i++) {\n if (ip[i] == '.' || checkLetter(ip[i])) return 'Neither';\n\n while (ip[i] != ':' && i < i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the width of the div with the Class called Timeline. | function calculateTimelineWidth() {
var selectTimelineWidth = document.querySelector('.Timeline');
timelineWidth = selectTimelineWidth.clientWidth;
return timelineWidth;
} | [
"function scaleTimelineWidth() {\n $('.day').css('width', unitWidth);\n $('.month').each((index, item) => {\n $(item).css('width', unitWidth * $(item).data('days'));\n })\n }",
"styleTimeline() {\n this.timeline.style.position = 'absolute';\n\n if (this.props.type === 'hor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compare CSS lines after normalizing whitespace on each line | function checkStyles(returnedCss, expectedCss) {
const retArr = returnedCss.split('\n');
const expectArr = expectedCss.split('\n');
retArr.forEach((retLine, idx) => {
expect(retLine.trim()).toEqual(expectArr[idx].trim());
});
} | [
"isPrecededByWhitespaceOnly() {\n var lineBeforeCurrent = this.text.substring(this.index - this.column + 1, this.index);\n return (/^\\s*$/.test(lineBeforeCurrent)\n );\n }",
"reduceSpaces(decl) {\n let stop = false\n this.prefixes.group(decl).up(() => {\n stop = true\n return true\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a user mouses over an agenda item | function myAgendaMouseoverHandler(eventObj) {
var agendaId = eventObj.data.agendaId;
var agendaItem = jfcalplugin.getAgendaItemById("#mycal", agendaId);
//alert("You moused over agenda item " + agendaItem.title + " at location (X=" + eventObj.pageX + ", Y=" + eventObj.pageY + ")");
} | [
"function myAgendaMouseoverHandler(eventObj){\n\t\tvar agendaId = eventObj.data.agendaId;\n\t\tvar agendaItem = jfcalplugin.getAgendaItemById(\"#mycal\",agendaId);\n\t\t//alert(\"You moused over agenda item \" + agendaItem.title + \" at location (X=\" + eventObj.pageX + \", Y=\" + eventObj.pageY + \")\");\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If is frist or last child of root, insert empty line before or after HR | _insertEmptyLineIfNeed() {
const editorContentBody = this.wwe.getBody();
const { firstChild, lastChild } = editorContentBody;
if (firstChild && firstChild.nodeName === 'HR') {
editorContentBody.insertBefore(domUtils.createEmptyLine(), firstChild);
} else if (lastChild && lastChild.nodeName === 'H... | [
"leafFallback(dom) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"));\n }",
"function addBlankLine(parent){\n\t/*\n\t * TODO:\n\t * \n\t * This function uses an empty HTML paragraph tag (p) to add the blank line.\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the official Webpack config for loading Expo web apps. | async function createWebpackConfigAsync(env = {}, argv = {}) {
if (!env.projectRoot) {
env.projectRoot = (0, paths_1.getPossibleProjectRoot)();
}
if (!env.platform) {
// @ts-ignore
env.platform = process.env.EXPO_WEBPACK_PLATFORM;
}
const environment = (0, env_1.validateEnvir... | [
"configureWebpack() {\n return {\n plugins: [\n new webpack.DefinePlugin(\n plugins.reduce((current, plugin) => {\n const envVar = `PUB_${plugin.pub.toUpperCase()}`;\n return {\n ...current,\n [envVar]: JSON.stringify(process.en... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grid Functionality TODO bug when you set origin in target and then set target the origin disappears | function setOrigin(x, y) {
var id = y + "." + x;
if (grid.origin == null) {
grid.origin = id;
changeCellColor(x, y, "green");
} else {
var oldOrigin = getNodeFromId(grid.origin);
changeCellColor(oldOrigin.x, oldOrigin.y, "white");
grid.origin = id;
changeCellColor(x, y, "green");
}
} | [
"function ObjectThatUnderstandSetGrid() { }",
"setTarget(row, column, color, shape) {\n this.grid[row][column].setTargetOnCell(color, shape);\n this.targets.push({ row: row, column: column, color: color, shape: shape });\n }",
"moveGrid(movement)\n {\n this.viewer.targetPos.add(new Vector(movem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert values of data to percentage | function getPercentage(datatoswitch) {
$.each(datatoswitch.datasets, function (i, dataset) {
sum = dataset.data.reduce(
function (total, num) {
return total + num
}
, 0);
newArray = [];
$.each(dataset.data, function (i, value) {
... | [
"function valueToPercent(value,min,max){return(value-min)*100/(max-min);}",
"function scaleDataPercent(data){\n var sum = 0;\n for(var d in data){\n sum += data[d].percent;\n }\n for(var d in data){\n data[d].percent = parseInt(((data[d].percent / sum) * 100).toFixed(2));\n }\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for auto complete music director/// Starts the AJAX request. | function searchMusic() {
if (searchReq.readyState == 4 || searchReq.readyState == 0) {
var str = escape(document.getElementById('music').value);
searchReq.open("GET", 'autocomplete/getmusic.php?search=' + str, true);
searchReq.onreadystatechange = handleSearchMusic;
searchReq.send(null);
}
} | [
"function yt_search() {\n $.ajax({\n url: '/search_song',\n data: JSON.stringify({ query : $('#search_query').val()}),\n type: 'POST',\n beforeSend : function() {\n $('#my_container').html('');\n $('#loading_songs').show();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ne is a not equal operator against a field | ne(value) {
return this.create(ComparisonJSON.Ne, value);
} | [
"static ne(...args) { return this.__query().ne(...args); }",
"$not(a, b) {\n return !doQueryOp(a, b);\n }",
"$not(a, b) {\n return !this.doQueryOp(a, b);\n }",
"function test_Not_Eq() {\n asyncTestCase.waitForAsync('test_Not_Eq');\n\n var employee = db.getSchema().getEmployee();\n var e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interpolates missing beats in the Agent's beat track | fillBeats() {
let prevBeat, nextBeat, currentInterval, beats;
prevBeat = 0;
if (this.events.length > 2) {
prevBeat = this.events[0];
}
for (let i = 0; i < this.events.length; i++) {
nextBeat = this.events[i];
beats = Math.round((nextBeat - prevBeat) / this.beatInterval - 0.01);
... | [
"extendToBeat () {\n return this.extendToMultipleOf(this.time.beat)\n }",
"applyBeatEffect(beat) {\n let syData = this._syData.toLowerCase();\n if (syData === 'f') {\n beat.fadeIn = true;\n this._sy = this.newSy();\n return true;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When mouse leaves the box (Mouse Desktop) | function box_mouseleaveHandler(event) {
closeBox(this);
} | [
"function on_mouse_leave() {}",
"function mouseLeave(event) {\r\n\r\n lastMousePosition.inWindow = false;\r\n}",
"_afterMouseLeaveHook() { }",
"mouseLeave() {\n this.sendAction();\n }",
"function mouseLeave()\n\t{\n\t\tgraph.mouseOut();\n\t}",
"function onMouseLeave() {\n LxNotificationServi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a generator function, return the standard API object that executes the generator and calls the callbacks. | function makeFunctionAPI(genFn) {
const fns = {
sync: function(...args) {
return evaluateSync(genFn.apply(this, args));
},
async: function(...args) {
return new Promise((resolve, reject) => {
evaluateAsync(genFn.apply(this, args), resolve, reject);
});
},
errbac... | [
"function makeFunctionAPI(genFn) {\n var fns = {\n sync: function sync() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return evaluateSync(genFn.apply(this, args));\n },\n async: function async()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the real status of Jenkins. A trick is necessary as sometimes jenkins returns a null status when building but set a building field to true. | static getJenkinsStatus(currentStatus, building) {
return building
? "BUILDING"
: currentStatus
? currentStatus
: "UNKNOWN";
} | [
"getStatus() {\n return this.props.building ? \"BUILDING\" :\n this.props.status != null ? this.props.status :\n \"UNKNOWN\";\n }",
"static get buildStatus() {\n return events.EventField.fromPath('$.detail.build-status');\n }",
"function getStatus() {\n return status;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wordpress Galleries to Sliders Create the markup for the slider from the gallery shortcode take all the images and insert them in the .gallery | function sliderMarkupGallery($gallery){
var $old_gallery = $gallery,
gallery_data = $gallery.data(),
$images = $old_gallery.find('img'),
$new_gallery = $('<div class="pixslider js-pixslider">');
$images.prependTo($new_gallery).addClass('rsImg');
//add the data attributes
$.each(gallery_data, function (key, ... | [
"function sliderMarkupGallery($gallery) {\n var $old_gallery = $gallery,\n gallery_data = $gallery.data(),\n $images = $old_gallery.find('img'),\n $new_gallery = $('<div class=\"pixslider js-pixslider\">');\n\n $images.prependTo($new_gallery).addClass('rsImg');\n\n //add the data attri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Toggles the visibility of a table category in all tables in a page | function toggleGlobal(checkbox, selected, columns) {
var display = checkbox.checked ? '' : 'none';
document.querySelectorAll("div.table-tabs").forEach(function(t) {
var id = t.parentElement.getAttribute("id");
var selectedClass = id + "-tab" + selected;
// if selected is empty string it ... | [
"function toggleVisibleCategories(){\n\n // the table with the visibility widgets has the id show-by-table and each\n // of rows has either a checkbox and a label or a slider and a label (see\n // the UI for more details). What we want are only the rows with checkboxes\n // and labels, thus we iterate o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the ID of the body element based on device type | function setBodyDeviceId () {
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
document.body.id = "iPhone";
} else {
document.body.id = "iPad";
}
} | [
"function setBodyClass(device){\n var body = document.getElementsByTagName(\"BODY\")[0];\n body.className = device;\n}",
"function _setOSClassNameToBody() {\n // Set a body attribute for detecting and styling according the OS\n var osName = '';\n if (navigator.appVersion.ind... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the css classes for the header cell directive | cellClass(){
var cls = {
'sortable': this.column.sortable,
'resizable': this.column.resizable
};
if(this.column.heaerClassName){
cls[this.column.headerClassName] = true;
}
return cls;
} | [
"cellClass(){\n var cls = {\n 'sortable': this.column.sortable,\n 'resizable': this.column.resizable\n };\n\n if(this.column.headerClassName){\n cls[this.column.headerClassName] = true;\n }\n\n return cls;\n }",
"cellClass() {\n const cls = {\n sortable: this.column.sortable... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CLEAR COMPELETED TASKS FROM THE DOM | function clearComTasks() {
//CLEAR TASKS FROM THE DOM
while (completed.firstChild) {
completed.removeChild(completed.firstChild);
}
//CLEAR TASKS FROM LOCAL STORAGE
clearAllLS();
} | [
"function clearTasks() {\r\n //CLEAR TASKS FROM THE DOM\r\n while (taskList.firstChild) {\r\n taskList.removeChild(taskList.firstChild);\r\n }\r\n //CLEAR TASKS FROM LOCAL STORAGE\r\n clearAllLS();\r\n}",
"function clearTasks(){\n $('#tasks-things-todo .tasks-content').empty();\n $('#t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new symlink to the bootstrap generator | function linkBootstrap() {
fs.symlink(bootstrap, path.resolve(yeoman, 'bootstrap-less'), 'dir', function(err) {
if (err) return console.log('symlink error:', err);
return console.log('Successfully installed yeoman-bootstrap in', bootstrap,
' and created a symlink in', yeoman);
});
} | [
"function createRootSymLink() {\n var li1 = process.argv[1].lastIndexOf('\\\\'), li2 = process.argv[1].lastIndexOf('/');\n if (li2 > li1) { li1 = li2; }\n var AppPath = process.argv[1].substring(0,li1);\n var p1 = resolve(AppPath + \"/\" + nativescriptAppPath);\n var p2 = resolve(AppPath + \"/\" + we... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set this.state.breaks[dataDay] at the correct bit to this.state.addBreak | function updateBreaks (dataDay, dataTime) {
let mask = 1 << dataTime
let newBreaks = [...this.state.breaks]
if (this.state.addBreak) newBreaks[dataDay] |= mask
else newBreaks[dataDay] &= ~mask
// setState to rerender
this.setState({ breaks: newBrea... | [
"addDrinks(drinks, dayName) {\n drinks = parseInt(drinks);\n let updatedDay = { ...this.state.day, [dayName]: drinks};\n this.setState({ day: updatedDay });\n this.drinksLeftFill(updatedDay);\n }",
"handleChangeHours(event, startOrFinish, day) {\n // Get the object for current hours before the upd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test whether an output is from display data. | function isDisplayData(output) {
return output.output_type === 'display_data';
} | [
"function isDisplayData(d) {\n return d.output_type === 'display_data';\n }",
"function isDisplayUpdate(output) {\n return output.output_type === 'update_display_data';\n }",
"function checkDisplay( d ) {\n if ( isDisplay( d ) ) {\n debug( 'display', d )\n } else {\n debug( 'invalid ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
isAlphabetic (STRING s [, BOOLEAN emptyOK]) Returns true if string s is English letters (A .. Z, a..z) only. For explanation of optional argument emptyOK, see comments of function isInteger. NOTE: Need i18n version to support European characters. This could be tricky due to different character sets and orderings for va... | function isAlphabetic (s)
{ var i;
if (isEmpty(s))
if (isAlphabetic.arguments.length == 1) return defaultEmptyOK;
else return (isAlphabetic.arguments[1] == true);
// Search through string's characters one by one
// until we find a non-alphabetic character.
// When we do, ret... | [
"function isAlphabetic(s) {\r\n var i;\r\n if (isEmpty(s))\r\n if (isAlphabetic.arguments.length === 1) return defaultEmptyOK;\r\n else return (isAlphabetic.arguments[1] === true);\r\n\r\n // Search through string's characters one by one\r\n // until we find a non-alphabetic character.\r\n // When we do,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for TopPeerCategoryPeers: Instance of TopPeerCategoryPeers | constructor(args) {
super();
args = args || {}
this.CONSTRUCTOR_ID = 0xfb834291;
this.SUBCLASS_OF_ID = 0x4aec930;
this.category = args.category;
this.count = args.count;
this.peers = args.peers;
} | [
"createPeers() {\n for (let cell in this.units) {\n if (this.units.hasOwnProperty(cell)) {\n for (let i = 0; i < this.units[cell].length; i++) {\n if (!this.peers[cell]) {\n this.peers[cell] = this.units[cell][i].filter(\n peer => peer !== `${cell}`\n )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the pages item links. | createPageLinks()
{
var pages = [];
for(var i = 1; i <= this.totalPages; i++) {
var pageItem = document.createElement('li');
var link = document.createElement('a');
pageItem.className = (this.current == i) ? 'page-item active' : 'page-item';
link.className = 'page-link';
link.setAttribute... | [
"function setPageLinks() {\n\n\t//clears Button div \n\t$(buttonsUl).empty();\n\n\tgetPageCount();\n\n\tfor (var i = 1; i <= pageCount; i++) {\n let buttonLi = document.createElement('li');\n let buttonLink = document.createElement('a');\n buttonLink.href = '#';\n buttonLink.textContent = i;\n\n //Ap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check Password length greater than minimum | passwordLength(password, min) {
return password.length >= min;
} | [
"checkLength(password)\n {\n var minimumLength = 8; //Change this variable to change password length requirement\n return password.length >= minimumLength;\n }",
"function checkPasswordLength(/*String*/ password, /*int*/ min, /*int*/ max){\n return password.length >= mi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1. Calls the topStories api using fetchTopStories method 2. Displays the loader 3. Sets the loader text appripriately | componentDidMount() {
var self = this;
this.props.toggleLoader(true);
this.props.setLoaderText('Please wait while we fetch the latest stories');
this.fetchTopStories();
} | [
"fetchTopStories(searchTerm,page){\n //this where it will show loading while fetch() loads data\n this.setState({isLoading: true});\n //fetch() is a new javascript method to make http request\n //previously we had to use XMLHttpRequest()\n //the response we get we convert to json ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate positions of rows and columns | function generatePositions() {
rows = [];
columns = [];
if (gridOption.enableRow) {
//use coordinate.y to generate rows
if (coordinate.y && coordinate.y.model.rotate == 90) {
coordinate.y.forEach(function(i,l... | [
"function rows_cols() {\n\n var j = Math.floor(Math.random() * 5)+1;\n\n return j;\n\n }",
"function generateCoordinates (){\n rowI = [Math.floor(Math.random() * 10)];\n columnI = [Math.floor(Math.random() * 10)];\n }",
"generateOffsets(arr) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uploads CSV into create deck form | function uploadCsv(){
$('#upload_csv_form').ajaxSubmit({dataType: 'json', success: csvToForm});
} | [
"function uploadCSVAction(){\n let url = '/uploadCSV';\n uploadButtonObj.disabled = true;\n msgDivObj.innerHTML = \"Uploading .....\";\n let csvFile = fileChooserObj.files[0];\n // FormData is a dictionary that allows key-value pairs to be put into one object\n let formData = new FormData;\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrives MailChimp list growth data and populates a Google Sheet | function mailchimpListGrowth() {
// URL and params for the Mailchimp API
var root = 'https://us11.api.mailchimp.com/3.0/';
var endpoint = 'lists/' + LIST_ID + '/growth-history?count=100';
var params = {
'method': 'GET',
'muteHttpExceptions': true,
'headers': {
'Authorization': 'apikey ' ... | [
"function getCoaches() {\n // get week num to obtain coach data\n //let ui = SpreadsheetApp.getUi();\n //let result = ui.prompt(\"Week # for this roster?\");\n\n //let offset = parseInt(result.getResponseText());\n\n let offset = 5;\n\n // attempt to open coach schedule\n let coachSheet = SpreadsheetApp.open... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merge rect box with another, return a new instance | merge(box) {
let x = Math.min(this.x, box.x);
let y = Math.min(this.y, box.y);
let width = Math.max(this.x + this.width, box.x + box.width) - x;
let height = Math.max(this.y + this.height, box.y + box.height) - y;
return new Box_Box(x, y, width, height);
} | [
"merge(box){const x=Math.min(this.x,box.x),y=Math.min(this.y,box.y),width=Math.max(this.x+this.width,box.x+box.width)-x,height=Math.max(this.y+this.height,box.y+box.height)-y;return new Box(x,y,width,height)}",
"merge(box) {\n const x = Math.min(this.x, box.x)\n const y = Math.min(this.y, box.y)\n const ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set up number total leng | function setNumberTotal(text) {
document.getElementById('__number-total').innerHTML = text.length
} | [
"function convertLength(len, buffer)\n\t\t\t{\n\t\t\t\t// basic length value\n\t\t\t\tconst baseValue = floorLog(len);\n\t\t\t\tvar remainder = len % baseValue;\n\t\t\t\tvar base = baseValue;\n\t\t\t\tvar dots = 0;\n\t\t\t\twhile(remainder && remainder >= base / 2)\n\t\t\t\t{\n\t\t\t\t\tbase = floorLog(remainder);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert the given content at the given position. | insert(pos, content) {
return this.replaceWith(pos, pos, content);
} | [
"insert(index: number, content: string) {\n if (typeof index !== 'number') {\n throw new Error(\n `cannot insert ${JSON.stringify(content)} at non-numeric index ${index}`\n );\n }\n this.log(\n 'INSERT',\n index,\n JSON.stringify(content),\n 'BEFORE',\n JSON.string... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts listening to various events if the editor represents a grammar that the plugin operators on. | subscribe() {
// We default to unsubscribing the events. This handles when a grammar
// changes from one we handle to one we don't.
this.unsubscribe();
// Figure out the current grammar of the editor. We also determine if
// it is the list of grammars we are listening to.
... | [
"initEventListners() {\n this.engine.getSession().selection.on('changeCursor', () => this.updateCursorLabels());\n\n this.engine.getSession().on('change', (e) => {\n // console.log(e);\n\n // Make sure the editor has content before allowing submissions\n this.allowCode... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(User)Group sharing modes: IGNORE: leave sharing asis REMOVE: remove all sharing FILTER: remove any reference to groups not listed MERGE: combine existing groups with those specified. If both exist, view/edit setting from config is used. OVERWRITE: add sharing from config file, ignoring what is there | function configureSharing() {
for (var objectType in metaData) {
//It not iterable or shareable, skip
if (!Array.isArray(metaData[objectType])) continue;
if (!shareable(objectType)) continue;
//For each object of objectType
for (var obj of metaData[objectType]) {
//Set sharing
setSharing(objectType,... | [
"async updateSharedGroups() {\n if (!this.isPrivate()) {\n return;\n }\n if (this.isMe()) {\n return;\n }\n const ourGroups = await window.ConversationController.getAllGroupsInvolvingId(\n // eslint-disable-next-line... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write a function which accepts two nonnegative arguments a and b and returns their sum if the sum has the same number of digits as a. If the sum has more digits than a, return b. | function returnSum(a, b) {
let sum = a + b;
let numDigitsA = a.toString().length;
let numDigitsSum = sum.toString().length;
return (numDigitsSum > numDigitsA) ? b : sum;
} | [
"function sumLimit(a, b){\n let a1 = \"\" + (a + b);\n let b1 = \"\" + a;\n if (a1.length == b1.length)\n return a+b;\n else\n return a;\n}",
"function sameDigits(a,b) {\n //solution here\n}",
"function sumTwoDigits(a) {\r\n var y = parseInt (a/10); \r\n var z = a%10;\r\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function for skipping audio through clicking on the bar | function skip(ev) {
var mouseX = ev.pageX - playBarContainer.offsetLeft; //0 from start point of bar
var barWidth = window.getComputedStyle(playBarContainer).getPropertyValue('width') //takes value of width of bar
barWidth = parseFloat(barWidth.substr(0, barWidth.length - 2)); //chan... | [
"skipMusic () {\r\n this.audio.pause()\r\n this.next()\r\n }",
"function skipSong() {\n console.log(\"skip\");\n endSong();\n}",
"function skipLoadingMusic()\n{\n\tCB_console(\"Skipping loading music...\");\n\tCB_GEM.data.musicEnabled = false;\n\tCB_Elements.hideById(\"music_loader_checke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove previously created rule to allow connection on specific port | function resetFirewallToPreviousState(port) {
if (process.platform != 'win32') {
return
}
const BLOCK_CONNECTION_ON_PORT_COMMAND = `netsh advfirewall firewall delete rule name="Pastty" dir=in protocol=TCP localport=${port}`
cmd.runCommand(BLOCK_CONNECTION_ON_PORT_COMMAND)
} | [
"function cutNetwork (port) {\n portRuleNum[port] = nextRuleNum\n runProgram ('sudo', 'ipfw', 'add ' + nextRuleNum++ + ' deny tcp from any to any ' + port)\n runProgram ('sudo', 'ipfw', 'add ' + nextRuleNum++ + ' deny tcp from any ' + port + ' to any')\n //TODO: confirm it worked (since sudo may not wor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
retrieve stored city searches | function searchCity(savedCity){
getCurrentWeather( savedCity);
getForecastWeather( savedCity);
} | [
"function runSavedCity(city) {\n search(city);\n}",
"function getCities(city, resultCallback) {\n var entry = $(\"#searchForm\").val();\n $(\"#searchForm\").val(\"\");\n $(\"#submit\").prop(\"disabled\", true);\n $.ajax({\n headers: {\n \"x-Zomato-API-Key\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The response from the REST call querying for providers using the search criteria Once we have the features, we still need to calcualte the distances to show how far away the provider is. | function queryFeatures(response)
{
var features = response.features;
searchResults = features;
//We only need to calculate the distances if there are search results,
//otherwise we can just show an error message in the search result box
if... | [
"function calculateDistances(features){\n \n //We have to use a beta service, because of CORS. Or we could set up a proxy\n var geometryService = new GeometryService(geometryServiceURL);\n \n var params = new ProjectParameters();\n params.geometries... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build the schedule object based on scheduled devices | calculateSchedule(scheduledDevices) {
const schedule = {};
for (let hour = 0; hour <= 23; hour++) {
const runningDevices = scheduledDevices.filter(each => each.includes(hour));
schedule[hour] = runningDevices.map(each => each.device.id);
}
return schedule;
... | [
"function genSchedule(day) {\n var startMins = 490; //8:10 AM\n var endMins = 1410; //11:30 PM\n for (var i = 0; i < ctrlThis.selectedActivities.length; i++) {\n var t = ctrlThis.selectedActivities[i].times[day].split('/')[0];\n if (t==\"-1:00\") contin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for parsing CSV files obtained from IANA Strips .INADDR and .IP6 from zones and comma delimiter, merges them into array by CSV rows Arguments: csv CSV obtained from IANA ipv4 bool, saying whether the csv is IPv4 CSV or IPv6 Returns: Array of parsed CSV values | function parseCSV(csv, ipv4)
{
//converting into array
var csvArray = CSVToArray(csv);
var DNSzones = [];
if (ipv4) //ipv4.csv
{
//cycle through first column of the CSV -> obtaining IP zones
//Starting with i = 1, skipping the CSV header
for (var i = 1; i < csvArray.length; i++)
{
... | [
"function parseCsv(csv, formatter) {\n\t// separate csv stream into its components\n\treturn csv.split(\"\\n\")\n\t\t.filter(function(line) {return line !== \"\"}) // exclude empty lines\n\t\t.map(function(line) {\n\t\t\tif (typeof formatter === \"undefined\") {\n\t\t\t\t// return array of strings\n\t\t\t\treturn ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
finction that controls the reel 3 spinning | function spin3(){
i3++;
if (i3>=numeberReel3){
coin[2].play();
clearInterval(reel3);
checkWin();
return null;
}
reelTile = document.getElementById("slot3");
if (reelTile.className=="s1"){
reelTile.className = "s0";
}
sound++;
if (sound==spin.length){
sound=0;
}
... | [
"function Spin() {\n wheel.AcclToRadsPerSec(Math.PI * 2, 3000, new ArcsinMapper_1.default());\n setTimeout(() => {\n console.log(\"slowing down\");\n //note this currently always decels to 0.\n wheel.AcclToRadsPerSec(0, 3000, new ArcsinMapper_1.default());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to get a input tensor for this model for an input, from periods of btc price | getInputTensor(candles) {
// get variations
let candleVariations = datatools.dataVariations(candles, this.maxVariancePerPeriod);
candleVariations = candleVariations.slice(candles.length - this.getNbInputPeriods());
let inputArray = [];
_.each(candleVariations, candleVariation =>... | [
"getInputTensor(candles) {\n let sizedCandles = candles.slice(candles.length - this.getNbInputPeriods());\n let prices = _.map(sizedCandles, c => c.close);\n return tf.tensor2d([prices], [1, prices.length], 'float32');\n }",
"function tensor(input) {\n let flat = [];\n for (let i = 0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
helper just to get desired client based on it number | function getClient(clientNum) {
switch (clientNum) {
case ROBOOT_1:
return robot1;
break;
case ROBOOT_2:
return robot2;
break;
case CAMERA:
return camera;
break;
case COMMAND_CENTER:
return commandCen... | [
"function getClient(id) {\n for (var i=0; i<clients.length; i++) {\n if (clients[i].client.id == id) {\n return i;\n }\n }\n}",
"getClient(id) {\n return this.clients.find(client => client.id === parseInt(id, 10));\n }",
"clientIdentifier(client, peerConnectionLog) {\n let constraints = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether `process.env.NODE_ENV` exists and equals `env`. | function isNodeEnv(env) {
return typeof process !== "undefined" && process.env && process.env.NODE_ENV === env;
} | [
"function isNodeEnv(env) {\r\n return (typeof process !== \"undefined\" &&\r\n process.env &&\r\n process.env.NODE_ENV === env);\r\n}",
"function isNodeEnv(env) {\n\t return typeof process !== \"undefined\" && process.env && process.env.NODE_ENV === env;\n\t}",
"function isNodeEnv(env) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
collect the selected filter item in Area | function getSelectedAreaFilterItems() {
let i = 0;
let selected = [];
$('#areaFilter input:checked').each(function () {
selected[i++] = $(this).val();
});
return selected;
} | [
"async function showAreaFilter() {\n const areas = await getAreasList();\n for (let a of areas) {\n generateFilterItemHTML(a, $(\"#areaFilter\"));\n }\n }",
"onFilterType() {\n this.lots = this.lots.filter(lot => lot.ticket.Type == TicketType[this.filterForm.get('TypeSelect').value]);\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filters the ballot items which are type OFFICE | ballot_filtered_unsupported_candidates () {
return this.ballot.map( item =>{
let is_office = item.kind_of_ballot_item === "OFFICE";
return is_office ? this.filtered_ballot_item(item) : item;
});
} | [
"filterInactive(item){\n return item.active === false;\n }",
"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 tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the sites/folder section according to the selected workflow. | function updateSitesFolderAssignedSection(workflowName)
{
$(".perc-sa-loading-warning-message-hidden").addClass("perc-sa-loading-warning-message").removeClass("perc-sa-loading-warning-message-hidden");
if (typeof(workflowName) === 'undefined')
{
workflowName =... | [
"updateFolder() {\n if (this['folder']) {\n this.options['parent'] = this['folder'];\n }\n }",
"function updateFolders () {\n const activeFolderID = helper.getActiveFolderId();\n const folders = document.getElementById(\"folders\");\n helper.removeAllChildren(folders);\n addFoldersFromList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adjust the window between first and second layer | function changeFirstLayerWindow(position){
// scroll to the proper section box in second layer
var offsetVal = windowStart1.invert(position);
$("#secLayerDiv").scrollTop(offsetVal);
thirdLayerPointer(offsetVal);
// move the window between 1 and 2 layer
d3.select("#box_1Id")
.attr("y", position);
d... | [
"function windowLayer2(){\n\t\twin2.append(\"g:line\")\n\t\t\t.attr(\"id\", \"upperLine_2Id\")\n\t\t\t.attr(\"x1\", 0)\n\t\t\t.attr(\"y1\", rectHeight_2/2)\n\t\t\t.attr(\"x2\", margin)\n\t\t\t.attr(\"y2\", 0)\n\t\t\t.attr(\"stroke\", strokeColor)\n\t\t\t.attr(\"stroke-width\", strokeWidth);\n\n\t\twin2.append(\"g:l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Esconder o layout quando passar o tempo nescessario | function esconderLayout(){
if(video.paused || video.ended){
return;
}
configFechar();
fVolume("fecharcaixa");
document.getElementById("player-baixo").style.opacity = 0;
document.getElementById("player-cima").style.opacity = 0;
document.body.style.cursor = "none";
} | [
"refresh() {\n this.useLayout(this.layout);\n }",
"function Layout() {return;}",
"function setLayout(){\n\n}",
"createLayout() { }",
"scheduleLayoutUpdate() {\n qx.ui.core.queue.Layout.add(this);\n }",
"function setLayout() {\n\tplayerLocation(USERCONFIG.player);\n\tuserlistLocation(USER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check assessment mode is toggled | function toggleAssesst() {
if (toggleAssess) {
toggleAssess = false;
} else {
toggleAssess = true;
}
} | [
"switchCaseStatus() {\n // console.log(\"111\");\n this.isShowCaseloadTrend = false;\n if (this.isShowCaseStatus == false) {\n this.isShowCaseStatus = true;\n } else {\n this.isShowCaseStatus = false;\n }\n }",
"_onConditionModeChanged() {\n const mode = this._$mod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a list of all justiceNames found in DB | function getJustices(DB) {
function filter_justiceName(entry) { return entry[colToLine('BC')]; }
var filtered = und.map(DB, filter_justiceName);
return und.uniq(und.flatten(filtered));
} | [
"async getAllNames() {\n let store = (await dbPromise).transaction(\"familyMembers\").store;\n let cursor = await store.openCursor();\n let namesOutput = [];\n while (cursor) {\n const { label } = cursor.value;\n namesOutput.push(label);\n cursor = await cursor.continue();\n }\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates all the cowboys with inbetween turns logic. | updateCowboys() {
for (const cowboy of this.game.currentPlayer.cowboys) {
if (cowboy.isDead || !cowboy.tile) {
continue; // don't update dead dudes, they won't come back
}
if (cowboy.isDrunk) {
if (cowboy.drunkDirection !== "") {
... | [
"updateStateTurns() { this._states.forEach(this._updateStateTurn, this); }",
"updateBoard(){\r\n for(let x = 0; x<13; ++x) {\r\n if(this.hasWinner){break;}\r\n for (let y = 0; y < 13; ++y) {\r\n if(this.hasWinner){break;}\r\n if(this.getColor(x,y) !== 0){... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles errors for iframe AJAX requests. | function ajaxError(xhrObj, status, error) {
// flagError("iframe AJAX eror", {
// "error" : error,
// "status" : status,
// "xhrObj" : xhrObj
// });
} | [
"handleIframe404() {\n setTimeout(() => {\n if (\n this.iframe?.contentWindow?.document?.body?.textContent.includes(\n 'Cannot GET'\n ) ||\n this.iframe?.contentWindow?.document?.title.includes('Error')\n ) {\n /**\n * Replace the iFrame's inner contents vs ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set constraint steps Y. | set constraintStepsY(value) {
const newValue = (Math.round(+value) || 0).toString();
this.setAttribute('constraint-steps-y', newValue);
} | [
"get constraintStepsY() {\n return +this.getAttribute('constraint-steps-y') || 0;\n }",
"set Y(y) {\n if (isNaN(y)) {\n console.log('Error: Your value is not a number.');\n } else {\n y = parseInt(y);\n if (y < this._minY) y = this._minY + 1;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
chains several Animator objects together | function AnimatorChain(animators, options) {
this.animators = animators;
this.setOptions(options);
for (var i=0; i<this.animators.length; i++) {
this.listenTo(this.animators[i]);
}
this.forwards = false;
this.current = 0;
} | [
"function AnimatorChain(animators, options) {\n this.animators = animators;\n this.setOptions(options);\n for (var i = 0; i < this.animators.length; i++) {\n this.listenTo(this.animators[i]);\n }\n this.forwards = false;\n this.current = 0;\n}",
"function AnimatorChain(animators, options)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unlock the claim system. | unlockClaimTimeout() {
this.claimLock = false;
} | [
"function HandleUnlock() {}",
"unlock() {\n this._locked = false;\n }",
"unlock() {\n\t\tthis.locked = false;\n\t}",
"function unlock() {\n\n setEventLock(EVENT_LOCK_LOCKED);\n }",
"function unlock()\r\n{\r\n\tlocked = false;\r\n}",
"function unlock_() {\n try {\n LockService.getSc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |