Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Collect dispatches (must be entirely collected before dispatching see unit tests). Lazily allocate the array to conserve memory. We must loop through each event and perform the traversal for each one. We can not perform a single traversal for the entire collection of events because each event may have a different targe...
function accumulateTwoPhaseDispatchesSingle(event) { if (event && event.dispatchConfig.phasedRegistrationNames) { EventPluginHub.injection.getInstanceHandle().traverseTwoPhase( event.dispatchMarker, accumulateDirectionalDispatches, event ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances...
[ "0.6035787", "0.6035787", "0.6035787", "0.6035787", "0.6035787", "0.5900727", "0.5888285", "0.5888285", "0.5888285", "0.5888285", "0.5873917", "0.583353", "0.583353", "0.583353", "0.583353", "0.583353", "0.583353", "0.583353", "0.583353", "0.583353", "0.5789951", "0.5785468...
0.0
-1
Accumulates without regard to direction, does not look for phased registration names. Same as `accumulateDirectDispatchesSingle` but without requiring that the `dispatchMarker` be the same as the dispatched ID.
function accumulateDispatches(id, ignoredDirection, event) { if (event && event.dispatchConfig.registrationName) { var registrationName = event.dispatchConfig.registrationName; var listener = getListener(id, registrationName); if (listener) { event._dispatchListeners = accumulateInto(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulate...
[ "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "0.7467178", "...
0.7466676
28
SECTION: handle `change` event
function shouldUseChangeEvent(elem) { return ( elem.nodeName === 'SELECT' || (elem.nodeName === 'INPUT' && elem.type === 'file') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}...
[ "0.7854439", "0.77068675", "0.7598244", "0.7521718", "0.7510988", "0.75040656", "0.7448788", "0.74208724", "0.7401909", "0.7386273", "0.7366643", "0.7355561", "0.73510647", "0.73496336", "0.73438776", "0.7339753", "0.7338105", "0.7335427", "0.73326814", "0.73283356", "0.73218...
0.0
-1
(For old IE.) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
function startWatchingForValueChange(target, targetID) { activeElement = target; activeElementID = targetID; activeElementValue = target.value; activeElementValueProp = Object.getOwnPropertyDescriptor( target.constructor.prototype, 'value' ); Object.defineProperty(activeElement, 'value', n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.76264876", "0.73836356", "0.7299204", "0.7299204", "0.7171893", "0.7165276", "0.71539575", "0.7067012", "0.7067012", "0...
0.0
-1
(For old IE.) Removes the event listeners from the currentlytracked element, if any exists.
function stopWatchingForValueChange() { if (!activeElement) { return; } // delete restores the original property definition delete activeElement.value; activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementID = null; activeElementValue =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, fu...
[ "0.76096606", "0.7260854", "0.7193948", "0.7184364", "0.7184364", "0.71798974", "0.7161774", "0.7156895", "0.7144903", "0.7140128", "0.71349365", "0.711443", "0.71112305", "0.70993316", "0.7052047", "0.7046927", "0.7040724", "0.70010525", "0.69835156", "0.697995", "0.6917898"...
0.0
-1
(For old IE.) Handles a propertychange event, sending a `change` event if the value of the active element has changed.
function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } var value = nativeEvent.srcElement.value; if (value === activeElementValue) { return; } activeElementValue = value; manualDispatchChangeEvent(nativeEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.72335935", "0.6919284", "0.6919133", "0.6880122", "0.6806271", "0.6754776", "0.6754776", "0.6754776", "0.6754776", "0.6...
0.0
-1
If a `change` event should be fired, returns the target's ID.
function getTargetIDForInputEvent( topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topInput) { // In modern browsers (i.e., not IE8 or IE9), the input event is exactly // what we want so fall through here and trigger an abstract event return topLevel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTargetId(event, tagName) {\n var target = (event.target.tagName == tagName)\n ? event.target\n : $(event.target).closest(tagName)[0]\n return target.id;\n}", "get targetIdInput() {\n return this._targetId;\n }", "get targetIdInput() {\n r...
[ "0.66318375", "0.6432281", "0.6432281", "0.6245621", "0.6105839", "0.5791511", "0.5676874", "0.5516862", "0.5491388", "0.5455423", "0.5440499", "0.54375577", "0.5380508", "0.53712964", "0.5361627", "0.5361421", "0.53585887", "0.53585887", "0.53176445", "0.5315599", "0.5287334...
0.48571742
58
For IE8 and IE9.
function handleEventsForInputEventIE( topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topFocus) { // In IE8, we can capture almost all .value changes by adding a // propertychange handler and looking for events with propertyName // equal to 'value' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.in...
[ "0.7188425", "0.701918", "0.69894475", "0.69894475", "0.67849606", "0.6688933", "0.65080756", "0.6453405", "0.6453405", "0.6431592", "0.63625026", "0.63478786", "0.62841743", "0.62473077", "0.6229113", "0.6196999", "0.6170207", "0.61580634", "0.6143879", "0.613126", "0.611870...
0.0
-1
For IE8 and IE9.
function getTargetIDForInputEventIE( topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) { // On the selectionchange event, the target is just...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.in...
[ "0.7188425", "0.701918", "0.69894475", "0.69894475", "0.67849606", "0.6688933", "0.65080756", "0.6453405", "0.6453405", "0.6431592", "0.63625026", "0.63478786", "0.62841743", "0.62473077", "0.6229113", "0.6196999", "0.6170207", "0.61580634", "0.6143879", "0.613126", "0.611870...
0.0
-1
SECTION: handle `click` event
function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. return ( elem.nodeName === 'INPUT' && (elem.type === 'checkbox' || elem.type === 'radio')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick( event ){ }", "handleClick() {}", "function handleClick(){\n console.log(\"clicked\");\n}", "function handleClick(event)\n{\n}", "click() { }", "function clickHandler(){\n console.log('I am clicked');\n}", "function clickHandler(event) {\n\tindexChangeSections(event);\n\ttabChangeSect...
[ "0.8123866", "0.7879277", "0.7531671", "0.7500634", "0.7475805", "0.7402668", "0.73915786", "0.7379595", "0.7379595", "0.7331232", "0.7330436", "0.7245654", "0.72390676", "0.72122186", "0.7116352", "0.7082111", "0.7062615", "0.7056091", "0.7017624", "0.7006748", "0.6982211", ...
0.0
-1
IE8 does not implement getModifierState so we simply map it to the only modifier keys exposed by the event itself, does not support Lockkeys. Currently, all major browsers except Chrome seems to support Lockkeys.
function modifierStateGetter(keyArg) { /*jshint validthis:true */ var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syn...
[ "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.73088694", "0.7273555", "0.7215384", "0.7185813", "0.7185813", "0.71065277", ...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.69097364", "0.6775297", "0.6607535", "0.65383923", "0.64938533", "0.64889115", "0.64889115", "0.64495087", "0.64495087", "0.6429092", "0.6428121", "0.6404058", "0.6404058", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.639544...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.6876632", "0.68532825", "0.68532825", "0.68532825", "0.68532825", "0.68521523", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517"...
0.0
-1
Validation function for `value` and `defaultValue`.
function selectValueType(props, propName, componentName) { if (props[propName] == null) { return null; } if (props.multiple) { if (!Array.isArray(props[propName])) { return new Error( ("The `" + propName + "` prop supplied to <select> must be an array if ") + ("`multiple` is ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'validateValue'(value) {}", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : pa...
[ "0.7436162", "0.6856192", "0.65868", "0.6431272", "0.64279246", "0.64279246", "0.6416799", "0.6416799", "0.6416799", "0.6316331", "0.6230596", "0.6195563", "0.616348", "0.61238676", "0.6050824", "0.6044303", "0.6036909", "0.59743184", "0.59359854", "0.58691984", "0.58653325",...
0.0
-1
Used to store ancestor hierarchy in top level callback
function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { this.topLevelType = topLevelType; this.nativeEvent = nativeEvent; this.ancestors = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) { baseVisitor = base; }\n var ancestors = []\n ;(function c(node, st, override) {\n var type = override || node.type;\n var isNew = node !== ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); ...
[ "0.6364524", "0.6364524", "0.63491213", "0.61941975", "0.60631853", "0.5991848", "0.59306824", "0.59277487", "0.5795952", "0.5744565", "0.57313555", "0.56544006", "0.56342113", "0.56317407", "0.5619732", "0.55988324", "0.5594276", "0.55820733", "0.5577004", "0.55657476", "0.5...
0.0
-1
Currently: The order that these are listed in the transaction is critical: Suppresses events. Restores selection range. Future: Restore document/overflow scroll positions that were unintentionally modified via DOM insertions above the top viewport boundary. Implement/integrate with customized constraint based layout sy...
function ReactReconcileTransaction() { this.reinitializeTransaction(); // Only server-side rendering really needs this option (see // `ReactServerRendering`), but server-side uses // `ReactServerRenderingTransaction` instead. This option is here so that it's // accessible and defaults to false when `Reac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function g(b,c){var d,e,f,g,j,k,l,m,p,r,s,u,v,w,z,B,E=b.length,F=\"\",G=y(),H=n(\"isRTL\");\n// calculate position/dimensions, create html\nfor(d=0;d<E;d++)e=b[d],f=e.event,g=A(e.start,e.start),j=A(e.end,e.start),k=C(e.col),l=D(e.col),m=l-k,\n// shave off space on right near scrollbars (2.5%)\n// TODO: move this t...
[ "0.59736633", "0.58972335", "0.58800626", "0.5859383", "0.58399767", "0.58103615", "0.5750382", "0.57492197", "0.5735197", "0.57191235", "0.57161826", "0.5696032", "0.5640733", "0.56405324", "0.56144387", "0.5600753", "0.550712", "0.55011517", "0.54886293", "0.54408425", "0.5...
0.0
-1
While `isCollapsed` is available on the Selection object and `collapsed` is available on the Range object, IE11 sometimes gets them wrong. If the anchor/focus nodes and offsets are the same, the range is collapsed.
function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { return anchorNode === focusNode && anchorOffset === focusOffset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n }", "isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n }", "function isCollapsed(anchorNode,anchorOffset,focusNode,focusO...
[ "0.76433", "0.76433", "0.7304045", "0.7304045", "0.7304045", "0.7304045", "0.722316", "0.70281345", "0.70281345", "0.70281345", "0.69812226", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0.6968087", "0...
0.7013561
63
Copyright 20132015, Facebook, Inc. All rights reserved. This source code is licensed under the BSDstyle license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.
function getActiveElement() /*?DOMElement*/ { try { return document.activeElement || document.body; } catch (e) { return document.body; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "function facebookLogin()\r\n{\r\n var fb = FBConnect.install();\r\n fb.connect(client_id,redir_url,\"touch\");\r\n fb.onConnect = onFBConnected;\r\n \r\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", ...
[ "0.5550843", "0.551663", "0.5481719", "0.5373153", "0.5373153", "0.53699034", "0.5276141", "0.5203976", "0.5184821", "0.5169694", "0.5157726", "0.51453716", "0.51446515", "0.50592446", "0.50554466", "0.50266", "0.50152516", "0.50012594", "0.497563", "0.497563", "0.49752107", ...
0.0
-1
Try/catch helper to minimize deoptimizations. Returns a completion record like context.tryEntries[i].completion. This interface could have been (and was previously) designed to take a closure to be invoked without arguments, but in all the cases we care about we already have an existing method we want to call, so there...
function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryCatch(fn, obj, arg) { // 59\n try { // 60\n return { type: \"normal\", arg: fn.call(obj, arg) }; ...
[ "0.5071568", "0.5061275", "0.4849881", "0.47927505", "0.47927505", "0.47927505", "0.47927505", "0.47927505", "0.47831497", "0.47831497", "0.47063333", "0.46893752", "0.46678346", "0.4655878", "0.46554154", "0.46554154", "0.46554154", "0.46371436", "0.46213374", "0.46146342", ...
0.0
-1
Dummy constructor functions that we use as the .constructor and .constructor.prototype properties for functions that return Generator objects. For full spec compliance, you may wish to configure your minifier not to mangle the names of these two functions.
function Generator() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tempCtor() {}", "function temporaryConstructor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function HelperConstructor() {}", "function DummyClass() {\r\n // ...
[ "0.7218366", "0.70249206", "0.69523525", "0.69523525", "0.69523525", "0.69523525", "0.69523525", "0.69523525", "0.6760518", "0.65990555", "0.6572468", "0.6572468", "0.6572468", "0.64856845", "0.644338", "0.6399951", "0.63927424", "0.6376415", "0.6376415", "0.6337515", "0.6277...
0.0
-1
Helper for defining the .next, .throw, and .return methods of the Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function(method) { prototype[method] = function(arg) { return this._invoke(method, arg); }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg);};});}", "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return th...
[ "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.71796995", "0.6995674", "0.6995674", "0.6973852", "0.6952658", "0.6952658", "0.6909098", "0.6857905", "0.6825829", "0.68245625", "0.68245625", "0.68145424", "0.67915004", "0.67915004", "0.6...
0.69677955
47
This invoke function is written in a style that assumes some calling function (or Promise) will handle exceptions.
function invoke(method, arg) { var result = generator[method](arg); var value = result.value; return value instanceof AwaitArgument ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) : Promise.resolve(value).then(function(unwrapped) { // When a yielded Promise...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tryInvoke(value, ...args) {\n try {\n return isFunc(value) ? value.call(this, ...args) : value;\n }\n catch (e) {\n if (console && console.error) { console.error(e); } // eslint-disable-line no-console\n this.__notify(EV.SUPPRESSED_ERROR, e, e.stack || 'No stack available.');\n return ...
[ "0.65030974", "0.6345338", "0.63076305", "0.6155599", "0.61024666", "0.6042785", "0.5987135", "0.59529126", "0.59378594", "0.59143853", "0.5795997", "0.57897764", "0.57897764", "0.57897764", "0.57897764", "0.57897764", "0.5751293", "0.5719402", "0.5719402", "0.5719402", "0.57...
0.5762907
19
! Copyright (c) 2015 Jed Watson. Licensed under the MIT License (MIT), see
function classNames() { var classes = ''; var arg; for (var i = 0; i < arguments.length; i++) { arg = arguments[i]; if (!arg) { continue; } if ('string' === typeof arg || 'number' === typeof arg) { classes += ' ' + arg; } else if (Object.prototype.toString.call(arg) === '[object Array]'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "function setup() {\n\n\n}", "function setup() {\n\n\n}", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n ...
[ "0.6283891", "0.6219776", "0.58091205", "0.5657888", "0.5657888", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", "0.5614612", ...
0.0
-1
TODO: listen for onTransitionEnd to remove el
function getElementsAndSelf(root, classes) { var els = root.querySelectorAll("." + classes.join(".")); els = [].map.call(els, function (e) { return e; }); for (var i = 0; i < classes.length; i++) { if (!root.className.match(new RegExp("\\b" + classes[i] + "\\b"))) { return els; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n this.#el.remove();\n }", "beforeUnmount() {\n // reference to detached method\n const { detached } = this.$options;\n\n // no longer attached, clean up\n if (!this.$el.offsetParent) {\n detached.call(this);\n return;\n }\n\n // if we're still attached ...
[ "0.6773619", "0.6505612", "0.63664275", "0.63651705", "0.62611115", "0.625463", "0.6214643", "0.62132686", "0.6191975", "0.6173349", "0.6162306", "0.6147926", "0.6111394", "0.6083245", "0.6082614", "0.60710853", "0.60428375", "0.6027296", "0.60025895", "0.59797406", "0.597967...
0.0
-1
Create chainable isRequired validator Largely copied directly from:
function createChainableTypeChecker(validate) { function checkType(isRequired, props, propName, componentName) { componentName = componentName || ANONYMOUS; if (props[propName] == null) { if (isRequired) { return new Error("Required prop `" + propName + "` was not specified in " + "`" + com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createChainableTypeChecker(validate){function checkType(isRequired,props,propName,componentName){componentName=componentName||'<<anonymous>>';if(props[propName]==null){if(isRequired){return new Error('Required prop \\''+propName+'\\' was not specified in \\''+componentName+'\\'.');}}else {return validate(...
[ "0.66304773", "0.65625143", "0.6526622", "0.6526622", "0.6526622", "0.6526622", "0.6526622", "0.6513142", "0.6513142", "0.6513142", "0.6513142", "0.6513142", "0.6513142", "0.6513142", "0.6513142", "0.65123487", "0.6499737", "0.64783025", "0.64783025", "0.6445372", "0.64200205...
0.6456962
19
Copyright 20132015, Facebook, Inc. All rights reserved.
function shallowEqual(objA, objB) { if (objA == null || objB == null) return false; var keysA = Object.keys(objA), keysB = Object.keys(objB); if (keysA.length !== keysB.length) return false; for (var i = 0; i < keysA.length; i++) if (!has(objB, keysA[i]) || !eql(objA[keysA[i]], objB[keysA[i]]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function facebookLogin()\r\n{\r\n var fb = FBConnect.install();\r\n fb.connect(client_id,redir_url,\"touch\");\r\n fb.onConnect = onFBConnected;\r\n \r\n}", "function facebookLogin() {\n FB.getLoginStatus(function(response) {\n statusChangeCallback(response);\n });\n}", "_FBPReady() {\...
[ "0.6403838", "0.5990239", "0.5775455", "0.57310593", "0.5716764", "0.5686572", "0.5642139", "0.5642139", "0.56318253", "0.5597803", "0.55875367", "0.55748606", "0.55744165", "0.5556378", "0.55543345", "0.5532666", "0.55124277", "0.5495316", "0.54561985", "0.54510796", "0.5444...
0.0
-1
super lean animate function for transitions doesn't support all translations to keep it matching the jquery API code in part from: Zepto 1.1.4 | zeptojs.com/license
function animate(node, properties, duration, easing, callback) { var cssProperties = [], fakeEvent = { target: node, currentTarget: node }, cssValues = {}, transforms = '', fired; if (typeof easing === 'function') callback = easing, easing = null; if (!transitionProps.end) durat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}", "function AnimateDomUtils($mdUtil,$q,$timeout,$mdConstant,$animateCss){var self;return self={/**\n\t *\n\t */translate3d:function translat...
[ "0.7027742", "0.63054734", "0.62597847", "0.6123864", "0.609351", "0.6053469", "0.59511167", "0.59511167", "0.59511167", "0.5940209", "0.5940209", "0.5940209", "0.58800757", "0.58748746", "0.58748746", "0.58748746", "0.58748746", "0.5874559", "0.58707166", "0.58599305", "0.58...
0.0
-1
For the basic usage of CSelect simply pass an array of cases as created by ccase(...). However, to provide some flexibility the parameter of CSelect is processed as follows: For an array, process all its elements recursively. For a function, apply the function to the context and process the return value recursively. An...
function CSelect(rawCases) { return new Type("select", function makeSelect(ctx) { var value = ctx.value; var updateTo = ctx.updateTo; var problems = ctx.problems; var cases = processCases(ctx, rawCases); var defaultCase = cases.find(function (x) { return x.isDefault; }) || findCaseWithBestMode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function popolaSelect($select, array, fnc) {\n var str = array.reduce(fnc, '<option></option>');\n return $select.html(str);\n }", "function selcall() {\r\n let i = comboSel.value;\r\n if (i == -1) return;\r\n\r\n let obj = apitool.comboList[i];\r\n let fn = obj.fn;\r...
[ "0.5297352", "0.51430666", "0.5102961", "0.5055427", "0.49605533", "0.49394047", "0.49188426", "0.48411113", "0.4812162", "0.48087618", "0.47848162", "0.4745038", "0.4724531", "0.4716511", "0.4711094", "0.47110227", "0.46972254", "0.46857616", "0.4661751", "0.4661751", "0.466...
0.6948223
0
TODO Use a CSV lib?
function csvLine(fields) { var line = ""; fields.forEach(function (field) { if (line.length > 0) line += ";"; line += typeof field === "number" ? field : '"' + field.toString().replace(/"/g, '""') + '"'; }); line += "\n"; return line; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get csv() {try {return wd_csv_array(this.text);} catch(e){return null;}}", "makeCSV(content) {\n let csv = \"\";\n content.forEach((value) => {\n value.forEach((item, i) => {\n let innerValue = item === null ? \"\" : item.toString();\n let result = innerValue.replace(/\"/g, '\"\"');\n ...
[ "0.6897183", "0.66665107", "0.66332966", "0.6618135", "0.6429308", "0.64249617", "0.63947284", "0.63631785", "0.6349545", "0.6332845", "0.6290446", "0.6273029", "0.6245024", "0.62287647", "0.621888", "0.6199111", "0.6190507", "0.6171885", "0.61530703", "0.6145429", "0.6128561...
0.6147282
19
TODO Replace itemList with something more generic, e.g., a function mapping the item to extra info (but in what format?).
function BOMView(name, itemList, bom) { _classCallCheck(this, BOMView); this.name = name; var itemMap = {}; itemList.forEach(function (entry) { return itemMap[entry.itemId] = entry; }); this.__itemMap = itemMap; this.__bom = bom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function item_info(item) {\n return parent.G.items[item.name];\n}", "function ListItem() {}", "function ListItem() {}", "function ListItem() {}", "function ListItem(title, body) {\n this.id = Date.now();\n this.title = title;\n this.body = body;\n this.importance = 'Normal';\n this.complete = null;\n...
[ "0.69625705", "0.6584963", "0.6584963", "0.6584963", "0.6507081", "0.6491507", "0.6467453", "0.6396316", "0.6214888", "0.6184628", "0.6158149", "0.6150507", "0.612892", "0.6105016", "0.60822874", "0.6065588", "0.6029702", "0.60154307", "0.6009196", "0.60074246", "0.60064507",...
0.0
-1
console.log(newMatrix); // [[1, 4, 3], [5, 7, 9], [8, 2, 6]] console.log(matrix); // [[1, 5, 8], [4, 7, 2], [3, 9, 6]] let newMatrix2 = transpose2(matrix); console.log(newMatrix2); // [[1, 4, 3], [5, 7, 9], [8, 2, 6]] console.log(matrix); // [[1, 5, 8], [4, 7, 2], [3, 9, 6]] Further Exploration
function transposeInPlace(matrix) { let arrayJSON = JSON.stringify(matrix); let arrayCopy = JSON.parse(arrayJSON); for (let rowIndex = 0; rowIndex < matrix.length; rowIndex += 1) { let currentRow = matrix[rowIndex]; for (let colIndex = 0; colIndex < currentRow.length; colIndex += 1) { // rowIndex a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transpose(matrix) {\n var new_matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n new_matrix[0] = matrix[0];\n new_matrix[1] = matrix[4];\n new_matrix[2] = matrix[8];\n new_matrix[3] = matrix[12];\n new_matrix[4] = matrix[1];\n new_matrix[5] = matrix[5];\n new_matrix[6] = matrix[9];\n ne...
[ "0.8407982", "0.82449645", "0.8143768", "0.8024621", "0.79860854", "0.79745", "0.7950867", "0.7938996", "0.79258466", "0.78982866", "0.7829388", "0.7806819", "0.7729464", "0.7726064", "0.7719491", "0.7537049", "0.75156605", "0.74526554", "0.73997486", "0.7382738", "0.7357995"...
0.8366177
1
Handle fetch and JSON parsing of payload
async function getJSON(url) { try { const response = await fetch(url); return await response.json(); } catch (error) { throw error; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchEncodeJSON () {\n return next => action => action.type === FETCH\n ? next(maybeConvertBodyToJSON(action))\n : next(action)\n}", "function handleFetch(dispatch, payload) {\n const {endpoint, onRequest, onSuccess, onError, blocking} = payload;\n\n dispatch(fetchRequest(endpoint, blocking));\...
[ "0.6514646", "0.6193566", "0.61086285", "0.6000685", "0.59892124", "0.5931316", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", "0.58959144", ...
0.0
-1
Get our set of employees, display the initial gallery, and build our details modal
function init() { getJSON(requestURL + `?nat=US&results=${employeeCount}`) .then(response => fetchedEmployees = response.results) .then(() => showGallery(fetchedEmployees)) .catch(e => console.error('Error in fetch:', e)); createModal(); createSearch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayEmployees(personData) {\n employees = personData;\n let employeeHTML = \"\";\n employees.forEach((employee, index) => {\n let { email, location: { city, street, state, postcode}, login: {username}, name, phone, picture } = employees[index] || {};\n employeeHTML += `\n <d...
[ "0.6921201", "0.6879872", "0.68311924", "0.6763192", "0.6686786", "0.6594511", "0.65887696", "0.6554641", "0.6517241", "0.65165067", "0.6500431", "0.64548224", "0.6409622", "0.6402224", "0.63764906", "0.63732517", "0.63687575", "0.6331381", "0.63015354", "0.62960607", "0.6272...
0.6547727
8
Create a modal window for displaying a detail view of an employee record, including Prev and Next buttons for navigating to other records currently on the grid.
function createModal() { const container = createDiv('modal-container'); hide(container); const modal = createDiv('modal'); const modalInfo = createDiv('modal-info-container'); const closeButton = document.createElement('button'); closeButton.type = 'button'; closeButton.id = 'modal-cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showDetail() {\n showModal('detail.html');\n}", "function showEmployeeModal(index, data){\n let current = data.results[index];\n const cLocation = data.results[index].location;\n const dob=current.dob.date;\n let modalHtml = `<div class=\"modal\">\n <button type=\"button\...
[ "0.6673489", "0.66000247", "0.653376", "0.6269468", "0.6190032", "0.5986574", "0.5951281", "0.59227836", "0.58932716", "0.58367664", "0.58268243", "0.5803295", "0.57943267", "0.5784403", "0.57837856", "0.57324517", "0.572674", "0.57202864", "0.5696506", "0.5658514", "0.564679...
0.594362
7
Disable Prev or Next buttons if we're at the first or last displayed record, respectively.
function updateNavButtons() { const prevButton = document.getElementById('modal-prev'); const nextButton = document.getElementById('modal-next'); if (currentEmployeeIndex === 0) { prevButton.disabled = true; } else { prevButton.disabled = false; } if (currentEmployeeIndex === d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableButtons(counter_max, counter_current){\n $('#previous, #next').show();\n if(counter_max == counter_current){\n $('#next').hide();\n } else if (counter_current == 1){\n $('#previous').hide();\n }\n }", "function theQwertyGrid_prevNextDisable() {...
[ "0.7214656", "0.717111", "0.7153968", "0.7140403", "0.69934714", "0.69934714", "0.6966832", "0.69651246", "0.69579333", "0.69579333", "0.6929837", "0.6929837", "0.6929837", "0.69098055", "0.6907674", "0.6899595", "0.6885015", "0.6878935", "0.6870164", "0.6870164", "0.6804279"...
0.62071097
39
Detect User Agent Script This is by far the best detection script I've found. Using javascript means that this will work with caching. W00t. Adds user agent classes to the element on your page including OS and browser version. This script has support for about every device imaginable so if you want to create specific s...
function updateViewportDimensions(){var e=window,i=document,o=i.documentElement,t=i.getElementsByTagName("body")[0],n,r;return{width:e.innerWidth||o.clientWidth||t.clientWidth,height:e.innerHeight||o.clientHeight||t.clientHeight}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detect(ua){var os={};var browser={};var webkit=ua.match(/Web[kK]it[\\/]{0,1}([\\d.]+)/);var android=ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);var ipad=ua.match(/(iPad).*OS\\s([\\d_]+)/);var ipod=ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);var iphone=!ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);var webos=ua.m...
[ "0.6108605", "0.6040027", "0.60321814", "0.60285985", "0.60130674", "0.60084957", "0.5970292", "0.5957303", "0.59316176", "0.59263015", "0.59263015", "0.59263015", "0.59263015", "0.59263015", "0.59263015", "0.59263015", "0.59263015", "0.59263015", "0.59218866", "0.59110314", ...
0.0
-1
Set the proper sizes on the containers and animate the content in.
function _showContent(){ $('.pp_loaderIcon').hide(); // Calculate the opened top position of the pic holder projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); if(projectedTop < 0) projectedTop = 0; $ppt.fadeTo(settings.animation_speed,1); // Resize t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "function update_containersize() {\n $container.css(\"width\", $('.showcase-container').width() + \"px\");\n $contain...
[ "0.7067953", "0.6766299", "0.63923717", "0.6335599", "0.6331017", "0.6145443", "0.61117905", "0.610056", "0.60934097", "0.6047635", "0.6019949", "0.5980005", "0.59659106", "0.5946842", "0.59095097", "0.5907477", "0.589799", "0.5882557", "0.5870143", "0.5867053", "0.5860923", ...
0.0
-1
jquery.mb.YTPlayer 07032016 _ jquery.mb.components
function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thememascot_YTPlayer() {\n $(\".player\").mb_YTPlayer();\n }", "function videoPlayer() {\n if ($(\".playerVideo\").length>0) { //If there are video backgrounds\n $(\".playerVideo\").mb_YTPlayer();\n jQuery('.playerVideo').on(\"YTPPause\",function(){\n jQuery('.play-video').removeCl...
[ "0.82765067", "0.6835946", "0.65724987", "0.653798", "0.6426381", "0.6360469", "0.6320323", "0.6320279", "0.62725866", "0.626447", "0.62492734", "0.6218738", "0.6218738", "0.6218738", "0.62105393", "0.6089262", "0.6089262", "0.6089262", "0.6035908", "0.6014764", "0.59999233",...
0.63185114
18
/ Author : Vincent Garreau vincentgarreau.com / MIT license: / Demo / Generator : vincentgarreau.com/particles.js / GitHub : github.com/VincentGarreau/particles.js / How to use? : Check the GitHub README / v2.0.0
function hexToRgb(e){var a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function launchParticlesJS(e, a) {\n\t\n function i() {\n pJS.fn.canvasInit(), pJS.fn.canvasSize(), pJS.fn.canvasPaint(), pJS.fn.particlesCreate(), pJS.fn.particlesDraw(), pJS.fn.densityAuto()\n }\n\n function t() {\n pJS.fn.particlesDraw(), pJS.fn.requestAnimFrame = requestAnimFrame(t)\n ...
[ "0.78493994", "0.78298044", "0.781464", "0.76978165", "0.7522855", "0.7513609", "0.74958235", "0.729446", "0.72885376", "0.7134725", "0.71223277", "0.71168816", "0.7101187", "0.70566833", "0.69253576", "0.68960816", "0.68871737", "0.6874869", "0.6849341", "0.68456954", "0.684...
0.0
-1
helper function to map args
function format(o) { //result string var s = ''; //typeof next argument switch(typeof(o)) { case 'undefined': s += 'undefined' break; case 'object': if(o && o[Symbol.toStringTag]) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertArgs(args, fromKey, toKey) {\n return args.map(arg => convert(arg, fromKey, toKey));\n}", "function argsFor() {\n\n}", "function my_map ( func, arg_list)\n{\n\t result = [];\n\t for(var i = 0; i < arg_list.length; i++ )\n\t {\n\n\t\t result.push( func( arg_list[i] ) )\n\t }\n\n\t return resul...
[ "0.69847685", "0.69458294", "0.6615481", "0.6335837", "0.63350046", "0.6231508", "0.61513776", "0.61318487", "0.61279684", "0.61279684", "0.61279684", "0.61279684", "0.61177933", "0.60357827", "0.60223025", "0.5951338", "0.5951338", "0.5938453", "0.5927482", "0.58952284", "0....
0.0
-1
Valida os campos de um usuario
function validar(u) { let erros = []; // EXEMPLOS DE ERROS: if (!u) return { pass: false, erros: ["Usuário não informado"] }; checkField(u, "nome", erros); checkField(u, "dataNascimento", erros); checkField(u, "email", erros); if (u?.nome && u.nome.length < 2) erros.push("O nome deve ter pelo menos ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validar(){\n\tvar valNom = valNombre(); \n\tvar valApe = valApellido();\n\tvar valTel = valNumero();\n\tvar valMayor = valEdad();\n\tvar email = valEmail();\n\tvar ident = identificador();\n}", "function validarRegistroUsuario(usuario){\n if (usuario == undefined || usuario == null) {\n return fal...
[ "0.6840887", "0.67348963", "0.6709995", "0.65988773", "0.6566579", "0.65255576", "0.6513622", "0.651237", "0.64962596", "0.6431083", "0.64299434", "0.64034", "0.6402704", "0.64009744", "0.63601476", "0.6323935", "0.6317307", "0.6309026", "0.6305467", "0.62981516", "0.6273977"...
0.6664934
3
and console.logs the multiplication table for that number (just multiply by the numbers 1 through 10) For example, showMultiplicationTable(7) should output 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 7 x 10 = 70
function showMultiplicationTable(num){ // var value; for (var i = 1; i < 11; i++) { console.log(num + " x " + i + " = " + num*i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMultiplicationTable(number) {\n for (var i = 1; i <= 10; i++) {\n var result = number * i;\n console.log(number + \" x \" + i + \" = \" + result);\n }\n return console.log(\"Here is the table you requested!\");\n }", "function showMultiplicationTable() {...
[ "0.8667444", "0.85941154", "0.8564381", "0.8540843", "0.8465121", "0.84338343", "0.83780694", "0.8324226", "0.82004005", "0.8165539", "0.78214586", "0.7789388", "0.7701416", "0.769704", "0.75440955", "0.75067014", "0.7486938", "0.74575585", "0.74522394", "0.74097794", "0.7391...
0.8713203
0
============================================================== Create a for loop that uses console.log to create the output shown below. 1 22 333 4444 55555 666666 7777777 88888888 999999999
function numberTriangle(){ var numRows = 9; var output; for (var i = 1; i <= numRows; i++){ output=""; for(var j = 1; j<=i; j++){ output+=i; } console.log(output); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logNums(numbers) {\n for (let number of numbers) {\n console.log(number);\n }\n}", "function main (n) {\n for (let i = n - 1; i >= 0; i--) {\n console.log(' '.repeat(i).padEnd(n, '#'))\n }\n return ''\n}", "function print1to20(){\n for (let i = 1; i < 21; i++) {\n console.log(i)\n...
[ "0.6959122", "0.68925834", "0.6891892", "0.686456", "0.68537825", "0.68457294", "0.6840259", "0.6830083", "0.68176806", "0.6777745", "0.67722726", "0.6756175", "0.67377424", "0.6693857", "0.6690948", "0.669077", "0.66873366", "0.66861844", "0.6664987", "0.6629376", "0.662838"...
0.0
-1
Flatten a given array, eliminating nested and empty arrays. Do not alter it; return a new array retaining order. Given: [1, [2, 3], 4, [ ] ] return [1, 2, 3, 4]
function flatten(arr) { let newArr = []; for(let i=0; i<arr.length; i++) { if(typeof(arr[i]) === "number") { newArr.push(arr[i]); } else if(Array.isArray(arr[i])) { // newArr = [...newArr, ...arr[i]] for(let j=0; j<arr[i].length; j++) { newArr.push(arr[i][j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flatten(array) {\n var newArr = [];\n (function recur(arr){\n arr\n .forEach(function(el) {\n if (Array.isArray(el) {\n recur(el);\n } else {\n newArr.push(el);\n }\n });\n })(array);\n return newArr;\n}", "function _flatten(array) {\n var i = 0,\n ...
[ "0.80306727", "0.8022616", "0.79966205", "0.7867987", "0.7848779", "0.7829917", "0.7818204", "0.7814699", "0.78032523", "0.7784294", "0.7780222", "0.7779546", "0.7768058", "0.7762128", "0.77585596", "0.7756251", "0.7753239", "0.7744742", "0.7730621", "0.77212155", "0.7706185"...
0.0
-1
Remove array duplicates. Do not alter the original array. Return a new array with the results 'stable' (preserve the original order). Given [1, 2, 1, 3, 4, 2] return [1, 2, 3, 4]
function removeDuplicates(array) { const arr2 = []; for (let i = 0; i < array.length; i++) { let exists = false; for (j = 0; j < arr2.length; j++) { if (array[i] === arr2[j]) { exists = true; break; } } if (!exists) { arr2.push(array[i]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RemoveDupes(arr){\n var newarr = []\n for(var i = 0; i < arr.length; i ++){\n if(arr[i] !== arr[i - 1]){\n newarr.push(arr[i]);\n }\n }\n return newarr;\n } //ONLY WORKS IF ARRAY VALUES ARE IN ORDER", "fu...
[ "0.8181019", "0.8138399", "0.80928725", "0.80819017", "0.80421245", "0.7952332", "0.7929735", "0.79244685", "0.79127693", "0.7892096", "0.7848506", "0.7839825", "0.7816333", "0.77994275", "0.77908283", "0.77867776", "0.77636933", "0.775457", "0.77474177", "0.77457803", "0.774...
0.7728444
22
Part 2: work 'in place' in the given array. Alter the order if necessary (stability isn't required). Given [1, 2, 1, 3, 4, 2] we might return [1, 2, 4, 3].
function removeDupes(arr) { for(var i=1; i<arr.length; i++) { for(var j=0; j<i; j++) { if(arr[i] === arr[j]) { arr[i] = arr.pop(); i--; } } } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swaptocenter(arr){\n for(var i=0;i<arr.length/2;i+=2){\n var temp=arr[i];\n arr[i]=arr[arr.length-1-i];\n arr[arr.length-1-i]=temp;\n }\n return arr;\n}", "function four(arr){\n for(var i = 0; i < arr.length; i+1){\n var temp = arr[i];\n arr[i] = arr[i+1];\...
[ "0.6740266", "0.6710956", "0.65593374", "0.6539514", "0.63688743", "0.63396394", "0.63092357", "0.62380564", "0.620308", "0.61504304", "0.6138375", "0.6103261", "0.6084977", "0.6082401", "0.6074703", "0.6074703", "0.60731804", "0.6071695", "0.6062494", "0.6060128", "0.6057362...
0.0
-1
Part 3: work 'in place' and make it 'stable'.
function removeDupes(arr) { for(var i=1; i<arr.length; i++) { for(var j=0; j<i; j++) { if(arr[i] === arr[j]) { for(var k=i; k<arr.length-1; k++) { arr[k] = arr[k+1] } arr.pop(); i--; } } } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reOrderBasicOperation() {\n localStack = [x, z, t, 0]\n }", "moveIsSmart() {}", "function test14() {\n reset();\n currentPiece = new I();\n let temp;\n while (!rightCollisionCheck()) {\n currentPiece.moveHor(1)\n }\n temp = copyPiece(currentPiece)\n return rotateCollisi...
[ "0.56146747", "0.543403", "0.5300203", "0.5280656", "0.5276784", "0.52736795", "0.52736795", "0.52183557", "0.518341", "0.5171945", "0.5161862", "0.5146313", "0.5141879", "0.5133761", "0.5113697", "0.51111525", "0.51100135", "0.51087064", "0.5083992", "0.5083429", "0.5078119"...
0.0
-1
isPrime Write a function that given a positive nonzero integer returns whether the value is a prime number (true/false) Given: isPrime(1) return false (1 is a special case) Given: isPrime(4) return false (is divisible by 2) Given: isPrime(104729) return true (only divisible by 1 and itself)
function isPrime(val) { for (var i = 2; i < Math.sqrt(val+1) | 0; i ++){ if (val % i == 0) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPrime(number) {\n return false;\n}", "function isPrime(prime) {\n for(var i=2; i<prime; i++) {\n if(prime%i === 0)\n return false;\n }\n return true;\n}", "function isPrime(n) {\n\t// TODO:\n}", "function isPrimeNumber(number) {\n    if (number <= 0) {\n        return false;\n    }\n  ...
[ "0.8531106", "0.85175866", "0.83617365", "0.83387125", "0.8335202", "0.8313789", "0.82858497", "0.8281674", "0.82802606", "0.82710755", "0.82146573", "0.820671", "0.81965774", "0.81908476", "0.8177944", "0.8162463", "0.81513757", "0.81504637", "0.8148227", "0.81366956", "0.81...
0.79630417
68
console.log(isPrime(104729)); Large Primes Using your isPrime function write a function that takes a number "n" and returns the nth prime number Given: findPrime(1) return 2 (2 is the first prime number) Given: findPrime(5) return 11 Given: findPrime(10000) return 104729
function largePrime(val) { var count = 0; var primenum = 1 while (count < val) { primenum ++; if (isPrime(primenum)) { count ++; } } return primenum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findSmallerPrimes() {\n for (let i = 0; i < 1000; i++) {\n isPrime(i);\n }\n}", "function isPrime(n) {\n\t// TODO:\n}", "function isPrime(n)\r\n{\r\n if(n%2!==0){\r\n return true\r\n \r\n }\r\n}", "function isPrime(n)\r\n{\r\n var flag=0;\r\n for(let i=2 ; i < n/2 ; i++) {\r\n...
[ "0.8161135", "0.79669994", "0.7931086", "0.77481276", "0.7728962", "0.7724762", "0.7692641", "0.7692641", "0.76689005", "0.7650072", "0.7601758", "0.75927126", "0.7559186", "0.75531554", "0.754653", "0.7545417", "0.7543539", "0.75339425", "0.752951", "0.75269276", "0.75017893...
0.74587107
26
this assumes a normalized multiframe input and will create a multiframe derived image
derive() { super.derive(); this.assignToDataset({ SOPClassUID: DicomMetaDictionary.sopClassUIDsByName.EnhancedSR, Modality: "SR", ValueType: "CONTAINER" }); this.assignFromReference([]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xMultiImage(aImgID) {\n this.ImgID = aImgID;\n this.Images = new Array();\n var a = xMultiImage.arguments;\n for (var i = 1; i < a.length; i++) {\n this.Images[i-1] = xImage(a[i]);\n }\n}", "slimTransformMulti(data, slim){\n \n \n var base64 = 0;\n var large_base64 = 0;\n ...
[ "0.57407165", "0.5400008", "0.5328694", "0.52800584", "0.5258427", "0.5228578", "0.52174056", "0.5192336", "0.5188614", "0.51761883", "0.51397675", "0.5136353", "0.5127011", "0.50876516", "0.5069545", "0.5048723", "0.50107825", "0.5008257", "0.49368718", "0.49067777", "0.4900...
0.0
-1
Extract only humanreadable text from HTML
function htmlToText(html) { return _HtmlEntities.reduce(function (pv, cv, i, a) { return pv.replace(cv[0], cv[1]); }, html.replace(/(<.+?>)/g, '')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getText(html) { // Returns text from HTML while trying to preserve structure\n return html.replace(/<[^>]+>/g, '');\n // https://stackoverflow.com/a/41756926/6364386\n}", "function getTextFromHtml(html) {\n\treturn htmlToText.fromString(html);\n}", "function htmlToText(e){return e.replace(/<\\/div>\...
[ "0.7373087", "0.684822", "0.66719484", "0.66715217", "0.6613542", "0.65062547", "0.641796", "0.6388861", "0.63813114", "0.634276", "0.6341939", "0.6336863", "0.6272402", "0.6270194", "0.6240155", "0.6199341", "0.6155875", "0.61330736", "0.6125161", "0.60779357", "0.6043862", ...
0.6446543
6
returns the sys id of newly created record with applied template values
function useTemplate(tblName,template_sysid){ var tmp = new GlideRecord(tblName); tmp.initialize(); var gtemp= new GlideTemplate.get(template_sysid).apply(tmp); // apply template to new record return tmp.insert(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createComputerID () {\n return \"comp\"+(+Date.now());\n}", "createId() {\n return this.firestore.collection('_').doc().id;\n }", "createId () {\n\t\tthis.attributes.id = this.useId || this.collection.createId();\n\t}", "get id () {\n return this.constructor.name.replace(/(\\w+)Templat...
[ "0.5676655", "0.5543672", "0.552322", "0.55105406", "0.5496589", "0.54623145", "0.541718", "0.53742766", "0.53597826", "0.5233419", "0.5207348", "0.519006", "0.5185439", "0.5094162", "0.50934833", "0.5085243", "0.5071967", "0.5042171", "0.5040723", "0.50402707", "0.5040097", ...
0.678452
0
Build handler to open/close a SideNav; when animation finishes report completion in console
function buildDelayedToggler(navID) { return debounce(function() { // Component lookup should always be available $mdSidenav(navID) .toggle() .then(function() { $log.debug('toggle ' + navID + ' is done'); }); }, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animationHandler() {\n if (opened === \"menu \") {\n setOpened(\"menu opened\");\n setAriaExpanded(\"opened\");\n } else {\n setOpened(\"menu \");\n setAriaExpanded(\"\");\n }\n }", "function side_nav_open(){\n// $('.side_nav').addCl...
[ "0.6392903", "0.6295631", "0.62954426", "0.61788875", "0.611974", "0.6098199", "0.60697216", "0.6021193", "0.6016281", "0.5876806", "0.5818141", "0.5808913", "0.5760447", "0.57573265", "0.5742487", "0.5723349", "0.57107806", "0.57054293", "0.5688065", "0.5686327", "0.5675516"...
0.0
-1
The screen object is responsible for keeping track of the modelview and projection matrices, rotations, etc.
function screen() { /** Keep track of the current height of the canvas */ this.height = 10; /** Keep track of the curren width of the canvas */ this.width = 10; /** Keep track of the minimum x value we should render */ this.minx = 0; /** Keep track of the minimum y value we should render */ this.miny = 0; /**...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Screen(stage) {\n this.stage = stage;\n this.screenObjects = [];\n }", "display() {\n this.scene.pushMatrix();\n this.scene.translate(10.6,1.7,9.2);\n this.scene.scale(0.1,0.1,0.1);\n this.board.display();\n this.scene.popMatrix();\n\t}", ...
[ "0.6796432", "0.67048365", "0.65999776", "0.6538944", "0.65204465", "0.6452053", "0.6430167", "0.6410744", "0.6370453", "0.63697535", "0.6312319", "0.6311302", "0.62680346", "0.6242679", "0.6225263", "0.6218332", "0.6192301", "0.61606085", "0.6146126", "0.61259484", "0.611773...
0.7444507
0
[1,2,3,4,5,6],5 => TRUE [1,2,3,4,5,6],9 => FALSE MONDAY SOLUTIONS
function reverserArr(arr){ var newArr = [] for(var i = arr.length-1; i >=0 ;i--){ newArr.push(arr[i]) } return newArr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function secondProblem(){\n\tconsole.log('\\nProblem 2\\nDivisible by 7 and 5 by the same time:');\n\tvar arr = [3, 0, 5, 7, 35, 140],\n\t\tii = 0,\n\t\tlen = arr.length;\n\tfor (ii; ii < len; ii++){\n\t\tif ((arr[ii] % 5) === 0 && (arr[ii] % 7) === 0){\n\t\t\tconsole.log('\\t\"' + arr[ii] + '\": true');\n\t\t} el...
[ "0.59059256", "0.5752686", "0.5699053", "0.5684191", "0.56784725", "0.567631", "0.5555936", "0.5464481", "0.5458925", "0.5444896", "0.5444148", "0.5401996", "0.539897", "0.53774464", "0.53548545", "0.53535634", "0.53535634", "0.5344557", "0.53439355", "0.53403634", "0.5335926...
0.0
-1
pushFront([1,2,3,4,5] , 9) popFront([1,2,3,4,5])
function twoNumSum(arr){ var newArr = [] for(var i = 0; i < arr.length;i++){ for(var j = 0; j < arr.length; j++){ newArr.push(arr[i] + arr[j]) } } return newArr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushFront(arr, val) {\n\n }", "function PopFront(arr){\n for(var i = 0; i < arr.length - 1; i++){\n arr[i] = arr [i +1];\n }\n arr.pop();\n return arr;\n }", "function popFront(arr){\n var beginning = arr[0]\n var newArr = []\n ...
[ "0.73695683", "0.73289794", "0.7314954", "0.7279679", "0.7270539", "0.71952456", "0.7188331", "0.7170987", "0.7156664", "0.71344745", "0.71326774", "0.71232647", "0.71042186", "0.7090633", "0.7052046", "0.7026008", "0.69999737", "0.6923377", "0.68945026", "0.6892184", "0.6883...
0.0
-1
A beautiful blue button that has simply text OK inside it
render() { var labelText = undefined // optional props, and a default value if no props found if (this.props.greet) { labelText = this.props.greet } else { labelText = 'OK' } return ( <div><button>{labelText}</button></div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function okButton(options = {}) {\n options.accept = true;\n return createButton(options);\n }", "render(text) {\n return `win-button>${text || 'Ok'}<win-button`;\n }", "function addSubmitButton (icon, style, text, check, datai18n) {\n const button = $(\n '<button class=\"btn '...
[ "0.7533178", "0.6729249", "0.6728327", "0.6573629", "0.64255226", "0.64090663", "0.6374502", "0.632801", "0.63265574", "0.63177484", "0.62845254", "0.621501", "0.6191881", "0.6178902", "0.6168145", "0.6154008", "0.61456555", "0.6128335", "0.61256593", "0.6121172", "0.60690266...
0.0
-1
To make functions private, we scope them to the constructor
function updateHealth(health) { health += 10; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_privateFunction() {}", "function _privateFn(){}", "privateMethod() {\n\t}", "function privateFunction(){\n\t// That will be used only on this file\n}", "function privateFunction() {\n\n}", "function constructor() {\n // Private members\n var privateVar1 = \"Nishant\";\n var privateVar2 = [1,2,3...
[ "0.7905309", "0.7740841", "0.75691587", "0.7318599", "0.7180307", "0.69213593", "0.68625444", "0.6850394", "0.6832053", "0.67955637", "0.67947984", "0.6710237", "0.67081344", "0.66922987", "0.66189283", "0.6602739", "0.65895367", "0.64685065", "0.6441029", "0.6440321", "0.643...
0.0
-1
=== suggested users ===
function clearSuggestedUser(elt) { $(elt) .css({ overflow: 'hidden' }) .animate({ height: '0px', opacity: '0' }, function() { $(this).remove(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserSuggestion(user) {\n var suggestions = {};\n \n suggestDb.forEach(function(suggest) {\n if(suggest.userId === user.id){\n suggestions = suggest; \n }\n }, this);\n \n return suggestions;\n}", "function suggestNames(username) {\n // If...
[ "0.67221457", "0.635867", "0.62518084", "0.61365277", "0.5999463", "0.59504414", "0.590368", "0.5881165", "0.5854944", "0.58013064", "0.5773146", "0.57592577", "0.57454485", "0.57038474", "0.56869787", "0.5677891", "0.5619555", "0.56126904", "0.56070614", "0.56051296", "0.560...
0.0
-1
library functions do not change 'em!
function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "function fnMyLibraryAFunction (){}", "function FunctionUtils() {}", "function Utils() {}", "function Utils() {}", "function StupidBug() {}", "function Library() {\n \n}", "transient protected internal function m189() {}", "function foo(){\n lib.log( \"...
[ "0.7437955", "0.7013417", "0.676562", "0.6612794", "0.6612794", "0.6566983", "0.65650785", "0.6511969", "0.64509094", "0.643746", "0.64246094", "0.6322046", "0.6320281", "0.62899214", "0.62646735", "0.6255783", "0.62527657", "0.62527657", "0.62527657", "0.62400264", "0.623144...
0.0
-1
function to manager options choosed
function optionsClick(option) { if (option == 'center' || option == 'left') { //aling text editor.style.textAlign = option } else if (option == 'link') { //show/hide modal for add links const mainAside = document.getElementById('mainAside') if (mainAs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function managerOptions() {\n inquirer.prompt({\n name: \"action\",\n type: \"list\",\n message: \"Please make a selection.\",\n choices: [\"View products for sale.\",\n \"View low inventory.\",\n \"Add to current inventory levels.\",\n ...
[ "0.73273313", "0.7181172", "0.71098214", "0.694981", "0.6718398", "0.6650769", "0.66233253", "0.66029865", "0.65322626", "0.65172637", "0.6435008", "0.63978225", "0.63596374", "0.63561076", "0.6320019", "0.6299241", "0.62931794", "0.62736654", "0.6189443", "0.61705905", "0.61...
0.0
-1
function to manager click button on bottom editor
function buttons(click) { if (click == 'save') { //not added for while alert('Function not added') } else { //clear all document.getElementById('editor').textContent = '' } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'click #editor1'( e, t ) {\n e.preventDefault();\n $( '#cb-title-toolbar' ).hide();\n $( '#cb-media-toolbar' ).hide();\n $( '#cb-text-toolbar' ).show();\n $( '.js-cb-text-edit' ).hide();\n $( '.js-cb-text-delete' ).hide();\n $( '#cb-editor-save-text' ).show();\n }", "functio...
[ "0.69941247", "0.67788357", "0.65477484", "0.6510442", "0.64357716", "0.64127064", "0.6391289", "0.6359704", "0.63569677", "0.6282971", "0.6277602", "0.6265004", "0.62456167", "0.6200964", "0.6140316", "0.61364275", "0.6129844", "0.6127559", "0.60964495", "0.6093657", "0.6073...
0.0
-1
findNextSquare(121) > returns 144 findNextSquare(625) > returns 676 findNextSquare(114) > returns 1 since 114 is not a perfect
function findNextSquare(sq) { // Return the next square if sq is a perfect square, -1 otherwise return Math.sqrt(sq)%1?-1:Math.pow(Math.sqrt(sq)+1,2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findNextSquare(sq) {\n console.log(sq)\n function isSquare(n){\n return n > 0 && Math.sqrt(n) % 1 === 0\n };\n\n if(!isSquare(sq)){\n return -1;\n }\n\n var nextSq = sq+1;\n for (var i = nextSq; i <= nextSq*2; i++ ){\n if(isSquare(i)){\n return i;\n }\n }\n}", "function findNextS...
[ "0.82859975", "0.8231839", "0.8181328", "0.81686705", "0.8114058", "0.80215305", "0.7985169", "0.77919775", "0.70224345", "0.69566226", "0.6897966", "0.6745859", "0.67427784", "0.6722061", "0.66793877", "0.65937936", "0.65874493", "0.65534306", "0.653974", "0.64993876", "0.64...
0.8119507
4
Implementation to extract adventure ID from query params
function getAdventureIdFromURL(search) { // TODO: MODULE_ADVENTURE_DETAILS // 1. Get the Adventure Id from the URL // Place holder for functionality to work in the Stubs return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAdventureIdFromURL(search) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Get the Adventure Id from the URL\n console.log(search);\n const id = search.split(\"=\")[1];\n console.log(id);\n return id;\n\n // Place holder for functionality to work in the Stubs\n //return null;\n}", "function get...
[ "0.7573016", "0.74406135", "0.6636703", "0.63038856", "0.63029426", "0.62609017", "0.62193686", "0.6199103", "0.61743546", "0.6061342", "0.5971838", "0.5860749", "0.57975525", "0.57926476", "0.5773311", "0.57611", "0.5747513", "0.5735363", "0.5724965", "0.56114453", "0.549444...
0.72140026
2
Implementation of fetch call with a paramterized input based on adventure ID
async function fetchAdventureDetails(adventureId) { // TODO: MODULE_ADVENTURE_DETAILS // 1. Fetch the details of the adventure by making an API call // Place holder for functionality to work in the Stubs return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchAdventureDetails(adventureId) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Fetch the details of the adventure by making an API call\n try {\n const response = await fetch(\n `${config.backendEndpoint}/adventures/detail?adventure=${adventureId}`\n ).then((res) => res.json());\n ...
[ "0.6385478", "0.62283707", "0.6005186", "0.5973123", "0.5895062", "0.5770412", "0.57149523", "0.5694076", "0.5686842", "0.5668157", "0.5664653", "0.56528145", "0.56503874", "0.5643557", "0.5642968", "0.5633758", "0.56276596", "0.5603742", "0.5566282", "0.556301", "0.55616564"...
0.64138746
0
Implementation of DOM manipulation to add adventure details to DOM
function addAdventureDetailsToDOM(adventure) { // TODO: MODULE_ADVENTURE_DETAILS // 1. Add the details of the adventure to the HTML DOM }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addAdventureDetailsToDOM(adventure) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Add the details of the adventure to the HTML DOM\n console.log(adventure);\n document.getElementById(\"adventure-name\").innerHTML = `${adventure.name}`;\n document.getElementById(\n \"adventure-subtitle\"\n ).inner...
[ "0.7349262", "0.7243861", "0.7209052", "0.72036767", "0.70515496", "0.6318518", "0.62858295", "0.6264087", "0.6200925", "0.6183535", "0.6175553", "0.61720294", "0.61688423", "0.6116394", "0.6065111", "0.6037076", "0.5993581", "0.597084", "0.5927092", "0.5872445", "0.58682966"...
0.7880612
0
Implementation of bootstrap gallery component
function addBootstrapPhotoGallery(images) { // TODO: MODULE_ADVENTURE_DETAILS // 1. Add the bootstrap carousel to show the Adventure images }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildGallery_() {\n // Build gallery\n this.gallery_ = this.win.document.createElement('div');\n this.gallery_.classList.add('i-amphtml-lbv-gallery');\n\n // Initialize thumbnails\n this.updateThumbnails_();\n\n this.vsync_.mutate(() => {\n this.container_.appendChild(this.gallery_);\n })...
[ "0.72107065", "0.69117963", "0.6777731", "0.6757718", "0.67198336", "0.66805315", "0.6647971", "0.6621401", "0.6595934", "0.65799797", "0.6566463", "0.65420514", "0.65326595", "0.6520518", "0.6511804", "0.65106636", "0.64746934", "0.64675176", "0.64668936", "0.6466539", "0.64...
0.7311841
0
Implementation of conditional rendering of DOM based on availability
function conditionalRenderingOfReservationPanel(adventure) { // TODO: MODULE_RESERVATIONS // 1. If the adventure is already reserved, display the sold-out message. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConditionalRendering() {\n return (\n <div>\n {/* <div>\n {props.isLoading ? <h2>Loading...</h2> : <h2>Conditional Rendering</h2>}\n </div> */}\n <h2 style={{ color: \"green\" }}>Fully Loaded!</h2>\n </div>\n )\n}", "render() //we must define the render method\n {\n ...
[ "0.6641647", "0.66144687", "0.6449223", "0.63570255", "0.63215977", "0.62200594", "0.60729665", "0.6034528", "0.6020545", "0.59682566", "0.59613264", "0.59456253", "0.5929517", "0.5900156", "0.5867603", "0.58308023", "0.5730723", "0.56794417", "0.5678815", "0.56745327", "0.56...
0.0
-1
Implementation of reservation cost calculation based on persons
function calculateReservationCostAndUpdateDOM(adventure, persons) { // TODO: MODULE_RESERVATIONS // 1. Calculate the cost based on number of persons and update the reservation-cost field }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateReservationCostAndUpdateDOM(adventure, persons) {\n // TODO: MODULE_RESERVATIONS\n // 1. Calculate the cost based on number of persons and update the reservation-cost field\n console.log(adventure);\n console.log(persons);\n let totalCost = adventure.costPerHead * persons;\n document.getEle...
[ "0.7287028", "0.71452165", "0.6819454", "0.64824164", "0.6381471", "0.6296905", "0.62384826", "0.6175971", "0.61370236", "0.6084274", "0.6077174", "0.6069218", "0.6038089", "0.6025664", "0.6024965", "0.6011699", "0.601164", "0.6010845", "0.6008788", "0.5972913", "0.5964757", ...
0.7721483
0
Implementation of reservation form submission using JQuery
function captureFormSubmitUsingJQuery(adventure) { // TODO: MODULE_RESERVATIONS // 1. Capture the query details and make a POST API call using JQuery to make the reservation // 2. If the reservation is successful, show an alert with "Success!" and refresh the page. If the reservation fails, just show an alert wit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function captureFormSubmitUsingJQuery(adventure) {\n // TODO: MODULE_RESERVATIONS\n // 1. Capture the query details and make a POST API call using JQuery to make the reservation\n // 2. If the reservation is successful, show an alert with \"Success!\" and refresh the page. If the reservation fails, just show an...
[ "0.6902631", "0.68596333", "0.6715374", "0.6526709", "0.6238862", "0.61306673", "0.6099448", "0.60990554", "0.6068717", "0.60141826", "0.60121864", "0.59915847", "0.59830964", "0.5972632", "0.5972304", "0.5959066", "0.59483385", "0.59444493", "0.5942171", "0.5932884", "0.5927...
0.7157017
0
Implementation of success banner after reservation
function showBannerIfAlreadyReserved(adventure) { // TODO: MODULE_RESERVATIONS // 1. If user has already reserved this adventure, show the reserved-banner, else don't }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_claim_success_response_function(response)\n {\n show_notification(\"msg_holder\", \"success\", \"Success:\", \"Claim made successfully\");\n fade_out_loader_and_fade_in_form(\"loader\", \"form\"); \n $(\"#balance_now\").html(\"Gh¢\" + response.new_balance);\n $('#form')[...
[ "0.65759706", "0.6310564", "0.62836564", "0.6260823", "0.62301785", "0.6220198", "0.61299235", "0.61260134", "0.6124069", "0.6121311", "0.6111223", "0.6104868", "0.606404", "0.6059045", "0.6044204", "0.60411507", "0.59884655", "0.5952534", "0.59411025", "0.5925702", "0.590237...
0.0
-1
either encode or decode message depending on direction parameter passed
function shiftCode(msg, direction){ var abcLen = abc.length; var shiftedCode = ''; //str to be returned msg.split('').forEach(function(char, i){ var moveBy = abc.indexOf(key.substr(i, 1)); //a moves 0, z moves 25 var shiftedCharInd; //char ind after it's encoded OR decode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encode (msg, callback) {\n const values = Buffer.isBuffer(msg) ? [msg] : [Buffer.from(msg)]\n\n pull(\n pull.values(values),\n pullLP.encode(),\n pull.collect((err, encoded) => {\n if (err) {\n return callback(err)\n }\n callback(null, encoded[0])\n })\n )\n}", "func...
[ "0.5937747", "0.5937747", "0.58702934", "0.57228255", "0.53135353", "0.5235641", "0.5130458", "0.5023588", "0.49375936", "0.4937472", "0.4862939", "0.48395064", "0.48358986", "0.48169822", "0.48012006", "0.47900558", "0.47900558", "0.47863433", "0.47693214", "0.4746969", "0.4...
0.5987252
0
Can we make this into a method of an object?
function each(arr, callback) { // loop through the array for(var i = 0; i < arr.length; i++) { callback(arr[i]); // invoking the callback many times... delegation! } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static method(){}", "function obj(objec){\nreturn objec;\n}", "method(){}", "function vc(a){this.methodName=a}", "function myFunction() {\n var myObject = {\n objProperty: \"string\",\n objMethod: function objMethod() {\n return myObject.objProperty;\n },\n };\n\n return myObject;\n}", "...
[ "0.63939047", "0.63409156", "0.6303741", "0.6134654", "0.6064823", "0.6039525", "0.58768576", "0.5872855", "0.5861584", "0.58606124", "0.58589935", "0.5857444", "0.58525676", "0.5849264", "0.5840972", "0.5832488", "0.5794514", "0.57870317", "0.57522476", "0.57520473", "0.5741...
0.0
-1
check taskbar icon activity every second keep check on taskbar icons
function checkTaskbarIconActive() { taskbarIcons = document.querySelectorAll(".taskbar-icon"); taskbarIcons.forEach((icon) => { icon.addEventListener("click", () => { maximize_icon(icon.classList[0]); bringPanelToFront(icon); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keepCheckOnDesktopIcons() {\n allIcons.forEach((icon) => {\n icon.addEventListener(\"dblclick\", () => {\n let src = null;\n let split = null;\n let idg = null;\n for (let i = 0; i < allIcons.length; i++) {\n if (icon.src == allIcons[i].src) {\n src = allIcons[i].sr...
[ "0.65074426", "0.60304856", "0.5985721", "0.59143937", "0.5888988", "0.5876213", "0.58378845", "0.5824189", "0.5815122", "0.57454455", "0.56394106", "0.5600587", "0.5569838", "0.5558357", "0.55162436", "0.5516006", "0.55042523", "0.5497925", "0.5494159", "0.545996", "0.545233...
0.7308009
0
the panel which was clicked by client bring it to front of all panels
function bringPanelToFront(icon) { for (let i = 0; i < panelArray.length; i++) { if (icon.classList[0] == panelArray[i].id) { panelArray[i].window.front(); hideWidget(); break; } } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clicked(panel) {\n\t}", "function showPanel(e, theInstance, x, y) {\n var offx = (x)? x - 0 : 20;\n var offy= (y)? y - 0 : 20;\n var theHandle = document.getElementById(\"handle\" + \"_\" + theInstance);\n var theRoot = document.getElementById(\"panel\" + \"_\" + theInstance);\n \n Drag....
[ "0.6514807", "0.6382427", "0.63225627", "0.6166886", "0.61183167", "0.60898465", "0.60231274", "0.6000867", "0.59729785", "0.59594685", "0.58584696", "0.5855332", "0.5854762", "0.58413255", "0.58234423", "0.58109707", "0.58109707", "0.58104926", "0.57985866", "0.5784064", "0....
0.69037604
0
this fucntion basically hide everything present on the overlay i.e screen of client for eaxample suppose the client clicks on this pc then everythign else open will be hidden or closed
function hideWidget() { widgets.forEach((widget) => { $(widget).css("z-index", "0"); $(widget).hide(); $(widget).removeClass("active"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideOverlay() {\n getId('levelOverlay').style.display = \"none\";\n getId('quitOverlay').style.display = \"none\";\n getId('buttonLeft').style.display = \"none\";\n getId('buttonRight').style.display = \"none\";\n getId('playAgain').style.display = \"none\";\n}", "function off() {\n docu...
[ "0.73795664", "0.69368696", "0.6849663", "0.6832444", "0.6782289", "0.67699516", "0.6754032", "0.6734477", "0.67057747", "0.66954666", "0.66954666", "0.66765404", "0.6667125", "0.66456306", "0.6610624", "0.66005176", "0.65976346", "0.6561831", "0.65363413", "0.65246904", "0.6...
0.0
-1
change css of icon in taskbar to look minimize
function minimize_icon(icon) { $(`li.${icon}`).css("border-bottom","solid rgb(194, 188, 188) 2.7px"); $(`li.${icon}`).css("background","none"); $(`li.${icon}`).css("background-color", "rgb(33, 33, 41)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDesktopIcons(){\t}", "function maximize_icon(icon){\n $(`li.${icon}`).css(\"border-bottom\",\"solid #fff 4px\");\n $(`li.${icon}`).css(\"background-color\",\"rgb(33, 33, 41)\");\n}", "function checkTaskbarIconActive() {\n taskbarIcons = document.querySelectorAll(\".taskbar-icon\");\n taskbarIco...
[ "0.6902144", "0.6696071", "0.6597684", "0.6579192", "0.6488998", "0.64609665", "0.64570117", "0.642783", "0.62709963", "0.61332154", "0.6090239", "0.6079548", "0.6026256", "0.59069306", "0.5903671", "0.58409315", "0.5814071", "0.57866883", "0.57856935", "0.57694757", "0.57413...
0.7062625
0
change css of icon to look maximized
function maximize_icon(icon){ $(`li.${icon}`).css("border-bottom","solid #fff 4px"); $(`li.${icon}`).css("background-color","rgb(33, 33, 41)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static maximize(icon) {\n\t\t//Validate\n\t\tif(!icon) { return; }\n\t\t//Hide the icon\n\t\ticon.style.display = \"none\";\n\t\t//Get the card\n\t\tvar card = CardManager.getCard(icon.getAttribute(\"cardname\"));\n\t\t//Move the card to the last slot in the box because that's fair\n\t\tCardManager.placeCard(card)...
[ "0.6819972", "0.6466339", "0.64305496", "0.6283964", "0.6210108", "0.60888124", "0.6007818", "0.597118", "0.5954213", "0.59468395", "0.59392756", "0.58905184", "0.58903974", "0.5855752", "0.5848981", "0.5801668", "0.5795582", "0.5774189", "0.5774189", "0.5771586", "0.5715166"...
0.7523197
0
return the current time
function fetchTime() { let time = new Date(); return time.toLocaleString("en-PK", { hour: "numeric", minute: "numeric", hour12: true, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_time() {\n return Date.now();\n}", "getCurrentTime() {\n return Math.floor(Date.now() / 1000);\n }", "function now() {\n var date = new Date();\n var time = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + (date.getMinutes() <...
[ "0.8522595", "0.8178399", "0.817228", "0.80311024", "0.8007868", "0.80074906", "0.8007171", "0.80008656", "0.79799026", "0.79735434", "0.79555905", "0.794285", "0.7894087", "0.7861044", "0.7830007", "0.7830007", "0.7821284", "0.78097796", "0.7809719", "0.7790245", "0.77802837...
0.0
-1
minimizez all the panels
function movePanelsBack(panels) { //if the panel array is empty then below logic will work for(let i=0; i<panels.length; i++) { if(panels[i]=="") break; else panels[i].window.minimize(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minimize()\n\t{\n\t\t// minimize container\n\t\tif (_container != null)\n\t\t{\n\t\t\t_container.css({\"overflow\": \"hidden\",\n\t\t\t\t\"height\": _options.minimizedHeight});\n\t\t\t_minimized = true;\n\t\t}\n\t}", "_restoreFromMinimization() {\n const that = this;\n\n that.minimized = f...
[ "0.6940414", "0.6646458", "0.6629635", "0.662635", "0.6560409", "0.65546864", "0.65009826", "0.64328843", "0.62377274", "0.6203726", "0.6159587", "0.61019874", "0.60209745", "0.60159653", "0.59548765", "0.5914488", "0.5914488", "0.5806387", "0.58012724", "0.578261", "0.577003...
0.6751246
1
return the todays date
function fetchDate() { let date = new Date(); let day = date.getDate(); let month = date.getUTCMonth() + 1; let year = date.getFullYear(); return month + "/" + day + "/" + year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function todaysDate() {\n currDay = new Date;\n var dd = currDay.getDate();\n var mm = currDay.getMonth() + 1;\n var yyyy = currDay.getFullYear();\n if (mm < 10) {\n mm = \"0\" + mm;\n }\n return yyyy+'/'+mm+'/'+dd;\n }", "function todaysDate(){\n now = new Date();\n t=ne...
[ "0.8235912", "0.778241", "0.7509666", "0.7460054", "0.7287414", "0.7237854", "0.71510357", "0.7131172", "0.7083345", "0.70598173", "0.7027099", "0.70167553", "0.7014725", "0.6978085", "0.69626737", "0.6947413", "0.6920973", "0.6912339", "0.690353", "0.6893824", "0.6866548", ...
0.0
-1
fetch time with second for the calender container
function fetchTimeWithSeconds() { let time = new Date(); return time.toLocaleString("en-PK", { hour: "numeric", minute: "numeric", second: "numeric", hour12: true, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInitialTime() {\n changeTime();\n}", "function startTime() {\n let now = new Date();\n\n $(\"#clock\")\n .html('')\n .append($('<div>').html(now.format('EE dd/MM/yyyy')))\n .append($('<div>').html(now.format('HH:mm:ss')));\n\n setTimeout(startTime, 1000)\n}", "funct...
[ "0.66494155", "0.66052896", "0.64003", "0.6379956", "0.6377929", "0.6321029", "0.6306994", "0.62998545", "0.6290038", "0.62676233", "0.6265326", "0.6262055", "0.6245337", "0.6242392", "0.6241021", "0.6240191", "0.6232957", "0.6222785", "0.62076825", "0.6195112", "0.61866444",...
0.0
-1
set the date in date/time container
function setTheDate() { const date = document.getElementById("date"); const time = document.getElementById("time"); date.innerHTML = fetchDate(); time.innerHTML = fetchTime().toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setDate(date) {\n this.date = date;\n }", "set eventDate(aValue) {\n this._logger.debug(\"eventDate[set]\");\n this._eventDate = aValue;\n }", "function setDate() {\n // It will set the departure date to current date\n const departureDate = customDateFormat();\n document.getElementByI...
[ "0.70651525", "0.6840417", "0.67167693", "0.66492003", "0.664281", "0.6612695", "0.66041833", "0.65969706", "0.65935475", "0.6577676", "0.6562468", "0.65585154", "0.6526225", "0.64897966", "0.6407085", "0.6404393", "0.63739616", "0.637326", "0.63613826", "0.633388", "0.631250...
0.6309403
21
show calender if the date/time container is clicked
function showCalender() { const time = document.getElementById("calendar-time"); setInterval(() => { time.innerHTML = fetchTimeWithSeconds().toUpperCase(); }, 1000); reloadCalenderContent(); $("div.calender-container").css("z-index", "500"); $("div.calender-container").css("opacity", "1"); $("div.cale...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function date_click() {\n $(\".events-container\").show(250);\n $(\"#dialog\").hide(250);\n $(\".active-date\").removeClass(\"active-date\");\n $(this).addClass(\"active-date\");\n}", "function displayEvent() {\n $('tbody.event-calendar td').on('click', function(e) {\n \n $('.day-e...
[ "0.703238", "0.68667954", "0.6776477", "0.6776477", "0.67668194", "0.6708744", "0.6681489", "0.6679535", "0.6665272", "0.6647057", "0.6573172", "0.6423829", "0.6406491", "0.6361776", "0.63583845", "0.63462734", "0.63305783", "0.6323028", "0.63092893", "0.62779564", "0.6245534...
0.6890536
1
if the calender container is opened and the calender month OR year is changed by the user then when the user close and again open the calender container the below logic will reload the calnder content again so that the default moth and year is visible to user
function reloadCalenderContent() { const updateCalenderToDefault = document.getElementById("caleandar"); updateCalenderToDefault.innerHTML = ""; const script1 = document.getElementById("reload1"); const script2 = document.getElementById("reload2"); let newscript1 = document.createElement("script"); newscrip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_refreshCalendarMode() {\n const that = this;\n\n if (that.headerTemplate) {\n return;\n }\n\n that._refreshMonthNames();\n\n if (that.calendarMode === 'default') {\n that.$classicHeaderDate.addClass('jqx-hidden');\n that.$defaultHeaderDate.remove...
[ "0.69773984", "0.6959588", "0.6874659", "0.6760389", "0.64396197", "0.6356525", "0.6356525", "0.6339455", "0.6335785", "0.6202163", "0.61913794", "0.61873364", "0.61828154", "0.6177083", "0.61699635", "0.61655325", "0.61655325", "0.6147303", "0.61388046", "0.6105534", "0.6084...
0.62341815
9
if start button is clicked then open start container
function showStartContainer() { const start = document.getElementById("start"); $("div.start-container").show(); start.classList.toggle("active"); $("div.start-container").css("z-index", "10000"); $("div.start-container").css("display", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startScreen() {\n mainContainer.append(startButton)\n }", "function startPage() {\n getContainer();\n \n var startButton = document.getElementById(\"startbut\");\n}", "start() {\n if (this.showHideStartMenu === true) {\n this.showHideStartMenu = false;\n } else {\n ...
[ "0.7539026", "0.7275074", "0.72416687", "0.709507", "0.690191", "0.68523425", "0.67812294", "0.6778407", "0.6768489", "0.6747419", "0.6745694", "0.66955215", "0.6676699", "0.667457", "0.661368", "0.659353", "0.65780944", "0.6559253", "0.6557131", "0.6542651", "0.65379214", ...
0.74844533
1
create a window for every icon on the desktop window and show that window to client corresponding to the icon whcih was clicked
function CreateModal(icon, src) { let iconName = icon[0]; let leftheightpanel = 60 + panelcount * 15; let topheightpanel = 20 + panelcount * 15; if ( topheightpanel < window.screen.height && leftheightpanel < window.screen.width ) { let panel = jsPanel .create({ headerTitle: iconName...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDesktopIcons(){\t}", "function cowsayIconClick() {\n\tvar x = document.getElementById('cowsaywindow');\n\tx.style.display = \"block\";\n\n\t// makes current window the top window\n\tvar windows = document.getElementsByClassName('drsElement');\n\tvar i = windows.length;\n\twhile (i--) {\n\t\twindows[i...
[ "0.68444765", "0.6782517", "0.6555963", "0.6539955", "0.63986063", "0.62972635", "0.6244612", "0.6221371", "0.62087303", "0.6188892", "0.61448324", "0.6132907", "0.6128099", "0.61168474", "0.61013675", "0.6020408", "0.5983797", "0.5961349", "0.59464335", "0.5936145", "0.59252...
0.0
-1
take the argument panel and add it to the panelArray
function addPanelToPanelArray(panelObj) { panelArray[panelArray.length] = panelObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddPanel(factorSelections){\r\n this.stage = [];\r\n this.current = -1;\r\n this.factorSelections = factorSelections || [];\r\n this.isGroup = true;\r\n}", "addPanel(params) {\n // Remove existing one. Can be added by a reload.\n if (this.getPropertyValue(params.id, 'id')) {\n ...
[ "0.6584134", "0.65518755", "0.6410714", "0.6314294", "0.6307114", "0.6305795", "0.6222028", "0.6191951", "0.61406183", "0.59315294", "0.58954823", "0.5846861", "0.58451945", "0.58442634", "0.5819618", "0.5737448", "0.5736228", "0.5726529", "0.57192314", "0.5690114", "0.568569...
0.79743946
0
it basically remove the icon from the taskbar paenl when the window is closed
function removeIconFromTaskBar(icon, src) { panelcount--; for (let i = 0; i < panelArray.length; i++) { if (panelArray[i].id == icon) { panelArray.splice(panelArray.indexOf(panelArray[i]),1); } } if(src){ iconArray[src] = 1; } $("li." + icon).remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideIcon () {\n currentBookmark = undefined\n browser.pageAction.hide(currentTab.id)\n updateIcon(false)\n}", "removeSystemTrayIcon() {\n system_1.System.Application.getCurrent().removeTrayIcon(function () {\n logger_1.default.system.debug(\"System Tray Icon removed\");\n }, ...
[ "0.70086974", "0.6769451", "0.6388738", "0.6227568", "0.62243086", "0.61992514", "0.6179155", "0.613857", "0.6128738", "0.6111385", "0.61056596", "0.6096213", "0.60947025", "0.6080738", "0.6046478", "0.6041835", "0.59687823", "0.5947976", "0.59413826", "0.59383595", "0.593715...
0.6357821
3
this functionn is called in the doument.ready function
function keepCheckOnDesktopIcons() { allIcons.forEach((icon) => { icon.addEventListener("dblclick", () => { let src = null; let split = null; let idg = null; for (let i = 0; i < allIcons.length; i++) { if (icon.src == allIcons[i].src) { src = allIcons[i].src; sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mkdOnDocumentReady() {\n\t mkdIconWithHover().init();\n\t mkdIEversion();\n\t mkdInitAnchor().init();\n\t mkdInitBackToTop();\n\t mkdBackButtonShowHide();\n\t mkdInitSelfHostedVideoPlayer();\n\t mkdSelfHostedVideoSize();\n\t mkdFluidVideo();\n\t mkdOwlSlider();\n\t mkdPreload...
[ "0.6669491", "0.66115993", "0.6575922", "0.65286255", "0.65216655", "0.6426221", "0.64056015", "0.63922065", "0.63785464", "0.6360991", "0.6340002", "0.63253075", "0.6298589", "0.6298589", "0.6298589", "0.6298589", "0.6298589", "0.6298589", "0.6298589", "0.6298589", "0.629858...
0.0
-1
shows the profile info to the user if the user icon is clicked in the start container header
function showProfile() { let icon = '<i class="fas fa-user" style="padding:8px"></i>'; let iconName = "user-profile"; let iconType = "i"; let iconfortaskbar = '<i class="fas fa-user" style="padding: 7px 13px 8px 11.7px;"></i>'; if (iconArray[icon] == 1) { movePanelsBack(panelArray); addIconToTaskbar(i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openProfileInfo() {\n vm.showUserInfo = !vm.showUserInfo;\n }", "showProfile() {\n this.show('Header');\n HeaderTemplate.showLogo();\n this.show('Profile');\n this.show('ProfileAvatar');\n }", "function showUserInfo() {\n\tvar currentUser = sessionStorage.g...
[ "0.7204412", "0.7148768", "0.6972341", "0.6936396", "0.68649757", "0.6835353", "0.68028337", "0.67786014", "0.6766694", "0.67499906", "0.67009187", "0.6661782", "0.6590646", "0.6590646", "0.6585508", "0.65623236", "0.65522087", "0.6493427", "0.64880216", "0.6466828", "0.64107...
0.708955
2
Fonction rewriteSimSite pour supprimer les / et mettre des _
function rewriteATForSimSite(mystring) { var myNewString = myString.replace(/[/]/g,'_'); return myNewString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean() {\n return del([url_dest + \"*\"]);\n}", "function cleaner(){\n walkAndUnlink( path.join(__dirname, 'public', 'css'), new RegExp(/style-/) )\n walkAndUnlink( path.join(__dirname, 'public', 'js'), new RegExp(/kloutskout-/) )\n}", "function regenerateRoutes() {\n\t //Clean all previous regis...
[ "0.57479167", "0.57098985", "0.56501055", "0.5504035", "0.54980034", "0.54714996", "0.5454315", "0.54426634", "0.5355817", "0.53502816", "0.53502816", "0.5279856", "0.5260688", "0.5254683", "0.524862", "0.524862", "0.52355844", "0.5227327", "0.519897", "0.51698613", "0.516119...
0.5373542
8
New Fonction rewriteHERA pour supprimer les et mettre des _
function rewriteATForHera(mystring) { var myNewString = myString.replace(/[-]/g,'_'); return myNewString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Rewriter(){ }", "function clean() {\n return del([url_dest + \"*\"]);\n}", "function qr(e){delete Gr[e]}", "function replace(str) {\r\n return str ? str.replace(/_/, '') : '';\r\n }", "function REMOVE_CONTENTS_URI_SEGMENT_(){this.REMOVE_CONTENTS_URI_SEGMENT$wRDq=( this.CONTENTS_...
[ "0.58390224", "0.5478104", "0.54668385", "0.5450673", "0.541416", "0.53952765", "0.53311414", "0.53115183", "0.52640885", "0.52244174", "0.5217428", "0.517673", "0.51765037", "0.5168493", "0.51203614", "0.511985", "0.51171386", "0.5107951", "0.51059216", "0.5070825", "0.50616...
0.0
-1
Funcion que se encargara de cargar los hitos
function obtenerHitos(){ let template =''; let filtro=$('#seleccionTipoDeHitos').val(); $.ajax({ type: "GET", url: 'listarHitos.php', data: {filtro}, success: function(response){ console.log(response); let hitos = JSON.parse(response); hitos.forEach(hito=>{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadMisGuifos(){\n for(let i = 0; i<arrayGallery.length; i++){\n let url = `https://api.giphy.com/v1/gifs/${arrayGallery[i]}?api_key=${APIKey}`\n let responseLoad = await fetch(url);\n let dataLoad = await responseLoad.json();\n \n misGuifoscardGenerator(dataLoa...
[ "0.59677625", "0.58634126", "0.58599764", "0.5856536", "0.5783292", "0.56867445", "0.5629689", "0.56122106", "0.5573167", "0.5572904", "0.55687106", "0.5551504", "0.5491298", "0.54665744", "0.54397833", "0.5424445", "0.54223484", "0.54196554", "0.54175806", "0.5412311", "0.53...
0.51156783
61
helper function: runs callback on selected rows, null if no rows selected
function selectByColumn(table, column, id, queryadd, callback) { var statement; if (column.substring(0, 2) !== 'id') { statement = 'SELECT * FROM ' + table + ' WHERE ' + column + ' = \'' + id + '\''; } else { statement = 'SELECT * FROM ' + table + ' WHERE ' + column + ' = ' + id; } var query = db.que...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectRows(data) {\n \t\n }", "function rowCallback (row, data, index) {\n var rowId = data.DT_RowId.toString();\n\n if (_.indexOf(selectedRows, rowId) !== -1) {\n setRowSelectedUI(row, true);\n }\n\n if (origRowCallback) origRowCallba...
[ "0.70519704", "0.7032835", "0.6966881", "0.6936862", "0.68892694", "0.670011", "0.6616156", "0.6601702", "0.64851576", "0.64343184", "0.63975483", "0.63689977", "0.6313448", "0.63009703", "0.6252745", "0.62474126", "0.6185692", "0.61363673", "0.61298144", "0.6116217", "0.6090...
0.0
-1
saves object with value in db and returns id
function save(table, column, value, callback) { // check if object with value already exists getIdByValue(table, column, value, function(resultId) { if (resultId == null) { var post = {}; post[column] = value; var query = db.query('INSERT INTO ' + table + ' SET ?', post, function(err, result)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async save(obj) {\n return this.db.one(\n 'INSERT INTO $1:name($2:name) VALUES($2:list) RETURNING id',\n [this.table, obj],\n )\n .then((data) => data.id)\n .catch((error) => {\n throw error;\n });\n }", "save() {}", "function save(data) {\n if (data.id) {\n r...
[ "0.68396187", "0.6676705", "0.65411633", "0.6537328", "0.6364645", "0.63161886", "0.6291124", "0.6276228", "0.6274512", "0.6262107", "0.6262107", "0.62359", "0.6213091", "0.6174882", "0.6165723", "0.6096761", "0.60895246", "0.6088897", "0.6084177", "0.60722977", "0.6060852", ...
0.6127401
15
Component Did Mount hook
Click(){ this.setState({ showMenu: !this.state.showMenu}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componenetWillMount() { }", "componentDidMount(){ //Cuando un compoennte se monta y se muestra en pantalla se llama este método\n console.log(\"did Mount\");\n }", "componenetDidMount() { }", "didMount() {\n }", "componentDidMount() {\n this.componentLoaded = true;\n }", "componentDidMou...
[ "0.79658866", "0.7763753", "0.77159214", "0.7358899", "0.73302144", "0.72871685", "0.7273313", "0.72721153", "0.7193492", "0.71647054", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118", "0.7094118...
0.0
-1
function to position backgrounds where they should be in that moment
function setBackgroundPosition($backgrounds) { const height = screen.height/2; Array.from($backgrounds).forEach((background, i) => { let backgroundPosition = (background.offsetTop - window.scrollY)/2 if(backgroundPosition > -height && backgroundPosition < height){ background.style.backgroundP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function background() {\n\tif (ydup != 600) {\n\t\tydup = ydup + 1;\n\t\tdocument.getElementById(\"road\").style.backgroundPosition = \"0px \"\n\t\t\t\t+ ydup + \"px\";\n\t} else {\n\t\tydup = 0;\n\t}\n}", "function position() {\n var yOffset = window.pageYOffset * o.speed;\n self.css('back...
[ "0.716351", "0.69271487", "0.689904", "0.67376626", "0.66982996", "0.65885884", "0.65569687", "0.64729106", "0.6454404", "0.6419884", "0.6412115", "0.6389541", "0.63035655", "0.62996733", "0.6263205", "0.623983", "0.61625373", "0.61514634", "0.6139501", "0.61203146", "0.61089...
0.71740294
0
Getting the weather data for the city the user searched
function getCurrentForecast(userCity) { var forecastqueryURL ="https://api.openweathermap.org/data/2.5/weather?q=" + userCity + "&units=imperial&appid=6728f835388fdeed53f52d240faa84ef"; $.ajax({ url: forecastqueryURL, method: "GET", }).then(function (forecastResponse) { var cityName= forec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeather() {\n var location = globals.location,\n usrInput = $('.input-div input').val() || '';\n\n getCityWeather(usrInput, location);\n getCityForecast(usrInput, location)\n\n }", "function search(city) {\n let apiKey = \"ccd7e3ef34f8befeaea04a6b52aa4224\";\n let...
[ "0.8130516", "0.7871798", "0.7862422", "0.78411007", "0.78409374", "0.78264195", "0.7818583", "0.7806898", "0.779169", "0.7768534", "0.77663374", "0.7754387", "0.77496576", "0.77191216", "0.77131915", "0.7668448", "0.7633706", "0.76189613", "0.7617001", "0.7611218", "0.758480...
0.0
-1
BONUS: Build the Gauge Chart buildGauge(data.WFREQ);
function buildCharts(sample) { const url = "/samples/" + sample; d3.json(url).then(function(data) { // Build a Pie Chart var trace1 = { values: data.sample_values.slice(0, 10), labels: data.otu_ids.slice(0, 10), //hoverinfo: data.otu_labels.slice(0, 10) type: 'pie' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildGaugeChart(sample) {\n var url = `/metadata/${sample}`;\n d3.json(url).then(function(data) {\n \n console.log(data.WFREQ);\n var chart_data = [{domain: {x: [0, 1], y: [0, 1]}, value: data.WFREQ, title: {text: \"Belly Button Washing Frequency <hr> Number of scrubs per week\"},\n ...
[ "0.759796", "0.72886133", "0.7169305", "0.70033777", "0.6995058", "0.69916093", "0.6939709", "0.68475294", "0.6837556", "0.6802492", "0.6800977", "0.6728284", "0.6717029", "0.6690121", "0.65952134", "0.65738475", "0.6528459", "0.6505701", "0.6497465", "0.641807", "0.63631433"...
0.0
-1