query stringlengths 9 14.6k | document stringlengths 8 5.39M | metadata dict | negatives listlengths 0 30 | negative_scores listlengths 0 30 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Emit event when mouse is moving inside main view | mouseMove(event) {
this.root.$emit('main-view-mousemove', event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onCanvasMouseMove(event) {\n const { viewer } = this.state;\n\n viewer.raiseEvent('mouse-move', event);\n }",
"function mouseMoveRelay( event ) {\n VG.context.workspace.mouseMove( event.clientX, event.clientY );\n //VG.context.workspace.mouseMove( event.layerX, event.layerY );\n}",
"mouseUp(event)... | [
"0.7307184",
"0.72058403",
"0.7194258",
"0.71625733",
"0.6990607",
"0.6976412",
"0.6965744",
"0.6880532",
"0.6775743",
"0.67612207",
"0.67575216",
"0.6642874",
"0.6594504",
"0.65817297",
"0.65721035",
"0.65269816",
"0.6513125",
"0.6501012",
"0.6455406",
"0.64186233",
"0.64176... | 0.8467006 | 0 |
Emit mouseup event inside main view | mouseUp(event) {
this.root.$emit('main-view-mouseup', event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"up(event)\n {\n if (this.viewport.pause || !this.viewport.worldVisible)\n {\n return;\n }\n\n if (event.data.pointerType === 'mouse')\n {\n this.isMouseDown = false;\n }\n\n if (event.data.pointerType !== 'mouse')\n {\n thi... | [
"0.7443364",
"0.72336453",
"0.6906489",
"0.6785423",
"0.67763263",
"0.6678231",
"0.6630988",
"0.6626563",
"0.6604001",
"0.6558809",
"0.65533197",
"0.64821905",
"0.6461801",
"0.6459714",
"0.64462817",
"0.64274985",
"0.64245516",
"0.6403879",
"0.6356534",
"0.6351743",
"0.634020... | 0.868965 | 0 |
Horizontal scroll event handler | onHorizontalScroll(ev) {
this.root.$emit('chart-scroll-horizontal', ev);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function manageHorizontalScroll() {\n var $scrollXContainer = $element.find('.igz-scrollable-container.horizontal').first();\n var contentWrapperWidth = $element.find('.igz-info-page-content-wrapper').first().width();\n var contentMinWidth = parseInt($element.find('.igz-info-page-c... | [
"0.74330026",
"0.7223611",
"0.6890736",
"0.6683333",
"0.6636938",
"0.66239625",
"0.65693283",
"0.6531143",
"0.65169257",
"0.6492528",
"0.64896595",
"0.64626575",
"0.64626575",
"0.64626575",
"0.64626575",
"0.64261675",
"0.63929564",
"0.6381221",
"0.63120735",
"0.63120735",
"0.... | 0.8451193 | 0 |
Vertical scroll event handler | onVerticalScroll(ev) {
this.root.$emit('chart-scroll-vertical', ev);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onscrolled(y, firstLine, height, lastLine) {\n }",
"delegateVerticalScrollbarMouseDown(browserEvent) {\n this._verticalScrollbar.delegateMouseDown(browserEvent);\n }",
"onInternalScrollChange (scrollPosition) {}",
"function virtualScrolling(event) {\n event = event || window.event;\n ... | [
"0.7282218",
"0.71638614",
"0.67905086",
"0.6782155",
"0.6772353",
"0.6740118",
"0.6736831",
"0.67196774",
"0.67196774",
"0.67083013",
"0.6689055",
"0.66697603",
"0.66668373",
"0.6662676",
"0.6661706",
"0.6654741",
"0.66521716",
"0.66521716",
"0.6648519",
"0.6640747",
"0.6621... | 0.8219131 | 0 |
Chart mousedown event handler Initiates drag scrolling mode | chartMouseDown(ev) {
if (typeof ev.touches !== 'undefined') {
this.mousePos.x = this.mousePos.lastX = ev.touches[0].screenX;
this.mousePos.y = this.mousePos.lastY = ev.touches[0].screenY;
this.mousePos.movementX = 0;
this.mousePos.movementY = 0;
this.mousePos.currentX = thi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mousedown() {\n drag = true;\n}",
"mouseDown(event){\n this.get('layoutCoordinator').checkDrag(event, this);\n }",
"function handleDown(e) {\n mouseD = true;\n y += 1;\n if (mouseD) {\n dragBar.addEventListener('mousemove', handleMove)\n }\n}",
"function doMousedown(e){\r\n... | [
"0.71359736",
"0.7037779",
"0.7016013",
"0.69802517",
"0.6958447",
"0.6886939",
"0.6805519",
"0.6638843",
"0.6616346",
"0.66100883",
"0.66024846",
"0.6595521",
"0.6580292",
"0.6517754",
"0.6502555",
"0.6463024",
"0.6447462",
"0.64267194",
"0.64218897",
"0.64211035",
"0.641888... | 0.77320796 | 0 |
Chart mouseup event handler Deactivates drag scrolling mode | chartMouseUp(ev) {
this.$store.commit(this.root.updateOptionsMut, { scroll: { scrolling: false } });
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"handleMouseup() {\n this._dragging = false;\n document.body.classList.remove('graph_dragging');\n }",
"chartMouseDown(ev) {\n if (typeof ev.touches !== 'undefined') {\n this.mousePos.x = this.mousePos.lastX = ev.touches[0].screenX;\n this.mousePos.y = this.mousePos.lastY = ev.... | [
"0.7265148",
"0.70599586",
"0.69359493",
"0.6889403",
"0.68863285",
"0.6874813",
"0.6811259",
"0.6730738",
"0.6713211",
"0.66972464",
"0.6693954",
"0.6629175",
"0.6616753",
"0.66123706",
"0.660733",
"0.66041005",
"0.65989155",
"0.659202",
"0.6571141",
"0.656847",
"0.65408397"... | 0.783943 | 0 |
Chart mousemove event handler When in drag scrolling mode this method calculate scroll movement | chartMouseMove(ev) {
if (this.$store.state.GanttElastic.options.scroll.scrolling) {
ev.preventDefault();
ev.stopImmediatePropagation();
ev.stopPropagation();
const touch = typeof ev.touches !== 'undefined';
let movementX, movementY;
if (touch) {
const scre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"chartMouseDown(ev) {\n if (typeof ev.touches !== 'undefined') {\n this.mousePos.x = this.mousePos.lastX = ev.touches[0].screenX;\n this.mousePos.y = this.mousePos.lastY = ev.touches[0].screenY;\n this.mousePos.movementX = 0;\n this.mousePos.movementY = 0;\n this.mousePos.cur... | [
"0.6981857",
"0.69277513",
"0.6739639",
"0.67206085",
"0.67203003",
"0.66855985",
"0.66760105",
"0.65755856",
"0.6522726",
"0.6504608",
"0.650253",
"0.64448774",
"0.6434294",
"0.6434294",
"0.6429921",
"0.6422627",
"0.64135236",
"0.6411673",
"0.64019287",
"0.63964564",
"0.6338... | 0.785791 | 0 |
Calculate task list columns dimensions | calculateTaskListColumnsDimensions() {
let final = 0;
let percentage = 0;
this.internalOptions.taskList.columns.forEach(column => {
if (column.expander) {
column.widthFromPercentage =
((this.getMaximalExpanderWidth() + column.width) / 100) * this.internalOptions.taskList.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getTaskListColumns() {\n this.calculateTaskListColumnsDimensions();\n return this.internalOptions.taskList.columns;\n }",
"onTaskListColumnWidthChange() {\n this.calculateTaskListColumnsDimensions();\n this.fixScrollPos();\n }",
"function fillTilesVars_countWidthByCols(){\n\n\t\tg_var... | [
"0.6624684",
"0.62013096",
"0.6057167",
"0.60338104",
"0.5915768",
"0.5908397",
"0.59021735",
"0.586855",
"0.58394974",
"0.5811549",
"0.5777837",
"0.5707976",
"0.5707739",
"0.56999856",
"0.56620723",
"0.56543714",
"0.5637726",
"0.5632797",
"0.5592247",
"0.5572835",
"0.5572835... | 0.7982543 | 0 |
Reset task tree which is used to create tree like structure inside task list | resetTaskTree(tasks) {
for (let i = 0, len = tasks.length; i < len; i++) {
let task = tasks[i];
tasks[i] = Object.assign(task, {
children: [],
allChildren: [],
parent: null,
parents: []
});
}
return tasks;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reset(){\r\n for (let each in context.tasks){\r\n context.tasks[each].state = false;\r\n }\r\n updateList();\r\n}",
"resetTree() {\n this.root.nodes.forEach((node) => { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n t... | [
"0.66862303",
"0.6596142",
"0.6575613",
"0.64713657",
"0.6462493",
"0.63262546",
"0.6307914",
"0.62229544",
"0.6161365",
"0.61440563",
"0.61410916",
"0.6132395",
"0.612492",
"0.60999894",
"0.60950327",
"0.6091773",
"0.6084503",
"0.6081927",
"0.6076422",
"0.60706776",
"0.60684... | 0.83344525 | 0 |
Time zoom change event handler | onTimeZoomChange(timeZoom) {
this.$store.commit(this.updateOptionsMut, { times: { timeZoom: timeZoom } });
this.recalculateTimes();
this.calculateSteps();
this.calculateCalendarDimensions();
this.fixScrollPos();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function zoom() {\n // show/hide reset scale button\n if (Math.abs(zoom_handler.scale()) >= 2 || Math.abs(zoom_handler.translate()[0]) >= 800) {\n $('#reset-scale').css('opacity', 0.8).css('z-index', 100);\n } else {\n $('#reset-scale').css('opacity', 0).css('z-index', -1... | [
"0.7201918",
"0.719427",
"0.71387774",
"0.7079043",
"0.7016448",
"0.7000667",
"0.6967709",
"0.69640666",
"0.6919498",
"0.690154",
"0.68152076",
"0.67925143",
"0.677341",
"0.67563766",
"0.6721031",
"0.6706041",
"0.66625136",
"0.6660968",
"0.6635917",
"0.6593282",
"0.6527421",
... | 0.8238407 | 0 |
Row height change event handler | onRowHeightChange(height) {
this.$store.commit(this.updateOptionsMut, { row: { height: height } });
this.calculateTaskListColumnsDimensions();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"bodyTrHeightChange({ rowKey, height }) {\n //获取真实元素大小,修改对应的尺寸缓存\n const index = this.virtualScrollPositions.findIndex(\n (x) => x.rowKey === rowKey,\n );\n\n let oldHeight = this.virtualScrollPositions[index].height;\n let dValue = oldHeight - h... | [
"0.73009187",
"0.7131502",
"0.7034479",
"0.6996317",
"0.6891742",
"0.68281955",
"0.67690116",
"0.6652371",
"0.6572724",
"0.6534948",
"0.6518781",
"0.6461049",
"0.645501",
"0.63835984",
"0.6255689",
"0.6230997",
"0.6191603",
"0.6190307",
"0.61602014",
"0.6107724",
"0.60348344"... | 0.80532146 | 0 |
Scope change event handler | onScopeChange(value) {
this.$store.commit(this.updateOptionsMut, { scope: { before: value, after: value } });
this.initTimes();
this.calculateSteps();
this.computeCalendarWidths();
this.fixScrollPos();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"handleScopeChange(event) {\n /**\n * The event fired when a scope is selected.\n * \n * @event\n * @name scopeChange\n * @param {string} value The value of the scope selected.\n * @bubbles\n * @public\n */\n this.dispatchEvent(\n ... | [
"0.80008423",
"0.6836584",
"0.6065684",
"0.6065684",
"0.6065684",
"0.6065684",
"0.6065684",
"0.6065684",
"0.6004",
"0.59947056",
"0.59607506",
"0.5957757",
"0.5940213",
"0.59046584",
"0.5893058",
"0.58890545",
"0.58890545",
"0.58890545",
"0.58890545",
"0.5883792",
"0.5883792"... | 0.72701186 | 1 |
Task list width change event handler | onTaskListWidthChange(value) {
this.$store.commit(this.updateOptionsMut, { taskList: { percent: value } });
this.calculateTaskListColumnsDimensions();
this.fixScrollPos();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onTaskListColumnWidthChange() {\n this.calculateTaskListColumnsDimensions();\n this.fixScrollPos();\n }",
"onWidthChanged(/*width*/) {\n }",
"globalOnResize(ev) {\n if (typeof this.$el === 'undefined' || !this.$el) {\n return;\n }\n const options = {\n clientWidth: ... | [
"0.8129463",
"0.6785999",
"0.67320454",
"0.6328634",
"0.61662096",
"0.6141853",
"0.6040295",
"0.60057914",
"0.5994194",
"0.5937948",
"0.59023297",
"0.5871066",
"0.5853765",
"0.58531755",
"0.5840081",
"0.5821974",
"0.5802735",
"0.57935786",
"0.57886636",
"0.5782289",
"0.575724... | 0.8103606 | 1 |
Task list column width change event handler | onTaskListColumnWidthChange() {
this.calculateTaskListColumnsDimensions();
this.fixScrollPos();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onTaskListWidthChange(value) {\n this.$store.commit(this.updateOptionsMut, { taskList: { percent: value } });\n this.calculateTaskListColumnsDimensions();\n this.fixScrollPos();\n }",
"calculateTaskListColumnsDimensions() {\n let final = 0;\n let percentage = 0;\n this.internalOp... | [
"0.755867",
"0.7009336",
"0.6900117",
"0.6841593",
"0.661283",
"0.6420095",
"0.63123804",
"0.62699425",
"0.625386",
"0.6244843",
"0.6173679",
"0.61069554",
"0.6077007",
"0.60329187",
"0.60035723",
"0.5957264",
"0.5941969",
"0.5902629",
"0.5881518",
"0.5831146",
"0.5801245",
... | 0.87737393 | 0 |
When some action was performed (scale change for example) recalculate time variables | recalculateTimes() {
let max = this.internalOptions.times.timeScale * 60;
let min = this.internalOptions.times.timeScale;
let steps = max / min;
let percent = this.internalOptions.times.timeZoom / 100;
const timePerPixel =
this.internalOptions.times.timeScale * steps * percent + Ma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function calculateTime(e) {\n // Find the row/column where changes are made\n let changeRow = e.path[1].parentElement.rowIndex;\n let changeCol = e.path[1].cellIndex;\n\n updateProjectTime(changeRow);\n updateDayTime(changeCol);\n updateTotalTime();\n}",
"function calTempChange(){\n\n}",
"fun... | [
"0.6284801",
"0.6121054",
"0.6079006",
"0.60694486",
"0.60643786",
"0.6041931",
"0.6041931",
"0.60382956",
"0.59879214",
"0.5970162",
"0.5958408",
"0.5943902",
"0.59249014",
"0.59070295",
"0.58363366",
"0.58221",
"0.5811149",
"0.57810897",
"0.57737476",
"0.5769096",
"0.576121... | 0.66969633 | 0 |
Calculate steps Steps are days by default Each step contain information about time offset and pixel offset of this time inside gantt chart | calculateSteps() {
const steps = [];
const lastMs = this.internalOptions.times.lastTime;
const currentDate = dayjs_min_default()(this.internalOptions.times.firstTime);
steps.push({
time: currentDate.valueOf(),
offset: {
ms: 0,
px: 0
}
});
f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"populateStepTimes () {\n\n let timeIndex = 0;\n for (let s of this.steps) {\n [s.time, timeIndex] = this.getTime(s.beat, timeIndex);\n\n // We need to get the duration in seconds as well\n for (let direction in s.arrows) {\n let a = s.arrows[direction];\n if (a.duration > 0) {\n ... | [
"0.65671587",
"0.6497878",
"0.63378876",
"0.6288793",
"0.61558974",
"0.5949786",
"0.56491184",
"0.5624915",
"0.55548584",
"0.54310566",
"0.5379294",
"0.53305304",
"0.53142065",
"0.5300005",
"0.52915674",
"0.52869594",
"0.52837235",
"0.5278667",
"0.52435434",
"0.5219619",
"0.5... | 0.79702073 | 0 |
Calculate calendar widths when scale was changed for example | computeCalendarWidths() {
this.computeDayWidths();
this.computeHourWidths();
this.computeMonthWidths();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"computeDayWidths() {\n const options = this.internalOptions;\n const newOptions = {\n calendar: {\n day: {\n widths: []\n }\n }\n };\n const style = this.style('calendar-row-text', 'calendar-row-text--day');\n options.ctx.font = style['font-size']... | [
"0.737871",
"0.69829726",
"0.65105814",
"0.6369042",
"0.6366988",
"0.6188531",
"0.60874724",
"0.59565675",
"0.59265816",
"0.5909897",
"0.590684",
"0.5872968",
"0.5854976",
"0.5836707",
"0.581561",
"0.57992923",
"0.5793001",
"0.57826996",
"0.57338387",
"0.57152325",
"0.5712957... | 0.73252696 | 1 |
Compute width of calendar hours column widths basing on text widths | computeHourWidths() {
const options = this.internalOptions;
const newOptions = {
calendar: {
hour: {
widths: []
}
}
};
const style = this.style('calendar-row-text', 'calendar-row-text--hour');
options.ctx.font = style['font-size'] + ' ' + sty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"computeDayWidths() {\n const options = this.internalOptions;\n const newOptions = {\n calendar: {\n day: {\n widths: []\n }\n }\n };\n const style = this.style('calendar-row-text', 'calendar-row-text--day');\n options.ctx.font = style['font-size']... | [
"0.7172765",
"0.66836494",
"0.6534523",
"0.6333038",
"0.62703764",
"0.62703764",
"0.62703764",
"0.62703764",
"0.6223834",
"0.6147131",
"0.6085746",
"0.608065",
"0.6020202",
"0.5949161",
"0.5912695",
"0.5912133",
"0.5823851",
"0.58083415",
"0.5795801",
"0.57922715",
"0.5775327... | 0.78353167 | 0 |
Compute calendar days column widths basing on text widths | computeDayWidths() {
const options = this.internalOptions;
const newOptions = {
calendar: {
day: {
widths: []
}
}
};
const style = this.style('calendar-row-text', 'calendar-row-text--day');
options.ctx.font = style['font-size'] + ' ' + style[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"computeCalendarWidths() {\n this.computeDayWidths();\n this.computeHourWidths();\n this.computeMonthWidths();\n }",
"computeMonthWidths() {\n const options = this.internalOptions;\n const newOptions = {\n calendar: {\n month: {\n widths: []\n }\n ... | [
"0.7102708",
"0.6866276",
"0.63771343",
"0.6351626",
"0.6298574",
"0.6117944",
"0.60746586",
"0.606054",
"0.60350406",
"0.60152084",
"0.60152084",
"0.60152084",
"0.60152084",
"0.59690315",
"0.5883087",
"0.5805164",
"0.5799135",
"0.57674086",
"0.5740849",
"0.5727608",
"0.57209... | 0.7987388 | 0 |
Compute month calendar columns widths basing on text widths | computeMonthWidths() {
const options = this.internalOptions;
const newOptions = {
calendar: {
month: {
widths: []
}
}
};
const style = this.style('calendar-row-text', 'calendar-row-text--month');
options.ctx.font = style['font-size'] + ' ' + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"computeCalendarWidths() {\n this.computeDayWidths();\n this.computeHourWidths();\n this.computeMonthWidths();\n }",
"computeDayWidths() {\n const options = this.internalOptions;\n const newOptions = {\n calendar: {\n day: {\n widths: []\n }\n ... | [
"0.70504457",
"0.7007902",
"0.6396134",
"0.6201874",
"0.61661476",
"0.6151135",
"0.61358756",
"0.6135476",
"0.61350334",
"0.600221",
"0.59080124",
"0.58745694",
"0.58745694",
"0.58745694",
"0.58745694",
"0.58537424",
"0.5832582",
"0.5821892",
"0.5813284",
"0.5809843",
"0.5804... | 0.7944997 | 0 |
Get visible tasks Very important method which will bring us only those tasks that are visible inside gantt chart For example when task is collapsed children of this task are not visible we should not render them | visibleTasks() {
const visibleTasks = this.internalTasks.filter(task => this.isTaskVisible(task));
const maxRows = visibleTasks.slice(0, this.internalOptions.maxRows);
const options = {};
options.rowsHeight = this.getTasksHeight(maxRows);
let heightCompensation = 0;
if (this.internal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getActiveTasks(){\n let doc;\n data.retrieveActiveTasks()\n .then(() => {\n doc = data.getOpenTasks();\n taskContainer.innerHTML = '';\n document.querySelector(ui.DOMstrings.taskCountNumber).innerHTML = doc.length;\n doc.forEach((task) => {\n taskContainer.i... | [
"0.6254066",
"0.6188644",
"0.6141041",
"0.61208403",
"0.6089655",
"0.6056505",
"0.59989953",
"0.5971513",
"0.59575593",
"0.595354",
"0.5938817",
"0.5908772",
"0.57792044",
"0.57705414",
"0.575949",
"0.5759139",
"0.5735394",
"0.57257754",
"0.57257754",
"0.5698248",
"0.5682021"... | 0.6826606 | 0 |
>>>>> >>>>> crear modal <<<<< <<<<< | makeModal(){
if(document.querySelector('.modal')){
document.querySelector('.modal').remove();
};
let modal = document.body.appendChild(document.createElement('div'));
modal.setAttribute('class', 'modal center');
let contModal = modal.appendChild(document.createEle... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function crear_modal(texto)\n{\n var cuerpo=texto;\n var cabecera='<h3 class=\"modal-title\" id=\"myModalLabel\" name=\"myModalLabel\" >Información:</h3>';\n //$(\"#cuerpo_mensaje\").css({\"height\":\"auto\"});\n $(\"#cuerpo_mensaje\").removeClass(\"cuerpo_normal\").removeClass(\"cuerpo_xdefecto\").remo... | [
"0.7280317",
"0.72099113",
"0.72086275",
"0.72076344",
"0.71283054",
"0.71077865",
"0.7092976",
"0.7079958",
"0.70713043",
"0.70456773",
"0.7043698",
"0.69975674",
"0.6968352",
"0.69633996",
"0.69584715",
"0.6951678",
"0.69455576",
"0.6934308",
"0.6932142",
"0.69163907",
"0.6... | 0.7277198 | 1 |
Create array of countries from JSON data | function createCountriesArray($scope, json) {
$scope.countries = Object.keys(json);
$scope.clength = $scope.countries.length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function jsonCountriesArr() {\n fetch(countriesArr)\n .then((response) => response.json())\n .then((json) => {\n json.response.countries.map(function (details) {\n let option = document.createElement(\"option\");\n option.text = details.country_name;\n option.value = details[\"iso-... | [
"0.69381344",
"0.670086",
"0.6550118",
"0.6511835",
"0.650347",
"0.6410849",
"0.63811237",
"0.6321069",
"0.63176805",
"0.63127846",
"0.6312214",
"0.6263445",
"0.6241138",
"0.6159595",
"0.614959",
"0.6124836",
"0.6117055",
"0.60533035",
"0.6016884",
"0.5990481",
"0.5963558",
... | 0.7268861 | 0 |
Update missing country name in $scope.countries array for filter | function handleMissingCountryArray($scope) {
for(let i=0,l=$scope.clength;i<l;i++) {
// replace empty string so easy to see, keep totals intact
if ($scope.countries[i] === "") {
$scope.countries[i] = "-Missing Country-";
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateCountrySelection() {\n // Create a blank option\n var option = countrySelection.append(\"option\");\n countryList = [];\n option.text(\"\");\n tableData.forEach((sighting) => { \n Object.entries(sighting).forEach(([key, value]) => {\n // find the country key, and che... | [
"0.64644325",
"0.62953275",
"0.62537307",
"0.6087842",
"0.6026729",
"0.5991764",
"0.5844675",
"0.5839254",
"0.58255917",
"0.5825299",
"0.5786862",
"0.57567096",
"0.57370436",
"0.57364523",
"0.567901",
"0.56423366",
"0.5590059",
"0.5564037",
"0.55567384",
"0.5554307",
"0.55397... | 0.735032 | 0 |
Update missing country name in json | function handleMissingCountryJson($scope, json) {
$scope.values = {};
for(let i=0,l=$scope.clength;i<l;i++) {
if ($scope.countries[i] === "-Missing Country-") {
// replace empty string so easy to see, keep totals intact
$scope.values["-Missing Country-"] = json[""];
} else {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateCountrySelection() {\n // Create a blank option\n var option = countrySelection.append(\"option\");\n countryList = [];\n option.text(\"\");\n tableData.forEach((sighting) => { \n Object.entries(sighting).forEach(([key, value]) => {\n // find the country key, and che... | [
"0.64411837",
"0.62578756",
"0.6223223",
"0.61159754",
"0.58588094",
"0.5812546",
"0.57763684",
"0.576429",
"0.5676732",
"0.5669492",
"0.56443",
"0.56178135",
"0.5609648",
"0.5606887",
"0.56014115",
"0.551983",
"0.54872453",
"0.5464462",
"0.54516363",
"0.54433984",
"0.5410674... | 0.69606405 | 0 |
Create array of flattened object (country, channel , device ) | function flattenJson($scope) {
$scope.flattened = [];
for(let i=0,l=$scope.clength;i<l;i++) {
let key = $scope.countries[i];
$scope.flattened.push({
"country": key,
"channel": $scope.values[key]["Channels"],
"device": $scope.values[key]["Devices"]
})
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDataChannels(){\n var dataChannels = [];\n \n for(peerUsername in mapPeers){\n console.log('mapPeers[', peerUsername, ']: ', mapPeers[peerUsername]);\n var dataChannel = mapPeers[peerUsername][1];\n console.log('dataChannel: ', dataChannel);\n\n dataChannels.push(da... | [
"0.54274595",
"0.542135",
"0.54153085",
"0.54083306",
"0.5355921",
"0.52846646",
"0.5283544",
"0.52708226",
"0.52553153",
"0.5255292",
"0.5245358",
"0.5236475",
"0.520335",
"0.5186526",
"0.51851857",
"0.5143551",
"0.5098286",
"0.508155",
"0.50750977",
"0.5067829",
"0.5060864"... | 0.6520489 | 0 |
Play the video, loading it if it isn't already. | play() {
if (this._videoRequested === false) this.loadVideo()
this._video.play()
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function vidLoad() {\n video.play();\n\n //video.stop();\n //video.loop();\n videoIsPlaying = true;\n}",
"function playVideo() {\n vid.autoplay = true;\n vid.load();\n}",
"function loadVideo() {\n player.src({\n \"type\": \"video/mp4\",\n \"src\": settings.videoCollection[currentVideoI... | [
"0.7618593",
"0.73858404",
"0.73078406",
"0.7279151",
"0.7271526",
"0.72494346",
"0.7158702",
"0.7114274",
"0.7067531",
"0.7067531",
"0.7063756",
"0.6978439",
"0.6927305",
"0.6918318",
"0.69177043",
"0.6914409",
"0.68559974",
"0.6848238",
"0.6842038",
"0.6835312",
"0.6827705"... | 0.81566435 | 0 |
Pause the video, loading it if it isn't already. | pause() {
if (this._videoRequested === false) this.loadVideo()
this._video.pause()
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function vidLoad() {\n video.play();\n\n //video.stop();\n //video.loop();\n videoIsPlaying = true;\n}",
"function vidLoad() {\n if (video.elt.paused) {\n video.volume(0);\n video.play();\n video.showControls();\n }\n}",
"function pause() { player.pauseVideo(); }",
"function vidLoad() {\n vid... | [
"0.7277648",
"0.69439197",
"0.6902305",
"0.6846652",
"0.6670748",
"0.6652117",
"0.6639478",
"0.6576777",
"0.6574682",
"0.6565922",
"0.65550137",
"0.6543475",
"0.6531343",
"0.6528135",
"0.65224683",
"0.65197843",
"0.6517767",
"0.65135103",
"0.64690024",
"0.6466945",
"0.645965"... | 0.7763141 | 0 |
return => 4 5) Inputs/Outputs I: 2 Strings (firstName, lastName) O: 1 String (firstName and lastName concatenated together) | function fullName(firstName, lastName) {
// return keyword gives us the output
return `${firstName} ${lastName}`;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function fullName(firstName, lastName) {\n console.log(firstName + ' ' + lastName);\n return firstName + lastName;\n}",
"function concatName(firstName, lastName) {\n return lastName + \", \" + firstName;\n}",
"function fullName (firstName, lastName) {\n var firstName = \"Brennan \";\n var lastNa... | [
"0.7895902",
"0.7814045",
"0.7803239",
"0.7801027",
"0.7776552",
"0.7742049",
"0.7739347",
"0.7734461",
"0.77308226",
"0.7728004",
"0.7699049",
"0.768371",
"0.7660208",
"0.7660208",
"0.7660208",
"0.7644782",
"0.76332575",
"0.76314175",
"0.76278406",
"0.76171213",
"0.76171213"... | 0.78893244 | 1 |
prints => 'Sparrow' LOCAL SCOPE variable last can only be accessed within the giveName(); | function giveName() {
let last = 'Sparrow'
console.log(last); //prints => Sparrow
return last;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printName() {\n var name = \"Kiran\";\n console.log(\"var within function scope: name=\" + name);\n}",
"function fun() {\n console.log(name);\n var name = 'george'\n}",
"function showOrdinaryPersonName () {\n var name = \"Johnny Evers\"; // Now name is always a local variable and it will not ... | [
"0.702515",
"0.6952449",
"0.69092023",
"0.6873076",
"0.6855499",
"0.6807349",
"0.6749425",
"0.6728429",
"0.6682833",
"0.66575676",
"0.66397905",
"0.66033953",
"0.6573742",
"0.65580606",
"0.65571254",
"0.6550171",
"0.65321344",
"0.64995104",
"0.6480585",
"0.647567",
"0.6469613... | 0.71259785 | 0 |
Translate the provided string to pig latin. Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an "ay". If a word begins with a vowel you just add "way" to the end. Input strings are guaranteed to be English words in all lowercase. | function translatePigLatin(str) {
var vowels = ["a", "e", "i", "o", "u"];
var myArray = str.split("");
var myArrayLength = myArray.length;
var len = str.length;
var newString = "";
//determine the first positon of a vowel
for(pos = 0; pos < myArrayLength; pos++){
if(vowels.indexOf(myArray[p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function translatePigLatin(str) {\n var vowels = [\"a\", \"e\", \"i\", \"o\", \"u\"];\n var newStr;\n \n var arr = str.split(\"\");\n \n // if arr[0] is a vowel, add way to the end\n if(vowels.indexOf(arr[0]) !== -1) {\n arr.push(\"way\");\n newStr = arr.join(\"\");\n return newStr;\n }\n \n // ... | [
"0.8691904",
"0.8644994",
"0.86299723",
"0.8620554",
"0.8619385",
"0.8559717",
"0.85580695",
"0.8526473",
"0.84960884",
"0.8485479",
"0.847544",
"0.84572047",
"0.84425884",
"0.8433079",
"0.8432484",
"0.84180737",
"0.84107906",
"0.8410645",
"0.8410645",
"0.8393266",
"0.8380438... | 0.8724379 | 0 |
remove punctuation from a word so it will match. | function cleanWord(word) {
return {
clean: word.replace(punctuation, "").toLowerCase(),
ends: word.match(punctuation),
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removePunctuation(word) {\n 'use strict';\n\n var punctRE = /[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#\\$%&\\(\\)\\*\\+,\\-\\.\\/:;<=>\\?@\\[\\]\\^_`\\{\\|\\}~]/g;\n return word.replace(punctRE, '');\n}",
"function removePunctation(){\r\n let punctuationMarks = ['.', ',', '!', '?', ';', '... | [
"0.7803626",
"0.73963994",
"0.7382014",
"0.73330843",
"0.7241559",
"0.70734733",
"0.70709634",
"0.69101113",
"0.6792923",
"0.6707575",
"0.66938406",
"0.6578872",
"0.65633094",
"0.6542851",
"0.6536972",
"0.6536972",
"0.6472824",
"0.6472824",
"0.6472824",
"0.6410681",
"0.640131... | 0.74822277 | 1 |
Load the client interfaces for the YouTube Analytics and Data APIs, which are required to use the Google APIs JS client. More info is available at | function loadAPIClientInterfaces() {
gapi.client.load('youtube', 'v3', function() {
handleAPILoaded();
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadAPIClientInterfaces() {\n gapi.client.load('youtube', 'v3', function() {\n handleAPILoaded();\n });\n }",
"function loadAPIClientInterfaces() {\n gapi.client.load('youtube', 'v3', function() {\n handleAPILoaded();\n });\n}",
"function loadAPIClientInterface... | [
"0.81026727",
"0.80999273",
"0.8066362",
"0.78003466",
"0.7369282",
"0.7345658",
"0.73164815",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.7304456",
"0.72868603"... | 0.8100091 | 1 |
Button click var create = document.getElementById("createButton").addEventListener("click", buttonClick); var text = textArea.value; create(text,deleteBtn); listen = document.getElementsByClassName("i"); textArea.value = ""; Create element and button | function buttonClick(element, deleteBtn) {
var textInput = document.getElementById("textArea").value;
console.log("textInput: ", textInput);
var element = document.createElement("div");
element.setAttribute("class", "i" + i);
var deleteBtn = document.createElement("button");
deleteBtn.setAttribute("class"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function textareaFunction(){\nvar r = document.createElement('span');\nvar y = document.createElement(\"TEXTAREA\");\nvar g = document.createElement(\"IMG\");\ny.setAttribute(\"cols\", \"17\");\ny.setAttribute(\"placeholder\", \"message..\");\ng.setAttribute(\"src\", \"delete.png\");\nincrement();\ny.setAttribute(... | [
"0.7359301",
"0.7197551",
"0.69201505",
"0.68854684",
"0.68668044",
"0.6822908",
"0.6773149",
"0.67517775",
"0.67144287",
"0.6695075",
"0.667201",
"0.6670436",
"0.6658443",
"0.66218907",
"0.66076094",
"0.66054755",
"0.66054755",
"0.65824324",
"0.6560565",
"0.65467",
"0.653302... | 0.7530774 | 0 |
homepage slider wrapper size | function sliderWidth() {
var windowWidth = $(window).width(),
offset = $('.wrapper').offset().left,
pageOffset = $('.main-wrapper').offset().left;
$('.hp-slider .grey-bg, .hp-slider .photo-block').width(windowWidth - offset - pageOffset);
$('.director... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sizeSlider() {\n // get the height of the slider\n var sliderh = $( '.slider-container' ).height(),\n // get the height of the page header\n headerh = $( 'header' ).height();\n // set the new height of the slider: old slider height minus height of header\n $( '.slider-container' ).css( 'heig... | [
"0.69355315",
"0.68947244",
"0.66669613",
"0.6608056",
"0.6587349",
"0.65852267",
"0.65745395",
"0.65627325",
"0.65545833",
"0.6522847",
"0.65044016",
"0.6503918",
"0.64824814",
"0.6463122",
"0.64497256",
"0.64351386",
"0.64351386",
"0.6424391",
"0.64239436",
"0.6418697",
"0.... | 0.74511355 | 0 |
20160721 from composition "CMI_Ian_Course_LowerThirds" in project "/mindful_share/Courses/tre_aatl2/unit_01/lesson_02/04_parts/part_01/02_after_effects/01_ae_build/tre_aatl2_U01_L02_P01_v002.aep" aescripts.com/compCode compCode_20160721_103737(); | function compCode_20160721_103737() {
app.beginUndoGroup("CMI_Ian_Course_LowerThirds");
try {
// Create Folder hierarchy
var zcompcodescripts_folder = getItem("Z_Compcode_Scripts", FolderItem, app.project.rootFolder);
if (zcompcodescripts_folder === null) {
zcompcodescripts_folder = app.project.items.addFolder("... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function compCode_20160721_103725() {\r\rapp.beginUndoGroup(\"CIPD_Mark_Course_LowerThirds\");\r\rtry {\r\r// Create Folder hierarchy\r\tvar zcompcodescripts_folder = getItem(\"Z_Compcode_Scripts\", FolderItem, app.project.rootFolder);\r\tif (zcompcodescripts_folder === null) {\r\t\tzcompcodescripts_folder = app.p... | [
"0.6243479",
"0.54763335",
"0.54718804",
"0.5452033",
"0.5380496",
"0.5353884",
"0.5317495",
"0.5253972",
"0.52451515",
"0.52353877",
"0.51938397",
"0.5168775",
"0.5107407",
"0.51051337",
"0.50882435",
"0.5040366",
"0.503292",
"0.5023527",
"0.50165606",
"0.50088197",
"0.50056... | 0.643383 | 0 |
Set bot response in result_div | function setBotResponse(val) {
setTimeout(function () {
text = "";
var converter = new showdown.Converter();
if ($.trim(val) == '' || val == 'error') { //if there is no response from bot or there is some error
val = 'Sorry I wasn\'t able to understand your Query. Let\'s try something else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setBotResponse(response) {\r\n\r\n\t//display bot response after 500 milliseconds\r\n\tsetTimeout(function () {\r\n\t\thideBotTyping();\r\n\t\tif (response.length < 1) {\r\n\t\t\t//if there is no response from Rasa, send fallback message to the user\r\n\t\t\tvar fallbackMsg = \"I am facing some issues, p... | [
"0.7285995",
"0.7192734",
"0.70145017",
"0.70007974",
"0.69282806",
"0.68934786",
"0.6864246",
"0.6814722",
"0.66414785",
"0.6612119",
"0.6586564",
"0.6493459",
"0.6469723",
"0.6468583",
"0.64571685",
"0.64139384",
"0.6375658",
"0.6364087",
"0.6320859",
"0.63148624",
"0.63111... | 0.7603528 | 0 |
Scroll to the bottom of the results div | function scrollToBottomOfResults() {
var terminalResultsDiv = document.getElementById('result_div');
terminalResultsDiv.scrollTop = terminalResultsDiv.scrollHeight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function scrollToBottomOfResults() {\n\t\tvar terminalResultsDiv = document.getElementById('result_div');\n\t\tterminalResultsDiv.scrollTop = terminalResultsDiv.scrollHeight;\n\t}",
"function scrollToBottomOfResults() {\n\tlet terminalResultsDiv = document.getElementById('result_div');\n\tterminalResultsDiv.scro... | [
"0.89157856",
"0.8712508",
"0.8175742",
"0.8007091",
"0.7956533",
"0.74753326",
"0.7455404",
"0.73238343",
"0.7003579",
"0.6969512",
"0.69433117",
"0.6917824",
"0.6917824",
"0.6917824",
"0.6917824",
"0.6917824",
"0.6917824",
"0.68837756",
"0.68776554",
"0.6877031",
"0.6871257... | 0.8902994 | 1 |
add list of languages to db | addLangaugeList(lang, books) {
DbHelper.addLangaugeList(lang, books)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addLanguages(newLanguages) {\n languages = languages.concat(newLanguages);\n }",
"function addLanguage(lang, langList) {\n if (langList) {\n for (var lg in langList) {\n countLang(lg, langList[lg]);\n }\n if (!(lang in langList)) {\n countLang(lang, 0);\n ... | [
"0.6618429",
"0.6592895",
"0.6500133",
"0.63374126",
"0.6283275",
"0.6026246",
"0.601631",
"0.59375995",
"0.59357786",
"0.58813035",
"0.58515275",
"0.58417094",
"0.57743365",
"0.576444",
"0.57533854",
"0.5697966",
"0.56701595",
"0.5645453",
"0.55935335",
"0.5529134",
"0.55106... | 0.73872554 | 0 |
Get the database id of a post (which is embedded in its html id) | function get_post_id (post) {
if (post != null && 'id' in post)
return parseInt(post.id.match(/_(\d+)$/)[1]);
else
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPostIdFromElement(element) {\n \n //get the root element\n const isRoot = element.hasClass(\"post\");\n // get the root element based on what the user clicked\n //closest is a jquery function that goes throw the tree to find the parent element\n const rootElement = isRoot ? element : ... | [
"0.68589926",
"0.6840738",
"0.66998637",
"0.66462326",
"0.61241424",
"0.6122908",
"0.60817134",
"0.5975267",
"0.5947545",
"0.59162694",
"0.59092706",
"0.58998966",
"0.5884008",
"0.58746016",
"0.5856802",
"0.585165",
"0.5842598",
"0.574697",
"0.5735614",
"0.56717753",
"0.56624... | 0.7705901 | 0 |
Take an xml update object and execute it. | function execute_actions (update) {
for (var i = 0; i < update.childNodes.length; i++) {
var up = update.childNodes[i];
if (up.nodeType == up.ELEMENT_NODE) {
// Dispatch action based on tag name
var action = up.tagName;
if (action in actions) {
ac... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function exec() {\n\n // The xml file\n var xml = '<Library updated=\"2018-09-03\"> \\\n\t\t<Book> \\\n\t\t\t<Title>Paths of colours</Title> \\\n\t\t\t<Author>Rosa Indaco</Author> \\\n\t\t</Book> \\\n\t\t<Book> \\\n\t\t\t<Title>Accounting exercises</Title> \\\n\t\t\t<Author>Su Zhang</Author> \\\n\t\t</Book> \\... | [
"0.60172296",
"0.5815604",
"0.579041",
"0.566682",
"0.566682",
"0.566682",
"0.5551542",
"0.55128706",
"0.5509483",
"0.5465995",
"0.53578085",
"0.53578085",
"0.53578085",
"0.5346888",
"0.5301991",
"0.5224014",
"0.522084",
"0.5189036",
"0.51810884",
"0.5165097",
"0.51504606",
... | 0.616297 | 0 |
function that takes id and array of zookeepers and returns a single zookeeper object | function findById(id, zookeepers) {
const result = zookeepers.filter(zookeeper => zookeeper.id === id)[0];
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createNewZookeeper(body, zookeepers) {\n // const the incoming animal object\n const zookeeper = body;\n\n // push incoming animal object to array\n zookeepers.push(zookeeper);\n \n // use fs to write to animals.json\n fs.writeFileSync(\n path.join(__dirname, '../data/zookeeper... | [
"0.59427583",
"0.5361542",
"0.5354401",
"0.5024654",
"0.4992897",
"0.49011236",
"0.487609",
"0.48509437",
"0.48443943",
"0.4813118",
"0.47568658",
"0.47269633",
"0.47010306",
"0.47003427",
"0.47003427",
"0.47003427",
"0.46378076",
"0.46061796",
"0.46008372",
"0.45916456",
"0.... | 0.7893558 | 0 |
web.config to .htaccess converter | function webConfigToHtaccess()
{
//Take XML input from textarea
var xml = $("#webconfig-xml").val(), xmlDoc = $.parseXML(xml), $xml = $(xmlDoc);
/*
- Inside each "rule", look for the "action" child node
- If it contains multiple parameters, follow the
regular expression pattern: /{R:(\d{1})}/
- Replace tha... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async function generateHtaccess(options) {\n var content = \"\";\n\n content += `RewriteEngine On\\n`;\n content += `RewriteCond %{HTTPS} !on\\n`;\n content += `RewriteCond %{REQUEST_URI} !^/[0-9]+\\\\..+\\\\.cpaneldcv$\\n`;\n content += `RewriteCond %{REQUEST_URI} !^/\\\\.well-known/pki-validation/[A-F0-9]{3... | [
"0.5309314",
"0.51152027",
"0.49286506",
"0.49261865",
"0.4743358",
"0.4650364",
"0.46288767",
"0.45815033",
"0.45518193",
"0.45091558",
"0.44686115",
"0.4386633",
"0.43337688",
"0.43245715",
"0.43245715",
"0.43245715",
"0.43245715",
"0.43245715",
"0.43245715",
"0.43245715",
... | 0.7576723 | 0 |
Current implementation by Inferior Products Corporation. InferiorProducts.com Original implementation by Mihai Bazon. Previously sponsored by htmlArea v4.0 Copyright (c) 20032013 InferiorProducts.com htmlArea v3.0 Copyright (c) 2002 interactivetools.com, inc. This notice MUST stay intact for use (see license.txt). A fr... | function FullPage(editor){this.editor=editor;var cfg=editor.config;cfg.fullPage=true;var tt=FullPage.I18N;var self=this;cfg.registerButton("FP-docprop",tt["Document properties"],editor.imgURL("docprop.gif","FullPage"),false,function(editor,id){self.buttonPress(editor,id);});cfg.toolbar[0].splice(0,0,"separator");cfg.to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function displayEditMode()\n{\n changeAreaClass('Page', 'editview');\n}",
"function aef_editor(){this.wysiwyg_id='aefwysiwyg';this.textarea_id='post';this.text='';this.on=false;this.flashw=200;this.flashh=200;this.toggle=function(){if(this.on){this.to_normal()}else{this.to_wysiwyg()}};this.onsubmit=function()... | [
"0.605002",
"0.59528667",
"0.5780427",
"0.5754621",
"0.561548",
"0.5549435",
"0.5448494",
"0.5368388",
"0.535012",
"0.53396547",
"0.5309757",
"0.5266427",
"0.52495646",
"0.5197443",
"0.5192871",
"0.518855",
"0.51864713",
"0.51581573",
"0.5117662",
"0.5109612",
"0.5109612",
... | 0.717844 | 0 |
This is a standard QSR payoff between 0 and 1 | static qsrPayoff(p, q) {
const diff = p - q;
return 1.0 - diff * diff;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static linearPayoff(p, q) {\n const x = 1.0 - 5 * Math.abs(p - q); \n return Math.max(x, 0) \n }",
"function event_pay_bribe(r) { \n var amt = (pd.stats.seller_rps * pd.widget_roi) * r;\n amt -= get_safe_cash();\n if(amt < 1) { \n return false;\n }\n if(amt > ... | [
"0.64703447",
"0.6081094",
"0.5844639",
"0.5752227",
"0.57234293",
"0.5710308",
"0.566985",
"0.5587764",
"0.5556891",
"0.5556891",
"0.5556891",
"0.5549568",
"0.5493199",
"0.54827535",
"0.5371749",
"0.5361382",
"0.53446114",
"0.53190607",
"0.52758753",
"0.52073866",
"0.5167817... | 0.778919 | 0 |
find object id from parent | function getID(thisObj) {
return $(thisObj).closest('div.panel').attr('id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getparent(obj) {\n\tvar p = obj.parentNode;\n\tvar depth = 0;\n\twhile (1) {\n\t\tif ( p.id != null && p.id != \"\") {\n\t\t\treturn p;\n\t\t}\n\t\telse {\n\t\t\tdepth++;\n\t\t\tp = p.parentNode;\n\t\t}\n\t\tif (depth >= max_depth) {\n\t\t\treturn null;\n\t\t}\n\t}\n}",
"function getObjId(id, name, pare... | [
"0.68418616",
"0.6788636",
"0.6760573",
"0.6658319",
"0.6609105",
"0.66019815",
"0.65861076",
"0.65242183",
"0.64246386",
"0.6421002",
"0.64158916",
"0.6401819",
"0.6289675",
"0.62827504",
"0.622929",
"0.62248075",
"0.62198573",
"0.6206174",
"0.6200812",
"0.61852765",
"0.6180... | 0.7071698 | 0 |
Return a promise to download youtube audio content. | function YTdownloadAsAudio(url) {
return new Promise(function (resolve, reject) {
ytdl.getInfo(url, function (err, info) {
var audio_file_meta = new YTAudioFileMeta(info);
var file_type = '.m4a';
// Remove unneeded characters and replace with underscor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"fetch({ instagramLink, playlistIndex, ext }) {\n return new Promise((resolve, reject) => {\n let path = this.tempFile(`${this.hash(instagramLink)}-${playlistIndex}.${ext}`)\n let args = ['--socket-timeout', '60']\n if (playlistIndex !== null) args = [...args, '--playlist-items', `${playlistIndex}... | [
"0.6231596",
"0.60198003",
"0.5659057",
"0.56524056",
"0.5635624",
"0.56347394",
"0.5602352",
"0.55928695",
"0.55562097",
"0.55501515",
"0.54367834",
"0.5314694",
"0.53139895",
"0.5310275",
"0.5298335",
"0.5289745",
"0.5268116",
"0.52487516",
"0.52477705",
"0.5230342",
"0.520... | 0.7450826 | 0 |
Refresh tree with current node selected | function TreeRefresh() {
parent.TreeRefresh();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function RefreshTree(nodeId, selectNodeId) {\n parent.RefreshTree(nodeId);\n}",
"function ReloadSupportTopicTree() {\n supTopMatchString = \"\";\n $(\"#supportTopicMatchTextbox\").val(\"\");\n $(\"#supportTopicTree div\").html(\"\");\n $(\"#SupTopicNameList span\").html(\"\");\n iniSupportTopic... | [
"0.7403523",
"0.69869256",
"0.6954452",
"0.6943926",
"0.6804228",
"0.670564",
"0.67026514",
"0.66185284",
"0.6577659",
"0.65674406",
"0.6559324",
"0.6525532",
"0.6501619",
"0.64542395",
"0.6429224",
"0.64268523",
"0.64062417",
"0.6390558",
"0.6359383",
"0.63195986",
"0.630541... | 0.75362515 | 0 |
Challenge 1 fetch images from dog.ceo/api , parse response JSON, add image elements | function fetchImages(){
const imgUrl = 'https://dog.ceo/api/breeds/image/random/4'
fetch(imgUrl)
.then(function(response){
return response.json();
})
.then(function(json){
addImages(json)
})
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function fetchDogImages() {\n return fetch(imgUrl).then(resp => resp.json()).then(json => addDogImages(json))\n}",
"function getDogImages() {\n fetch('https://random.dog/doggos/')\n //line 49&50 specific to Fetch\n .then(response => response.json()) //looking at response and turning... | [
"0.7895853",
"0.78699064",
"0.7758551",
"0.760584",
"0.75861454",
"0.7329262",
"0.7299877",
"0.7222503",
"0.7209931",
"0.72051364",
"0.7176645",
"0.7158187",
"0.7150172",
"0.7141255",
"0.7132768",
"0.7082083",
"0.70369744",
"0.70094115",
"0.6992174",
"0.6975841",
"0.69667745"... | 0.79637486 | 0 |
function to setup a new canvas for drawing | function newCanvas() {
// setup canvas
ctx = document.getElementById('canvas').getContext('2d');
ctx.strokeStyle = color;
ctx.lineWidth = 4;
// setup to trigger drawing on mouse or touch
iCanvas.drawTouch();
iCanvas.drawPointer();
iCanvas.drawMouse();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setupCanvas() {\n canvas = document.getElementById(\"canvas\");\n context = canvas.getContext(\"2d\");\n canvas.width = CANVAS_WIDTH;\n canvas.height = CANVAS_HEIGHT;\n}",
"function _init() {\n _drawCanvas();\n }",
"function setupCanvas() {\n canvasSelector.width = 75;\n canvasSe... | [
"0.76329195",
"0.7609162",
"0.75772977",
"0.74526435",
"0.7443124",
"0.7416346",
"0.73900056",
"0.7378285",
"0.73495305",
"0.7302508",
"0.7302109",
"0.7300375",
"0.72836304",
"0.7277923",
"0.7207185",
"0.7199759",
"0.7194583",
"0.7194583",
"0.7191028",
"0.71513045",
"0.714724... | 0.8057138 | 0 |
updateControls: param modelInfo The animation information for the currently active visualizer. Function to update the various controls options with the information associated with the currently active visualizer. | function updateControls()
{
const modelInfo = visualizers[getCurrentActive()];
updateModelCtrls(modelInfo);
updatePlaybackCtrls(modelInfo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"updateControls() {\n //prev button is active if not at first level\n Game.setEnabled(this.elems.prevBtn, this.levelIndex, \"active-control\")\n\n //reset button is always enabled\n\n //enable next button when reached level is higher than current level\n this.enableNextBtn = this.completedI... | [
"0.62924933",
"0.62387383",
"0.61410415",
"0.61410415",
"0.61342347",
"0.61263853",
"0.6089288",
"0.59820306",
"0.59432095",
"0.58938384",
"0.58617467",
"0.5769433",
"0.567947",
"0.56423026",
"0.5616707",
"0.56039965",
"0.5587347",
"0.5581253",
"0.55711764",
"0.5530686",
"0.5... | 0.81940234 | 0 |
addEventListeners: Add event handlers to all of the controls | function addEventListeners()
{
windowEvtListeners();
modelCtrlsEvtListeners();
playbackCtrlsEvtListeners();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setListeners() {\n this.controlPrev.addEventListener('click', () => {\n this.handlePrev();\n });\n this.controlNext.addEventListener('click', () => {\n this.handleNext();\n });\n }",
"setEventListeners() {\n $('[name=\"'+this.keys().join('\"],[name=\"')+'\"]').on('change',this.onFie... | [
"0.7453177",
"0.7410076",
"0.727091",
"0.7253601",
"0.7249231",
"0.72477174",
"0.7159285",
"0.7158316",
"0.71226317",
"0.7113555",
"0.710461",
"0.7098883",
"0.70733213",
"0.70273346",
"0.69892055",
"0.6939433",
"0.6877149",
"0.6873368",
"0.6790098",
"0.67819375",
"0.67802113"... | 0.76021504 | 0 |
handleWindowResize: param evt Javascript event Window resize handler for adjusting the size of any active visualizers. | function handleWindowResize(evt)
{
resizeVisualizers();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleWindowResize() {\r\n // TODO: add code\r\n}",
"function _handleWindowResize() {\n _gameController.handleResize();\n }",
"function handleResize() {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }",
"function handl... | [
"0.761522",
"0.75309354",
"0.7445763",
"0.74405634",
"0.73871195",
"0.7383374",
"0.7358978",
"0.73574376",
"0.73574376",
"0.73520654",
"0.7327127",
"0.73265064",
"0.731692",
"0.731692",
"0.731692",
"0.731692",
"0.731692",
"0.731692",
"0.731692",
"0.7315546",
"0.7315546",
"0... | 0.8808991 | 0 |
handleDrop: param evt Javascript event Callback function for the Javascript 'drop' event used to handle a file being dropped within the area of the visualizer. | function handleDrop(evt)
{
evt.preventDefault();
splashScreen.dataset.state = "hidden";
document.getElementById('progress-holder').style.display = 'inline';
let files = evt.dataTransfer.files; // FileList object.
loadDroppedAnimation(files[0]).then((evt) => {
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleDrop(evt) {\n evt.stopPropagation();\n evt.preventDefault();\n\n var files = evt.dataTransfer.files; // FileList object.\n console.log(\"dropped files:\", files);\n }",
"function dropHandler(evt) {\n evt.preventDefault();\n evt.stopPropagation();\n var files... | [
"0.80796367",
"0.74324375",
"0.72994745",
"0.7276446",
"0.71925217",
"0.70795196",
"0.7058072",
"0.7028835",
"0.6985375",
"0.6900674",
"0.6843358",
"0.6817648",
"0.6812741",
"0.6795052",
"0.6784564",
"0.6782801",
"0.67724085",
"0.67453766",
"0.6666402",
"0.6617995",
"0.657681... | 0.8083652 | 0 |
handleMenuToggle param evt Javascript event Toggle the model controls menu to expand or collapse depending upon current state. | function handleMenuToggle(evt)
{
const state = modelCtrls.dataset.state;
if (state === "collapsed")
modelCtrls.dataset.state = "expanded";
else
modelCtrls.dataset.state = "collapsed";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"toggleMenu(evt) {\n\t\tthis.setState({\n\t\t\tmenuOpen: !this.state.menuOpen\n\t\t});\n\t}",
"function handleToggleMenu() {\n if (!toggleMenu) {\n setToggleMenu(true)\n setToggleString(\"initial\")\n // document.getElementById('accordionMenu').foundation('showAll');\n } else {\n setTogg... | [
"0.7491356",
"0.7332908",
"0.70568323",
"0.7022305",
"0.676728",
"0.6753239",
"0.6750687",
"0.67238235",
"0.67091656",
"0.6634469",
"0.66106427",
"0.6507299",
"0.64483446",
"0.64387316",
"0.6390021",
"0.6390021",
"0.638666",
"0.6337974",
"0.63228697",
"0.6284554",
"0.62321544... | 0.8614917 | 0 |
handleSplashToggle param evt Javascript event Toggle the splash screen to display or hide depending upon current state. | function handleSplashToggle(evt)
{
if (evt.target.id === 'show-button')
splashScreen.dataset.state = "display";
else
splashScreen.dataset.state = "hidden";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hideSplash() { $('#splash').hide();}",
"_showSplash() {\r\n // Removes show class from everyone except the screen to show\r\n this.splashElement.removeClass('hide');\r\n this.gameElement.removeClass('show');\r\n this.scoresElement.removeClass('show');\r\n this.endEleme... | [
"0.6945069",
"0.69432884",
"0.66812736",
"0.66358864",
"0.66055685",
"0.6323333",
"0.6323333",
"0.6301858",
"0.628966",
"0.6210065",
"0.6157486",
"0.61538744",
"0.59856886",
"0.59304285",
"0.582585",
"0.57595164",
"0.5756028",
"0.553516",
"0.5459118",
"0.54251736",
"0.5385967... | 0.88368267 | 0 |
handleModelSelect param evt Javascript evt Handler for switching between active visualizations. | function handleModelSelect(evt)
{
if (evt.target.dataset.disabled !== 'true')
{
delegateSelect(evt);
const id = parseInt(evt.target.dataset.value);
activeVisualizer.setIsActive(false);
visualizers[id].instance.setIsActive(true);
activeVisu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleRmModel(evt) {\n\n const winId = evt.target.dataset.window;\n if (getNumberActive() > 1) {\n\n if (winId.includes('1')) {\n visualizers[1] = {\n state: { active: false }\n };\n activeVisualizer = visualizers[2].... | [
"0.63836265",
"0.62954986",
"0.6226611",
"0.6153125",
"0.60106057",
"0.5978889",
"0.59723634",
"0.59317213",
"0.58022374",
"0.577861",
"0.57232815",
"0.56862175",
"0.56686014",
"0.565134",
"0.5650982",
"0.5602058",
"0.5597718",
"0.5588632",
"0.554505",
"0.5493977",
"0.5485648... | 0.8217394 | 0 |
handleGroupSelect param evt Javascript evt Handler for switching the selected group of the currently active model. | function handleGroupSelect(evt)
{
delegateSelect(evt);
const groupName = evt.target.dataset.value;
const modelInfo = visualizers[getCurrentActive()];
for (const group of modelInfo.animation.groups) {
if (group.name == groupName) {
transparency.value = grou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"handleGroupValueChanged(value) {\n this.setState({selected_group: value});\n }",
"handleGroupValueChanged(value) {\n\n // -\n const isIntervenant = localStorage.getItem('us_role') == 'ROLE_INTERVENANT';\n if (!isIntervenant) {\n this.getMatieres(null);\n } else {\... | [
"0.6779948",
"0.6709876",
"0.66755575",
"0.66250026",
"0.6479403",
"0.6433553",
"0.6368563",
"0.63178855",
"0.6143871",
"0.6129253",
"0.6109306",
"0.610352",
"0.6033705",
"0.6010633",
"0.5911709",
"0.58981746",
"0.587099",
"0.5820826",
"0.58207947",
"0.5801978",
"0.57631046",... | 0.77607274 | 0 |
delegateSelect: param evt Javascript evt Pass the text content from the mock select option to the actual select element to trigger the actual selection event. | function delegateSelect(evt)
{
let child;
for (let i = 0; i < evt.target.parentNode.children.length; i++) {
child = evt.target.parentNode.children[i];
if (child === evt.target)
child.dataset.selected = true;
else
child.dataset.selec... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function onSelectableSelect(e) {\n var obj = getElementObject(this);\n\n runSelectEvent(e, obj, true);\n }",
"handleSelect() {\n if (this._selectHandler) {\n this._selectHandler();\n }\n }",
"handleSelect_() {\n let selectedSlice = '';\n const selection = this.chart_.getSelection... | [
"0.650579",
"0.6369223",
"0.62441355",
"0.61927074",
"0.61800736",
"0.61529213",
"0.61325586",
"0.61138463",
"0.60919887",
"0.6084369",
"0.5962434",
"0.59569955",
"0.59026855",
"0.5883262",
"0.5866871",
"0.5862536",
"0.58443165",
"0.58073145",
"0.5802926",
"0.57417387",
"0.56... | 0.7468312 | 0 |
handleColor: param evt Javascript evt Takes the current model name and passes that to the changeColor function in addition to the current hex value. | function handleColor(evt)
{
let groupName = groupSelect.querySelector('select').value;
let colorWellText = colorWell.parentNode.querySelector('label').textContent;
colorWellText = evt.target.value + " : ";
const modelInfo = visualizers[getCurrentActive()];
for (const group o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function changeColor(ev, gl){\r\n console.log(ev.target.value);\r\n var rgb = hexToRgb(ev.target.value);\r\n changeFragColor(rgb[0], rgb[1], rgb[2], 1.0, gl);\r\n renderClickScene(gl);\r\n}",
"function handleChange(color) {\n dispatch({\n type: \"UPDATE_PREVIEW_COLOR\",\n payload: {\n ... | [
"0.7061729",
"0.6947304",
"0.6889021",
"0.6852264",
"0.6819936",
"0.67796606",
"0.66633",
"0.66441286",
"0.6610061",
"0.6581474",
"0.65672946",
"0.65545887",
"0.6543793",
"0.64947325",
"0.6467202",
"0.6398471",
"0.6398471",
"0.6384708",
"0.6352562",
"0.63152784",
"0.62974393"... | 0.71775913 | 0 |
handleTexture: param evt Javascript evt Takes the current model name and passes that to the changeTexture function in addition to the name of the image which has the rest of the url applied. | function handleTexture(evt) {
let groupName = groupSelect.querySelector('select').value;
activeVisualizer.changeTexture(groupName, './assets/images/' + evt.target.dataset.texture + '.png');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleNewTexture(evt) {\n let file = textureBtn.files;\n let reader = new FileReader;\n let fileName = file[0].name;\n\n reader.readAsDataURL(file[0]);\n reader.onload = addImg;\n\n function addImg(imgsrc) {\n fileName = fileName.replace(/\\.[^/.]+$/, \... | [
"0.6727806",
"0.6536315",
"0.65170777",
"0.6505467",
"0.645731",
"0.6384307",
"0.62815166",
"0.60286707",
"0.5991979",
"0.5991979",
"0.5982442",
"0.5971321",
"0.5951677",
"0.5938672",
"0.58278036",
"0.5791386",
"0.5779357",
"0.573151",
"0.5715115",
"0.5714283",
"0.5693559",
... | 0.775863 | 0 |
handleNewTexture: param evt Javascript evt Loads the selected texture and adds it to the list of textures. | function handleNewTexture(evt) {
let file = textureBtn.files;
let reader = new FileReader;
let fileName = file[0].name;
reader.readAsDataURL(file[0]);
reader.onload = addImg;
function addImg(imgsrc) {
fileName = fileName.replace(/\.[^/.]+$/, ""); //Remove ex... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleTexture(evt) {\n let groupName = groupSelect.querySelector('select').value;\n activeVisualizer.changeTexture(groupName, './assets/images/' + evt.target.dataset.texture + '.png');\n }",
"initTexture(path){\n //var index = this.texture.length;\n this.texture = this.gl.... | [
"0.71001494",
"0.6549259",
"0.6549259",
"0.6495349",
"0.6461004",
"0.6394346",
"0.63580275",
"0.6342054",
"0.6315217",
"0.63018435",
"0.62952304",
"0.6282595",
"0.62796926",
"0.62668455",
"0.62648034",
"0.62271094",
"0.6223784",
"0.6214649",
"0.6204398",
"0.6160635",
"0.61390... | 0.8066125 | 0 |
handleTransparency param evt Javascript event Takes the current model name and passes that to the changeTransparency function in addition to the current transparency value. | function handleTransparency(evt)
{
let groupName = groupSelect.querySelector('select').value;
// Save local value of transparency to be applied when group is selected
const modelInfo = visualizers[getCurrentActive()];
for (const group of modelInfo.animation.groups) {
if (... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleTransInputChange(evt)\n {\n activeVisualizer.changeTransparency(groupSelect.querySelector('select').value, parseFloat(evt.target.value));\n transparency.value = evt.target.value;\n }",
"function applyColor(evt) {\n \n let id = this.getAttribute(\"id\");\n let coeff = t... | [
"0.675228",
"0.6363936",
"0.5819502",
"0.56771225",
"0.5521084",
"0.54607314",
"0.54333955",
"0.54283285",
"0.5346735",
"0.52908415",
"0.5160776",
"0.51547784",
"0.5085986",
"0.5069593",
"0.50502455",
"0.5046526",
"0.50440836",
"0.50291365",
"0.5021298",
"0.5021298",
"0.49843... | 0.7608879 | 0 |
handleTransInputChange param evt Javascript event Handler for text input that allows the user to type a transparency value. | function handleTransInputChange(evt)
{
activeVisualizer.changeTransparency(groupSelect.querySelector('select').value, parseFloat(evt.target.value));
transparency.value = evt.target.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_handleInputChange(event) {\n const that = this,\n oldValue = that.value,\n target = event.target;\n\n if (that.disabled || that.readonly) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n const isRGBInput = ['r-cha... | [
"0.65681857",
"0.6482224",
"0.6275107",
"0.6192861",
"0.6160596",
"0.6146268",
"0.6047862",
"0.6038259",
"0.6000914",
"0.5986402",
"0.59628165",
"0.5902542",
"0.5891458",
"0.5840281",
"0.5808301",
"0.5807116",
"0.5804582",
"0.5777218",
"0.5773195",
"0.57651544",
"0.5764972",
... | 0.7509944 | 0 |
handleRmModel: param evt Javascript event Remove the selected animation. | function handleRmModel(evt) {
const winId = evt.target.dataset.window;
if (getNumberActive() > 1) {
if (winId.includes('1')) {
visualizers[1] = {
state: { active: false }
};
activeVisualizer = visualizers[2].instance;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeModel(){\r\n scene.remove(modelOBJ, wireframeOBJ); \r\n}",
"removeModel() {\n this.log('removeModel', {\n sourceModel: this.sourceModel,\n dragIndex: this.dragIndex\n })\n this.sourceModel.removeAt(this.dragIndex)\n }",
"clear () {\n // Make sure there is a map we can ref... | [
"0.6609905",
"0.6241329",
"0.5935911",
"0.5662163",
"0.5621513",
"0.56001043",
"0.55702144",
"0.5529705",
"0.5476235",
"0.5470164",
"0.544929",
"0.5444489",
"0.5417542",
"0.536095",
"0.53582793",
"0.5339867",
"0.5316692",
"0.529722",
"0.52951384",
"0.52871394",
"0.52737105",
... | 0.72566 | 0 |
handlePlayPause param evt Javascript event Event handeler for pausing or playing the animation determined by the current state of the play/pause button. | function handlePlayPause(evt)
{
const state = getState('playing');
visualizers[getCurrentActive()].state.playing = !state;
activeVisualizer.togglePlay();
if (state) {
evt.target.dataset.toggle = "pause";
} else {
evt.target.dataset.toggle = "play";
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handlePause(event) {\n if (pauseButton.textContent === \" pause \") {\n plus.disabled = true;\n minus.disabled = true;\n like.disabled = true;\n submitButton.disabled = true;\n timerManager(false);\n pauseButton.textContent = \" resume \"\n } else if (pauseButton.textContent === \" res... | [
"0.7355061",
"0.7131592",
"0.7093909",
"0.7047176",
"0.69799787",
"0.6921905",
"0.6739325",
"0.67368627",
"0.673679",
"0.6719286",
"0.6648033",
"0.6614075",
"0.66106594",
"0.65178144",
"0.64802337",
"0.64490986",
"0.6442716",
"0.641119",
"0.64047456",
"0.6400625",
"0.6394687"... | 0.8304765 | 0 |
handlePlayAll param evt Javascript event Event handler for playing every loaded animation | function handlePlayAll(evt)
{
if (visualizers[1].state.active)
visualizers[1].instance.setPlay(true);
if (visualizers[2].state.active)
visualizers[2].instance.setPlay(true);
playPauseBtn.dataset.toggle = "play";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"play() {\n\t\treturn Promise.all(this.$.animations.map(anim => anim.play()));\n\t}",
"function playAll(arr) {\n for (var i=0; i<arr.length; i++) {\n arr[i].play();\n }\n}",
"function playAll() {\n widget.play();\n activePlayer.play();\n}",
"function handlePauseAll(evt)\n {\n if (... | [
"0.66099715",
"0.655456",
"0.6444409",
"0.6242064",
"0.6201921",
"0.6190983",
"0.5951572",
"0.588197",
"0.5858429",
"0.5848841",
"0.5714908",
"0.57074875",
"0.5688242",
"0.56877494",
"0.5680885",
"0.5672348",
"0.56426656",
"0.5637457",
"0.5624351",
"0.56136084",
"0.5613178",
... | 0.74168193 | 0 |
handlePauseAll param evt Javascript event Event handler for pausing every loaded animation | function handlePauseAll(evt)
{
if (visualizers[1].state.active)
visualizers[1].instance.setPlay(false);
if (visualizers[2].state.active)
visualizers[2].instance.setPlay(false);
playPauseBtn.dataset.toggle = "pause";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pauseAll() {\n pauseState = true;\n }",
"function handlePlayAll(evt)\n {\n if (visualizers[1].state.active)\n visualizers[1].instance.setPlay(true);\n if (visualizers[2].state.active)\n visualizers[2].instance.setPlay(true);\n\n playPauseBtn.dataset.togg... | [
"0.7312066",
"0.66948676",
"0.66872686",
"0.662132",
"0.6351549",
"0.6318928",
"0.6307584",
"0.6307055",
"0.6290097",
"0.62815166",
"0.62815166",
"0.62815166",
"0.6267475",
"0.6239486",
"0.6239486",
"0.6234002",
"0.62265784",
"0.6212331",
"0.62080896",
"0.6118747",
"0.6099652... | 0.78864807 | 0 |
handlePagination param evt Javascript event Handler for changing the displayed playback controls pane | function handlePagination(evt)
{
evt.preventDefault();
playbackSlider.dataset.position = evt.target.dataset.page;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleChangePage(event, pageNum) { \r\n }",
"handleClick(pageNumber, arr, event) {\r\n\t\tif(pageNumber <= 1) {\r\n\t\t\tdocument.getElementById(\"prev\").style.visibility=\"hidden\";\r\n\t\t} else {\r\n\t\t\tdocument.getElementById(\"prev\").style.visibility=\"visible\";\r\n\t\t}\r\n\r\n\t\tif(pageN... | [
"0.7090851",
"0.6681228",
"0.6562704",
"0.6549533",
"0.65486753",
"0.6385724",
"0.63796407",
"0.6355349",
"0.6304605",
"0.63002694",
"0.6227824",
"0.6223952",
"0.61990553",
"0.61487556",
"0.6144058",
"0.61350185",
"0.6103715",
"0.6099225",
"0.6098285",
"0.6080744",
"0.6077224... | 0.7644214 | 0 |
handleResetCamera param evt Javascript event Event handler for reseting the camera to the default perspective. | function handleResetCamera(evt)
{
activeVisualizer.resetCamera();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"registerCameraReset() {\n\t\tconst buttonResetCamera = document.getElementById( 'controls_reset' );\n\t\tbuttonResetCamera.addEventListener( 'click', ev => WebHF.SceneManager.resetCamera() );\n\t}",
"function resetCam(){\n buttonDown=true;\n camera.position.x = 4; //Set camera's default position\n camer... | [
"0.6905697",
"0.6814692",
"0.6691972",
"0.6570716",
"0.63650167",
"0.6345281",
"0.6285717",
"0.6144197",
"0.60663813",
"0.5973564",
"0.59241873",
"0.5922721",
"0.59121245",
"0.590936",
"0.5861969",
"0.57986456",
"0.5773681",
"0.57631326",
"0.5686589",
"0.56536543",
"0.5637602... | 0.84571046 | 0 |
handleTimeSlideInput param evt Javascript event Handler for range input that allows the user to slide to adjust the current time of the animation. | function handleTimeSlideInput(evt)
{
preventNotify = true;
activeVisualizer.setTime(parseFloat(evt.target.value));
timeInput.value = evt.target.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleTimeInputChange(evt)\n {\n preventNotify = false;\n activeVisualizer.setTime(parseFloat(evt.target.value));\n }",
"changeTime() {\n this.input.time = document.getElementById(\"timeSlider\").value\n console.log(\"time: \" + this.input.time)\n }",
"onChangeTime... | [
"0.7631712",
"0.6366641",
"0.6322702",
"0.6292015",
"0.6205098",
"0.61691993",
"0.616917",
"0.61182874",
"0.597724",
"0.5945576",
"0.58722794",
"0.5856226",
"0.5838057",
"0.5819014",
"0.5785242",
"0.5768751",
"0.5741888",
"0.5711056",
"0.5706124",
"0.56501335",
"0.5648589",
... | 0.84339964 | 0 |
handleTimeInputChange param evt Javascript event Callback for when a new time for the animation is entered. | function handleTimeInputChange(evt)
{
preventNotify = false;
activeVisualizer.setTime(parseFloat(evt.target.value));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleTimeSlideInput(evt)\n {\n preventNotify = true;\n activeVisualizer.setTime(parseFloat(evt.target.value));\n timeInput.value = evt.target.value;\n }",
"onChangeTime() {}",
"onChangeTimeFrame() {}",
"onChange(_) {\n RAG.state.setTime(this.currentCtx, this.inputT... | [
"0.76416683",
"0.7532996",
"0.7043003",
"0.6927741",
"0.68428034",
"0.6775767",
"0.6647795",
"0.66074365",
"0.6604207",
"0.6555348",
"0.65541697",
"0.65541697",
"0.65541697",
"0.65387076",
"0.64453954",
"0.6416605",
"0.64083976",
"0.6367972",
"0.6358043",
"0.6347748",
"0.6324... | 0.8108954 | 0 |
handleSpeedSlideInput param evt Javascript event Handler for range input that allows the user to slide to adjust the playback speed for the currently active animation. | function handleSpeedSlideInput(evt)
{
activeVisualizer.setSpeed(parseFloat(evt.target.value));
speedInput.value = evt.target.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleSpeedInputChange(evt)\n {\n activeVisualizer.setSpeed(parseFloat(evt.target.value));\n playbackSpeed.value = evt.target.value;\n }",
"function handleGameSpeedChange(ev) {\n\tconst val = ev.target.value;\n\tif (gameSpeedMap[val] !== undefined) {\n\t\tconfiguration.gameSpeed = va... | [
"0.80081946",
"0.65899205",
"0.6477579",
"0.6420058",
"0.631828",
"0.63097125",
"0.62572217",
"0.6251153",
"0.61864495",
"0.611164",
"0.6054133",
"0.60124826",
"0.59788847",
"0.5914367",
"0.5866432",
"0.5756979",
"0.5735573",
"0.57257974",
"0.5704851",
"0.5681241",
"0.5673798... | 0.86868966 | 0 |
handleSpeedInputChange param evt Javascript event Handler for text input that allows the user to type a speed value. | function handleSpeedInputChange(evt)
{
activeVisualizer.setSpeed(parseFloat(evt.target.value));
playbackSpeed.value = evt.target.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleSpeedSlideInput(evt)\n {\n activeVisualizer.setSpeed(parseFloat(evt.target.value));\n speedInput.value = evt.target.value;\n }",
"function handleGameSpeedChange(ev) {\n\tconst val = ev.target.value;\n\tif (gameSpeedMap[val] !== undefined) {\n\t\tconfiguration.gameSpeed = val;\n... | [
"0.8117521",
"0.71177286",
"0.6715026",
"0.66514015",
"0.65521574",
"0.64217544",
"0.640104",
"0.6172939",
"0.6133076",
"0.6116976",
"0.611277",
"0.6039195",
"0.5957613",
"0.5946002",
"0.5930467",
"0.5880851",
"0.5801962",
"0.57735074",
"0.5736428",
"0.5728297",
"0.57119906",... | 0.8475374 | 0 |
handleFloors param evt Javascript event Handler for toggling the visibility of the scene's gridded floor. | function handleFloors(evt)
{
const winId = evt.target.dataset.window;
if (winId.includes('1')) {
visualizers[1].instance.displayFloor(evt.target.checked);
}
else if (winId.includes('2')) {
visualizers[2].instance.displayFloor(evt.target.checked);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleSplashToggle(evt)\n {\n if (evt.target.id === 'show-button')\n splashScreen.dataset.state = \"display\";\n else\n splashScreen.dataset.state = \"hidden\";\n }",
"function fieldClicked(uniqueid) {\n let id = uniqueid\n\n if (playerswitch == 0) {\n ... | [
"0.57958287",
"0.56550014",
"0.55362576",
"0.55256975",
"0.5499076",
"0.5499076",
"0.5487961",
"0.548273",
"0.5439227",
"0.5399728",
"0.5382586",
"0.5315061",
"0.531376",
"0.53096694",
"0.5301912",
"0.52867293",
"0.52863234",
"0.5282336",
"0.52501655",
"0.52478004",
"0.522726... | 0.80151093 | 0 |
handleLockCamera param evt Javascript event Handler that will make the scene's camera follow the model. This prevents the normal user input for looking around the scene (panning, zooming, and orbiting). | function handleLockCamera(evt)
{
const winId = evt.target.dataset.window;
if (winId.includes('1')) {
visualizers[1].instance.cameraLock(evt.target.checked);
}
else if (winId.includes('2')) {
visualizers[2].instance.cameraLock(evt.target.checked);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function moveCamera(e, camera, mvp, lights) {\n\n e = e || window.event;\n\n if (e.keyCode == '38') {\n // up arrow\n camera.pos.x += camera.dir.x;\n camera.pos.z += camera.dir.z;\n }\n else if (e.keyCode == '40') {\n camera.pos.x -= camera.dir.x;\n camera.pos.z -= ca... | [
"0.6293883",
"0.5955711",
"0.59232086",
"0.58192706",
"0.56725544",
"0.56613624",
"0.56440514",
"0.5606664",
"0.5567903",
"0.5556558",
"0.55480033",
"0.55025774",
"0.5479962",
"0.5476714",
"0.5474695",
"0.54598945",
"0.5432807",
"0.5410482",
"0.53970444",
"0.5349913",
"0.5346... | 0.794913 | 0 |
loadDroppedAnimation: param file dragged and dropped logfile Returns a promise that resolves to a model being loaded from file data converted to json. | function loadDroppedAnimation(file)
{
let loaded;
return new Promise((resolve, reject) => {
let reader = new FileReader();
reader.readAsText(file, "UTF-8");
// On load resolve
reader.addEventListener('load', resolve);
// On progress, upda... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async function dropHandler(event) {\n allowDrop(event);\n var is_hybrid = document.getElementById(\"hybrid\").checked == true;\n var is_anomaly = document.getElementById(\"anomaly\").checked == true;\n var is_local_only = document.getElementById(\"show_local\").checked == true;\n var drop = document... | [
"0.5751882",
"0.57166857",
"0.51548517",
"0.50261927",
"0.49937707",
"0.49834454",
"0.49364173",
"0.48980626",
"0.48027137",
"0.48022223",
"0.48013145",
"0.47978145",
"0.47668648",
"0.4750582",
"0.47350994",
"0.47252867",
"0.47107738",
"0.47037268",
"0.4690578",
"0.46831846",
... | 0.68444186 | 0 |
loadRefAnimation(urlRef): param urlRef location of the logfile Returns a function that executes fetch of the GlobalFetch mixin from Fetch API. Method 'fetch' returns a promises that resolves to the successful aqcuisition of the resource, in this case, the json file. | function loadRefAnimation(urlRef)
{
splashScreen.dataset.state = "hidden";
fetch(urlRef).then((res) => res.json()).then(async (data) => {
loadNewVisualizer(data).then(() => {
updateControls();
});
}).catch((error) => {
alert('The specified ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadGIF() {\n var oReq = new XMLHttpRequest()\n oReq.open('GET', url.value, true)\n oReq.responseType = 'arraybuffer'\n\n oReq.onload = function(oEvent) {\n var arrayBuffer = oReq.response // Note: not oReq.responseText\n if (arrayBuffer) {\n gif = Object(_lib_index_js__WEBPACK_IMPORTED_MOD... | [
"0.55840284",
"0.5209822",
"0.5120826",
"0.5120826",
"0.511859",
"0.5095678",
"0.5078207",
"0.5078207",
"0.50622445",
"0.5043899",
"0.5022428",
"0.5007858",
"0.50033563",
"0.50033563",
"0.49947238",
"0.49858534",
"0.49409756",
"0.49409756",
"0.48456952",
"0.47947946",
"0.4792... | 0.85420674 | 0 |
loadTestAnimation: param animation index for test model array. Returns a function that creates a model from the data held in the test model array at the specified index. | function loadTestAnimation(animation)
{
splashScreen.dataset.state = "hidden";
loadNewVisualizer(testModels[animation]).then(() => {
updateControls();
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function nextAnimation0() {\r\n modelViewer.animationName = \"pos110_s100\"\r\n console.log(modelViewer.animationName)\r\n}",
"function loadAnimation(path) {\r\n var _XMLHttpRequest = new XMLHttpRequest();\r\n _XMLHttpRequest.open(\"GET\", path, false);\r\n _XMLHttpRequest.send();\r\n ... | [
"0.5704049",
"0.505311",
"0.50314456",
"0.4994278",
"0.4909234",
"0.4897309",
"0.48772737",
"0.48398998",
"0.48396212",
"0.48294288",
"0.4826427",
"0.48090273",
"0.48042852",
"0.48014966",
"0.47846374",
"0.47820318",
"0.4771521",
"0.4770526",
"0.4769082",
"0.47683433",
"0.476... | 0.6263495 | 0 |
When linking isn't available, format the learn more link better. | function learnMore(url) {
return terminal_link_1.default(chalk_1.default.underline('Learn more.'), url, {
fallback: (text, url) => `Learn more: ${chalk_1.default.underline(url)}`,
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_link_text() {\n if (hidden) {\n return \"Show Lint Notes\";\n }\n return \"Hide Lint Notes\";\n }",
"function formatCitationLink(metaData, link) {\n\n\t\t//return if link invalid\n\t\tif (link == null || link == \"\") return \"\";\n\n\t\t//get final url\n if (link.search... | [
"0.6718279",
"0.65062946",
"0.6433454",
"0.6379145",
"0.62051266",
"0.61277664",
"0.61028785",
"0.60617805",
"0.60535234",
"0.60354906",
"0.6024459",
"0.6003291",
"0.5987314",
"0.5987086",
"0.5886251",
"0.5852355",
"0.5852355",
"0.58445954",
"0.5831173",
"0.58032954",
"0.5789... | 0.6796113 | 0 |
Private, fetches a tileset and passes its DOM to a callback | function getTileset (tileset, cb) {
var img = new Image();
img.onload = function () {
cb(img);
};
img.src = _tilesets[tileset];
return img;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"refreshTileset() {}",
"refreshTileset() {\r\n\r\n }",
"function collect_tiles() { \n //list = data.responseText.split(';');\n list = JSON.parse(data.responseText);\n lastUpdateMarker = \"ASDADADD\";\n updateMarker = list[0];\n list = list... | [
"0.65082747",
"0.63586617",
"0.62124974",
"0.6002975",
"0.59816843",
"0.59692043",
"0.5938087",
"0.5895882",
"0.5810985",
"0.5760729",
"0.56977236",
"0.56896925",
"0.568172",
"0.5671526",
"0.56380445",
"0.558328",
"0.5519678",
"0.55173963",
"0.548019",
"0.54793954",
"0.545669... | 0.6943714 | 0 |
skipComment skips single line comments | function skipComment() {
readWhile(function(ch) {
return ch !== ("\n");
});
input.next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function skip_comment() {\n read_while(function(ch){ return ch != \"\\n\" });\n input.next();\n }",
"function skipCommentMultiline() {\r\n input.next();\r\n readWhile(function(ch) {\r\n return ch !== comment;\r\n });\r\n input.next();\r\n }",
"function... | [
"0.8266319",
"0.81331784",
"0.80201554",
"0.80201554",
"0.80201554",
"0.7921172",
"0.7874983",
"0.7443574",
"0.7443574",
"0.7443574",
"0.73305535",
"0.7218993",
"0.706746",
"0.69440633",
"0.6655308",
"0.6352661",
"0.627632",
"0.61338395",
"0.60975397",
"0.60950625",
"0.609506... | 0.8265737 | 1 |
skipCommentMultiline skips multiline comments | function skipCommentMultiline() {
input.next();
readWhile(function(ch) {
return ch !== comment;
});
input.next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function skip_comment() {\n read_while(function(ch){ return ch != \"\\n\" });\n input.next();\n }",
"ignoreComment() {\n this.step();\n while (this.next !== \"\\n\" && !this.atEOF()) {\n this.step();\n }\n }",
"function skipLineComment(state) {\n state... | [
"0.7423076",
"0.7409612",
"0.7367803",
"0.7288504",
"0.7134824",
"0.71322674",
"0.71322674",
"0.71322674",
"0.66661423",
"0.66661423",
"0.66661423",
"0.6375696",
"0.635741",
"0.6321932",
"0.62459",
"0.62314737",
"0.61449665",
"0.6134769",
"0.6134769",
"0.6000591",
"0.5968706"... | 0.853822 | 0 |
Constructs a new RestSettingsMenuResponse. | function RestSettingsMenuResponse() {
_classCallCheck(this, RestSettingsMenuResponse);
_defineProperty(this, "RootMetadata", undefined);
_defineProperty(this, "Sections", undefined);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get status_menu() {\n // prepare a list of possible statuses for the dropdown\n const statuses = [\n { label: \"Online\", value: \"online\" },\n { label: \"Idle\", value: \"idle\" },\n { l... | [
"0.58446",
"0.5702837",
"0.54654753",
"0.541713",
"0.54013926",
"0.5278982",
"0.5227217",
"0.51741797",
"0.5152321",
"0.5119684",
"0.50753206",
"0.50342304",
"0.5009994",
"0.49995628",
"0.49843055",
"0.4982366",
"0.49777952",
"0.49523193",
"0.49237025",
"0.4915087",
"0.491082... | 0.8405528 | 0 |
add type property to resource with id callback(error) | function gdrive_type_add(id, callback) {
var request = gapi.client.drive.properties.insert({
'fileId': id,
'resource': STORYMAP_TYPE_PROP
});
gdrive_exec(request, callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addInstanceOfObject(resource_type, id, details) {\n\tvar link_hash = allLinks[resource_type];\n\tif (link_hash == null) {\n\t\tlink_hash = {};\n\t\tallLinks[resource_type] = link_hash;\n\t\tvar source_map = {};\n\t\tcheckedSourceMap[resource_type] = source_map\n\t\tvar in_source_map = {};\n\t\tsourceMap[r... | [
"0.6312721",
"0.60088044",
"0.59314686",
"0.57187647",
"0.5696913",
"0.5686799",
"0.556708",
"0.55020094",
"0.5456987",
"0.54403746",
"0.5415641",
"0.5376307",
"0.53717107",
"0.53633815",
"0.532467",
"0.5305032",
"0.5303481",
"0.52750796",
"0.52641386",
"0.5245819",
"0.522521... | 0.6622492 | 0 |
ensure resource with id has a type property callback(error) | function gdrive_type_ensure(id, callback) {
gdrive_type_get(id, function(error, type) {
if(error) {
callback(error);
} else if(type == null) {
gdrive_type_add(id, callback);
} else {
callback(null);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function type_used(type_id) {\n var q = {\n id: type_id,\n type: \"/type/type\",\n instance: {optional:true, id: null, limit: 1}\n };\n return freebase.mqlread(q)\n .then(function(env) {\n return env.result.instance !== null;\n });\n}",
"function checkExist(id, type) {\n\tvar sql = `select... | [
"0.60512835",
"0.6041188",
"0.591568",
"0.57944614",
"0.55431336",
"0.5492884",
"0.5384564",
"0.53629535",
"0.53444767",
"0.52514005",
"0.5239822",
"0.5229306",
"0.52023065",
"0.5184826",
"0.51427644",
"0.51427644",
"0.51082337",
"0.5085189",
"0.5084492",
"0.5081379",
"0.5072... | 0.68142086 | 0 |
copy items in item_list from srcFolder to dstFolder callback = function(error) | function _gdrive_copy_process(item_list, srcFolder, dstFolder, callback) {
if(!(item_list && item_list.length)) {
callback(); // done
} else {
var re = new RegExp('/'+srcFolder.id+'/', 'g');
var item = item_list.shift();
if(item.mimeType == GDRIVE_FOLDER_MIME_TYP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function lib_data_paul_copy_items(iparams)\r\n{ \r\n // create local copy of params\r\n var iparams_cp = jQuery.extend(true, {}, iparams); \r\n\r\n // URL example : .../addLink?id[Kind-ID]&targetparentid=[...]\r\n if ((iparams_cp.src_elem[0].elem_id != undefined) && (iparams_cp.dst_elem.elem_id != undefine... | [
"0.6145088",
"0.59224194",
"0.59141934",
"0.5868505",
"0.5791705",
"0.57467896",
"0.5725521",
"0.57245255",
"0.5689335",
"0.5653781",
"0.56488454",
"0.56140906",
"0.56101483",
"0.5602817",
"0.5513185",
"0.5511838",
"0.5493937",
"0.5480048",
"0.5383407",
"0.53811383",
"0.53685... | 0.82005674 | 0 |
StoryMap stuff //////////////////////////////////////////////////////////////////// lock storymap callback(error) | function gdrive_storymap_lock(folder, callback) {
if(folder.lock_file) {
var request = gapi.client.drive.files.touch({
'fileId': folder.lock_file.id
});
gdrive_exec(request, function(error, f) {
if(!error) {
folder['lock_file'] = f;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gdrive_storymap_load(storymap_id, callback) {\n gdrive_get(storymap_id, function(error, folder) {\n if(error) {\n callback(error);\n } else {\n _gdrive_storymap_process_files(folder, function(error) {\n callback(error, folder);\n });\n ... | [
"0.6031729",
"0.57802004",
"0.55359703",
"0.5529436",
"0.55235934",
"0.54949814",
"0.54901105",
"0.54670644",
"0.54316765",
"0.5320668",
"0.53126895",
"0.5300639",
"0.52837527",
"0.52678645",
"0.52315044",
"0.52005106",
"0.5163676",
"0.5152568",
"0.5132482",
"0.512941",
"0.51... | 0.6386897 | 0 |
Process storymap folder permissions => folder.permissions callback(error) role = owner | writer | reader | function _gdrive_storymap_process_perms(folder, callback) {
folder['permissions'] = [];
//if(folder.userPermission.role == 'owner') {
gdrive_perm_list(folder.id, function(error, perm_list) {
if(!error && perm_list) {
for(var i = 0; i < perm_list.length; i++) {
var perm ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async loadPermissionsFile() {\n try {\n let perms = await efuns.fs.readYamlAsync(this.permissionsFile),\n permSets = Object.keys(perms).filter(p => p.startsWith('PERMSET')),\n dirList = Object.keys(perms)\n .filter(p => p.startsWith('DIRECTORY'))\n... | [
"0.6344542",
"0.58543605",
"0.57333696",
"0.5704808",
"0.56613284",
"0.5567729",
"0.55268115",
"0.5491786",
"0.5409787",
"0.53850704",
"0.5382745",
"0.5367547",
"0.531226",
"0.5295123",
"0.5280416",
"0.52740234",
"0.5185375",
"0.5182472",
"0.51390606",
"0.51043904",
"0.505763... | 0.8086386 | 0 |
Process storymap folder files callback(error) | function _gdrive_storymap_process_files(folder, callback) {
folder['draft_on'] = '';
folder['draft_file'] = null;
folder['published_on'] = '';
folder['published_file'] = null;
folder['lock_file'] = null;
gdrive_folder_list(folder.id, function(error, file_list) {
if(!error && f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gdrive_storymap_load(storymap_id, callback) {\n gdrive_get(storymap_id, function(error, folder) {\n if(error) {\n callback(error);\n } else {\n _gdrive_storymap_process_files(folder, function(error) {\n callback(error, folder);\n });\n ... | [
"0.64752823",
"0.6393726",
"0.6045031",
"0.58955956",
"0.58907104",
"0.58196896",
"0.5794388",
"0.5545273",
"0.5411295",
"0.53253996",
"0.52892506",
"0.5237667",
"0.52032584",
"0.5193821",
"0.5179887",
"0.5171355",
"0.51522255",
"0.51208895",
"0.50327337",
"0.5030125",
"0.501... | 0.76942265 | 0 |
Add storymaps that are 'shared with me' to folder_map Must have correct type property and contain draft.json callback(error) | function gdrive_storymap_list_shared(folder_map, callback) {
var _process_folders = function(folder_list) {
if(folder_list && folder_list.length) {
folder = folder_list.shift();
gdrive_type_get(folder.id, function(error, type) {
if(error) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _gdrive_storymap_process_files(folder, callback) {\n folder['draft_on'] = '';\n folder['draft_file'] = null;\n\n folder['published_on'] = '';\n folder['published_file'] = null;\n \n folder['lock_file'] = null;\n \n gdrive_folder_list(folder.id, function(error, file_list) {\n ... | [
"0.7037667",
"0.69920236",
"0.66341805",
"0.6439166",
"0.63832766",
"0.6283714",
"0.6020261",
"0.59793043",
"0.5919234",
"0.5584165",
"0.53814745",
"0.5356148",
"0.5293301",
"0.52335",
"0.5185873",
"0.50335896",
"0.49960762",
"0.49949366",
"0.49383178",
"0.48353946",
"0.48309... | 0.7681395 | 0 |
Create public storymap in parentFolder requires a unique name callback(error, ) | function gdrive_storymap_create(parentFolder, title, data, callback) {
var data = JSON.stringify(data);
gdrive_find(parentFolder, title, null, function(error, folderResource) {
if(error) {
callback(error);
} else if(folderResource) {
callback('A StoryMap named "'+title+... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gdrive_storymap_publish(storymapFolder, callback) {\n // Load content from draft.json\n gdrive_storymap_load_draft(storymapFolder, function(error, data) {\n if(error) {\n callback(error);\n } else {\n var content = JSON.stringify(data);\n \n ... | [
"0.608771",
"0.5707726",
"0.5687919",
"0.55722094",
"0.55294603",
"0.5502495",
"0.5497985",
"0.54562354",
"0.54562354",
"0.54562354",
"0.5373246",
"0.5350143",
"0.53223705",
"0.5284165",
"0.5275423",
"0.5272927",
"0.5260722",
"0.5241681",
"0.52004415",
"0.51984286",
"0.519815... | 0.80043423 | 0 |
Load storymap (info only) callback(error, ) | function gdrive_storymap_load(storymap_id, callback) {
gdrive_get(storymap_id, function(error, folder) {
if(error) {
callback(error);
} else {
_gdrive_storymap_process_files(folder, function(error) {
callback(error, folder);
});
}
});
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadMap() {\r\n\tif (map == undefined) {\r\n\t\tmap = Factory.newMap();\r\n\t\tmap.load(Globals.path('gis/mgmt/scenario_map.txt'));\r\n\t\tprint('map loaded');\r\n\t}\r\n}",
"function load_problem_map(){\n\tvar newURL = window.location.protocol + \"//\" + window.location.host + window.location.pathname ... | [
"0.6671572",
"0.6438698",
"0.64135647",
"0.6377502",
"0.63627666",
"0.6355344",
"0.6332837",
"0.6318588",
"0.63116616",
"0.6270476",
"0.6053024",
"0.60107964",
"0.6006508",
"0.5979775",
"0.59742296",
"0.5972909",
"0.59561753",
"0.5931947",
"0.59034854",
"0.5884819",
"0.587419... | 0.77458507 | 0 |
Load draft.json from storymapFolder callback(error, data) | function gdrive_storymap_load_draft(storymapFolder, callback) {
_gdrive_load_json(storymapFolder['draft_file'], callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gdrive_storymap_save_draft(storymapFolder, data, callback) {\n var content = JSON.stringify(data);\n\n if(storymapFolder.draft_file) {\n gdrive_file_update(storymapFolder.draft_file.id, content, function(error, file) {\n if(file) {\n storymapFolder['draft_on'] = file... | [
"0.71193534",
"0.70673543",
"0.671557",
"0.6517809",
"0.60446686",
"0.58457816",
"0.5813027",
"0.5790995",
"0.56979537",
"0.5519147",
"0.5479972",
"0.5475886",
"0.5404021",
"0.54005337",
"0.539117",
"0.53686666",
"0.53610253",
"0.53497314",
"0.53497046",
"0.5291258",
"0.52776... | 0.8677377 | 0 |
Create/update draft.json in storymapFolder callback(error, ) | function gdrive_storymap_save_draft(storymapFolder, data, callback) {
var content = JSON.stringify(data);
if(storymapFolder.draft_file) {
gdrive_file_update(storymapFolder.draft_file.id, content, function(error, file) {
if(file) {
storymapFolder['draft_on'] = file.modifiedDa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gdrive_storymap_publish(storymapFolder, callback) {\n // Load content from draft.json\n gdrive_storymap_load_draft(storymapFolder, function(error, data) {\n if(error) {\n callback(error);\n } else {\n var content = JSON.stringify(data);\n \n ... | [
"0.7247656",
"0.7159305",
"0.69427836",
"0.64293534",
"0.6292846",
"0.6085155",
"0.59915966",
"0.5580669",
"0.55401134",
"0.5504224",
"0.5473388",
"0.54306",
"0.5363834",
"0.5349713",
"0.53223175",
"0.5319049",
"0.5314152",
"0.5306316",
"0.52974874",
"0.52820826",
"0.5260936"... | 0.78689444 | 0 |
Migration callback(error, ) Get a list of storymaps that need to be migrated. Do NOT including storymaps that are shared WITH user | function gdrive_migrate_list(migrate_list_callback) {
var storymap_list = []; // list of processed storymaps
var _process_folder_list = function(folder_list) {
if(folder_list && folder_list.length) {
folder = folder_list.shift();
folder_file_list = []; // list of valid f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async importStories() {\n if(this.stories_to_migrate.length) {\n console.log(`Migrating ${this.stories_to_migrate.length} stories`)\n } else {\n console.log(`No stories to migrate`)\n }\n const stories = await this.storyblok.createStories(this.stories_to_migrate, this.taxonomiesData)\n if(... | [
"0.59663045",
"0.55671793",
"0.54301155",
"0.52984625",
"0.5243949",
"0.5218135",
"0.5209505",
"0.5062805",
"0.5037851",
"0.49182573",
"0.4902263",
"0.48746574",
"0.48647907",
"0.48455095",
"0.48372653",
"0.4770561",
"0.47674072",
"0.47391415",
"0.472937",
"0.4719403",
"0.471... | 0.67697954 | 0 |
Adjust that minute plus string 0 | function minuteAdjust(minute) {
if (minute < 10) {
minute = `0${minute}`;
}
return minute;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function minute_update(){\n if (minute_timer === 0){\n minutes = \"00\"\n }\n if (minute_timer < 10){\n minutes = \"0\"+minute_timer\n }\n }//end minute update",
"function addZero(min_or_sec)\n{\nif (min_or_sec < 10)\n{min_or_sec=\"0\" + min_or_sec}\nreturn min_or_sec\n}",
"function incr... | [
"0.8001969",
"0.7043438",
"0.70404917",
"0.7018985",
"0.69706535",
"0.6956377",
"0.6900023",
"0.6897731",
"0.68963057",
"0.68963057",
"0.68963057",
"0.6896092",
"0.6893019",
"0.68802714",
"0.6875027",
"0.6846002",
"0.68166965",
"0.67860943",
"0.67836535",
"0.6731481",
"0.6702... | 0.7665795 | 1 |
Function for hover on servicesbox | function servicesBoxHover() {
$( '.services-box__image-container').mouseover(function() {
$(this).css('cursor', 'pointer');
$(this).find('.services-box__image').css('opacity', '0.1').css('transition', '.50s');
$(this).find('.services-box__v-line').css('display', 'block');
});
$( '.services-box__imag... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hovering() {\n\n}",
"onHoverStart() {\n\n }",
"function bindHover() {\n }",
"function onMouseOver(e) {\n addClass(innerWrapper, 'fd-slider-hover');\n }",
"function hoverInfobox(pinobj,e){\n\tpinobj=pushpinArray[pinobj.unid];\n\tvar string='<div class=\"gradientWhite contextMe... | [
"0.696913",
"0.68839186",
"0.67498976",
"0.648944",
"0.64742756",
"0.64199",
"0.6419485",
"0.6419485",
"0.6334279",
"0.6287228",
"0.6212783",
"0.6161279",
"0.61600304",
"0.6157986",
"0.61466426",
"0.61263686",
"0.6104207",
"0.60940164",
"0.60928905",
"0.608848",
"0.6084471",
... | 0.8423838 | 0 |
Schedule a publish to happen for the given state | function schedulePublish(stateName) {
var stateContext = getStateContextObject(stateName);
// Check if a publish is already pending
if (!stateContext.isPublishPending) {
stateContext.isPublishPending = true;
// Perform publish after a short delay
// We delay so that...
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function publish_sts_object(topic, state) {\r\n let timestamp_utc = moment().utc().format(TIME_FORMAT) + \"UTC\";\r\n topic = mqtt.transform(topic, lit.FEEDBACK_CHANNEL, \"sts\", 0);\r\n let status_template = JSON.parse(\r\n JSON.stringify(\r\n service_obj[current_service_name].sts_templ... | [
"0.6454214",
"0.6348311",
"0.6339286",
"0.5868245",
"0.5847654",
"0.5836427",
"0.58162755",
"0.58025515",
"0.5780021",
"0.5728475",
"0.57234144",
"0.5696318",
"0.5684465",
"0.5617081",
"0.55591136",
"0.55591136",
"0.5547",
"0.54551804",
"0.54021347",
"0.5387557",
"0.531276",
... | 0.79012495 | 0 |
Send business context message | function sendBusinessMessage(screenId, messageWrapper) {
var addrMsg = messageWrapper.address;
var busMsg = messageWrapper.businesscontextmessage;
// Send business context message
if (busMsg) {
busMsg.screenId = screenId;
busMsg.logicalId = logicalId;
busMsg.originat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"sendMessageService(boatId) {\n publish(\n this.messageContext,\n BOATMC,\n { recordId: boatId },\n { scope: APPLICATION_SCOPE }\n );\n }",
"sendMessageService(boatId) {\n // explicitly pass boatId to the parameter recordId\n console.log(\"publishing:\" + boatId);\n //debugger;... | [
"0.58926195",
"0.5700765",
"0.56319284",
"0.5621556",
"0.54122424",
"0.5386267",
"0.5346501",
"0.53447664",
"0.5303441",
"0.5231546",
"0.5220066",
"0.5144883",
"0.51433253",
"0.51380503",
"0.5119616",
"0.51089925",
"0.5080497",
"0.5056398",
"0.5039468",
"0.5025102",
"0.501521... | 0.70126295 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.