query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Gets or sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. | get minorTickEndExtent() {
return this.i.b6;
} | [
"function beforeSetTickPositions() {\n // If autoConnect is true, polygonal grid lines are connected, and\n // one closestPointRange is added to the X axis to prevent the last\n // point from overlapping the first.\n this.autoConnect = (this.isCircular &&\n typeof pick(this.us... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move cell to the position of the current cell, and if the values are the same their values merge | transitionTo(otherCell) {
var newX = this.x + 0;
var newY = this.y + 0;
this.x = otherCell.x + 0;
this.y = otherCell.y + 0;
otherCell.x = newX;
otherCell.y = newY;
if (otherCell.value == this.value) {
otherCell.value = 0;
otherCell.reset... | [
"function moveNumberCellToEmpty(cell, playingOrShuffling) {\n // Checks if selected cell has number\n if (cell.className != \"empty\") {\n // Tries to get empty adjacent cell\n let emptyCell = getEmptyAdjacentCellIfExists(cell);\n \n if (emptyCell) {\n if (playingOrShuffling... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resolve a component by its name string. Supports nested components delimited by a "/" | resolveComponent(name) {
if (typeof name !== "string") return false;
name = name.split("/");
return name.reduce((acc, chunk) => (acc[chunk]), this.components);
} | [
"AliasComponent(string, string, string, string, string) {\n\n }",
"ImportComponent(string, string) {\n\n }",
"function componentize(name) {\n let dasherized = dasherize(name);\n return hasDash(dasherized) ? dasherized : `${dasherized}-app`;\n}",
"function parseWebModuleSpecifier(specifier, knownDepend... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stick to center top | setStickToCenterTop() {
this.logger.debug('setStickToCenterTop');
this.view.get$item().stickToCenterTop(this.controller.getContainment());
} | [
"setStickToCenterBottom() {\n this.logger.debug('setStickToCenterBottom');\n this.view.get$item().stickToCenterBottom(this.controller.getContainment());\n }",
"setStickToTopLeft() {\n this.logger.debug('setStickToTopLeft');\n this.view.get$item().stickToTopLeft(this.controller.getContainment());\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
`_isHeading` returns true if the given element is a ``. | _isHeading(elem) {
return elem.tagName.toLowerCase() === 'howto-accordion-heading';
} | [
"function getHeadingInfo(cell) {\n if (!(cell instanceof MarkdownCell)) {\n return { isHeading: false, headingLevel: 7 };\n }\n let level = cell.headingInfo.level;\n let collapsed = cell.headingCollapsed;\n return { isHeading: level > 0, headingLevel: level, collapsed: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
close function for hamburger | function closeMenu(){
/*This remove the hamburger bar after body is clicked
$('.toggle').fadeOut(200);*/
$('.item').removeClass('active');
} | [
"function closeBurgerMenu() {\n $menuBurgerOverlay.removeClass('open');\n $body.removeClass('overflow');\n }",
"function openHamburger() {\n\t\t$(\"#hamburgerClass\").css(\"width\", \"250px\");\n}//end function openHamburger",
"function close()\n{\n\tif(menuitem) menuitem.style.visibility = 'hidden'; // ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Yargs command handler for building a release. | function handler(args) {
return __awaiter(this, void 0, void 0, function* () {
const { npmPackages } = getReleaseConfig();
let builtPackages = yield buildReleaseOutput(true);
// If package building failed, print an error and exit with an error code.
if (builtPackages === null) {
... | [
"function createRelease(envName, cb){\n mess.load(\"Creating/Updating release branch\");\n perf.start(\"Creating/Updating release branch\");\n git.getCurrentBranch((startingBranch) => {\n var releaseBranch = config.releaseName();\n if(startingBranch === releaseBranch) startingBranch = 'master... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate an external link (icon only) | function setExternalLinkIcon(url) {
return '<a href="'+url+'" class="glyphicon glyphicon-new-window external-link" title="External link" target="_blank"></a>';
} | [
"function getIconUrl(entry) {\n\tvar url = entry.iconurl;\n\tif (!url)\n\t\t// unknown - relative to HTML\n\t\treturn \"icons/_blank.png\";\n\t\n\t// Used on this device: \n\t// build global address (with prefix), \n\t// but try cache if possible (from cache path and prefix)\n\tif (entry.iconpath && entry.prefix) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Look up a translation for the given phrase (via the / [`phrases`](state.EditorState^phrases) facet), or return the / original string if no translation is found. | phrase(phrase) {
for (let map of this.facet(EditorState.phrases))
if (Object.prototype.hasOwnProperty.call(map, phrase))
return map[phrase];
return phrase;
} | [
"phrase(phrase) {\n for (let map of this.facet(dist_EditorState.phrases))\n if (Object.prototype.hasOwnProperty.call(map, phrase))\n return map[phrase];\n return phrase;\n }",
"function displayPhrase(id) {\n if (id != null) {\n var phrase = phrases[id];\n\n if (ph... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper returns a function that can only be called 10 times before it throws an error | function protectAgainstInfiniteLoops(func) {
var counter = 0;
return function() {
counter += 1;
if (counter > 10) {
throw new Error("Infinite loop");
}
return func.apply(null, arguments);
};
} | [
"retry (fn, max, errorFunc) {\n const f = async () => {\n let error;\n for (let i = 0; i < max; i++) {\n try {\n return await fn();\n } catch (e) {\n if (this.debugging) {\n // eslint-disable-next-line\n debugger;\n }\n console.log... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new ConfigHash. | constructor() {
ConfigHash.initialize(this);
} | [
"function NewHash() {\n return blakejs_1[\"default\"].blake2bInit(32, null);\n}",
"function Configuration(props) {\n return __assign({ Type: 'AWS::AmazonMQ::Configuration' }, props);\n }",
"function Config(obj) {\n if (!(this instanceof Config)) {\n return new Config(obj)\n }\n\n obj ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
shows weight logs for the month | getWeightsMonth(){
let temp = [];
let today = new Date();
let progress = 0;
for(var i=0; i< this.weightLog.length; i++){
let then= this.weightLog[i].date;
if(then.getFullYear() == today.getFullYear() && then.getMonth() == today.getMonth()){
temp.pu... | [
"function monthlyReport() {\n\n}",
"getWeightsWeek(){\n let temp = [];\n let today = new Date();\n let progress = 0;\n let lastWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 7);\n for(var i=0; i< this.weightLog.length; i++){\n if(this.weightL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether or not the capy has hit one of the pipes or the upper/lower boundaries of the Level | gameOver() {
return (this.level.collidesWith(this.capy.bounds()) || this.capy.outOfBounds());
} | [
"outOfBounds() {\n const aboveTop = this.y < 0;\n const belowBottom = this.y + CONST.CAPY_HEIGHT > this.dimensions.height;\n return aboveTop || belowBottom;\n }",
"passedPipe(capy, callback) {\n this.eachPipe((pipe) => {\n if (pipe.topPipe.right < capy.left) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stop loop of strip moving | function stopStripMovingLoop(){
if(g_temp.isStripMoving == false)
return(false);
g_temp.isStripMoving = false;
g_temp.handle_timeout = clearInterval(g_temp.handle_timeout);
} | [
"toStopPosition() {\n console.log('[johnny-five] Proceeding with Stop Sequence.');\n\n this.red.stop().off();\n this.yellow.stop().off();\n this.green.on();\n\n setTimeout(() => {\n this.green.off();\n this.yellow.pulse(300);\n }, 2000);\n\n setTimeout(() => {\n this.red.on();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lifts the app state reducer into a DevTools state reducer. | function liftReducer(reducer, initialState) {
var initialLiftedState = {
committedState: initialState,
stagedActions: [INIT_ACTION],
skippedActions: {},
currentStateIndex: 0,
monitorState: {
isVisible: true
},
timestamps: [Date.now()]
};
/**
* Manages how the Dev... | [
"function stateSave() {\n return function (dispatch, getState) {\n var _a = getState().explore, left = _a.left, right = _a.right, split = _a.split;\n var urlStates = {};\n var leftUrlState = {\n datasource: left.datasourceInstance.name,\n queries: left.queries.map(app_c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensures that given transaction object has the "errors" key where custom test run errors (not validation errors) are stored. | ensureTransactionErrors(transaction) {
if (!transaction.results) {
transaction.results = {};
}
if (!transaction.errors) {
transaction.errors = [];
}
return transaction.errors;
} | [
"ensureTestStructure(transaction) {\n transaction.test.request = transaction.request;\n transaction.test.expected = transaction.expected;\n transaction.test.actual = transaction.real;\n transaction.test.errors = transaction.errors;\n transaction.test.results = transaction.results;\n }",
"function ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new VRDeviceOrientationGamepadCamera | function VRDeviceOrientationGamepadCamera(name,position,scene,compensateDistortion,vrCameraMetrics){if(compensateDistortion===void 0){compensateDistortion=true;}if(vrCameraMetrics===void 0){vrCameraMetrics=BABYLON.VRCameraMetrics.GetDefault();}var _this=_super.call(this,name,position,scene,compensateDistortion,vrCamera... | [
"function DeviceOrientationCamera(name,position,scene){var _this=_super.call(this,name,position,scene)||this;_this._quaternionCache=new BABYLON.Quaternion();_this.inputs.addDeviceOrientation();return _this;}",
"function UniversalCamera(name,position,scene){var _this=_super.call(this,name,position,scene)||this;_th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function that given a cookie and a field of the registration form it returns the value of that cookie for that field | function getValueFromCookie(cookieName, field) {
/* Get the string of values from the cookie */
var str = getCookie(cookieName);
var values = str.split(','); /* Split the values by the , */
var n = document.forms["registerForm"].length;
/* Go over every field of the registration form to look for the index of ... | [
"function getCookieLogin() {\r\n\tvar cookies = document.cookie; // gets the cookie\r\n\tif (cookies != \"\") {\r\n\t\tvar cookieArray = cookies.split(';');\r\n\t\tfor (var i = 0; i < cookieArray.length; i++) {\r\n\t\t\tvar key = cookieArray[i].split('=')[0];\r\n\t\t\tkey = key.trim();\r\n\t\t\tvar value = cookieAr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by Python3Parseryield_stmt. | visitYield_stmt(ctx) {
console.log("visitYield_stmt");
return this.visit(ctx.yield_expr());
} | [
"visitYield_expr(ctx) {\r\n console.log(\"visitYield_expr\");\r\n if (ctx.yield_arg() !== null) {\r\n return { type: \"YieldStatement\", arg: this.visit(ctx.yield_arg()) };\r\n } else {\r\n return { type: \"YieldStatement\", arg: [] };\r\n }\r\n }",
"visitFlow_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the default options (DEPRECATED). | defaultOptions() {
console.error('.defaultOptions() is deprecated, use .DEFAULT_OPTIONS instead.');
return DEFAULT_CONFIG;
} | [
"static GetOptions(options, defaultOptions) {\n let _options = {};\n if (!options) {\n options = {};\n }\n if (!defaultOptions) {\n defaultOptions = LowPolyPathBuilder.GetDefaultOptions(options ? options.version : undefined);\n }\n for (let param in de... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a button to the layer. | button(x, y, content, opts){
let button = new Button(x, y, content, opts);
this.layer.buttons.push(button);
return button;
} | [
"createButton () {\n\n this.button = document.createElement('button')\n\n this.button.title = 'This model has multiple views ...'\n\n this.button.className = 'viewable-selector btn'\n\n this.button.onclick = () => {\n this.showPanel(true)\n }\n\n const span = document.createElement('span')\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
WRITE A FUNCTION THAT TAKES TWO ARGUMENTS, ARRAY AND NUMBER, IT SHOULD COUNT OCCURRENCES OF THAT NUMBER IN PROVIDED ARRAY AND RETURN IT FOR | function countNumber(arrayOfNumbers,number){
let result = 0;
for(let i = 0; i < arrayOfNumbers.length; i++){
if(arrayOfNumbers[i]===number){
result++;
}
}
return result;
} | [
"function countNum (array) {\n\tvar uniqueArr = [];\n\tfor (i=0; i<=uniqueNumbers.length - 1; i++){\n\t\tvar count = array.filter (function (n) {\n\t\t\treturn n === uniqueNumbers [i];\n\t\t})\n\t\tuniqueArr.push (count.length);\n\t}\n\treturn uniqueArr;\n}",
"function numOfAppear(a, array) {\n var i;\n var... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a function that executes its arguments (which should be cancelables) in sequence, so that each of them passes its return values to the next. Execution is aborted if one of the functions returns an error; in that case the last function in the sequence is called with the error. See util/cancelize.js for an explana... | function chain() {
// The list of functions to chain together.
var argList = Array.prototype.slice.call(arguments, 0);
return function chained() {
// List of remaining functions to be executed.
// Make a copy of the original list so we can mutate the former while
// preserving the latter intact for... | [
"function run() {\n var index = -1;\n var input = slice$1.call(arguments, 0, -1);\n var done = arguments[arguments.length - 1];\n\n if (typeof done !== 'function') {\n throw new Error('Expected function as last argument, not ' + done)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encode the full glTF file as a binary GLB file Returns an ArrayBuffer that represents the complete GLB image that can be saved to file Encode the full GLB buffer with header etc glbfileformatspecification | encodeAsGLB(options = {}) {
// TODO - avoid double array buffer creation
this._packBinaryChunk();
if (options.magic) {
console.warn('Custom glTF magic number no longer supported'); // eslint-disable-line
}
const glb = {
version: 2,
json: this.json,
binary: this.arrayBuffer
... | [
"imageToBytes (img, flipY = false, imgFormat = 'RGBA') {\n // Create the gl context using the image width and height\n const {width, height} = img\n const gl = this.createCtx(width, height, 'webgl', {\n premultipliedAlpha: false\n })\n const fmt = gl[imgFormat]\n\n // Create and initialize th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
a function to detect if the tooltip is going off the screen horizontally. If so, reposition the crap out of it! | function dontGoOffScreenX() {
var windowLeft = $(window).scrollLeft();
// if the tooltip goes off the left side of the screen, line it up with the left side of the window
if((myLeft - windowLeft) < 0) {
arrowReposition = myLeft - windowLeft;
myLeft = windowLeft;
}
... | [
"function tooltipXposition(d){\n\t\t\treturn x(d)+leftOffset(\"stage_wrapper\")+\"px\";\n\t\t}",
"function tooltip_placement(context, source) {\n\t\tvar $source = $(source);\n\t\tvar $parent = $source.closest('table')\n\t\tvar off1 = $parent.offset();\n\t\tvar w1 = $parent.width();\n\n\t\tvar off2 = $source.offse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the dialog after saving or cancelling, scrolling the web page to where it was prior to opening. | function closeDialog () {
controls.validator.resetValidationErrors();
table.clearHighlight();
popup.hide();
window.scrollTo(permissionManager.bookmark.scrollX, permissionManager.bookmark.scrollY);
} | [
"@action closeDialog() {\r\n\t\tif (this.dialog) this.dialog.opened = false;\r\n\t}",
"function closeAndMove(targetPage) {\r\n\topener.document.location = targetPage;\r\n\tself.close();\r\n}",
"function save() {\n dialogOut.dialog( \"close\" );\n }",
"function closeTaxDetail() {\r\n if (!$isOn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asserts that the type being dynamically instantiated is a Component. | _assertTypeIsComponent(type:Type):void {
var annotation = this._directiveMetadataReader.read(type).annotation;
if (!(annotation instanceof Component)) {
throw new BaseException(`Could not load '${stringify(type)}' because it is not a component.`);
}
} | [
"createComponent(scenario) {\r\n class DynamicComponent {\r\n constructor() {\r\n Object.assign(this, scenario.context);\r\n }\r\n }\r\n return Component({\r\n selector: 'playground-host',\r\n template: scenario.template,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The facebook logout handler | function facebookLogoutHandler(e) {
if (e.success) {
var client = Titanium.Network.createHTTPClient();
client.clearCookies('https://login.facebook.com');
} else if (e.error) {
// Error!
}
} | [
"function logout() {\n // clear the token\n AuthToken.setToken();\n }",
"function logout_response(disconnect) {\n $login_view.show();\n $class_view.hide();\n $group_view.hide();\n\n\n $error_username.hide();\n $error_class_id.hide();\n\n $class_id.css(\"border-color\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeat string `str` up to total length of `len` | function repeatString(str, len) {
return Array.apply(null, {length: len + 1}).join(str).slice(0, len)
} | [
"function repeatString(str, count) { \n // TODO: your code here \n if(count === 0){\n return \"\";\n }\n return str + repeatString(str, count - 1);\n}",
"function modifyLast(str, n) {\n\treturn str.slice(0, -1) + str.slice(-1).repeat(n);\n}",
"function GetFixLenStr(str, len, insChar, type)\n{\n var o = \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When another player gets a coin it removes the coin for all players. | function removeCoin(coin_id){
for (let i = 0 ; i < coinObjects.length ; i++){
let coin = coinObjects[i]
if (coin.coin_id == coin_id){
coin.is_dead = true;
}
}
} | [
"takeCoin(player, coin){\n coin.kill();\n }",
"function collectCoin(player, Coin){\n \tCoinPU.play();\n Coin.kill();\n coinsCollected+=1;\n }",
"'players.reduceVentureCoins'(num_coins){\n var current_coins = Players.findOne({'owner': Meteor.userId()}).goldCoin;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Chapter 101 RopeGroup Knot reponsise when chaste | function C101_KinbakuClub_RopeGroup_HelplessKnot() {
if (Common_PlayerChaste) OverridenIntroText = GetText("ChasteKnot");
if (C101_KinbakuClub_RopeGroup_CurrentStage == 830) C101_KinbakuClub_RopeGroup_WaitingForMistress();
else C101_KinbakuClub_RopeGroup_HelplessTime();
} | [
"function C101_KinbakuClub_RopeGroup_HelplessStruggle() {\n\tif (Common_PlayerChaste) OverridenIntroText = GetText(\"ChasteStruggle\");\n\tif (C101_KinbakuClub_RopeGroup_CurrentStage == 830) C101_KinbakuClub_RopeGroup_WaitingForMistress();\n\telse C101_KinbakuClub_RopeGroup_HelplessTime();\n}",
"function C101_Kin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of attributes. | getAttributeList() {
this.ensureParsed();
return this.attributes_;
} | [
"static get observedAttributes() {\n // note: piggy backing on this to ensure we're finalized.\n this.finalize();\n const attributes = [];\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this._classProperties... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if given UUID is valid UUID | function TestUuid(uuid){
let pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
let isValid = pattern.test(uuid);
return isValid;
} | [
"function isUuid(value) {\n if (typeof value === \"string\" && value.length === 36) {\n return !!value.match(UUID_PATT)\n }\n return false;\n }",
"function validateUUID(arg) {\n if (!arg) {\n console.error('Error: missing UUID');\n process.exit(1);\n }\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
override to get access to the args before any command is executed | beforeCommand() { } | [
"reset() {\n this._argv = process.argv.slice(2)\n }",
"function setCommand(args) {\n\tSETTINGS.COMMAND = args.next() || SETTINGS.COMMAND\n}",
"function makeArgChanges() {\n //Only do the alterations if the arguments indicate a real or preview\n //run of the program will be executed.\n v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DNS cache lookup. the function either returns that the file does not exist. OR logs the errors that could've occured. OR checks in the "dnscache" file if the url exists, if so, return 1, indicating it exits else, will call the DNS lookup function, save the new value, and send it back to the client. | function checkInFile(url,cb){
fs.readFile(__dirname+'/dns-cache.txt', function (err, data) {
//file not found handling
if(err !== null && err.code === "ENOENT"){
process.nextTick(function(){return cb(false)});
}
//other errors
else if(err !== null && err.code !== "ENOENT"){
co... | [
"function createDnsFile(url,cb){\n dnsLookUp(url,function(address){ \n var data = url +\" \"+ address+\"\\n\";\n fs.writeFile(__dirname+'/dns-cache.txt',data, function (err) {\n if (err !== null){\n console.log(\"[ERROR]: \" + err);\n }\n else{\n process.nextTick(function()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all posts for a category. | static fetchCategoryPosts(category_name) {
return this._getObject(this._CATEGORY_POSTS_URL(category_name));
} | [
"function queryAllPosts(){\n\t\tvar keyword = \"all\";\n\t\t$.ajax({\n\t\t\ttype : \"GET\",\n\t\t\turl : \"post/getJsonPosts\",\n\t\t\tdata : {\"keyword\":keyword},\n\t\t\tsuccess : function(data){\n\t\t\t\t$(\"#posts-query p\").remove();\n\t\t\t\tqueryTemplate(data);\n\t\t\t}\n\t\t});\n\t}",
"function getListOfC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For each zone, finds circles that the zones are in. Returns a list of lists | function zoneFinder(zoneStrings,circles) {
var ret = [];
for (var i = 0; i < zoneStrings.length; i++) {
var zoneString = zoneStrings[i];
var nextZone = [];
for (var j = 0; j < zoneString.length; j++) {
var circleLabel = zoneString[j];
var circle = circleWithLabel(circleLabel,circles);
nextZone.push(ci... | [
"function findZoneRectangles(zoneStrings, circles) {\n\n\tvar zones = zoneFinder(zoneStrings,circles);\n\n\tvar rectangles = [];\n\t\n\t// iterate through the zones, finding the best rectangle for each zone\n\tfor (var i = 0; i < zones.length; i++) {\n\t\tvar circlesInZone = zones[i];\n\t\t\n\t\tvar circlesOutZone... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the button to change the level cap | function createCapChanger() {
var levelCapChanger = document.createElement('li');
var levelCapStyle = document.createElement('style');
levelCapStyle.innerHTML = "#level_cap_control::after {border-bottom:1px dotted #9b9a9a;bottom:0;content:'';display:block;left:11px;position:absolute;right:11px;}";
levelCapChan... | [
"function createLockLevelPopUp(){\n\t\t\t\t\t\t\tvar levelChoose=new lib.levelChooseBoard();\n\t\t\t\t\t\t\tlevelChoose.x=myStage/2-levelChoose.nominalBounds.width/2;\n\t\t\t\t\t\t\tlevelChoose.y=myStage/2-levelChoose.nominalBounds.height/2;\n\t\t\t\t\t\t\tstage.addChild(levelChoose);\n\t\t\t\t\t\t}",
"function s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds a log object to the queue, oldest logs are removed and saved to file after queue size exceeds 1000 | function queueLog(log) {
logCache.add(log);
while (logCache.length() > 1000) {
const oldestLog = logCache.remove();
logger.log(oldestLog.severity, oldestLog);
}
} | [
"function FileQueue() {\n size = 0;\n}",
"function maintainLogSize() {\n while ($scope.logs.length > MAX_LOG_SIZE) {\n $scope.logs.shift();\n }\n }",
"function add(request) {\n request.queueTime = (new Date()).getTime();\n\n queue.add(request).save();\n\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Toggle display of eventgrid | function toggleEvents() {
events.style.display = events.style.display == "none" ? "" : "none";
} | [
"function CalendarToggle() {\n\tif (this.visible) {\n\t\tthis.Hide();\n\t} else {\n\t\tthis.Show();\n\t}\n}",
"showGrid(){\n this.Grid = true;\n this.Line = false\n \n }",
"function showGridOne() {\n if (!gridOneVisible) {\n gridOne.style.display = \"inline\";\n gridTwo.style.disp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
================================================================================== Confirmar cuadro de texto ==================================================================================== | function con() {
var txt;
if (confirm("precione el boton deceado")) {
txt = "seguir ";
} else {
txt = "cancelar";
}
document.getElementById("confirmar").innerHTML = txt;
} | [
"function alertSecurity() {\n var txt;\n if (confirm(\"Are you sure to notify Security?\")) {\n alert(\"Already notified Security.\");\n } else {\n alert(\"Canceled to notify Security!\");\n }\n }",
"function tiposAlerta() {\n // La alerta alert, solo mostrara el texto designado y un... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: reduceArguments() Global helper function for converting any of the above method calls into their apporiate form with/without a tenantspecific collection. | function reduceArguments() {
var collection;
var args = _.toArray(arguments);
var tenant = null;
//For tenants, find specific collection and remove the first argument
if (arguments.length > 0 && _.isString(arguments[0])) {
tenant = arguments[0];
collection = Platos._db.collection(tenant + Platos._options.sepa... | [
"function flatten () {\n var flattened = [];\n slice.call(arguments, 0).forEach(function (arg) {\n if (arg != null) {\n if (Array.isArray(arg)) {\n flattened.push.apply(flattened, flatten.apply(this, arg));\n } else if (typeof arg == \"object\") {\n Object.keys(arg).forEach(function (ke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the Celebration state. | celebrate (state, status) {
state.celebrating = status
} | [
"function setConnectionState (state) {\n console.log('Connection state:', state)\n switch (state) {\n case Connection.DISCONNECTED:\n case Connection.CONNECTING:\n statusIcon.style.backgroundColor = 'yellow'\n break\n case Connection.CONNECTED:\n statusIcon.style.backgroundColor = 'green'\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When part of the global board is tapped | function globalTapped() {
if(freeze || victory) return;
if(!boardData[this.board].isActive()) return;
select(this.board);
render();
} | [
"function handle_click(){\n // which tile?\n var tile = $(this);\n\n // don't do anything if just clicked or already matched\n if (tile.hasClass('active') || tile.hasClass('matched')) {\n // we're done\n return false;\n }\n\n // keep track of number of clicks\n num_clicks++;\n\n //activate tile\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create device with texture format(s) required feature(s). If the device creation fails, then skip the test for that format(s). | async selectDeviceForTextureFormatOrSkipTestCase(formats) {
if (!Array.isArray(formats)) {
formats = [formats];
}
const features = new Set();
for (const format of formats) {
if (format !== undefined) {
features.add(kTextureFormatInfo[format].feature);
}
}
await this.se... | [
"function createDevice(src){\n\tvar devPath = \"Device_\" + deviceCtr;\n\tidsArray = [];\n\tidsArray = getalldevicepath(idsArray);\n\tif(idsArray.length == 0){\n\t\tcreateConfigName(); \n\t}\n\tvar str ='';\n\tif(idsArray.indexOf(devPath) == -1){\n\t\tvar imageObj = new Image();\n\t\tvar srcN = ($(src).attr('src')... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Submits SQL query from Form to Redshift Data API: | async function submitQuery() {
var credentials = await Auth.currentCredentials();
const redshiftDataClient = new RedshiftData({
region: state.clusterRegion,
credentials: Auth.essentialCredentials(credentials)
});
var params = {
ClusterIdentifier: state.clusterIdentifier,
Sql: state.sql,
D... | [
"runSoqlQuery()\n {\n this.setSelectedMapping();\n this.setSelectedAction();\n this.callRetrieveRecordsUsingWrapperApex();\n }",
"function submitQuery() {\n \"use strict\";\n const results = document.getElementById(\"queryResults\");\n const query = getBaseURL() + \"data/?\" + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
============================================ multiword property must have quotes and we cant access the value with "dot" user."Birth Year" < wont work! user["Birth Year"] < use this insted | function function5()
{
var user = {
fname: "John",
lname: "Doe",
"Birth Year": 1997, // <-- multiword property
"Has Driver License": true, // <-- multiword property
plate: 'abc1234ds'
};
console.log(user.fname);
console.log(user.lname);
// because its a multiword property can'... | [
"function agePerObj(ageObj){\n ageObj[\"age\"] = ageObj.firstName.length + ageObj.lastName.length;\n}",
"static filterApptUserData(user) {\n return {\n name: user.name,\n email: user.email,\n phone: user.phone,\n uid: user.uid,\n id: user.id,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends messages to children about selected locale | postLocaleToChildren() {
const country = localStorage.getItem('country');
const dateTimeFormat = localStorage.getItem('dateTimeFormat');
const decimalSeparator = localStorage.getItem('decimalSeparator');
this.postMessageToChild(MessageType.locale, {
country,
dateT... | [
"notifyChildAboutLocale(locale) {\n this.postMessageToChild(MessageType.locale, locale);\n }",
"postLanguageToChildren() {\n this.postMessageToChild(MessageType.language, this.translationManagementService.language);\n }",
"function onLocaleChange(e)\r\n{\r\n\tvar flashObj = getFlashObject();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spread size of grid... I know used once... ...but idea was to let it modify by user. Zoom in/out does the job. | function setSpreadSize(size) {
spreadSize = size;
grid = new THREE.GridHelper(spreadSize, spreadSize);
grid.position.x = spreadSize / 2;
grid.position.z = spreadSize / 2;
grid.name = "GRID";
scene.remove("GRID");
scene.add(grid);
localGrid = new THREE.GridHelper(spreadSize / 5, spreadSize);
localGrid.... | [
"function changeGridSize() {\n value = sizeSlider.value;\n container.innerHTML = \"\";\n makeRows(value, value);\n displayGridSlider.innerHTML = value.toString() + \"x\" + value.toString();\n}",
"function newGrid (newSize) {\n $('.row').remove();\n createGrid(newSize);\n // $('.co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
`ontouchstart` check works on most browsers `maxTouchPoints` works on IE10/11 and Surface | function isTouchDevice() {
return 'ontouchstart' in window || navigator.maxTouchPoints;
} | [
"get isTouch()\n {\n return \"ontouchstart\" in window;\n }",
"function isReallyTouch(e){//if is not IE || IE is detecting `touch` or `pen`\nreturn typeof e.pointerType==='undefined'||e.pointerType!='mouse';}",
"function deviceHasTouchScreen() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds listener to resizing of window object which calls for the active phrase to be evaluated for line breaks so that phrase remains responsive, while not splitting one word into multiples. If width of screen is lt or eq to 1024 px, the THEME button's text changes to a trigram | onScreenResize () {
window.addEventListener('resize', function () {
game.activePhrase.addLineBreak();
const modal = this.document.getElementById('modal-button');
this.innerWidth <= 1024 ? modal.innerHTML = "☰" : modal.textContent = "THEME";
}... | [
"function resizeText(pixels) {\r\n\r\n}",
"function handleWindowResize() {\r\n width = window.innerWidth;\r\n}",
"function listenWindowResize() {\n $(window).resize(_handleResize);\n }",
"onResize() {\n App.bus.trigger(TRIGGER_RESIZE, document.documentElement.clientWidth, document.documentElement.clie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate many. Similar to the single gen method, only this accepts multiple IDs | static async genMany(
viewer: ?Viewer,
ids: Array<string>,
{ Planet }: DataLoaders
): Promise<?Array<PlanetInstance>> {
const data: Array<PlanetModel> | null = await dbPlanet
.scope("withIds")
.findAll({ where: { id: [ids] } })
// Only get pure JSON from fetch,
// Though unlike... | [
"function generateCardIDs() {\n //for each card add its id to cardids list\n cards.forEach(card => {\n cardIDs.push(card.cardID);\n });\n}",
"function genIDs() {\n selectAllH().prop('id', function() {\n // If no id prop for this header, return a random id\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls all of the envet listener with all of the arguments (which should be an array) | _callEventListeners(event, args = []) {
// Make args an array if it's not
const arrayArgs = Array.isArray(args) ? args : [args];
if (this._eventListeners[event]) {
for (const handler of this._eventListeners[event]) {
handler.apply(null, arrayArgs);... | [
"_emit(event, args) {\n return Promise.all(this.listeners(event).map(listener => {\n if (typeof listener.listener === 'function'){\n this.removeListener(event, listener);\n }\n\n return (listener.listener || listener).apply(this, args);\n }));\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deleting a Graphics by ID | function deleteGraphics(req, res) {
const { knex } = req.app.locals
const { GraphicsID } = req.params
knex('graphics')
.where('GraphicsID', GraphicsID)
.del()
.then(response => {
if (response) {
res.status(200).json(`Graphics with ID ${GraphicsID} is dele... | [
"function gui_removeArea(id) {\n\tif (props[id]) {\n\t\t//shall we leave the last one?\n\t\tvar pprops = props[id].parentNode;\n\t\tpprops.removeChild(props[id]);\n\t\tvar lastid = pprops.lastChild.aid;\n\t\tprops[id] = null;\n\t\ttry {\n\t\t\tgui_row_select(lastid, true);\n\t\t\tmyimgmap.currentid = lastid;\n\t\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate a kbit true random prime using Maurer's algorithm, and put it into ans. The bigInt ans must be large enough to hold it. | function randTruePrime_(ans,k) {
var c,m,pm,dd,j,r,B,divisible,z,zz,recSize;
if (primes.length==0)
primes=findPrimes(30000); //check for divisibility by primes <=30000
if (pows.length==0) {
pows=new Array(512);
for (j=0;j<512;j++) {
pows[j]=Math.pow(2,j/51... | [
"function randTruePrime(k) {\r\n var ans=int2bigInt(0,k,0);\r\n randTruePrime_(ans,k);\r\n return trim(ans,1);\r\n }",
"function randProbPrimeRounds(k,n) {\r\n var ans, i, divisible, B;\r\n B=30000; //B is largest prime to use in trial division\r\n ans=int2bigInt(0,k,0);\r\n\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unregisters an NFC tag to a child. | async function unregisterNfcByUsername(req, res) {
try {
// 1. Check if the child exists
const child = await getChildByUsername(req.params.username)
if (!child) { // child not found by given username
return res.status(400).send(msgChildNotFoundUsername(req.params.username))
... | [
"function removeTag(tag) {\n tag.parentNode.removeChild(tag);\n}",
"function getChildByNfcTag(tag) {\n return new Promise((resolve, reject) => {\n httpClient\n .get(`${ACCOUNT_URL_BASE}/v1/children/nfc/${tag}`)\n .then((result) => {\n if (result.data) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
diamond 3 random formula with result | function diamond3() {
return Math.floor(Math.random() * 11 + 1);
} | [
"function diamond4() {\n return Math.floor(Math.random() * 11 + 1);\n }",
"function inning(){\n return (Math.floor(Math.random()*3));\n\n}",
"function randomSquare3() {\n selected3 = squares[randomNum()]\n }",
"static generateRandomAngle() {\n return Math.random() * Math.PI * 2;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Listen if the photographer's medias are sort(), if so then render() again the component | listenSort() {
document.getElementById("sortMedias").addEventListener('change', () => {
this.render();
this.listenNewLikes();
})
} | [
"static refreshList(sortBy = null) {\n if (typeof sortBy == \"string\") {\n Settings.current.sortBy = sortBy;\n }\n if (this.songListElement) {\n let sortFunc = (a, b) => { return 0; };\n try {\n switch (Settings.current.sortBy) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add new box at given position | function addBoxAtPosition(bed, bb, position) {
var box = moveTo(bb, position);
if (isEmpty(bed)) {
bed.boxes = [box];
}
else {
bed.boxes.push(box);
}
return bed;
} | [
"function PlaceBox()\n{\n\ttarget = Point.Add(boardPosition, FacingToDirectionPoint(facing));\n\tif (!inLevel.InBounds(target))\n\t{\n\t\tErrorOut(\"I can't place a box there!\");\n\t\treturn;\n\t}\n\t\n\tvar placement = inLevel.GetHeight(target);\n \tvar here = inLevel.GetHeight(boardPosition);\n \t\n \tif (!in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load img for img_name. Only one image can be loaded for a static object return false if load fails, else return true | load_sprite (img_name, sx, sy, sw, sh) {
if (cached_assets[img_name] == null) return false;
this._sprites['idle'] = [];
this._sprites['idle'][0] = cached_assets[img_name];
this._sx = sx || 0;
this._sy = sy || 0;
this._width = sw || cached_assets[img_name].width;
this._height = sh || cached_assets[img_name... | [
"is_image() {\n if (\n this.file_type == \"jpg\" ||\n this.file_type == \"png\" ||\n this.file_type == \"gif\"\n ) {\n return true;\n }\n return false;\n }",
"function imageisloaded(image) {\n if (image == null || ! image.complete()) {\n alert(\"image not loaded :(\");\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the mock account IDs to use for the test | setMockAccountIds (callback) {
if (this.dontIncludeErrorGroupId) {
this.apiRequestOptions.headers['X-CS-Mock-Error-Group-Id'] = "";
} else {
this.apiRequestOptions.headers['X-CS-Mock-Error-Group-Id'] = this.data.codeError.objectId;
}
/*
const codeErrorId = this.data.codeError.accountId;
const account... | [
"async setAccountID() {\n const [responseAccountData, responseStatus] = await this.getAccountData(this.state.login, 'login');\n\n if (responseAccountData && responseAccountData.data.length > 0) {\n await this.setState({accountID: responseAccountData.data[0].id});\n }\n }",
"fillAccountsList () {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tell the nodebalancer that I am here | function tell(){
stickyLoadBalancer.tellBalancer(balancer, own);
} | [
"markAlive()\n\t{\n\t\tif ( ! this.m_bAlive )\n\t\t{\n\t\t\tthis.m_bAlive = true;\n\t\t\tthis.emit( 'peer_alive' );\n\t\t}\n\t}",
"async function heartbeat(req, res) {\n debug('HEARTBEAT')\n const { ip } = req.params\n try {\n var response = await bots.heartbeat(ip)\n res.send(response)\n } ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Database URL. Change this to restaurants.json file location on your server. | static get DATABASE_URL() {
const port = 3000 // Change this to your server port
return `http://localhost:${port}/data/restaurants.json`;
} | [
"static get DATABASE_URL() {\n return '/data/restaurants.json';\n }",
"static get DATABASE_GET_ALL_FAVORITES() {\r\n return `http://localhost:${DBHelper.PORT}/restaurants/?is_favorite=true`;\r\n }",
"static setDatabaseUrlOneFavorite(id, fav) {\r\n return `http://localhost:${DBHelper.PORT}/restaurants... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grant permission to the connection. | grantPermission(hub, permission, connectionId, options) {
const operationOptions = coreHttp.operationOptionsToRequestOptionsBase(options || {});
return this.client.sendOperationRequest({ hub, permission, connectionId, options: operationOptions }, grantPermissionOperationSpec);
} | [
"mayGrant(newPermission, granteePermissions = []) {\n return this._mayGrantOrRevoke('mayGrant', newPermission, granteePermissions);\n }",
"[SET_PERMISSION] (state, permissions) {\n state.permissions = permissions\n }",
"mayGrant(permission, granteePermissions = []) {\n const newPermission = new RNP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to make sure Car section isn't partially entered | function carSection () {
if (entryCarYear === "" || entryCarMake === "" || entryCarModel === "") {
var errorDiv = document.createElement('div')
// errorDiv.innerText = 'Required field!'
var field = document.getElementById('car-field')
field.appendChild(errorDiv)
field.c... | [
"function midCars() {\n\tif (carRental.midAvail() > 0) {\n\t\tcarRental.bookMid();\n\t} else alert(\"no cars available\");\n}",
"validateCarData(car) {\n let requiredetail = 'license model latLong miles make'.split(' ');\n\n for (let field of requiredetail) {\n if (!car[field]) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set ticksPassed to a new value (required for game updates/corrections). | setTicksPassed(newTicksPassed) {
this.ticksPassed = newTicksPassed
} | [
"function updateShotClock () {\n\tvar printShotClockTime = '';\n\tif (CURRENT_SHOT_CLOCK_TIME === 0) {\n\t\tdocument.getElementById('buzzer').play();\n\t\tstopClock();\n\t}\n\tif (CURRENT_SHOT_CLOCK_TIME < SHOT_CLOCK_TIME_CUTOFF) {\n\t\t$('#shotclocktimer').css('color', 'red');\n\t}\n\tvar formattedShotClockTime = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A constructor for defining new trucks | function Truck( options) {
this.state = options.state || "used";
this.wheelSize = options.wheelSize || "large";
this.color = options.color || "blue";
//NOT defined in prototype
this.drive = function() {
console.log("truck drive");
}
this.breakDown = function() {
console.lo... | [
"function TruckFactory() {}",
"function TruckFactory() {\n TruckFactory.prototype = new VehicleFactory();\n TruckFactory.vehicleClass = Truck;\n}",
"function Duck(){\n\tthis.speciesName = 'duck';\n}",
"function TruckersComponent(_truckerService) {\n this._truckerService = _truckerService;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets the progress arrays after the given IDs to their original state: index 0 and section selected false. | function resetIndicesAfterIDs(iCourseID, iSectionID) {
for(var k = iSectionID + 1; k < aCurrentIndices[iCourseID].length; k++) {
aCurrentIndices[iCourseID][k][0] = 0;
aCurrentIndices[iCourseID][k][1] = false;
}
for(var j = iCourseID + 1; j < aCurrentIndices.length; j++) {
for(var k = 0; k < aCurrentIn... | [
"function clearOldSelectedDIVs() {\n if (Object.prototype.toString.call(selectedDIVs) === '[object Array]') {\n if (selectedDIVs.length < 1) return;\n selectedDIVs.forEach(function(_div) {\n $(_div).css('background-color', 'transparent');\n $(_div).css('opacity', 0.35);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show 9 hours within a work day. Each hour is displayed in a row. Each row contains an hour, a test array and a save button | function show_hours() {
// Print out nine Hours with appropriate formating classes
for (let hour = 9; hour < 18; hour++) {
var current_hour = d.getHours();
let hour_class;
if (hour < current_hour) {
hour_class = "past";
} else if (hour == current_hour) {
hour_class = "present";
} els... | [
"function generateHours(index, hour) {\r\n\t\t\t\thour = hour < 10 ? \"0\" + hour : hour;\r\n\t\t\t\tvar timeArray = [];\r\n\t\t\t\ttimeArray.push(hour + \":\" + \"00\");\r\n\t\t\t\ttimeArray.push(hour + \":\" + \"15\");\r\n\t\t\t\ttimeArray.push(hour + \":\" + \"30\");\r\n\t\t\t\ttimeArray.push(hour + \":\" + \"45... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to return the first 4 bytes of the packet as a string which should be JOIN, MOVE, or CHAT | getNextPacketType(){
if(this.buffer.length < 4)return null;
return this.buffer.slice(0,4).toString();
} | [
"function ipV4OctetString() {\n return operator_1.chain(string_1.stringToNaturalNumber(), number_1.ltEq(255), (_name, octet) => {\n return octet.toString();\n });\n}",
"function LeftAlt(unicode) {\n var packet = asHIDPacket(4, 0) + asHIDPacket(4, 98) + asHIDPacket(4, 0);\n\n unicode.toString().spli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The range of the view [time] | get viewRange() {
return this._viewDrawWidth / this.pixelsWidthPerUnitTime;
} | [
"get viewEndTime() {\n return this._viewStartTime + this.viewRange;\n }",
"get temporalRangeMax() {\n return this.temporalRange[1];\n }",
"getSelectedRange() {\n let range;\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(this.startValue) && !Ob... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Eliminar de la agenda | function del()
{
var r = confirm("¿Estas seguro de eliminar?");
if(r == true)
{
agenda.results.splice(index, 1);
primer();
}
} | [
"function handleDelete(event) {\n\tlet id = event.target.id;\n\n\tlet output = [];\n\n\toutput = db_appointments.filter(function (value) {\n\t\treturn value.idPengunjung !== id;\n\t});\n\n\tdb_appointments = output;\n\n\tevent.target.parentElement.remove();\n}",
"function accionEliminar()\t{\n\t\tvar arr = new Ar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns scale based on original and end position of the two points. | function getScale(point1, startPoint1, point2, startPoint2) {
var initialDistance = getDistance(startPoint1, startPoint2);
var currentDistance = getDistance(point1, point2);
return Math.abs(currentDistance / initialDistance);
} | [
"function scaleSegment(x1, y1, x2, y2) {\r\n const magn = mag(x1, y1, x2, y2);\r\n const prop1 = (magn - 35) / magn;\r\n const prop2 = (magn - 45) / magn;\r\n const x_1p = x2 - (x2 - x1) * prop1;\r\n const y_1p = y2 - (y2 - y1) * prop1;\r\n const x_2p = x1 + (x2 - x1) * prop2;\r\n const y_2p = y1 + (y2 - y1)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for initialize shadows panel and additional listeners | initShadows($MIRROR, $SHADOWS_PANEL, _SOC_DATA) {
const $mirror_content = $($MIRROR.contents());
console.debug(
"Mirror is loaded: width[%s], height[%s]",
$mirror_content.width(),
$mirror_content.height()
);
// Set width and height for proper position... | [
"init() {\n this._createShadowRoot()\n this._attachStyles()\n this._createElements()\n }",
"addDropShadows() {\n let offset = this.calendarView.mShadowOffset;\n let shadowStartDate = this.date.clone();\n shadowStartDate.addDuration(offset);\n this.calendarView.mDropShadows = [];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the HTML for an item tree link | function itemTree(leftId, leftPatch, rightId, rightPatch) {
var innerHtml = '<a href="ItemTrees#leftId=' + leftId + '&leftPatch=' + leftPatch + '&rightId=' + rightId + '&rightPatch=' + rightPatch + '">Item Trees: ';
innerHtml += champHtml(leftId);
innerHtml += ' (' + leftPatch + ') vs ';
innerHtml += ch... | [
"function bookmarksHtml(bm_node, depth) {\n var html = '';\n \n if (bm_node.children) {\n html = html + '<li class=\"group l_' + depth + '';\n if (bm_node.title == 'Other Bookmarks') {\n html = html + ' other';\n }\n html = html + '\"><ul class=\"folder\"><h3>' + bm_n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns timeout interval, with some random jitter | function getRandomTimeout () {
return self._intervalMs + Math.floor(Math.random() * self._intervalMs / 5)
} | [
"getTimeout(){cov_50nz68pmo.f[2]++;cov_50nz68pmo.s[6]++;return this.timeout;}",
"function eventDelay() {\n //Randomly select a value from 0 to 1s\n return Math.floor(Math.random() * 1001);\n }",
"function timeUntilActivationTimeout() {\n // use same timeout logic as `@adobe/node-openwhisk-newrelic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load list data for card promise | function loadList(cardId, token) {
return new Promise(function (resolve, reject) {
jQuery.get("https://api.trello.com/1/cards/" + cardId + "/list?key="+key+"&token=" + token, function (listData) {
resolve(listData);
});
});
} | [
"async loadCards() {\n await JsonPlaceholder.get(\"/posts\", {\n params: {\n _start: this.props.cardList.length + 1,\n },\n })\n .then((res) => {\n this.props.fetchCardsSuccess({\n loadMore: !(res.data.length < 10),\n cardList: res.data,\n });\n })\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FUNCTION: initValues() DESCRIPTION: This function is called in the inspectSelection() event. It is responsible for initializing all the components in the UI with default values. ARGUMENTS: none RETURNS: nothing | function initValues() {
NAME.value = "";
// FROM
ACTION.value = "";
TARGET.setIndex(0);
METHOD.setIndex(0);
ENCTYPE.setIndex(0);
FORMAT.pickValue('');
STYLE.value = '';
SKIN.pickValue('');
PRESERVEDATA.pickValue('');
SCRIPTSRC.value = '';
ARCHIVE.value = ''
HEIGHT.value = '';
WIDTH.value = '';
} | [
"function initialSliderValues() {\n\t// set initial values for config\n\tupdateSliderValue('cannyConfigThreshold1Slider',\n\t\t\t'cannyConfigThreshold1Textbox');\n\tupdateSliderValue('cannyConfigThreshold2Slider',\n\t\t\t'cannyConfigThreshold2Textbox');\n\tupdateSliderValue('houghConfigRhoSlider', 'houghConfigRhoTe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Goals: entrypoint for collecting modules and for compilation dynamic import wrapped in exported fuction prevents executing sideeffects early eager import, bundled in main chunk | async function main() {
return [Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./all-imports.js */ "./src/all-imports.js"))];
} | [
"async function buildShims() {\n // Install a package.json file in BUILD_DIR to tell node.js that the\n // .js files therein are ESM not CJS, so we can import the\n // entrypoints to enumerate their exported names.\n const TMP_PACKAGE_JSON = path.join(BUILD_DIR, 'package.json');\n await fsPromises.writeFile(TM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Buff check: VIP Status | function τSST_detect_buff_vip() {
buffs_table.vip = localStorage[storage_key_prefix + 'buffs_table_vip'];
var vip_node = $('dt:contains("VIP Status:") + dd');
if (vip_node.length) {
if (vip_node.find(':contains("Get VIP status!")').length) {
buffs_table.vip = "non-VI... | [
"VIPStatusOfThisAccount() {\n let url = `/me/vipStatus`;\n return this.client.request('GET', url);\n }",
"async isBusy() {\n return new Promise((resolve, reject) => {\n this.rpc.stdin.write('busy' + os.EOL);\n this.rpc.stdout.once('data', (data) => {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the path of cmd.exe in windows | function getCmdPath() {
var _a;
return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
} | [
"function Commander(cmd) {\n var command =\n (getOsType().indexOf('WIN') !== -1 && cmd.indexOf('.exe') === -1) ?\n cmd + '.exe' : cmd;\n var _file = null;\n\n // paths can be string or array, we'll eventually store one workable\n // path as _path.\n this.initPath = function(paths) {\n if (typeof paths... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detect Cordova / PhoneGap / Ionic frameworks on a mobile device. Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally wait for a callback. | function isMobileCordova() {
return (typeof window !== 'undefined' &&
// @ts-ignore Setting up an broadly applicable index signature for Window
// just to deal with this case would probably be a bad idea.
!!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&
/ios|... | [
"function chkMobile() {\r\n\treturn /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n}",
"function isMediaDevicesSuported(){return hasNavigator()&&!!navigator.mediaDevices;}",
"function DetectPalmOS()\n{\n if (uagent.search(devicePalm) > -1)\n location.href='http://www.kraftechhomes.com/home_mob... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
enemyMoveheight handles when when the enemies reaches the certain distance the player loses a life, a sound is played and the enemy is destroyed | function enemyMoveHeight() {
if(isHidden==true){return;}
if(enemy.offsetTop>=700){
lives--;
var audioLifeLost= new Audio("lifeLost.wav");
audioLifeLost.play();
LivesDiv.innerHTML="lives "+lives;
enemy.remove();
//when the play reaches 0 lives the function is c... | [
"function weaponHit(e, m, ei, mi) {\n\n if(m.x <= (e.x + e.w) && (m.x + m.w) >= e.x && m.y <= (e.y + e.h) && (m.y + m.h) >= e.y) {\n enemyArray.splice(ei,1)\n weaponArray.splice(mi,1)\n new enemyExplosion(\"./sfx/enemyExplosion.wav\")\n score += 100\n\n for(let d=0; d < 15; d+... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the keyboard shortcut | function getKeyboardShortcut(intent, speechCallback) {
var speechOutput = getSpeechOutput(intent.slots.OperationName.value);
speechCallback(":tell", speechOutput, getRepromptText("keyboard shortcut"));
} | [
"_keyboardShortcuts() {\n browser.commands.onCommand.addListener((command) => {\n if (command === 'action-accept-new') {\n this.app.modules.calls.callAction('accept-new')\n } else if (command === 'action-decline-hangup') {\n this.app.modules.calls.callActio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
APPROACH Tabulation solution from the recursive solution below, we gather the recurrence relation let i be the sum value let j be the index in coins array, referring to the current coin if sum coins[i] 0, then result = (i, j 1) + (i j, j) with this recurrence relation, we can construct a 2d array, with sum as row, coin... | function dynamicProgramming(coins, sum) {
if (coins.length < 1) return 0
const table = [...Array(sum + 1)].map(e => Array(coins.length + 1).fill(0))
// when sum is 0, there's 1 way to fulfil it. simply by doing nothing
for (let i = 0; i < table[0].length; i++) {
table[0][i] = 1
}
for (le... | [
"function toCoins(amount, coins) {\r\n if (amount == 0) {\r\n return []\r\n } else {\r\n let reminder = amount;\r\n let output = [];\r\n for (let x=0; x < coins.length; x++) {\r\n if (reminder / coins[x] >= 1) {\r\n let howManyCoins = Math.floor(reminder /... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set event listeners for pagination page number buttons | setPageNumberButtinsEventListeners() {
var pageNumBtns = document.getElementsByClassName("pagination-button");
for (var i = 0; i < pageNumBtns.length; i++) {
let pageToGo = parseInt(pageNumBtns[i].innerHTML);
pageNumBtns[i].addEventListener('click', this.destPage.bind(this, pageT... | [
"function setTablePaginationHandlers(pagination){\n \n // Get table\n \n let table = $(pagination).siblings('.table-container').find('table.paginated');\n \n // Set event handlers for page number buttons\n \n $(pagination).find('button:not(.first, .prev, .next, .last)').each(function(){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
=================================================================== Script:ledOnOff() Purpose:function to switch LED on (red) or off (grey) Author:Mark Fletcher Date:21.11.2019 Input: event x LED row number yLED column number default = 'grey' rgb(128,128,128) Output: Notes: =============================================... | function ledOnOff(event,x,y) {
//set brightness to off (0)
var brightness = 0;
//set current LED
var currentLED = document.getElementById('led('+x+','+y+')');
var LEDTest = window.getComputedStyle(currentLED, null).getPropertyValue('background-color');
//if LED off then switch on (turn red)
if (LEDTest == 'r... | [
"function updateLeds() {\n if (led_state.Red===\"blink\") {\n GPIO.blink(pin_Red, blink_On, blink_Off);\n }else {\n GPIO.blink(pin_Red,0,0); //Turn off blinking\n let redlight=(led_state.Red==='1') ? 1:0 ; \n GPIO.write(pin_Red,redlight);\n }\n if (led_state.Blue===\"blink\") {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checkout parameters (one per supported payment service) | function checkoutParameters(serviceName, merchantID, options) {
this.serviceName = serviceName;
this.merchantID = merchantID;
this.options = options;
} | [
"function Process() {\n var results = {};\n var arr = request.httpParameters.keySet().toArray();\n arr.filter(function (el) {\n results[el] = request.httpParameters.get(el).toLocaleString();\n return false;\n })\n\n var verificationObj = {\n ref: results.REF,\n returnmac: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convertToPyret : [listof Programs], pinfo > JSON generate pyret parse tree, preserving location information follows provide and import will never be used | function convertToPyret(programs, pinfo){
_pinfo = pinfo;
return { name: "program"
, kids: [ {name: "prelude"
, kids: [/* TBD */]
, pos: blankLoc}
, {name: "block"
, kids: programs.map(function(p){retu... | [
"function rehype2json() {\n this.Compiler = node => {\n const rootNode = getRootNode(node)\n visit(rootNode, removePositionFromNode)\n return JSON.stringify(rootNode)\n }\n}",
"function updatePrimaryPackageJson(packageJson) {\n if (packageJson.type !== undefined) {\n throw Err... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Brainstormer form, making variables/values upon "submit" | function createFormHandler(e) {
e.preventDefault()
// Add innerHTML apending to Brainstormer in this section
const characterInput = document.querySelector("#user-edit-character").value
const setupInput = document.querySelector("#user-edit-setup").value
const twistInput = document.querySelector("#user-edit-twis... | [
"function setInputAndSubmit(aForm, aField, aValue)\n{\n setInput(aForm, aField, aValue);\n aForm.submit();\n}",
"_updateForm() {\n var form = this._getForm();\n form.find('#name').val(this.contact.name);\n form.find('#surname').val(this.contact.surname);\n form.find('#email').val... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the bubble set by "the hamster". Assumes that div ID for the bubble is "bubble_main" | function CloseBubble()
{
document.getElementById("bubble_main").style.visibility = "hidden";
} | [
"function closeSpeechBubble() {\n if (scripted) {\n scripted = false;\n }\n speed = 0;\n tempAud.pause();\n tempAud.currentTime = 0;\n setTimeout(function() {\n $(\"#talkbubble\").css(\"animation\", \"shrinkBubble .5s\");\n $(\".slide-right\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The window has regained focus after having lost it. If the last element that had the focus obtained the focus via the keyboard, set our keyboard input flag. That previouslyfocused element is about to receive a focus event, and the handler for that can then treat the situation as if the focus was obtained via the keyboa... | function windowFocused() {
focusedWithKeyboard = previousFocusedWithKeyboard;
} | [
"function returnFocus() {\n if( focused )\n focused.focus();\n }",
"_handleFocusChange() {\n this.__focused = this.contains(document.activeElement);\n }",
"trapFocus () {\n let $focusablePanelBodyElements = this.$detailPanelBody\n .find(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return true or false if there are too many phantoms running | function checkPhantomStatus() {
if (phantomChildren.length < maxInstances) {
return true;
}
return false;
} | [
"function OneShotLimitReached()\n{\n\treturn (crashesStarted + gearShiftsStarted) > oneShotLimit;\n}",
"end() {\n\t\treturn this.prog.length === 0;\n\t}",
"getCanReplicate() {\n return this.getMaximumReplications() === 1 ? false :\n this.getCurrentReplications() <= this.getMaxi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
open mobile recharge page | mobileRecharge() {
this.set('route.path', '/mobile');
} | [
"function fnOpenDcrLockeduserScreen(userCode) {\n $.mobile.changePage(\"/HiDoctor_Activity/MobileNotification/DCRLockDetail?userCode=\" + userCode, {\n type: \"post\",\n reverse: false,\n changeHash: false\n });\n}",
"function showCorrectLogonPage() {\n if(initializeRewards.urlContai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
buttonPost Call a simple POST request when clicking on a button | function buttonPost(url, callingButton) {
$(document).ready(function() {
$(callingButton).click(function(){
$.post(url, function(returnString) {
if (returnString.status == true) {
alert('success');
} else {
alert('failure');
}
}, 'json');
});
});
} | [
"function buttonTopic(button, action) {\n let xhr = new XMLHttpRequest();\n let data = {\"session\": button.dataset.id}\n xhr.responseType = \"json\";\n xhr.open(\"PUT\", \"../../api/session/session.php\");\n\n xhr.send(JSON.stringify(data));\n setTimeout(function () {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
edit selectGdfTender Ajax call | function editSelGdfTender(ajaxUrl, namespace) {
$("#loaderWrap").show();
var tenderRefNo = $("#tenderReferenceNumber").val();
var productCategoryVal = $("#productCategoryVal").val();
var title = $("#title").val();
var publicationDate = $("#publicationDate").val();
var deadlineForTechBidsSub = $("#deadlineForTec... | [
"function BindFranchiseeName(dept, customUrlIT) { \n $('.FranchiseeName option').remove();\n $.ajax({ \n type: \"POST\",\n url: customUrlIT,\n data: '{}',\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (r) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This private function will add an icon to the message Parameters alertObject:the alert object customMessage: (optional) message of the alert. If not passed will use default alertObject.message | function messageWithIcon(alertObject,customMessage){
var message = "<img alt='"+alertObject.type+": ' src='"+icons_url+alertObject.type+".png' />";
if(customMessage !== undefined)
message += customMessage; //use custom message
else
message += alertObject.message; //use default alert message
return message... | [
"function alertMessageAdd() {\n\t\t\talert.css('display', 'block');\n\t\t}",
"function messageWithHelpLink(alertObject,message){\n\t\treturn \"<a href='\"+ help_url + \"alerts.html\" + alertObject.info +\"' target='_ANDIhelp'>\"\n\t\t\t\t+message\n\t\t\t\t+\" <span class='ANDI508-screenReaderOnly'>, Open Alerts H... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
METHODS TO HANDLE EVENTS mailboxCheck | function mailboxCheck() {
if (lock) {
pending++;
} else {
sendMessage("");
}
} | [
"waitMail(addr) {\n return imap_listener.waitMail(addr);\n }",
"function is_in_guest_list(event, guest){\n var guests = event.getGuestList();\n for (var j=0; j<guests.length; j++) {\n //Logger.log(\"Check guest \"+guests[j].getEmail());\n if(guests[j].getEmail()==guest){\n var answer = gues... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MAG_InputVerifcode ========= MAG_get_sel_auth_index ================ | function MAG_get_sel_auth_index() { // PR2023-02-03
//console.log("=== MAG_get_sel_auth =====") ;
let sel_auth_index = null;
// --- get list of auth_index of requsr
const requsr_auth_list = [];
if (permit_dict.usergroup_list.includes("auth1")){
requsr_auth_list.push(1)
... | [
"function MASE_UploadAuthIndex (el_select) {\n //console.log(\"=== MASE_UploadAuthIndex =====\") ;\n\n// --- put new auth_index in mod_MASE_dict and setting_dict\n mod_MASE_dict.auth_index = (Number(el_select.value)) ? Number(el_select.value) : null;\n setting_dict.sel_auth_index = mod_MASE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deselect a cell widget. Notes It is a noop if the value does not change. It will emit the `selectionChanged` signal. | deselect(widget) {
if (!Private.selectedProperty.get(widget)) {
return;
}
Private.selectedProperty.set(widget, false);
this._selectionChanged.emit(void 0);
this.update();
} | [
"deselect() {\n if (this.selected != null) {\n this.selected.deselect();\n this.selected = null;\n }\n }",
"deselectValue(value) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.deselect(value);\n }",
"function unselect(se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |