query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Function to join array of string through a character and return a string. | function joinArray(input, character) {
var str = '';
for (var i = 0; i < input.length; i++) {
if (i != input.length-1) {
str += (input[i]+character);
}
else {
str += input[i];
}
}
return str;
} | [
"function joinArray(array, char) {\n if (!array) return null;\n return (array.filter(function (item) { return item; })).join(char);\n }",
"function join(array, string) {}",
"function myJoin (arr){\n var joinString = arr.join(\"\");\n return joinString\n}",
"function join(array, string) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
closes the custom message box | function closeMessageBox(){
var messageBox = document.getElementById(MESSAGE_BOX_ID);
if (messageBox == null) return;
var titleElement = document.getElementById(MESSAGE_BOX_TITLE_ID);
if (titleElement != null)
titleElement.innerHTML = "";
var textElement = document.getElementById(MESSAGE_BOX_TEXT_ID);
if (t... | [
"function closeMessageBox(scope) {\n\tmessage_center.alpha = 0;\n\tgetChild(\"messageClose\", zoomout_view_container).alpha = 0;\n\tgetChild(\"message\", zoomout_view_container).alpha = 0;\n\tnumerical_aperture_stage.update();\n }",
"close() {\n\n\t\t\tthis.displayConfirm = false;\n\t\t}",
"function ModMessage... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is to either show or remove the table depending on the value of the checkbox | function change(id){
var checked_status = document.getElementById(id).checked;
var table_div = document.getElementById(AllIdNames.directiveTable_id);
if (checked_status === true){
// Calls the Connect_Database class, and gets the SBU results
//Gives the classs an element to render the values o... | [
"function showTable() {\n var checkBox = document.getElementById(\"setupCheckbox\");\n var x = document.getElementById(\"setupTable\");\n if (checkBox.checked == true){\n x.style.display = \"block\"; \n }\n else {\n x.style.disp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
d6 Function to randomly generate a number 16 | function d6() {
return Math.floor(Math.random() * 6) + 1;
} | [
"function random6(){\n\t\treturn Math.floor((Math.random() * 6)+1);\n\t}",
"function rollD6(){\r\n return getRandomInteger(1, 6);\r\n}",
"function generateRandomNum() {\r\n\treturn Math.floor(Math.random() * 6) + 1;\r\n}",
"function Random(){\n return Math.floor(Math.random()*6 + 1);\n}",
"randNum() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns true if all items are valid | static isValidItems(items = [TestQuestion.structure]){
return ((items && items.length > 0) &&
items.every(item => TestQuestion.isValidItem(item))
);
} | [
"function allAreValid () {\n return all(compose(eq(true), dot('isValid')), items);\n }",
"allValid() {\n for (var key in this.fields) {\n if( this.fieldValid(key) === false ) {\n return false;\n }\n }\n return true;\n }",
"allValid(){\n for (var key in this.fields) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function closes the modal for adding a photo to a user page, clearing the values in its input elements. | function closeAddPhotoModal() {
var backdropElem = document.getElementById('modal-backdrop');
var addPhotoModalElem = document.getElementById('add-photo-modal');
// Hide the modal and its backdrop.
backdropElem.classList.add('hidden');
addPhotoModalElem.classList.add('hidden');
clearPhotoInputValues();
... | [
"function closeAddPhotoModal() {\n\n var backdropElem = document.getElementById('modal-backdrop');\n var addPhotoModalElem = document.getElementById('create-item-modal');\n\n // Hide the modal and its backdrop.\n backdropElem.classList.add('hidden');\n addPhotoModalElem.classList.add('hidden');\n\n clearPhoto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
as the components are mounted retrieve the length of the SVG line and update the custom property this to animate the strokedashoffset property by the exact amount required to fully hide/show the svg line | componentDidMount() {
let svgLine = document.querySelector("svg line");
let length = svgLine.getTotalLength();
let root = document.documentElement;
root.style.setProperty("--stroke-dash", length);
} | [
"function blueLineInit() {\r\n pathStatus.ready = true;\r\n whiteLineRWD();\r\n blueLineRWD();\r\n var stroke = document.querySelector('#blueLineSVG path');\r\n pathStatus.length = stroke.getTotalLength();\r\n $('#blueLineSVG path').css('stroke-dasharray', pathStatus.length);\r\n $('#blueLineSV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specific Person Holiday Greeting | function happyHolidaysTo (name) {
return "Happy holidays, " + name + "!"
} | [
"function getGreeting()\n{\n var hournow = parseInt(moment().format(\"HH\")); //24 hour format\n //5am to 12pm = good morning\n if(hournow >= 5 && hournow <= 12)\n return \"Good Morning,\";\n //1pm to 7pm = good afternoon\n else if(hournow >= 13 && hournow <= 18)\n return \"Good Afternoon,\";\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the testing debugger server. | function initTestDebuggerServer(aServer = DebuggerServer)
{
aServer.registerModule("xpcshell-test/testactors");
// Allow incoming connections.
aServer.init(function () { return true; });
} | [
"_initWebServer() {\n logger.info(t('webServer.starting'));\n this.WebServer = require('./web/server')(this);\n logger.info(t('webServer.started', {\n port: this.Config.express.port\n }));\n }",
"function startTestDebuggerServer(title, server = DebuggerServer) {\n initTe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update names listing of countries per region | function updateRegionCountryNames(region) {
let currentRegionCountries = []
regionInfo[region].forEach(el => {
el && currentRegionCountries.push(el)
})
document.querySelector('.countries-of-region').innerHTML = ''; // removing prior countries
for (let country of currentRegionCountries) {
... | [
"function listCountriesByRegion(region, name) {\n const countryContainer = document.querySelector(\".country-container\");\n countryContainer.innerHTML = \"\";\n for (let i = 0; i < region.length; i++) {\n const country = document.createElement(\"h4\");\n if (name === \"world\") {\n const temp = conti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a CSS color string to a color object. Note that hex colors must be prefixed with to be considered valid. `inputColor` will be used unmodified as the `str` property of the returned object. Alpha defaults to 100 if not specified in `inputColor`. Returns undefined if the color string is invalid/not recognized. | function getColorFromString(inputColor) {
var color = cssColor(inputColor);
if (!color) {
return;
}
return __WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"]({}, getColorFromRGBA(color), { str: inputColor });
} | [
"function getColorFromString(inputColor) {\n var color = (0,_cssColor__WEBPACK_IMPORTED_MODULE_0__.cssColor)(inputColor);\n if (!color) {\n return;\n }\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, (0,_getColorFromRGBA__WEBPACK_IMPORT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tightens a schema by: Setting `type: 'object'` for instances where `properties` is defined and `type` is not. Setting `type: 'string'` where `pattern` is defined and `type` is not. Setting `type: 'string'` where `minLength` or `maxLength` are defined. Setting `type: 'string'` where `enum` values are all strings. Settin... | function tighten(schema) {
if (!isDefined(schema.type)) {
if (isDefined(schema.properties)) {
schema.type = 'object';
}
if (isDefined(schema.pattern)) {
schema.type = 'string';
}
if (isDefined(schema.minLength) || isDefined(schema.maxLength)) {
schema.type = 'string';
}
i... | [
"static get jsonSchema() {\n return {\n type: 'object',\n required: ['name'],\n\n properties: {\n id: {type: 'integer'},\n name: {type: 'string', minLenth:1, maxLength: 255},\n age: {type: 'number'} //optional\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Redraws coordinate plane and equation | function update() {
drawPlane();
if (!pt1.pinned) drawHoverPoint(pt1);
else if (!pt2.pinned) drawHoverPoint(pt2);
// draws line between points
drawLine();
// draws numerical label next to line indicating slope
drawSlopeLabel();
// display labels next to points to help explain calculation
showRiseOv... | [
"function redrawElement() {\n // Tell two.js to update shape\n shape.translation.set(transform.x, transform.y);\n shape.scale = transform.scale;\n shape.rotation = Math.radians(transform.angle);\n\n if (debug_busta === true) {\n debugShape(shape);\n }\n\n // Redraw\n two.update();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: arenaController.editdefaultschedule functionality: this function edits the default schedule of an arena | function editdefaultschedule(req, res, nxt) {
var arenaid = req.params.arenaid;
Arena.findOne({ _id: arenaid }, function (err, arena) {
if (err) {
return res.status(500).json({ error: err.message });
}
if (!arena) {
return res.status(400).json({ error: 'the arena ... | [
"editSchedule(index, value) {\n if (this.scheduleEditting !== index && this.scheduleEditting !== null) {\n this.saveSchedule(index, false);\n }\n\n this.scheduleEditting = (value) ? index : null;\n }",
"edit() {\n\t\tthis.mode = \"Edit Schedule\";\n\t\tthis.t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns a boolean function that checks whether fun is equal to cns | function makeValCheck( fun, cns ){
"use strict";
return function (x) { return fun( x ) === cns; };
} | [
"function myTrueFun(){\n \treturn true;\n }",
"function myTrueFun(){\n\treturn true;\n}",
"function makeEqualsFunction(fn) {\n if (typeof fn === 'function') {\n return fn;\n }\n if (typeof fn === 'string') {\n var key = fn;\n return function (x, y) {\n return x[key] ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check whether clipBegin is in the right format | function checkClipBegin() {
if (!continueProcessing) {
var clipBegin = getTimefieldTimeBegin();
if (isNaN(clipBegin) || (clipBegin < 0)) {
displayMsg("The inpoint is too low or the format is not correct. Correct format: hh:MM:ss.mm. Please check.",
"Check inpoint");
... | [
"function validClip(video, index){\n\t\t\t\tif((!video.start || ! video.end) && index > 0){\n\t\t\t\t\talert('Please enter a start and end point');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif(video.start && video.end){\n\t\t\t\t\tif(video.start > video.end){\n\t\t\t\t\t\talert('Start point cannot be further tha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
intervalChoice takes an interval list such as [a1, fun1, a2, fun2, a3, ...] and executes the function that corresponds to the respective interval fun1(a, a1, a2) if a1 < a <= a2 fun2(a, a2, a3) if a2 < a <= a3 etc ... | function intervalChoice(a, interval) {
// filter numbers
var numbers = interval.filter(function(a) { return typeof a === 'number'; });
// get interval limits
var amin = numbers[0];
var amax = numbers[numbers.length - 1];
// capture numbers beyond interval limits
interval.unshift(-Infinity);
interval.... | [
"function whichRange(a,b){\n if ((a<=60 && a>=40) && (b<=60 && b>=40)){\n return `${a} and ${b} are in the range of 40..60`\n }else if((a<=100 && a>=70) && (b<=100 && b>=70)){\n return `${a} and ${b} are in the range of 70..100`\n }else{\n return 'out side of the question scope but working on it'\n }\n}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that only indicators are used in favourites | function validateFavoriteDataItems() {
//Data elements from favorites
//added visualizations for 2.34
var issues = [];
for (var type of ["charts", "mapViews", "reportTables", "visualizations"]) {
for (var i = 0; metaData.hasOwnProperty(type) && i < metaData[type].length; i++) {
var item = metaData[type][i];
... | [
"userHasFav(favArtworkId) {\r\n if (welcomePage.authUser.favorites && welcomePage.authUser.favorites.includes(favArtworkId)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"function checkFav() {\n if (vm.userWatchlist.length > 0) { ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
`CommentsController.prototype.addCommentFormListener()` Execute the render function on that found image object to append the new comment | addCommentFormListener() {
// Create this to be in self, because self is only used in addCommentFormListener() scope which will reference the correct moment of "this" via an alias.
const self = this;
// Iterates through each comment form and adds an eventlistener to trigger a function on form ... | [
"addCommentFormListener() {\n \n // Create this to be in self, because self is only used in addCommentFormListener() scope which will reference the correct moment of \"this\" via an alias.\n const self = this;\n // Iterates through each comment form and adds an eventlistener to trigger a function on fo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the first item in the dropdown list, or null | function first_dropdown_item() {
debugger;
return $("li", dropdown).slice(0,1);
} | [
"get firstSelectedOption() {\n var _a;\n return (_a = this.selectedOptions[0]) !== null && _a !== void 0 ? _a : null;\n }",
"get firstSelectedOption() {\n var _a;\n\n return (_a = this.selectedOptions[0]) !== null && _a !== void 0 ? _a : null;\n }",
"get firstSelectedOptionIndex() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
extendObjects 1. Set request encoding for stringification of stream 2. Set req.params: 3. Set res.send : Status Code, | Body | function extendObjects (req, res, next) {
req.setEncoding(req.headers['content-encoding'] || 'utf8');
req.params = {};
res.send = send;
next();
} | [
"function encodeExtensionObject(object, stream) {\r\n\r\n\r\n if (!object) {\r\n ec.encodeNodeId(makeNodeId(0), stream);\r\n stream.writeUInt8(0x00); // no body is encoded\r\n // note : Length shall not hbe specified, end of the job!\r\n } else {\r\n // ensure we have a valid encod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
endregion region function ValidateInputField(id, errId) A standardized validation function that will check to see if the input field is validate according to the web browser, and if not report the problem in the errId tag innerHTML | function ValidateInputField(id, errId) {
var isFieldValid = true;
// see https://www.w3schools.com/js/js_validation_api.asp
// Test the field based upon the id and if it fails, we set the isValidForm to false
var testInputElement = document.getElementById(id);
if (testInputElement && testInputEleme... | [
"function validate(inID, errID) {\n\tvar name = document.getElementById(inID).value.trim();\n\tvar nameField = document.getElementById(inID);\n\tvar errorMess = document.getElementById(errID);\n\t\n\t//Validate user input and add message. Message is blank if input okay\n\terrorMess.innerHTML = \ttestInput(nameField... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scales in or out to achieve a target Application Load Balancer request count per target. | scaleOnRequestCount(id, props) {
const resourceLabel = props.targetGroup.firstLoadBalancerFullName +
'/' + props.targetGroup.targetGroupFullName;
return super.doScaleToTrackMetric(id, {
predefinedMetric: appscaling.PredefinedMetric.ALB_REQUEST_COUNT_PER_TARGET,
resour... | [
"scaleOnRequestCount(id, props) {\n if (this.albTargetGroup === undefined) {\n throw new Error('Attach the AutoScalingGroup to an Application Load Balancer before calling scaleOnRequestCount()');\n }\n const resourceLabel = `${this.albTargetGroup.firstLoadBalancerFullName}/${this.alb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of a given option to its default value. | setOptionValueToDefault(declaration) {
this._values[declaration.name] = this.getDefaultOptionValue(declaration);
} | [
"setDefault() {\n\n this.$field.find('option:selected').prop('selected', false);\n this.$field.trigger('change');\n }",
"setDefault() {\n\n if ( this.options.default ) {\n\n this.$field.find(`[value=\"${this.options.default}\"]`).prop('checked', true).change();\n }\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get last travel id | getLastId() {
/* if(this.travels.length){
return this.travels[this.travels.length-1].id
}
else{
return 0
} */
return this.travels.length ? this.travels[this.travels.length - 1].id : 0
} | [
"static getLastID() {\n\n let lastID = 0\n if(trip.length != 0){\n lastID =trip[trip.length-1].id\n }\n return lastID\n }",
"static getLastId(){\n let lastId =0\n if (games.length > 0) {\n lastId = games[games.length-1].id\n }\n return lastId\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draw smoothness value of Deferred Shading gbuffer. | set DeferredSmoothness(value) {} | [
"get DeferredSmoothness() {}",
"function vs_fade_in_out(ngon)\n{\n for (let v = 0; v < ngon.vertices.length; v++)\n {\n ngon.vertices[v].shade = (Math.sin(this.numTicks / 64) + 1);\n }\n}",
"function smooth(v,o,f){\n\t v = !v ? 0 : v;\n\t f = Math.min(f, obj.config.snap);\n\t if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tell this contact that its parent algedonode is active | parentActivated() {
this.algedonodeActive = true
} | [
"activate() {\n this.active = true\n this.contacts.forEach(contact => contact.parentActivated())\n }",
"_updateActiveFlag() {\n // Calculate active flag.\n let newActive = this.isActive();\n if (this._active !== newActive) {\n if (newActive) {\n this._setActiv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pythogorean Triplet are three numbers like 3,4,5 where a^2+b^2 = c^2. | function pythogoreanTriplet(){
const sum = 1000;
for (a=1;a<=sum/3;a++){
for (b=a+1;b<=sum/2;b++){
c = sum-(a+b);
if (a*a + b*b == c*c){
var product = a*b*c;
break;
}
}
}
return product;
} | [
"function pythagoreanTriple(a, b, c){\n \n if(a * a == b * b + c * c){\n console.log(\"yes\");\n }\n else if(b * b == a * a + c * c){\n console.log(\"yes\");\n }\n else if(c * c == a * a + b * b){\n console.log(\"yes\");\n }\n else{\n console.log(\"no\");\n }\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Author: [S.H] Name: _showSingnInPage Description: Params: No one Return: No one | function _showSingnInPage() {
Pages.renderPage(Pages.signIn, null, div_loginPage_loginPageContent);
} | [
"function ViewItineraryPage() { }",
"function showProfilePage(loggedinUserName) {\n\n $('#profile-page').show();\n $('#signin-form').hide();\n $('#sign-in-page').hide();\n $('#js-signout-link').show();\n $('#js-signout-link').text(\"Sign out \" + loggedinUserName);\n $('#js-signin-link').hide();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sort members alphabetically, with a special member first | sortMembers(members, first) {
const isFirst = (memberLikeThing) =>
memberLikeThing === first || memberLikeThing.id === first.get('id');
members.sort(function (memA, memB) {
const aFirst = isFirst(memA);
const bFirst = isFirst(memB);
if (aFirst && !bFirst) {
return -1;
} els... | [
"function sortMembers(members) {\n members.sort(function(a, b) {\n if (a.firstname === b.firstname) return 0;\n if (a.firstname < b.firstname) return -1;\n if (a.firstname > b.firstname) return 1;\n });\n \n return members;\n}",
"function sortGroup(member) {\n\tvar len = member.length;\n\tfor(var i=0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Teams append group by group Id to favorite list of user by user Id | async function markTeamAsFavorite(user_id, team_id) {
await DButils.execQuery(
`insert into dbo.FavoriteTeams values ('${user_id}',${team_id})`
);
} | [
"_createGroupOfFavorites() {\n const activateFavorite = DISABLE_FAVORITE in this.actionContext ?\n !this.actionContext[DISABLE_FAVORITE] :\n true;\n this.favoriteFilters.forEach(irFilter => {\n const favorite = this._irFilterToFavorite(irFilter);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses linux cpufreq trace events. | function CpufreqParser(importer) {
Parser.call(this, importer);
importer.registerEventHandler('cpufreq_interactive_up',
CpufreqParser.prototype.cpufreqUpDownEvent.bind(this));
importer.registerEventHandler('cpufreq_interactive_down',
CpufreqParser.prototype.cpufreqUpDownEvent.bind(this));
... | [
"function LinuxPerfParser(importer) {\n this.importer = importer;\n this.model = importer.model;\n }",
"function full_cycle_parse_prometheus_metrics(payload) {\n const core_report = prom_reporting.get_core_report();\n core_report.set_cloud_types(payload.cloud_pool_stats);\n core_report.set_unhealt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if country is first of a letter (Labels) | function isFirstOfLetter(country, cn) {
const nextCountry = countries[cn - 1]
if (nextCountry && cn > 0 && cn < countries.length && nextCountry.name.charAt(0).toLowerCase() === country.charAt(0).toLowerCase()) {
return null
} else {
return true
}
} | [
"function isFirstOfLetter(country, cn) {\n const nextCountry = countries[cn - 1]\n if (nextCountry && cn > 0 && cn < countries.length && nextCountry.name.charAt(0).toLowerCase() === country.charAt(0).toLowerCase()) {\n return false\n } else {\n return true\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to add more time to the elements | function moreTime(elementID){
var i, j;
//Get the index of the selected element id
for (i = 0; i < diagram.length; i++) {
var cur = diagram[i];
if (cur._id == elementID) {
break;
}
}
// increase the time of all the elements
for (var j = i; j < diagram.length;... | [
"function addToTime(time, addSeconds) {\n\n}",
"function addTime() {\n let $currentForm = $(this).parent();\n let parentID = $currentForm.attr(\"data-index\");\n let newID = 0;\n let $previousSibling = $currentForm.find(\"input[type=time]\").last();\n // If there is no previous sibling construct a ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Serialize the table borders | serializeTableBorders(writer, format) {
let borders = format.borders;
// if (IsNoneBorder(borders))
// return;
writer.writeStartElement(undefined, 'tblBorders', this.wNamespace);
this.serializeBorders(writer, format.borders, 8);
writer.writeEndElement();
} | [
"serializeTableMargins(writer, format) {\n this.serializeMargins(writer, format, 'tblCellMar');\n }",
"serializeTableFormat(writer, format, table) {\n // if (!isNullOrUndefined(table))\n // {\n // List<Stream> tempDocxProps = new List<Stream>();\n // for (int i = 0, c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PUSH Category to array | pushCategory(state, category) {
state.categories.unshift(category)
} | [
"function addCategory(category){\n categorySet.set.push(category);\n}",
"function addToCateg () {\n\n\t\tfor(var i=0;i<whichCateg;i++){\n\t\t\tif(cathegory == Object.getOwnPropertyNames(categ.categName)[i])\n\t\t\t\t{console.log(\"this is working BUT\");\n\t\t\t\t\tconsole.log(\"cathegory \" + cathegory);\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to resolve and invoke the grid function based on profile id and events | function _resolveDataGridFunctionCall(evt, event) {
var _profileID = evt.target.profileId;
var _blockID = evt.target.blockId;
if (_profileID && _blockID) {
var strFun = _profileID + "_" + _blockID + event;
try {
window[strFun](evt);
} catch (e) {
// window.console.log('function: '+strFun+' doesno... | [
"viewProfile(event){\n\t\t// TODO\n\t}",
"function projectSearchResultEvent() {\n projectClickFetchEvent();\n editProjectClickFetchEvent();\n memberClickFetchEvent();\n}",
"function afterDataGridApply(namespace) {\r\n\tvar _profileID = namespace.grid.profileId;\r\n\tvar _blockID = namespace.grid.blockI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
an alert message to inform the user that the script is complete | function complete() {
alert('The SharePoint script has finished running.');
} | [
"function actionCompleted () {\n\n\talert('Completed');\n}",
"function printCompleteMessageToConsole() {\n console.log('Download complete');\n}",
"function Complete()\n\t{\n\t\tcompleted = true;\n\t}",
"function syncCompletedMessageBox()\n{\n\tUIATarget.onAlert = function onAlert(alert) {\n\tvar title = aler... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Refresh transfroms from element transform. | refreshTransforms() {
const matrix = this.getTransformMatrix();
this._translateTransform.update(matrix);
this._rotateTransform.update(matrix);
this._scaleTransform.update(matrix);
} | [
"refreshTransforms() {\n const matrix = this.getTransformMatrix();\n this._translateTransform.update(matrix);\n this._rotateTransform.update(matrix);\n this._scaleTransform.update(matrix);\n }",
"reapplyTransforms(updateElementsTransform = true) {\n let matrix = Matrix.id... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether the given properties match those of a `JsonMatchPatternProperty` | function CfnWebACL_JsonMatchPatternPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
errors.collect(new cdk.ValidationResult('Expected an object, but receiv... | [
"function CfnRuleGroup_JsonMatchPatternPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an obje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array containing the coordinates [x,y] of the mid point between the provided points. p1: Point object p2: Point object | function midXYBetweenTwoPoints(p1, p2) {
return [ (p1.x + p2.x) / 2 , (p1.y + p2.y) / 2 ];
} | [
"function midpoint (p1, p2) {\n let mx = (p1.x + p2.x) / 2\n let my = (p1.y + p2.y) / 2\n\n return [mx, my]\n}",
"function midpoint(P1, P2) {\n var x1 = P1[0];\n var y1 = P1[1];\n var x2 = P2[0];\n var y2 = P2[1];\n var result = [(x1 + x2)*0.5, (y1 + y2)*0.5];\n return result;\n}",
"functio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update pizza by id | updatePizza( { params, body }, res ) {
Pizza.findOneAndUpdate( { _id: params.id }, body, { new: true, runValidators: true } )
.then( dbPizzaData => {
if ( !dbPizzaData ) {
res.status ( 404 ).json( { message: 'No pizza found with this id!' } );
return;
... | [
"updatePizza({ params, body }, res) {\n Pizza.findOneAndUpdate({_id: params.id }, body, {new: true, runValidators: true })\n .then(dbPizzaData => {\n if (!dbPizzaData) {\n res.status(404).json({ message: 'No pizza found with this id!' });\n return;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ex8 Avem o functie cu 2 numere si un operator, vrem sa obtinem rezultatul in functie de operator "add", "substract", "multiply", "divide" ex calculate(2, 5, "add") => 7 calculate(10, 8, "substract") => 2 | function calculate(number1, number2, operator) {
if (operator === 'add') {
return suma();
} else if (operator === 'multiply') {
return inmultire();
} else if (operator === 'substract') {
return scadere();
} else if (operator === 'divide') {
return impartire();
}
... | [
"function operate(operator, num1, num2) {\n if (operator === '+') {\n return(add(num1, num2));\n }\n else if (operator === '-') {\n return(subtract(num1, num2));\n }\n else if (operator === 'x') {\n return(multiply(num1, num2));\n }\n else if (operator === '/') {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the workflow run ID. | function getWorkflowRunID() {
const workflowRunID = parseInt(getRequiredEnvParam("GITHUB_RUN_ID"), 10);
if (Number.isNaN(workflowRunID)) {
throw new Error("GITHUB_RUN_ID must define a non NaN workflow run ID");
}
return workflowRunID;
} | [
"function getWorkflowRunID() {\n const workflowRunIdString = (0, util_1.getRequiredEnvParam)(\"GITHUB_RUN_ID\");\n const workflowRunID = parseInt(workflowRunIdString, 10);\n if (Number.isNaN(workflowRunID)) {\n throw new Error(`GITHUB_RUN_ID must define a non NaN workflow run ID. Current value is ${... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws the current VBOBox, using the currently loaded program, variables and VBO contents. | draw() {
if (!this.validate()) {
console.log('ERROR: Before .draw() you need to call .enable()');
}
if (this.box_num == 1) {
gl.drawArrays(this.draw_method, 0, this.vertex_count);
return;
}
var v_count = 0;
var temp;
var geom;
for (var i = 0; i < g_scene.geometries.size... | [
"function drawStatic() {\n\tgl.bufferData(gl.ARRAY_BUFFER, (objects) * 4 * 8, gl.DYNAMIC_DRAW);\n\tvar bl = box.length;\n\tfor (i = 0; i < bl; i++) {\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, (2 + i) * 4 * 8, flatten(box[i]));\n\t}\n\n\tvar barLength = bars.length;\n\tfor (i = bl; i < barLength + bl; i++) {\n\t\tgl.bu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
display users favorite gifs on the page | function renderFavorites() {
$("#favoritesContainer").empty();
if (localStorage.getItem('favoriteGifs')) {
var favoritesArr = JSON.parse(localStorage.getItem('favoriteGifs'));
for (var i = 0; i < favoritesArr.favs.length; i++) {
var stillUrl = favoritesArr.favs[i].stillUrl;
var gifUrl = favorite... | [
"function displayFavGifs() {\n $(\"#favorites-div\").empty();\n favorites.forEach(function(favorite) {\n const gifDiv = $(\"<div>\");\n const gif = $(\"<img>\");\n gifDiv.append(gif).addClass(\"gif-container\")\n .data({\n still: favorite.still,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wrap the content and update the modal size if needed | function wrapContent() {
debug('wrapContent');
var wrap = $(currentSettings.wrap[currentSettings.type]);
modal.content.append(wrap.children().remove());
modal.contentWrapper.wrapInner(wrap);
if (currentSettings.gallery) {
// Set the action for the next and prev button (or remove them)
modal.c... | [
"function wrapContent() {\n debug('wrapContent');\n\n var wrap = $(currentSettings.wrap[currentSettings.type]);\n modal.content.append(wrap.children().remove());\n modal.contentWrapper.wrapInner(wrap);\n\n if (currentSettings.gallery) {\n // Set the action for the next and prev button (or remove... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves specific incidents based on search input (incident ID or phone number) from an API call to the web server. | function searchIncidents() {
const id = document.getElementById('search').value;
const data = {
incidentId: id
};
$.ajax({
url: "/database/search",
type: "POST",
data: data,
success: function (result) {
clearIncidents();
addIncidentMarkers(... | [
"getAllIncidents() {\n this.incidentProvider.getAll('incident').subscribe((incident) => {\n this.incidents = incident;\n });\n }",
"function searchIncidents(location, incident, comment, after, before) {\n var deferred = $q.defer();\n // Add params to request if they exist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
make a list for gaps | function getGaps(requestedFloor) {
for (var i = 0; i < listElevators.length; i++) {
gapList.push(Math.abs(requestedFloor - listElevators[i].current_position));
}
} | [
"function gapsCreator(length) {\n var gaps = [];\n var counter = 1;\n while(gaps[gaps.length-1] > 1 || gaps.length == 0) {\n gaps.push(Math.floor(2*(length/Math.pow(2,counter+1)))+1)\n counter++\n }\n if(gaps[gaps.length-1] != 1) {\n gaps.push(1)\n }\n return gaps\n}",
"function getGaps(arrSize) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the ?dir= url value | function getDirFromUrl(url) {
var regex = new RegExp("[\\?&]dir=([^&#]*)");
results = regex.exec(url);
return results[1] ? decodeURIComponent(results[1]).replace(/\+/g, ' ') : '/';
} | [
"function dir() {var parts = url.split(\"/\"); return (url.lastIndexOf('/') !== url.length - 1 ? parts[parts.length - 1] : parts[parts.length - 2]);}",
"function senddir(dir){\n\t\t// If the scraper option is checked, then tell dirparer to use getID3\n\t\tvar scrape = $('#scraper').is(\":checked\");\n\t\t$.post('... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the `mobileSearchOpened` body class by clicking on the `Search` icon on mobile devices. The CSS will open a search bar in the full width of the menu. Also, the search field becomes in focus. | function openSearchPanelOnMobile() {
$('.mobile-search-panel').click(function() {
$body.addClass(mobileSearchOpenedClass);
$searchField.focus();
});
} | [
"function openSearchPanelOnMobile() {\n $('.mobile-search-panel').click(function() {\n $body.addClass(mobileSearchOpenedClass);\n $('#search-field').focus();\n });\n}",
"openSearch() {\n const searchInputElement = this.shadowRoot.getElementById('search_input');\n if (searchInputElement.c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the selected maternal health variable in the current tab. | getMaternalHealthSelected() {
switch (this.#tabSelected) {
case "overview":
return this.overview.maternalHealthSelected;
case "health":
return this.health.maternalHealthSelected;
case "broadband":
return this.broadband.maternalHealthFilterSelected;
def... | [
"function selectTemp() {\n temp_range = tempMenu.property(\"value\");\n console.log(`Temperature Range Selected: ${temp_range}`) \n}",
"getGameVariable(txt) {\n return this.story.variablesState._globalVariables.get(txt).value;\n //return this.story.variablesState._globalVariables[txt]._value\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add another shuffled deck of cards | function addDeck()
{
for (var s=0; s<SUITE.length; s++)
for (var c=0; c<CARDS_IN_SUITE; c++)
Cards.push(s+':'+(c+1));
shuffleCards();
} | [
"addShuffledDeck() {\n let deck = new Deck();\n deck.createDeck();\n deck.shuffleDeck();\n this.cards = this.cards.concat(deck.cards);\n }",
"addCardsToDeck() {\n deck.cards.push(cardZero);\n deck.cards.push(cardOne);\n deck.cards.push(cardTwo);\n deck.cards.push(cardThree);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
console.log(rechercheLien) / console.log(singleVerb) / console.log(dataVrai) / let result1= object.filter(element => element.conjugated_forms[0][1].split(" ")[1]=== verbSingleOne.split(".")[0]||element.conjugated_forms[1][1]=== verbSingleOne.split(".")[0]||element.conjugated_forms[1][1]===verbSingleOne.split(".")[0]||e... | function seachVerb(e) {
e.preventDefault()
let result2 = datass.filter(element => element.conjugated_forms[0][1].split(" ")[1] === inputValue || element.conjugated_forms[1][1] === inputValue || element.conjugated_forms[1][1] === inputValue || element.conjugated_forms[2][1] === inputValue)
tr... | [
"filtrarSugerencias(resultado, busqueda){\n //filtrar con .filter\n //con idexOf nos retornará la posicion en la que se encuentra, sino lo encuentra retornará -1\n //Aqui le decimos traeme todos en los que el resultado sea diferente a -1\n const filtro = resultado.filter(filtro => filtro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
next three mehtods are the elementary row operations: scales a given row of the matrix by amount precondition: amount is not 0 | scaleRow(row, amount)
{
for (var c = 0; c < this.n; c++)
this.matrix[row][c] = math.multiply(this.matrix[row][c], amount);
} | [
"function multRows(matrix, row, scalar){\n for (let i=0; i < matrix[row].length; i++){\n //matrix[row][i] *= scalar;\n matrix[row][i] = matrix[row][i].mul(scalar);\n }\n return matrix;\n}",
"mScaleProduct(scaleInput) {\n for(let i = 0; i < this.rows; i++){\n for(let j = 0; j < this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
mapeamentosDatasets validar os arquivos de dados e mapeamento, conforme as regras esperadas. Retorno: void | function mapeamentosDatasets(myJsonDoc, mapeamentos, myDataFields) {
console.log('mapeamentosDatasets');
datasets = [];
campos = myDataFields;
// iterar por cada visualização mapeada
for (var i=0;i<mapeamentos['visualizations']['length'];i++) {
myMap = mapeamentos['visualizations'][i];
... | [
"function validarArquivos(myJsonDoc, myJsonMap, myDataFields) {\n console.log('validarArquivos');\n\n // Verificar o tipo de gráfico escolhido\n try {\n if ( (myJsonMap['visualizationType'] === undefined) || (myJsonMap['visualizationType'] != 'BAR_CHART') )\n throw { msg: 'campo \"visuali... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
cancelDevicePJobLogHook logs copy jobs that are produced on devices that are associated to restricted groups. | function cancelDeviceJobLogHook(inputs, actions, MAX_SHEETS_PER_MONTH) {
var sped = "SpedTeachers";
var unrestricted = "UNRESTRICTED"
var name = inputs.user.fullName;
var userName = inputs.user.username;
var document = inputs.job.documentName;
var duplex = inputs.job.isDuplex;
var sheets = i... | [
"cancelBatchJob() {\n const batchId = this.model.getItem('exec.jobState.job_id');\n if (batchId) {\n this.bus.emit(jcm.MESSAGE_TYPE.CANCEL, { [jcm.PARAM.JOB_ID_LIST]: [batchId] });\n if (this.looper) {\n this.looper.clearRequ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a numbered surface | function createSurface(number) {
return new Surface({
size: [undefined, 100],
content: "Surface " + number,
classes: ["test-surface", (i % 2 ? "odd" : "even")]
});
} | [
"function createSurface(number) {\n return new Surface({\n size: [undefined, 100],\n content: \"<p>Surface \" + number + \"</p>\",\n classes: [\"test-surface\", \"n\" + i]\n });\n }",
"createSurface() {\n let controlPoints = [];\n for (var i = 0, k = 0; i < this.nPointsU; i++) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Buzz Saw Set the new target for Buzz | function ServerBuzzSawNewChaser(data) {
if(buzz) {
buzz.setTarget(data);
}
} | [
"SetTarget() {}",
"function SetTarget(newTarget : GameObject) {\n\tthis.target = newTarget;\n}",
"function setTarget() {\n // console.log(\"set target...\")\n // when there is target spot, add target\n if (avaiableTarget != 0) {\n $(this).addClass(\"target\");\n $('.target_panel').append(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to hide all drops on form click | function frmPatientSummary_hideDropDownsOnFormclick() {
frmPatientSummary.fcunitslist.setVisibility(false);
} | [
"function hideForms(){\n [].forEach.call(allOptions, function (form) {\n if(form.id !== 'base-options'){\n form.style.display = 'none';\n }\n });\n }",
"hideForms(){\n this.addItemFormView.hide()\n this.editItemFormView.hide()\n this.delet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add properties of o to o2 where undefined or null on o2 | function applyIf(o, o2) {
for (const name in o) {
if (o.hasOwnProperty(name)) {
if (o2[name] === undefined || o2[name] === null) {
o2[name] = o[name];
}
}
}
return o2;
} | [
"function apply2(o, o2) {\n for (const name in o) {\n if (o.hasOwnProperty(name)) {\n if (o[name] !== undefined && o[name] !== null) {\n o2[name] = o[name];\n }\n }\n }\n return o2;\n}",
"function fillIfDefined(a, b) {\n var allowDeletion = arguments.le... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
hack and slash version of worker thread for fft however this version only took my code from 3.0k ofdm fps > 3.3 ofdm fps. imo not worth it for complexity | function workerThreadFn() {
let that = {};
that.n = 1024;
that.inverse = true;
that.fft = new FFT.complex(that.n, that.inverse);
parentPort.on('message', (payloadIn)=>{
// let a = msg.bufferInput;
// console.log(msg);
let chunkCopy = payloadIn.chunk;
const ffttype = 'complex';
const... | [
"function createFFTWorker() {\n var worker = new Worker('fft_worker.js');\n worker.workerCallback = function(){};\n worker.onmessage = function(evt) {\n worker.workerCallback(evt.data);\n };\n worker.workFFT = function(timestamps, sig, sampleRate, fftSize, snapInterval) {\n worker.postMessage({\n ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
filters bar chart when area chart is brushed | function filterBarChart() {
if (d3.event !== null) {
barDomainFilters = d3.event.selection.map(selectedChart.chartObjects.secondaryChart.xScale.invert, selectedChart.chartObjects.secondaryChart.xScale);
selectedChart.chartObjects.primaryChart.wrangleData();
}
} | [
"function brushed() {\n\n barCharts.forEach(function(barChart) {\n barChart.selectionChanged(\n areaChart.brush.empty() ? areaChart.x.domain() : areaChart.brush.extent()\n );\n })\n}",
"function brushed() {\n\n\t// React to 'brushed' event\n\tvar selArea = areachart.brush.extent();\n\t// set new doma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Render button to confirm arrival when the user arrived at the interchange point. | renderConfirmalButton() {
const { onArrivalConfirmed, showConfirmationButton } = this.props;
const { destinationReached } = this.state;
if (!showConfirmationButton || !destinationReached) {
return null;
}
return this.renderButton('Confirm Arrival', onArrivalConfirmed);
} | [
"_handleClickToConfirm(){\n\t\tthis.BikeDetP.confirmFound(this.state.rawData,this.alertConfirmCallback);\n\t}",
"function submit (event) {\n event.preventDefault();\n var confirm = `\n <div class=\"confirmation\">Thank you for your reservation! We look forward to seeing you soon.</div`;\n\n if (event.target... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
imidiately checks for n1, n or n+1 pings | function expectRoundRobinPings(t, tc, n) {
return function expectRoundRobinPings(list, cb) {
var pings = _.filter(list, {type: events.Types.Ping});
pings = _.pluck(pings, "req.channel.hostPort");
// expect ping every 200 ms
if (pings.length < n - 1 || pings.length > n + 1) {
... | [
"function CalcPings() {\n\tfor (var i = 0; i < sv_maxClients.get(); i++) {\n\t\tvar client = svs.clients[i];\n\n\t\tif (client.state !== CS.ACTIVE) {\n\t\t\tclient.ping = 999;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!client.gentity) {\n\t\t\tclient.ping = 999;\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar total = 0;\n\t\tvar count... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
show chatbot container on click | function startChatbot() {
circle.classList.add('paused');
chatbotContainer.classList.add('chatbot-container');
chatbotContainer.style.overflow="auto";
chatbotContainer.style.width="30%";
} | [
"function showChat () {\n $(\"#toolbar\").show();\n $(\"#entry\").focus();\n\n $(\"#connect\").hide();\n $(\"#loading\").hide();\n $(\"#log\").show();\n scrollDown();\n}",
"function showChatWizContainer() {\n\t\t\t\tlogger.debug(\"showChatWizContainer\");\n\t\t\t\tsendPostMessage({\"lpEmbChatWiz\": \"LPNVPF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MD[a] Measure Distance 0x490x4A | function MD(a, state) {
var stack = state.stack;
var pi2 = stack.pop();
var pi1 = stack.pop();
var p2 = state.z1[pi2];
var p1 = state.z0[pi1];
var d = state.dpv.distance(p1, p2, a, a);
if (DEBUG) console.log(state.step, 'MD[' + a + ']', pi2, pi1, '->', d);
state.stack.push(Math.round(d... | [
"calculateDistance() {}",
"function calculateDistance() {}",
"function MD(a, state) {\n\t var stack = state.stack;\n\t var pi2 = stack.pop();\n\t var pi1 = stack.pop();\n\t var p2 = state.z1[pi2];\n\t var p1 = state.z0[pi1];\n\t var d = state.dpv.distance(p1, p2, a, a);\n\n\t if (exports.DE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send a message. Arguments: type the message type as string. content the message content as jsonserializable data. | function sendMessage(type, content, visgoth_content) {
ws.send(JSON.stringify({
"type": type,
"content": content,
"visgoth_content": visgoth_content,
}));
} | [
"send (type: string, ...rest) {\n let data = typeof(rest[0]) != 'function' ? rest[0] : {},\n callback = typeof(rest[0]) == 'function' ? rest[0] : rest[1];\n\n callback = typeof(callback) == 'function' ? callback : (() => {});\n chrome.runtime.sendMessage({ type, data }, callback);\n }",
"send(typ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the current values for all indicators for a specific year. Adds a "current" property to each country row where the indicator name equals the value for that specific year, if one exists. Otherwise it will be set to null. | function calcCurrent(data, year) {
// for each country in our dataset:
data.forEach(function(country) {
// iterate over each of the indicators we want to find the latest
// value for the year by finding the data point with that year
indicators.forEach(function(indicator) {
// create a new proper... | [
"function incrementCurrentYear() { currentYear++; }",
"function getCurrentFiscalYearData(symbol, metric, estRow, mergeAttr) {\n\tif (!mergeAttr.isValidQtrlyData) {\n\t\treturn estRow[2]; // if there is no valid qtrly data, return est for the current year\n\t}\n\n\tvar retVal = mergeQtrHistAndEstData(symbol, metr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Timeout function. The user votes to kill themselves. | function voteForSelfToDie() {
voteForUser(getParticipantID());
stopTimer();
} | [
"function timeout() \n {\n setTimeout(function () \n {\n counter -= 2000;\n if (counter > 0)\n {\n m2.edit(\"🗳 \"+question+\"\\nVous avez \" + counter/1000 + \" secondes pour voter...\\n\");\n timeout();\n }\n else { ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Flow object representing this flow chart. | getFlow() {
return new NgFlowchart.Flow(this.canvas);
} | [
"function _getFlowInfoObj () {\n return {\"name\" : _name, \"metaData\" : _metaData, \"options\" : _options, \"id\" : _id};\n }",
"function _getFlowInfoObj() {\n return {\"name\" : _name, \"metaData\" : _metaData, \"options\" : _options, \"id\" : _id};\n }",
"getFlowComponent() {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
memorise() populates slots with the selected spells from the available list. a spell can go into a slot of equal or higher level. the spell also remains in the available list (a spell can be memorised more than once). memorised spells are also added to the spell list on the 'cast' tab this is the divine preparation sys... | function memorise() {
'use strict';
var node, elems, level, slot, i;
var prefix = '';
// deselect all rows in the slot list
for (node = slotList.firstElementChild; node !== null; node = node.nextElementSibling) {
deselect(node);
}
// get the metamagic prefix
elems = document.querySelectorAll('#'+... | [
"function setupSlots(tab, has0, ability, perday, spells) {\r\n\t'use strict';\r\n\tvar num, j, k, used, locked;\r\n\r\n\ttab.slots = [];\r\n\tfor (j = (has0?0:1); j <= tab.maxslot; j++) {\r\n\t\tnum = perday[j];\r\n\t\tif (j > 0 && ability != null) {\t\t// != in order to test both null and undefined\r\n\t\t\tnum +=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets selected PHR account id to input field. Author Valsaraj Added on 07/12/2010 | function setUsersPHRAccountId(element, source, target) {
$(element+':'+target).value = $(element+':'+source).value;
} | [
"function setuid() {\n var fph = $('.userid');\n fph.attr(\"value\", shiny_uid);\n fph.trigger(\"change\");\n}",
"set accountID(v) {\n this._accountID = v;\n }",
"function updateJPBankAccountNumber() {\n var userAccountNumber = $('#pt4_addCheckAccountNumber').val();\n var jpSelectedAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getter to retrieve timeLeft value | get timeLeft(){
return this.getSeconds(this.currentTimeInput.value);
} | [
"timeLeft() {\n return this.timer;\n }",
"function getTimeLeft()\n{\n if (g_mins_left == 0)\n {\n return 'No time';\n }\n\n return g_mins_left + ((g_mins_left > 1) ? ' minutes' : ' minute');\n}",
"getTimeLeft() {\n let now = new Date();\n let timeLeft = Math.ceil((this.expireT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if autoquiz is turned on and the house doesn't have a riddle posted, and there are at most two fewer than maximum riddles posted, have the house post a riddle. Two fewer than maximum ensures that the first user who subsequently uploads a riddle will have it immediately appear. If alwaysAutoquiz is enabled, the house wi... | _shouldPostAutoquiz () {
return this._config.get('enableAutoquiz') &&
this._activeQueue.find(r => r.quizzerId === this._clientId) == null &&
(this._config.get('alwaysAutoquiz') || this._activeQueue.filter(r => r.active).length <= ((this._config.get('maxConcurrentRiddles') || 1) - 2))
} | [
"runQuizz () {\n while (this.attempts > 0) {\n this.setRandomNumber();\n let userChoise = parseInt(this.askUserNumber());\n // update level if user was right, otherwise = minus attept\n // and recalculate prizes\n if (userChoise === game.guessNumber) {\n this.levelUp();\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
delete the option at 'theIndex' from selection list 'theSel' | function deleteOption(theSel, theIndex)
{
var selLength = theSel.length;
if(selLength>0){theSel.options[theIndex] = null;}
} | [
"function deleteElem(select, pos) {\r\n\tif (pos >= select.options.length - 1) {\r\n\t\tselect.selectedIndex = select.options.length - 2;\r\n\t} else {\r\n\t\tselect.selectedIndex = pos + 1;\r\n\t}\r\n\tselect.options[pos] = null;\r\n}",
"delOption() {\n const selectOp = document.getElementById(this.selectOp);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check PixelRatio, iOS device, Vibration API, ArrayBuffers and endianess. | function _checkDevice() {
device.pixelRatio = window.devicePixelRatio || 1;
device.iPhone = navigator.userAgent.toLowerCase().indexOf('iphone') !== -1;
device.iPhone4 = device.pixelRatio === 2 && device.iPhone;
device.iPad = navigator.userA... | [
"function _checkDevice(){device.pixelRatio=window.devicePixelRatio||1,device.iPhone=navigator.userAgent.toLowerCase().indexOf(\"iphone\")!=-1,device.iPhone4=2==device.pixelRatio&&device.iPhone,device.iPad=navigator.userAgent.toLowerCase().indexOf(\"ipad\")!=-1,\"undefined\"!=typeof Int8Array?device.typedArray=!0:de... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Referral URL status Which is checking the referrer URL is matching with any of the URL from given list Referrer URL's. If yes, then show the invitation else not. | function checkReferrerStatus() {
var referrerStatus = false,
urls = settings.referrerURL,
len = urls.length,
i = -1,
href = document.referrer;
while (++i < len && !referrerStatus) {
if (url_check_equals(urls[i], href)) {
referr... | [
"function checkExcludeURLStatus() {\n var excludeStatus = false,\n urls = settings.excludeURL,\n len = urls.length,\n i = -1,\n href = document.referrer;\n\n while (++i < len && !excludeStatus) {\n if (url_check_equals(urls[i], href)) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if incorrect flips match star value and if true, changes star img and removes one star point from the bonus calculator. | function updateStars(){
if (incorrectGuesses === 10) {
$('#star-10').attr('src','images/black-star.png');
startingStars -= 1;
}
else if (incorrectGuesses === 20) {
$('#star-20').attr('src','images/black-star.png');
startingStars -= 1;
}
else if (incorrectGuesses === 30) {
$('#star-30').att... | [
"function starRating() {\n if (moveCount == 16 || moveCount == 24) {\n removeStar();\n }\n}",
"function removeStar() {\n\n\tlet ratingThreshold = [cards.length, cards.length * 2, cards.length * 3];\n\tif (totalMoves === ratingThreshold[starId - 1]) {\n\t\tdocument.getElementById('star-' + starId).classList.r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether the given properties match those of a `IAMPolicyDocumentProperty` | function CfnFunction_IAMPolicyDocumentPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('statement', cdk.requiredValidator)(properties.statement));
errors.collec... | [
"function CfnFunction_IAMPolicyDocumentPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an obje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
3.5 Populate a patient object for a single activity (cache results) | function populatePatientSingle( activity, itcb ) {
Y.log( 'getPopulatedActivities: populatePatientSingle patientId:' + activity.patientId, 'debug', NAME );
// skip this step if configured
if( options.withoutPatient ) {
return itcb( null );
... | [
"populate() {\n if (this.populated === false) {\n let patientCollection = this.db.collection('patients');\n let future = new Future();\n patientCollection.findOne({\"_id\": this.patientId}, {}, future.resolver());\n this.fhirModel = future.wait();\n this.populated = true;\n }\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
:: shard: ShardV1 / :: child: Datastore | constructor(store
/* : Datastore<Buffer> */
, shard
/* : ShardV1 */
) {
this.child = new KeytransformStore(store, {
convert: this._convertKey.bind(this),
invert: this._invertKey.bind(this)
});
this.shard = shard;
} | [
"function DataStore() {\n\n }",
"function dataStore() {\n}",
"function DataStore() {\n this._store = {};\n}",
"function DataStore() {\n console.log('DataStore instantiated');\n this.data = {};\n }",
"function loadShardsDb(){\n // Load shards data json as js object\n const shardsData = JSON.pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads .bob_therc file from bob_the/resources directory, Returns Promise with Object form of the data | function readBTRC () {
return new Promise((res, rej) => {
fs.readFile(__dirname + "/resources/.bob_therc", (err, data) => {
let btrc = JSON.parse(data.toString());
//console.log(btrc);
return err ? rej(err) : res(btrc);
});
});
} | [
"function readPeople() {\n return require(\"./people.json\");\n}",
"async getAll() {\n //open the file called this.filename\n //parse the contents\n //return the parsed data\n return JSON.parse(\n await fs.promises.readFile(this.filename, {\n encoding: 'utf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
resets the stars, moves and cards to a new board | function resetBoard() {
$(".card").attr("class","card");
$(".card").removeAttr("style")
$(".moves").text(0);
$(".stars li i").attr("class","fa fa-star");
$(".container").removeAttr("style");
} | [
"function resetBoard() {\n unsetSelected();\n move = [];\n drawPieces(game.board);\n enableButtons(false);\n}",
"function resetBoard() {\n // restart game context object\n gameContext = cloneObject(defaultGameContext);\n // clean all DOM elements\n $board.empty();\n // clean all variabl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Megan Solomon Notes: This function updates the game after a slice is added to a pan. Last Updated: 112219 by Nick | refreshGame(canAdd) {
var slice;
var row = 0, col = 0;
if (canAdd) {
var randomSlice = Math.floor((Math.random() * 7) + 1);
slice = this.physics.add.sprite(this.panArray[1][1].panPositionX, this.panArray[1][1].panPositionY, "slices", randomSlice).setInteractive();
this.input.setDraggable(slice);
... | [
"addSlice(gameObject) {\r\n\t\tfor (var i = 0; i < gameOptions.layout.rows; i++) {\r\n\t\t\tfor (var j = 0; j < gameOptions.layout.cols; j++) {\r\n\t\t\t\tif (gameObject.x == this.panArray[i][j].panPositionX && gameObject.y == this.panArray[i][j].panPositionY) {\r\n\t\t\t\t\tthis.panArray[i][j].add = false;\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
make sure the various menus use the same skin as specified | function SetSkin(skn : GUISkin)
{
menuSkin = skn;
} | [
"function initMenuSelectSkin(){\n\t$.click(\".item-skin\", (function(e){\n\t\tgstats.skin = this.dataset.skin;\n\t\tgstats.stor.StorageEcrit('skin', {skin:gstats.skin});\n\t\tchangeSkinHero();\n\t}));\n}",
"function initMenuSelectSkin(){\n\tvar item = document.getElementsByClassName(\"item-skin\");\n\t\n\tfor(var... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function updates the request on a status change, and then updates the state for the table. | update(id, status){
var data = this.state.data;
var request = this.findReq(id, data)[0];
request.status = status;
request.updated_at = new Date();
data = sorter(this.state.data);
this.setState({
data: data
});
} | [
"updateRequestStatus(state, data) {\n state.requestStatus = data;\n }",
"function changeTableStatus(event, status) {\n event.stopPropagation();\n const btn = document.getElementById(event.currentTarget.id);\n post(\"/api/authStaff/changeTableStatus\",\n JSON.stringify({newStatus: status, tableId: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A divider subcomponent for Breadcrumb component. | function BreadcrumbDivider(props) {
var children = props.children,
className = props.className,
content = props.content,
icon = props.icon;
var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('divider', className);
var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib_... | [
"function BreadcrumbDivider(props) {\n\t var children = props.children,\n\t content = props.content,\n\t icon = props.icon,\n\t className = props.className;\n\t\n\t var classes = (0, _classnames2.default)(className, 'divider');\n\t var rest = (0, _lib.getUnhandledProps)(BreadcrumbDivider, props);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the given data has the same length as the Y axis extracted ticks array. | function sameTicksLength(data, yaxisTicks) {
return yaxisTicks.length == data.length;
} | [
"function allTicksPresent(data, yaxisTicks) {\n var labels, expected_labels;\n\n // Get the actual and expected labels\n expected_labels = $.map(yaxisTicks, function(e) { return e[1] });\n labels = $.map(data, function(e) { return e[0] });\n\n // And compare them.\n return expected_labels.toString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set hotel rooms value based on saved cookie | function setCurrentHotelRooms() {
document.getElementById('hotelRooms').value = getCookieValue('room_number');
} | [
"function setCurrentSingleDualValues() {\r\n document.getElementById('singleRoom').value = getCookieValue('single');\r\n document.getElementById('dualRoom').value = getCookieValue('dual');\r\n}",
"updateAccessedRooms() {\n //we need to first get the cookies list of the browser, then get the elements ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets random word via HTTP request; updates model and view | function getRandomWord() {
var length = getLength();
$.ajax({
type: "GET",
url: "http://randomword.setgetgo.com/get.php?len=" + length,
dataType: "jsonp",
success: function (data) {
model.randomWord = data.Word;
initWord(model.randomWord);
initLetters();
... | [
"function getRandomWord() {\n return $.ajax({\n // Change the URL to cause a 404 error\n url: 'http://setgetgo.com/randomword/get.php'\n }).promise();\n }",
"function randomWord(){\r\n apiUrl = \"http://api.wordnik.com/v4/words.json/randomWord?api_key=v6cirzky1unhnpi8vharo85m04gbtlhidut11axk3a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that a transaction's data contents hash to its id | verifyID() {
const serial = this.serialize(this.data);
const calculatedID = this.calculateID(serial);
return (calculatedID === this.id);
} | [
"async function checkTransactionHash(transaction) {\n if (!Transaction.checkHash(transaction)) {\n logger.debug(\n `The transaction with the hash that didn't match was ${JSON.stringify(transaction, null, 2)}`,\n );\n throw new TransactionError('The transaction hash did not match the transaction data'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles creation of operation and value selector creation. Interprets the selected CSV column as categorical or numeric and provides the appropriate operation and value selector options. for numeric. == or != for categorical. Also triggers initial creation of bool mask array created from iterating over the specified al... | generateOperations() {
// remove previous elements if created
if (this.operation) {
this.operation.remove()
}
if (this.valueSelector) {
this.valueSelector.remove()
}
// check whether the column is numeric
this.expInfo["name"] = this.altColS... | [
"columnSelector() {\n /** The drop down selector for the column of the csv data to use as the alternate column filter */\n this.altColSelect = document.createElement(\"select\")\n // the column names of the csv\n this.altColSelect.id = \"colname\"\n for (let colOption in this.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Declare a function to process the company select event | function companySelectHandler(event) {
var companyID;
// Declare a local variable to store the ID of the current company
companyID = $("#formCompanyList").find('option:selected').val();
// orgID = $("#orgList").find('option:selected').val();
if (companyID > 0) {
... | [
"function companySelectHandler(event) {\n var companyID;\n // Declare a local variable to store the ID of the current company\n companyID = $(\"#formCompanyList\").find('option:selected').val();\n // orgID = $(\"#orgList\").find('option:selected').val();\n localCompany = ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
> This is an advanced method of grammY. Allows you to branch between two cases for a given context object. This method takes a predicate function that is tested once per context object. If it returns `true`, the first supplied middleware is executed. If it returns `false`, the second supplied middleware is executed. | branch(predicate, trueMiddleware, falseMiddleware) {
return this.lazy(ctx => predicate(ctx) ? trueMiddleware : falseMiddleware);
} | [
"function myMiddleware2(config = {}) {\n return (req, res, next) => {\n // middleware logic\n if(config.foo) {\n // ...\n } else {\n // ...\n }\n // call the next middleware/route\n next();\n }\n}",
"match(fn, context2 = null) {\n return this.fn === fn && this.context === context2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: extend Takes a constructor and a dictionary containing an initializer function, a properties dictionary, and a classProperties dictionary and creates a new constructor that will make objects with the provided initializer and properties and that will inherit from the given parent Parameters: parent A construct... | function extend(parent, options) {
// Create a new prototype from the parent provided
var prototype = Object.create(parent && parent.prototype);
// Get the values passed in options, or setup their defaults.
var properties = (options && options.properties) ? options.properties : {};
var classPropertie... | [
"function extend(/*parent , constructor */) {\n var constructor, parent;\n parent = arguments.length > 0 ? arguments[0] : Object;\n constructor = arguments.length > 1 ? arguments[1] : function () {\n parent.apply(this, arguments);\n if(!parent.prototype.initialize && this.initialize) {\n t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pull which option selected from document | function pullSelectedOption() {
selectedOption = document.forms[0].options.value;
} | [
"function pwGetCurrentSelection() {\n if($('#filter input[type=checkbox]').is(':checked')) {\n var vals = pwGetColVals(null, 'category');\n vals = pwGetColVals(vals, 'volume');\n vals = pwGetColVals(vals, 'type');\n vals = pwGetColVals(vals, 'location');\n vals = pwGetColVals(vals, 'shap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
submits the season5 coach file | function submitS5CoachFile(){
coach_file_text = document.getElementById("coachfiletext");
coach_file_text.value = season5coachfile;
submitRCoachFile()
} | [
"function submitS3CoachFile(){\n coach_file_text = document.getElementById(\"coachfiletext\");\n coach_file_text.value = season3coachfile;\n submitRCoachFile()\n}",
"function submit(){\n requestAccessToken(global_enterpriseEndpointUri, global_tokenEndpointUri, global_clientId, global_clientSecret,global_sco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets delay between steps to default value | function resetSpeed() {
stepDelay = DEFAULT_DELAY;
} | [
"reset() {\n this.nextDelay = this.initialDelay;\n }",
"function ResetSpeed() {\n UpdatedSpeed = DefaultSpeed;\n then = Date.now();\n}",
"function resetDelay() {\n\t\tvar options = document.getElementById(\"speed\");\n\t\tdelay = options[options.selectedIndex].value;\n\t}",
"function resetToDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
copy node ASG (.Resources.NodeAsg > .Resources.[Name]WorkerAsg) | _copyNodeAsg () {
let nodeAsg = objectExtend(
{},this._template.Resources.NodeAsg);
this._template.Resources[`${this._opts.Name}WorkerAsg`] = nodeAsg;
} | [
"_copyLaunchConfig () {\n let nodeAsg = objectExtend(\n {},this._template.Resources[`NodeLaunchConfig${this._versionString}`]);\n\n this._template.Resources[`${this._opts.Name}WorkerLaunchConfig${this._versionString}`] = nodeAsg;\n }",
"function copySpriteGraphic() {\n return gulp.src('./app/temp/spr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |