query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Style for label with small font which is centered and grey. | static get centeredGreyMiniLabel() {} | [
"static set miniBoldLabel(value) {}",
"label(text, size = -1) {\n //TODO\n }",
"static set whiteBoldLabel(value) {}",
"static set boldLabel(value) {}",
"static set whiteMiniLabel(value) {}",
"static set whiteLabel(value) {}",
"static set largeLabel(value) {}",
"function setLabel(text) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method overrides the addScore method in User by multiplying score by 5 | addScore (score) {
this.userScore += (score * 5);
return `User score is ${this.userScore}`;
} | [
"set score(newScore) {\r\n score = newScore;\r\n _scoreChanged();\r\n }",
"function addScore() {\n\tvar ref = database.ref('rank');\n\tvar data = {\n\t\tname: userName,\n\t\tvalue: score\n\t}\n\tref.push(data);\n}",
"function addToScore(points){\r\n\t\tscore += points;\r\n\t\taddLifeRunningTotal += point... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An array of stripped settings categories this scheme manages. | get categories() {
return this.args.categories || this.args.settings || [];
} | [
"function getCategoryList(category) {\n var catList = [];\n self.features.forEach(function(feat, index, array) {\n if (! mrlUtil.arrayContains(catList, feat.category)) {\n catList.push(feat.category);\n }\n });\n return catList;\n }",
"function getLabsCategories() {\n var ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
navigation to Restaurant Details | navigationToDetailsPage(item) {
store.dispatch({
type: RESTAURANT_DETAILS,
restaurantDetails: item
});
this.props.navigation.navigate('RestaurantDetails')
} | [
"toRestaurant() {\n this.props.handleChangePage('Restaurant', this.props.rest.restId);\n }",
"static urlForRestaurant(restaurant) {\r\n return (`./restaurant.html?id=${restaurant.id}`);\r\n }",
"function showList() {\n $state.go('customer.list');\n }",
"function navigateTo() {\n l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides information about the configuration of the Terria server, by querying /serverconfig | function ServerConfig() {
/**
* Contains configuration information retrieved from the server. The attributes are defined by TerriaJS-Server but include:
* version: current version of server
* proxyAllDomains: whether all domains can be proxied
* allowProxyFrom: array of domains that can be proxied
... | [
"function print_server_config(){\n log(\"Server Config:\\n-> SERVER: \" + guild.toString() + \"\\n-> LOG CHANNEL: \" + log_channel.name + \"\\n-> Meeting Timeout Time(s):\" + server.MEETING_TIMEOUT_TIME); \n}",
"function initializeServer(){\n // these are the credentials to use to connect to the Hyperled... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the squared length of a quat | lengthSquared(a) {
return quat.squaredLength(this);
} | [
"len() {\n return quat.length(this);\n }",
"function calculateSquareLength(squareNum){\n return (containerLength / squareNum);\n}",
"static length2sq(it) { return (it.x*it.x)+(it.y*it.y); }",
"function HalfLength() {\n\t\treturn this.length * 0.5;\n\t}",
"static length3sq(it) { return (it.x*it.x)+(it... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines an array type, e.g. array('number'). | function array(typeSpec) { return new TArray(parseSpec(typeSpec)); } | [
"function ArrayDecl() {\n \t\t\tdebugMsg(\"ProgramParser : ArrayDecl\");\n \t\t\t\n \t\t\tlexer.next(); \n \t\t\t\n \t\t\tvar name=Ident(true);\n \t\t\t\n \t\t\tcheck(\"[\");\n \t\t\t\t\n \t\t\tvar ident=Ident(!mode.any);\n \t\t\tif (!ident) ident=lexer.anyLiteral();\n \t\t\t\t\n \t\t\tvar indexType=ident;\n \t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transfer any milestones that exist in GitLab that do not exist in GitHub. | async function transferMilestones() {
inform('Transferring Milestones');
// Get a list of all milestones associated with this project
let milestones = await gitlabApi.ProjectMilestones.all(
settings.gitlab.projectId
);
// sort milestones in ascending order of when they were created (by id)
milestones ... | [
"async function transferIssues() {\n inform('Transferring Issues');\n\n // Because each\n let milestoneData = await githubHelper.getAllGithubMilestones();\n\n // get a list of all GitLab issues associated with this project\n // TODO return all issues via pagination\n let issues = await gitlabApi.Issues.all({\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
6: Localhost Server for development | function build_localServer() {
console.log("BrowserSync setting up the server in port 4000");
browserSync.init({
port: 4000,
server: {
baseDir: "./_site/",
},
});
} | [
"function start()\n{\n if(!checkSite()) return;\n types = defineTypes();\n banned = [];\n banUpperCase(\"./public/\", \"\");\n var service = https.createServer(options, authenticate);\n\n/*\nservice.listen(PORT, () => {\n console.log(\"Our app is running on port \"+PORT);\n});\n*/\n\n service.listen(PORT);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a Dialect with the engine | addDialect(dialect) {
this.dialects.push(dialect);
} | [
"function sql92Listener() {\n\tantlr4.tree.ParseTreeListener.call(this);\n\treturn this;\n}",
"function register(loader) {\n if (typeof indexOf == 'undefined')\n indexOf = Array.prototype.indexOf;\n if (typeof __eval == 'undefined')\n __eval = eval;\n\n // define exec for easy evaluation of a load record... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add right zones in the dropdown for a given country | function populateZones(formElements, country) {
const zoneEl = formElements.zone;
if (!zoneEl) {
return;
}
if (country.zones.length === 0) {
zoneEl.wrapper.dataset.ariaHidden = 'true';
zoneEl.input.innerHTML = '';
return;
}
zoneEl.wrapper.dataset.ariaHidden = 'false';
const zoneSelect =... | [
"function displayCountries(country) {\n document.getElementById(\"countryList\").innerHTML +=\n \"<option>\" + country + \"</option>\";\n }",
"function showCountriesSelect(e) {\n select.innerHTML = '';\n if (e.currentTarget.value === 'Asia') {\n asia.map((val, i) => select.innerHTML += `<opt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getting the Node object by Node's name return null if no result found | getNode(name) {
return this.nodes.find((n) => n.name === name) || null;
} | [
"function getUniqueNode(nodeName) {\n return uniqueNodes.get(getTrueNodeName(nodeName).trueName);\n }",
"function grabNode(id) {\n return nodesData[id];\n }",
"function getChildByName(node,name){return node.getChildMeshes(false,function(n){return n.name===name;})[0];}// Look through only immediate c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create an planner function with an context of action types. | function createPlanner (typeMap) {
// supplement an empty type map.
if (!typeMap) {
typeMap = Object.create(null)
}
// the default function is to create action creators.
var planner = function (payloads) {
return createActions(typeMap, payloads)
}
// create a reducer by a handler with one or mor... | [
"function actionCreator(action){\n return action\n}",
"function createAction(type) {\n function actionCreator(payload) {\n return {\n type: type,\n payload: payload\n };\n }\n\n actionCreator.toString = function () {\n return \"\".concat(type);\n };\n\n actionCreator.type = type;\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup for testing App component | function setupApp() {
let props = {}
let renderer = TestUtils.createRenderer();
renderer.render(<App {...props} />);
let output = renderer.getRenderOutput();
return {
props,
renderer,
output
}
} | [
"function AppManager(){\n}",
"function ComponentHarness() {\n EventEmitter.call(this);\n this.app = new AppForHarness(this);\n this.model = new Model();\n\n if (arguments.length > 0) {\n this.setup.apply(this, arguments);\n }\n}",
"function setup() {\n container.register({\n ChatAPIController: awili... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Section: Utility Functions / Function: $clear clears a timeout or an Interval. Returns: null Arguments: timer the setInterval or setTimeout to clear. Example: >var myTimer = myFunction.delay(5000); //wait 5 seconds and execute my function. >myTimer = $clear(myTimer); //nevermind See also: , | function $clear(timer){
clearTimeout(timer);
clearInterval(timer);
return null;
} | [
"function clear_interval(t) {\n\tvar interval = parseInt(t.data(\"interval\"));\n\tif (interval > 0) {\n\t\tclearInterval(interval);\n\t\tt.data(\"interval\", \"\");\n\t}\n}",
"_removeTimer() {\n // use clearInterval() to remove your interval. You need to include the timer reference\n\n }",
"function clearA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rebuild a 3D ground shape primitive after updating from vertices or from the previous geometry | function updateGroundGeometry(vertices_top, vertices_bottom, obj)
{
if (vertices_top == undefined) {
var numV = obj.geometry.vertices.length/2;
vertices_top = obj.geometry.vertices.slice(0, numV);
vertices_bottom = obj.geometry.vertices.slice(numV, 2*numV);
} else {
var numV = vertices_top.length;
}
if (obj... | [
"vertexToGeometry () {\n\n let prim = this.prim;\n\n let geo = this.geo; \n\n console.log( 'Mesh::vertexToGeometry()' );\n\n let vertexArr = this.vertexArr;\n\n let numVertices = vertexArr.length;\n\n let indexArr = this.indexArr;\n\n // index array doesn't need to b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creation of LNode object is extracted to a separate function so we always create LNode object with the same shape (same properties assigned in the same order). | function createLNodeObject(type, currentView, parent, native, state, queries) {
return {
type: type,
native: native,
view: currentView,
parent: parent,
child: null,
next: null,
nodeInjector: parent ? parent.nodeInjector : null,
data: state,
que... | [
"function createNode(type, attributes, props) {\r\n var node = document.createElement(type);\r\n if (attributes) {\r\n for (var attr in attributes) {\r\n if (! attributes.hasOwnProperty(attr)) continue;\r\n node.setAttribute(attr, attributes[attr]);\r\n }\r\n }\r\n if (props) {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getNoOfWeeks() ================ Method to calculate differences between two weeks (in YYYYWW format) Parameters : the date to be in YYYYWW format : the date to be in YYYYWW format Return value No of weeks difference between 2 parameters including both the week nos passed as param | function getNoOfWeeks(value1, value2) {
var week1, week2;
var year1, year2;
var totYear, totWeek;
var maxWeek = 53;
re = new RegExp("/","g");
value1 = value1.replace(re,"");
value2 = value2.replace(re,"");
year1 = parseInt(value1.substring(0, 4));
week1 = parseInt(value1.substring(4, 6... | [
"function calculateWeek(start,end){\n var days = getDates(start,end);\n var totalDays = parseInt(getDates(start,end).length); \n var totalWeeks = Math.ceil(totalDays/7); \n var weeks = [];\n for(var initWeeks=0;initWeeks<totalWeeks;initWeeks++){\n weeks[initWeeks] = [];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
handler for extensionSystem state changes | _onExtensionSystemStateChanged(source, extension) {
// Only looking for DashToDock state changes
if (extension.uuid == DashToDock_UUID) {
DashToDockExtension = extension;
if (DashToDockExtension.state == ExtensionUtils.ExtensionState.ENABLED) {
DashToDock = DashTo... | [
"onChangeStorage(changes, type) {\n if (type === 'local' && State.windowFocused) return\n\n if (changes.settings) {\n Store.dispatch('updateSettings', changes.settings.newValue)\n Store.dispatch('reloadOptPermissions')\n }\n if (changes.styles) Store.dispatch('applyStyles', changes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a set of all actors mentioned in an ACR by active Rules (i.e. that are referenced by Policies referenced by the ACR Control, and therefore that effectively apply). | function internal_findActorAll(resource, actorRelation) {
const actors = new Set();
// Collect all policies that apply to the resource or its ACR (aka active)
const activePolicyUrls = getPolicyUrlAll(resource).concat(getAcrPolicyUrlAll(resource));
const rules = getActiveRuleAll(resource, activePolicyUrl... | [
"function searchForActors(name) {\n\tlet possibleActors = [];\n\n\n\n\n\tconst readFolder = 'jsonData/people/';\n\n\n\tfs.readdirSync(readFolder).forEach(file => {\n\t\tlet data = fs.readFileSync(readFolder + file);\n\t\tlet actData = JSON.parse(data);\n\t\tif (file.toLowerCase().includes(name.toLowerCase())) {\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the action is allowed for the transaction | isAllowed(action, transaction) {
let allowed = true,
message;
// Check if the action is allowed
switch (transaction.transaction_type) {
case "Sub":
case "Subtransfer":
allowed = false;
message = `This transaction is part of a split transaction. You can only ${action} it from the parent account.... | [
"hasAccountActions(){}",
"function validateAction(action){\r\n\tvar actionArray = ['save', 'updateProfile', 'updateRSVP', 'delete', 'signout'];\r\n\tif(actionArray.includes(action)){\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}",
"hasValidTransactions() {\n for (const tx of this.transactions) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Public function `undefined`. Returns true if `data` is undefined, false otherwise. | function isUndefined (data) {
return data === undefined;
} | [
"function isUndefined(){\n return;\n}",
"function hasUndefined(obj) {\r\n\t if (obj === undefined) {\r\n\t return true;\r\n\t }\r\n\t if (obj) {\r\n\t if (Array.isArray(obj)) {\r\n\t for (var i = 0, len = obj.length; i < len; i++) {\r\n\t if (hasUndefined(obj[i]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compare two arrays of output from highlight. | function highlightOutputsEqual(o1, o2) {
if (o1.length != o2.length) return false;
for (var i = 0; i < o1.length; ++i)
if (o1[i] != o2[i]) return false;
return true;
} | [
"static compare(oldSets, newSets, textDiff, comparator) {\n var _a;\n let minPoint = (_a = comparator.minPointSize) !== null && _a !== void 0 ? _a : -1;\n let a = oldSets.filter(set => set.maxPoint >= BigPointSize ||\n set != RangeSet.empty && newSets.indexOf(set) < 0 && set.maxPoint... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The function again invokes the function passed to it, but uses the call method to return the function's this value. (Make sure to correctly pass the third argument!) | function setThisWithCall(fn, thisValue, arg) {
return fn.call(thisValue, arg)
} | [
"function call(){\n\t\t\t$.each(funstack, function(index, value){\n\t\t\t\tvalue();\n\t\t\t});\n\t\t}",
"visitFunction_call(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"function callcc (f,cc) { \n return f(function(x,k) { return cc(x); },cc);\n}",
"function setThisWithApply(fn, thisValue, args) {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DOM element ////////////////////////////////////// define initThree() | function initThree(){
canvasFrame = document.getElementById('canvas-frame');
//create renderer object
renderer = new THREE.WebGLRenderer({ antialias: true });
if(!renderer) alert('Fale: init three.js');
//set renderer size
renderer.setSize(canvasFrame.clientWidth, canvasFrame.clientHeight);
//add canvas eleme... | [
"init() {\n this._createShadowRoot()\n this._attachStyles()\n this._createElements()\n }",
"function create_3dView() {\n var scene = new WebScene({\n portalItem: {\n id: \"159d275b250b4db1978a728bd20fa2ec\"\n }\n });\n\n var view = new SceneView({\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function scope variable let AboutButton = document.getElementById("AboutButton"); about button click event handler | function AboutButtonClick() {
console.log("About Button was clicked");
} | [
"function addAboutEvent() {\n\t$(\"#about-button\").off(\"click\"); // remove any previous listener\n\t$(\"#about-button\").on(\"click\", function() {\n\t\t// when clicking on about, show that and hide media\n\t\t$(\"#media\").removeClass(\"current\");\n\t\t$(\"#about\").addClass(\"current\");\n\t});\n}",
"functi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add video preview popover | function addBackgroundVideoPreviewPopover(theme, $contentContainer) {
//if (String(theme.bgVideoThumb).indexOf('webm') > 0) console.debug("addAvailableContentToList", theme);
if (typeof (theme["bgVideoThumb"]) != "undefined" && theme["bgVideoThumb"]) {
var videoThumbSrc = null;
if (theme.con... | [
"function rexShowMediaPreview() {\n var value, img_type;\n if($(this).hasClass(\"rex-js-widget-media\"))\n {\n value = $(\"input[type=text]\", this).val();\n img_type = \"rex_mediabutton_preview\";\n }else\n {\n value = $(\"select :selected\", this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deze service bevat een aantal helper functies die voornamelijk worden gebruikt door de LedenlijstController bvb. voor het samenstellen van filters en criteria | function LedenFilterService($q, $rootScope, CS, RestService) {
var ledenFilterService = {};
var cachedHuidigeFilter = {}
ledenFilterService.getCriteria = function(functies){
var returnObj = {};
returnObj.arrCriteria = [];
returnObj.promises = [];
returnObj.promises[0] = CS.Functies... | [
"searchFunction(helper) {\n helper.setQueryParameter(\"optionalFilters\", optionalFilters).search();\n }",
"getFilters() {\n let cats = _.uniq(_.map(users, function(item){\n return item[filterBy];\n }));\n\n userFilterTitle = `PICK A ${filterBy.toUpperCase()}`;\n userFilters =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility function to unpack the variable form operand types byte | function get_var_operand_types( operands_byte, operands_type )
{
for ( var i = 0; i < 4; i++ )
{
operands_type.push( (operands_byte & 0xC0) >> 6 );
operands_byte <<= 2;
}
} | [
"function get_var_operand_types(operands_byte, operands_type) {\r\n for (var i = 0; i < 4; i++) {\r\n operands_type.push((operands_byte & 0xC0) >> 6);\r\n operands_byte <<= 2;\r\n }\r\n }",
"static bytes2(v) { return b(v, 2); }",
"st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merge two sorted array? | function mergeSortedArray(a, b){
var merged = [],
aElm = a[0],
bElm = b[0],
i = 1,
j = 1;
if(a.length ==0)
return b;
if(b.length ==0)
return a;
while(aElm || bElm){
if((aElm && !bElm) || aElm < bElm){
merged.push(aElm);
... | [
"function combine(arr1, arr2){\n return arr1.concat(arr2).sort()\n}",
"function inplaceMerge1(a, b){\n var i_a = a.length-1,\n i_b = b.length- 1,\n n = a.length + b.length;\n\n if(a[i_a]<b[0]){\n a.push(b);\n return true;\n }\n\n for(var i=0; i<n; i++){\n if(i_a>=0 && i_b >=0){\n if(a[i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
replace BigNumbers with numbers, returns true if size contained BigNumbers | function _normalize(size) {
var hasBigNumbers = false;
size.forEach(function (value, index, arr) {
if (value && value.isBigNumber === true) {
hasBigNumbers = true;
arr[index] = value.toNumber();
}
});
return hasBigNumbers;
} | [
"function is_large( vp_width ) {\n return vp_width > $(58.75).toCleanPx(); \n}",
"isBigInt() {\n return !!(this.type.match(/^u?int[0-9]+$/));\n }",
"function isThereEnoughChocolateBags(small, big, total){\n const maxBigBoxes = total / 5;\n const bigBoxesWeCanUse = maxBigBoxes < big ? maxBigBo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a TOS view | function TOSView() {
if (!(this instanceof TOSView)) {
return new TOSView();
};
View.call(this, template, { md: marked(md) });
} | [
"_createView(type) {\n\t\tlet self = this;\n\t\tAssertUtils.isString(type);\n\n\t\tfunction createView2(name, data) {\n\t\t\treturn NoPgUtils.extendPromise( [NoPg], NoPgUtils.nr_fcall(\"nopg:_createView\", function() {\n\n\t\t\t\tif ( data !== undefined) AssertUtils.isObject(data);\n\t\t\t\tdata = data || {};\n\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Official React lifecycle method Called every time state or props are changed this.input refers to the div on the checkbox | render() {
return (
<Checkbox
className="bookmark bookmark-toggle"
onChange={this.onChange}
inputRef={(ref) => { this.input = ref; }}
/>
);
} | [
"constructor(props) {\n super(props);\n this.inputElementRef = React.createRef();\n }",
"render() {\n const checkboxes = this.props.form.value.contents.map(content => {\n const childPath = this.props.form.path + \".\" + content.value\n content.checked = get(childPath, \"toggle\")\n\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Comprehension check: what is "class"? Class creates an object template. The example below is creating a bank account template The constructor should take in the following input: accountNumber The account Number owner The name of the person who owns this account | constructor(accountNumber, owner){
this.accountNumber = accountNumber
this.owner = owner
this.transactions = []
// ***Comprehension check: What is a constructor? A constructor is what is required to build the new object.
// In order to CONSTRUCT a bank account we MUST have an account number AND an owner
/... | [
"function createCard(cardnum, CVC, exp, type){\n if (type == \"Amex\"){\n \n card = new Amex(cardnum, CVC, exp);\n \n }\n \n if (type == \"Visa\"){\n card = new Visa(cardnum, CVC, exp);\n }\n \n if (type == \"MC\"){\n card = new MC(cardnum, CVC, exp);\n }\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
hash m to a uniformly distributed scalar | function hashToScalar(m) {
for (let i = 0; ; i++) {
const r = new BN(hashToBuf(i+'||'+m))
// check if byte sequence lies outside the scalar field
if (r.cmpn(0) <= 0 || r.cmp(ecc.curve.n) >= 0)
continue;
return scalar(r)
}
} | [
"secondary_hash_function(a, b, m, key) {\n return (key * a + b) % m;\n }",
"function sha256bigint(m,l)\n{\n\tlet a = bigint2bytes(m,l);\n\tlet hash = sha256.sha256(a);\n\treturn array2bigint(new Uint8Array(hash));\n}",
"function hash(uuid) {\n var hash = 0, i, chr;\n if (uuid.length === 0) retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
defines theGame function to be when we remove the start button, append the submit button, and show it. | function theGame () {
$("#startBtn").remove();
$("#submit").append("<button type='button' id='submitBtn'>Submit</button>");
run();
} | [
"function newGame(){\n\tgetNewWords(1);\n\tif(wordsInDb == true){\n\tcontinuePlaying();\n}\n\telse{\n\t\twasPrompted = true;\n\t\tsetButtons();\n\t\t$('.zone').empty();\n\t\t$('.zone').append('<h2 id =\"empty-db-msg\">' + generateEmptyDbMsg() +\n\t\t\t'<br><button class=\"btn btn-success\" id=\"contPlayingBtn\" onc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a function for getV3UsersIdKeys | getV3UsersIdKeys(incomingOptions, cb) {
const Gitlab = require('./dist');
let defaultClient = Gitlab.ApiClient.instance;
// Configure API key authorization: private_token_header
let private_token_header = defaultClient.authentications['private_token_header'];
private_token_header.apiKey = 'YOUR API KEY';
//... | [
"function getUsersIds(projectUsers){\n var ids_to_be_returned = [];\n if(projectUsers){\n var y;\n for(y in projectUsers){\n ids_to_be_returned.push(projectUsers[y].id);\n }\n }\n return ids_to_be_returned;\n}",
"ComputeKeyIdentifier() {\n\n }",
"static getContentKeys(keyIds... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Functions / eslintdisable validjsdoc In case of auto connect, add one closestPointRange to the max value right before tickPositions are computed, so that ticks will extend passed the real max. | function beforeSetTickPositions() {
// If autoConnect is true, polygonal grid lines are connected, and
// one closestPointRange is added to the X axis to prevent the last
// point from overlapping the first.
this.autoConnect = (this.isCircular &&
typeof pick(this.userMax, thi... | [
"next() {\n let from = this.to;\n this.point = null;\n let trackOpen = this.openStart < 0 ? [] : null, trackExtra = 0;\n for (;;) {\n let a = this.minActive;\n if (a > -1 && (this.activeTo[a] - this.cursor.from || this.active[a].endSide - this.cursor.startSide) < 0)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When saving an entry, the fullPath should always lead with a slash and never end with one (e.g. a directory). Also, resolve '.' and '..' to an absolute one. This method ensures path is legit! | function resolveToFullPath_(cwdFullPath, path) {
path = path || '';
var fullPath = path;
var prefix = '';
cwdFullPath = cwdFullPath || DIR_SEPARATOR;
if (cwdFullPath.indexOf(FILESYSTEM_PREFIX) === 0) {
prefix = cwdFullPath.substring(0, cwdFull... | [
"function normalizePath(path) {\n if (!path.endsWith(\"/\") && !path.endsWith(\"\\\\\")) {\n return path + \"/\";\n }\n return path;\n}",
"function resolve$3() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handled automatically. Sends an idle status to all friends logged in | function sendIdle() {
sendStatus(status = "idle");
} | [
"function getOnlineUsers(e){\n\tvar data = {\n\t\t\"session\": localStorage.sessionId\n\t}\n\tperformPostRequest(\"online-users.php\", data, function(data){\n\t\tswitch(data.status) {\n\t\t\tcase 470:\n\t\t\t\tlogOut();\n\t\t\t\tbreak;\n\t\t\tcase 200:\n\t\t\t\tshowOnlineUsersHtml(data);\n\t\t\t\tbreak;\n\t\t}\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
`__promiseGenerator` generates a simple promise that resolves itself when related store is changed. | function __promiseGenerator(store) {
// `Promise` is `require('es6-promise').Promise` by default.
// you can change it using `DeLorean.Flux.define('Promise', AnotherPromise)`
return new es6.Promise(function (resolve, reject) {
store.listener.once('change', resolve);
});
} | [
"_watchPromise(propName, promise) {\n const asyncProp = this.asyncProps[propName];\n\n if (asyncProp) {\n asyncProp.pendingLoadCount++;\n const loadCount = asyncProp.pendingLoadCount;\n promise.then(data => {\n data = this._postProcessValue(asyncProp, data);\n\n this._setAsyncProp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the options used to initialize markdown cell widget. | _createMarkdownCellOptions(text = '') {
const contentFactory = this.contentFactory.markdownCellContentFactory;
const model = new cells_1.MarkdownCellModel({});
this._disposables.add(model);
const rendermime = this._rendermime;
model.value.text = text || '';
return { model... | [
"createMarkdownCell(options, parent) {\n if (!options.contentFactory) {\n options.contentFactory = this;\n }\n return new MarkdownCell(options).initializeState();\n }",
"static getMarkedOptions () {\n\n\t\treturn {\n\t\t\tgfm: true,\n\t\t\t//highlight: highli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a list of bulk updates, ensure that: All given cards exist. Sets ctx.state.missingCardInputs | function validateBulkInput(ctx, next) {
const foundCardNames = ctx.state.bulkInputSources.map(s => s.name)
ctx.state.missingCardInputs = (ctx.request.body.updates || []).reduce(
(acc, cur) => {
const regexp = bulkInputToNameRegex(cur)
if (!_.find(foundCardNames, name => regexp.test(name))) {
... | [
"function checkGiftLists(updatedUserData){\n var newGiftList = updatedUserData.giftList;\n var newPrivateGiftList = updatedUserData.privateList;\n\n if(newGiftList == undefined){}\n else if(newGiftList != undefined) {\n for (var i = 0; i < userBoughtGiftsArr.length; i++) {\n var a = findUIDI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal helper to create a simple lookup structure. `collectNonEnumProps` used to depend on `_.contains`, but this led to circular imports. `emulatedSet` is a oneoff solution that only works for arrays of strings. | function emulatedSet(keys) {
var hash = {};
for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
return {
contains: function(key) { return hash[key]; },
push: function(key) {
hash[key] = true;
return keys.push(key);
}
};
} | [
"function SqlInjectionMatchSet(props) {\n return __assign({ Type: 'AWS::WAF::SqlInjectionMatchSet' }, props);\n }",
"addToFromProp(prop, iterable) {\n for (let item of iterable) {\n this.add(item[prop]);\n }\n }",
"function containsUnknowns(value) {\n return impl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the deaths to fulfill the corresponding intent. | function death(agent) {
console.log('death: agent.parameters = ' + JSON.stringify(agent.parameters));
// Currently we only support country-wide metrics, but you can extend
// this webhook to use other location parameters if you want.
// See the comment in queryCovid19dataset function.
var country = ... | [
"onPlayerDeath(event) {\n const player = server.playerManager.getById(event.playerid);\n if (!player)\n return; // the |player| couldn't be found, this is an invalid death\n\n if (!this.playersInDeathMatch_.has(player))\n return;\n\n const killer = server.playerMan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a filtered array of Company objects whose symbols start with the given 'value' parameter. | function findMatches(value, companies) {
return companies.filter(obj => {
const regex = new RegExp(`^${value}`, 'i');
return obj.symbol.match(regex);
});
} | [
"function filterData(searchValue) {\r\n\tconst searchList = [];\r\n\t// change searchValue and name (below) to lower case\r\n\t// to make search insensitive\r\n\tsearchValue = searchValue.toLowerCase();\r\n\tfor (let i = 0; i < data.length; i++) {\r\n\t\tlet name = data[i][\"name\"][\"first\"]+\" \"+data[i][\"name\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the serverrelative url of the selected image. listId: SharePoint list ID itemId: Selected item ID | function getImageUrl(listId, itemId) {
var clientContext = new SP.ClientContext.get_current();
var parentCtx = new SP.AppContextSite(clientContext, appData.AppHostUrl);
this.parentWeb = parentCtx.get_web();
this.targetList = this.parentWeb.get_lists().getById(listId);
targetListItem = targetList.get... | [
"function ongetImageUrlQuerySucceeded() {\n var serverrelativeurl = this.parentWeb.get_serverRelativeUrl();\n var imagepath = this.targetFile.get_serverRelativeUrl();\n var filename = this.targetFile.get_name();\n if (serverrelativeurl && filename && imagepath) {\n appData.ImageLibraryFullPath = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
! Add artist to an album | async function addArtist(req, res, next) {
try {
const { albumId, artistId } = req.params
const album = await Album.findById(albumId)
if (!album) {
throw new NotFound(`Album with id: ${albumId} not found.`)
}
const artist = await Artist.findById(artistId)
album.artists.push(artist)
c... | [
"addArtist(artistData) {\n if (!artistData.name || !artistData.country) {\n throw new ErrorInsufficientParameters();\n }\n\n const check = this.artists.find(artist => artist.name === artistData.name);\n\n if(check) {\n throw new ErrorRepeatArtist();\n }\n\n const artist = new Artist(arti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For large and up screens pin the filters to their position. | function pin_filters () {
if(Math.floor($(document).scrollTop()) >= fundamental_vars.searchPos && $.getSizeClassification('large_up')){
$('.domain-results-searchbar').css({'position': 'fixed','top': 0,'width': '100%','z-index': '100'}).addClass('fixed-top');
if($.getSizeClassification('xlarge')) {
... | [
"function screen_change_spotlight_filter() {\n //do nothing for now\n //use this function if you want to do something on screen change event\n}",
"function copFilterShift(){\n\t\tvar content = $('.cop-calender .view-filters').clone();\n\t\t$('.cop-calender .view-filters').remove();\n\t\t$('.cop-calender .vi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show a list of all billstoreceives. GET billstoreceives | async index () {
const billsToReceive = BillsToReceive.all()
return billsToReceive
} | [
"function sendBusStopList() {\n pebbleHelpers.getLocation(function (error, position) {\n if (error) {\n console.log('location error (' + error.code + '): ' + error.message);\n sendErrorCode(constants.ERROR_CODES.LOCATION_ERROR);\n } else {\n\n var positionArray = [p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback for get_box_names AJAX call. | function getBoxNames(response) {
setSelectedBox(false);
$('#box_names').empty();
$('#items').empty();
// Add the box names to the list of box names.
for (var i = 0; i < response.length; i++) {
$('#box_names').append('<option>' + response[i] + '</option>');
}
// If this was a searc... | [
"function initNames(){\n\tvar names = $('#names .aro_box[type=name]');\n\t$.each(names, function(){\n\t\tvar name = this;\n\t\tvar display = $(name).children('.aro_box_display').find('h1');\n\t\tvar type = $(name).children('.aro_box_display').find('input[name=type]').val();\n\t\tvar parts = $(name).children('.aro_b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function pops last strokes from the array and then redraws the previous brush strokes | function undoLast() {
//popping everyting off the stack until the next
for (var i = strokes.length - 1; i >= 0 && strokes[i] !== 'start'; i--) {
strokes.pop();
}
//Pop start
if (strokes[strokes.length - 1] === 'start') {
strokes.pop();
}
var currentRadius = c... | [
"function addDrawHistory() {\n restoreArray.push(ctx.getImageData(0, 0, canvas.width, canvas.height))\n index+=1; \n}",
"function reset() {\n svg_g.selectAll(\".brush\").call(brush.move, null);\n svg_g.selectAll(\".brushMain\").call(brush.move, null);\n }",
"fun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate webpack entry file for markdown docs | function buildDocsEntry() {
const output = join('docs/src/docs-entry.js');
const getName = fullPath => fullPath.replace(/(\/README)|(\.md)/g, '').split('/').pop();
const docs = glob
.sync([
join('docs/**/*.md'),
join('packages/**/*.md'),
'!**/node_modules/**'
])
.map(fullPath => {
... | [
"extend(config, ctx) { \n config.module.rules.push(\n {\n test: /\\.md$/,\n loader: \"frontmatter-markdown-loader\",\n include: path.resolve(__dirname, \"content\"),\n options: {\n markdownIt: {\n html: true,\n }\n }\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds the changed tile to the stack | function push(tile) {
var id = tile.value == 1? tile.id1 : tile.id2;
var newState = { 'parent': currentState, tile: tile };
// add the new state on top of the current
currentState[id] = newState;
// for this specific tile, count how many values have been tried
if (currentState[tile.id])
currentSta... | [
"push(element) {\r\n //this.stack.push(element);\r\n this.stack.unshift(element);\r\n }",
"push(val) {\n this._stack.push(val);\n }",
"pushNode(node) {\n this.stack.push(new Frame(node));\n }",
"moveItem(fromStack, toStack, thisMoveCounter){\n toStack.add_item(fromStack.top_item())... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to generate static counter | function staticCounter() {
if( typeof staticCounter.counter == 'undefined' ) {
staticCounter.counter = 0;
}
staticCounter.counter++;
return staticCounter.counter;
} | [
"function makeCounter() {\n function counter() {\n return (counter.count += 1);\n }\n\n counter.set = value => (counter.count = value);\n\n counter.decrement = () => (counter.count -= 1);\n\n return counter;\n}",
"function updateGenerationCounter() {\n \t\t$('#generation span').html(++generation);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EventListener for closing the font picker when clicking anywhere outside it | onClose(e) {
let targetElement = e.target; // clicked element
do {
if (targetElement === document.getElementById('font-picker')) {
// click inside font picker
return;
}
// move up the DOM
targetElement = targetElement.parentNode;
} while (targetElement);
// click outside font picker
this... | [
"function _closeSelectList ( /*[Object] event*/ e ) {\n\t\tif ( !e.target.classList.contains('text-module__edit-font-list')\n\t\t\t&& !e.target.parentNode.classList.contains('text-module__edit-font-list') ) {\n\t\t\tif ( fontListBlock.classList.contains('is-active') ) {\n\t\t\t\tfontListBlock.classList.remove('is-a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An event that fires when trash emails are deleted. | onTrashDeleted() {
this._update(`Trash emails${this._dryRun ? ' not' : ''} deleted.`);
} | [
"onDeletingTrash() {\r\n this._update('Deleting trash emails...');\r\n }",
"deleteEmail() {\n\n \n switch (this.view) {\n\n // move item to trash\n case \"inbox\":\n this.$set(this.selectedEmail, \"deleted\", true);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add three js camera | addCamera() {
this.camera = new THREE.PerspectiveCamera(
70,
this.width / this.height,
0.01,
10
);
this.camera.position.z = 1;
} | [
"function addShapes() {\n scene.add(camera);\n scene.add(ambientLight);\n}",
"createCamerasAndControls() {\n let width = this.refs.msCanvas.clientWidth, height = this.refs.msCanvas.clientHeight;\n\n // orthographic\n this.orthoCamera = new THREE.OrthographicCamera();\n this.orthoCamera.zoom = 2.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the writing direction of a specified locale | function getLocaleDirection(locale) {
const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Directionality];
} | [
"function getLocale () {\n return locale\n}",
"_isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }",
"locale() {\n return d3.formatLocale(this.selectedLocale);\n }",
"textDirectionAt(pos) {\n let perLine = this.state.facet(perLineTextDirection)\n if (!perLine || ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stop the gravity interval | function stop_gravity()
{
if(gravity_timeout != null)
{
clearTimeout(gravity_timeout);
gravity_timeout = null;
}
} | [
"function stopMoving(obj){\n obj.body.velocity.x=0;\n obj.body.velocity.y=0;\n obj.body.gravity.y = 0;\n obj.angle = 0;\n obj.body.angularVelocity=0;\n }",
"stopBrickAnimation() {\n clearInterval(this.animationIntervalContainer)\n this.animationI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to remove tickets that have already been scheduled for delivery | function removeScheduled(ticket) {
return ticket.id !== invoiceToRemove
} | [
"function purgeQueue() {\n\tconsole.log(\"[x] Cleanup started..\");\n\tvar d = new Date();\n\tfor (var q in sending_queue_map) {\n\t\tif (d - sending_queue_map[q].lastAccessed >= INACTIVE_TIMEOUT_MILLS) {\n\t\t\t// purge this\n\t\t\tconsole.log(\"[x] Requesting to delete '\" + q + \"'..\");\n\t\t\tsenderChannel.sen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle click action to get check value. | handleGetValueClick() {
const value = this.refs.cbTestGetValue.getValue();
alert('Checkbox value: ' + value);
} | [
"_handleNumberCheckboxClick(e) {\n this.showNumber = dom(e).rootTarget.checked;\n }",
"function getCheckboxValue(event){\n\t\t\tif(event.target.checked){\n\t\t\t\tresult = event.target.value;\n\t\t\t}\n\t\t}",
"function handleItemCheckClicked() {\n $('.js-shopping-list').on('click', '.js-item-toggle', even... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This sample demonstrates how to Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. | async function virtualHubRouteTableV2Put() {
const credential = new DefaultAzureCredential();
const client = createNetworkManagementClient(credential);
const subscriptionId = "";
const resourceGroupName = "rg1";
const virtualHubName = "virtualHub1";
const routeTableName = "virtualHubRouteTable1a";
const o... | [
"function TransitGatewayRouteTable(props) {\n return __assign({ Type: 'AWS::EC2::TransitGatewayRouteTable' }, props);\n }",
"async function updateVirtualNetworkGateway() {\n const credential = new DefaultAzureCredential();\n const client = createNetworkManagementClient(credential);\n const su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get offline Forwarding servers | function getOfflineRservers(){
var sql = "SELECT rserver_id,ip_address,port,state FROM info_rserver where state <> 1";
var rservers = [];
executeSql(sql, null,
function(rows){
if(rows) rservers.push(rows);
},
function(err){
console.log("Error: failed when get offline rservers, " + err);
}
);
return... | [
"function getOfflineStreamers() {\r\n clearElements();\r\n getStreamData(\"offline\");\r\n }",
"function getOnlineRservers(){\n\tvar sql = \"SELECT rserver_id,ip_address,port,state FROM info_rserver where state = 1\";\n\tvar rservers = [];\n\texecuteSql(sql, null, \n\t\tfunction(rows){\n\t\t\tif(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set a user preference key to a specific value. | function setUserPreference(key, value) {
return setLocalStorage(key, value);
} | [
"function setValue(key,val) {\r\n\tGM_setValue(PREFIX + key,val);\r\n\treturn val;\r\n }",
"function updateSettings(k,v) {\n\t\tuserSettings[k] = v;\n\t\twindow.localStorage.setItem(settingsName, JSON.stringify(userSettings));\n\t}",
"function setConfigOption(key, value){\n chrome.storage.sync.get(null, (resu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
2. Create a function called reverseOrder that takes in a string and reverses the order of the characters. Return the result. | function reverseOrder(s){
return s.split('').reverse().join('');
} | [
"function reverseStr (string) {\n // this function just returns the string split, into an array with the split method, with no space so it goes by character in an array with the split method, then using the reverse array method it reverses it, then rejoins with the join array method to be the reversed string.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired. | TreePush(str_id=null)
{
let win = this.getCurrentWindow();
this.Indent();
win.DC.TreeDepth++;
this.PushID(str_id ? str_id : "#TreePush");
} | [
"pop() {\n if (this.currentNode.children.length > 0) return;\n\n let tmp = this.currentNode;\n this.previous();\n tmp.removeFromParent();\n }",
"function MoveUpOneLevel()\r\n{\r\n var treeFrame = GetTreeFrame();\r\n var selectedNode = treeFrame.getSelectedTreeNode();\r\n if(selectedNode != null... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the internal timing system of the Site. If wasActive is true, i.e. the site was active, the remaing times until unblock disruptions decrease timesUntilUnblockDisruptions may be left with zeroes (but not negative values) It is up to the caller to query the state of the Site and then later pop these values after ... | update(wasActive: boolean) : void {
// The time to subtract is calculated as the time since the last update, if applicable.
const totalTimeToSubtract : number = this.lastTimeUpdate ? Date.now() - this.lastTimeUpdate : 0;
// Subtract from the unblock interrupt times, if applicable.
let u... | [
"function updateTime() {\n if (trackerTime != 0) {\n // Update the time\n trackerInputBox.value = trackerTime--;\n } else {\n trackerInputBox.value = null;\n myVideo.pause();\n clearInterval(refreshIntervalId);\n\n // We want to make sure that the last interval is sco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get user button to open the GitHub profile | function getUserBtn(user){
const btnUser = document.querySelector("#btn-user");
btnUser.addEventListener("click", function(){
window.open(user.html_url,'_blank' );
});
} | [
"function getGithubPerfil() {\n fetch(URL_GITHUB_PROFILE)\n .then((response) => response.json())\n .then((data) => {\n img_perfil.setAttribute('src', data.avatar_url)\n bio.textContent = data.bio\n login.textContent = data.login\n })\n}",
"function AskUserForToken() {\n $(\"div#overlay... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The number of characters in the current lines array + number of newlines. | function getLength () {
var length = 0;
for (var i = 0, l = lines.length; i < l; i++) {
length += lines[i].length;
}
return length + lines.length - 1; // include '\n's
} | [
"function linesCount(txt){\n if (txt.length === 0){\n return 0;\n } else{\n return txt.split('\\n').length;\n }\n}",
"char_length() {\n return [...this.buf].length;\n }",
"function charCount(txt){\n return txt.length;\n}",
"function countCharacters(arr) {\n\treturn arr.jo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List alert events for a customer. | function listAlertsForCustomer(axios$$1, customerToken, paging) {
var query = '';
if (paging) {
query += '?' + paging;
}
return restAuthGet(axios$$1, 'customers/' + customerToken + '/alerts' + query);
} | [
"function getEvents() {\n\t/// \\todo add /api/events-since/{index} (and change Traffic Monitor to keep latest\n\tajax(\"/publish/EventLog\", function(r) {\n\t\tconst events = JSON.parse(r).events || [];\n\t\tfor (const event of events.slice(lastEvent+1)) {\n\t\t\tlastEvent = event.index;\n\t\t\tconst row = documen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if predictor or indicator formulas references data elements or data sets that are not part of the export | function validateDataElementReference() {
var ids = {};
//Data elements/data sets from indicator formulas
var result;
if (metaData.indicators) {
for (var i = 0; metaData.indicators && i < metaData.indicators.length; i++) {
result = utils.idsFromIndicatorFormula(metaData.indicators[i].numerator,
metaD... | [
"function validateProgramIndicatorReference() {\n\tvar ids = {};\n\n\n\t//Program indicators from indicator formulas\n\tvar result;\n\tif (metaData.indicators) {\n\t\tfor (var i = 0; i < metaData.indicators.length; i++) {\n\t\t\tresult = utils.programIndicatorIdsFromIndicatorFormula(metaData.indicators[i].numerator... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate content for feature watch 1. | function renderWatch1Page(data) {
var page1 = $('.watch1'),
container1 = $('.watch1Stuff')
if(data.length) {
data.forEach(function (item) {
if(item._id == "57af142ffb2fa22659e55c1a") {
container1.find('h2').text(item.name);
container1.find('img').attr('src', item.image.large);
co... | [
"function createFeatureIndexPages(suite) {\n suite.features.forEach((feature) => {\n const featurePage = path.resolve(reportPath, `${FEATURE_FOLDER}/${feature.id}.html`);\n ejs.renderFile(\n path.join(__dirname, '..', 'templates', 'feature-overview.index.ejs'),\n {\n ...{ suite }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
looper(4); 2. Next, try looping just like above except using recursion | function looperRecursive(n){
if (n < 0) {
return console.log("finished");
} else {
console.log(n--);
looperRecursive(n);
}
} | [
"function recursiveFunction(someParam) {\n recursiveFunction(someParam)\n}",
"function printOdds(n) { \n if(n%2 != 0)\n console.log(n)\n if(n == 0) return;\n\n printOdds(n-1)\n}",
"setupLoop(n) {\n const loopTo = this.kToLast2(n);\n if(loopTo === null){\n return loopTo;\n }\n let... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes class "on" from event object | function off(event) {
this.classList.remove("on");
} | [
"off(event, handler) {\n const handlers = this._handlers && this._handlers[event];\n if (!handlers) return;\n handlers.forEach((func, index) => {\n if (func !== handler) return;\n handlers.splice(index, 1);\n });\n }",
"function _removeEvents() {\n BUTTON.removeEventListener('click', ope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check for lin and log and fill data array with correct values | function checkLinLogFillDataset(valueLin, valueLog, colorLin, colorLog, country) {
// check for lin and log
if (linLog == "lin") {
// check if value is a number and fill data array with correct values
checkNumberFillDataset(valueLin, fillDataset(valueLin, colorLin(valueLin), country), co... | [
"function getValues()\n{\n X = parseFloat($(\"#XValor\").val());\n fieldData.splice(0);\n let tempArray = [];\n $(body_wrapper).find(\"input\").each( function(a,b,c) {\n tempArray.push($(this).val());\n });\n\n for(let i=0; i < tempArray.length; i++)\n {\n if(tempArray[i].startsWi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the list name in the database. | function setListName(theListName)
{
listName = theListName;
setProperty(propListName, listName);
} | [
"function changeListNameInAppData(event, newTitle) {\n // const newTitle = event.target.closest('.oneLists').querySelector('.inputTag').value;\n const oldTitle = event.target.closest('.oneLists').querySelector('.tagText').textContent;\n const listInAppData = appData.lists.board.find((DataTitle) => oldTitle === D... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detect if cursor is near the screen edge. Used to disable the jitter fix in 'move' event. | function isInSnapZone() {
const point = electron.screen.getCursorScreenPoint()
const display = electron.screen.getDisplayNearestPoint(point)
// Check if cursor is near the left/right edge of the active display
return (point.x > display.bounds.x - 20 && point.x < display.bounds.x + 20) || (point.x > display.bounds.... | [
"__moveThresholdReached(clientX, clientY) {\n return Math.abs(clientX - this.data.startMouseX) >= this.moveThreshold || Math.abs(clientY - this.data.startMouseY) >= this.moveThreshold;\n }",
"function out_of_screen(){\r\n ax = airplane_pos.worldMatrix[6];\r\n ay = airplane_pos.worldMatrix[7];\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create zoom control elements, bind them to this waveform display, and return them. These are not guaranteed to be a block element. Caller should warp them in a div if that's what they want. | makeZoomControls() {
const label = document.createElement("label");
label.innerText = "Zoom: ";
const input = document.createElement("input");
input.type = "range";
label.appendChild(input);
// We want to flip this horizontally, so make the slider's value
// the n... | [
"makeWaveforms(parent, waveformDisplay, sampleSets) {\n clearElement(parent);\n const zoomControls = document.createElement(\"div\");\n zoomControls.appendChild(waveformDisplay.makeZoomControls());\n parent.appendChild(zoomControls);\n for (const sampleSet of sampleSets) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool KeyAlt; // Keyboard modifier pressed: Alt | get KeyAlt() { return this.native.KeyAlt; } | [
"function isAlt(event) {\n\t\tconst { altSecondaryEnabled } = getSettings();\n\t\treturn event && event.altKey && altSecondaryEnabled;\n\t}",
"keyControl() {\n\n if (keyIsDown(this.activateKey)) {\n this.bossManipulation = true;\n } else {\n this.bossManipulation = false;\n }\n }",
"function... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the given character code, or the character code at the first character, is a word character. | function wordCharacter(character) {
return re$3.test(
typeof character === 'number' ? fromCode$1(character) : character.charAt(0)
)
} | [
"function latinWordStartCheck(contextParams) {\n\t var char = contextParams.current;\n\t var prevChar = contextParams.get(-1);\n\t return (\n\t // ? latin first char\n\t (prevChar === null && isLatinChar(char)) ||\n\t // ? latin char preceded with a non latin char\n\t (!isLatinC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function queries the fuseki dataset to obtain data for the Overview by ICDCode. | function getDataByIcd(icd) {
overviewData = [];
overviewDataSVG = [];
const queryString = "http://localhost:3030/medstats_v2/?query=PREFIX+med%3A+%3Chttp%3A%2F%2Fpurl.org%2Fnet%2Fmedstats%3E%0A%0ASELECT+%3Fjahr+%3Fpe+%3Fpt+%3Fpg%0AWHERE+%7B%0A++%3Fx+med%3Ajahr+%3Fjahr+.%0A++%3Fx+med%3Adiagnose_icd+%22" + icd ... | [
"function getAllCodesAndDescriptions() {\r\n\r\n\t// security measure\r\n\tif(searchArray.length > 15) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst queryString = \"http://localhost:3030/medstats_v2/?query=PREFIX+med%3A+%3Chttp%3A%2F%2Fpurl.org%2Fnet%2Fmedstats%3E%0A%0ASELECT+distinct+%3Fdi+%3Fdt+%0AWHERE+%7B%0A++%3Fx+med... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write the payload of a frame into the given buffer. Only applies to frame types that MAY have both metadata and data. | function writePayload(frame, buffer, encoders, offset) {
if ((0, _RSocketFrame.isMetadata)(frame.flags)) {
if (frame.metadata != null) {
const metaLength = encoders.metadata.byteLength(frame.metadata);
offset = (0, _RSocketBufferUtils.writeUInt24BE)(
buffer,
metaLength,
offset
... | [
"write(buffer) {\n this.wsSocket.send(buffer);\n }",
"writeValue(buffer, value) {\n assert.isBuffer(buffer);\n assert.instanceOf(value, [ArrayBuffer, Uint8Array]);\n buffer\n .addAll(flexInt.makeValueBuffer(value.byteLength))\n .addAll(value);\n }",
"buffe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Base your assertions on the CloudFormation template synthesized by a CDK `Stack`. | static fromStack(stack, templateParsingOptions) {
try {
jsiiDeprecationWarnings.aws_cdk_lib_Stack(stack);
jsiiDeprecationWarnings.aws_cdk_lib_assertions_TemplateParsingOptions(templateParsingOptions);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && err... | [
"static async deployStack(templateFilePath, stackName, bucketName) {\n await this.createBucketIfNotExists(bucketName);\n await KelchCommon.exec('aws cloudformation package --template-file ' + templateFilePath + ' --output-template-file ' + templateFilePath + ' --s3-bucket ' + bucketName + ' --use-json... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an artifact into the cloud assembly. | addArtifact(id, manifest) {
try {
jsiiDeprecationWarnings.aws_cdk_lib_cloud_assembly_schema_ArtifactManifest(manifest);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
Error.captureStackTrace(error, this.addArti... | [
"add( asset ) {\n if ( asset instanceof Asset ) {\n this._assets.set( asset.id, asset );\n } else if ( asset instanceof Array ) {\n asset.forEach( this.add, this );\n } else {\n this.add( this.load( asset ) );\n }\n }",
"static add(fileAsset){\n\t\tl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tells you whether there is touch capabilities detects mobile or iPad or whether we are at mobile | function useTouch() {
return isNativeApp() || $.browser.mobile || navigator.userAgent.match(/iPad/i) != null;
} | [
"get isTouch()\n {\n return \"ontouchstart\" in window;\n }",
"function chkMobile() {\r\n\treturn /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n}",
"function deviceHasTouchScreen() {\n let hasTouchScreen = false;\n if (\"maxTouchPoin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers a Mongoose model, or returns the existing model if registered. | function model({ name, schema, index }) {
if (mongoose.models[name]) {
// the model has already been registered
return mongoose.models[name]
} else {
// register a new model
const ModelSchema = new mongoose.Schema(schema)
if (index) {
ModelSchema.index(index)
}
return mongoose.mode... | [
"static register(modelClass) {\n najs_binding_1.register(modelClass);\n }",
"function getModel(req, res, next) {\n const model = req.params.model; \n switch (model) {\n case 'categories':\n req.model = categoriesModel;\n next();\n return;\n case 'products':\n req.model = productsModel;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The MIME type of the scheme's icon. This is only needed when using `icon_path` and the MIME type cannot be determined from the file contents. (Usually when using an SVG.) | get icon_type() {
return this.args.icon_type;
} | [
"get icon_path() {\n return this.args.icon_path;\n }",
"function getIcon(icons) {\n\t\tvar retval = \"\";\n\t\tif (icons && icons.length) {\n\t\t\tretval = icons[0].url;\n\t\t}\n\t\treturn retval;\n\t}",
"get icon_url() {\n return this.args.icon_url;\n }",
"icon(type, path) {\n if (type... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start the "files per second" chart | function startFilesPerSecondChart(canvasElement)
{
Y.log('Starting files per second chart...', 'debug');
// Initialise the files per second chart
filesPerSecondChart = new SmoothieChart({
grid: { strokeStyle : 'rgb(127, 127, 127)',
fillStyle : 'rgb(0, 0, 0)',
lineWidth ... | [
"function calculateFilesPerSecond() {\n filesPerSecond = fileCounter - tempCounter;\n document.getElementById('fps').innerHTML = filesPerSecond;\n document.getElementById('counter').innerHTML = fileCounter;\n tempCounter = fileCounter;\n}",
"function startCounter() {\n timer = window.setInterval(up... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns lattitude and longitude of the closest point outside the evacution zone relative to the person lattitude and longitude Note: To get a more accurate closest location, maybe get the two closest locations and plot 10 points between them and find the closest point between those 10 | function closestSafeZone(personLong, personLat){
var targetPoint = turf.point([personLat, personLong])
var points;
var poly = turf.polygon(zones[0])
var line = turf.polygonToLine(poly)
return turf.nearestPointOnLine(line, targetPoint)
} | [
"function findMyNearestGardaStation() {\n //console.log(map.getBounds());\n //console.log(map.getBounds().contains(user.getLatLng()));\n //console.log(user.getLatLng().distanceTo(markers[311].getLatLng()));\n\n var closestDist = Number.MAX_SAFE_INTEGER;\n var currentDist;\n for(var i = 0; i < mar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
hiding the Chrome Payment Option in other browsers than chrome | function hideChromePayButton() {
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
if (!isChrome) {
$('.chrome-pay-button-enable').hide();
}
} | [
"function hideAllPaymentOptions() {\n creditCard.style.display = 'none';\n paypal.style.display = 'none';\n bitcoin.style.display = 'none';\n}",
"function paymentOptions(option) {\r\n const ccDIV = document.getElementById(\"credit-card\");\r\n const ppDIV = document.getElementById(\"paypal\");\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Private Methods =============== Methods that shouldn't be used externally Save a morpher to the morpher list so that we can retarget it later | _rememberMorpher (method, morpher) {
this._history[method] = {
morpher: morpher,
caller: this._queue[this._queue.length - 1]
};
// We have to resume the timeline in case a controller
// is already done without beeing ever run
// This can happen when e.g. this is done:
// ... | [
"function Morpher () {\n // Number of parameters loaded\n this._params_loaded = 0;\n // If true, ignore requests to change the coordinates of Z\n this.freeze_coordinates = false;\n // Dimensions along which coordinates of Z will vary\n this.dimension_0 = index_mapping[28];\n this.dimension_1 = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getthe currently selected Vector nodes as an array of Ids. | function getSelectedNodeIds() {
return figma.currentPage.selection.filter(({ type }) => type === "VECTOR").map(({ id }) => id);
} | [
"getObjectIDs() {\n let res = [];\n this.state.selectedCourses.map(function(info) {\n res.push(info._id);\n })\n return res;\n }",
"function getSelectedImagesId() {\n var imageIds = [];\n $( '#sortable > li' ).each( function() {\n imageIds.push( $... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns array of tags, generated from userTags string extracts each word as a tag | function parseWordTagsFromString(userTagsString) {
var tags = [];
// pull out each word 3 or more chars long
if (userTagsString) {
var tagWords = /\W*(\w\w\w+)\W*/g;
var match;
while (match = tagWords.exec(userTagsString)) {
if (match.length >= 1 && match[1])
tags.push(ma... | [
"function parseTags(body) {\n const tagIndex = body.indexOf(\"#\");\n let tags = [];\n if (tagIndex >= 0) {\n tags = body.substring(tagIndex, body.length).split(\"#\");\n tags = tags.reduce((result, tag) => {\n tag = tag.trim();\n if (tag.length > 0) \n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setCurrencyPosition Sets the position for currency, which includes position relative to the numbers and negative sign. cp The position. Use one of the following constants. This method does not automatically put the negative sign at the left or right. They are left by default, and would need to be set right with setNega... | function setCurrencyPositionNF(cp)
{
this.currencyPosition = cp
} | [
"function setCurrencyPrefixNF(cp)\n{\n\tthis.setCurrencyValue(cp);\n\tthis.setCurrencyPosition(this.LEFT_OUTSIDE);\n}",
"function formatCurrency(value, options={}) {\n\n if (value == null) {\n return null;\n }\n\n let maxDigits = options.digits || global_settings.PRICING_DECIMAL_PLACES || 6;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ click listener that zooms to the CBSA | function zoomToClickedFeature(e) {
map.fitBounds(e.target.getBounds());
info.update(e.target.feature.properties.CBSA_Title);
updateBarGraph(e.target.feature.properties.CBSA_Title);
} | [
"function selectZoom() {\r\n\tdocument.querySelector(\"#zoom14\").addEventListener(\"click\", zoom14);\r\n\tdocument.querySelector(\"#zoom15\").addEventListener(\"click\", zoom15);\r\n\tdocument.querySelector(\"#zoom16\").addEventListener(\"click\", zoom16);\r\n}",
"function zoom() {\n airbnbNodeMap.zoom();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the root by looking at the first element in the preorder traversal Find out how many elements are in the left subtree and right subtree by searching for the index of the root in the inorder traversal Recursively reconstruct the left subtree and right subtree | function reconstruct(preorder, inorder) {
const preorderLength = preorder.length;
const inorderLength = inorder.length;
if (preorderLength === 0 && inorderLength === 0) {
return null;
}
if (preorderLength === 1 && inorderLength === 1) {
return new Node(preorder[0]);
}
const root = new Node(preor... | [
"traverseLevelOrder() {\n const root = this._root;\n const queue = [];\n\n if (!root) {\n return;\n }\n queue.push(root);\n\n while (queue.length) {\n const temp = queue.shift();\n console.log(temp.value);\n if (temp.left) {\n queue.push(temp.left);\n }\n if (t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
grab focus and dispatch click event of selected kncell | function selectKnCell(e){
var knCell = keynapse.currentKnCell;
stopKeynapse();
if(knCell.type == 'text'){
$(knCell).focus();
} else {
$(knCell).focus();
$(knCell).trigger("click");
}
} | [
"onCellClickWhileEditing({ event, cellSelector }) {\n const me = this;\n\n // Ignore clicks in the editor.\n if (me.editorContext && !me.editorContext.editor.owns(event.target)) {\n if (me.getEditingContext(cellSelector)) {\n // Attempt to finish the current edit.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the first child of this subtree. | get firstChild() { return this.childAfter(this.start - 1); } | [
"getChildInTree() {\n if (!this._children || this._children.length === 0)\n return null;\n for (var ch of this._children) {\n if (ch.isStartingPerson)\n return ch;\n if (ch.getChildInTree())\n return ch;\n }\n return null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create Daybed models if missing | function install() {
var models = {};
models[model] = {
definition: {
title: 'Daybed Calendar',
description: 'Daybed + Fullcalendar',
fields : [
{name: 'title', type: 'string'},
{name: 'start', type: 'datetime'},
{na... | [
"function createDayEntry() {\n return connect().then(({ collection, client}) => {\n return new Promise((resolve, reject) => {\n let date = new Date();\n let datum = ('0' + date.getDate()).slice(-2) + '.' + ('0' + (date.getMonth() + 1)).slice(-2) + '.' + date.getFullYear();\n collection.findOne({\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |