query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Output tag for the given `test.` | function test(test) {
var attrs = {
classname: test.parent.fullTitle()
, name: test.title
, time: test.duration / 1000
};
if ('failed' == test.state) {
var err = test.err;
attrs.message = escape(err.message);
console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(e... | [
"it(label, f, testTag = null) {\n const tag = this.tag || testTag;\n this.testCases.push({ describeLabel: this.describeLabel, label, f, tag });\n }",
"function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return _setup[\"t\" /* toString */].call(obj) === tag;\n };... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
determine if all staircases are finished | isFinished() {
return this.staircases.every(function(s) {return s.staircase.isComplete();});
} | [
"determineStairCase() {\n\t\t// go to next trial in block\n\t\tthis.trialInBlockIndex++;\n\t\t// if current block and staircase isn't finished, stay in this staircase\n\t\tif (this.trialInBlockIndex < BLOCK_SIZE && !this.getCurrentStaircase().isComplete())\n\t\t\treturn;\n\n\t\t// go to next staircase\n\t\tthis.sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the item value and update table cell if observable item changes | function unwrapItemAndSubscribe(rowIndex, colIndex) {
// Use a data function if provided; otherwise use the column value as a property of the row item
var rowItem = rows[rowIndex], colItem = cols[colIndex],
itemValue = dataItem ? (dataItemIsFunction ? dataItem(rowItem... | [
"onCellValueChanged(newValue) {\n if (this.state.data[newValue.key].expression !== newValue.expression) {\n let data = Object.assign({}, this.state.data, {\n [newValue.key]: newValue\n });\n data = this.evaluateGrid(data);\n this.setState({\n data\n });\n }\n }",
"fun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changes the size of grid when create button is pressed and clear previous cells | function changeGridSize(){
let cellsToDelete = Array.prototype.slice.apply(document.querySelectorAll('.cell'))
cellsToDelete.forEach((cell) => {gridContainer.removeChild(cell)})
let gridValue = gridSize.value
console.log(gridValue,"GV")
createGrid(gridValue)
} | [
"function newGrid (newSize) {\n $('.row').remove();\n createGrid(newSize);\n // $('.column').outerHeight(oldSize*oldPixel/newSize);\n // $('.column').outerWidth(oldSize*oldPixel/newSize);\n}",
"function makeGrid() {\n\n\tcreateGrid($('#inputHeight').val(),$('#inputWidth').val());\n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Completely simplified AJAX Call. Just add a callback. Params: in_uri: The URI to call. Even if it is a POST, you specify the URI as if it were a GET. The class will take care of stripping out the parameters. This parameter is required. in_callback:A function to be called upon completion Your callback should have the fo... | function SimpleAJAXCall ( in_uri, in_callback, in_method, in_param ) {
// The method indicator is actually optional, so we make it GET if nothing was passed.
if ( (typeof in_method == 'undefined') || ((in_method != 'GET')&&(in_method != 'POST')) ) {
in_method = 'GET';
}
in_method = in_method.toUpperCase(... | [
"function MakeNewAJAXCall(in_url, in_simple_callback, in_method, in_complex_callback, in_param, in_param2, in_timeout_callback, in_timeout_delay ){\n\tif(!in_method){\n\t\tin_method = \"GET\";\n\t}\n\tif(!in_timeout_delay){\n\t\tin_timeout_delay = 90;\t// 90 seconds default.\n\t}\n\tvar callback_index = 1;\t// We s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loop through the DOM and transalte | loopAndTranslateDOM() {
const Elements = document.querySelectorAll(
`${this.prms.selectorElementTranslate}, ${this.prms.selectorAttrTranslate}`
);
const clearSelector = this.prms.selectorElementTranslate.replace(/\[|\]/g, '');
const clearSelectorAttr = this.prms.selectorAttrTranslate.replace(/\[|\]/g, '');
... | [
"addTranslatedMessagesToDom_() {\n const elements = document.querySelectorAll('.i18n');\n for (const element of elements) {\n const messageId = element.getAttribute('msgid');\n if (!messageId)\n throw new Error('Element has no msgid attribute: ' + element);\n const translatedMessage =\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an extension that installs JavaScript support features / (completion of [snippets](langjavascript.snippets)). | function javascriptSupport() {
return javascriptSyntax.languageData.of({ autocomplete: completeSnippets(snippets) });
} | [
"function javascriptSupport() {\n return javascriptSyntax.languageData.of({ autocomplete: completeSnippets(snippets) });\n }",
"function jspanel_extensions_es6() {\n // calendar extension excluded because it's only experimental\n return src('source/extensions/**/*.js')\n .pipe(header(header_ban... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this function set the standard journal allocation debit lines | function setStandardJournalDebitLines(recBill,recJE,arrBDD)
{
var stMemo = 'System Generated from Vendor Bill #: ' + recBill.getFieldValue('transactionnumber');
var currentLine = recJE.getLineItemCount('line');
currentLine = (!currentLine || currentLine==0) ? 1 : currentLine + 1;
va... | [
"function setStandardJournalCreditLines(recBill,recJE)\r\n{\r\n //set the journal credit line for expense\r\n var arrSubTab = [];\r\n arrSubTab.push('item');\r\n arrSubTab.push('expense');\r\n \r\n var currentLine = recJE.getLineItemCount('line');\r\n currentLine = (!currentLine || ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensure that a task group with the given name exists and that this task belongs to the group. Returns a Promise that will be resolved when the last task in the group completes. | trackMeInTaskGroup(groupName) {
return this._taskGroupTracker.ensureNamedTaskGroup(groupName, this.id);
} | [
"function createLocalGroup() {\n tm && tm.record('Group_CreateLocal');\n var dfd = new Task(), group = createGroup(dfd.promise);\n pendingHrefs.push(dfd);\n pendingGroups.push(group);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If entityId is null, it means that we require that restrictedAccessHandler does not differentiate based on entityId. This is used in ajaxListWithPermissionsTx. | function filterPermissionsByRestrictedAccessHandler(context, entityTypeId, entityId, permissions, operationMsg) {
if (context.user.restrictedAccessHandler) {
const originalOperations = permissions;
if (context.user.restrictedAccessHandler.permissions) {
const entityPerms = context.user.r... | [
"hasId(entity) {\n return this.metadata.primaryColumns.every(primaryColumn => {\n const columnName = primaryColumn.propertyName;\n return !!entity &&\n entity.hasOwnProperty(columnName) &&\n entity[columnName] !== null &&\n entity[columnName]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pan updateOffset(x, y, tweenFn, tweenDuration, callback) | function updateOffset(x, y, tweenFn, tweenDuration, callback) {
// initialise variables
var tweensComplete = 0;
function updateOffsetAnimationEnd() {
tweensComplete += 1;
if (tweensComplete >= 2) {
panEnd(0, 0);
... | [
"__update_position_hook() {\n for (var i = 0; i < this.__shapes.length; ++i) {\n this.__shapes[i].shape.set_position(this.__position.add(this.__shapes[i].offset));\n }\n }",
"function doPanMovement(e){\n\t\t\t\tvar diff = {\n\t\t\t\t\tx : e.clientX - position.start.x,\n\t\t\t\t\ty : e.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The SingletonLock class acts as a lock to ensure the AbandonManager class cannot be initiated. | function SingletonLock() {} | [
"function SingletonClass() {}",
"get locked() { return false }",
"get locker() {\n return this._locker || (this._locker = new InMemoryLock())\n }",
"lock() {\n if (this.isLocked) {\n throw new Error(\"The stream '\" + this + \"' has already been used.\");\n }\n this.isLocke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UPDATE FUNCTIONS record completion of survey | function completeSurvey(con, aid, survey_id, callback){
var sql = "UPDATE survey_animal SET done = true WHERE aid=" + aid + " AND survey_id=" + survey_id;
con.query(sql, function(err, result){
if (err) {
callback({status: 'failure'});
}
else {
callback({status: 's... | [
"function completeQuestionnaire(con, aid, qid, callback){\n var sql = \"UPDATE questionnaire_animal SET done = true WHERE aid=\" + aid + \" AND qid=\" + qid;\n con.query(sql, function(err, result){\n if (err) {\n callback({status: 'failure'});\n }\n else {\n callback... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a single appendix entry | function removeAppendixEntry(doc) {
if ($('table[name=table_appendix][data-id=' + doc.refers_to + '] > tbody > tr[data-id=' + doc._id + ']').length > 0 ) {
$('table[name=table_appendix][data-id=' + doc.refers_to + '] > tbody > tr[data-id=' + doc._id + ']').remove();
}
} | [
"removeEntry(t) {\n const e = this.docs.get(t);\n e && (this.docs = this.docs.remove(t), this.size -= e.size);\n }",
"function erase(e) {\n database.database_call(`DELETE FROM subnote WHERE id=${id} `);\n alerted.note(\"The current note was deleted!\", 1);\n Alloy.Globals.RenderSubNotesAgain();\n $.vie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check if two partition are equal | function equalPartition(partitionNow, newPartition)
{
partitionNow.sort();
newPartition.sort();
return JSON.stringify(partitionNow)==JSON.stringify(newPartition);
} | [
"static equal(b1, b2) {\n\n var i,j;\n\n if (b1.size != b2.size) {\n console.log('b1 and b2 are of different sizes');\n return false;\n }\n\n for (i=0; i<b1.size; i++) {\n\n for (j=0; j<b1.size; j++) {\n\n if (b1.board[i][j] !== b2.board[i]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Typegoose's global Options | function setGlobalOptions(options) {
(0, utils_1.assertion)(typeof options === 'object', new TypeError('"options" argument needs to be an object!'));
logSettings_1.logger.info('"setGlobalOptions" got called with', options);
for (const key of Object.keys(options)) {
data_1.globalOptions[key] = Object... | [
"function setGlobalOptions(attrs) {\n var self = this;\n self.validationAttrs = attrs; // save in global\n\n return self;\n }",
"function setGenericOptions(dialogOptions) {\n dialogOptions.Resizable = false;\n dialogOptions.ResetOnOpen = true;\n dialogOptions.Modal = true;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generating Native Stellar account and Send 1 XLM from Source Account | function generateNewAddress(){
server.accounts()
.accountId(source.publicKey())
.call()
.then(({ sequence }) => {
const account = new StellarSdk.Account(source.publicKey(), sequence)
const transaction = new StellarSdk.TransactionBuilder(account, {
fee: StellarSdk.BAS... | [
"async function createSaxionWallet(){\n try{\n //maak de wallet aan\n await indy.createWallet(WALLET_NAME, WALLET_CRED)\n LedgerHandler.walletHandle = await indy.openWallet(WALLET_NAME, WALLET_CRED); \n LedgerHandler.dids = {};\n\n //genereer de did die al op de ledger staat m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an object given its QML file name. | function createObject(name, parent)
{
var component;
if (name in components)
component = components[name];
else {
component = Qt.createComponent(name);
if (component == null || component.status != Component.Ready) {
console.log("error loading '" + name + "' component");... | [
"function thing (name, model, implementation)\n{\n console.log(\"creating: \" + name);\n\n var options = url.parse(url.resolve(base, name));\n \n var thing = new function Thing () {\n this._name = name;\n this._uri = options.href;\n this._model = model;\n this._observers = {};\n this._properties ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows the comments in a modal, and allows for the current user to comment | async showComments() {
const modal =
create("qp-popup", {
heading: "Comments",
headingElement: "h3",
}, [
create("div", { class: "comment-list" }, this.comments.map(this.createComment)),
create("span", { class: "help-text" }, [
create("ion-icon", { name: "sad-ou... | [
"function openCommentModal() {\n $( '#discussion-modal' ).foundation('reveal', 'open');\n }",
"function setComments(){\n\t\n\tvar nbFinder = parseInt($('#notebook-modal').attr('nbFinder'), 10);\n\tvar photos = notebooks[nbFinder].photoObjects;\n\tvar finder = parseInt($('#pm-photo').attr('finder'), 10);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create output() function to append a new paragraph element to the div with the id of output. This will produce a constant stream of messages inside the div. | function output(message) {
const para = document.createElement('p');
para.innerHTML = message;
outputDiv.appendChild(para);
} | [
"function displayOutput(out) {\n\t\tdocument.getElementById('output').innerHTML=out;\n\t}",
"write(text) {\n this.element.appendChild(document.createElement(\"div\")).textContent = text\n }",
"function WriteOutput(outputStatement) {\n document.write(\"<p>\" + outputStatement + \"</p>\");\n}",
"function o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the most appropriate Apple platform name given a targetOS list. | function applePlatformName(targetOSList, platformType) {
return applePlatformDirectoryName(targetOSList, platformType).toLowerCase();
} | [
"function applePlatformDirectoryName(targetOSList, platformType, version, throwOnError) {\n var suffixMap = {\n \"device\": \"OS\",\n \"simulator\": \"Simulator\"\n };\n\n for (var key in _platformMap) {\n if (targetOSList.contains(key)) {\n // there are no MacOSXOS or MacOS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle a DCC message by parsing the message and executing any handlers. | DCC(aMessage) {
// If there are no DCC handlers, then don't parse the DCC message.
if (!ircHandlers.hasDCCHandlers) {
return false;
}
// Parse the message and attempt to handle it.
return ircHandlers.handleDCCMessage(this, DCCMessage(aMessage, this));
} | [
"function DCCMessage(aMessage, aAccount) {\n let message = aMessage;\n let params = message.ctcp.param.split(\" \");\n if (params.length < 4) {\n aAccount.ERROR(\"Not enough DCC parameters:\\n\" + JSON.stringify(aMessage));\n return null;\n }\n\n try {\n // Address, port and size should be treated as ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Authenticate livestream entry against stream token and partner limitations. | static authenticate(entryId, token, hostname = null, mediaServerIndex = null, applicationName = null){
let kparams = {};
kparams.entryId = entryId;
kparams.token = token;
kparams.hostname = hostname;
kparams.mediaServerIndex = mediaServerIndex;
kparams.applicationName = applicationName;
return new kaltura... | [
"_checkAuthenticationStatus()\n {\n // First, check if we have the appropriate authentication data. If we do, check it.\n // If we don't, trigger an event to inform of login require.\n if (this._token.value === '')\n {\n Radio.channel('rodan').trigger(RODAN_EVENTS.EVENT__AU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This sets TSLint as the default for any schematics that default to ESLint | function setTSLintDefault() {
return ast_utils_1.updateWorkspaceInTree((json) => {
if (!json.schematics) {
json.schematics = {};
}
json.schematics['@nrwl/workspace'] = { library: { linter: 'tslint' } };
json.schematics['@nrwl/cypress'] = {
'cypress-project': {... | [
"function setESLintDefault() {\n return ast_utils_1.updateWorkspaceInTree((json) => {\n if (!json.schematics) {\n json.schematics = {};\n }\n json.schematics['@nrwl/angular'] = {\n application: { linter: 'eslint' },\n library: { linter: 'eslint' },\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: cauchyRand Returns a random value based on standard Cauchy distribution. This distribution have no mean. Returns: A random value from Infinity to Infinity. | static cauchyRand() {
return Math.tan(Math.PI * (Math.random() - 0.5));
} | [
"static gaussRand() {\n return Math.sqrt(2 * Ex.expRand()) * Math.sin(2 * Math.PI * Math.random());\n }",
"function crystals(min,max){return Math.floor(Math.random()*(max-min))+min;\n}",
"static expRand() {\n return -Math.log(Math.random());\n }",
"function randomNumberGenerator(){\r\nreturn Math.floo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Suppression demande de stage | suppressionDemandeDeStage(id) {
return this.http.delete(this.demandesStagesUrl + id, httpOptions);
} | [
"function confirmerSuppression() {\n let n = new Noty({\n text: 'Confirmer la demande de suppression ',\n layout: 'center', theme: 'sunset', modal: true, type: 'info',\n animation: {\n open: 'animated lightSpeedIn',\n close: 'animated lightSpeedOut'\n },\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns course IDs for courses in given department. Input must be an alluppercase department code. | function findCoursesByDepartment(code) {
var courseIds = [];
var courses = coursesByDepartments[code];
for (var i = 0; i < courses.length; i++) {
courseIds.push(code + '.' + courses[i].cnum);
}
return courseIds;
} | [
"function getDepartmentId(departments, departmentName) {\n for (let i=0; i<departments.length; i++) {\n if (departments[i].name === departmentName) {\n return departments[i].id;\n };\n };\n }",
"GetCourseList(deptId)\n {\n if(this.deptCourses.has(deptId))\n {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate the correct trailing "xx" footer for an NMEA sentence. | function createNmeaChecksumFooter(sentenceWithoutChecksum) {
return "*" + toHexString(computeNmeaChecksum(sentenceWithoutChecksum));
} | [
"_computeMeta() {\n let metaText = '';\n let matches = [];\n if (this.sutta && this.sutta.text) {\n matches = this.sutta.text.match(/<footer>((.|\\n)*)<\\/footer>/);\n }\n try {\n if (matches && matches.length > 0) {\n metaText = matches[1];\n }\n } catch (e) {\n console... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the default word list | setDefaultWordlist(language) {
bip39.setDefaultWordlist(language);
} | [
"function initWord() {\n var ind = randIndex(wordDB.length);\n var randWord = wordDB[ind];\n currentWord = randWord.split('');\n}",
"function resetWords() {\n input.value = '';\n words.forEach(function(word) {\n word.reset();\n });\n}",
"function setUp() {\n wordGen();\n document.getElement... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new FunctionDetector | function FunctionDetector(analyzer) {
IRVisitor.call(this);
// Use this to access parameters and metric. We will not modify its scoped maps directly.
this.analyzer = analyzer;
// Mimics analyzer but for a single scope
this.functionTypeMap = new SingleScopeMap();
this.variableTypeMap = {};
this.variableM... | [
"function createFunction() {\n\tlet hello = \"hello\";\n\tfunction holla() {\n\t\tconsole.log(hello);\n\t}\n\treturn holla;\n}",
"function Function() {\n this.id = \"\";\n this.lang = \"\";\n this.returnType = \"\";\n this.code = \"\";\n }",
"function factory () {\n // Just forwa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shorthand for dispatching an action with a specific type and payload. | action(type, payload) {
var action;
if (payload) {
action = _.extend({}, payload, {actionType: type});
} else {
action = {actionType: type};
}
debug('Action: ' + type, action);
this.dispatch(action);
} | [
"call(actionType, ...params) {\n const handler = this.actions.get(actionType);\n if (!handler) {\n throw new Error(`A handler for ${actionType} has not been registered`);\n }\n return handler(...params);\n }",
"stateActionDispatch (action) {\n this.send('state.action.d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get Current Season ID | async function getCurrentSeasonID() {
const league = await axios.get(
`https://soccer.sportmonks.com/api/v2.0/leagues/${LEAGUE_ID}`,
{
params: {
api_token: process.env.api_token,
},
}
);
return league.data.data.current_season_id;
} | [
"async function getCurrentSeason(){\r\n try{\r\n const league = await axios.get(\r\n `https://soccer.sportmonks.com/api/v2.0/leagues/${LEAGUE_ID}`,\r\n {\r\n params: {\r\n api_token: process.env.api_token,\r\n },\r\n }\r\n );\r\n var current_season_id = league.data.da... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the scope functions of the Controller. | function createScopeFunctions() {
} | [
"_applyScopes() {\n if (this._ignoreScopes.indexOf('*') > -1) {\n return this;\n }\n\n _(this.Model.$globalScopes)\n .filter((scope) => this._ignoreScopes.indexOf(scope.name) <= -1)\n .each((scope) => {\n scope.callback(this);\n });\n\n return this;\n }",
"function runScope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DCT & quantization core | function fDCTQuant(data, fdtbl)
{
var d0, d1, d2, d3, d4, d5, d6, d7;
/* Pass 1: process rows. */
var dataOff=0;
var i;
const I8 = 8;
const I64 = 64;
for (i=0; i<I8; ++i)
{
d0 = data[dataOff];
d1 = data[dataOff+1];
d... | [
"function FFT() {\n\n var _n = 0, // order\n _bitrev = null, // bit reversal table\n _cstb = null; // sin/cos table\n var _tre, _tim;\n\n this.init = function (n) {\n if (n !== 0 && (n & (n - 1)) === 0) {\n _n = n;\n _setVariables();\n _mak... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs a `replaceState` with arguments | replace(url,as,options={}){;({url,as}=prepareUrlAs(this,url,as));return this.change('replaceState',url,as,options);} | [
"updateHistory(flag) {\n this.search.current = `?status=${this.params.status.join('+')}&assignee=${this.params.assignee.join('+')}`;\n if (!flag) window.history.pushState({ state: this.search.current }, this.search.current, ('search' + this.search.current));\n }",
"swapPlaceholder(newText) {\n\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays a boolean (task is overdue or not). React Properties ................ +++++ | Property | Type | Default | Use | +==========+=========+=========+======================================================================+ | value | Boolean | \ | If true, the component displays a red square, else a greyed out one. | ... | function OverdueCell({value, isGroup}) {
const desc = value ? formatStr(MESSAGE_OVERDUE) : formatStr(MESSAGE_NOT_OVERDUE);
return (
<span>
<div
title={desc}
className={helpers.prefixNS(value ? 'overdue' : 'not-overdue')}
/>
{isGroup &&... | [
"displayFlags() {\n const { reducer } = this.props;\n const rows = reducer.flags.map((flag) => {\n return <Flag key={ flag._id } flag={ flag }/>;\n });\n\n return (\n <table className=\"table table-striped\">\n <thead>\n <tr>\n <th>Site</th>\n <th>Type</th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the tabindex of the list option. | _setTabindex(value) {
this._hostElement.setAttribute('tabindex', value + '');
} | [
"function _setTabIndex() {\n\t$(\":input\").each(function (i) { \n\t\t$(this).attr('tabindex', i + 1);\n\t\tif ($(this).hasClass('datepicker') || $(this).hasClass('month')) {\n\t\t\t$(this).next().attr('tabindex', i + 1);\n\t\t}\n\t\t\n\t});\n\t$('.btn-add-row').attr('tabindex', '-1')\n\t$('.remove-row').attr('tabi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
approve a New User on the network | async approveNewUser(ctx, name, aadhar) {
// Verify the CLient is an registar or not
let cid = new ClientIdentity(ctx.stub);
let mspID = cid.getMSPID();
if (mspID !== "registrarMSP") {
throw new Error('You are not authorized to invoke this fuction');
}
// Crea... | [
"async inviteUser () {\n\t\tthis.log('NOTE: Inviting user under one-user-per-org paradigm');\n\t\tconst inviterClass = UserInviter;\n\t\tthis.userInviter = new inviterClass({\n\t\t\trequest: this,\n\t\t\tteam: this.team,\n\t\t\tdelayEmail: this._delayEmail,\n\t\t\tinviteType: this.inviteType,\n\t\t\tuser: this.user... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the Login callback passed to the login component and updates the jwt token | loginUser(token){
this.setState({jwt: token});
// @todo save the token to the local storage
} | [
"function login() {\n //profile will hold user profile info and the token will get us the jwt\n auth.signin({}, function (profile, token) {\n store.set('profile', profile);\n store.set('id_token', token);\n $location.path('/test'); // user is sent t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by PlSqlParserdefault_cost_clause. | visitDefault_cost_clause(ctx) {
return this.visitChildren(ctx);
} | [
"visitNetwork_cost(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitDefault_selectivity_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitCpu_cost(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitCost_matrix_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"docosts1(u,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Worker > WorkerRequest Convert the string worker representation to a WorkerRequest | function jsonToWorkerRequest(worker) {
let parsedWorker = worker.split(/[0-9]/);
let player = parsedWorker[0];
let id = parseInt(worker.substring(worker.length - 1));
return {player: player, id: id};
} | [
"function createWorker(worker) {\n\t if (typeof worker === 'string') {\n\t return new Worker(worker);\n\t }\n\t else {\n\t var blob = new Blob(['self.onmessage = ', worker.toString()], { type: 'text/javascript' });\n\t var url = URL.createObjectURL(blob);\n\t return new Worker(u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a function for getV3SnippetsIdRaw | getV3SnippetsIdRaw(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';
... | [
"getV3SnippetsId(incomingOptions, cb) {\n const Gitlab = require('./dist');\nlet defaultClient = Gitlab.ApiClient.instance;\n// Configure API key authorization: private_token_header\nlet private_token_header = defaultClient.authentications['private_token_header'];\nprivate_token_header.apiKey = 'YOUR API... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FORM / EDIT / Get detailed companies data | function formGetCompanyDataEdit(){
getDetailedFormattedCompanyData(function(data){
$scope.companyDataEdit = data;
$scope.companyDataEditMaster = angular.copy($scope.companyDataEdit);
displayCompanyDataEdit();
})
} | [
"function BindCompany() {\r\n var request = $http({\r\n method: \"GET\",\r\n url: \"/api/Admin/GetCompanyList\"\r\n });\r\n request.success(function (data) {\r\n if (data == '')\r\n return;\r\n $scope.CompanyList = JSON.parse(data);\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tslint:disable Client rect utilities. This file is taken from Angular Material repository. This is the reason why the tslint is disabled on this case. Don't enable it until some custom change is done on this file. Gets a mutable version of an element's bounding `ClientRect`. | function getMutableClientRect(element) {
const clientRect = element.getBoundingClientRect();
// We need to clone the `clientRect` here, because all the values on it are readonly
// and we need to be able to update them. Also we can't use a spread here, because
// the values on a `ClientRect` aren't own ... | [
"function getFirstVisibleRect(element) {\n // find visible clientRect of element itself\n var clientRects = element.getClientRects();\n for (var i = 0; i < clientRects.length; i++) {\n var clientRect = clientRects[i];\n if (isVisible(element, clientRect)) {\n return {element: element, rect: clientRect... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders a component to static markup at the given URL path and calls callback(error, abortReason, markup) when finished. | function renderRoutesToStaticMarkup(routes, path, callback) {
invariant(
ReactElement.isValidElement(routes),
'You must pass a valid ReactComponent to renderRoutesToStaticMarkup'
);
var component = instantiateReactComponent(
cloneRoutesForServerRendering(routes)
);
component.dispatch(pat... | [
"function maybeStaticRenderLater() {\n if (shinyMode && has_jQuery3()) {\n window.jQuery(window.HTMLWidgets.staticRender);\n } else {\n window.HTMLWidgets.staticRender();\n }\n }",
"function render (url) {\n $('.main-content .page').removeClass('visible');\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new SubSurfaceBlock | function SubSurfaceBlock(name) {
var _this = _super.call(this, name, NodeMaterialBlockTargets.Fragment) || this;
_this._isUnique = true;
_this.registerInput("thickness", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Fragment);
_this.registerInput("tintColor... | [
"function addBlock(label) {\n // make sure label is unique identifier\n var newlabel = label;\n var counter = 1;\n var found;\n do {\n found = topBlock.forEachChild(function(child){\n if (child.getLabel() == newlabel) {\n newlabel = lab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if the current page isn't "UserRequests.aspx" and send a notification if there are pending requests. | function notifyUsersRequests(number_user_requests) {
if (window.location.href.split("/").pop() !== "UserRequests.aspx") {
if (number_user_requests !== 0) {
$.notify({
message: 'You have ' + number_user_requests + ' pending user requests! Click here to see more details.',
... | [
"function isUserStillWaiting(request) {\n\treturn false; //Allow user to return the pool for selection.\n}",
"function listOfPendingRequests(){\n\t\tFriendService.listOfPendingRequests().then(function(response){\n\t\t\t$scope.pendingrequests=response.data;\n\t\t},function(response){\n\t\t\tif(response.status==401... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Declines a word using a declination pattern into specified case and number. Global variables: pattern | function declineSingleCase(caseNumberIndex, patternIndex, word) {
if (patternIndex < 0 || patternIndex >= pattern.length || caseNumberIndex < 1 || caseNumberIndex > 14) {
return "???";
}
var word3 = palatalize(word);
var placeholders = [];
var suffixIndex = isPattern(pattern[patternIndex][1], word3, placeholder... | [
"function step4(token) {\n\treturn replacePatterns(token, [['al', ''], ['ance', ''], ['ence', ''], ['er', ''],\n ['ic', ''], ['able', ''], ['ible', ''], ['ant', ''],\n ['ement', ''], ['ment', ''], ['ent', ''], [/([st])ion/, '$1'], ['ou', ''], ['ism', ''],\n ['ate', ''], ['iti', ''], ['ous', ''], ['ive', ''... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List the nichandle.SubAccount objects [PRODUCTION] [See on api.ovh.com]( | ListOfSubaccounts() {
let url = `/me/subAccount`;
return this.client.request('GET', url);
} | [
"function commandListSubaccounts() {\n\treturn getActiveInstance()\n\t.then(instance => instance.getSubaccounts())\n\t.then(subaccounts => {\n\t\tsubaccounts.forEach(subaccount => {\n\t\t\tconsole.log(`${subaccount.regionHost}/${subaccount.subaccount}`);\n\t\t});\n\t});\n}",
"ListOfOVHAccountsTheLoggedAccountHas(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get alert information from API when user clicks link to get alert information for selected park in the list of results const NPS_ALERT_SEARCH_URL = ' | function getAlertDataFromApi(parkTerm, callback) {
const query = {
parkCode: `${parkTerm}`,
// limit: 5,
api_key
};
$.getJSON(`${NPS_SEARCH_URL}/alerts`, query, callback)
.fail(function (jqXHR, error, errorThrown) {
console.log(jqXHR);
console.log(error);
console.log(errorThrown... | [
"function displayParkSearchData(item) {\n const campgroundStringArray = [];\n if (item.data.length == 0) {\n campgroundStringArray.push(`<div class=\"expanded-info\"><p class=\"no-info\">This park does not have any campgrounds.</p></div>`);\n } else {\n $.each(item.data, function (itemkey, itemvalue) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
init intersect(rect1, rect2) Returns the intersecting rect between the two specified XYRect composites | function intersect(rect1, rect2) {
var x1 = Math.max(rect1.x1, rect2.x1),
y1 = Math.max(rect1.y1, rect2.y1),
x2 = Math.min(rect1.x2, rect2.x2),
y2 = Math.min(rect1.y2, rect2.y2),
r = init(x1, y1, x2, y2);
return ((r... | [
"function overlap_rect(o1, o2, buf) {\n\t if (!o1 || !o2) return true;\n\t if (o1.x + o1.w < o2.x - buf || o1.y + o1.h < o2.y - buf || o1.x - buf > o2.x + o2.w || o1.y - buf > o2.y + o2.h) return false;\n\t return true;\n\t }",
"overlap (other = new Rectangle())\n {\n let olWidth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper for initColumnFilters. Builds bootstrappy radio toggle for visibility of table columns in field_options. | function buildToggle(field_options) {
//console.log(field_options,"DYLAN")
var toggle = $("#prototype_container .col-toggle-box").clone();
// Set label text and ID of toggle:
var labelText = $(field_options[0]).data('fieldtype');
toggle.attr('id', labelText+'_toggle');
toggle.find("h4").first().... | [
"function buildCheckdivs(field_options) {\n //console.log(field_options,\"DYLAN\")\n var container = jQuery('<div/>', {\n class: 'colFilters_container'\n });\n container.append(\"<h4>Other Information</h4>\")\n // Build a checkdiv from attr.s of each <th>:\n console.log(\"field options: \" ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creditUSRow calls creditUSRow in index.aspx.cs clears any error message, displays Crediting message and disables the buttons | function creditUSRow(row){
if (formatAmount(document.getElementById('amtCreditUS_'+row),'US')){
CCT.index.creditUSRow(row,gOldUSCreditAmt[row],document.getElementById('emailCreditUS_'+row).value
,document.getElementById('notesCreditUS_'+r... | [
"function creditUSRowCallback(res){ \n document.getElementById(\"mCreditUSTableDiv\").style.display = '';\n document.mForm.mCreditButton.disabled = false;\n \n if (!res.error && !res.value.error){ \n if (res.value.message == \"REFRESH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for mapping each tuple values of success story | function successStoryBasicTupleMapping(val,tupleNo)
{
var mapping = {
'data="{picUrl}"': "src='"+removeNull(val.vspSSPicUrl)+"'",
'{name1}': removeNull(val.NAME1),
'{name2}': removeNull(val.NAME2),
'{vspSuccessImgClass}':"vspSuccessImgCover",
'{storyTuple}': "story"+tupleNo,
'{year}':removeN... | [
"function successStoryContentMapping(successStoryData)\n{\n var mapping = {\n '{title}': \"Success Stories\",\n '{successStories}': removeNull(successStoryData)\n };\n return mapping;\n}",
"function loadSuccessStoryTuples(response)\n{\n var tupleStructure = $(\"#successStoryBasicdiv\").html(),ss... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
4. sorts active players by jersey number, then creates the image and info for each player to print. | function printData(active) {
const sortedNames = active.sort((first, second) => first.Jersey > second.Jersey ? 1 : -1) // idea came from w3schools: https://stackoverflow.com/questions/6712034/sort-array-by-firstname-alphabetically-in-javascript,
sortedNames.forEach(player => {
let div = document.createElement(... | [
"function makeList() {\n PLAYERS.forEach(function(player) {\n let div = document.createElement('div')\n div.className += `${player.name}`\n div.dataset.number = `${player.number}`\n div.innerHTML += `<h3>${player.name} (<em>${player.nickname}</em>)<h3><br><img src=\"${player.photo}\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current progress percentage | function _getProgress() {
// Steps are 0 indexed
var currentStep = parseInt((this._currentStep + 1), 10);
return ((currentStep / this._introItems.length) * 100);
} | [
"get percent() {\n return Math.max(0, (SongManager.player.currentTime - this.startPoint) / (this.endPoint - this.startPoint));\n }",
"function get_current_scroll_percentage() {\n return $window.scrollTop() / get_actual_scroll_distance();\n }",
"get percentage() {\n return this._percen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the top 5 players of the tracked stats in the database | async function mongoFindTopWins() {
console.log(`Finding data in database`);
return await Player.find().sort({ wins: -1 }).limit(5);
} | [
"async function mongoFindTopKills() {\n console.log(`Finding data in database`);\n return await Player.find().sort({ kills: -1 }).limit(5);\n}",
"function top() {\n\treturn db.users.aggregate({$sort:{\"points\":-1}},{$limit:3});\n}",
"function getTopCrimePlayers() {\r\n\t\t$.get('http://nflarrest.com/api/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reset the value of all form fields on project form | function projectResetForm(){
$('.field-project-id').val('');
$('.field-project-name').val('');
$('.field-project-description').val('');
} | [
"function clear_form(){\n $(form_fields.all).val('');\n }",
"function clearFormFields() {\n newTaskNameInput.value = \"\";\n newTaskDescription.value = \"\";\n newTaskAssignedTo.value = \"\";\n newTaskDueDate.value = \"\";\n newTaskStatus.value = \"\";\n}",
"function testcaseResetForm(){\n $('... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
shovel the bitcoin (bitsocket) message on to the local bus | function shovelToLocalBus(msg) {
//announce to the local bus that a bitcoin tx has been broadcast
localbus_pub.publish(CHANNEL_READER, msg);
} | [
"function shovelToBitcoin(message) {\n console.log(`shoveling to bitcoin ${message}`);\n datacash.send({\n data: [\"0x6d02\", message],\n cash: { key: wallet.wif }\n });\n //TODO:should raise event saying that tx was sent\n}",
"function sendBinaryMessage(buffer) {\n lock=1;\n iridium.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove availbility key from each car object so that it can be added using the availbility service API call this is so I can use one dummy data object | function removeAvailabilityKey(car) {
const { id, img, make, model, year } = car;
return {
id,
img,
make,
model,
year
};
} | [
"function removeItemPropeties (data) {\n\tdelete data.name;\n\tdelete data.type;\n\tdelete data.external_id;\n\n\tfor (var key in data) {\n\t\tif (key.startsWith('sitemap_locations')) {\n\t\t\tdelete data[key];\n\t\t} \n\t}\n\n\treturn data;\n}",
"async function getData() {\n \n /*\n const carsDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queues up ids, making sure not to readd id's we have seen before during this run | queueIds(ids) {
ids
.filter(id => !this.seen[id])
.forEach(id => {
this.queue.push(id)
this.seen[id] = true
})
} | [
"function updateNextQid() {\n\tif (unseenQids.length != 0) {\n\t\tcurrQid = unseenQids.splice(0, 1)[0];\n\t}\n}",
"function StickyIdMaker() {\n this.highId = 0;\n this.spare = [];\n}",
"function queueSongs (songs) {\n\n\t\tvar ids = songs.map(function (song) {\n\t\t\treturn song.id;\n\t\t});\n\n\t\tViews.addN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replace asset links in css and html files with reved name | revReplace() {
if (this.css.length > 0) {
this.css.forEach((css, index, arry) => {
if (this.images.length > 0 && css.assets.length > 0 && !css.isInBundle) {
const images = this.images;
const rewriter = new URLRewriter(function (url) {
... | [
"function asset(url){\n if(url.match(/^(?:https?\\:)\\/\\//)) return url;\n else return 'assets/' + url;\n}",
"getStyleAssets() {\n if (this.css.length > 0) {\n this.css.forEach((css, index, arry) => {\n const rewriter = new URLRewriter(function (url) {\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the prefix to be added to all CSS classes when writing output | function CP_setCssPrefix(val) {
this.cssPrefix = val;
} | [
"function prefix_css(css_data) {\n log('Prefixing the CSS');\n return q.resolve(processor.process(css_data).css);\n}",
"setComponentClasses() {\n this._codeblockRender.setAttribute(\"class\", this.codePrismLanguage());\n this._codeblockRenderOuterPreTag.setAttribute(\"class\", this.appliedCssClasss());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates .onion address and RSA1024 private key for it | generateOnionService(){
let pkraw = forge.rsa.generateKeyPair(1024);
let pkfp = forge.pki.getPublicKeyFingerprint(pkraw.publicKey, {encoding: 'hex', md: forge.md.sha1.create()})
let pem = forge.pki.privateKeyToPem(pkraw.privateKey);
if (pkfp.length % 2 !== 0) {
// odd number... | [
"generatePrivateKey() {\n // Generates 64 hexadecimal values then concatenates all 64 values\n let r = [];\n for (let i = 0; i < 64; i++) {\n r.push(this.random.integer(0, 15).toString(16));\n }\n return r.join('');\n }",
"function generateAndSetKeypair () {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tuple4Of(a, b, c, d) Sentinel value for when an tuple4 of a particular type is needed: tuple4Of(Number, Number, Number, Number) | function tuple4Of(a, b, c, d) {
var self = getInstance(this, tuple4Of);
self.types = rest(arguments);
return self;
} | [
"function tuple5Of(a, b, c, d, e) {\n var self = getInstance(this, tuple5Of);\n self.types = rest(arguments);\n return self;\n}",
"function field4(_this) /* forall<a,b,c,d> ((a, b, c, d)) -> d */ {\n return _this.field4;\n}",
"function tuple3Of(a, b, c) {\n var self = getInstance(this, tuple3Of);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the first day of the week from the locale data. Defaults to 'world' territory if no territory is derivable from CLDR. Failing to use CLDR supplemental (not loaded?), revert to the original method of getting first day of week. | function firstOfWeek(culture) {
try {
var days = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
var cldr = locale(culture).cldr;
var territory = cldr.attributes.territory;
var weekData = cldr.get('supplemental').weekData;
var firstDay = weekData.firstDay[territory || '001'];
... | [
"function firstOfWeek(culture) {\n try {\n var days = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];\n var cldr = locale(culture).cldr;\n var territory = cldr.attributes.territory;\n var weekData = cldr.get('supplemental').weekData;\n var firstDay = weekData.firstDay[territory || '00... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action that toggle editing of the corresponding comment. | toggleEdit() {
this.toggleProperty('isEditing');
} | [
"function commentEdit(id) {\n var comment = jQuery('#comment-' + id);\n var content = comment.find('.comment-text');\n\n comment.find('.comment-edit').hide();\n\n var form = jQuery(template('template-comment-edit', {\n id: id,\n content: content.text()\n }))\n .find('.comment-edit-abort')\n .clic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pause the MediaSource if it is playing. | pause(){
console.debug("Pausing", this.id);
this.playing = false;
for (let i = 0; i < this.mediaSourceListeners.length; i++) {
if(typeof this.mediaSourceListeners[i].pause === 'function')this.mediaSourceListeners[i].pause(this);
}
} | [
"play(){\n //console.log(\"Playing\", this.id);\n if (this.playing === false){\n for (let i = 0; i < this.mediaSourceListeners.length; i++) {\n if(typeof this.mediaSourceListeners[i].play === 'function')this.mediaSourceListeners[i].play(this);\n } \n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finalizes and returns the results of a sliced path query. | finalizeSlicedFindPath() {
let path = [];
if (this.m_query.status == Status.FAILURE) {
// Reset query.
this.m_query = new QueryData();
return new FindPathResult(Status.FAILURE, path);
}
if (this.m_query.startRef == this.m_query.endRef) {
// Special case: the search starts and ends at same poly.
... | [
"function slice () {\n if (settings.vshrink || settings.hshrink) {\n var slices = {};\n if (settings.vshrink) {\n slices['rows'] = getRows();\n }\n if (settings.hshrink) {\n slices['cols'] = getCols();\n }\n return slices;\n }\n else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes an instance reference | deleteInstance(instance) {
this.instances.remove(instance)
} | [
"delete(){\n\t\tif (removeFromReferenceCount(this.index) === 0){\n\t\t\tthis.gl.deleteTexture(this.texture);\n\t\t}\n }",
"destroy () {\n this.group.remove(this.sprite, true, true);\n this.gameObjectsGroup.destroyMember(this);\n }",
"delete () {\n\t\t// This is to call the parent class's del... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Problem 4 Create a function with two parameters. This function will be passed two numbers as arguments. Calculate the sum of the parameters. If the sum is less than or equal to 25, the function should return true. If not it should return false. Be sure to use an appropriate function name. | function check(num1, num2) {
var sum = 0;
sum = sum + num1 + num2;
if (sum <= 25) {
console.log("true")
} else {
console.log("false")
}
} | [
"function totalUnderWhat (first, second, third, fourth){\n if (first + second +third < fourth) {\n return true;\n\n } else {return false;\n\n }\n\n}",
"function checkNumbers(a, b) {\n if (a === 50 || b === 50 || a + b === 50) return true;\n}",
"function checkTwoGivenIntegers(int1, int2) {\n let sum = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add a new placeholder | function registerPlaceholder(placeholder) {
$scope.placeholders.push(placeholder);
} | [
"function insertPlaceholder( start ) {\n\t\t\t\t\tfor (var idx = start, insertChar = options.placeholder; idx < maskLen; idx++) {\n\t\t\t\t\t\tif (inputCharTests[idx]) {\n\t\t\t\t\t\t\tvar testIdx = getNextTestIdx(idx);\n\t\t\t\t\t\t\tvar bufChr = bufferArr[idx];\n\t\t\t\t\t\t\tbufferArr[idx] = insertChar;\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use the source and channels to draw effect to target context; mouse position (as with all positions) are stored from the bottom left corner as this is how texture data is stored | draw(timeVal = 0, mouseX = 0, mouseY = 0) {
this.gl.activeTexture(this.gl.TEXTURE0 + settings_1.settings.offset);
this.gl.bindTexture(this.gl.TEXTURE_2D, this.tex.back.tex);
sendTexture(this.gl, this.source);
// TODO only do unbinding and rebinding in texture mode
// TODO see if ... | [
"copyTexImage2D(ctx, funcName, args) {\n const [target, level, internalFormat, x, y, width, height, border] = args;\n const info = getTextureInfo(target);\n updateMipLevel(info, target, level, internalFormat, width, height, 1, UNSIGNED_BYTE);\n }",
"_drawAndSample({\n layers,\n views,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handler for Bands In Town API command | function bandsInTownCommand(artist) {
if(!artist) artist = "REO Speedwagon"
// if (process.argv[3]) artist = process.argv[3]
let bitURL = `http://rest.bandsintown.com/artists/${artist}/events?app_id=${keys.bandsInTown.appID}&date=upcoming`
request(bitURL, (error, response,body) => {
if (er... | [
"function handleCommand(cmd,argu,id) {\r\n words = argu.split(\" \");\r\n switch(cmd.toLowerCase()) {\r\n case \"yell\":\r\n case \"say\": respond(argu); break; \r\n case \"kick\": kick(id,\"Requested.\"); break;\r\n case \"ban\": ban(id,\"Requested\", argu[1]);\r\n case \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load a model from a file into a VAO and return the VAO. | function loadModel(filename) {
return fetch(filename)
.then(r => r.json())
.then(raw_model => {
// Create and bind the VAO
let vao = gl.createVertexArray();
gl.bindVertexArray(vao);
// Load the vertex coordinate data onto the GPU and assoc... | [
"function LoadOBJObject() {\r\n var mtlLoader = new THREE.MTLLoader();\r\n mtlLoader.setResourcePath(tempStorePath + lastUploadedObjectName.split(\".\")[0] + '/');\r\n mtlLoader.setPath(tempStorePath + lastUploadedObjectName.split(\".\")[0] + '/');\r\n mtlLoader.load(lastUploadedObjectName.split(\".\")[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changes background color of element on mouse out | function mouseOut() {
document.getElementById("mouse").style.backgroundColor = "yellow";
} | [
"function elementMouseout(e){\n\t\t\tapplyBg(this,\"jQueryMultipleBgStaticSelector\");\n\t\t}",
"function mouseOut() {\r\n document.getElementsByTagName(\"strong\").style.backgroundColor = \"black\";\r\n}",
"function mouseOver(){\r\n document.getElementById(\"rb\").style.color=\"red\";\r\n}",
"function ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parentHashes() parses `str` as a commit and returns the tree it points at. | treeHash(str) {
if (Objects.type(str) === 'commit') {
return str.split(/\s/)[1];
}
} | [
"parentHashes(str) {\n if (Objects.type(str) === 'commit') {\n return str.split('\\n')\n .filter(line => line.match(/^parent/))\n .map(line => line.split(' ')[1]);\n }\n }",
"ancestors(commitHash) {\n const parents = Objects.parentHashes(Objects.read(commitHash));\n return Util.fla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds all sends that subComm with the given action. | function findSubCommsFor(action, sendsMap) {
return sendsMap.get(action.chan, Set()).filter((send) => subcommable(action, send) !== false);
} | [
"function subcommable(action, send) {\n if (structEquiv(action.chan, send.chan)) {\n return patternMatch(action.pattern, send.message);\n }\n\n return false;\n}",
"function commable(actions, sends) {\n if (actions.size === 0 && sends.size === 0) {\n return new Map();\n }\n\n let action = actions.first... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generic call with multiple type parameters and only one used in parameter type annotation | function someGenerics1(n, m) {} | [
"function someGenerics6(strs, a, b, c) {}",
"function complexGenericBehavior (fn, value) { /* Do complicated stuff here */ }",
"function fillMissingTypeArguments( typeArguments: Type[] | undefined, typeParameters: TypeParameter[] | undefined, minTypeArgumentCount: number, isJavaScriptImplicitAny: boolean )\n{\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Navigation bar Add a navigation bar on top of all slides and populate it with sections and subsections as read from the presentation. A new section is started by a slide with a datasection attribute. This attribute stands for the title of the new section. A datassection attribute may be added to provide a short name fo... | function add_navigation_bar() {
let nav=document.createElement('nav');
nav.setAttribute('id','minitoc');
document.body.insertAdjacentElement('afterbegin',nav);
let csection=null;
let csubsection=null;
for (let slide of slides) if (slide['id']!='outline') {
if (slide['section']) {
let sname=slide['ssection'] ... | [
"function addSlidesNavigation(section,numSlides){appendTo(createElementFromHTML('<div class=\"'+SLIDES_NAV+'\"><ul></ul></div>'),section);var nav=$(SLIDES_NAV_SEL,section)[0];//top or bottom\naddClass(nav,'fp-'+options.slidesNavPosition);for(var i=0;i<numSlides;i++){appendTo(createElementFromHTML('<li><a href=\"#\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a function for postV3UsersIdKeys | postV3UsersIdKeys(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';
/... | [
"postV3UserKeys(incomingOptions, cb) {\n const Gitlab = require('./dist');\nlet defaultClient = Gitlab.ApiClient.instance;\n// Configure API key authorization: private_token_header\nlet private_token_header = defaultClient.authentications['private_token_header'];\nprivate_token_header.apiKey = 'YOUR API ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for table for active coupons on seller page | function callSellerTabel(tableState) {
var params = {
couponId: $state.params.id,
page: tableState.pagination.start,
search: typeof tableState.search.predicateObject == "undefined" || Object.keys(tableState.search.predicateObject).length == 0 ? "" : tableState... | [
"function fundsPrices() {\n loadTable();\n loadShowAll_btn();\n }",
"function changeProductMarketTable() {\r\n\r\n\t\t$( \".dataTable\" ).find( \"input[type='text']\" ).addClass( \"inputTextTable\" );\r\n\t\tvar submit = $( \".dataTable\" ).find( \"input[type='submit']\" ).addClass( \"inputSubmitTable\" );... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION NAME : loadDeleteConfigOk AUTHOR : Mark Anthony Elbambo DATE : December 17, 2013 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : deletes configuration PARAMETERS : | function loadDeleteConfigOk(confName,mainid,fileType,all){
if(globalDeviceType=="Mobile"){
loading('show');
}
if (globalInfoType == "XML"){
if(all == true){
var qry = "ConfigName="+confName+"&MainId="+mainid;
}else{
var qry = "ConfigName="+confName+"&MainId="+mainid+"&FileType="+fileType;
}
}else{
c... | [
"function reloadConfig() {\n saveConfig(true);\n if (typeof localStorage !== \"undefined\") {\n _drawMode.selectedObject = undefined;\n config = localStorage.getItem(\"config\");\n loadConfig(new Blob([config], {type: \"text/plain;charset=utf-8\"}));\n }\n}",
"function confirmConfig(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POST /teams/:id/edit process editteam. | static async processEdit(ctx) {
if (ctx.state.auth.user.Role != 'admin') {
ctx.flash = { _error: 'Team management requires admin privileges' };
return ctx.response.redirect('/login'+ctx.request.url);
}
const body = ctx.request.body;
// update team details
... | [
"static async edit(ctx) {\n // team details\n const team = await Team.get(ctx.params.id);\n if (!team) ctx.throw(404, 'Team not found');\n if (ctx.flash.formdata) Object.assign(team, ctx.flash.formdata); // failed validation? fill in previous values\n\n // team members\n co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this function displays the done list | function displayDoneList() {
var doneData = getFromSession("donelist");
var finalTemplate = "";
var index;
for(index = 0; index<doneData.length; index++) {
finalTemplate = finalTemplate + `<tr>
<td align="left" valign="top" style="padding: 5px;">${index+1}</td>
<td align="le... | [
"function handleDoneList(e) {\n const li = e.target.parentNode.parentNode;\n finishNoList.style.display = \"none\";\n handleCreateFinished(li.innerText);\n\n handleDelToDos(e);\n}",
"function displaytodo(todo) {\r\n console.log(\"Display\")\r\n if (todo.state == 0) {\r\n // create an item on the pend... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Trims given path so that it follows this rule: /path/like/that | function trimPath(path) {
if (path.indexOf("#") == 0) path = path.substr(1);
path = ("/" + path + "/").replace(/(\/+)/g, "/");
return path.substring(0, path.length - 1);
} | [
"function normalizePath(path) {\n if (!path.endsWith(\"/\") && !path.endsWith(\"\\\\\")) {\n return path + \"/\";\n }\n return path;\n}",
"function cleanURL(path) {\n var cleanPath = path.replace(/\\/study\\/.+?(?=\\/|$)/, '/study'); // to strip study name (/study/leap to /study)\n return cleanPat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
nasumicno generisanje sadrzaja za svaki element owlcarousela | function owlCarouselContent(){
generate();
let brojElemenataCarousel = 6;
let parent = document.getElementById("automobili");
let child = document.createElement("div");
child.classList.add("owl-carousel", "first-owl");
parent.appendChild(child);
for(let i ... | [
"function owl_main_carousel() {\r\n //owl slider\r\n var owl = $(\"#main-carousel\");\r\n owl.owlCarousel({\r\n nav: true, // Show next and prev buttons\r\n smartSpeed: 1000,\r\n dotsSpeed: 1000,\r\n dragEndSpeed: true,\r\n dragEndSpeed: 10... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
IMGUI_API void AddDrawCmd(); // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same drawcall as much as possible | AddDrawCmd() { this.native.AddDrawCmd(); } | [
"function menuDrawClick() {\n Data.Edit.Mode = EditModes.Draw;\n updateMenu();\n}",
"function ToggleDraw(){\n self.canvas.isDrawingMode = !self.canvas.isDrawingMode;\n }",
"drawExtraUI() {\n // draw the button for canceling ability if an ability is being used if it has not... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Settings Checks each tab object for settings, if they don't exist assign them to the object. | function assignBaseSettings(tabs, callback) {
for(var i = 0;i<tabs.length;i++){
tabs[i].reload = (tabs[i].reload || settings.reload);
tabs[i].seconds = (tabs[i].seconds || settings.seconds);
};
callback(tabs);
} | [
"function assignSettingsToTabs(tabs, callback){\n\tassignBaseSettings(tabs, function(){\n\t\tassignAdvancedSettings(tabs, function(){\n\t\t\tcallback();\n\t\t});\t\n\t});\n}",
"function assignAdvancedSettings(tabs, callback) {\n\tfor(var y=0;y<tabs.length;y++){\n\t\tfor(var i=0;i<advSettings.length;i++){\n\t\t\ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The List component takes the cardKeys passed in from the App.js and for each card key, accesses the obj inside that card key and creates a Card component using the card key to access the data inside that key:obj | function List(props) {
const cards = props.cardIds.map(card => (
<Card
key={card.id}
id={card.id}
title={card.title}
content={card.content}
onDeleteCard={props.onDeleteItem}
/>
));
return (
<section className="List">
<header className="List-header">
<h2>{pr... | [
"createAggregatedCards(keyValue) {\n let currItem = this.props.aggregatedItems[keyValue];\n return (\n <Card style={cardWrapper}>\n <Card.Img variant=\"top\" src={currItem.image} />\n <Card.Body>\n <Card.Title>{keyValue}</Card.Title>\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to delete single choice option | function deleteSingleChoiceOption(id) {
$('#singlechoice_' + id).remove();
} | [
"deleteSelectedModel(){\n // get the id of the selected model.\n let deleteId = parseInt(this.getSelectedModel());\n // if it was alreay deleted.\n if(deleteId == -1) {\n return;\n }\n\n this.__modelSelect.querySelector('.custom-select__trigger span').setAttribut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uses the http server to create a websocket. | makeWebSocket() {
new WebSocket(this.server);
} | [
"function connect() {\n socket = new WebSocket('wss://' + get('server') + '/api/connect');\n socket.onopen = onopen;\n socket.onmessage = onmessage;\n socket.onerror = onerror;\n socket.onclose = onclose;\n }",
"function start_ws() {\n if (!CLIENT) {\n CLIENT = new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to do an ajax call for swapping offer codes in case of Pay Later payment method. | function swapOfferCode(payMethod){
jQuery.getJSON(
app.getdepend.resources.get('updateSupplyURL'),
{
pid : jQuery('.coreProductID').val(),
isKit : 'true',
paymentMethodChange : 'true',
paymentMethod : payMethod
},
function(supply) {
if (supply.success) {
swapFreeVitami... | [
"function swapPaypalOfferCodeandSubmit(f){\t\r\n\t\t jQuery.getJSON(\r\n\t\t\t\t\tapp.getdepend.resources.get('updateSupplyURL'),\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpid : jQuery('.coreProductID').val(),\r\n\t\t\t\t\t\tisKit : 'true',\r\n\t\t\t\t\t\tpaymentMethodChange : 'true',\r\n\t\t\t\t\t\tpaymentMethod : 'PayPal'\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HELPERS returns true if the enter key was pressed | function enterPressed(event) {
event = event || window.event;
if(event.which) { return(event.which == 13); }
else { return(event.keyCode == 13); }
} | [
"function VerificarEnter(evt) {\r\n var charCode=(evt.which)?evt.which:evt.keyCode\r\n if(charCode==13){\r\n return false;\r\n }\r\n return true;\r\n }",
"function checkKey(){\n\tif (window.event && window.event.keyCode == 13){\n\t return makeRequest('/cgi-bin/ccmel/calculate.pl');\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if a double tap events have been registered | function hasDoubleTap() {
//Enure we dont return 0 or null for false values
return !!(options.doubleTap);
} | [
"get isTouch()\n {\n return \"ontouchstart\" in window;\n }",
"function isStillTap(){\n var max = arrayMax(piezoTrack); piezoTrack = [];\n return (max==undefined || max>config.piezoTreshold);\n}",
"function deviceHasTouchScreen() {\n let hasTouch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AUXILIAR FUNCTIONS Check if cell is not a link | function isNotLink(cell) {
if (cell.attributes.type !== 'link') return true;
} | [
"hasLink() {\n return !!this.link;\n }",
"function nodeInLink(textNode) {\n var curNode = textNode;\n while (curNode) {\n if (curNode.tagName == 'A')\n\t return true;\n else\n\t curNode = curNode.parentNode;\n\t}\n return false;\n}",
"function checkInputLink(originalLink) {\n if(originalLink... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Kills the executing process with matching pid. | function krnKillProcess(pid)
{
_Scheduler.removeFromSchedule(_CPU, parseInt(pid,10));
} | [
"kill() {\n children.forEach( (child) => {\n child.stdin.pause();\n child.kill();\n });\n }",
"_launchKiller(parentPid, childPid) {\n this.debug(`_launchKiller: Launching Killer Process (parent: ${parentPid}, child: ${childPid})`);\n // spawn process which kills itself and mongo pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set a legend condition key | function setLegendCondition(key) {
legendConditions[key] = true;
} | [
"function setSwitch() {\r\n if (document.getElementById(\"rb5\").checked) {\r\n legend.switchType = \"x\";\r\n } else {\r\n legend.switchType = \"v\";\r\n }\r\n legend.validateNow();\r\n }",
"updateLegendL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a function for calculating the percentage of a shape's perimeter by length that is composed of inner (shared) boundaries | function getInnerPctCalcFunction(arcs, shapes) {
var calcSegLen = arcs.isPlanar() ? geom.distance2D : geom.greatCircleDistance;
var arcIndex = new ArcTopologyIndex(arcs, shapes);
var outerLen, innerLen, arcLen; // temp variables
return function(shp) {
outerLen = 0;
innerLen = 0;
if (shp) shp.forEac... | [
"function calcPolsbyPopperCompactness(area, perimeter) {\n if (perimeter <= 0) return 0;\n return Math.abs(area) * Math.PI * 4 / (perimeter * perimeter);\n}",
"function calculateCirclePerimeter() {\n return this.radius * 2 * Math.PI;\n}",
"function perimeter$1 (len, wid) {\n const a = 0.5 * len\n const b =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a [[SolidDataset]], verify whether its Access Control List is accessible to the current user. This should generally only be true for SolidDatasets fetched by [[getSolidDatasetWithAcl]]. Please note that the Web Access Control specification is not yet finalised, and hence, this function is still experimental and c... | function hasAccessibleAcl(dataset) {
return typeof dataset.internal_resourceInfo.aclUrl === "string";
} | [
"async function getSolidDatasetWithAcl(url, options = internal_defaultFetchOptions) {\n const solidDataset = await getSolidDataset(url, options);\n const acl = await internal_fetchAcl(solidDataset, options);\n return internal_setAcl(solidDataset, acl);\n}",
"function verifyPermission() {\n let user = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |