query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Returns the current value of the member variable backgroundImage. | getBackgroundImage(){return this.__background.image} | [
"function getBackground(){\n\t\treturn background;\n\t}",
"get background() {\n return this._data.background;\n }",
"function getImgBackground() {\n return gMeme.selectedImg;\n}",
"get backgroundImageUrl() {\n return this._data.background_image_url;\n }",
"function getBackground() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves an empty schedule in localStorage | function initLocalStorage() {
const schedule = [];
for (let i = 0; i <= 8; i++) {
// All descriptions in schedule are empty
schedule.push('');
}
// Save empty schedule in localStorage
localStorage.setItem('schedule', JSON.stringify(schedule));
return schedule;
} | [
"saveTodaysSchedule() {\n localStorage.setItem(\"SavedSchedule\", JSON.stringify(this.schedule));\n }",
"function getSavedSchedule() {\n savedSchedule = JSON.parse(localStorage.getItem(\"daySchedule\"));\n if (!savedSchedule) {\n savedSchedule = [];\n };\n}",
"function saveSchedule(){\nlocal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Joins together two URLs, resolving relative URLs correctly | function joinUrl(left, right) {
var parsedLeft = parseUrl(left);
var parsedRight = parseUrl(right);
if (isRelativeUrl(parsedLeft)) {
throw new Error("Left URL is not absolute");
}
if (isRelativeUrl(parsedRight)) {
// TODO is this correct ?
if (parsedRight.path !== "") {
... | [
"function joinUrl(left, right) {\n var parsedLeft = parseUrl(left);\n var parsedRight = parseUrl(right);\n if (isRelativeUrl(parsedLeft)) {\n throw new Error(\"Left URL is not absolute\");\n }\n if (isRelativeUrl(parsedRight)) {\n // TODO is this correct ?\n if (parsedRight.path ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for building a JavaScript property access expression | function buildPropertyAccess(objExpr, propertyName) {
if (/^[A-Za-z_][A-Za-z0-9_]*$/.test(propertyName)) {
return objExpr + "." + propertyName;
} else {
if (!isNaN(Number(propertyName))) {
return objExpr + "[" + propertyName + "]";
} else {
return objExpr + "[" + buildLiteralSt... | [
"function PropertyExpression() {\n}",
"function evaluate_property_access(input_text,statement,env) {\n\tvar objec = evaluate(input_text,property_access_object(statement),env);\n\tvar property = evaluate(input_text,property_access_property(statement),env);\n\treturn evaluate_object_property_access(objec, property)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manda la lista de actividades y los detalles del proyecto validados al backend | addDetallesProyecto(event) {
event.preventDefault();
//Se comprueba primero que todos los campos del formulario sean validos
if (this.validaFormulario()) {
const nombre = this.props.match.params.proyecto
fetch(`http://virtual.lab.inf.uva.es:27014/api/proyecto/${nombre}/... | [
"list(){\n return http\n .get('usuario/activos');\n }",
"checarTodas() {\n\t\tthis.processarTodas(this.grade.checarRequisitos);\n\t}",
"function pintarActividades(pListaActividades){ //aqui repintamos la lista completa\n seccionActividades.innerHTML = \"\"; //aqui estoy borrando todas ac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function that wipes the data tag input | function wipeDataTag() {
if (document.getElementById("dataTagInput")) {
dataTagExists = document.getElementById("dataTagInput");
dataTagExists.parentNode.removeChild(dataTagExists);
} else {
}
} | [
"function wipeDataTagCat() {\n if (document.getElementById(\"dataTagCatInput\")) {\n dataTagCatExists = document.getElementById(\"dataTagCatInput\");\n dataTagCatExists.parentNode.removeChild(dataTagCatExists);\n } else {\n }\n}",
"function clearInputData() {\n console.log('clearInputData');\n gaIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new metadata document on mongodb | async create() {
// Insert the metadata
await this.metadatas.insertOne({
_id: this.id
, metadata: this.metadata
});
return this;
} | [
"_createDocument(req, res, next) {\n let args = req.body\n let newDoc = {\n schemaName: args.schemaName, // e.g. prose-article\n info: args.info // optional\n }\n\n this.engine.createDocument(newDoc, function(err, result) {\n if (err) return next(err)\n res.json(result)\n })\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
retrieves a page of submissions for a given assignment | async function getPagedAssignmentSubmissions(id, page) {
if (!ObjectId.isValid(id)) {
return null;
} else {
const results = await getAllAssignmentSubmissions(id);
console.log(results);
if(results.length < (page-1)*10){
page = 1;
}
var returns = results... | [
"async function getAssignmentSubmissionByAssignmentId(assignment_id){\n const [ results ] = await mysqlPool.query(\n 'SELECT * FROM submission WHERE assignmentid = ?',\n [ assignment_id ]\n );\n return results;\n}",
"function getAssignments()\n{\n var url = URL + '/assignments' + ITEMS_PER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return node for subchapter menu | function getSubChapterMenu(){
} | [
"function createChapterLinkPullDownMenu() {\n\n/*\ndocument.write('<option value=\"chapter_01.html\">Part n: Foo');\n*/\n\nvar t = '<ul>';\n\n\tvar lastChapter = chapterContent.length / kMaxChapterOffset;\n\tfor ( var thisChapter = 0 ; thisChapter < lastChapter ; thisChapter++ ) {\n\t\tt = t + '<option value=\"glos... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Input is a string of numbers and words separated by listSeparator. Return as an array the number of numbers, their sum, and the number of words (non numbers). | function addNumbersBody(listSeparator) {
"use strict";
var theList = document.getElementById("listInput").value;
var listItems = theList.split(listSeparator);
var listItemCount = listItems.length; // Remember the length of the list
var listIndex = 0; // Pointer to list items
var numberCount = 0; // R... | [
"function sumOfIntegersInString(s){\n\treturn s.split(/[\\D]+/g)\n\t//the /S matches anything but white space\n\t//.test is running the test on each array element\t\n\t.filter((arrElements) => /\\S/.test(arrElements))\t \n\t.map((num) => parseInt(num))\n\t.reduce((total,num)=>total+num, 0)\n}//sumOfIntegersInString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize `shared` and `context`. | _preInit() {
if (this.context) {
throw new Error(`${this.debugTag} has assigned a context in the wrong place. Make sure to only assign context in shared function.`);
}
// run shared
try {
const sharedResult = this.shared?.();
if (isPlainObject(sharedResult)) {
// store returne... | [
"function initializeContext() {\n GSC.Logging.checkWithLogger(logger, context === null);\n context = new GSC.PcscLiteClient.Context(CLIENT_TITLE, SERVER_APP_ID);\n context.addOnInitializedCallback(contextInitializedListener);\n context.addOnDisposeCallback(contextDisposedListener);\n context.initialize();\n}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
promise to fetch annotation from annuri check match to targeturi (if supplied) (and if supplied to bodyuri) and return bodyuri (assumed to be a uri rather than literal) | function getAnnotation(annuri, targeturi = null, bodyuri = null) {
//console.log("getAnn", annuri, targeturi)
return axios.get(annuri, {responseType: 'text',
headers: {'Accept':'text/turtle'}})
.then(parseTurtle(annuri))
.then(graph => {
let match = graph.any(rdf.sym(annur... | [
"function findAnnotation(conturi, targeturi) {\n var p = axios.get(conturi, {responseType: 'text',\n headers:{'Accept':'text/turtle'}})\n .then(parseTurtle(conturi)).then(graph => {\n //extract content URIs from LDP container graph\n //console.log(graph)\n var match... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reloads the items in the cart preview. | reloadCartPreview()
{
this.previewStartLoading();
let items = this.getCartItems();
this.addToPreview(items);
let instance = this;
setTimeout(function() {
instance.previewStopLoading.call(instance);
}, 1000);
} | [
"function reloadCart() {\n\t\tvar cart = sessionStorage.getItem('cartItems');\n\t\tvar prdcts = JSON.parse(cart);\n\t\tloadCart(prdcts);\n\t}",
"refreshCart() {\n this.createCart();\n }",
"function ajaxCartReloadCartView() {\n if (jQuery('#cart-form-pane').length) {\n jQuery('#cart-form-pane').par... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new OracleEngineVersion with an arbitrary version. | static of(oracleFullVersion, oracleMajorVersion) {
return new OracleEngineVersion(oracleFullVersion, oracleMajorVersion);
} | [
"static oracleSe1(props) {\n return new OracleSe1InstanceEngine(props.version);\n }",
"static oracleSe(props) {\n return new OracleSeInstanceEngine(props.version);\n }",
"static of(auroraFullVersion, auroraMajorVersion) {\n return new AuroraEngineVersion(auroraFullVersion, auroraMajor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simply retrieve the list of active tasks. | function getActiveTasks() {
return Java.from(Variable.findByName(gameModel, "tasks").items).map(function(t) {
return t.getInstance(self);
}).filter(function(t) {
return t.active;
});
} | [
"getAllTasks() {\n return taskList;\n }",
"function getActiveTasks(req, res, next) {\n db\n .any(\n \"SELECT A.* FROM tasks A LEFT JOIN tasks_completed B ON A.id = B.task_id WHERE B.task_id IS NULL AND A.apt_id=${apt_id} ORDER BY DUE_DATE ASC\",\n {\n apt_id: req.params.apt_id\n }\n )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy fields from input to updateParms, Nonblank fields are put in the "$set" parm. Blank fields are put in the "$unset" parm. Fields which are not allowed to be updated may not be passed, even if they have not been modified (we don't read current data but we could just ignore those?) | function buildUpdateParms(updateParms, input, view){
var haveSetParms = false;
var haveUnsetParms = false;
var set = {};
var unset = {};
view.displayFields.forEach(function(fieldDef){
var value = input[fieldDef.name];
if (value !== undefined){
if (!fieldDef.editable)
... | [
"updateParameters(commandId, params) {\n var command = this.db.get(\"commands\").getById(commandId);\n var oldParams = command.get(\"parameters\");\n var newParams = params.map((p) => {\n var oldParam = oldParams.find({ name: p }).value();\n return oldParam != null ? oldParam : { name: p, backupQ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get path area from an array of [x, y] points TODO: consider removing duplication with getPathArea(), e.g. by wrapping points in an iterator. | function getPlanarPathArea2(points) {
var sum = 0,
ax, ay, bx, by, dx, dy, p;
for (var i=0, n=points.length; i<n; i++) {
p = points[i];
if (i === 0) {
ax = 0;
ay = 0;
dx = -p[0];
dy = -p[1];
} else {
ax = p[0] + dx;
ay = p[1] + dy;
... | [
"areaOfSelection(points) {\n\t\tconst paths = points.map(p => ({ X: p.x, Y: p.y }))\n\t\t// NOTE: clipper will sometimes return 0 area for self intersecting paths, this is fine because they'll fail validation regardless\n\t\treturn ClipperLib.JS.AreaOfPolygon(paths);\n\t}",
"areaXY() {\n let area = 0.0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds and removes keyboard listeners on dropdown collapse. | manageActiveListeners() {
if (this.state.isDropdownOpen) {
document.addEventListener('keydown', this.handleKeyboardEvents);
document.addEventListener('mousedown', this.handleClickOutside);
} else {
document.removeEventListener('keydown', this.handleKeyboardEvents);
document.removeEventLi... | [
"function closeAndRemoveKeyListener(e) {\n var target = e.target;\n if (target !== customSelect && !customSelect.contains(target)) {\n if (state.status === 'expanded') {\n toggleCustomSelect();\n }\n document.removeEventListener('keydown', keyActions);\n }\n showCur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
................ game functions ................ expects integers returns delay between each step as integer | function calcDelay(game_difficulty, candies_eaten){
return 1000/(game_difficulty + (candies_eaten/10))
} | [
"function delay(d, i) { return i * 50 }",
"function beatPlay(steps){\n\t\n}",
"function playerDelay() {\n if ($('#modeOptions').text() === 'beginner' || $('#modeOptions').text() === 'intermediate') {\n setTimeout(lightBoxes, (sequenceLength + 1) * 1200);\n } else {\n setTimeout(lightBoxes, (sequenceLeng... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers controller's action to be executed when client disconnects from the socket. | function OnDisconnect() {
return function (object, methodName) {
var metadata = {
target: object.constructor,
method: methodName,
type: ActionTypes_1.ActionTypes.DISCONNECT
};
index_1.defaultMetadataArgsStorage().actions.push(metadata);
};
} | [
"onControllerDisconnect()\n {\n if(this.Container)\n {\n window.alert(\"Connection with Controller is closed\");\n }\n console.log(\"Controller is disconnected\");\n }",
"ondisconnect(){\n debug('got disconnect packet');\n this.onclose('client namespace disconnec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
My Projects table: Get records/fields/instruments counts via ajax | function getRecordOrFieldCountsMyProjects(thistype, theseVisiblePids) {
// Get projects counts via ajax
$.post(app_path_webroot+'ProjectGeneral/project_stats_ajax.php',{ type: thistype, pids: theseVisiblePids }, function(data){
if (data != '0') {
// Parse JSON
var json = jQuery.parseJSON(data);
// ... | [
"function load_project_counts_ajax(project){\r\n //alert(project)\r\n\r\n $(\"#all-projects #loading-projects\").show();\r\n $.ajax({\r\n url: '/ajax_api',\r\n type: \"GET\",\r\n data: {\r\n \"function\": \"load-project-counts\",\r\n \"project_id\": project\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION Remove Activity from Scheduling Queue (i = activity_id) | function removeFromQueue(i,x) {
$('.queue-label.scheduling-row-title#activity-id-' + i).parent().remove();
$('.resource_individuals .activity_id-' + i).parent().find('.queue-scheduling-icon').removeClass('queue-added');
if( $('.scheduling-container tr').length == 1 && !x ) {
schedulingClose();
... | [
"REMOVE_ACTIVITY (state, activity) {\n const activity_id = activity.activity_id;\n const index = state.activities.findIndex((activity) => activity.activity_id === activity_id);\n\n if (index >= 0) {\n state.activities.splice(index, 1)\n }\n }",
"removeActivityElement(aID)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A template tag function for promoting the associated constant literal to a TrustedScriptURL. Interpolation is explicitly not allowed. | function ɵɵtrustConstantResourceUrl(url) {
// The following runtime check ensures that the function was called as a
// template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any
// interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A
// TemplateStringsArr... | [
"function _ɵɵtrustConstantResourceUrl(url) {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // Template... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to draw the Matrix given a certain phrase | function drawMatrix(phrase) {
// TODO: Draw the matrix based on the length of the
} | [
"function drawMatrix(){\n document.getElementById('cm').innerHTML='';\n var html=\"\"\n for (var i=0;i<cm.length;i++){\n html+='<tr>'\n for(var j=0;j<cm[i].length;j++){\n html+='<td>'+cm[i][j]+'</td>'\n }\n html+='</tr>';\n }\n document.getElementById('cm').inne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
showCurrentAlgorithmCodeAndInfo(currentSortAlgorithm) will show the code block and the algorithm information block for only the currentSortAlgorithm | function showCurrentAlgorithmCodeAndInfo(currentSortAlgorithm){
let containerBlock = document.getElementById(currentSortAlgorithm + "-pre");
let codeBlock = document.getElementById(currentSortAlgorithm + "-code-block");
let algoInfoBlock = document.getElementById(currentSortAlgorithm + "-info-block");
a... | [
"function setupAlgorithmSelection(currentSortAlgorithm){\n let currentQuestions = getCurrentQuestionsStruct(currentSortAlgorithm);\n showCurrentAlgorithmCodeAndInfo(currentSortAlgorithm);\n hideOtherAlgorithmCodeAndInfo(currentSortAlgorithm);\n addQuizQuestionsToHtml(currentSortAlgorithm);\n let info... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For no after or before space accepting textfields | function no_around_spaces( selector )
{
$( selector+">input[type=text]" ).keyup(function(){
this.value=this.value.trim();
});
} | [
"function letras(campo) {\r\n var charpos = campo.value.search(\"[^A-Za-z ]\");\r\n if (campo.value.length > 0 && charpos >= 0) {\r\n campo.value = campo.value.slice(0, -1);\r\n campo.focus();\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}",
"function nospaces(t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Turn a relative id to absolute given a parent id | function resolve(parent, id) {
if (/^\.\.?\//.test(id) && parent) { // is a relative id
id = parent.replace(/[^\/]+$/, id); // prepend parent's dirname
}
var terms = [];
id.split('/').forEach(function(term) {
if ('..' === term) { terms.pop(); } // remove previous, don't add ..
else if ('.' !== term) { ... | [
"function makeAbsId(id) {\n var base = item.id;\n while (base) {\n base = base.replace(/[^\\/\\.]*$/, \"\").slice(0, -1);\n if (declItems[base + \".\" + id]) return base + \".\" + id;\n }\n return id;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns number of the days from the firstDayOfWeek to the first day of the current month | weekDaysBeforeFirstDayOfTheMonth() {
const firstDayOfTheMonth = new Date(`${this.displayedYear}-${pad(this.displayedMonth + 1)}-01T00:00:00+00:00`);
const weekDay = firstDayOfTheMonth.getUTCDay();
return (weekDay - parseInt(this.firstDayOfWeek) + 7) % 7;
} | [
"weekDaysBeforeFirstDayOfTheMonth() {\n const firstDayOfTheMonth = new Date(`${this.displayedYear}-${Object(_util__WEBPACK_IMPORTED_MODULE_1__[\"pad\"])(this.displayedMonth + 1)}-01T00:00:00+00:00`);\n const weekDay = firstDayOfTheMonth.getUTCDay();\n return (weekDay - parseInt(this.firstDayOfWeek) +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new message hook fn: the function to be called when a message is received. args: msg the message object. msg.body is the message text. msg.author is who sent the message. currentUser the ID of the current Facebook user. | function addMessageHook(fn) {
if (typeof(fn) !== "function") {
throw "addMessageHook expects a function";
}
_hooks.push(fn);
} | [
"function addMessage(msg, isUser) {\n\n const words = Util.makeElement('p', 'message-content')\n words.innerText = msg;\n const message = Util.makeElement('div', 'message-box');\n // find who gave this message\n if (isUser) {\n message.className += ' right-align';\n }\n message.appendChi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the id of the specified field by alias. | function getFieldId(alias) {
return fieldIds[alias].eid();
} | [
"function getIdFieldName (fields, fieldType, getSubType) {\n for (var i = 0; i < fields.length; i++) {\n var fieldToLookup = getSubType ? \"subId\" : \"id\";\n if (fields[i].type == fieldType[fieldToLookup]) {\n return fields[i].field;\n }\n }\n return null;\n}",
"static g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to adding data to the SearchFieldsDb | function updateSearchFieldsDb(user) {
//we insert somes of its informations in the searchFieldsDb
if(searchFDb.industry.indexOf(user.industry) < 0) {
searchFDb.industry.push(user.industry);
}
if(user.positions !== undefined && user.positions !== '' && JSON.stringify(u... | [
"function insertSearchDetails(data, callback, context) {\n var sql, db = database.openDatabase();\n sql = 'INSERT INTO SearchDetails ('\n + 'SearchBy, Location, Latitude, Longitude, Radius, FuelType, UpdatedResult, '\n + 'SortBy, Brand, ViewMode, LimitResult, Favo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
====================================== Determine if the subpage is an existing work item and put it in a variable. | function checkHasSubPage() {
for (var i in customSubPage) {
if (customSubPage[i].link === false) {
subPageList.push(customSubPage[i].name);
}
}
} | [
"async function workItemExists (queryResult, workItemApi, api_project) {\n let workItemAssigned = -1\n\n for (const element of queryResult.repository.pullRequest.commits.nodes) {\n let commitMessage = element.commit.message\n let workItem = regex.exec(commitMessage)\n\n if (workItem !== null && workItemA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This grabs progress of matching types and subtypes. The subtypes are only matched if there is an exact match on them | function matchProgressToPromotion(users) {
var subMatchArr = []
var matchedTypesUsers = users.filter((user) => {return user.settingProgress.filter(prog => prog.type == $scope.promotion.type)})
matchedTypesUsers.forEach(function(user) {
user['settingProgress'] = user.settingProgress.filter(set => set... | [
"matchTypes(...types) {\n var line = trimStart(this.peek());\n return types.every((t, i) => line[i] && t == line[i].type);\n }",
"_getItemMatchesInType(type, name, options) {\n var itemArray = this.data[options.league][type];\n\n var matches = _.where(itemArray, { name: name, links: options.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether all answers have been revealed. | revealedAllAnswers() {
return this.revealedAnswers.length >= this.orderedChoices.length;
} | [
"checkIfAllAnswered() {\n const currentAnswers = this.state.currentAnswers;\n\n const questions = Object.keys(Questions).length;\n const answers = Object.keys(currentAnswers).length;\n\n return answers === questions;\n }",
"wereAllCorrectAnswersSelected() {\n const {\n gue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
custom middleware logger(): logs request method, request url, and a timestamp. Runs on all requests to the API | function logger(req, res, next) {
console.log(req.method);
console.log(req.url);
console.log(Date.now());
next();
} | [
"function logger(req, res, next) {\n console.log(`Request Method: ${req.method}`);\n console.log(`URL: ${req.url}`);\n console.log(`Timestamp: ${new Date()}`);\n next();\n }",
"function requestLog(req, res) {\n Log(config.basis.log_prefix, {\n request_end_point: req.originalUrl,\n request_para... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save project file in Nimn format | function saveAsNimn(){
//TODO : change it after change in nimnjs
askFileName("Untitled_imglab.nimn", function(fileName){
download( nimn.stringify(nimnSchema, labellingData), fileName, "application/nimn");
//download( JSON.stringify(labellingData), fileName, "application/json");
});
} | [
"function saveAsNimn(){\n askFileName(\"Untitled_imglab.nimn\", function(fileName){\n analytics_reportExportType(\"nimn\");\n report_UniqueCategories();\n download( nimn.stringify(nimnSchema, labellingData), fileName, \"application/nimn\");\n //download( JSON.stringify(labellingData),... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by knockout when the set of linked activities changes This is used to check/filter the set of linked activities, and update the display | function onActivitiesChanged( newSelection ) {
function onPartialRemap(err) {
if (err) {
Y.log('Problem mapping linked medications: ' + JSON.stringify(err), 'warn', NAME);
}
template.raise('mapcomplete', template.unmap... | [
"function viewSavedActivities() {\n\n\n // If there are any saved activities, update our list\n if (savedActivities) {\n // Show activity list\n activityListEl.innerHTML = savedActivities;\n // Display clear activities button\n $(\"#clear-btn-2\").show();\n\n // Show activity success header\n $(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
on Update, over time decrease the bar by a small amount, as long as tick is enabled | update(){
if(this.tick){
this.depleteBar(.00005);
}
} | [
"depleteBar(amount){\n\t\tthis.status -= amount;\n\t\tthis.clampScale();\n\t\tthis.blueBar.scale.setTo(this.status, .617);\n\t}",
"updateFuelBar() {\n this.fuelBar.mask.x -= this.fuelDrain;\n if (this.fuelBar.mask.x <= -47) {\n this.scrollSpeed -= 20;\n }\n }",
"increaseBar(am... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
QTip2 replacement for JQUI Tooltip | function QTip() {
var myPos = {
bot: { target: 'mouse', my: 'top left', at: 'bottom right', adjust: { x: 10, y: 20 } },
top: { target: 'mouse', my: 'bottom left', at: 'top right', adjust: { x: 5, y: 0 } }
};
// destroy artifacts before creating again
$('.qtip').each(function () {
... | [
"function QTip() {\n\n var myPos = {\n bot: { target: 'mouse', my: 'top left', at: 'bottom right', adjust: { x: 10, y: 20 } },\n top: { target: 'mouse', my: 'bottom left', at: 'top right', adjust: { x: 5, y: 0 } }\n };\n\n $('[title]').each(function () {\n $(this).qtip({\n s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
==================== Function: GetTopDomain Purpose: To get an organisation's top level domain name. Especially useful when dealing with cookies for crossdomain tools like surveys. E.g. the top domain for and intranet.mycompany.com is mycompany.com. Input: strThisDomain (optional) The full domain name to test. if not p... | function GetTopDomain(strThisDomain) {
strTopDomains = ".co,.com,.net,.org,.edu,.biz,.info";
arrTopDomains = strTopDomains.split(",");
strThisTopDomain = "";
strLocalDomainPrefix = "";
strLocalDomain = "";
if (!strThisDomain || strThisDomain == "") {
strThisDomain = location.hostnam... | [
"function getTopLevelDomain(host) {\n var parts = host.split('.');\n if (parts.length > 2) {\n return parts.slice(1).join('.');\n }\n return host;\n}",
"function getOtDomainId() {\n const domains = {\n 'adobe.com': '7a5eb705-95ed-4cc4-a11d-0cc5760e93db',\n 'hlx.page': '3a6a37fe-9e07-4aa9... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
modKey should be a key in modificationsConfig (eg. 'open_water'). | function getHumanReadableName(modKey) {
if (modificationConfig[modKey]) {
return modificationConfig[modKey].name;
}
return unknownModKey(modKey);
} | [
"function modifierAdd(key, keyNum, modObject) {\n \n // get all the possible modifiers\n modifiers = Object.keys(modObject);\n\n // add the keyNum of the modifier to that modifier's\n // array in the modifier object. the reason for the individual\n // if statements is so that keys can be abbreviat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Plan E benefit calculation | function calcPlanEBenefit (age_p, salary_p, serviceCredit_p) {
return salary_p * 0.02 * serviceCredit_p * lookupERA(age_p);
} | [
"function cal_per_total_cost(msrp,incentive,down_pay_rate,interest_rate){\n\n Actual_cost = msrp - incentive;\n Down_payment_cost = (down_pay_rate * Actual_cost) / 100;\n Left_Actual_cost_pay = Actual_cost - Down_payment_cost;\n\n Interest_on_actual_cost = (Left_Actual_cost_pay * interes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if the uppercase and punctuation removed is reverse of the input the_palindrome is equal to itself reversed. | function isPalindrome(inputthe_palindrome) {
var reversedthe_palindrome = reversethe_palindrome(inputthe_palindrome);
//this will perform the punctuation elimination on both the_palindromes
return (reversedthe_palindrome == reversethe_palindrome(reversedthe_palindrome));
} | [
"function is_palindrome(input){\n\tvar a = input.toString();\n\tfor (var i = 0, j = a.length-1;\n\t\t i < Math.ceil(a.length/2), j > Math.floor(a.length/2)-1; i++, j--){\n\t\tif (a.charAt(i) != a.charAt(j)){\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}",
"function PalindromeChecker(text){\n var t = text... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checkToggleOWS Toggles the checkmarks of the outside washington state subregions Input: None Output: Checkmarks changed | function checkToggleOWS()
{
if (document.getElementById('searchOWSLoc').checked)
{
document.getElementById("searchCanSub").checked = true;
document.getElementById("searchOrSub").checked = true;
document.getElementById("searchCaliSub").checked = true;
document.getElementById("searchWestSub").checked = true;
... | [
"onCheckboxToggle() {\n const { showBoundingBox, boundaries } = this.state;\n if (!showBoundingBox) {\n googleTagManager.pushEvent({\n event: 'smart_handoffs_toggle_true_target_area',\n });\n this.setState({ showBoundingBox: true });\n this.onBoundaryChange(boundaries, true);\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
API test for 'GetEtherIpId', Get EtherIP ID setting | function Test_GetEtherIpId(id) {
return __awaiter(this, void 0, void 0, function () {
var in_etherip_id, out_etherip_id;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log("Begin: Test_GetEtherIpId");
i... | [
"function Test_EnumEtherIpId() {\n return __awaiter(this, void 0, void 0, function () {\n var out_rpc_enum_etherip_id;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n console.log(\"Begin: Test_EnumEtherIpId\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new MatchTimeseries2018. Timeseries data for the 2018 game FIRST POWER UP. WARNING: This is not official data, and is subject to a significant possibility of error, or missing data. Do not rely on this data for any purpose. In fact, pretend we made it up. WARNING: This model is currently under active devel... | constructor() {
MatchTimeseries2018.initialize(this);
} | [
"function generateTimeLineData(series){\n var events=[];\n var bouts=[];\n var frame_start=-1;\n var frame_phrase_start=-1;\n var frame_last=-1;\n var time_base=new Date(2017,1,1,0,0,0,0);\n var scale=40;\n var index=1;\n var scores=[0,0];\n var ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
package mp3; / MPEG modes | function MPEGMode(ordinal) {
var _ordinal = ordinal;
this.ordinal = function () {
return _ordinal;
}
} | [
"function MPEGMode(ordinal){var _ordinal=ordinal;this.ordinal=function(){return _ordinal;};}",
"function change_mode(mode)\n{\n play_mode = mode;\n}",
"function MP3_SongPlay(operace){\r\n\tif(((audio.paused ) && (operace & t_play) && !(MP3.indicator & end) || (MP3.indicator & user) || (MP3.indicator & loop) )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders the day input. If the display format begins with the day, then a special label will be set for accessibility. The special label makes it easy for users to see which control on the page is the start of this particular DateInput even if there are other DateInputs in the same view. | dayRender() {
/**
* JAWS + Chrome is super buggy when it comes to up/down arrow keys cycling values on the input and only seems to work
* when input[type=number]. This works great, except in Firefox where <input value="03" type="number" />
* displays in the browsers as "3".
* To work around this... | [
"displayDay(value) {\n\t\tthis.airportDelays.displayDate(value)\n\t}",
"function Day(parent){var _this=_super.call(this,parent)||this;_this.viewClass='e-day-view';return _this;}",
"displayDate() {\n this._currentDay.text(this._calendar.getFormattedMoment(this._DISPLAY_DATE_FORMAT));\n }",
"updateCal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For `templateID` add any referenced templates (and their referenced templates) to `discoveredTemplateIDs`. | function addReferencedTemplates(
templateID,
discoveredTemplateIDs,
templateIDsToFileInfo,
jsFilePath
) {
const templateFileInfo = templateIDsToFileInfo.get(templateID);
// The template `caplinx.motf.orderticket.message-overlay` is referenced in
// `cps-motf` via `MotfConfirmationBootstrap` but that's wro... | [
"addTemplateWithId(templateId, templateIdent, parentId, childType, childName, referredId) {\r\n this.templateMap[templateIdent] = templateId;\r\n this.templateById[templateId] = {\r\n parentId: parentId,\r\n childType: childType,\r\n childName: childName,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves the myTabDict in local Chrome storage. | function saveData(){
chrome.storage.local.set({'tabDict': myTabDict}, function() {
console.log('Value is set to ' + myTabDict);
});
} | [
"function saveTabs() {\n\t// Save the current tab\n\tchrome.storage.local.set({'currentTab': currentTab}, function() {\n // Notify that we saved.\n //console.log('Current tab settings saved: ' + currentTab + ' was saved.');\n });\n\n\tvar tabsJson = JSON.stringify(tabArray);\n\t//console.log(\"Tabs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
has got a video sig msg from peer, handle it. | function handleVideoMsg(message) {
var full_jid = $(message).attr('from');
var jid = Strophe.getBareJidFromJid(full_jid);
var jid_id = Gab.jid_to_id(jid);
//video msg type
var videoChat = $(message).find('video-chat');
var msgType = videoChat.attr('type');
//recieved a video ... | [
"function handleVideoAnswerMsg(msg) {\n log(\"Call recipient has accepted our call\");\n\n // Configure the remote description, which is the SDP payload\n // in our \"video-answer\" message.\n\n var desc = new RTCSessionDescription(msg.sdp);\n myPeerConnection.setRemoteDescription(desc).catch(reportError);\n}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
wait for db setup to complete | function dbready() {
if(!db.ready) {
return setTimeout(dbready, 100);
}
done();
} | [
"async function initDb() {\n try {\n let dbNames = await db.listDatabases();\n let dbInfo;\n\n //get the db connection up and running\n if (dbNames.indexOf(DB_NAME) > -1) {\n db.useDatabase(DB_NAME);\n dbInfo = await db.get();\n } else {\n dbInfo = await db.createDatabase(DB_NAME);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of valid tag names that can bo associated with a element given its namespace and name. | function getValidTagNames(namespace, name) {
if (INTERFACE_TAG_MAPPING[namespace] && INTERFACE_TAG_MAPPING[namespace][name]) {
return INTERFACE_TAG_MAPPING[namespace][name];
}
return [];
} | [
"function getValidTagNames$1(namespace, name) {\n if (INTERFACE_TAG_MAPPING[namespace] && INTERFACE_TAG_MAPPING[namespace][name]) {\n return INTERFACE_TAG_MAPPING[namespace][name];\n }\n return [];\n }",
"elementNameList(name)\n { \n let namesList = [];\n let exists = fals... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the start of the week based on input day | function getWeekStart(currentDay){
var shift = currentDay.getDay();
return new Date(currentDay.getYear(), currentDay.getMonth(), currentDay.getDate() - shift );
} | [
"function startOfWeek(date)\r\n {\r\n var diff = date.getDate() - date.getDay() + (date.getDay() === 0 ? -6 : 1);\r\n\r\n return new Date(date.setDate(diff));\r\n\r\n }",
"function findWeekStart(d, firstWeekday) {\n firstWeekday = parseIntDec(firstWeekday);\n if(!isWeekdayNum(firstWeekday)){... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only Pc Size Processing Please describe processing of pc below | function pcSizeOnly(){
changeImgPc();
} | [
"cpx() {\n /// Adjust for inversion and wrapping\n var wrapAdjustedLogicalAddress = this.getWrapAdjustedLogicalAddress();\n /// Number is converted to decimal\n var memoryNum = parseInt(_MemoryAccessor.read(_MemoryManager.simpleVolumes[this.localPCB.volumeIndex], wrapAdju... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Force an order update only if order is "not closed" for any reason already by exchange | triggerOrder(order) {
if (!(order instanceof ExchangeOrder)) {
throw 'Invalid order given';
}
// dont overwrite state closed order
if (order.id in this.orders && ['done', 'canceled'].includes(this.orders[order.id].status)) {
delete this.orders[order.id];
return;
}
this.orders... | [
"triggerOrder(order) {\n if (!(order instanceof ExchangeOrder)) {\n throw Error('Invalid order given');\n }\n\n // dont overwrite state closed order\n for (const [key] of Object.entries(this.orders)) {\n if (String(order.id) !== String(key)) {\n continue;\n }\n\n if (\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the players from csv, and assign them to clubs. | function loadPlayers() {
console.log("Loading players...");
return d3.csv("data/Player.csv", d => {
try {
let player = new Player(d);
//assign player to club and vice-versa
player.club = clubsLayer.getClub(player.club_id);
if (player.club !== undefined) {
... | [
"function loadPlayerList() {\n Player_v.all({order: 'id'}, function(err, results) {\n var players = [];\n var player = {};\n player.player_name = 'Not Selected';\n player.id = \"\";\n players[0] = player;\n\n if(results.length > 0) {\n for (var i = 0; i < results.length; i++) {\n // c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function that query and create search lines from a point | function createfoundlines(latitude, longitude, fromArray) {
//Extracts the search distance from the input box
distance = document.getElementById("dist").value
console.log(table, longitude, latitude, distance)
//Ajax call to server
$.ajax({
url: 'http://localhost:3000/findlinefrompoint',
... | [
"function pointToCursor(x, y)\n {\n var snip = linemap[0].text;\n var temp = snip;\n var metrics = fontRes.measureText(pts, snip);\n var full_w = metrics.w;\n var return_x = metrics.w;\n var arr = [];\n arr[0] = snip.length;\n arr[1] = return_x;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a buffer's min and max values, and a resampled buffer. | static analyse(buffer, resampleLength) {
const resampledBuffer = new Float32Array(resampleLength);
let min = 100;
let max = -100;
let resampledMin = 100;
let resampledMax = -100;
const bucketSize = 1 + Math.ceil(buffer.length / resampleLength);
let bucke... | [
"function createBreathRateSamples(min, max) {\n breathRateBuffer = [];\n breathRateBufferIndex = 0;\n msUntilNextBreathRateBufferFrame = 0;\n\n var breathsPerMinute = randomInt(min, max);\n var msBetweenBreaths = 60 * 1000 / breathsPerMinute;\n var msUntilNextBreath = msBetweenBreaths;\n\n for ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deactivate the form's submit action, and instead invoke the action as part of (inline) query. | function replace_submit()
{
var form = $("form");
action = form.attr("action");
form.attr("action",""); // reset
form.submit(query);
} | [
"function haltSubmission() { // 79\n event.preventDefault(); // 80\n event.stopPropagation(); ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This event fires whenever the video playback quality changes. Possible values are: 'small', 'medium', 'large', 'hd720', 'hd1080', 'highres'. | _onPlaybackQualityChange (data) {
if (this.destroyed) return
this.emit('playbackQualityChange', data.data)
} | [
"function toggleQuality(event) {\n var newQuality, value = this.videoQualityControl.quality,\n isHD = _.contains(this.config.availableHDQualities, value);\n\n event.preventDefault();\n\n newQuality = isHD ? 'large' : 'highres';\n\n this.trigger('videoPlayer.handlePlaybackQuali... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function to assign group | function assignGroup(team, group) {
if (group == 'A') {
drawCtrl.groupA.push(team);
} else if (group == 'B') {
drawCtrl.groupB.push(team);
} else if (group == 'C') {
drawCtrl.groupC.push(team);
} else if (group == 'D') {
drawCtrl.groupD.push(team);
} else if... | [
"function assignGroupId(id){\r\n\t\tgroup.id = id;\r\n\t}",
"group(n,s,g=[]){\n this.o.groups.push({n,s,g});\n return this;\n }",
"setGroup(group) { \n this.group = group; // a real implementation may need to do more than just this\n }",
"setGroup(group) { \r\n this.group = group; // a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all tools from the page's toolbar. | static clearTools() {
document.getElementById(Page.pageToolsID).innerHTML = "";
} | [
"function cleanToolsBar(){\n\t\t_toolSelected = null;\n\t\t$(_config.dom.toolActive).removeClass('active');\n\t}",
"onRemove(): void {\n Object.keys(this._toolbars).forEach((k: string) => {\n this._toolbars[k].removeToolbar();\n });\n }",
"function unselectAllTools(){\r\n activeTool = undefined;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this will place three new images on the page and get view clicks | function showThreePics() {
makeArrayOfThreeNumbers(); // call function from above
left.src = allProducts[newPicsArray[0]].filepath; // this will place first image on the left
allProducts[newPicsArray[0]].views +=1; // add 1 to the view of each image clicked on
center.src = allProducts[newPicsArray[1]].filep... | [
"function showThreePics() {\n makeArrayOfThreeNumbers();\n left.src = allProducts[newArray[0]].filePath;\n allProducts[newArray[0]].views += 1;\n center.src = allProducts[newArray[1]].filePath;\n allProducts[newArray[1]].views += 1;\n right.src = allProducts[newArray[2]].filePath;\n allProducts[newArray[2]].... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inspects Ext.define() and copies detected properties over to the given cls Hash | function detect_ext_define(cls, ast) {
// defaults
cls["extends"] = "Ext.Base";
cls["requires"] = [];
cls["uses"] = [];
cls["alternateClassNames"] = [];
cls["mixins"] = [];
cls["aliases"] = [];
cls["members"] = [];
cls["code_type"] = "ext_define";
each_pair_in_object_expression(ast["arguments"][1... | [
"setFromHash(sourceHash) {\n if (typeof sourceHash === 'undefined' || sourceHash === null) return\n\n // list our and their properties\n let ourProps = this.getPropertyNames()\n let theirProps = sourceHash instanceof Base ? sourceHash.getPropertyNames() : Object.keys(sourceHash)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checkActivityOpened helper method to set the activities to opened or closed | checkActivityOpened(room2_one, room2_two, room2_three, room2_four, room2_five, room2_six) {
this.room2_activityOneOpened = room2_one;
this.room2_activityTwoOpened = room2_two;
this.room2_activityThreeOpened = room2_three;
this.room2_activityFourOpened = room2_four;
this.room2_act... | [
"checkActivityOpened(one, two, three, four, five, six) {\n this.activityOneOpened = one;\n this.activityTwoOpened = two;\n this.activityThreeOpened = three;\n this.activityFourOpened = four;\n this.activityFiveOpened = five;\n this.activitySixOpened = six;\n\n }",
"che... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
================================================== Text Animations ================================================== | function _text_anim( container ) {
if ( $( ".text-fx", container ).length) {
$( ".text-fx", container ).each( function() {
if (! $( this ).hasClass( "finished" ) ) {
$( this ).addClass( "finished" );
var c = $( this ).html().replace( "<br />", "~" );
... | [
"function animateText(elem, toText, duration) {\n let start = Date.now()\n let stages = []\n\n for (let i = 0; i < elem.textContent.length; i++) {\n stages.push(elem.textContent.slice(0, -i - 1))\n }\n\n for (let i = 0; i < toText.length; i++) {\n stages.push(toText.slice(0, i + 1))\n }\n\n elem.classL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the local target symbol of the export specifier or throws if it doesn't exist. | getLocalTargetSymbolOrThrow() {
return errors.throwIfNullOrUndefined(this.getLocalTargetSymbol(), `The export specifier's local target symbol was expected.`);
} | [
"getExportSpecifierLocalTargetSymbol(exportSpecifier) {\r\n const symbol = this.compilerObject.getExportSpecifierLocalTargetSymbol(exportSpecifier.compilerNode);\r\n return symbol == null ? undefined : this._context.compilerFactory.getSymbol(symbol);\r\n }",
"getLocalTargetSymbol() {\r\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function that flashes an input green for a few seconds to acknowledge input | function greenFade(input) {
$(input).css('background-color', '#62c462');
$(input).animate({backgroundColor: 'transparent'}, "medium");
} | [
"function flashButton(color) {\n\tpressButton(color);\n\tsetTimeout(function() {\n\t\tunpressButton(color);\n\t}, 500);\n}",
"function flashSequence(){\n\tscore++;\n\t\n\tinputReady = false;\n\tnewColorCode()\n\tvar i = 0;\n\tvar seq = setInterval(function(){\n\t\tinputReady = false;\n\t\tdoMove(colorCode[i]);\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
====================================================================================================================================== / ADD CLASSES WITH COLORS FOR 'no membership', 'N / A', 'membership days left' (display_members.css) | function addClass(value){
if(value.localeCompare("N / A") === 0 ){
value = "<div class='no_membership'>" + value + "</div>"; // css style in 'display_members.css' file
}
else if(value.localeCompare("present") === 0){
value = "<div class='expired_membership'>N / A</div>";
}
else if(value... | [
"getMembershipStatusAndSum() {\n const status = document.getElementById(\"membershipStatus\")\n \n if (this.totalNumberOfCups >= 10 && this.totalNumberOfCups < 30) {\n this.membership = \"SILVER\"\n status.className= \"silverText\"//changes css class to .silverText in ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get issues from db | async function getIssues(req, res) {
var dbResponse = await models.Issue.fetchAll();
dbResponse = dbResponse.toJSON();
if (dbResponse.length == 0) {
dbResponse = 'Empty response';
}
res.status(200).json({
code: 200,
data: dbResponse,
});
} | [
"function getIssues() {\n let results = client.db.get('issues').then(function (data) {\n return data;\n }).catch(function (error) {\n console.error('error', error);\n })\n return results;\n }",
"async function getActiveIssues(req, res) {\n var code = 200;\n var dbResponse = await models.I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
! move the wasp intelligently | function moveWasp() {
const down = waspCurrentPosition + width
const left = waspCurrentPosition - 1
const right = waspCurrentPosition + 1
const up = waspCurrentPosition - width
checkGhostMode(waspClass, waspCurrentPosition)
removeGhost(waspCurrentPosition, waspClass)
// checks movement thr... | [
"function drawwings() {\n upperwing();\n lowerwing();\n translate(width, 0); //move to far corner\n scale(-1.0, 1.0); //flips wing functions below on the x-axis\n upperwing();\n lowerwing();\n}",
"function moveWisply() {\n\t\t\t\t\t$(\".navbar-fixed-top\").css({\n\t\t\t\t\t\t\"top\": \"41px\"\n\t\t\t\t\t});... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make the file 16bit if it is not. | assure16Bit_() {
this.assureUncompressed_();
if (this.bitDepth != '16') {
this.toBitDepth('16');
}
} | [
"assure16Bit_() {\n this.assureUncompressed_();\n if (this.bitDepth != '16') {\n this.toBitDepth('16');\n }\n }",
"assure16Bit_() {\n this.assureUncompressed_();\n if (this.bitDepth != \"16\") {\n this.toBitDepth(\"16\");\n }\n }",
"loadAs16bits (fileArr) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens a new window to download the link and registers the click with Google Analytics. | function download(URL)
{
_IG_Analytics("UA-2268697-1", "/mediaSearch/download");
window.open(URL, '_blank', 'height=1px,width=1px');
return false;
} | [
"function redirectToDownloadPage(session_id) {\r\n // console.log(\"Opening DOWNLOAD Page\")\r\n let url = \"/classes/course/session/\" + session_id + \"/report\"\r\n window.open(url)\r\n}",
"function clickLink(d) {\n window.open(d.link,'_blank');\n }",
"function invoiceLink(url)\n{... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear all tasks from the display/storage | function clearAll() {
while (taskContainer.firstChild) {
taskContainer.removeChild(taskContainer.firstChild);
}
browser.storage.local.clear();
} | [
"function clearAllTasksFromStorage() {\n localStorage.clear();\n}",
"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 cleari... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When a zombie dies, this emits it to the server. | function emitZombieDeath(id){
//emits the zombie message and id to the server
socket.emit("zombie death", {id:id});
} | [
"die() {\n this.alive = false;\n\n // Emitting an event:\n this.emit('die', this, 'bar');\n }",
"function sendDeath() {\n socket.emit('deathdata');\n}",
"listen_die() {\n this.socket.on('die', ({spectating, host}) => {\n this.kill(this.socket.id, host);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
send a request to the server to get the launch time | function sendLaunchTimeRequest() {
// wrap the summand and addend as XAL doubles and send the request to the server
message_session.sendRequest( "getLaunchTime", function( response ) {
var result = response.result; // get the result
var launch_time_elem = document.getElementById( "launchtime" ); // get the outpu... | [
"function timeRequest() {\n const before = getTime();\n\n const sucessful = sendRequest();\n\n const difference = getTimeDifference(before);\n\n return difference;\n}",
"function getTime() {\n var request = new XMLHttpRequest();\n request.open('GET', '/gettime', true);\n request.onload = function (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
recursive koch curve function | function koch(startPoint, endPoint) {
// calculate euclidean distance between both points
const diffX = startPoint.x - endPoint.x
const diffY = startPoint.y - endPoint.y
const distance = Math.sqrt(Math.pow(diffX, 2) + Math.pow(diffY, 2))
// if distance is too small, exit recursion
if (distance ... | [
"function kochCurve(a, b, levels) {\r\n\tvar points = [];\r\n\tvar result = [];\r\n\r\n\tif (!levels || levels < 1) {\r\n\t\tconsole.error(\"Variable levels has to be greater than 0.\");\r\n\t\treturn [];\r\n\t}\r\n\r\n\t// Base case of the recursive function.\r\n\tif (levels === 1) {\t\t\r\n\t\t// Adapted from htt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
region Adjust root group position after dimension change | AdjustMasterGroupPositionAfterDimensionChange(lastData, newData) {
let self = this;
let retVal = {
deltaX: 0,
deltaY: 0
}
// get delta change set y or x of master group
let deltaChange_y = (lastData.height * self.Ratio) - (newData.height * self.Ratio);
let deltaChange_x = (lastData.w... | [
"updateTriggerGroupPositions(specificGroup) {\r\n // constant vars\r\n const groups = specificGroup ? [specificGroup] : this._indicators.groups;\r\n let i = groups.length;\r\n const container = this._isDocument ? document.body : this._container;\r\n const containerOffset = this._isDocument\r\n ?... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the value of a specified element in the data returned from the API call | function getValue(data, element) {
var dataAttribute = attributeNames[element];
return data.price[dataAttribute];
} | [
"function getValue(elem) \n{\n if (elem !== null && elem !== undefined && typeof elem === 'object' && elem.get)\n {\n return elem.get();\n }\n else\n {\n return elem;\n }\n}",
"getvalue(element) {\n const { data } = this.props;\n if (typeof data[element.key] === \"object\") {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shorthand for `new Chaff.Mock(Type)` | function of(Type) {
return new Mock(Type);
} | [
"function wrap(instance) {\n var mock;\n if (instance instanceof Chaff.Mock) {\n mock = instance;\n }\n else {\n mock = new Mock(null);\n mock.CreatedType = instance;\n }\n return mock;\n }",
"function createMock() {\n return new Bre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds the sticker index for the given library (libraryId and document). | async function buildStickerIndexForLibrary(libraryId, document, progressReporter) {
let cachePath = path.join(util.getPluginCachePath(), libraryId);
// first, find sticker sections (stored in text layers)
let sectionsById = {};
let sections = [];
let allTextLayers = util.getAllLayersMatchingPredicate(
... | [
"function buildSearchIndex() {\n for(let i=0;i<reports.length;i++) {\n searchEngine.addDoc(reports[i]);\n }\n}",
"function buildDocsIndex(dataPath, indexPath, done) {\n dataPath = dataPath || `${config.docsLocalPath}/search-data.json`;\n indexPath = indexPath || `${config.docsLocalPath}/search-inde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the station id and power of the best station for given device. | function calculateBestStation(device) {
var bestResult;
for (i = 0; i < stations.length; i++) {
var power = calculatePower(stations[i], device);
if (bestResult) {
if (power > bestResult.power) {
bestResult = {
station: stations[i],
... | [
"function get_best_link_station(device, link_stations) {\n let d = device;\n let best_link_station = [0, 0, 0];\n \n for (let ls of link_stations) {\n let power = get_power(d, ls);\n if (power > best_link_station[0]) {\n best_link_station[0] = power;\n best_link_stati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The CaptureEnter function is used to respond to the keypress event for text boxes. Normally if the user presses Enter in a text box, the default ASP.NET behavior is to postback to the first button of the page. Therefore only the first button's Click event handler will be called. This does not work properly for this pag... | function CaptureEnter(event, button) {
if (event.keyCode == 13) {
// Hit enter key, so do a virtual click
button.click();
if (document.all) {
event.keyCode = null;
} else {
event.cancelBubble = true;
event.returnValue = false;
}
}
} | [
"function interceptEnterKey(event, button) {\n if (event.which == 13 && $(\"#\" + button).length > 0) {\n $('#' + button).click();\n //document.getElementById('' + button).click();\n return false;\n }\n else {\n return true;\n }\n}",
"function enterPressed(event) {\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
In this simple Kata your task is to create a function that turns a string into a Mexican Wave. You will be passed a string and you must return that string in an array where an uppercase letter is a person standing up. Rules 1. The input string will always be lower case but maybe empty. 2. If the character in the string... | function wave(string){
const answer = [];
for (let i = 0; i < string.length; i++) {
if (string[i] === ' ' ) {
}
else if (i === 0) {
answer.push(string[i].toUpperCase() + string.slice(i + 1).toLowerCase());
}
else if (i === string.length - 1) {
... | [
"function mexicanWave(string) {\n if (typeof string !== 'string') {\n return; \n }\n \n if (!/[a-z]+/.test(string)) {\n return [string]; \n }\n \n let wave = [];\n let length = string.length;\n \n for (let idx = 0; idx < length; idx += 1) {\n let currentWave = '';\n string.split('').forEach((c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets or sets the header distance. | get headerDistance() {
return this.headerDistanceIn;
} | [
"set headerDistance(value) {\n this.headerDistanceIn = value;\n this.notifyPropertyChanged('headerDistance');\n }",
"get headerWidth() {\n return parseInt(this.width, 10) - 17;\n }",
"get headerSize() {\n if (this.outgoing) {\n return this.constructor.HEADER_SIZE_OUTGOING;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method adds temp_min to the currentHighOrLow if targetTemp is "minimum", or temp_max if targetTemp is "maximum" | incrementAverages(data, currentHighOrLow, targetTemp){
if(targetTemp == "minimum"){
currentHighOrLow += data.main.temp_min;
}
else{
currentHighOrLow += data.main.temp_max;
}
return currentHighOrLow;
} | [
"checkForMaxandMinTemperatures(usersNewTemperature) {\r\n\r\n if (typeof(usersNewTemperature) === 'number') {\r\n this.#maxTemp = (this.#maxTemp >= usersNewTemperature && this.#maxTemp != undefined) ? this.#maxTemp : usersNewTemperature\r\n this.#minTemp = (this.#minTemp <= usersNewTemp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tslint:enable Constructors Initializes a new instance of the `PdfTrueTypeFont` class. | function UnicodeTrueTypeFont(base64String,size){// Fields
this.nameString='ABCDEFGHIJKLMNOPQRSTUVWXYZ';/**
* Specifies the Internal variable to store fields of `PdfDictionaryProperties`.
* @private
*/this.dictionaryProperties=new DictionaryProperties();/**
* Indicates whether the fon... | [
"constructor(params) {\n this.attrs = { type: 'TextFont' };\n if (!params.name) {\n Vex.RERR('BadArgument', 'Font constructor must specify a name');\n }\n const fontData = params.glyphs ? params : TextFont.getFontDataByName(params.name);\n if (!fontData) {\n if (params.glyphs && params.reso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
loop sets up an event filter and is looking for new entries for the PairCreated event, this loop runs on poll interval | async function logLooper(event_filter, poll_interval) {
for (PairCreated in event_filter) {
handleEvent(PairCreated);
}
await sleep(poll_interval);
} | [
"async function parsePairCreatedEvent(event){\n var {token0, token1, pair} = event.returnValues;\n // Flag to indicate whether or not one of the tokens\n // in the pair is WETH\n var WETHinPair = false;\n if(token0 == WETHaddress){\n token0 = \"(WETH) \" + token0;\n WETHinPair = true;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
type can be any member of weight | function critique(type) {
if (type === "reset") {
for (i in weight) {
weight[i] = 16.6;
}
return $.extend({}, weight);
}
var strength = 20;
if (!weight.hasOwnProperty(type)) return; // only works if type is part of weight
if (weight[type] == 100) return weight;
... | [
"weightType(state, {\n type, types, weight, forBasic\n }) {\n if ( !types ) {\n types = [];\n }\n\n if ( type ) {\n types.push(type);\n }\n\n const map = forBasic ? state.basicTypeWeights : state.typeWeights;\n\n for ( const t of types ) {\n map[t.toLowerCase()] = weight;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract WIFL from a collection of documents Note that this will go into an infinite loop if there are cycles in the RDFa. | function Wifl(docs) {
this.docs = docs;
docs.setMapping("wifl","http://wifl.org/spec/#");
} | [
"function wifl(docs) {\n return docs.setMapping(\"wifl\",\"http://wifl.org/spec/#\").resolveTargets(\n \"wifl:parent\",\n \"wifl:super\",\n \"wifl:pathParam\",\n \"wifl:queryParam\",\n \"wifl:headerParam\",\n \"wifl:exampleRequest\",\n \"wifl:exampleResponse\",\n \"wifl:re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if the response is valid | function isResponseValid() {
var isValid = true;
if (typeof response['HotelList'] !== 'object' ||
response.HotelList.length == 0) {
isValid = false;
}
else {
response.HotelList.forEach (function (hotel) {
if (hotel['Name'] == undefined ... | [
"function isResponseValid() {\n\t\tvar isValid = true;\n\t\tif (typeof response['venues'] !== 'object' ||\n\t\t\tresponse.venues.length == 0) {\n\t\t\tisValid = false;\n\t\t}\n\t\telse {\n\t\t\tresponse.venues.forEach (function (venue) {\n\t\t\t\tif (venue['name'] == undefined ||\n\t\t\t\t\tvenue['hereNow'] == unde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getPaymentUrl :: Object invoice > void | getPaymentUrl(invoice) {
const insertPaymentCallback = (err, res) => {
if (err) {
console.log(err);
alert(err);
} else {
// Success!
prompt('This is the payment URL for: ' + invoice.title, 'https://service.tuxion.nl/pay/' + res);
}
}
Meteor.call('mollie.in... | [
"downloadUrlFor(invoice) {\n return this.billingUser ? `/settings/invoice/${invoice.id}` : `/settings/${Spark.pluralTeamString}/${this.team.id}/invoice/${invoice.id}`;\n }",
"urlForInvoices() {\n\t\t\treturn this.billingUser ? '/settings/invoices' : `/settings/${Spark.pluralTeamString}/${this.te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Push new gps point in tracking from last local stored coordinates | function addPoint(){
trackingFB.push({
latitud:localStorage.getItem("latitud"),
longitud:localStorage.getItem("longitud")
})
} | [
"addPos (lat, lon) {\r\n this._pastPos.push([lat,lon,Date.now()])\r\n this._pastPos.shift()\r\n \r\n const length = this._pastPos.length\r\n let extraDist = this._getDistanceFromLatLonInKm(this._pastPos[length-2][0], this._pastPos[length-2][1], this._pastPos[length-1][0], this._pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gera os pontos de vida do personagem de acordo com as classes. | function _GeraPontosDeVida(modo, submodo) {
if (modo != 'personagem' && modo != 'elite' && modo != 'comum') {
Mensagem(Traduz('Modo') + ' ' + modo + ' ' + Traduz('invalido') + '. ' + Traduz('Deve ser elite, comum ou personagem.'));
return;
}
// Para cada classe, rolar o dado.
var total_pontos_vida = 0;
... | [
"function creacionClasesPerros(){\n\tfor (var i =0; i<numeroperros; i++){\n\t\tperro[i] = new Perro();\n\t\tperro[i].posx;\n\t\tperro[i].posy;\n\t\tperro[i].direccion;\n\t\tperro[i].velocidad;\n\t\tperro[i].numeroperros = 10;\n\t\tperro[i].tempx;\n\t\tperro[i].tempy; \n\t}\n}",
"function _AtualizaClasses() {\n v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This gets a list of all wikis in the wikis folder and subfolders | function getRealPaths(startPath) {
// Check each folder in the wikis folder to see if it has a
// tiddlywiki.info file
let realFolders = [];
try {
const folderContents = fs.readdirSync(startPath);
folderContents.forEach(function (item) {
const fullName = path.join(startPath, item);
... | [
"function getRealPaths(startPath) {\n // Check each folder in the wikis folder to see if it has a\n // tiddlywiki.info file\n let realFolders = [];\n try {\n const folderContents = fs.readdirSync(startPath);\n folderContents.forEach(function (item) {\n const fullName = pat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write a function called halfNumber that will take one argument (a number), divide it by 2, and return the result. It should also log a string like "Half of 5 is 2.5.". | function halfNumber (num){
let halvedNumer = num / 2;
console.log(`Half of ${num} is ${halvedNumer}.`);
} | [
"function halfNumber(number){\n console.log('Half of ' + number + ' is ' + (number/2) + '.');\n return number/2;\n}",
"function halfNumber(aNumber){\n var half = aNumber /2;\n console.log(`Half of ${aNumber} is ${half}`);\n return half\n}",
"function halfNumber(number){\n\tvar halfResult = number /2;\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Batch normalization for use in training (not inference). | function normalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon) {
if (epsilon === void 0) { epsilon = 1e-3; }
if (tfjs_core_1.util.arraysEqual(reductionAxes.slice().sort(), math_utils.range(0, x.rank - 1))) {
return regularNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon);
}... | [
"function normalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon) {\n if (epsilon === void 0) {\n epsilon = 1e-3;\n }\n if (tfc.util.arraysEqual(reductionAxes.slice().sort(), range(0, x.rank - 1))) {\n return regularNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon);\n } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get instance of TwitterRSSFeed | function get_twitter_rss_feed(credentials) {
const TwitterRSSFeed = require('twitter-rss-feed');
return new TwitterRSSFeed(credentials);
} | [
"getTweetStream() {\n this.stream = this.dom.getElementsByClassName('h-feed')[0];\n }",
"get rssFeedUrl() {\n return this.__torrent.rss_feed_url;\n }",
"function getRSSFeed() {\n rssFeed('https://www.heise.de/rss/heise.rdf').then((container) => rssCardVue.rsscontent = container.outerHTML, (_reaso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds an FCMoment from args. When given an existing moment, it clones. When given a native Date, or called with no arguments (the current time), the resulting moment will be local. Anything else needs to be "parsed" (a string or an array), and will be affected by: parseAsUTC if there is no zone information, should we ... | function makeMoment(args, parseAsUTC, parseZone) {
var input = args[0];
var isSingleString = args.length == 1 && typeof input === 'string';
var isAmbigTime;
var isAmbigZone;
var ambigMatch;
var output; // an object with fields for the new FCMoment object
if (moment.isMoment(input)) {
output = moment.apply(nul... | [
"function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |