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 |
|---|---|---|---|---|---|---|
Function to off/on panel of hotkeys | togglePanelHotkeys() {
self.enablePanelHotkeys = !self.enablePanelHotkeys;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function unsetHotKeys() {\n hotkeys.del('esc');\n hotkeys.del('right');\n hotkeys.del('left');\n }",
"hamButtonsOff() { this.enableAllHamButtons(); }",
"function resetHotkeyBtn(){\r\n\t\t\t\tchangeHotkeyBtn.html(\"Change hotkey\")\r\n\t\t\t\t\t.disabled = false;\r\n\t\t\t}",
"make_con... | [
"0.6749639",
"0.66877496",
"0.6503608",
"0.6176143",
"0.61528045",
"0.61528045",
"0.61528045",
"0.6135396",
"0.6127652",
"0.6123325",
"0.60991955",
"0.6069943",
"0.60228246",
"0.6015378",
"0.5971329",
"0.5942584",
"0.5941782",
"0.59295106",
"0.5920553",
"0.5918366",
"0.591676... | 0.81401825 | 0 |
Function to off/on tooltips | toggleTooltips() {
self.enableTooltips = !self.enableTooltips;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateTooltips() {\n jQuery('.tooltip').tooltip({showURL: false });\n}",
"function hideTooltip() {\n tooltip.style(\"display\",\"none\");\n}",
"function HideToolTip (){\ntooltip\n .style(\"opacity\",0);\n}",
"function hideTooltip() {\n tt.style('opacity', 0.0);\n }",
"function hideT... | [
"0.7411561",
"0.73961675",
"0.7358713",
"0.7345517",
"0.7343698",
"0.7343698",
"0.7343698",
"0.73273796",
"0.731598",
"0.72968847",
"0.7294979",
"0.72454214",
"0.72360903",
"0.7212767",
"0.71601564",
"0.7136394",
"0.71185666",
"0.70979095",
"0.7097677",
"0.7087773",
"0.706222... | 0.8440679 | 0 |
create live playlist, song_id from user, focused = more clustered around seeds, variety 01, higher means more variety | function createSeedPlaylist(variety) {
//hacky
var temp =[];
$.each(songSeedList, function(i, el){
if($.inArray(el, temp) === -1) temp.push(el);
});
songSeedList = temp;
// while (songSeedList.length > 5) {
// songSeedList = songSeedList.splice(4,3);
// }
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createPlaylist(callback){\n\t\tvar url = 'https://api.spotify.com/v1/users/' + spotifyUserId + '/playlists';\n\t\t$.ajax(url, {\n\t\t\tmethod: 'POST',\n\t\t\tdata: JSON.stringify({\n\t\t\t\t'name': 'Metly: A ' + desiredMood + \" Journey to \" + toStation,\n\t\t\t\t'public': false\n\t\t\t}),\n\t\t\tdataTyp... | [
"0.59719014",
"0.59204036",
"0.5908447",
"0.58264893",
"0.57026297",
"0.57024664",
"0.5679618",
"0.56663054",
"0.5652862",
"0.56504655",
"0.56307924",
"0.56251603",
"0.5597644",
"0.55875635",
"0.55623746",
"0.5533558",
"0.5525055",
"0.5496846",
"0.5446873",
"0.54347587",
"0.5... | 0.59438926 | 1 |
Dispatches a custom event on this element and waits for any blocking promises registered using the "addBlocker" function on the details object. If this function is called again, the event is only dispatched after all the previously registered blockers have returned. The event can be canceled either by resolving any blo... | async dispatchAsyncEvent(eventName) {
// Wait for all the previous blockers before dispatching the event.
let blockersPromise = this._blockersPromise.catch(() => {});
return (this._blockersPromise = blockersPromise.then(async () => {
let blockers = new Set();
let cancel = this.dispatchCustomEven... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function preventRealEventHandler(e, dispatched, preventDefault, cancelHandlers, stopEventPropagation) {\r\n var target = hammerhead.nativeMethods.eventTargetGetter.call(e) || e.srcElement;\r\n if (!dispatched && !isShadowUIElement(target)) {\r\n // NOTE: this will allow pressing hotkeys to... | [
"0.5646653",
"0.5462784",
"0.5192705",
"0.51253134",
"0.5026735",
"0.49505052",
"0.4932148",
"0.49147356",
"0.48610377",
"0.48027834",
"0.47898677",
"0.47715852",
"0.47424728",
"0.47406563",
"0.47274405",
"0.46979678",
"0.46819106",
"0.46612287",
"0.4651635",
"0.4629848",
"0.... | 0.73681223 | 0 |
Tries to open the specified and displays the main view specified with the "mainViewId" attribute on the node it contains. If the panel does not contain a , it is opened directly. This allows consumers like page actions to accept different panel types. | static async openPopup(panelNode, ...args) {
let panelMultiViewNode = panelNode.querySelector("panelmultiview");
if (panelMultiViewNode) {
return this.forNode(panelMultiViewNode).openPopup(...args);
}
panelNode.openPopup(...args);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async _showMainView() {\n let nextPanelView = PanelView.forNode(\n this.document.getElementById(this.node.getAttribute(\"mainViewId\"))\n );\n\n // If the view is already open in another panel, close the panel first.\n let oldPanelMultiViewNode = nextPanelView.node.panelMultiView;\n if (oldPane... | [
"0.7144241",
"0.61584103",
"0.6156015",
"0.6072342",
"0.6060579",
"0.5884549",
"0.58633715",
"0.585776",
"0.5762278",
"0.5701649",
"0.5685399",
"0.5641569",
"0.5602277",
"0.557675",
"0.549879",
"0.54453486",
"0.542162",
"0.5415772",
"0.5399932",
"0.53756785",
"0.5371352",
"... | 0.6663649 | 1 |
Removes the specified from the document, ensuring that any node it contains is destroyed properly. If the viewCacheId attribute is present on the element, imported subviews will be moved out again to the element it specifies, so that the panel element can be removed safely. If the panel does not contain a , it is remov... | static removePopup(panelNode) {
try {
let panelMultiViewNode = panelNode.querySelector("panelmultiview");
if (panelMultiViewNode) {
let panelMultiView = this.forNode(panelMultiViewNode);
panelMultiView._moveOutKids();
panelMultiView.disconnect();
}
} finally {
// ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"remove(){\n this.removeViews(Object.keys(this.views));\n this.el.innerHTML = null;\n this.layouts[this.layout].isRendered = false;\n this.layout = null;\n }",
"function removeDeletedElementFromDOM(domElement){\n domElement.remove();\n }",
"destroy() {\n this.panel.remove();\n }",
"... | [
"0.6403129",
"0.6067355",
"0.6041762",
"0.5910217",
"0.5852545",
"0.58518696",
"0.58172333",
"0.58155876",
"0.581163",
"0.58062834",
"0.57656866",
"0.57625073",
"0.57527924",
"0.574258",
"0.57111114",
"0.569774",
"0.567026",
"0.5609188",
"0.5608614",
"0.5607685",
"0.5605766",... | 0.632597 | 1 |
Closes the panel associated with this PanelMultiView. If the openPopup method was called but the panel has not been displayed yet, the operation is canceled and the panel will not be displayed, but the "popuphidden" event is fired synchronously anyways. This means that by the time this method returns all the operations... | hidePopup() {
if (!this.node || !this.connected) {
return;
}
// If we have already reached the _panel.openPopup call in the openPopup
// method, we can call hidePopup. Otherwise, we have to cancel the latest
// request to open the panel, which will have no effect if the request has
// bee... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"close() {\n this.panelNode.classList.remove(gShownCssClass);\n if (this.onClose !== undefined) {\n this.onClose();\n }\n }",
"close() {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._keyManager.withHorizontalOrientation(this._isRtl() ? ... | [
"0.63252616",
"0.6172578",
"0.60357106",
"0.60184026",
"0.60111034",
"0.6009507",
"0.5993632",
"0.59602416",
"0.5869261",
"0.58667177",
"0.58486617",
"0.5748752",
"0.57416487",
"0.5730405",
"0.5662579",
"0.564539",
"0.5623234",
"0.5607156",
"0.5605732",
"0.5584397",
"0.555662... | 0.7869734 | 0 |
Move any child subviews into the element defined by "viewCacheId" to make sure they will not be removed together with the element. | _moveOutKids() {
let viewCacheId = this.node.getAttribute("viewCacheId");
if (!viewCacheId) {
return;
}
// Node.children and Node.children is live to DOM changes like the
// ones we're about to do, so iterate over a static copy:
let subviews = Array.from(this._viewStack.children);
let... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"updateZIndexOfChildren(_viewId) {\n if (!this._updateZIndexOfChildrenBuffer.includes(_viewId)) {\n this._updateZIndexOfChildrenBuffer.push(_viewId);\n }\n else {\n const _isDefined = typeof _viewId !== 'undefined' && _viewId !== null;\n const _view = _isDefined && this.__views[_viewId];\n ... | [
"0.66173786",
"0.6149689",
"0.60985196",
"0.60139453",
"0.5995311",
"0.5966576",
"0.5966576",
"0.5944658",
"0.59080577",
"0.59040946",
"0.573574",
"0.56596226",
"0.5613522",
"0.5587932",
"0.549769",
"0.5441415",
"0.54314506",
"0.54186976",
"0.53593236",
"0.53557",
"0.53557",
... | 0.7957591 | 0 |
Opens the specified PanelView and dispatches the ViewShowing event, which can be used to populate the subview or cancel the operation. This also clears all the attributes and styles that may be left by a transition that was interrupted. | async _openView(panelView) {
if (panelView.node.parentNode != this._viewStack) {
this._viewStack.appendChild(panelView.node);
}
panelView.node.panelMultiView = this.node;
this.openViews.push(panelView);
let canceled = await panelView.dispatchAsyncEvent("ViewShowing");
// The panel can b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_activateView(panelView) {\n if (panelView.isOpenIn(this)) {\n panelView.active = true;\n if (panelView.focusWhenActive) {\n panelView.focusFirstNavigableElement(false, true);\n panelView.focusWhenActive = false;\n }\n panelView.dispatchCustomEvent(\"ViewShown\");\n\n // R... | [
"0.6525792",
"0.6151902",
"0.58750826",
"0.57892454",
"0.5757331",
"0.5608994",
"0.5569674",
"0.55258703",
"0.5501472",
"0.5461038",
"0.54247314",
"0.5416012",
"0.5395441",
"0.5362535",
"0.53372186",
"0.5322937",
"0.52986175",
"0.52986175",
"0.52922636",
"0.5253422",
"0.52470... | 0.69820917 | 0 |
Closes the most recent PanelView and raises the ViewHiding event. | _closeLatestView() {
let panelView = this.openViews.pop();
panelView.clearNavigation();
panelView.dispatchCustomEvent("ViewHiding");
panelView.node.panelMultiView = null;
// Views become invisible synchronously when they are closed, and they won't
// become visible again until they are opened. W... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"hidePanel() {\n // only emit event when it is currently visible\n if (this._$element.is(':visible')) {\n this._$element.hide();\n this.emit(this.EVENT_CLOSED, this);\n }\n }",
"hidePopup() {\n if (!this.node || !this.connected) {\n return;\n }\n\n // If we have already reached t... | [
"0.7288857",
"0.68699217",
"0.6719998",
"0.6650625",
"0.6623069",
"0.6572071",
"0.6536542",
"0.6503564",
"0.6413939",
"0.6398092",
"0.624187",
"0.62315273",
"0.62258977",
"0.6204316",
"0.6132734",
"0.6123869",
"0.60997546",
"0.6027552",
"0.6027552",
"0.60214156",
"0.6003625",... | 0.7722007 | 0 |
Closes all the views that are currently open. | closeAllViews() {
// Raise ViewHiding events for open views in reverse order.
while (this.openViews.length) {
this._closeLatestView();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async closeViews() {\r\n // Make this module has a view to open\r\n if (!this.getConfig().viewClass)\r\n return;\r\n // Make sure there is a location manager to close this module with\r\n if (!this.locationManager)\r\n return;\r\n // Get the location from th... | [
"0.7308504",
"0.7176035",
"0.7176035",
"0.7176035",
"0.6811023",
"0.6714399",
"0.6614833",
"0.65111387",
"0.64588344",
"0.6416045",
"0.63943404",
"0.6382521",
"0.638049",
"0.637885",
"0.6352486",
"0.6343736",
"0.62711006",
"0.6201925",
"0.6201925",
"0.6201925",
"0.6201925",
... | 0.82601726 | 0 |
Attempt to clean up the attributes and properties set by `_transitionViews` above. Which attributes and properties depends on the phase the transition was left from. | _cleanupTransitionPhase() {
if (!this._transitionDetails) {
return;
}
let { phase, resolve, listener, cancelListener } = this._transitionDetails;
this._transitionDetails = null;
if (phase >= TRANSITION_PHASES.START) {
this._panel.removeAttribute("width");
this._panel.removeAttrib... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clearStates(model, view) {\n view.group.traverse(function (el) {\n // Not applied on removed elements, it may still in fading.\n if (graphic[\"isElementRemoved\"](el)) {\n return;\n }\n\n var textContent = el.getTextContent();\n var textGuide = el.getTextGu... | [
"0.59170574",
"0.578565",
"0.5548714",
"0.549472",
"0.5490409",
"0.5452967",
"0.5452967",
"0.5452967",
"0.5452967",
"0.54286057",
"0.54089314",
"0.531708",
"0.531584",
"0.5285402",
"0.5272589",
"0.5272589",
"0.5272589",
"0.5263496",
"0.52205557",
"0.5194174",
"0.51721776",
... | 0.7311536 | 0 |
Indicates whether the view is open in the specified PanelMultiView object. | isOpenIn(panelMultiView) {
return this.node.panelMultiView == panelMultiView.node;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get isOpen() {\n return this._panel &&\n (this._panel.state == \"open\" || this._panel.state == \"showing\");\n }",
"isOpen() {\n return this.outerElement.classList.contains('open');\n }",
"overlayOpened() {\n for(var modal in state.openedModals) {\n if(state.openedMod... | [
"0.5970631",
"0.59382546",
"0.5900739",
"0.58330655",
"0.5778493",
"0.5742546",
"0.5738713",
"0.5737624",
"0.5731118",
"0.571402",
"0.57026994",
"0.56583357",
"0.5649014",
"0.56382173",
"0.55839515",
"0.5581444",
"0.5550636",
"0.54994094",
"0.54994094",
"0.54790664",
"0.54618... | 0.79418314 | 0 |
The "mainview" attribute is set before the panel is opened when this view is displayed as the main view, and is removed before the is displayed as a subview. The same view element can be displayed as a main view and as a subview at different times. | set mainview(value) {
if (value) {
this.node.setAttribute("mainview", true);
} else {
this.node.removeAttribute("mainview");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async _showMainView() {\n let nextPanelView = PanelView.forNode(\n this.document.getElementById(this.node.getAttribute(\"mainViewId\"))\n );\n\n // If the view is already open in another panel, close the panel first.\n let oldPanelMultiViewNode = nextPanelView.node.panelMultiView;\n if (oldPane... | [
"0.73641074",
"0.6461741",
"0.63002616",
"0.62255055",
"0.61683416",
"0.61683416",
"0.61526066",
"0.60366285",
"0.59971917",
"0.5904617",
"0.5895893",
"0.5882317",
"0.5876795",
"0.58608043",
"0.58499444",
"0.58080584",
"0.5696155",
"0.5672887",
"0.5668262",
"0.56055456",
"0.5... | 0.7525923 | 0 |
Constrains the width of this view using the "minwidth" and "maxwidth" styles. Setting this to zero removes the constraints. | set minMaxWidth(value) {
let style = this.node.style;
if (value) {
style.minWidth = style.maxWidth = value + "px";
} else {
style.removeProperty("min-width");
style.removeProperty("max-width");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set minimumWidth(value) { }",
"setMinWidth(valueNew){let t=e.ValueConverter.toNumber(valueNew);null===t&&(t=this.getAttributeDefaultValueInternal(\"MinWidth\")),t!==this.__minWidth&&(this.__minWidth=t,e.EventProvider.raise(this.__id+\".onPropertyChanged\",{propertyName:\"MinWidth\"}),this.__processMinWidth())}",... | [
"0.67317325",
"0.62391686",
"0.6020345",
"0.5966665",
"0.5888321",
"0.57651496",
"0.56732595",
"0.55710506",
"0.55540895",
"0.55473113",
"0.5497277",
"0.5489147",
"0.5459149",
"0.5427216",
"0.53826934",
"0.53726256",
"0.53667235",
"0.5314543",
"0.5311254",
"0.53098965",
"0.52... | 0.66281015 | 1 |
Populates the "knownWidth" and "knownHeight" properties with the current dimensions of the view. These may be zero if the view is invisible. These values are relevant during transitions and are retained for backwards navigation if the view is still open but is invisible. | captureKnownSize() {
let rect = this._getBoundsWithoutFlushing(this.node);
this.knownWidth = rect.width;
this.knownHeight = rect.height;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async getDimensions() {\n await this._stabilize();\n const { width, height } = await this.element().getSize();\n const { x: left, y: top } = await this.element().getLocation();\n return { width, height, left, top };\n }",
"function calculateAllDimensions(imageView) {\n\n //dimens... | [
"0.63469976",
"0.6065745",
"0.59736544",
"0.5864819",
"0.58633524",
"0.5849555",
"0.5786505",
"0.57611954",
"0.57456213",
"0.5653704",
"0.56290686",
"0.5578959",
"0.555978",
"0.55237496",
"0.5512424",
"0.5511625",
"0.5509385",
"0.55022615",
"0.5502207",
"0.54800063",
"0.54209... | 0.6917602 | 0 |
If the main view or a subview contains wrapping elements, the attribute "descriptionheightworkaround" should be set on the view to force all the wrapping "description", "label" or "toolbarbutton" elements to a fixed height. If the attribute is set and the visibility, contents, or width of any of these elements changes,... | async descriptionHeightWorkaround(allowSyncReflows = false) {
if (!this.node.hasAttribute("descriptionheightworkaround")) {
// This view does not require the workaround.
return;
}
// We batch DOM changes together in order to reduce synchronous layouts.
// First we reset any change we may ha... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"updateInnerHeightDependingOnChilds(){}",
"_adaptViewHeight() {\n let actualHeight = this._calcDisplayedItemsMaxHeight();\n this._viewLimiter.style.height = actualHeight + 'px';\n }",
"updateElementsHeight() {\n const me = this;\n me.rowManager.storeKnownHeight(me.id, me.height); // prevent unneces... | [
"0.63462013",
"0.6256762",
"0.6239149",
"0.61918074",
"0.6155195",
"0.6106435",
"0.60886925",
"0.5954004",
"0.5947198",
"0.58893394",
"0.5886823",
"0.5886012",
"0.58660305",
"0.5836384",
"0.5820829",
"0.5815084",
"0.58047086",
"0.58047086",
"0.58047086",
"0.58047086",
"0.5804... | 0.76819235 | 0 |
Determine whether an element can only be navigated to with tab/shift+tab, not the arrow keys. | _isNavigableWithTabOnly(element) {
let tag = element.localName;
return (
tag == "menulist" ||
tag == "input" ||
tag == "textarea" ||
// Allow tab to reach embedded documents in extension panels.
tag == "browser"
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkTab(e) {\n updateTabbableNodes();\n if (e.shiftKey && e.target === state.firstTabbableNode) {\n e.preventDefault();\n tryFocus(state.lastTabbableNode);\n return;\n }\n if (!e.shiftKey && e.target === state.lastTabbableNode) {\n e.preventDefault();\n tryFocus(state... | [
"0.723916",
"0.723916",
"0.723916",
"0.723916",
"0.723916",
"0.7194793",
"0.66491205",
"0.66372955",
"0.66372955",
"0.66372955",
"0.66076946",
"0.66076946",
"0.66076946",
"0.6599417",
"0.654824",
"0.6543095",
"0.65284055",
"0.65284055",
"0.65284055",
"0.648452",
"0.64825857",... | 0.7699462 | 0 |
Get a TreeWalker which finds elements navigable with tab/shift+tab. | get _tabNavigableWalker() {
if (!this.__tabNavigableWalker) {
this.__tabNavigableWalker = this._makeNavigableTreeWalker(false);
}
return this.__tabNavigableWalker;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"exec() {\n const shifted = event.shiftKey;\n let node = null;\n let firstItem = this.masterNav.elem.querySelector('a');\n let lastItem = this.masterNav.elem.firstElementChild.lastElementChild.querySelector('li:last-child');\n\n // If shift key is held.\n if (shifted) {\n node = this.getEleme... | [
"0.5748212",
"0.55828655",
"0.5431951",
"0.53898674",
"0.52782154",
"0.524794",
"0.524794",
"0.51352197",
"0.5113063",
"0.5113063",
"0.495196",
"0.49408507",
"0.49240077",
"0.49240077",
"0.49240077",
"0.4892826",
"0.48862922",
"0.4864105",
"0.48477438",
"0.48468366",
"0.48402... | 0.73200846 | 0 |
Get a TreeWalker which finds elements navigable with up/down arrow keys. | get _arrowNavigableWalker() {
if (!this.__arrowNavigableWalker) {
this.__arrowNavigableWalker = this._makeNavigableTreeWalker(true);
}
return this.__arrowNavigableWalker;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get _tabNavigableWalker() {\n if (!this.__tabNavigableWalker) {\n this.__tabNavigableWalker = this._makeNavigableTreeWalker(false);\n }\n return this.__tabNavigableWalker;\n }",
"getNextNavigable(event) {\n var keyCode;\n var next;\n\n keyCode = event.keyCode;\n if (event.type ... | [
"0.59438264",
"0.5814536",
"0.56772166",
"0.5246195",
"0.5224429",
"0.5210044",
"0.51711446",
"0.5158359",
"0.5158359",
"0.51473415",
"0.5133775",
"0.5133542",
"0.5130044",
"0.51175547",
"0.50799114",
"0.50765616",
"0.5074487",
"0.5042993",
"0.5042993",
"0.49813774",
"0.49797... | 0.66664195 | 0 |
Element that is currently selected with the keyboard, or null if no element is selected. Since the reference is held weakly, it can become null or undefined at any time. | get selectedElement() {
return this._selectedElement && this._selectedElement.get();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get _focusedElement() {\n let commandDispatcher = this._commandDispatcher;\n if (commandDispatcher) {\n return commandDispatcher.focusedElement;\n }\n return null;\n }",
"get selectedItem() {\n let selectedElement = this._widget.selectedItem;\n if (selectedElement) {\n return this._i... | [
"0.7160313",
"0.71268034",
"0.68693274",
"0.6850356",
"0.68275595",
"0.6695114",
"0.6691004",
"0.6677159",
"0.6650868",
"0.6650868",
"0.6650868",
"0.66469955",
"0.6640985",
"0.6640985",
"0.6640985",
"0.6640985",
"0.6640985",
"0.66361606",
"0.66361606",
"0.66361606",
"0.663616... | 0.76140624 | 0 |
Private members. Resets this command element's CSS to its original state. | function resetCss() {
if (element) {
element.className = Command.css.base + " " + definition.css;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"resetStyles () {\n\t\tthis.selection\n\t\t\t.attr('data-rel', '')\n\t\t\t.attr('data-hidden', '')\n\t}",
"reset(){\n this.cySyncher.resetStyle();\n }",
"reset() {\n Utils.deepCopyProperties(this, defaultStyle, defaultStyle);\n }",
"function resetOldStyles() {\n if (lastElem) {\n setSt... | [
"0.6886455",
"0.68423814",
"0.6813835",
"0.67640764",
"0.6422829",
"0.63587266",
"0.6316413",
"0.6314465",
"0.6273912",
"0.618121",
"0.61529034",
"0.61372286",
"0.61336505",
"0.6100597",
"0.6100597",
"0.6100597",
"0.6100597",
"0.6100597",
"0.6092149",
"0.60854596",
"0.6082112... | 0.8144977 | 0 |
Get the item prefix e.g. " 1. " for a numbered list, " " for a bulleted list. | function getItemPrefix() {
var prefix;
if(args.tag === "ol") {
prefix = " " + num + ". ";
num = num + 1;
} else {
prefix = " " + bullet + " ";
}
return prefix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPrefixedItem(itemText) {\n\t\t\t// The numbering flag is unset when called by autoindent.\n\t\t\tif(args.tag === undefined){\n\t\t\t\targs.tag = /^\\s*\\d/.test(itemText) ? \"ol\" : \"ul\";\n\t\t\t}\n\t\t\t\n\t\t\t// Renumber/bullet the list element.\n\t\t\titemText = itemText.replace(/^[ ]{0,3}([*+-]|... | [
"0.8188578",
"0.65995485",
"0.6372088",
"0.61974335",
"0.61429834",
"0.613386",
"0.61218196",
"0.605284",
"0.5937829",
"0.5877001",
"0.5870055",
"0.5862438",
"0.5859133",
"0.5772502",
"0.5742939",
"0.5714518",
"0.5670379",
"0.56656384",
"0.5661767",
"0.562356",
"0.562356",
... | 0.8547266 | 0 |
Fixes the prefixes of the other list items. | function getPrefixedItem(itemText) {
// The numbering flag is unset when called by autoindent.
if(args.tag === undefined){
args.tag = /^\s*\d/.test(itemText) ? "ol" : "ul";
}
// Renumber/bullet the list element.
itemText = itemText.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm, function( _ ) {
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function StripPrefixes(ids)\r\n{\r\n\tfor (var i = 0; i < ids.length; i++)\r\n\t{\r\n \tids[i] = StripPrefix(ids[i]);\r\n\t}\r\n}",
"function PrependItemsToList() {\n $(\"#olTestList3\").prepend($(\"<li></li>\").text(\"prepend() item\"));\n $(\"<li></li>\").text(\"prependTo() item\").prependTo(\"#olTest... | [
"0.59412134",
"0.5592687",
"0.55250865",
"0.5473359",
"0.53677577",
"0.53198695",
"0.52839386",
"0.5204996",
"0.5184862",
"0.5181993",
"0.5118772",
"0.51083684",
"0.51083684",
"0.51083684",
"0.51004696",
"0.50842476",
"0.5066428",
"0.5062524",
"0.5062524",
"0.5062524",
"0.504... | 0.6091056 | 0 |
This function is to try to parse a MethodDefinition as defined in 14.3. But in the case of object literals, it might be called at a position where there is in fact a short hand identifier pattern or a data property. This can only be determined after we consumed up to the left parentheses. In order to avoid back trackin... | function tryParseMethodDefinition(token, key, computed, node) {
var value, options, methodNode;
if (token.type === Token.Identifier) {
// check for `get` and `set`;
if (token.value === 'get' && lookaheadPropertyName()) {
computed = match('[');
ke... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function parseObjectMethod(isPattern, objectContextId) {\n // We don't need to worry about modifiers because object methods can't have optional bodies, so\n // the start will never be used.\n const functionStart = state.start;\n if (match(TokenType.parenL)) {\n if (isPattern) unexpected();\n parseMethod(... | [
"0.5579808",
"0.5551433",
"0.55040985",
"0.5497744",
"0.5497744",
"0.5497744",
"0.54861385",
"0.5462899",
"0.5197994",
"0.51391935",
"0.51198477",
"0.5053936",
"0.5044511",
"0.5007875",
"0.49495345",
"0.48550156",
"0.48155212",
"0.47796056",
"0.47741094",
"0.4751369",
"0.4702... | 0.5867563 | 0 |
Class representing a WebSockets Server | function WebSockets() {
if (!this.instance) {
logger.info('Initiating the Websockets Server...')
this.instance = io(server)
// to log every messages being transmitted => https://stackoverflow.com/a/9042249
var originalEmit = this.instance.sockets.emit
this.instance.sockets.emit = function() {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"constructor(wss) {\n this.websocketServer = wss;\n }",
"constructor(serverClass) {\n\t\tthis.ws = new WebSocket(\"ws://{{host}}/mySocket\")\n\t\tthis.ws.socket = this\n\t\tthis.serverClass = serverClass\n\t\tthis.ws.onmessage = function(event) {\n\t\t\tlet inData = JSON.parse(event.data)\n\t\t\tthis.so... | [
"0.7467801",
"0.69621414",
"0.6915793",
"0.68096083",
"0.67682",
"0.6761529",
"0.67441696",
"0.67215765",
"0.6681262",
"0.66573066",
"0.66454035",
"0.66442424",
"0.66106546",
"0.6594171",
"0.655888",
"0.6557705",
"0.6557335",
"0.6557007",
"0.65222365",
"0.6500151",
"0.6490727... | 0.7265622 | 1 |
node_walk: walk the element tree, stop when func(node) returns false | function node_walk(node, func) {
var result = func(node);
for (node = node.firstChild; result !== false && node; node = node.nextSibling)
result = node_walk(node, func);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function walk(node, callback)\n{\n\tvar childNode,i;\n\t\n\tif (callback(node) === false) return false;\n\t\n\tif (node.childNodes != null)\n\t{\n\t\ti = 0;\n\t\tchildNode = node.childNodes[i];\n\t}\n\t\n\twhile (childNode != null)\n\t{\n\t\tif (walk(childNode, callback) === false) return false;\n\t\t\n\t\tchildNo... | [
"0.73772234",
"0.68127984",
"0.67611516",
"0.6619737",
"0.65493894",
"0.6526276",
"0.6429182",
"0.6393583",
"0.6289187",
"0.6231244",
"0.61273605",
"0.61273605",
"0.61273605",
"0.61273605",
"0.6123332",
"0.6114705",
"0.6087296",
"0.60553133",
"0.60209286",
"0.5973503",
"0.595... | 0.7775583 | 0 |
if you don't have these, you can get portable implementations here: wrap a function with a backtrace printer parameters: func: the function to wrap receiver: the (optional) receiver to call func with returns: a new function to use in replace of the original function | function wrapWithBackTrace(func, receiver) {
// get the name of a function
function funcName(func) {
return func.name || "{anonymous}"
}
// generate the actual backtrace as an array of strings
function getBackTrace() {
var stack = []
var func = arguments.callee.caller.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wrappedOrigCall(orgFunc, newFunc) {\n return function() {\n var args = [].slice.call(arguments);\n try { orgFunc.apply(WinConsole, args); } catch (e) {}\n try { newFunc.apply(console, args); } catch (e) {}\n };\n}",
"function getOriginalFunction(func) {\n return func.__sen... | [
"0.63756144",
"0.623494",
"0.60997343",
"0.6076278",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
"0.6069311",
... | 0.80023843 | 0 |
get the name of a function | function funcName(func) {
return func.name || "{anonymous}"
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_function_name(f) {\r\n\tvar str = f.toString();\r\n var name = str.split ('(')[0];\r\n name = name.split (/[' '{1,}]/)[1];\r\n return(name);\r\n}",
"function funcname(f) {\n const s = f.toString().match(/function (\\w*)/)[1];\n if ((s === null) || (s.length === 0)){ return \"~anonymous~\"... | [
"0.83819497",
"0.8012998",
"0.8004632",
"0.79706603",
"0.7948966",
"0.7943293",
"0.78712726",
"0.7803872",
"0.77954966",
"0.77559566",
"0.76629835",
"0.7659356",
"0.7644656",
"0.76380265",
"0.76380265",
"0.76380265",
"0.76380265",
"0.76380265",
"0.7602398",
"0.75728047",
"0.7... | 0.8029488 | 1 |
generate the actual backtrace as an array of strings | function getBackTrace() {
var stack = []
var func = arguments.callee.caller.caller
// iterate through the stack
while (func) {
// check for recursion!
if (stack.indexOf(func) != -1) {
stack.push({name: "... recursion on " + funcName(func)})
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function correct_backtrace(backtrace) {\n var new_bt = [], m;\n\n for (var i = 0; i < backtrace.length; i++) {\n var loc = backtrace[i];\n if (!loc || !loc.$$is_string) {\n /* Do nothing */\n }\n /* Chromium format */\n else if ((m = loc.match(/^ at (.*?) \\... | [
"0.6499259",
"0.63439924",
"0.61687416",
"0.61359626",
"0.6105579",
"0.5985118",
"0.59266025",
"0.58550376",
"0.57748556",
"0.5743237",
"0.5739021",
"0.57163364",
"0.5566686",
"0.5566686",
"0.5566686",
"0.5566686",
"0.5566686",
"0.55465263",
"0.5518129",
"0.55014014",
"0.5456... | 0.650047 | 0 |
Invoke this via some means (ie: in proc http server listing for requests to show top devices) to display top devices (currently to console). | function showTopDevices(store) {
store.getTopDevices().forEach(device => {
device.getEvents().then(events => {
console.log(`Device ${device.deviceId}:`);
events.forEach(event => console.log(` ${event.timestamp} ${event.event}`));
});
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTopLinks(req, res) {\n var count = req.params.count || 10;\n if (count > 0) {\n urlShortener.Model.find({}, {totalHits: 1, url: 1}, {limit: count, sort: {totalHits: -1}}, function (err, results) {\n res.apiMessage(Status.OK, 'top links', results);\n })... | [
"0.5811875",
"0.56072277",
"0.5527546",
"0.5479432",
"0.5464929",
"0.545951",
"0.5430896",
"0.5421478",
"0.54189676",
"0.54111576",
"0.537275",
"0.535396",
"0.53521204",
"0.53285277",
"0.5270708",
"0.5268927",
"0.5264727",
"0.5264582",
"0.525734",
"0.5242249",
"0.523997",
"... | 0.7145742 | 0 |
Sets the playback rate to the nearest available rate YouTube player supports. | setPlaybackRate(actionId, playbackRate) {
const ctx = "setPlaybackRate";
const rate = playbackRate || this.options.rate;
if (rate) {
logger.debug(this.logCtx(actionId, ctx, `params playbackRate=${playbackRate}, this.options.rate=${this.options.rate}`));
const oldRate = th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setPlaybackRate(playbackRate, customData) {\n return Native.setPlaybackRate(playbackRate, customData);\n }",
"playbackRateLFO() {\n var curRate = this.player.playbackRate;\n \n if (this.playbackRateGoingDown) {\n this.player.playbackRate -= this.playbackRateIncrement;\n ... | [
"0.65806484",
"0.64001995",
"0.63252795",
"0.62555575",
"0.62523556",
"0.62382686",
"0.62382686",
"0.6023751",
"0.597411",
"0.5956321",
"0.59255284",
"0.57237357",
"0.56802696",
"0.5612792",
"0.55811167",
"0.5519438",
"0.5479733",
"0.54652464",
"0.546177",
"0.5409496",
"0.539... | 0.68020415 | 0 |
Check if the desired rate is in the list of allowed playback rates, if not, raise an exception | checkPlaybackRate(rate) {
if (!this.availablePlaybackRates) {
this.availablePlaybackRates = this.ytPlayer.getAvailablePlaybackRates();
}
if (!this.availablePlaybackRates.find((value, index, obj) => value === rate)) {
const msg = `Trying to set playback rate ${rate}. This ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"validateTargetCurrency() {\n let existRates = Object.keys(fx.rates);\n if (!existRates.includes(this.state.targetCurrency.code))\n {\n alert(\"Error: No rate conversion from \" + this.state.baseCurrency.name + \" to \" + this.state.targetCurrency.name);\n this.invalidOutp... | [
"0.64050037",
"0.6369974",
"0.63561314",
"0.6326948",
"0.6321199",
"0.619422",
"0.6063751",
"0.60187286",
"0.5658869",
"0.5618907",
"0.56036144",
"0.5603199",
"0.55626184",
"0.5511187",
"0.5511187",
"0.5454898",
"0.5396461",
"0.5349773",
"0.53477585",
"0.5310947",
"0.52932405... | 0.8141046 | 0 |
2. This code loads the IFrame Player API code asynchronously. Makes sure the API code is loaded once even when using multiple players on the same document | initIFrameAPI(actionId) {
const ctx = "initIFrameAPI";
if (!document.getElementById("youtube-iframe_api")) {
logger.debug(this.logCtx(actionId, ctx));
const tag = document.createElement("script");
return new Promise((resolve, reject) => {
//Create a SC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"loadIframeApi(){\n\t\tlet tag = document.createElement('script');4\n\t\ttag.src = \"https://www.youtube.com/iframe_api\";\n\t\tlet firstScriptTag = document.getElementsByTagName('script')[0];\n\t\tfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n\t}",
"function loadIFrame() {\n var tag = document... | [
"0.695202",
"0.6837354",
"0.6783574",
"0.6752691",
"0.6752691",
"0.6752691",
"0.66349995",
"0.6591473",
"0.6550232",
"0.65494",
"0.63905424",
"0.6360772",
"0.6360772",
"0.63189596",
"0.6313589",
"0.63128674",
"0.6296652",
"0.6282706",
"0.6272229",
"0.6260466",
"0.6254587",
... | 0.6863442 | 1 |
Pass in default handlers for various YouTube IFrame Player events if none supplied | injectDefaultHandlers(resolve, reject) {
if (!this.ytPlayerOptions.events) {
this.ytPlayerOptions.events = {};
}
// The API will call this function when the video player is ready.
const onPlayerReady = (event) => {
logger.debug(`onPlayerReady():> params state=${th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function onYouTubeIframeAPIReady() {\n for (var e = document.getElementsByTagName(\"iframe\"), x = e.length; x--;) {\n if (/youtube-nocookie.com\\/embed/.test(e[x].src)) {\n gtmYTListeners.push(new YT.Player(e[x],\n {\n events:\n {\n onError: onPlayerError,\... | [
"0.6879695",
"0.68398327",
"0.66895545",
"0.66895545",
"0.66895545",
"0.6554987",
"0.64861244",
"0.6451519",
"0.6442098",
"0.6436002",
"0.64099187",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481",
"0.6406481... | 0.69651073 | 0 |
One must call this to mark a stateChangeHandler resolved | stateChangeHandlerFulfilled(event, actionId) {
if (this.stateChangeHandlersReservations[event] === undefined ||
this.stateChangeHandlers[event] === undefined) {
let err = "";
if (this.stateChangeHandlersReservations[event] === undefined) {
err += `No promise r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Handler() {\n\t\t\t\tthis.state = 0;\n\t\t\t}",
"function Handler() {\n\t\t\tthis.state = 0;\n\t\t}",
"_stateChanged(_state) {\n throw new Error('_stateChanged() not implemented');\n }",
"function newState(state) {\n alert(\"This functionality is yet to be implemented!\");\n ... | [
"0.65258014",
"0.6496944",
"0.6478378",
"0.6444977",
"0.6333662",
"0.6207025",
"0.6201895",
"0.62015325",
"0.6127718",
"0.61256284",
"0.61066884",
"0.6105496",
"0.60937595",
"0.6089028",
"0.6073188",
"0.605768",
"0.6031267",
"0.6030843",
"0.5992674",
"0.59819955",
"0.5978201"... | 0.6592966 | 0 |
Starts a interval to update the current temp div every second. | function startCurrentTempInterval(){
setInterval(function(){
getCurrentTemp();
}, CURRENT_TEMP_TIMER);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"start() {\r\n this.update();\r\n setInterval(this.update.bind(this), 60000);\r\n }",
"function timeInterval() {\n interval = setInterval(displayTime, 1000);\n}",
"start() {\r\n this.update();\r\n setInterval(this.update.bind(this), 30000);\r\n }",
"function updateEveryMinute() {\n var interva... | [
"0.6694952",
"0.6679717",
"0.66689086",
"0.6641202",
"0.6617439",
"0.6596822",
"0.6559783",
"0.6553258",
"0.65134287",
"0.6500891",
"0.64959717",
"0.647977",
"0.6408074",
"0.6406005",
"0.6404864",
"0.63958997",
"0.6376769",
"0.6356731",
"0.6352217",
"0.63479817",
"0.6347934",... | 0.7253123 | 0 |
Get a temp interval from the the API with a getJSON call | function getTemperatureInterval(){
$.getJSON("api/getTempInterval", function(tempJson){
updateGraph(tempJson);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"loadTemp() {\n\t\tthis.loadMaxCurrentMinTemp();\n\t\tapiCall('iot/api/temp/hour')\n\t\t\t.then((response) => {\n\t\t\t\tthis.tempData = response;\n\t\t\t\tthis.drawChartTemp();\n\t\t\t});\n\t\twindow.clearInterval(this.interval);\n\t\tthis.interval = window.setInterval(this.loadMaxCurrentMinTemp.bind(this), 1000);... | [
"0.69856846",
"0.69182646",
"0.6636195",
"0.64783365",
"0.6328907",
"0.63019764",
"0.61245644",
"0.61175424",
"0.6082064",
"0.6079461",
"0.60081685",
"0.59575915",
"0.59437525",
"0.59291995",
"0.59098274",
"0.5890743",
"0.5864493",
"0.58414924",
"0.5834172",
"0.5831488",
"0.5... | 0.76073265 | 0 |
Get the temp from the the API with a getJSON call | function getTemperature(){
$.getJSON("api/getTemp", function(tempJson){
updateGraph(tempJson);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCurrentTemp(){\n\n $.getJSON(\"api/getCurrentTemp\", function(tempJson){\n updateCurrentTemp(tempJson[0].temperature);\n });\n\n}",
"async function getData (url) {\n const data = await fetch(url);\n try{\n const fData = await data.json();\n // temp = fData.main.temp;\... | [
"0.76617146",
"0.7066756",
"0.6949617",
"0.6901263",
"0.68283206",
"0.6820725",
"0.6801059",
"0.6761794",
"0.66696537",
"0.66578716",
"0.665553",
"0.66504776",
"0.66234034",
"0.6559038",
"0.6558626",
"0.65459144",
"0.6529288",
"0.652413",
"0.65235895",
"0.6519731",
"0.6517244... | 0.7074743 | 1 |
Get the current temp from the the API with a getJSON call | function getCurrentTemp(){
$.getJSON("api/getCurrentTemp", function(tempJson){
updateCurrentTemp(tempJson[0].temperature);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getWeather (param){\n $.ajax({\n url: 'https://api.apixu.com/v1/forecast.json?key=7cca46df45774803b2d211925162902&q='+param,\n method: \"GET\",\n success: function(data){\n console.log(data);\n var currentTemp = data.current.temp_f;\n\n console.log(currentTemp);\n\n // $(\"#wea... | [
"0.71651155",
"0.7123062",
"0.70900786",
"0.6904354",
"0.6845561",
"0.6808867",
"0.67744243",
"0.6771095",
"0.6754958",
"0.66785455",
"0.66460574",
"0.65141326",
"0.6507793",
"0.649142",
"0.64909136",
"0.64895844",
"0.64776605",
"0.64765626",
"0.64685965",
"0.64512694",
"0.64... | 0.8046083 | 0 |
parse cookie header string | parseHeaderString( rc ) {
var self = this,
cookies = {},
parts = null;
if( rc == undefined ) return null;
rc && rc.split( ';' ).forEach( ( cookie ) => {
parts = cookie.split( '=' );
var key = parts.shift().replace( /([.*+?^=!:${}()|[\]\/\\])/g , '\\$1' ),
cookieRegex = new RegExp( '(?:^|;)\\s?' ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"parseHeaderCookies() {\n this.headers = this.request.headers;\n if (this.headers.cookie) {\n this.cookies = Parser.parseQueryStringParams(\n this.headers.cookie.replace(/\\; ?/g, '&')\n );\n }\n }",
"function parseCookie(req) {\n var c = null;\n\n ... | [
"0.72835386",
"0.70908386",
"0.7081746",
"0.69142705",
"0.6882721",
"0.6882721",
"0.6757128",
"0.6757128",
"0.6751835",
"0.671691",
"0.6687472",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
"0.6637429",
... | 0.787128 | 0 |
CONCATENATED MODULE: ./src/Buttons/Buttons.svelte / src\Buttons\Buttons.svelte generated by Svelte v3.38.3 | function Buttons_svelte_create_fragment(ctx) {
let div;
let button0;
let t0;
let t1;
let button1;
let t2;
let button1_disabled_value;
let mounted;
let dispose;
return {
c() {
div = (0,internal/* element */.bG)("div");
button0 = (0,internal/* element */.bG)("button");
t0 = (0,internal/* text */.fL)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addStageButton() { \n return require('./templates/stage-button.hbs')();\n}",
"function x_out_index_svelte_create_fragment(ctx) {\n var button;\n return {\n c: function c() {\n button = internal_element(\"button\");\n this.h();\n },\n l: function l(nodes) {\n button = claim_... | [
"0.5767497",
"0.5630807",
"0.56245035",
"0.5575861",
"0.554816",
"0.54756653",
"0.5398852",
"0.5317275",
"0.53101075",
"0.5297646",
"0.5261657",
"0.52304256",
"0.5218641",
"0.5213124",
"0.5207118",
"0.5206685",
"0.52066004",
"0.5193198",
"0.5178571",
"0.51744163",
"0.51744163... | 0.6151949 | 0 |
CONCATENATED MODULE: ./src/Overlay/Overlay.svelte / src\Overlay\Overlay.svelte generated by Svelte v3.38.3 | function Overlay_svelte_add_css() {
var style = (0,internal/* element */.bG)("style");
style.id = "svelte-vv1x9t-style";
style.textContent = ".overlay{position:absolute;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;background:rgba(0, 0, 0, 0.5);z-index:999}.overl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function About_svelte_create_fragment(ctx) {\n\tlet p0;\n\tlet p1;\n\tlet t3;\n\tlet p2;\n\tlet p3;\n\tlet t12;\n\tlet p4;\n\n\treturn {\n\t\tc() {\n\t\t\tp0 = (0,internal/* element */.bG)(\"p\");\n\n\t\t\tp0.innerHTML = `Thank you for using this open source solution for diy pedals. <br/>\r\n This is not to be ... | [
"0.5833505",
"0.5727073",
"0.5688654",
"0.53876334",
"0.5385896",
"0.5311529",
"0.523003",
"0.5211418",
"0.51901275",
"0.51800513",
"0.51773614",
"0.5169899",
"0.50692976",
"0.50634176",
"0.5054268",
"0.50137854",
"0.49907365",
"0.49875364",
"0.49613422",
"0.4955826",
"0.4951... | 0.6086132 | 0 |
CONCATENATED MODULE: ./src/Pedals/Components/VerticalProgress/VerticalProgress.svelte / src\Pedals\Components\VerticalProgress\VerticalProgress.svelte generated by Svelte v3.38.3 | function VerticalProgress_svelte_add_css() {
var style = (0,internal/* element */.bG)("style");
style.id = "svelte-1ayzqt2-style";
style.textContent = ".progress-bar.svelte-1ayzqt2{--height:300px;background-color:#f5f5f5;border-radius:3px;box-shadow:none;position:relative;width:20px;display:inline-block;margin-right... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function About_svelte_create_fragment(ctx) {\n\tlet p0;\n\tlet p1;\n\tlet t3;\n\tlet p2;\n\tlet p3;\n\tlet t12;\n\tlet p4;\n\n\treturn {\n\t\tc() {\n\t\t\tp0 = (0,internal/* element */.bG)(\"p\");\n\n\t\t\tp0.innerHTML = `Thank you for using this open source solution for diy pedals. <br/>\r\n This is not to be ... | [
"0.59789056",
"0.5652696",
"0.5495059",
"0.5306425",
"0.5299567",
"0.523656",
"0.5156178",
"0.51043755",
"0.5078172",
"0.502615",
"0.501726",
"0.4985219",
"0.49729744",
"0.4960632",
"0.49482515",
"0.49295405",
"0.49076656",
"0.49072844",
"0.4902451",
"0.4862546",
"0.48335052"... | 0.56786704 | 1 |
CONCATENATED MODULE: ./src/Pedals/Components/Pedalmap/Pedalmap_clutch.svelte / src\Pedals\Components\Pedalmap\Pedalmap_clutch.svelte generated by Svelte v3.38.3 | function Pedalmap_clutch_svelte_create_fragment(ctx) {
let div12;
let div10;
let div0;
let t1;
let div9;
let div1;
let label0;
let t3;
let input0;
let input0_value_value;
let t4;
let div2;
let label1;
let t6;
let input1;
let input1_value_value;
let t7;
let div3;
let label2;
let t9;
let input2;
let... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Maps_svelte_create_fragment(ctx) {\n\tlet div;\n\tlet pre0;\n\tlet t0_value = JSON.stringify(/*$pedalMap*/ ctx[0]) + \"\";\n\tlet t0;\n\tlet t1;\n\tlet pre1;\n\tlet t2_value = JSON.stringify(/*$pedalMapSerial*/ ctx[1]) + \"\";\n\tlet t2;\n\tlet t3;\n\tlet pre2;\n\tlet t4_value = JSON.stringify(/*$calibrat... | [
"0.6204796",
"0.60347825",
"0.56407475",
"0.5396206",
"0.5394509",
"0.5265988",
"0.52636945",
"0.50921696",
"0.5074651",
"0.50324655",
"0.49859345",
"0.49626935",
"0.49248776",
"0.49120054",
"0.4909808",
"0.49033678",
"0.4882672",
"0.48790535",
"0.48598814",
"0.48501113",
"0.... | 0.6116907 | 1 |
CONCATENATED MODULE: ./src/Pedals/Components/Pedalmap/Pedalmap_brake.svelte / src\Pedals\Components\Pedalmap\Pedalmap_brake.svelte generated by Svelte v3.38.3 | function Pedalmap_brake_svelte_create_fragment(ctx) {
let div12;
let div10;
let div0;
let t1;
let div9;
let div1;
let label0;
let t3;
let input0;
let input0_value_value;
let t4;
let div2;
let label1;
let t6;
let input1;
let input1_value_value;
let t7;
let div3;
let label2;
let t9;
let input2;
let ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Maps_svelte_create_fragment(ctx) {\n\tlet div;\n\tlet pre0;\n\tlet t0_value = JSON.stringify(/*$pedalMap*/ ctx[0]) + \"\";\n\tlet t0;\n\tlet t1;\n\tlet pre1;\n\tlet t2_value = JSON.stringify(/*$pedalMapSerial*/ ctx[1]) + \"\";\n\tlet t2;\n\tlet t3;\n\tlet pre2;\n\tlet t4_value = JSON.stringify(/*$calibrat... | [
"0.6262687",
"0.6206888",
"0.5801554",
"0.53317845",
"0.5322019",
"0.5201686",
"0.5101376",
"0.50894713",
"0.5050636",
"0.4926616",
"0.4914251",
"0.48996302",
"0.48286378",
"0.48177788",
"0.48057947",
"0.47948617",
"0.47641024",
"0.4760223",
"0.47431436",
"0.473878",
"0.47376... | 0.63316053 | 0 |
CONCATENATED MODULE: ./src/Pedals/Components/Pedalmap/Pedalmap_throttle.svelte / src\Pedals\Components\Pedalmap\Pedalmap_throttle.svelte generated by Svelte v3.38.3 | function Pedalmap_throttle_svelte_create_fragment(ctx) {
let div12;
let div10;
let div0;
let t1;
let div9;
let div1;
let label0;
let t3;
let input0;
let input0_value_value;
let t4;
let div2;
let label1;
let t6;
let input1;
let input1_value_value;
let t7;
let div3;
let label2;
let t9;
let input2;
l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Pedals_svelte_create_fragment(ctx) {\n\tlet div0;\n\tlet pedalmap_clutch;\n\tlet t0;\n\tlet pedalmap_brake;\n\tlet t1;\n\tlet pedalmap_throttle;\n\tlet t2;\n\tlet div1;\n\tlet timeline;\n\tlet t3;\n\tlet div2;\n\tlet savetoarduino;\n\tlet t4;\n\tlet button;\n\tlet current;\n\tlet mounted;\n\tlet dispose;\... | [
"0.54481727",
"0.54366",
"0.5359467",
"0.5099664",
"0.50633353",
"0.50352955",
"0.49667302",
"0.49560004",
"0.48971707",
"0.486472",
"0.48434833",
"0.4805806",
"0.46578124",
"0.4619754",
"0.45983377",
"0.45773524",
"0.4553694",
"0.45387134",
"0.45364222",
"0.44853085",
"0.448... | 0.6424638 | 0 |
CONCATENATED MODULE: ./src/Buttons/SaveToArduino.svelte / src\Buttons\SaveToArduino.svelte generated by Svelte v3.38.3 | function SaveToArduino_svelte_create_fragment(ctx) {
let button;
let t;
let button_disabled_value;
let mounted;
let dispose;
return {
c() {
button = (0,internal/* element */.bG)("button");
t = (0,internal/* text */.fL)("save to arduino");
button.disabled = button_disabled_value = !/*$connected*/ ctx[0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function About_svelte_create_fragment(ctx) {\n\tlet p0;\n\tlet p1;\n\tlet t3;\n\tlet p2;\n\tlet p3;\n\tlet t12;\n\tlet p4;\n\n\treturn {\n\t\tc() {\n\t\t\tp0 = (0,internal/* element */.bG)(\"p\");\n\n\t\t\tp0.innerHTML = `Thank you for using this open source solution for diy pedals. <br/>\r\n This is not to be ... | [
"0.5750014",
"0.5496297",
"0.54320544",
"0.53953546",
"0.5147478",
"0.51432025",
"0.50964135",
"0.50394434",
"0.50177586",
"0.5015549",
"0.5004622",
"0.49964413",
"0.49743196",
"0.49536616",
"0.49382326",
"0.49175292",
"0.4901928",
"0.48769802",
"0.48603272",
"0.48217416",
"0... | 0.6995076 | 0 |
CONCATENATED MODULE: ./src/Calibration/Components/D3BulletGraph/D3BulletGraph_throttle_raw.svelte / src\Calibration\Components\D3BulletGraph\D3BulletGraph_throttle_raw.svelte generated by Svelte v3.38.3 | function D3BulletGraph_throttle_raw_svelte_add_css() {
var style = (0,internal/* element */.bG)("style");
style.id = "svelte-k336j4-style";
style.textContent = ".svelte-k336j4 .bullet .marker{stroke:#000;stroke-width:2px}.svelte-k336j4 .bullet .tick line{stroke:#666;stroke-width:0.5px}.svelte-k336j4 .bullet .measure... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Pedalmap_throttle_svelte_create_fragment(ctx) {\n\tlet div12;\n\tlet div10;\n\tlet div0;\n\tlet t1;\n\tlet div9;\n\tlet div1;\n\tlet label0;\n\tlet t3;\n\tlet input0;\n\tlet input0_value_value;\n\tlet t4;\n\tlet div2;\n\tlet label1;\n\tlet t6;\n\tlet input1;\n\tlet input1_value_value;\n\tlet t7;\n\tlet di... | [
"0.5544245",
"0.49339822",
"0.4933024",
"0.48273477",
"0.48086256",
"0.47456867",
"0.4709904",
"0.46369132",
"0.46150947",
"0.45090938",
"0.44909585",
"0.4489746",
"0.44795948",
"0.44778427",
"0.44762817",
"0.44555843",
"0.4397977",
"0.43889415",
"0.436488",
"0.4364539",
"0.4... | 0.50888973 | 1 |
CONCATENATED MODULE: ./src/Calibration/Components/Calibration/CalibrationOverlay.svelte / src\Calibration\Components\Calibration\CalibrationOverlay.svelte generated by Svelte v3.38.3 | function CalibrationOverlay_svelte_add_css() {
var style = (0,internal/* element */.bG)("style");
style.id = "svelte-fik9az-style";
style.textContent = ".calibrationoverlay{position:absolute;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;background:rgba(0, 0, 0, 0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Pedals_svelte_create_fragment(ctx) {\n\tlet div0;\n\tlet pedalmap_clutch;\n\tlet t0;\n\tlet pedalmap_brake;\n\tlet t1;\n\tlet pedalmap_throttle;\n\tlet t2;\n\tlet div1;\n\tlet timeline;\n\tlet t3;\n\tlet div2;\n\tlet savetoarduino;\n\tlet t4;\n\tlet button;\n\tlet current;\n\tlet mounted;\n\tlet dispose;\... | [
"0.5671633",
"0.5659877",
"0.5596757",
"0.5502616",
"0.5275264",
"0.5273254",
"0.52447754",
"0.5240714",
"0.5201411",
"0.51958233",
"0.5117781",
"0.5080979",
"0.5061554",
"0.50580394",
"0.5043562",
"0.50243163",
"0.50180024",
"0.49829516",
"0.496356",
"0.4960914",
"0.48806173... | 0.57526433 | 0 |
CONCATENATED MODULE: ./src/Calibration/Components/Calibration/Calibration_brake.svelte / src\Calibration\Components\Calibration\Calibration_brake.svelte generated by Svelte v3.38.3 | function Calibration_brake_svelte_create_default_slot(ctx) {
let p0;
let t1;
let p1;
let t3;
let p2;
let t5;
let div;
let button;
let t7;
let p3;
let span0;
let t8;
let strong0;
let t9_value = /*calibrationMapNumbers*/ ctx[1][0] + "";
let t9;
let t10;
let span1;
let t12;
let span2;
let t13;
let str... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Pedalmap_brake_svelte_create_fragment(ctx) {\n\tlet div12;\n\tlet div10;\n\tlet div0;\n\tlet t1;\n\tlet div9;\n\tlet div1;\n\tlet label0;\n\tlet t3;\n\tlet input0;\n\tlet input0_value_value;\n\tlet t4;\n\tlet div2;\n\tlet label1;\n\tlet t6;\n\tlet input1;\n\tlet input1_value_value;\n\tlet t7;\n\tlet div3;... | [
"0.55924976",
"0.55150366",
"0.5441407",
"0.54194444",
"0.5322396",
"0.5266039",
"0.5200263",
"0.51946414",
"0.5071624",
"0.5043001",
"0.4949693",
"0.4940965",
"0.49150994",
"0.4909389",
"0.48971996",
"0.4873104",
"0.48550233",
"0.48407173",
"0.4826041",
"0.48235396",
"0.4819... | 0.6066185 | 0 |
CONCATENATED MODULE: ./src/Calibration/Components/Calibration/Calibration_throttle.svelte / src\Calibration\Components\Calibration\Calibration_throttle.svelte generated by Svelte v3.38.3 | function Calibration_throttle_svelte_create_default_slot(ctx) {
let p0;
let t1;
let p1;
let t3;
let p2;
let t5;
let div;
let button;
let t7;
let p3;
let span0;
let t8;
let strong0;
let t9_value = /*calibrationMapNumbers*/ ctx[1][0] + "";
let t9;
let t10;
let span1;
let t12;
let span2;
let t13;
let ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Pedalmap_throttle_svelte_create_fragment(ctx) {\n\tlet div12;\n\tlet div10;\n\tlet div0;\n\tlet t1;\n\tlet div9;\n\tlet div1;\n\tlet label0;\n\tlet t3;\n\tlet input0;\n\tlet input0_value_value;\n\tlet t4;\n\tlet div2;\n\tlet label1;\n\tlet t6;\n\tlet input1;\n\tlet input1_value_value;\n\tlet t7;\n\tlet di... | [
"0.56952196",
"0.5230014",
"0.51120514",
"0.50959903",
"0.50951755",
"0.5045003",
"0.49305072",
"0.4923931",
"0.4917585",
"0.4884065",
"0.483368",
"0.4824567",
"0.47771287",
"0.4772936",
"0.47674176",
"0.47652128",
"0.47642177",
"0.4760281",
"0.4737293",
"0.47371632",
"0.4736... | 0.6110736 | 0 |
CONCATENATED MODULE: ./src/Logging/Components/Maps/Maps.svelte / src\Logging\Components\Maps\Maps.svelte generated by Svelte v3.38.3 | function Maps_svelte_create_fragment(ctx) {
let div;
let pre0;
let t0_value = JSON.stringify(/*$pedalMap*/ ctx[0]) + "";
let t0;
let t1;
let pre1;
let t2_value = JSON.stringify(/*$pedalMapSerial*/ ctx[1]) + "";
let t2;
let t3;
let pre2;
let t4_value = JSON.stringify(/*$calibrationMap*/ ctx[2]) + "";
let t4;... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function adjustImports(source) {\n return source.replace('from \"svelte/internal\";', 'from \"svelte/internal/index.mjs\";')\n}",
"function Pedals_svelte_create_fragment(ctx) {\n\tlet div0;\n\tlet pedalmap_clutch;\n\tlet t0;\n\tlet pedalmap_brake;\n\tlet t1;\n\tlet pedalmap_throttle;\n\tlet t2;\n\tlet div1;\n\t... | [
"0.55007505",
"0.5340508",
"0.52805305",
"0.5198324",
"0.51864636",
"0.51536113",
"0.51260614",
"0.5051547",
"0.505027",
"0.50263613",
"0.49930024",
"0.49824739",
"0.49823186",
"0.49312636",
"0.4930384",
"0.49240264",
"0.49107742",
"0.49050963",
"0.4901681",
"0.48845136",
"0.... | 0.64024734 | 0 |
CONCATENATED MODULE: ./src/Logging/Logging.svelte / src\Logging\Logging.svelte generated by Svelte v3.38.3 | function Logging_svelte_create_fragment(ctx) {
let h1;
let t1;
let logger;
let t2;
let maps;
let current;
logger = new Logger_svelte({});
maps = new Maps_svelte({});
return {
c() {
h1 = (0,internal/* element */.bG)("h1");
h1.textContent = "Logging";
t1 = (0,internal/* space */.Dh)();
(0,internal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"log() {\n return; // no output for initial application build\n }",
"function LogwranglerModule(){}",
"function App() {\n\n // useUpdatedConsoleLog(name)\n\n return (\n <>\n {/* <UseLocalStorageComp /> */}\n {/* < UseToggleComp /> */}\n {/* < UpdatedEffectComp /> */}\n <UseArray... | [
"0.5757209",
"0.5623489",
"0.54140306",
"0.5288973",
"0.52828914",
"0.5238831",
"0.5228841",
"0.5165444",
"0.51516914",
"0.5112965",
"0.50899726",
"0.50731975",
"0.5028423",
"0.50221324",
"0.5015116",
"0.5003241",
"0.4985871",
"0.49595177",
"0.4937624",
"0.49300942",
"0.49076... | 0.61132735 | 0 |
CONCATENATED MODULE: ./src/About/About.svelte / src\About\About.svelte generated by Svelte v3.38.3 | function About_svelte_create_fragment(ctx) {
let p0;
let p1;
let t3;
let p2;
let p3;
let t12;
let p4;
return {
c() {
p0 = (0,internal/* element */.bG)("p");
p0.innerHTML = `Thank you for using this open source solution for diy pedals. <br/>
This is not to be sold its open and free for everyone to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function New({firstName} ) {\n return <p>Hello from another component {firstName}<br/>\n <h1>check this out</h1>\n <img src='../public/rose.jpeg' alt='pic' title='anms pic' />\n <ol>\n <li>new.js</li>\n <li>first try</li>\n <li> second try </li>\n </ol> </p>\n}",
"component() {\n ret... | [
"0.5882875",
"0.5773106",
"0.5668018",
"0.5561083",
"0.5472932",
"0.5437043",
"0.5373384",
"0.53685653",
"0.53037655",
"0.53037655",
"0.52533966",
"0.52523047",
"0.52445424",
"0.5230459",
"0.5217875",
"0.5214929",
"0.51864064",
"0.5130989",
"0.51206183",
"0.5113313",
"0.51084... | 0.6151499 | 0 |
Delete expense or revenue from list Item deletion has no validation, so I could just use deleteItem in ledger I chose to leave this function in case a future developer needs to add additional applicationspecific behavior Arguments: ledger: the ledger object that owns the line item index: The index of the item to delete... | handleDeleteItem(ledger, index) {
ledger.deleteItem(index);
this.forceUpdate(); //Since we don't set any state for this, the page doesn't otherwise refresh after deletion
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleDelete(key){\n let quantity = tableItems[currentTableId - 1].itemsOrdered[key];\n delete tableItems[currentTableId - 1].itemsOrdered[key];\n // now update total bill\n let amountToBeDeducted = parseFloat(menuItems[key - 1].cost) * quantity;\n tableItems[currentTableId - 1].totalBill -= amo... | [
"0.6169313",
"0.6162667",
"0.6162667",
"0.6141359",
"0.60551244",
"0.60462105",
"0.60280484",
"0.5979531",
"0.5964565",
"0.5921563",
"0.5869823",
"0.58078134",
"0.5750664",
"0.57445705",
"0.5736508",
"0.57216626",
"0.5720857",
"0.5703911",
"0.56990486",
"0.5695477",
"0.569237... | 0.71425945 | 0 |
pull random Question out of Array and identify correct answer | function getQuestion() {
indexFinder = Math.floor(Math.random() * questionArray.length);
question.innerText = "";
question.innerText = questionArray[indexFinder].q;
currentCorrectAnswer = questionArray[indexFinder].correct;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setQuestion(array) {\n var i = random(0, array.length - 1);\n var q = array[i];\n return q;\n}",
"function setQuestion(array) {\n var i = random(0, array.length - 1);\n var q = array[i];\n return q;\n}",
"function randomQuestion(){\n return questionOrder[i];\n}",
"function g... | [
"0.76294935",
"0.76294935",
"0.7585377",
"0.7577649",
"0.7566882",
"0.7471597",
"0.7367477",
"0.7348995",
"0.73481774",
"0.73198736",
"0.7316312",
"0.729577",
"0.7267841",
"0.72426146",
"0.7239146",
"0.7224595",
"0.7216216",
"0.71989036",
"0.7192857",
"0.71802026",
"0.7146318... | 0.79112047 | 0 |
Splash graphic for correct/incorrect answers | function correctAnswerSplash(){
var splashText = document.querySelector("#footer")
splashText.innerText = "CORRECT!";
splashText.style.color = "#009c15";
splashText.style.borderTop = "thick double #009c15";
splashText.style.borderBottom = "thick double #009c15";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadingScreen() {\n $('.answers > div').html(\"\");\n if (answered[count - 1] == answers[count - 1]) {\n $('#question').html(\"<h3>You answered correctly!!!</h3>\");\n correct++;\n } else {\n $('#question').html(\"<h3>You answered incorrectly</h3>\");\n wrong++;\n }... | [
"0.6435581",
"0.64189667",
"0.6349424",
"0.6332423",
"0.6297335",
"0.62712985",
"0.6254459",
"0.61490494",
"0.61468923",
"0.612382",
"0.61216974",
"0.60940385",
"0.6080714",
"0.60657287",
"0.6063545",
"0.6062883",
"0.6044347",
"0.6030183",
"0.6014939",
"0.6005984",
"0.6005392... | 0.6519834 | 0 |
get sum from the multiples of 2 from the fibonnaci array | function getMultipleOf2Sum(_fibonacciArray) {
var sum = 0;
for (var i = 0; i < _fibonacciArray.length; i++) {
if (_fibonacciArray[i] % 2 == 0) {
sum += _fibonacciArray[i];
}
}
return sum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function fiboEvenSum(n) {\n\n let arr=[1,2]; \n let sum=2;\n \n if(n<=1){\n return 0;\n }\n\n//crear array con la secuencia fibonacii\n for(let i = 2; i<n;i++){\n arr.push(arr[i-1]+arr[i-2])\n\n//sumar pares\n if(arr[i]%2 == 0){\n sum += arr[i];\n }\n }\n\n return sum;\n}",
"function sumF... | [
"0.7723963",
"0.76849437",
"0.7558194",
"0.754531",
"0.7452",
"0.7447989",
"0.74215996",
"0.7333915",
"0.7321751",
"0.72645706",
"0.72581184",
"0.72242767",
"0.7151007",
"0.7145417",
"0.7142736",
"0.71408325",
"0.71291053",
"0.7113681",
"0.7095465",
"0.70462924",
"0.7046057",... | 0.826918 | 0 |
wins 6 games and the other one wins less than 5, or, if both players win at least 5 games, until one of the players wins 7 games. Determine if it is possible for a tennis set to be finished with the score score1 : score2 INPUTS: 0 <= score1, score2 <= 10 OUTPUT: Boolean | function tennisSet(score1, score2) {
// Step1: Is one of the scores bigger than 6
// and the other less than 5?
if(score1 === 6 && score2 < 5){
return true
}
if(score2 === 6 && score1 < 5){
return true
}
// Step2: Are both equal to or greater than 5
// and one equal to 7?
if(score1 >= 5 && score1 < 7 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function tennisSet(score1, score2) {\n\n if (score1 < 5 && score2 < 5) {\n return false\n }\n\n\n if ((score1 - score2 <= 3 || score2 - score1 <= 3) &&(score1 - score2 > 0 || score2 - score1 > 0)&& (score1 >= 5 && score2 >= 5)) {\n console.log(\"RETRY here\")\n return true\n }\n ... | [
"0.7238804",
"0.72251964",
"0.69314736",
"0.6847213",
"0.68393904",
"0.6793726",
"0.67306596",
"0.6729162",
"0.6675069",
"0.66064334",
"0.6571925",
"0.6486616",
"0.64837646",
"0.6470178",
"0.6460645",
"0.64533454",
"0.6435774",
"0.64231366",
"0.64197195",
"0.6411665",
"0.6379... | 0.7232225 | 1 |
Print vertices and triangles to console for debugging | printBuffers()
{
for(var i=0;i<this.numVertices;i++)
{
console.log("v ", this.vBuffer[i*3], " ",
this.vBuffer[i*3 + 1], " ",
this.vBuffer[i*3 + 2], " ");
}
for(var i=0;i<this.num... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"printBuffers() {\r\n for (var i = 0; i < this.numVertices; i++) {\r\n console.log(\"v \", this.positionData[i*3], \" \", \r\n this.positionData[i*3 + 1], \" \",\r\n this.positionData[i*3 + 2], \" \");\r\n }\r\n for (var i = 0... | [
"0.6956749",
"0.6954213",
"0.69474703",
"0.69405854",
"0.6755131",
"0.66209877",
"0.65819275",
"0.6489815",
"0.6485912",
"0.64700043",
"0.645383",
"0.645383",
"0.6434013",
"0.634614",
"0.63102096",
"0.6249834",
"0.61406785",
"0.60573655",
"0.59881556",
"0.5965125",
"0.5958333... | 0.69881743 | 1 |
When command is selected, open the targets panel | select() {
this.battle.commander.current.action = new Action(this.model, this.character);
this.battle.commander.current.select(new TargetsCommandsPanel(this.model, this.character));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"select() {\n this.character.battle.commander.current.action.targets = this.model;\n this.character.battle.actions.push(this.character.battle.commander.current.action);\n this.character.battle.commander.close();\n }",
"function select () {\r\n\t\t\t\tthis.tool.select();\r\n\t\t\t}",
"fun... | [
"0.6525909",
"0.62196445",
"0.61250454",
"0.6062417",
"0.57717395",
"0.576507",
"0.57393265",
"0.5667314",
"0.5636494",
"0.5621706",
"0.5611536",
"0.5592908",
"0.5581758",
"0.55815256",
"0.55806494",
"0.5545107",
"0.5538698",
"0.5533713",
"0.55283535",
"0.551272",
"0.55087435... | 0.68006647 | 0 |
provide a consistent means to get the base asyncIterPersist, for consumers of AsyncIterPersist or AsyncIterPersistFork | get asyncIterPersist(){
return this
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"tee( opts){\n\t\treturn new (this.asyncIterPersistFork())( this, opts)\n\t}",
"[Symbol.asyncIterator]() {\n return this;\n }",
"[Symbol.asyncIterator]() {\n return this;\n }",
"[Symbol.asyncIterator]() {\n return this;\n }",
"[Sy... | [
"0.55446875",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5187628",
"0.5136248",
"0.5136248",
"0.5029594",
"0.49920326",
"0.49920326",
"0.49920326",... | 0.7488552 | 0 |
Default component generator. Generates simple default pages for 404, 500, and loading pages with status and a message. | function generateDefaultComponent(message, status){
return {
headers: function(vnode){
return {
status: status
}
},
view: function(vnode) {
return [
m('head', [
m('title', `${status} (${message})`),
]),
m('body', [
m('pre', message),
m.scripts,
]),
]
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function NotFound(){\n return(\n <PageDefault>\n <h1>Page not found</h1>\n <h2>Error 404!</h2>\n </PageDefault>\n )\n}",
"function NotFound(){\n /**\n * Build specific component */\n function buildComponent(){\n const notFoundPage = buildElement('div', {'id': 'profile-notFou... | [
"0.61929995",
"0.5915506",
"0.54993665",
"0.54636633",
"0.5367208",
"0.5290101",
"0.5257567",
"0.5246212",
"0.5237454",
"0.52248216",
"0.51843864",
"0.5099581",
"0.50693434",
"0.504979",
"0.503308",
"0.4980724",
"0.49544877",
"0.49327195",
"0.4929488",
"0.49085838",
"0.489540... | 0.62348056 | 0 |
submit solution and then go to feedback page | function yesSubmit() {
let imageUrl = "";
// Get solution code
const solution = editor.session.getValue().split('\n');
// Set HTML for code snippet
let htmlCode = '<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?lang=py&skin=sunburst"></script>' + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function submitFeedbacks(mode) {\n\tif (mode == \"default\") {\n\t\talert(\"Your score will be available in the comments section...\");\n\t}\n\t//alert(mode);\n\tgetElements(mode);\n\treturn\n}",
"function submitAnswer() {\r\n\tclearInput();\r\n\tclearOutput();\r\n\tretrieveSubmittedAnswer();\r\n\tuserSubmitedAn... | [
"0.6765019",
"0.6629512",
"0.6597735",
"0.64806116",
"0.64800555",
"0.6448486",
"0.63744414",
"0.6354596",
"0.63383627",
"0.63383627",
"0.6323848",
"0.63152707",
"0.6308692",
"0.62860227",
"0.628413",
"0.62722766",
"0.6255424",
"0.62509054",
"0.6209629",
"0.6170874",
"0.61593... | 0.67810625 | 0 |
true: readAsBinaryString ; false: readAsArrayBuffer / Loads excel life and converts first column of names in excel to JS list. | function handleExFile(e) {
document.getElementById('excel').blur();
NAME_LIST = [];
var files = e.target.files, f = files[0];
console.log(excel.files[0].name.split('.').pop());
if(!excelTypeCheck(excel.files[0])) {
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var data = e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function readNames(workbook) {\n\tvar worksheet = workbook.Sheets[workbook.SheetNames[0]];\n\tvar json_list = XLSX.utils.sheet_to_json(worksheet, {header:\"A\"});\n\treturn json_list.map(x => x.A);\n}",
"function loadExcel(contents){\n /* Call XLSX */\n var workbook = XLSX.read(contents, {\n type: \... | [
"0.6414618",
"0.6280079",
"0.6246517",
"0.6196036",
"0.6182945",
"0.61583334",
"0.6015804",
"0.592454",
"0.58819485",
"0.5842089",
"0.5715867",
"0.5658583",
"0.5645235",
"0.5571874",
"0.5530055",
"0.5510496",
"0.5498082",
"0.54942566",
"0.54480916",
"0.543693",
"0.5434294",
... | 0.6710538 | 0 |
Checks that file is an excel file. | function excelTypeCheck(file) {
if(['xlsx','xls'].indexOf(file.name.split('.').pop()) == -1) {
document.getElementById("process_status").style.color = "red";
document.getElementById('process_status').innerHTML = "Error: Excel document must be XLS or XLSX file.";
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validateFileType(file) {\n var fileTypes = ['xlsx']; // FILETYPES WE ALLOW (XLSX ONLY)\n var extension = file.name.split('.').pop().toLowerCase(),\n isSuccess = fileTypes.indexOf(extension) > -1;\n if (isSuccess) {\n return true;\n }\n else\n {\n showAlert(\"error\", \"File types must be of... | [
"0.7814504",
"0.7589522",
"0.6619624",
"0.6321841",
"0.5855698",
"0.57999265",
"0.577413",
"0.5770686",
"0.5594874",
"0.5537551",
"0.5524307",
"0.5511275",
"0.5495948",
"0.5477839",
"0.5475456",
"0.5458973",
"0.5443096",
"0.5433646",
"0.5391712",
"0.53895533",
"0.53812",
"0... | 0.8199493 | 0 |
OK, now we're ready to post the info. When we created the fields above, we assigned field names to everything. Those names get passed to the event linked to the Submit button we created in the last part of the doGet function, and we can now work with the name/value pairs that got passed in the 'eventInfo' variable. THE... | function doPost(eventInfo) {
//again, just some standard stuff we need to work with the UI and spreadsheet methods quickly.
var app = UiApp.getActiveApplication();
var par = eventInfo.parameter;
var ss = SpreadsheetApp.openById(ssKey);
var curDate = new Date();
var caseData = new Object();
//now we grab ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function submitEvent() {\n var currentTime = new Date();\n \n //This uses jquery.formparams.js\n var event_data = {};\n\tevent_data.data = $('#EventForm').formParams();\n debugmsg('event_data as from form:',event_data);\n \n // Standard event data\n \n event_data.intype = current.intype.... | [
"0.61132354",
"0.6041585",
"0.60012305",
"0.59734",
"0.59222084",
"0.59059536",
"0.5901489",
"0.5897564",
"0.5882255",
"0.587222",
"0.5830487",
"0.5822632",
"0.5782574",
"0.57043755",
"0.5701059",
"0.5687777",
"0.56617236",
"0.5639797",
"0.5634627",
"0.56045634",
"0.55870247"... | 0.6254982 | 0 |
this is a minifunction that adds styles to any element. It splits the values from the 'Fields' table by commas and applies every style listed. 'obj' is the UI element. 'style' is the style name' 'styles' is the entire style table. If this caused performance issues, it could be cached. 'stLen' is the length of the style... | function addStyle(obj, style, styles, stLen) {
for (var i=0; i < stLen; i++) {
var splitStyle = style.split(',');
var splitLen = splitStyle.length;
for (var j = 0; j < splitLen; j++) {
if (splitStyle[j] == styles[i][0]) {
obj.setStyleAttribute(styles[i][1],styles[i][2]);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function applyStyles (el, styles){\r\n if(styles){\r\n var i = 0,\r\n len,\r\n style; \r\n \r\n el = Ext.fly(el); \r\n if(Ext.isFunction(styles)) {\r\n styles = styles.call();\r\n }\r\n... | [
"0.66042185",
"0.63212204",
"0.62936836",
"0.6261079",
"0.6261079",
"0.62286264",
"0.62029797",
"0.61340255",
"0.61231965",
"0.6115083",
"0.6106987",
"0.6095063",
"0.60903287",
"0.6086745",
"0.60831547",
"0.60831547",
"0.60831547",
"0.60831547",
"0.60831547",
"0.60831547",
"0... | 0.7724639 | 0 |
This function is actually meant to be a standalone function that runs on a time trigger. It basically just runs through a set of instructions to update fields in the 'RequestData' table if certain conditions are met, and kicks off actions based on the results. Functionality is somewhat limited because of the risk of a ... | function ScheduledUpdater() {
var ss = SpreadsheetApp.openById(ssKey);
var sheet = ss.getSheetByName('Updater');
var range = sheet.getDataRange();
var values = range.getValues();
var lastRow = range.getLastRow();
var reqSheet = ss.getSheetByName('RequestData');
var reqRange = reqSheet.getDataRange();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleTimeOffRequests() {\n //Using moment.js to format time as WIW expects\n var startDateToRetrieveRequests = moment(startDate).format(date_format);\n var endDateToRetrieveRequests = moment(endDate).format(date_format);\n var timeOffSearchParams = {\n \"start\": startDateToRetrieveReq... | [
"0.55269784",
"0.5509125",
"0.5436636",
"0.5386326",
"0.53008485",
"0.5249926",
"0.51657295",
"0.51553524",
"0.5146324",
"0.5145309",
"0.51296854",
"0.51187503",
"0.5101649",
"0.50836337",
"0.5072765",
"0.5072217",
"0.5019091",
"0.4971394",
"0.49657017",
"0.49615863",
"0.4952... | 0.5697681 | 0 |
This function handles both where the label appears next to an input element, and where the element and label appear on the form. Although I really only want to allow one location (left) and one label location (top). Anything else looks messy to me. panel: where the element goes inputField: the actual UI element we are ... | function LabelAndColumnLocationHandler(panel,inputField,location,label) {
var app = UiApp.getActiveApplication();
var headerP = app.getElementById('headerP');
var vertP = app.getElementById('vertP1');
var vertP2 = app.getElementById('vertP2');
var vertP3 = app.getElementById('vertP3');
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function moveLabel(e) {\n let input = e.target;\n if(input.value === \"\") {\n let label = input.parentElement.querySelector(\"label\");\n if(label) {\n label.classList.add(\"focus\");\n }\n }\n}",
"refreshLabelPosition(label) {\n const labelDiv = this.refs[getLabelRef(label.id, this._.compon... | [
"0.6050073",
"0.5961745",
"0.56976813",
"0.56346667",
"0.5617265",
"0.5613826",
"0.5557659",
"0.5551304",
"0.5535755",
"0.5520772",
"0.55104715",
"0.55062854",
"0.548462",
"0.54708177",
"0.5388703",
"0.5354582",
"0.5354058",
"0.53276545",
"0.5320815",
"0.53156674",
"0.5273951... | 0.7218323 | 0 |
THIS GROUP OF CLASSES IS FOR WORKING WITH THE WORKFLOW OBJECT AT THE HEADER OR MASTER LEVEL. These are a collection of Methods for working with the JSON Class that contains workflow items. This stuff is advanced javascript. Either you know what you're looking at and don't need comments, or you should probably just back... | function UpdateWorkflowObject() {
this.setState = function (state) {this.state = state; return this;};
this.getState = function () {return this.state;};
this.setStatus = function (status) {this.status = status; return this;};
this.getStatus = function () {return this.status;};
this.setWorkflow = function (wo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Homework(payload) {\n this.payload = payload;\n}",
"function getWorkflows(iID)\n{\n try\n {\n var apiParamData = {};\n var thisWF = null;\n var oNode=null;\n var oLink = null;\n var oPoint = null;\n var iLCount=0;\n apiParamData.WF_ID = iID;\n ... | [
"0.5652411",
"0.5405701",
"0.52663714",
"0.52590626",
"0.5208585",
"0.5130774",
"0.51196444",
"0.5084002",
"0.5036565",
"0.5017259",
"0.5014978",
"0.50146335",
"0.5006677",
"0.50053",
"0.49939707",
"0.49443963",
"0.49417385",
"0.49399325",
"0.4934311",
"0.49233648",
"0.492092... | 0.60249346 | 0 |
Display the updated list of participants currently waiting in the Lip Sync queue. The updated_list is a JSON object of name > videoId | renderParticipantList(participantListContainer, {updated_list}) {
participantListContainer.innerHTML = "";
for (const name in updated_list) {
let template = document.createElement("div");
template.innerHTML = `<b>${name}</b>`;
participantListContainer.appendChild(template);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function lookForUpdate(thetime){\n var getVideos;\n\n // Request to api\n $.ajax({\n type: \"GET\",\n url: livetvPlayList\n })\n .done(function( data ) {\n\n /////////\n\n getCurrentTime = data.serverTime;\n getVideos = ... | [
"0.6007004",
"0.60066813",
"0.5998993",
"0.5833282",
"0.57650775",
"0.57351613",
"0.57258976",
"0.5686002",
"0.5678278",
"0.5596673",
"0.5596308",
"0.55734825",
"0.5565754",
"0.55411327",
"0.5531392",
"0.5523325",
"0.5494207",
"0.5476966",
"0.5451765",
"0.5436088",
"0.5413062... | 0.66084397 | 0 |
Decodes the value from a pre.di.c parameter inside the pre.di.c status stream | function status_decode(status, prop) {
var result = "";
arr = status.split("\n"); // the tuples 'parameter:value' comes separated by line breaks
for ( i in arr ) {
if ( prop == arr[i].split(":")[0] ) {
result = arr[i].split(":")[1]
}
}
return String(result).trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getData (bytes) {\n\t\tif (bytes[0] & 1 << 7 === 0) {\n\t\t\treturn {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: 'First byte is not status'\n\t\t\t};\n\t\t}\n\n\t\tvar channel = bytes[0] & 15;\n\n\t\tvar idx = (bytes[0] >> 4) & 7\n\t\tvar type = typeMap[idx];\n\n\t\tvar data = {};\n\t\tswitch (type) {\n\t\... | [
"0.5444653",
"0.53146374",
"0.52543354",
"0.51807857",
"0.5161558",
"0.5051698",
"0.50160086",
"0.50022906",
"0.4996041",
"0.49618983",
"0.49338087",
"0.49199218",
"0.49147078",
"0.48992032",
"0.48980278",
"0.4882728",
"0.48741025",
"0.4870949",
"0.48635656",
"0.48565894",
"0... | 0.56991094 | 0 |
Gets the current loudspeaker name | function get_loudspeaker_name() {
var myREQ = new XMLHttpRequest();
myREQ.open(method="GET", url="php/functions.php?command=get_loudspeaker_name", async=false);
myREQ.send();
return (myREQ.responseText);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"speak(){\n return `${this._name} purrs`\n }",
"speak() { return this.name + \" says woof\"; }",
"speak() {\n console.log('My name is ', name);\n }",
"getParticipantName(participant) {\n const selfInfo = this.contactManager.getLocalUser();\n let userName = this.contactManag... | [
"0.6435684",
"0.6118513",
"0.6109438",
"0.6098122",
"0.60886395",
"0.6076654",
"0.60418695",
"0.5997891",
"0.5977781",
"0.585986",
"0.57912666",
"0.5782369",
"0.5770609",
"0.57657945",
"0.57461363",
"0.57176524",
"0.5700089",
"0.5695181",
"0.56654596",
"0.5649219",
"0.5621358... | 0.6353762 | 1 |
Aux function that retrieves the indentation level of some code line, useful for YAML decoding. | function indentLevel(linea) {
var level = 0;
for ( i in linea ) {
if ( linea[i] != ' ' ) { break;}
level += 1;
}
return (level);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getIndent (line) {\n return line.match(/^\\s*/)[0].length\n}",
"getCurrentLineIndentation() {\n return this.currentLine.length - Utils.ltrim(this.currentLine, ' ').length;\n }",
"indentation() {\n var _a;\n return (_a = this.overrideIndent) !== null && _a !== void 0 ? _a : count... | [
"0.704655",
"0.68593943",
"0.6504007",
"0.6269498",
"0.6249177",
"0.6198351",
"0.61927146",
"0.60918176",
"0.60494334",
"0.60327613",
"0.6008105",
"0.59730464",
"0.59719014",
"0.5969813",
"0.59177697",
"0.59177697",
"0.59177697",
"0.59177697",
"0.59177697",
"0.5796646",
"0.57... | 0.7312404 | 0 |
Checks if path is in cache | function isCached(path) {
for (var i = 0; i < cache.length; i++) {
if (cache[i].path === path) {
return { response: true, index: i };
}
}
return { response: false, index: -1 };
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkCache(path) {\n\treturn path+\"?\"+adobe.Math.Randomize.toId()+\"=1\";\n}",
"has(absPath) {\n return this.cacheStore.has(absPath);\n }",
"function cacheFileIsCached(filePath)\n{\n var exist = false;\n var testFileShaName = cacheFileShaName(filePath);\n for(var i=0; i<cacheListS... | [
"0.77194494",
"0.73789054",
"0.73092914",
"0.725901",
"0.725901",
"0.725901",
"0.6860993",
"0.67054325",
"0.6677387",
"0.6634298",
"0.6576798",
"0.6520853",
"0.65064406",
"0.6432875",
"0.6421769",
"0.6395056",
"0.637904",
"0.63660216",
"0.62827903",
"0.6280158",
"0.62294626",... | 0.7517492 | 1 |
Convert [ ] and [x] to checkboxes. | function addCheckboxes(string) {
return string.replace(new RegExp("\\[([\\s|x])\\]", "gi"), function ($0, $1) {
var value = $1 == "x" ? 1 : 0;
return (
'<input class="status hidden ' +
(value === 1 ? "done" : "") +
'" type="checkbox" value="' +
value +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkBox(){\n if(cbx1.checked === true){\n strUseChar += special;\n }\n if(cbx2.checked === true){\n strUseChar += numeric;\n }\n if(cbx3.checked === true){\n strUseChar += lowercase;\n }\n if(cbx4.checked === true){\n strUseChar += uppercase\n }\n useChar =... | [
"0.6043055",
"0.5818389",
"0.55351657",
"0.5529322",
"0.5499661",
"0.5474236",
"0.5409818",
"0.53346777",
"0.53156465",
"0.5287786",
"0.5268369",
"0.52101564",
"0.5160833",
"0.5105583",
"0.5096537",
"0.5096537",
"0.5090441",
"0.5089899",
"0.506958",
"0.5062752",
"0.5041365",
... | 0.61577743 | 0 |
FCH callback for scroll If the table header is in range, show it, otherwise hide it | function stickyTableHeaderScroll() {
var offset = FCH.$window.scrollTop();
$('.sticky-table-header').each(function() {
var $this = $(this);
var top_offset = $this.data('table-top');
var tableBottom = $this.data('table-bottom');
if (offset >= top_offset && offset <= tableBot... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function windowScroll()\n{ \t\n\tvar header = $('#wrapper');\n\tvar range = 200;\n\tvar scrollTop = $(this).scrollTop();\n var offset = header.offset().top;\n var height = header.outerHeight();\n // if(isTwoTableVisibile = true)\n // {\n offset = offset + height / 2;\n var calc = 1 - (scrollTop - ... | [
"0.7133166",
"0.68268883",
"0.6659388",
"0.6584388",
"0.64934415",
"0.63090944",
"0.619022",
"0.6076851",
"0.60762155",
"0.60568756",
"0.60143304",
"0.60086304",
"0.5978679",
"0.5977937",
"0.5977115",
"0.59422374",
"0.59398246",
"0.5892247",
"0.5825629",
"0.5818246",
"0.57964... | 0.7341926 | 0 |
Implementation of removeContextListener for the kahuna. | function removeContextListener(user) {
mustBeObject('user', user);
var index = users.indexOf(user);
if (index >= 0) {
// FIXME: Potential leak here if IContextConsumer extends IUnknown
var removals = users.splice(index, 1);
}
el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"remove() {\n this.target.removeListener(this.event, this.callback, {\n context: this.context,\n remaining: this.remaining\n });\n }",
"function removeListener(device) {\n //console.log('removeListener ')\n if (device.deviceType == '现场测试') {\n var id = calculateI... | [
"0.6542088",
"0.6368584",
"0.62497973",
"0.62497973",
"0.62497973",
"0.62497973",
"0.62497973",
"0.615203",
"0.6151767",
"0.6151767",
"0.6151767",
"0.6151767",
"0.6151767",
"0.6151767",
"0.609949",
"0.608435",
"0.6053815",
"0.59621143",
"0.59621143",
"0.59493214",
"0.59493214... | 0.6550563 | 0 |
Derive meaning from intent classifier | meaning(txt)
{
return this.intentClassifier.classify(txt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"classify(phrase) { return this.clf.classify(phrase) }",
"function getChoreFromIntent(intent, assignDefault) {\n\n var choreSlot = intent.slots.ChoreName;\n // slots can be missing, or slots can be provided but with empty value.\n // must test for both.\n if (!choreSlot || !choreSlot.value) {\n ... | [
"0.6023151",
"0.57238054",
"0.5719518",
"0.55648476",
"0.54346675",
"0.53394604",
"0.53317314",
"0.5297535",
"0.52195686",
"0.5219528",
"0.5203501",
"0.5108285",
"0.50120944",
"0.4997547",
"0.4992902",
"0.49816024",
"0.49515572",
"0.49499086",
"0.494044",
"0.4939668",
"0.4933... | 0.7992566 | 0 |
If the main extension is not alive, we redirect the user to the error page which will inform them that there is an error. | function handleResponse() {
if (!alive) {
openSingletonPage(chrome.extension.getURL('error.html'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_err() {\n alert(\"Server unreachable.\");\n window.location.replace(rel_fron_path);\n}",
"function handleErrors(response) {\n if (!response.ok) {\n window.location.href =\"index.html\"\n }\n return response;\n}",
"function checkAppError() {\n if (options.appError === APP_E... | [
"0.6646737",
"0.65839726",
"0.63713706",
"0.6356838",
"0.63495797",
"0.63261986",
"0.6202212",
"0.6202212",
"0.6187474",
"0.6063284",
"0.6062379",
"0.60566396",
"0.60554606",
"0.6029564",
"0.60288113",
"0.60017395",
"0.5999397",
"0.5995539",
"0.5976155",
"0.5936965",
"0.59269... | 0.7010989 | 0 |
looks at scout connections to this adult, builds list of all scout ids in scoutPermObjList the issue now is that unitID is unit only If we build the list for scouts in the selected units and the parent unit of a patrol or den selected, remember teh desn and patrols. Build the list for scouts at the unit level, whjen ge... | function getConnectedScouts(unitArr,rosterPrintFormPost,pageid,cb,cbv1) {
var troop;
var unitid;
var cont=false;
for(var i=0;i<unitArr.length;i++) {
if(unitArr[i].retrieved == false) {
unitArr[i].retrieved=true;
troop= unitArr[i].unitname;
unitid=unitArr[i].unitid;
cont=true;
break;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"checkNewCritterTargets (donations) { //confusing b/c critter.donations and donation message are objects with \"target\" \"amount\" \"total\"\n let targetA = donations[0].target;\n let targetB = donations[1].target;\n let newOrgA = true;\n let newOrgB = true;\n for (let org of thi... | [
"0.49449086",
"0.49088243",
"0.47403878",
"0.46733892",
"0.4645042",
"0.4626064",
"0.4615228",
"0.4525566",
"0.44805723",
"0.4476416",
"0.4451491",
"0.44290027",
"0.44170752",
"0.44132173",
"0.43945065",
"0.43523845",
"0.43482864",
"0.43397355",
"0.43206373",
"0.4313481",
"0.... | 0.52685815 | 0 |
CPrintF("m_fArmor: %.3f\n", ((CPlayer &)epass.penOther).m_fArmor); | if(m_bOverTopArmor) {
if (GetSP()->sp_bUsePEHealth) {
if (((CPlayer &)*epass.penOther).m_fArmor==300) {
return;
}
} else {
if (((CPlayer &)*epass.penOther).m_fArmor==200) {
return;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function conToDeciPreInf(){\n player.money = new Decimal(player.money)\n player.tickSpeedCost = new Decimal(player.tickSpeedCost)\n player.tickspeed = new Decimal(player.tickspeed)\n player.firstAmount = new Decimal(player.firstAmount)\n player.secondAmount = new Decimal(player.s... | [
"0.56574005",
"0.5624949",
"0.5612108",
"0.561137",
"0.56107414",
"0.55633855",
"0.5507785",
"0.5507785",
"0.5507785",
"0.5477005",
"0.53976685",
"0.53470033",
"0.53343105",
"0.5326703",
"0.5325702",
"0.53008425",
"0.53008425",
"0.53008425",
"0.53008425",
"0.53008425",
"0.530... | 0.56330967 | 1 |
Draw selected month. Uses global variable selectedDay. | function drawMonth() {
console.log("Drawing month for " + selectedDay.toISOString());
$('#jump_month_title').html(selectedDay.toString("MMM yyyy"));
days.reset();
var startTime = new Date();
startTime.setTime(selectedDay.getTime());
startTime.moveToFirstDayOfMonth();
var endTime = new Date();
endTime.s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function drawMonthView(month) {\n\t\t\t\t\tvar week,\n\t\t\t\t\t\tdayCur,\n\t\t\t\t\t\tday;\n\n\t\t\t\t\tcurMonth = month;\n\t\t\t\t\tdates = _h.calendarGenerator(month);\n\t\t\t\t\tdatesSplit = (dates.length === 42) ? _h.splitArr(dates, 6) : (dates.length === 28) ? _h.splitArr(dates, 4) : _h.splitArr(dates, 5);\n... | [
"0.7124704",
"0.69868016",
"0.69868016",
"0.68531656",
"0.6784235",
"0.6780443",
"0.6653233",
"0.66145515",
"0.6547424",
"0.651169",
"0.64572304",
"0.6448978",
"0.60950214",
"0.604951",
"0.60459447",
"0.6036011",
"0.6016446",
"0.6003309",
"0.5979523",
"0.59754515",
"0.5952368... | 0.78256315 | 0 |
Converts a inline data: to png file | function convertInlinePNG(source, dest) {
if (!/^data:image\/png/.test(source))
return promise_1.default.reject(new Error("Source is not a PNG data-uri"));
const base64data = source.split("data:image/png;base64,")[1];
const buf = Buffer.from(base64data, "base64");
return fs_1.default.writeFile(d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"exportPng(imageData) {\n return __awaiter(this, void 0, void 0, function* () {\n const base64 = imageData.replace('data:image/png;base64,', '');\n const pngFilePath = this._uri.fsPath.replace('.json', '');\n const pngFileUri = yield vscode_1.window.showSaveDialog({\n ... | [
"0.6224303",
"0.6211653",
"0.6146655",
"0.5874228",
"0.58537257",
"0.57625157",
"0.57593906",
"0.5748048",
"0.5748048",
"0.5748048",
"0.5748048",
"0.5701967",
"0.57014996",
"0.5693382",
"0.5684222",
"0.5674588",
"0.56615436",
"0.56549925",
"0.5552622",
"0.5517503",
"0.5517218... | 0.6490108 | 0 |
Creates a new help tooltip | function createHelpTooltip() {
if (helpTooltipElement) {
helpTooltipElement.parentNode.removeChild(helpTooltipElement);
}
helpTooltipElement = document.createElement('div');
helpTooltipElement.className = 'ol-tooltip hidden';
helpTooltipElement.id = 'initial-tooltip';
helpTooltip = new Ove... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createHelpTooltip() {\n if (helpTooltipElement) {\n helpTooltipElement.parentNode.removeChild(helpTooltipElement);\n }\n helpTooltipElement = document.createElement('div');\n helpTooltipElement.className = 'tooltip hidden';\n helpTooltip = new ol.Overlay({\n ... | [
"0.80419326",
"0.8001204",
"0.79953736",
"0.797177",
"0.7931491",
"0.7931491",
"0.7917099",
"0.77522415",
"0.7533464",
"0.7533464",
"0.7533464",
"0.7484704",
"0.74462515",
"0.7247853",
"0.71906227",
"0.7042832",
"0.6954824",
"0.69444895",
"0.69394386",
"0.68523717",
"0.682871... | 0.8039726 | 1 |
x = x position, y = y position, s = sprite, o = draw over other sprites? Sorry, no builtin animated sprites yet :( | function drawSprite(x, y, s, o) {
//Sprites are drawn from the TOP-LEFT corner
//This is to match the default in p5js
var w = getWidth(s);
var h = getHeight(s);
for(var i = 0; i < w; i++) {
for(var j = 0; j < h; j++) {
var val = s[i][j];
var rx = x+j;
var ry = y+i;
swi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function drawSprite (obj, sprite) {\n ctx.drawImage(sprite, obj.x, obj.y)\n}",
"function spr(img,x,y,rot=0) {\n\tdraw_sprite(img,x,y,rot)\n}",
"constructor(sprite, x, y) {\n this.sprite = sprite;\n this.x = x;\n this.y = y;\n }",
"function drawSprite(img, sX, sY, sW, sH, dX, dY, dW, dH) {\n c... | [
"0.71219045",
"0.6999292",
"0.6858556",
"0.6816126",
"0.6791353",
"0.6776202",
"0.6753195",
"0.66968775",
"0.66799223",
"0.6678306",
"0.6659848",
"0.66140574",
"0.6589387",
"0.65756845",
"0.65700054",
"0.6548536",
"0.64963377",
"0.64963377",
"0.64692664",
"0.64663696",
"0.643... | 0.7616066 | 0 |
adds all calories together and returns the sum | function getTotalCalories() {
return inputCaloriesByDay('monday') +
inputCaloriesByDay('tuesday') +
inputCaloriesByDay('wednesday') +
inputCaloriesByDay('thursday') +
inputCaloriesByDay('friday') +
inputCaloriesByDay('saturday') +
inputCaloriesByDay('sunday');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getTotalCalories() {\n return this.state.breakfast.reduce((accumulator, elem) => parseInt(elem.calories) + accumulator, 0)\n + this.state.lunch.reduce((accumulator, elem) => parseInt(elem.calories) + accumulator, 0)\n + this.state.dinner.reduce((accumulator, elem) => parseInt(elem.calo... | [
"0.74524915",
"0.73719954",
"0.7347733",
"0.68338466",
"0.6663543",
"0.66452724",
"0.6618526",
"0.66162115",
"0.66001284",
"0.6582674",
"0.6582674",
"0.6578215",
"0.65505093",
"0.65485424",
"0.6524018",
"0.65071285",
"0.6498604",
"0.6477808",
"0.6472908",
"0.64658123",
"0.643... | 0.7804844 | 0 |
determines if you are under or over your calories for the day | function calculateHealthPlan() {
var actualCalories = getTotalCalories();
var idealCalories = getIdealCalories();
if (actualCalories < idealCalories) {
return 'Time for seconds!';
}
if (actualCalories > idealCalories) {
return 'You\'re fat. Get to the gym.';
}
else {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getIdealCalories() {\n var idealDailyCalories = 2000;\n return idealDailyCalories * 7;\n}",
"overTime(){\n\t\t//\n\t}",
"checkHealthAndFood() {\n\n\n if (this.currPlayerHealth <= 0 || this.playerFood <= 0) {\n this.gameOver();\n }\n\n if (this.currPlayerHealth <= ... | [
"0.6129084",
"0.5965334",
"0.5926302",
"0.5921143",
"0.5896614",
"0.58572614",
"0.58292973",
"0.5745147",
"0.57408434",
"0.5735463",
"0.57093686",
"0.5691255",
"0.5691189",
"0.5689566",
"0.56856805",
"0.56612724",
"0.56608194",
"0.5623866",
"0.5617619",
"0.5597089",
"0.559538... | 0.63679034 | 0 |
Reads the content property on the documentElement ::before pseudo element for a string of ordered, commaseparated, breakpoint names. | function readCSSBreakpoints() {
return window
.getComputedStyle(document.documentElement, ':before')
.getPropertyValue('content')
.replace(/"/g, '')
.split(',');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function styleShouldReturnComputedStylesForBeforePseudoElement() {\n const styles = window.getComputedStyle(fixture.el.firstChild, \"::before\")\n const data = pseudo.style(fixture.el.firstChild, \"::before\")\n expect(Object.keys(data).length)\n .toBeGreaterThan(147) // IE9 has 148 properties\n Object.keys... | [
"0.6131779",
"0.600814",
"0.5234541",
"0.5212448",
"0.50944465",
"0.507273",
"0.49979985",
"0.49596655",
"0.4940311",
"0.49161002",
"0.4911264",
"0.48508155",
"0.48080406",
"0.48054308",
"0.477847",
"0.47165745",
"0.47162604",
"0.47162604",
"0.47162604",
"0.46948177",
"0.4687... | 0.6270918 | 0 |
Reads the content property on the documentElement ::after pseudo element for a string of the current breakpoint name. This value is updated using dynamically using media queries and should match a value found in the ::before pseudo element. | function readCSSCurrentBreakpoint() {
return window
.getComputedStyle(document.documentElement, ':after')
.getPropertyValue('content')
.replace(/"/g, '');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function styleShouldReturnComputedStylesForAfterPseudoElement() {\n const styles = window.getComputedStyle(fixture.el.firstChild, \"::after\")\n const data = pseudo.style(fixture.el.firstChild, \"::after\")\n expect(Object.keys(data).length)\n .toBeGreaterThan(147) // IE9 has 148 properties\n Object.keys(da... | [
"0.558526",
"0.55142254",
"0.5324389",
"0.5275572",
"0.5085233",
"0.48425806",
"0.47811535",
"0.47054228",
"0.46316957",
"0.4526968",
"0.45046833",
"0.44316623",
"0.43735138",
"0.43387204",
"0.4249742",
"0.4244786",
"0.4205444",
"0.4123456",
"0.41117495",
"0.40575638",
"0.402... | 0.6631821 | 0 |
Builds the options for province selector | function buildOptions (provinceNodeElement, provinces) {
var defaultValue = provinceNodeElement.getAttribute('data-default');
provinces.forEach(function (option) {
var optionElement = document.createElement('option');
optionElement.value = option[0];
optionElement.textContent = option[1];
province... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildProvince (countryNodeElement, provinceNodeElement, selectedValue) {\n var selectedOption = getOption(countryNodeElement, selectedValue);\n var provinces = JSON.parse(selectedOption.getAttribute('data-provinces'));\n\n provinceNodeElement.options.length = 0;\n\n if (provinces.length) {\n buildO... | [
"0.70204365",
"0.62341434",
"0.61971045",
"0.58682793",
"0.58043283",
"0.57939947",
"0.5739476",
"0.5695637",
"0.5626847",
"0.5619758",
"0.56110394",
"0.56109965",
"0.5585025",
"0.55610096",
"0.5546759",
"0.5546024",
"0.54468656",
"0.5435561",
"0.5415039",
"0.5409604",
"0.540... | 0.70035285 | 1 |
Builds the province selector | function buildProvince (countryNodeElement, provinceNodeElement, selectedValue) {
var selectedOption = getOption(countryNodeElement, selectedValue);
var provinces = JSON.parse(selectedOption.getAttribute('data-provinces'));
provinceNodeElement.options.length = 0;
if (provinces.length) {
buildOptions(provi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildOptions (provinceNodeElement, provinces) {\n var defaultValue = provinceNodeElement.getAttribute('data-default');\n\n provinces.forEach(function (option) {\n var optionElement = document.createElement('option');\n optionElement.value = option[0];\n optionElement.textContent = option[1];\n\... | [
"0.6266069",
"0.6183508",
"0.6173697",
"0.5884485",
"0.5748152",
"0.57194006",
"0.5498181",
"0.54273266",
"0.5388319",
"0.5373663",
"0.53246504",
"0.531837",
"0.5301271",
"0.5285754",
"0.5277372",
"0.5241875",
"0.52374417",
"0.52200437",
"0.5219786",
"0.5206026",
"0.5200125",... | 0.719076 | 0 |
Sidebar handling If the user has elected to use the sidebar, the popup is disabled, and we will receive events, which we can then use to open the sidebar. Have to do this in a really hacky way at the moment due to Also Opera doesn't have open(). eslintdisablenextline noinnerdeclarations | function openSidebarWhenClicked() {
browser.browserAction.onClicked.removeListener(openSidebarWhenClicked)
browser.sidebarAction.open()
browser.browserAction.onClicked.addListener(closeSidebarWhenClicked)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleToggleSidebar(e) {\n\t\t\tvar side = document.getElementById('sidebar');\n\n\t\t\t//when calling this for the first time on page startup, style.display attribute will be empty which corresponds to the default case of \"visible\"\n\t\t\tif (side.style.display == 'none') {\n\t\t\t\t//sidebar is not vi... | [
"0.71610934",
"0.7150366",
"0.71492976",
"0.71329296",
"0.709636",
"0.7017994",
"0.7003104",
"0.69486666",
"0.6915275",
"0.6775332",
"0.67729956",
"0.676178",
"0.67267776",
"0.669834",
"0.6680059",
"0.66681176",
"0.66414106",
"0.6640439",
"0.66348034",
"0.6621583",
"0.6621583... | 0.79759943 | 0 |
este control recibe un xml donde vienen especificados todos los detalles del descriptor | function GenericDescriptor(xml) {
var _instance = this;
/*******************************/
//En función del XML rellenamos la información del control
var xmlInfo = xml.find('GenericDescriptor');
if (xmlInfo.length == 1) {
var descriptor = $(xmlInfo[0]);
_instance.Name = descriptor.at... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function p_generar_factura_xml(){\n var estructuraFactura = {\n factura:{\n _id:\"comprobante\",\n _version:\"1.0.0\",\n infoTributaria:{\n ambiente:null,\n tipoEmision:null,\n razonSocial:null,\n nombreComercial... | [
"0.5993965",
"0.5658472",
"0.56085265",
"0.56056696",
"0.5603394",
"0.536858",
"0.5361534",
"0.5345947",
"0.5345947",
"0.5307976",
"0.5276027",
"0.5234254",
"0.52290213",
"0.5189758",
"0.5170387",
"0.51523757",
"0.5141146",
"0.5137485",
"0.5124878",
"0.50562364",
"0.5026687",... | 0.6199226 | 0 |
Obtiene el tipo enumerado PositionMode a partir de un string | function getPositionMode(str) {
if (str == 'Absolute') {
return Enum.PositionMode.Absolute;
} else if (str == 'FlowLayout') {
return Enum.PositionMode.FlowLayout;
} else {
return Enum.PositionMode.Absolute;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get modes () {\n return Array.from(this._modes)\n }",
"function getMode () {\n if (Object.keys(cli.flags).length > 2) {\n return MODE.ERROR;\n } else if (cli.flags.s) {\n return MODE.SAVE;\n } else if (cli.flags.l) {\n return MODE.LIST;\n } else if (cli.flags.d) {\n return MODE.DELETE;\n } e... | [
"0.58004826",
"0.5696679",
"0.5640248",
"0.55255556",
"0.5305651",
"0.528362",
"0.5193945",
"0.5186005",
"0.51824987",
"0.5165127",
"0.51462",
"0.51462",
"0.51446867",
"0.5142441",
"0.5142441",
"0.5082635",
"0.50467",
"0.5041335",
"0.5041333",
"0.5041333",
"0.50226307",
"0.... | 0.7388924 | 0 |
Obtiene el tipo enumerado Enum.Category a partir de un string | function getCategoryEnum(str) {
if (str == 'Style') {
return Enum.Categories.Style;
} else if (str == 'Data') {
return Enum.Categories.Data;
}
else if (str == 'Control') {
return Enum.Categories.Control;
}
else if (str == 'Settings') {... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function categType (category){\n if(category == 1){\n category = \"Limpeza\";\n } else if(category == 2) {\n category = \"Alimentação\";\n } else if(category == 3){\n category = \"Vestuário\";\n } else {\n throw new Error(`\n O ... | [
"0.68924403",
"0.6035244",
"0.59105957",
"0.58792907",
"0.58511686",
"0.57778",
"0.566143",
"0.56005144",
"0.55430824",
"0.5531048",
"0.54949814",
"0.54718274",
"0.5431293",
"0.5404282",
"0.5393094",
"0.5381827",
"0.53490037",
"0.5322262",
"0.5261723",
"0.5253465",
"0.5243037... | 0.83845365 | 0 |
idOf(type) Sentinel value for when an Id of a particular type is needed: idOf(Number) | function idOf(type) {
var self = getInstance(this, idOf);
self.type = type;
return self;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function id(x){ return x; }",
"function id(x) { return x; }",
"function id(a){ return a }",
"function ID(x) {\n return x;\n}",
"function isId(value) {\n return typeof value === \"string\" || typeof value === \"number\";\n}",
"function isId(value) {\n return typeof value === \"string\" || typeof value ... | [
"0.6482159",
"0.6478181",
"0.6253797",
"0.61755204",
"0.612926",
"0.612926",
"0.61287344",
"0.5905839",
"0.5851961",
"0.58436",
"0.5813262",
"0.57877105",
"0.5785795",
"0.57808787",
"0.5766539",
"0.5766539",
"0.5766539",
"0.5766539",
"0.5766539",
"0.57665324",
"0.56904876",
... | 0.69002444 | 0 |
Gets geolocation from country name and creates a marker at the location. | function addMarker(country) {
geocodingClient.forwardGeocode({
query: country.CountryName,
limit: 1
})
.send()
.then(response => {
// Adds a marker at the specified location if it is a valid.
let geolocation = checkValidLocation(() => response.body.feature... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gcode(country) {\n if (country == \"United States\") {country = \"USA\";}\n \tgeocoder.geocode( { 'address': country }, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n var marker = new google.maps.Marker({\n map: map,\n ... | [
"0.6746388",
"0.6564182",
"0.63917977",
"0.6389969",
"0.6070186",
"0.6043329",
"0.60004795",
"0.59954053",
"0.5987641",
"0.5980878",
"0.5811997",
"0.57966655",
"0.57750934",
"0.5767507",
"0.5754928",
"0.5731484",
"0.5724278",
"0.5710912",
"0.5706727",
"0.5702745",
"0.5696806"... | 0.75418276 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.