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
Return a function that produces ReactElements of a given type. See
function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getElementConstructor(type) {\n return JSXElement;\n }", "wrap(type = this.type, props) {\n if (props) {\n if (typeof props === \"string\") props = { className: props };\n else props = this.normalizeProps(props);\n }\n this.elements = [ React.createElement(type, props, ...this.elements) ];...
[ "0.6881692", "0.65996516", "0.6500789", "0.6500789", "0.6500789", "0.6500789", "0.6500789", "0.6500789", "0.6500789", "0.6500789", "0.6500789", "0.62642443", "0.61790586", "0.5946714", "0.59197545", "0.58823824", "0.5865448", "0.577851", "0.5640398", "0.56326604", "0.5620884"...
0.0
-1
Clone and return a new ReactElement using element as the starting point. See
function cloneElement(element, config, children) { !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0; var propName = void 0; // Original props are copied var props = _assign({}, element.props)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneElement(element,config,children){if(!!(element===null||element===undefined)){{throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+element+\".\");}}var propName;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\...
[ "0.69132274", "0.68906343", "0.66943085", "0.66943085", "0.6692962", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6633278", "0.661405", "0.661405", ...
0.0
-1
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See
function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toArrayChildren(children) {\n var ret = [];\n React__default.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,function(child){return child;}...
[ "0.775197", "0.7518098", "0.74326503", "0.74046993", "0.74046993", "0.74046993", "0.74046993", "0.74046993", "0.74046993", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", "0.73987144", ...
0.0
-1
DOM helper functions private
function selectionToArray(selection) { var len = selection.length; var result = []; for (var i = 0; i < len; i += 1) { result.push(selection[i]); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {\n}", "function DOMImplementation() {\n}", "function RenderableDOMElement() {\n }", "function zXmlDom() {\n\n}", "buildDomElem...
[ "0.7351156", "0.7351156", "0.7351156", "0.7351156", "0.70682186", "0.70682186", "0.6754642", "0.66035074", "0.629162", "0.62793756", "0.62742233", "0.62732726", "0.62546146", "0.612642", "0.612642", "0.60940874", "0.6034345", "0.60140324", "0.59918326", "0.5972063", "0.596951...
0.0
-1
OBSERVER INTERSECT HANDLING if TOP edge of step crosses threshold, bottom must be > 0 which means it is on "screen" (shifted by offset)
function intersectStepAbove(entries) { updateDirection(); entries.forEach(function (entry) { var isIntersecting = entry.isIntersecting; var boundingClientRect = entry.boundingClientRect; var target = entry.target; // bottom is how far bottom edge of el is from top of viewport var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function intersectViewportAbove(entries) {\n updateDirection();\n entries.forEach(function (entry) {\n var isIntersecting = entry.isIntersecting;\n var target = entry.target;\n var index = getIndex(target);\n var ss = stepStates[index];\n if (\n isIntersecting &&\n dire...
[ "0.6143489", "0.58449256", "0.5767074", "0.5740196", "0.5728758", "0.5672009", "0.56013745", "0.5534198", "0.55125445", "0.5510008", "0.55081093", "0.5491274", "0.54620564", "0.5454768", "0.5450353", "0.54456985", "0.54325503", "0.54309464", "0.5427237", "0.5417503", "0.54152...
0.6843457
0
if there is a scroll event where a step never intersects (therefore skipping an enter/exit trigger), use this fallback to detect if it is in view
function intersectViewportAbove(entries) { updateDirection(); entries.forEach(function (entry) { var isIntersecting = entry.isIntersecting; var target = entry.target; var index = getIndex(target); var ss = stepStates[index]; if ( isIntersecting && direction === 'dow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkIfVisibleFallback_() {\n const elTop = this.element_./*OK*/ getBoundingClientRect().top;\n const winInnerHeight = this.win_./*OK*/ innerHeight;\n\n if (winInnerHeight > elTop) {\n this.cb_();\n this.win_.removeEventListener('scroll', this.scrollHandler_);\n }\n }", "function containSc...
[ "0.65625685", "0.63462925", "0.63316244", "0.62990034", "0.62714994", "0.62477833", "0.62467617", "0.62185967", "0.6215992", "0.6215992", "0.6188155", "0.6185719", "0.6185719", "0.61775875", "0.61775875", "0.61775875", "0.61747813", "0.61722094", "0.61194277", "0.61194277", "...
0.60343504
36
constructs the main Tone object
function Main(func){ Tone = func(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Tone(context, freq = 440, wave = \"sine\") {\n this.context = context;\n this.status = 0;\n this.freq = freq || 440;\n this.wave = wave || \"square\";\n}", "setupInstrument() {\n // //CREATE SYNTH FROM data.synthSetting\n this.meter = new Tone.Meter().toDestination();\n ...
[ "0.71195495", "0.7053536", "0.66966176", "0.6389665", "0.62737036", "0.62560105", "0.6183849", "0.6154844", "0.6026948", "0.598544", "0.5967861", "0.5955107", "0.59284955", "0.587671", "0.5846768", "0.57887775", "0.57697827", "0.57644", "0.57586205", "0.5730744", "0.5727717",...
0.55731523
35
invokes each of the modules with the main Tone object as the argument
function Module(func){ func(Tone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Main(func){\n\t\tTone = func();\n\t}", "function Main(func){\n\t\tTone = func();\n\t}", "function Main(func){\n\t\tTone = func();\n\t}", "function Main(func){\n\t\tTone = func();\n\t}", "function Main(func){\n\t\tTone = func();\n\t}", "function Main(func){\n\t\tTone = func();\n\t}", "function ...
[ "0.6078757", "0.6078757", "0.6078757", "0.6078757", "0.6078757", "0.6078757", "0.6078757", "0.5907078", "0.57404774", "0.55902314", "0.5579584", "0.5451294", "0.543404", "0.5387269", "0.52998024", "0.529874", "0.5282524", "0.52773815", "0.52736145", "0.5252322", "0.5250663", ...
0.64735407
5
replace the old connect method
function toneConnect(B, outNum, inNum) { if (B.input) { inNum = Tone.defaultArg(inNum, 0); if (Tone.isArray(B.input)) { return this.connect(B.input[inNum]); } else { return this.connect(B.input, outNum, inNum); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connect() {}", "async connect(){}", "connect() { socket_connect(this) }", "connect() {\n if (this.connected) {\n return;\n }\n this.connected = true;\n return this.emitEvent('connect', null);\n }", "async connect () {\n return this.setConnection(this.setClient())\n }", "_onConnectin...
[ "0.8067357", "0.7729043", "0.7387412", "0.7143887", "0.70628643", "0.70224327", "0.6833789", "0.6801916", "0.6797955", "0.6797955", "0.6796292", "0.6765682", "0.66650647", "0.6648438", "0.66345626", "0.66127455", "0.65818053", "0.6536309", "0.6521076", "0.6520607", "0.6470133...
0.0
-1
replace the old disconnect method
function toneDisconnect(B, outNum, inNum) { if (B && B.input && Tone.isArray(B.input)) { inNum = Tone.defaultArg(inNum, 0); this.disconnect(B.input[inNum], outNum, 0); } else if (B && B.input) { this.disconnect(B.input, outNum, inNum); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disconnect() { }", "disconnect() { }", "disconnect() { }", "disconnect(){}", "disconnect() {\n this._disconnect();\n }", "function disconnect(){\r\n\tconn.disconnect();\r\n}", "_onDisconnect () {\n this._disconnectEvents();\n }", "onDisconnect(delegate) {\n this.disconnected = delega...
[ "0.81776613", "0.81776613", "0.81776613", "0.8084983", "0.77480865", "0.7661144", "0.7649315", "0.7557328", "0.7515651", "0.7465075", "0.74537104", "0.74452084", "0.74041176", "0.7396222", "0.7396222", "0.7396222", "0.7396222", "0.7380696", "0.7294545", "0.726515", "0.7221247...
0.0
-1
Invert a value curve to make it work for the release
function invertCurve(curve) { var out = new Array(curve.length); for (var j = 0; j < curve.length; j++) { out[j] = 1 - curve[j]; } return out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reverseInPlace() { this._bcurve.reverseInPlace(); }", "function invertColor(value) {\n const color = Object(d3_color__WEBPACK_IMPORTED_MODULE_15__[\"rgb\"])(value);\n const { r, g, b, opacity } = color;\n if (opacity === 0) {\n return color.toString();\n }\n const yiq = (r * 299 + g * 587 +...
[ "0.7222348", "0.64460063", "0.64460063", "0.6389408", "0.637991", "0.6356237", "0.63465446", "0.6285666", "0.6250271", "0.6189891", "0.61584157", "0.61490357", "0.6136518", "0.61328083", "0.61229", "0.6115666", "0.61136156", "0.6096002", "0.60897017", "0.60714114", "0.6069653...
0.6838607
4
Because of a bug in iOS causing the currentTime to increment before the rendering is started, sometimes it takes multiple attempts to render the audio correctly.
function attemptRender(callback, duration, sampleRate, tries) { tries = Tone.defaultArg(tries, 0); var context = new Tone.OfflineContext(2, duration, sampleRate); Tone.context = context; //invoke the callback/scheduling var response = callback(Tone.Transport); if (c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderAudio() {\n var now = audioContext.currentTime;\n \n for (var i = 0; i < NUMBER_OF_SOUND_SOURCES; i++)\n {\n if (meshes[i] != null)\n {\n meshes[i].updateMatrixWorld();\n }\n }\n\n\n if (soundsPlaying)\n {\n if ((loopCount % 2) === 0)\n {\n ...
[ "0.7452629", "0.6737501", "0.65572965", "0.65092975", "0.6498262", "0.6426126", "0.640745", "0.63770664", "0.63727087", "0.6354716", "0.6348063", "0.6346294", "0.63389814", "0.63349146", "0.62895143", "0.627829", "0.6262339", "0.62359077", "0.6213589", "0.6185761", "0.6184870...
0.0
-1
Build a destructive iterator for the value list
function iteratorFor(items) { var iterator = { next: function() { var value = items.shift() return {done: value === undefined, value: value} } } if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator } } return iterator }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createIteratorFromValue(value){\n return (function(){\n let used = false;\n\n return {\n next: function(){\n try {\n return used ? {done: true} : {value: value, done: false};\n ...
[ "0.6567051", "0.61971587", "0.6129268", "0.60959846", "0.6081213", "0.6081213", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60395825", "0.6019784", "0.6000144", "0.593555", "0.59003186", "0.5864537", "0.58550805", "0.57782644", "0.57182074", "0.56...
0.0
-1
Function which creates a bar chart in a specified div using the chart config passed to it as a variable
function makeBarChart(chartConfig) { var dataURL = chartConfig.dataURL; var xVariable = chartConfig.xVariable; var yVariable = chartConfig.yVariable; var yAxisMin = chartConfig.yAxisMin; var yAxisMax = chartConfig.yAxisMax; var yDenominator = chartConfig.yDenominator; var yLabel = chartConfig.yLabel; v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chartBar(){//creating a function which draws the chart when it is called (the code in the function is ran)\n\t\tvar chart = new Chart(ctx, {//creating a new chart\n\t\t type: 'bar',//selecting the type of chart wanted\n\t\t data: dataForChart, //calling dataset\n\t\t\t options:{\n\t\t\t \ttitl...
[ "0.735137", "0.7185358", "0.7160052", "0.7044213", "0.7034627", "0.70330805", "0.7023359", "0.69364727", "0.68947864", "0.6828048", "0.6819922", "0.68196994", "0.68090457", "0.680419", "0.679731", "0.6746956", "0.674044", "0.67362785", "0.6735845", "0.6715013", "0.66771805", ...
0.0
-1
Get the CDN url for a given version
function getCdnUrl(version) { if (version === void 0) { version = DEFAULT_VERSION; } return "https://js.arcgis.com/" + version + "/"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCdnCssUrl(version) {\n if (version === void 0) { version = DEFAULT_VERSION; }\n var baseUrl = getCdnUrl(version);\n var parsedVersion = parseVersion(version);\n if (parsedVersion !== NEXT && parsedVersion.major === 3) {\n // NOTE: at 3.11 the CSS moved from the /js folder to the root...
[ "0.76298445", "0.59565395", "0.58338195", "0.57067233", "0.5681178", "0.56209636", "0.56209636", "0.55520535", "0.55397296", "0.55076385", "0.5487545", "0.54704607", "0.54704607", "0.54704607", "0.54704607", "0.5463031", "0.54569316", "0.5442826", "0.5439542", "0.54254913", "...
0.83662266
0
Get the CDN url for a the CSS for a given version and/or theme
function getCdnCssUrl(version) { if (version === void 0) { version = DEFAULT_VERSION; } var baseUrl = getCdnUrl(version); var parsedVersion = parseVersion(version); if (parsedVersion !== NEXT && parsedVersion.major === 3) { // NOTE: at 3.11 the CSS moved from the /js folder to the root v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCdnUrl(version) {\n if (version === void 0) { version = DEFAULT_VERSION; }\n return \"https://js.arcgis.com/\" + version + \"/\";\n}", "function loadCss(urlOrVersion, before) {\n var url = getCssUrl(urlOrVersion);\n var link = getCss(url);\n if (!link) {\n // create & load the c...
[ "0.67419565", "0.6357386", "0.60145587", "0.5997408", "0.58317834", "0.5720094", "0.5697154", "0.56858796", "0.56594324", "0.5656791", "0.5652614", "0.5649191", "0.5633978", "0.5565854", "0.55261964", "0.5480301", "0.54639876", "0.540195", "0.5386361", "0.5375671", "0.5336255...
0.8284624
0
Copyright (c) 2017 Environmental Systems Research Institute, Inc. Apache2.0
function createStylesheetLink(href) { var link = document.createElement('link'); link.rel = 'stylesheet'; link.href = href; return link; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient final protected internal function m174() {}", "function getLicenseInfo() {\n\n\tvar l = \"\";\n\t\n\tl += \"Copyright 2014 DesignaQuark: Josiah Neuberger\\n\\n\";\n\t\n\tl += \"Licensed under the Apache License, Version 2....
[ "0.5788014", "0.574885", "0.5626573", "0.5593587", "0.55601764", "0.55324554", "0.55236024", "0.54862297", "0.5417609", "0.53464884", "0.53324807", "0.53080106", "0.5289343", "0.52583176", "0.52275014", "0.51486105", "0.5142842", "0.513249", "0.5113875", "0.5113875", "0.51138...
0.0
-1
check if the css url has been injected or added manually
function getCss(url) { return document.querySelector("link[href*=\"" + url + "\"]"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAndUpdateStyle() {\r\n\tif(allowedPaths.includes(window.location.pathname)) {\r\n\t\tif(!document.getElementById(\"injected-css\")) {\r\n\t\t\taddStyle();\r\n\t\t}\r\n\t} else if(document.getElementById(\"injected-css\")) {\r\n\t\tremoveStyle();\r\n\t}\r\n}", "function checkCss(){\n\tvar cssStyleSh...
[ "0.7418125", "0.71913964", "0.6673675", "0.6454998", "0.6422947", "0.6341216", "0.6189175", "0.6175437", "0.5902586", "0.58894426", "0.58894426", "0.58894426", "0.58894426", "0.58894426", "0.5887719", "0.58083963", "0.5698008", "0.5697089", "0.5692818", "0.5692818", "0.569281...
0.53435063
52
lazy load the CSS needed for the ArcGIS API
function loadCss(urlOrVersion, before) { var url = getCssUrl(urlOrVersion); var link = getCss(url); if (!link) { // create & load the css link link = createStylesheetLink(url); insertLink(link, before); } return link; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doResources()\n{\n var css = ['aegis.css', 'jquery-ui.css'];\n css.forEach(function(el, i, a) {\n var res = GM_getResourceText(el);\n GM_addStyle(res);\n });\n}", "function loadCSS() {\n\n // CSS file not loaded yet? => load CSS file\n if ( !resource ) jQuery( 'head' ).append(...
[ "0.7072068", "0.6704135", "0.6384346", "0.6314181", "0.62113994", "0.62058294", "0.6157496", "0.61194104", "0.6110212", "0.60686034", "0.6059854", "0.6039972", "0.6035225", "0.60093164", "0.5999016", "0.5996623", "0.59962445", "0.59914905", "0.5984123", "0.5970824", "0.596603...
0.0
-1
add a onetime load handler to script and optionally add a one time error handler as well
function handleScriptLoad(script, callback, errback) { var onScriptError; if (errback) { // set up an error handler as well onScriptError = handleScriptError(script, errback); } var onScriptLoad = function () { // pass the script to the callback callback(script); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadHandler()\n {\n var i;\n\n if (!SnowPlow.hasLoaded)\n {\n SnowPlow.hasLoaded = true;\n SnowPlow.executePluginMethod('load');\n for (i = 0; i < SnowPlow.registeredOnLoadHandlers.length; i++)\n {\n SnowPlow.registeredOnLo...
[ "0.5844086", "0.5822722", "0.5820012", "0.5820012", "0.57838434", "0.5728", "0.56001955", "0.55450517", "0.5493638", "0.54912555", "0.5471948", "0.54650944", "0.5458863", "0.5440297", "0.5415907", "0.53786415", "0.53692925", "0.5362656", "0.53563964", "0.5333045", "0.5332803"...
0.55783963
7
add a onetime error handler to the script
function handleScriptError(script, callback) { var onScriptError = function (e) { // reject the promise and remove this event listener callback(e.error || new Error("There was an error attempting to load " + script.src)); // remove this event listener script.removeEventListener('erro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ErrorHandler() {}", "function OnErr() {\r\n}", "function sc_errorHookSet( h ) {\n __sc_errorHook = h;\n}", "function handleError(err) {\n\t\t\toptions.lastError = err;\n\t\t\tif (options.onError) {\n\t\t\t\tif (options.onError.length > 1)\n\t\t\t\t\toptions.onError(err, runAgain);\n\t\t\t\telse {\...
[ "0.70726097", "0.63973695", "0.6175821", "0.6097512", "0.6023548", "0.5972993", "0.59675455", "0.59569544", "0.5945617", "0.59377086", "0.5895236", "0.5868648", "0.584022", "0.5836435", "0.5833939", "0.5831294", "0.5822216", "0.5822216", "0.5806237", "0.577888", "0.5772994", ...
0.0
-1
allow the user to configure default script options rather than passing options to `loadModules` each time
function setDefaultOptions(options) { if (options === void 0) { options = {}; } defaultOptions = options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async beforeRun() {\n this._super.apply(this, arguments);\n\n // try to read global options from `config/crowdin.js`\n let configOptions = {};\n let module = path.join(this.project.root, 'config', 'crowdin');\n\n try {\n configOptions = require(module);\n if (typeof configOptions === 'func...
[ "0.64836776", "0.59018815", "0.5822153", "0.58104545", "0.57944876", "0.5779734", "0.56425214", "0.56425214", "0.55947006", "0.5574566", "0.5574566", "0.5557658", "0.55369586", "0.5531488", "0.5529744", "0.5519913", "0.55091697", "0.54982203", "0.5472358", "0.5463668", "0.545...
0.0
-1
get the script injected by this library
function getScript() { return document.querySelector('script[data-esri-loader]'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get script() {\n return _PROPERTIES_.get(this).script;\n }", "get pythonScript() {\n return this.getStringAttribute('python_script');\n }", "function getScript() {\n const content = fs.readFileSync(\"./index.html\", { encoding: \"utf-8\" });\n return content.substring(\n \"<sc...
[ "0.7264153", "0.67184806", "0.65152717", "0.6400939", "0.6387205", "0.6367396", "0.6355622", "0.6351141", "0.63247997", "0.632227", "0.62329966", "0.62262034", "0.61479837", "0.6143391", "0.6143391", "0.61118203", "0.60588646", "0.604979", "0.60409033", "0.60301435", "0.60258...
0.6790733
1
has ArcGIS API been loaded on the page yet?
function isLoaded() { var globalRequire = window['require']; // .on() ensures that it's Dojo's AMD loader return globalRequire && globalRequire.on; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isReady() {\n return map != null;\n }", "function isLoading() {\n\t\treturn xhrResolutions < xhrCreations;\n\t}", "_isTrackingInited() {\n return document.querySelector(\"script#s-front-gtm\") !== null;\n }", "function is_document_ready() {\n\n var visibleLoader = null;\n for (co...
[ "0.6558626", "0.6418803", "0.6299655", "0.62273395", "0.6067102", "0.60503167", "0.599024", "0.5906203", "0.5900321", "0.5877672", "0.58681655", "0.58544767", "0.5843045", "0.5842004", "0.5841915", "0.5832639", "0.5823506", "0.5819231", "0.5814612", "0.57886267", "0.5779524",...
0.5350069
92
load the ArcGIS API on the page
function loadScript(options) { if (options === void 0) { options = {}; } // we would have liked to use spread like { ...defaultOptions, ...options } // but TS would inject a polyfill that would require use to configure rollup w content: 'window' // if we have another occasion to use spread, let's do tha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadAPI() {\n // wait for all classes to be loaded\n // on attend que les classes soient chargées\n if (checkApiLoading('loadAPI();',['OpenLayers','Geoportal','Geoportal.Viewer','Geoportal.Viewer.Simple'])===false) {\n return;\n }\n\n // load API keys configuration, then load the int...
[ "0.6917697", "0.6908552", "0.68847865", "0.68512166", "0.67111284", "0.6322295", "0.6243422", "0.62236273", "0.6150295", "0.6134152", "0.6043654", "0.5982102", "0.5973927", "0.5941065", "0.5940691", "0.59176636", "0.5907473", "0.5886188", "0.5880985", "0.58685267", "0.5867145...
0.0
-1
Copyright (c) 2017 Environmental Systems Research Institute, Inc. Apache2.0 wrap Dojo's require() in a promise
function requireModules(modules) { return new utils.Promise(function (resolve, reject) { // If something goes wrong loading the esri/dojo scripts, reject with the error. var errorHandler = window['require'].on('error', reject); window['require'](modules, function () { var args = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function require() { return {}; }", "function _getOjModuleRequirePromise(_requireFunc, type, module) {\n // Note that the 'type' parameter is not used by the implementation below.\n // It is, however, used by the Webpack-specific implementation of this function.\n var requireFunc = _requireFunc || requi...
[ "0.705521", "0.7015265", "0.667417", "0.6184287", "0.6182076", "0.61487436", "0.61231846", "0.6121966", "0.5974138", "0.59738785", "0.59738785", "0.59738785", "0.59738785", "0.59738785", "0.5933493", "0.5933493", "0.5933493", "0.5933493", "0.5933493", "0.5933493", "0.5933493"...
0.64244324
3
returns a promise that resolves with an array of the required modules also will attempt to lazy load the ArcGIS API if it has not already been loaded
function loadModules(modules, loadScriptOptions) { if (loadScriptOptions === void 0) { loadScriptOptions = {}; } if (!isLoaded()) { // script is not yet loaded, is it in the process of loading? var script = getScript(); var src = script && script.getAttribute('src'); if (!loadScr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load () {\n const modules = registerModules(api)\n\n api.modules = modules\n\n return Promise.resolve(modules)\n }", "function requireModules(modules) {\n return new utils.Promise(function (resolve, reject) {\n // If something goes wrong loading the esri/dojo scripts, reject with the...
[ "0.6695943", "0.639276", "0.60922945", "0.60905415", "0.59964883", "0.5915751", "0.58401674", "0.57847446", "0.57795966", "0.5772162", "0.5725858", "0.57251066", "0.5721848", "0.56951624", "0.56942695", "0.56904024", "0.5690053", "0.567356", "0.5664187", "0.5616621", "0.56143...
0.0
-1
Attach is called as soon as the layer view is ready to start rendering.
attach() { // We use a full-screen quad and shaders to composite the frame rendered // with deck.gl on top of the MapView. Composition uses the MapView context. const gl = this.context; _commons__WEBPACK_IMPORTED_MODULE_0__["initializeResources"].call(this, gl); // Update deck props ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "layerSetup() {\n this._layer = this.createLayer();\n this._addObservers();\n this._addEventListeners();\n if (this.get('containerLayer')) {\n this.get('containerLayer')._layer.addLayer(this._layer);\n }\n this.didCreateLayer();\n }", "attachedCallback () {\n /**\n * Now that we...
[ "0.6572414", "0.64931905", "0.61101204", "0.60131717", "0.6007124", "0.5979971", "0.59760785", "0.59735936", "0.5958832", "0.5958832", "0.59204024", "0.5912956", "0.59070295", "0.59070295", "0.59070295", "0.59015703", "0.5897831", "0.58674765", "0.58674765", "0.5862239", "0.5...
0.69439304
0
Called when the layer must be destroyed.
detach() { _commons__WEBPACK_IMPORTED_MODULE_0__["finalizeResources"].call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "layerTeardown() {\n this.willDestroyLayer();\n this._removeEventListeners();\n this._removeObservers();\n if (this.get('containerLayer') && this._layer) {\n this.get('containerLayer')._layer.removeLayer(this._layer);\n }\n this._layer = null;\n }", "willDestroyElement() {\n this._destr...
[ "0.78517187", "0.7790026", "0.7581198", "0.73967415", "0.71594113", "0.7138282", "0.7133281", "0.71255434", "0.70756936", "0.7054633", "0.7054633", "0.70473945", "0.69692695", "0.69591224", "0.69156855", "0.68935794", "0.68742484", "0.6871007", "0.6871007", "0.6871007", "0.68...
0.0
-1
Called every time that the layer view must be rendered.
render(renderParameters) { const [width, height] = this.view.state.size; // The view state must be kept in-sync with the MapView of the ArcGIS API. const state = renderParameters.state; _commons__WEBPACK_IMPORTED_MODULE_0__["render"].call(this, { gl: renderParameters.context, wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "mapLayersChange...
[ "0.7418739", "0.7418739", "0.7318548", "0.72423786", "0.7145578", "0.70568746", "0.69755644", "0.6926918", "0.6926918", "0.6866828", "0.68660444", "0.6863245", "0.68610084", "0.6827186", "0.68018717", "0.6653586", "0.6653586", "0.6653586", "0.6653586", "0.6653586", "0.664826"...
0.0
-1
Called by the MapView whenever a layer view needs to be created for a given layer.
createLayerView(view) { if (view.type === '2d') { return new DeckLayerView2D({ view, layer: this }); } // eslint-disable-next-line console.error( 'DeckLayer does not support SceneView at the moment. Use DeckRenderer instead.' ); return nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToView(layer) {\n view.map.add(layer);\n}", "layerSetup() {\n this._layer = this.createLayer();\n this._addObservers();\n this._addEventListeners();\n if (this.get('containerLayer')) {\n this.get('containerLayer')._layer.addLayer(this._layer);\n }\n this.didCreateLayer();\n }...
[ "0.70809674", "0.6712246", "0.6577385", "0.6444135", "0.63927305", "0.6383997", "0.63756776", "0.62351537", "0.6221874", "0.6116556", "0.61062205", "0.608299", "0.6050537", "0.6039086", "0.5979828", "0.5952437", "0.5948837", "0.59397346", "0.5918628", "0.58890015", "0.5884051...
0.61769956
9
eslintdisable noinvalidthis ArcGIS fov is cornertocorner
function arcgisFOVToDeckAltitude(fov, aspectRatio) { const D = Math.sqrt(1 + aspectRatio ** 2); const halfFOV = (fov / 2 / 180) * Math.PI; return D / 2 / Math.tan(halfFOV); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "computeFrustrumCorners() {\n let view_inv = mat4.create();\n let proj_inv = mat4.create();\n let transform = mat4.create();\n mat4.invert(view_inv, this.viewMatrix);\n mat4.invert(proj_inv, this.projectionMatrix);\n mat4.multiply(transform, view_inv, proj_inv);\n\n ...
[ "0.6078377", "0.6030062", "0.5884517", "0.57015955", "0.56964725", "0.56263447", "0.5600174", "0.55438155", "0.5419374", "0.5411016", "0.5399022", "0.5355233", "0.53436327", "0.52986175", "0.529819", "0.5283012", "0.5276305", "0.52710694", "0.5259613", "0.52201885", "0.521917...
0.0
-1
When the user clicks on the button, scroll to the top of the document
function topFunction() { // document.body.scrollTop = 0; // document.documentElement.scrollTop = 0; window.scroll({ top: 0, left: 0, behavior: 'smooth' }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrollToTop () {\n //getting the currentPosition position of the button\n let currentPosition = document.documentElement.scrollTop || document.body.scrollTop;\n //if the position is greater than 0 then we'll scroll to the top of the page\n if (currentPosition > 0) {\n ...
[ "0.8498769", "0.84935325", "0.8237396", "0.8030084", "0.8022724", "0.80114347", "0.7993513", "0.79560417", "0.7949332", "0.7944654", "0.7923245", "0.7909452", "0.7907121", "0.789553", "0.7890233", "0.78705823", "0.78410244", "0.7818916", "0.7817853", "0.7800974", "0.77712166"...
0.0
-1
the icons to display after filtering and then pagination
displayedIcons () { let icons = [] if (this.iconsList) { icons = this.filteredIcons // should the icons be paged? if (this.pagination && this.pagination.itemsPerPage !== 0) { icons = icons.slice(this.firstItemIndex, this.lastItemIndex) } } return icons ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function icons() {\r\n var arr = [], style = 'style=\"width:18px\"';\r\n if (iconMapper.map(link)) add(iconMapper.map(link));\r\n if (iconMapper.map(obj.Type)) add(iconMapper.map(obj.Type));\r\n if (reg !== 'Message' && iconMapper.map(reg)) add(iconMapper...
[ "0.66693234", "0.63949674", "0.63713473", "0.63447237", "0.6320429", "0.6286965", "0.62754756", "0.6275414", "0.6272162", "0.6271752", "0.62562484", "0.6255028", "0.62520313", "0.62520313", "0.6246123", "0.62438166", "0.62399817", "0.6231459", "0.62271047", "0.6222596", "0.62...
0.70175177
0
index of first item on a page
firstItemIndex () { const { page, itemsPerPage } = this.computedPagination return (page - 1) * itemsPerPage }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFirstIndex() {\n // index of the top item\n return (this.maxIndex - Math.floor(this.index)) % this.maxIndex; \n }", "pageIndex(itemIndex) {\n return this.pages.findIndex(page =>\n page.element.find(element => element.originalIndex === itemIndex)\n )\n }", "pageIndex(item...
[ "0.7556923", "0.718312", "0.68336385", "0.6669309", "0.6665736", "0.6621129", "0.661494", "0.66136426", "0.63970935", "0.636323", "0.63482213", "0.6331011", "0.63157237", "0.62895787", "0.6276888", "0.61815226", "0.6169175", "0.6164825", "0.61278075", "0.6072376", "0.606803",...
0.8189742
0
index of last item on a page
lastItemIndex () { const { page, itemsPerPage } = this.computedPagination return page * itemsPerPage }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DDLightbarMenu_GetTopItemIdxToTopOfLastPage()\n{\n\tvar numItemsPerPage = this.size.height;\n\tif (this.borderEnabled)\n\t\tnumItemsPerPage -= 2;\n\tvar topItemIndex = this.items.length - numItemsPerPage;\n\tif (topItemIndex < 0)\n\t\ttopItemIndex = 0;\n\treturn topItemIndex;\n}", "getLastIndex() {\n ...
[ "0.7885593", "0.72848046", "0.71616876", "0.71616876", "0.7120428", "0.7120428", "0.7120428", "0.70950335", "0.6981801", "0.6973843", "0.6928072", "0.6910117", "0.6901462", "0.684304", "0.66649127", "0.6657009", "0.66147333", "0.6581623", "0.6565948", "0.6531726", "0.6522002"...
0.8167566
0
returns true if on first page
isFirstPage () { return this.computedPagination.page === 1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFirstPage() {\n if(curPageNumber == 0) {\n return true;\n }\n return false;\n }", "checkForBeginning() {\n if (this.leftPage !== 1) {\n this.onFirstPage = false;\n } else {\n this.onFirstPage = true;\n }\...
[ "0.8903105", "0.7308396", "0.7279377", "0.70288473", "0.69304216", "0.6842652", "0.67781967", "0.6692301", "0.6643592", "0.6592898", "0.65603137", "0.6496737", "0.6483121", "0.64164335", "0.636084", "0.633188", "0.6269731", "0.625849", "0.60955364", "0.6094413", "0.6086183", ...
0.82283676
1
the number of pages available based on itemsPerPage
pagesNumber () { return Math.max( 1, Math.ceil(this.filteredIcons.length / this.computedPagination.itemsPerPage) ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pageCount() {\n return Math.round(this.itemCount() / this.itemsPerPage)\n }", "function numPages() {\n\t\t\treturn Math.ceil(maxentries/opts.items_per_page);\n\t\t}", "function numPages() {\n\t\t\treturn Math.ceil(maxentries/opts.items_per_page);\n\t\t}", "function numPages() {\n\t\t\treturn Math.ceil(ma...
[ "0.837467", "0.8285248", "0.8285248", "0.8285248", "0.8285248", "0.8285248", "0.80323297", "0.7883162", "0.78138894", "0.77893555", "0.7761914", "0.7734318", "0.77006394", "0.7630867", "0.7621174", "0.7611222", "0.75836015", "0.75673854", "0.7564046", "0.75131774", "0.7496646...
0.7815034
8
returns true if on last page
isLastPage () { return this.lastItemIndex === 0 ? true : this.computedPagination.page >= this.pagesNumber }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLastPage() {\n var viewLastIndex = curPageNumber * curPageLimit + curCount + 1;\n if(viewLastIndex >= totalCount) {\n return true;\n }\n return false;\n }", "checkForEnd() {\n if (this.rightPage !== 50) {\n this.onLast...
[ "0.87675834", "0.7379917", "0.7246415", "0.7234081", "0.7224729", "0.7213127", "0.72072417", "0.7009767", "0.69000065", "0.66082054", "0.6597224", "0.6535723", "0.6523987", "0.6499764", "0.6441594", "0.6415252", "0.6338917", "0.6332047", "0.63066614", "0.62934965", "0.6244535...
0.8747827
1
returns true if the pagination is the same, otherwise returns false if it has changed
samePagination (oldPag, newPag) { // eslint-disable-next-line no-unused-vars for (let prop in newPag) { if (newPag[prop] !== oldPag[prop]) { return false } } return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPageChanges() {\n if (getQueryStringValue(document.location.href, 'mode') == 'view') {\n return false;\n }\n\n if (typeof (HasChanges) != \"undefined\" && HasChanges || typeof (HasRCChanges) != \"undefined\" && HasRCChanges)\n return true;\n else if (typeof (vrGridIds) != \"un...
[ "0.66265327", "0.6623938", "0.6551788", "0.64546496", "0.643768", "0.6314968", "0.61530423", "0.6151851", "0.612437", "0.60716563", "0.60175425", "0.59909964", "0.59672666", "0.59613895", "0.5952157", "0.58393776", "0.5820974", "0.58036137", "0.576282", "0.5761691", "0.575387...
0.8537391
0
public function goes to previous page
prevPage () { const { page } = this.computedPagination if (page > 1) { this.setPagination({ page: page - 1 }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function previousPage()\r\n{\r\n\thistory.go(-1);\r\n}", "goBackToPreviousPage() {\n this.location.back();\n }", "goBackToPreviousPage() {\n this.location.back();\n }", "function goToPreviousPage() {\n\t\tif ( canPreviousPage() ) {\n\t\t\tgoToPage( currentPage() - 1 );\n\t\t}\n\t}", "go...
[ "0.87383056", "0.85219663", "0.85219663", "0.8512866", "0.84558326", "0.83838063", "0.8374252", "0.8346646", "0.8315606", "0.82878876", "0.8254592", "0.8228557", "0.8112542", "0.809131", "0.80134016", "0.79393417", "0.79219776", "0.79092896", "0.78985053", "0.789378", "0.7892...
0.0
-1
public function goes to next page
nextPage () { const { page, itemsPerPage } = this.computedPagination if (this.lastItemIndex > 0 && page * itemsPerPage < this.filteredIcons.length) { this.setPagination({ page: page + 1 }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextPage() \n{\n\tgotoUrl( nextIndexPageUrl );\n}", "next() {\n const that = this;\n\n that.navigateTo(that.pageIndex + 1);\n }", "function gotoNextPage() {\n setCurrentPageUrl(nextPageUrl)\n }", "function goToNextPage() {\n\t\tif ( canNextPage() ) {\n\t\t\tgoToPage( currentPage...
[ "0.82982254", "0.81606877", "0.8135156", "0.8124265", "0.8122321", "0.8066076", "0.8030981", "0.7871617", "0.7844557", "0.7806927", "0.7702667", "0.7624603", "0.76188666", "0.76143056", "0.7603637", "0.7508532", "0.750006", "0.74890715", "0.7476988", "0.7471594", "0.74414676"...
0.0
-1
Return a string representation of the current value. Both userfacing and sent to the backend when performing a search.
@computed get currTextValue() { if (this.optionSetId) { const lastIndex = this.levels.length - 1; // Iterate back through each level, trying to find the deepest selected item. for (let i = lastIndex; i >= 0; i -= 1) { const { selected, options } = this.levels[i]; if (selected !...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toString() { return this._value; }", "toString() {\n return `Value: ${this.value()}, History: [${history}], Position: ${position}`;\n }", "toString() {\n return JSON.stringify(this.value);\n }", "toString() {\n return this.value;\n }", "toString() {\n return this.value\n }",...
[ "0.7494961", "0.7323379", "0.72993493", "0.72628075", "0.71941495", "0.71030426", "0.7091332", "0.706794", "0.6917626", "0.6917626", "0.68043673", "0.65538716", "0.6443304", "0.6429828", "0.6429828", "0.6429828", "0.6429828", "0.6429828", "0.6429828", "0.6429828", "0.6429828"...
0.0
-1
Used to remove fields from a nested form See
function remove_fields (link) { //Sets hidden field for _destroy value to 1 (i.e. true) to indicate to remove fields //when submit button is clicked. $(link).previous("input[type=hidden]").value = "1"; //Navigates up DOM tree to first tag with class 'fields' and hides them $(link).up(".fields").hide(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeField(form, fieldName) {\n\n // Scan sections\n form.sections.forEach(function (section, key) {\n scanFields(section.fields, fieldName);\n });\n\n // Form fields\n scanFields(form.fields, fieldName);\n\n return form;\n\n}", "function removeField(form, fieldName) {\n\n // Scan sections\n ...
[ "0.7164074", "0.7159699", "0.7067147", "0.6965832", "0.695082", "0.6932741", "0.6909635", "0.68553734", "0.6849415", "0.68368894", "0.66259015", "0.6619221", "0.65998423", "0.65247715", "0.6523213", "0.6499889", "0.64180547", "0.6414398", "0.6405315", "0.63259405", "0.6325940...
0.720877
0
Used to add fields to a nested form See
function add_fields(link, association, content) { var new_id = new Date().getTime(); var regexp = new RegExp("new_" + association, "g") $(link).up().insert({ before: content.replace(regexp, new_id) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillNestedFields($multifield, valueArr) {\n _.each(valueArr, function (record, index) {\n $multifield.find(\".js-coral-Multifield-add\").click();\n //a setTimeout may be needed\n _.each(record, function...
[ "0.63200724", "0.6095898", "0.6012838", "0.59981877", "0.59806496", "0.59603727", "0.59359974", "0.5902245", "0.5894977", "0.5832596", "0.57982427", "0.57875544", "0.57707363", "0.5736831", "0.56812066", "0.5673802", "0.5646649", "0.5626119", "0.56249464", "0.56226325", "0.56...
0.0
-1
Outputs copyright date range. Parameters: organization name of organization holding copyright start_date original start date of copyright
function copyDate(organization,start_date) { var copyright=new Date(); var update=copyright.getFullYear(); //---write copyright if ( start_date == update ) document.write("<br />Copyright &#169; " + start_date + "<br />" + organization + ",&nbsp;&nbsp;All Rights Reserved."); else document.wri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatYearRange(start, end) {\n return `${start} \\u2013 ${end}`;\n }", "formatYearRange(start, end) {\n return `${start} \\u2013 ${end}`;\n }", "function addYearRangeOptions() {\n var min = minDate.getFullYear();\n var max = maxDate.getFullYear();\n var optionsStart = \"\";\n v...
[ "0.6707442", "0.6707442", "0.6143815", "0.5983119", "0.59599334", "0.58763766", "0.5841859", "0.5741077", "0.5640219", "0.5564247", "0.5558027", "0.55010337", "0.54752797", "0.54715085", "0.54132587", "0.5412277", "0.54074526", "0.5380579", "0.53444535", "0.5334175", "0.53224...
0.71713346
0
Outputs line of copyright information on a web page. To control size, use style sheet reference "bottomlinks"
function copyRightInfo(organization) { var displaydate; var start_date = 2010; var copyright=new Date(); var update=copyright.getYear(); var Source = new Array(); if ( start_date != update ) displaydate = start_date + "-" + update; else displaydate = update; Source[0] = " " + display...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCopyrightInfo(){\n return '<p>Información elaborada por la Agencia Estatal de Meteorología (© AEMET). Más información en su <a href=\"http://www.aemet.es/es/portada\" style=\"color: #374DC3;\" target=\"_blank\">sitio oficial</a></p>';\n }", "function Copyright() {\n\n\treturn (\n\t\t<div cl...
[ "0.69730943", "0.6426161", "0.6377646", "0.6327923", "0.62986803", "0.6176443", "0.6116216", "0.60364723", "0.5985692", "0.59831166", "0.59822136", "0.596659", "0.59392834", "0.59375805", "0.5931093", "0.59113973", "0.5876", "0.5876", "0.5876", "0.5844893", "0.5839167", "0....
0.5662992
28
Add the sticky class to the header when you reach its scroll position. Remove "sticky" when you leave the scroll position
function myFunction() { if (window.pageYOffset > sticky) { header.classList.add("sticky"); } else { header.classList.remove("sticky"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function headerScroll() {\n // if the user scrolls (pageYOffset) past the header's position, add the sticky class\n if (window.pageYOffset > sticky) {\n header.classList.add(\"sticky\");\n } else {\n header.classList.remove(\"sticky\");\n }\n}", "function onScrollFuntion(position, header) {\n if...
[ "0.874306", "0.8613114", "0.85725856", "0.8528487", "0.85185176", "0.8480934", "0.84623283", "0.8452377", "0.8441308", "0.8415182", "0.82786775", "0.8131146", "0.8079396", "0.8073879", "0.80499995", "0.80322355", "0.8027572", "0.80217415", "0.80111253", "0.79839075", "0.79835...
0.80335915
24
Toggle between showing and hiding the navigation menu links when the user clicks on the hamburger menu / bar icon
function hamburger() { var x = document.getElementById("myLinks"); if (x.style.display === "block") { x.style.display = "none"; } else { x.style.display = "block"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleNavLinks() {\n let hamburgerLinks = document.getElementById(\"myLinks\");\n if (hamburgerLinks.style.display === \"block\") {\n hamburgerLinks.style.display = \"none\";\n } else {\n hamburgerLinks.style.display = \"block\";\n }\n}", "function toggleHamburgerMenu() {\n $('.hamburger-icon...
[ "0.7900794", "0.77206933", "0.77206933", "0.77206933", "0.7645828", "0.7583689", "0.7554876", "0.7508217", "0.7505159", "0.74974805", "0.7492261", "0.7456871", "0.7410768", "0.7402226", "0.739964", "0.73755246", "0.7335794", "0.73274475", "0.7320287", "0.73109514", "0.7285642...
0.7743017
1
Crea las cajitas de los productos.
function generarProductos(prods){ $('#itemContainer').html(''); //Si el array mandado es vacio. if(prods.length == 0) $('#itemContainer').html('No hay productos que mostrar...'); //Por cada producto dentro del array genera su imagen. $.each(prods, function(i, producto){ var div = $('<div class="col-lg-3 co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createProducts() {\n new Product('bag', './img/bag.jpg');\n new Product('banana', './img/banana.jpg');\n new Product('bathroom', './img/bathroom.jpg');\n new Product('boots', './img/boots.jpg');\n new Product('breakfast', './img/breakfast.jpg');\n new Product('bubblegum', './img/bubblegum.jpg');\n ...
[ "0.6494918", "0.6488384", "0.6456892", "0.63565826", "0.6329665", "0.6316663", "0.620069", "0.61899436", "0.61886096", "0.6133474", "0.60953647", "0.6087355", "0.60739183", "0.60223436", "0.6006392", "0.5991501", "0.5950472", "0.5916296", "0.58960897", "0.5884485", "0.5825429...
0.6276851
6
Funcion que se ejecuta al iniciar o refescar el form.
function load(page) { var parametros = {"action":"ajax"}; $("#loader").fadeIn('slow'); $.ajax({ url:'php/listar_empleados.php', data: parametros, beforeSend: function(objeto){ $("#loader").html("Cargando..."); }, success:function(data){ $(".outer_div").html(data).fadeIn('slow'); $("#loader").html(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ejecutarComo(nombre)\n{\t\n\tvar f=document.forms[0];\t\n\tf.Transaccion.value=nombre;\n\tf.submit();\n\treturn true;\n}", "function executarOperacao(evt) {\n console.log('Form Submit');\n // \tanular a submissão automática da form\n evt.preventDefault();\n switch (operacao) {\n case ...
[ "0.6630575", "0.6452686", "0.6380264", "0.6365142", "0.6361409", "0.63518465", "0.62907773", "0.6284606", "0.6271092", "0.6271092", "0.6258248", "0.6255843", "0.62297404", "0.621921", "0.61831456", "0.6177796", "0.6173149", "0.6161885", "0.6141874", "0.6136188", "0.61205035",...
0.0
-1
Filter Drop Down boxes
function filters() { workspaceBox = document.querySelectorAll('#workspace-box'); const propertyNameFilter = document.getElementById('property-name-filter'); const propertyAddressFilter = document.getElementById('property-address-filter'); const propertyNeighborhoodFilter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_lijst(e) {\n var in_val = $x.trim($x(e.currentTarget).val().replace(/\\s+/g, '').toUpperCase()); // waarde een input element getrimmed\n var classnm = e.currentTarget.name; // ! class naam van selectie prompt bijhorend met de input\n var selec_vals = $x(\".\" + classnm).find(\"select > option\")...
[ "0.74720514", "0.72251767", "0.7146084", "0.71251464", "0.7111216", "0.70625263", "0.7060481", "0.7024552", "0.68773973", "0.6870261", "0.68657523", "0.68511605", "0.68428296", "0.6814303", "0.6801799", "0.6791316", "0.6780716", "0.67785156", "0.67647004", "0.6740471", "0.671...
0.6589713
33
Sort the display based on an Ascending button push
function sortArrayAsc(index){ console.log("Display before sort: ", displayArray); // switch/case based on asc button index switch (index) { case 0: displayArray.sort(function (a,b) { var x = a.property[1].propertyName.toLow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortButtonClick() {\n\tvar id = $(this).attr(\"data-col\");\n\t// console.log('id discovered was'+ id);\n\n\tvar f = Filters[id];\n\n\tswitch (f.Direction) {\n\t\tcase SortOptions.None:\n\t\t\tf.Direction = SortOptions.Ascending;\n\t\t\tf.Priority = getMaxPriority() + 1;\n\t\t\tbreak;\n\n\t\tcase SortOpti...
[ "0.7222609", "0.7106427", "0.7000969", "0.6950897", "0.69493973", "0.68966794", "0.68938327", "0.6888303", "0.6850631", "0.67841345", "0.67760634", "0.6766374", "0.67270833", "0.67044157", "0.6690328", "0.66815317", "0.6678537", "0.66670996", "0.6666851", "0.6627237", "0.6625...
0.7250752
0
Filter and Sort buttons Sort buttons can be done in Switch/Case with querySelectorAll Filter dropdowns needs to search through workspacesAll to populate values Need a submit button? Need to remember filter and sort values Need to display from a display array
function workspaceDisplay(){ console.log("data.workspacesAll: ", data.workspacesAll); let parking, transit; let workspaceIndex = []; //fix array iterations for (let i = 0; i < displayArray.length; i++) { if (disp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filters() {\n workspaceBox = document.querySelectorAll('#workspace-box'); \n const propertyNameFilter = document.getElementById('property-name-filter');\n const propertyAddressFilter = document.getElementById('property-address-filter');\n const propertyNeighborh...
[ "0.7102975", "0.6563568", "0.62846684", "0.6247365", "0.6243239", "0.61970294", "0.60796356", "0.6076651", "0.606004", "0.60375875", "0.603736", "0.596848", "0.59602785", "0.59586704", "0.5957104", "0.5913242", "0.5906366", "0.58349645", "0.58234304", "0.580449", "0.5803165",...
0.56274486
44
console.log("hello"); assigns a workspace to the coworkers rent array
function rentWorkspace(childIndex) { console.log("workspaceIndex.length: ", workspaceIndex.length); console.log("childIndex", childIndex); index = (childIndex + 1 - workspaceIndex.length) * -1; data.workspacesAll.forEach((element, windex) => { console.log(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sayThings() {\n // let cities = ['Bogota', 'Madrid'];\n // console.log(cities);\n\n let word = 'dinosaur';\n console.log(word);\n}", "function andTheMysteryIs(mystery) {\n //for (var i = 0, i < mystery.length; i += 1){ }\n console.log(mystery[0].name + \" killed with a(n) \" + mystery[1].name + \...
[ "0.58166397", "0.55282503", "0.5527239", "0.55195004", "0.53963995", "0.53897756", "0.53442425", "0.53294396", "0.5316933", "0.5314959", "0.53051835", "0.5301229", "0.5250422", "0.5225952", "0.5217496", "0.5198582", "0.51918584", "0.51884955", "0.5177427", "0.51766187", "0.51...
0.49853954
53
date here is 22 June 2021
function isDonePressed(){ return ($('#ui-datepicker-div').html().indexOf('ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all ui-state-hover') > -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "display_date_formate(date) {\n if (!date)\n return null;\n const [year, month, day] = date.split('-');\n let new_date = `${day}-${month}-${year}`;\n return new_date;\n }", "function changeDateFormat(date) {\n const dayOfWk = date.slice(0, 4...
[ "0.6592368", "0.65260386", "0.6492451", "0.64799273", "0.6405214", "0.6329301", "0.6275878", "0.6259866", "0.62512964", "0.6249613", "0.6246348", "0.6233783", "0.6228027", "0.62259406", "0.6225071", "0.62053114", "0.61997265", "0.6160328", "0.6150938", "0.6139227", "0.6138289...
0.0
-1
date here is 22 June 2021
function isDonePressed(){ return ($('#ui-datepicker-div').html().indexOf('ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all ui-state-hover') > -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "display_date_formate(date) {\n if (!date)\n return null;\n const [year, month, day] = date.split('-');\n let new_date = `${day}-${month}-${year}`;\n return new_date;\n }", "function changeDateFormat(date) {\n const dayOfWk = date.slice(0, 4...
[ "0.6592368", "0.65260386", "0.6492451", "0.64799273", "0.6405214", "0.6329301", "0.6275878", "0.6259866", "0.62512964", "0.6249613", "0.6246348", "0.6233783", "0.6228027", "0.62259406", "0.6225071", "0.62053114", "0.61997265", "0.6160328", "0.6150938", "0.6139227", "0.6138289...
0.0
-1
Function to show the coordinates
function showCoordinates(evt) { //the map is in web mercator but display coordinates in geographic (lat, long) var mp = webMercatorUtils.webMercatorToGeographic(evt.mapPoint); //display mouse coordinates dom.byId("info").innerHTML = mp.x.toFixed(6) + ", " + mp.y.toFixed(6); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCoordinates(pt) {\n var coords =\n \"Lat/Lon \" +\n pt.latitude.toFixed(3) +\n \" \" +\n pt.longitude.toFixed(3) +\n \" | Scale 1:\" +\n Math.round(view.scale * 1) / 1 +\n \" | Zoom \" +\n view.zoom;\n coordsWidget.innerHTML = coords;\n this.x = pt.long...
[ "0.81441855", "0.78244513", "0.7572909", "0.7482773", "0.73900366", "0.73888487", "0.7347862", "0.7314186", "0.72872967", "0.72127056", "0.71374416", "0.7130202", "0.7122849", "0.71219677", "0.6985045", "0.69447637", "0.69440556", "0.68976307", "0.68128073", "0.67847455", "0....
0.77421594
2
End window load /validation functions
function validate_step3(){ var txtvolume = document.getElementById('volume'); var txtvtbp = document.getElementById('vtbp'); var i = 0; if (txtvolume.value.length == 0) { i=1; if (!txtvolume.classList.contains('failed')) { addMyClass(txtvolume, 'failed'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onUnload() {\n var result = 0;\n if (modalDocument.getElementById('prompt-input')) {\n result = {\n input1: '',\n buttonIndex: 0\n };\n }\n mainWindow.setTimeout(function() {\n callback(result);\n }, 10);\n ...
[ "0.6318814", "0.62575775", "0.6216198", "0.60801876", "0.6067761", "0.60552806", "0.60188776", "0.60148096", "0.59810686", "0.5978752", "0.5976543", "0.5960532", "0.5943678", "0.59294975", "0.5915867", "0.5911088", "0.5894496", "0.5883421", "0.58735675", "0.58735675", "0.5870...
0.0
-1
End validate /Form Navigation and Animation functions Function that executes on click of first next button
function next_step1(){ if (validate_step1(event) == false) { } else { addAnimation(document.getElementById("first"), 'bounceOutRight'); setTimeout(function() { document.getElementById("first").style.display="none"; document.getElementById("second").style.opaci...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stepNext() {\n\t$(\"#signupBtn\").click(function(e) {\n\t\te.stopPropagation();\n\t\tvalidateFormOnClick();\n\t});\n\n\t$(\"#nextBtn1\").click(\n\t\t\tfunction(e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\t/*\n\t\t\t\t * checks for social media accounts\n\t\t\t\t */\n\t\t\t\tif ($(\".soicalMediaAccounts:che...
[ "0.7574076", "0.74826735", "0.7280362", "0.71318585", "0.7092069", "0.70469993", "0.70438004", "0.70349926", "0.6980187", "0.6978441", "0.696699", "0.69352674", "0.6916917", "0.6884311", "0.68734145", "0.68717694", "0.686841", "0.686393", "0.68335986", "0.6829586", "0.6809124...
0.0
-1
Function that executes on click of first previous button
function prev_step1(){ addAnimation(document.getElementById("second"), 'bounceIn'); //calling this again actually removes the first instance document.getElementById("first").style.display="block"; document.getElementById("second").style.display="none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_previousButtonClickHandler() {\n const that = this;\n\n that.prev();\n }", "onPrevClick(){\n if(this.state.currentPage - 1 >= 1){\n this.changePage(this.state.currentPage - 1);\n }\n }", "function onClickNaviPrev(el) {\n if(curPageNumber <= 0) {\n ...
[ "0.82917476", "0.7924919", "0.78098804", "0.77716094", "0.77340585", "0.76054466", "0.75380266", "0.7524154", "0.7487418", "0.7472241", "0.74711215", "0.74586666", "0.7444226", "0.7444117", "0.7427753", "0.7425556", "0.7425287", "0.7418561", "0.74131423", "0.7407668", "0.7391...
0.0
-1
Function that executes on click of second next button
function next_step2(){ addAnimation(document.getElementById("second"), 'bounceOutRight'); setTimeout(function() { document.getElementById("second").style.display="none"; document.getElementById("third").style.opacity=0; document.getElementById("third").style.display="block"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_nextButtonClickHandler() {\n const that = this;\n\n that.next();\n }", "function onClickNaviNext(el) {\n curPageNumber = curPageNumber + 1;\n refreshTable();\n debug('Next button clicked. page number : ' + curPageNumber);\n }", "function Next() {\r\n ...
[ "0.8001836", "0.75874573", "0.75610214", "0.7546118", "0.7507356", "0.7464777", "0.74637586", "0.7456101", "0.7421566", "0.7411269", "0.74054074", "0.73862773", "0.7360911", "0.7355846", "0.7319868", "0.7300778", "0.73003787", "0.72877514", "0.728707", "0.7280467", "0.7266536...
0.0
-1
Function that executes on click of second previous button
function prev_step2(){ addAnimation(document.getElementById("third"), 'bounceIn'); //calling this again actually removes the first instance document.getElementById("third").style.display="none"; document.getElementById("second").style.display="block"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_previousButtonClickHandler() {\n const that = this;\n\n that.prev();\n }", "onPrevClick(){\n if(this.state.currentPage - 1 >= 1){\n this.changePage(this.state.currentPage - 1);\n }\n }", "function handlePrevButtonClick(){\n count--;\n}", "function previouss(){...
[ "0.79881054", "0.77707684", "0.77607316", "0.750424", "0.74932146", "0.74918336", "0.74818826", "0.74539727", "0.74498016", "0.7446216", "0.7446216", "0.7437266", "0.73808646", "0.7371793", "0.73716354", "0.7347639", "0.7342844", "0.73422354", "0.7337425", "0.73136413", "0.73...
0.0
-1
End Form Navigation /Extra Supporting Functions and Shit
function addMyClass(param, classToAdd) { //if it has the class if (param.classList.contains(classToAdd)) { param.classList.remove(classToAdd); } else { //if it doesnt have the class add it var classString = param.className; // returns the string of all the classes for element ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onGoBack() {\n setFormDataEdit(null);\n setStep('Menu');\n }", "function navCloseHandler() {\n if (!widthFlg) {\n $navigation.removeClass('show');\n $navigation.attr('style', '');\n $btnMenu.text(\"menu\");\n $dropdownItem.rem...
[ "0.64673257", "0.62859607", "0.6189257", "0.6162388", "0.6152718", "0.6104324", "0.60730463", "0.60721457", "0.6064055", "0.60532326", "0.6029156", "0.6027758", "0.5994471", "0.59925723", "0.5991818", "0.59880143", "0.5974813", "0.59721476", "0.59482884", "0.59440213", "0.593...
0.0
-1
mini functional parts postmanipulate calculated distance
function dbending(d) { var bended = hypotenuse(d) if (!process.env.EXACTLY) bended += Math.random() * 0.1 + 0.1; return bended // still NaN if `d` is NaN }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculer_distance() {}", "get distance() {}", "GetDistanceToPoint() {}", "function dist() {\n let temp = Math.floor(\n findDistance(coord.lat, goal.lat, coord.long, goal.long)\n );\n\n return temp;\n }", "getDistancia(x, xi, xf, y, yi, yf) {\n\n let dist;\n\n if (xf === xi) {\n...
[ "0.77168274", "0.6638102", "0.64362746", "0.63301885", "0.6316474", "0.62551296", "0.61889493", "0.61367273", "0.6117884", "0.6103734", "0.6101338", "0.60471684", "0.6037084", "0.6022002", "0.6021547", "0.60188365", "0.6017719", "0.60151285", "0.59958017", "0.5988903", "0.598...
0.0
-1
Change state of this.props, binding them with the input fields.value with onChange handler
onChangeHandler(ev) { ev.preventDefault(); let newState = {}; newState[ev.target.name] = ev.target.value; this.setState(newState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onInputChange(evt){\t\n\t\tthis.setState({\n\t\t\tfields: {\n\t\t\t\t...this.state.fields,\n\t\t\t\t[evt.target.name]: evt.target.value\n\t\t\t}\n\t\t})\n\t}", "onInputChange(evt) {\n\t\tthis.setState({\n\t\t\tfields: {\n\t\t\t\t...this.state.fields,\n\t\t\t\t[evt.target.name]: evt.target.value\n\t\t\t}\n\t\t})\...
[ "0.723989", "0.7081344", "0.6990467", "0.69303894", "0.6893381", "0.68351716", "0.6818248", "0.6810891", "0.6781459", "0.67386526", "0.67164195", "0.67162716", "0.671138", "0.67105246", "0.66982466", "0.6693796", "0.669288", "0.66904455", "0.6684546", "0.6684164", "0.6672957"...
0.0
-1
OnSubmit Event for the form returns the data from the form
onSubmitHandler(ev) { //Prevent refreshing the page ev.preventDefault(); deleteMeeting(this.props.params.meetingId, this.props.params.teamId, this.onDeleteSuccess) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onSubmit() {\n console.log(\"submit form\");\n }", "function handleSubmit(e) {\n e.preventDefault()\n setValue(input.value)\n console.log(data)\n }", "function formQueryOnSubmit(e) {\n console.log(\"Form submit\");\n\n // Get the current form fields values and use them for the filtering.\n par...
[ "0.71329004", "0.70171773", "0.6960429", "0.6937725", "0.6843396", "0.68184894", "0.6791249", "0.6785232", "0.6767738", "0.674767", "0.67299634", "0.66750795", "0.663809", "0.6621984", "0.6619802", "0.6600515", "0.65868676", "0.65727127", "0.6558023", "0.6550505", "0.65365154...
0.0
-1
the callback for the promise
onDeleteSuccess(result) { toastr.success('Team was successfully deleted'); this.context.router.push('/projects'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callback(){}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {\n\n}", "done(callback) {\n return this.then(callback);\n }", "function callback(response){\n }", "function cb () ...
[ "0.7400864", "0.7312642", "0.7312642", "0.7312642", "0.7312642", "0.7312642", "0.67095953", "0.6505374", "0.65051526", "0.6425828", "0.63560027", "0.6328267", "0.62807405", "0.6224743", "0.6193951", "0.619098", "0.6177795", "0.6135917", "0.61299396", "0.61106956", "0.61106956...
0.0
-1
Redirect without ajax call on Cancel form
redirectToMeetings(ev) { ev.preventDefault();//prevent form submittion(delete team) loadMeetings(this.props.params.teamId,this.loadMeetings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onCancel(e) {\n // Prevent default submission\n e.preventDefault();\n\n // Send back to Users List\n window.location = '/centers';\n }", "function cancelClick() {\n window.location.href = '/';\n}", "function cancel(){\r\n window.location.href = \"index.php\";\r\n}", "function cancelForm(e) {...
[ "0.7488064", "0.7386568", "0.73597157", "0.73159295", "0.7263468", "0.7138753", "0.7068496", "0.6924245", "0.69027674", "0.68249625", "0.6793896", "0.67899346", "0.67752826", "0.67714274", "0.6768533", "0.6737094", "0.6714016", "0.6676668", "0.6662117", "0.6637671", "0.662565...
0.0
-1
Handles replying to a Comment Not implemented
function ReplyButton(elem){ const [showReplyVisible, setVisibility] = React.useState(true); function toggleVisibility(){ setVisibility(showReplyVisible => !showReplyVisible) } let res = elem.replies.map(function(reply, j){ ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleComment() {\n this.isCommentPending(true);\n return postComment(this.id, { author: this.app.author(), comment: this.newComment() }).then((event) => {\n this.newComment('');\n this.isCommentPending(false);\n return this.eventList.unshift(formatEvent(event, this.messageType));\n });\n ...
[ "0.7708863", "0.6832159", "0.6637765", "0.6560386", "0.65093905", "0.650517", "0.64423364", "0.63563305", "0.63171697", "0.6308399", "0.6283293", "0.6258098", "0.6258098", "0.624258", "0.6212496", "0.6206625", "0.61713904", "0.6170521", "0.6162207", "0.61557174", "0.6113231",...
0.0
-1
import GamesPage from './GamesPage';
function App() { return ( <div className="App"> <header className="App-header"> <h2>HTML Table</h2> <ExpenseTable /> {/* <Link to="/games">Games</Link> */} </header> {/* <Switch> */} {/* <Route exact strict path="/games" component={GamesPage} /> */} {/* </Swi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n return (\n <div className=\"App\">\n <Game />\n </div>\n );\n }", "function MyApp() {\n return (\n <div>\n <AppPage /> \n </div>\n )\n}", "function App() {\n //return <Game></Game>;\n return <Game></Game>;\n}", "function App() {\n ret...
[ "0.6244587", "0.61006117", "0.6098538", "0.609818", "0.6036862", "0.6028734", "0.6005854", "0.59312445", "0.5911038", "0.5890058", "0.5859224", "0.58329254", "0.5829629", "0.5825954", "0.5812619", "0.5799401", "0.57777035", "0.5760471", "0.575151", "0.571828", "0.5716437", ...
0.6330631
0
Creates an array of tuples from a given object.
function makeTuples(prefix, args){ var result = []; traverseToTuple(result, prefix, args) return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toTuple(o) {\n const symbols = [];\n const name = o.reference(new (class {\n referenced(symbol) {\n symbols.push(symbol);\n }\n })());\n return [name, symbols];\n}", "function createArray(object) {\n let tmp = [];\n _.each(object, (obj) => {\n tmp.push(obj);\n ...
[ "0.67269146", "0.63996345", "0.6308285", "0.62468237", "0.6241149", "0.60511893", "0.60388625", "0.60274386", "0.60036516", "0.599286", "0.599286", "0.59521776", "0.5921584", "0.590532", "0.5869531", "0.5867672", "0.5867672", "0.5867672", "0.5867672", "0.5867672", "0.5867672"...
0.59606504
12
Creates an object from an array of tuples
function makeObject(tuples){ var result = {}; _.each(tuples, function(tuple){ fromTuple(result, tuple); }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tuple (iterable) {\n\t\tvar instance = iterable ? [] .slice.apply (iterable) : [];\n\t\tinstance.__class__ = tuple;\t// Not all arrays are tuples\n\t\treturn instance;\n\t}", "function tuple(t) {\r\n var ntuple = \"Tuple\" + t.length;\r\n t.constructor = Tuple[ntuple];\r\n return t;\r\n}", "f...
[ "0.6577601", "0.6523656", "0.6372333", "0.6135914", "0.6128947", "0.61259276", "0.605052", "0.60345745", "0.5850212", "0.5823852", "0.5748564", "0.5734126", "0.56744844", "0.56512856", "0.56365234", "0.5601409", "0.5594239", "0.5568129", "0.5555841", "0.5530465", "0.5522089",...
0.69237643
0
helper function for use with Array.filter
function isTruthy(item) { return !!item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter (array,fn) {\n return array.filter(fn)\n}", "function filter(arr, fn) {\n\tlet test = [];\n\tfor(let item of arr){\n\t\tif(fn(item)){\n\t\t\ttest.push(item);\n\t\t}\n\t\n\t}\n\treturn test;\n}", "function filter(array, fn) {\n let filteredArray = [];\n array.forEach(element => {\n ...
[ "0.7379216", "0.7362094", "0.7234091", "0.7229229", "0.7178334", "0.71449435", "0.712619", "0.71162283", "0.7101048", "0.7093666", "0.70903414", "0.70903414", "0.7057332", "0.7056652", "0.7050252", "0.7039697", "0.70201415", "0.7002493", "0.6997076", "0.6984575", "0.6980275",...
0.0
-1
convert a number into "chunks" of 0999
function chunk(number) { var thousands = []; while(number > 0) { thousands.push(number % 1000); number = Math.floor(number / 1000); } return thousands; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chunk(number) {\n var thousands = [];\n \n while(number > 0) {\n thousands.push(number % 1000);\n number = Math.floor(number / 1000);\n }\n \n return thousands;\n }", "function convert(n) {\n\tvar output = [];\n\twhile(n > 0) {\n\t\toutput.unshift(n % 10);\n\t\tn = Math.floor(n ...
[ "0.74570066", "0.69409204", "0.6778664", "0.66010445", "0.65276176", "0.6515498", "0.65051067", "0.6462788", "0.6449673", "0.63362104", "0.62806803", "0.6268133", "0.62567323", "0.62550986", "0.62451947", "0.62222016", "0.62200385", "0.6202866", "0.61516166", "0.6128454", "0....
0.73995775
1
translate a number from 1999 into English
function inEnglish(number) { var thousands, hundreds, tens, ones, words = []; if(number < 20) { return ONE_TO_NINETEEN[number - 1]; // may be undefined } if(number < 100) { ones = number % 10; tens = number / 10 | 0; // equivalent to Math.floor(number / 10) words.push(TENS[tens - 1]); wor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numberToEnglish (number) {\n\tvar result;\n\tvar number = number.valueOf();\n\tif(numbersToWords[number]){\n\t\tresult = numbersToWords[number];\n\t}\n\telse if(number < 100){\n\t\tvar numberPlace = Math.floor(number/10);\n\t\tvar numberLeft = number % 10;\n\t\tresult = numbersToWords[numberPlace * 10] ...
[ "0.76536375", "0.7610153", "0.7123993", "0.7114191", "0.70703566", "0.7010182", "0.69901806", "0.6957607", "0.6938789", "0.6937615", "0.6937615", "0.6907249", "0.67970705", "0.67590415", "0.67510843", "0.6736671", "0.67120993", "0.6700831", "0.66897696", "0.6653535", "0.66506...
0.0
-1
append the word for a scale. Made for use with Array.map
function appendScale(chunk, exp) { var scale; if(!chunk) { return null; } scale = SCALES[exp - 1]; return [chunk, scale].filter(isTruthy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_to_words(words, triplet_words, scale_word) {\n return triplet_words ? triplet_words + ((scale_word && ' ' + scale_word) || '') + ' ' + words : words;\n }", "function addToWords(words, tripletWords, scaleWord) {\n return tripletWords ?\n tripletWords + (scaleWord && ' ' + scaleWord |...
[ "0.7353717", "0.70800704", "0.60935026", "0.58142793", "0.5764573", "0.5730235", "0.57247204", "0.57084763", "0.5692312", "0.55770767", "0.55743223", "0.5557572", "0.5536456", "0.5504805", "0.55031437", "0.5467726", "0.5455779", "0.5453299", "0.541928", "0.54108584", "0.53918...
0.565481
9
The purpose of this function is.....
function longFunction() { ugfnwdb cwkncoeodcm diwhdvb iuhcivcow }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "static private internal function m121() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "transient private internal fun...
[ "0.6906635", "0.6819002", "0.65273845", "0.6386692", "0.6343275", "0.61547035", "0.6153467", "0.59795606", "0.596643", "0.59661394", "0.59549665", "0.592597", "0.58843225", "0.58389735", "0.58273673", "0.58142453", "0.58142453", "0.58142453", "0.5783669", "0.5783669", "0.5752...
0.0
-1
Artist(s) The song's name A preview link of the song from Spotify The album that the song is from
function spotThis(movieWords){ for (var i = 3; i < argv.length; i++) { movieWords += sep + argv[i]; sep = "+";//combines the words that make up a title to finish request URL to ombdiapi.com } spotify.search({type:"track", query: movieWords}, function(err, response){ if(err) { return co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spotifySong(songName) {\n if (songName === undefined) {\n songName = \"The Sign\";\n }\n\n spotify.search(\n {\n type: 'track',\n query: songName\n },\n function (err, data) {\n if (err) {\n return console.log(\"Error occ...
[ "0.76520264", "0.7404137", "0.7375343", "0.73372823", "0.7239051", "0.7235634", "0.72181934", "0.72169423", "0.71925074", "0.7182034", "0.70335156", "0.70181185", "0.70062757", "0.7000629", "0.69897544", "0.6974037", "0.6960037", "0.6951387", "0.69508266", "0.6924909", "0.691...
0.0
-1
assign a completed event for the ajax calls
function NBrightMod_nbxgetCompleted(e) { if (e.cmd == 'savetheme') { NBrightMod_nbxget('getsettings', '#themedata', '#settingsdata'); } if (e.cmd == 'gettheme') { // Action after getdata command $('#export').click(function () { NBrightMod_nbxget('exporttheme', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "done() {\n const eventData = EventData_1.EventData.createFromRequest(this.request.value, this.externalContext, Const_1.SUCCESS);\n //because some frameworks might decorate them over the context in the response\n const eventHandler = this.externalContext.getIf(Const_1.ON_EVENT).orElseLazy(() =>...
[ "0.7199933", "0.71755004", "0.71062213", "0.6919865", "0.6895397", "0.67936724", "0.674899", "0.67315674", "0.6718637", "0.67106736", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0.66775495", "0...
0.0
-1
Gets a random new fact from the list and returns to the user.
function handleNewFactRequest(response) { // Get a random soccer fact from the soccer facts list var factIndex = Math.floor(Math.random() * SOCCER_FACTS.length); var fact = SOCCER_FACTS[factIndex]; // Create speech output var speechOutput = "Here's your soccer fact: " + fact; response.tellWith...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addRandomFact() {\n const facts = [\n \"🎮 I develop Nintendo GameBoy Advance ROMs in my spare time\",\n \"📹 I was a YouTube star back in the days <a href='https://youtube.com/thefredo1000'>Check out my channel</a>\",\n \"🤓 I am a huge Star Wars fan\",\n \"🎵 I love Weezer, they are my favo...
[ "0.695552", "0.68768084", "0.6844064", "0.6591452", "0.6588891", "0.6588891", "0.6563388", "0.655867", "0.654821", "0.65060574", "0.6469259", "0.64275", "0.6374289", "0.63497174", "0.6324618", "0.6318282", "0.6317153", "0.62830174", "0.6254158", "0.62282646", "0.6216023", "...
0.6262336
18
THE FOLLOWING CODE IS USED WITH CREATE SCENARIO PAGE Set status
function setStatus(status) { $('#status').html(status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageStatusSet(type){\n if(type=='start'){//开启\n editBtnShow(false);\n showMenuBar(false);\n saveBtnShow(true);\n saveBtnDisabled(true);\n cancelStartBtnShow(true);\n cancelStartBtnDisabled(false);\n startBtnShow(false);\n ...
[ "0.6612279", "0.62191224", "0.61495304", "0.59345907", "0.5904097", "0.58987576", "0.5898751", "0.58966154", "0.5895512", "0.58812416", "0.58797723", "0.58654547", "0.57809806", "0.57678014", "0.57552624", "0.5751982", "0.57500917", "0.57418454", "0.57409227", "0.5736833", "0...
0.0
-1
Core function assembles all forms on a page into a JSON object, including the models and graph data. Additionally, it cleans the data up and determines relationships
function buildScenario() { // Make sure the user created at least one model if (!TMP_MODELS) { setStatus("No model created. Aborting."); return; } // display load screen LOADER.load(); setStatus('Serializing and Generating JSON...'); // Assemble all data and seria...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateFormJson() {\n\n\tvar formJson = {\n\t\tversion: formEditorVersion,\n\t\tsections: []\n\t};\n\n\t// loop through sections, add rows to rows[]\n\t$('#formEditor .formSection').each(function(i,section) {\n\t\tvar sectionJson = {\n\t\t\trows: []\n\t\t};\n\n\t\tif($(section).hasClass('collapsible')) {...
[ "0.6401785", "0.6249872", "0.60391855", "0.59100246", "0.58637494", "0.5733182", "0.56398815", "0.5577918", "0.5539263", "0.552593", "0.5448941", "0.54481936", "0.53989774", "0.5384182", "0.536885", "0.5358495", "0.5328849", "0.5304874", "0.5297911", "0.5280571", "0.5264627",...
0.57763135
5
The actual plugin constructor
function CantTouchThis ( element, options ) { this.element = $(element); this.container = $(options.container || element); this.touched = { start : { x : 0, time : 0, move : 0 }, end : { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n this._init();\n }", "constructor() {\n\t\t// ...\n\t}", "consructor() {\n }", "constructor() {\r\n super()\r\n this.init()\r\n }", "init() {\n }", "constructor()\n {\n this.init();\n }", "function contruct() {\n\n ...
[ "0.7422684", "0.7349132", "0.7314277", "0.73003334", "0.7299704", "0.7292701", "0.72775894", "0.72354233", "0.7233936", "0.7181569", "0.71798736", "0.71798736", "0.71798736", "0.71798736", "0.71798736", "0.71761876", "0.7157667", "0.71499527", "0.71496284", "0.71496284", "0.7...
0.0
-1
The translate loader needs to know where to load i18n files in Ionic's static asset pipeline.
function createTranslateLoader(http) { return new __WEBPACK_IMPORTED_MODULE_8__ngx_translate_http_loader__["a" /* TranslateHttpLoader */](http, './assets/i18n/', '.json'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function translate($translateProvider) {\n \t\t// Define json translation file location\n $translateProvider.useLoader('$translatePartialLoader', {\n urlTemplate: '/i18n/{lang}/{part}.json'\n });\n\n // Default language is 'fr'\n $translateProvider.preferredLanguage('fr');...
[ "0.695966", "0.66445637", "0.6604953", "0.6431672", "0.64242816", "0.63764286", "0.62624806", "0.6251165", "0.6219279", "0.61624026", "0.6130687", "0.6128693", "0.61202866", "0.6098402", "0.609819", "0.60860366", "0.6056986", "0.6030856", "0.59974504", "0.5992693", "0.5962767...
0.6470632
3
redutor recebe estado atual e retorna o novo estado apos modificacao podemos ter mais de um redutor
function usuario( state = usuarioInicial, action ) { // state nesse caso seria o usuario atual switch(action.type) { case "LOGA_USUARIO": const usuarioLogado = action.dados; const json = JSON.stringify(usuarioLogado); localStorage.setItem("usuario", json); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static estado(req,res){\n var estado;\n return Citas_Medicas\n .findByPk(req.params.id)\n .then((data) => {\n data.update({\n estado : estado || data.estado == false\n })\n .then(update => {\n res.status(200).send({\n messag...
[ "0.5618934", "0.56087613", "0.5525847", "0.54991126", "0.5497949", "0.54851973", "0.54518014", "0.54226416", "0.5420277", "0.5418164", "0.5398941", "0.53930914", "0.53584033", "0.5348778", "0.534532", "0.53377527", "0.53364605", "0.53141844", "0.5299", "0.5281543", "0.5250501...
0.0
-1
Como vai funcionar qualquer personagem
constructor(x, y, largura, altura, imagem) { this.x = x//Tem um x da tela this.y = y//Tem um y this.largura = largura//Uma largura da imagem dele this.altura = altura//E uma altura this.imagem = imagem//E claro, a imagem }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function permitirAcceso(persona) {\n if (!esMayorDeEdad(persona)){ // si la persona no es mayor de edad\n console.log(\"ACCESO DENAGADO\")\n }\n}", "function imprimirSiEsMayorDeEdad(persona) {\n if (esMayorDeEdad(persona)){ //llamamos a la funcion y le pasamos como parametro el objeto \n c...
[ "0.6197981", "0.6158126", "0.61470014", "0.6144813", "0.6140575", "0.6078101", "0.6040036", "0.59521484", "0.5950478", "0.59153545", "0.59047574", "0.5851951", "0.58362675", "0.5831269", "0.58293504", "0.58151907", "0.58099014", "0.5804061", "0.57961255", "0.57949144", "0.575...
0.0
-1
Como vai funcionar os inimigos, esses extende de spirte, ou seja, possuem as mesmas propriedades e mais
constructor() { super(1300, posição, 80, 80 ,imagemInimigo)//Equivale ao x,y,imagem... do Sprite this.velocidadeX = 5 * Math.random() + 3//Gera uma velocidade aleatória maior que 3 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inimigosAndam(){\n\tif(jogoEmAndamento==true){\n\t\tinimigos.forEach(andarInimigo);\n\t}\n}", "function andarInimigo(item, indice, inimigos){\n\tswitch(inimigos[indice].getDirecao()){\n\tcase(1): // Andar para leste\n\t\tinimigos[indice].setX(inimigos[indice].getX()-jogador.getVelocidadeMax()*inimigos[i...
[ "0.6306426", "0.6070888", "0.60532635", "0.57494587", "0.5669772", "0.55866873", "0.55255", "0.5524802", "0.54862005", "0.54851353", "0.5400588", "0.5261292", "0.52400666", "0.52100474", "0.52042633", "0.52016467", "0.51777494", "0.5161844", "0.5137159", "0.5128348", "0.51252...
0.0
-1
Cambio la funzione js da chiamare quando clicco sul link di un evento
function changeEventsToEventsForAdmin(month,year){ var events=$('.event'); events.each(function( index ) { $('#'+$(this).attr('id')+' a').attr("href", "javascript:popup_event_for_admin("+$( this ).attr('event_id')+","+month+","+year+")");; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function links_click_event(event) {\n console.log(\"works link\");\n}", "function conocerEvento(e)\n{\n\n\tvar evento = e || window.event;\n\n\t\t//document.getElementById(\"evento\").value = e.type;\n\n // console.log(\"evento\");\n // console.log(e);\n\n if(evento.type == \"click\")\n {\n\n ...
[ "0.6869164", "0.6669527", "0.6499425", "0.64433783", "0.64263564", "0.63944066", "0.6362922", "0.6304971", "0.6295221", "0.6264822", "0.6213434", "0.61905557", "0.6177645", "0.61594594", "0.6153962", "0.6122822", "0.606475", "0.60587925", "0.6054698", "0.60529107", "0.605206"...
0.0
-1
Aggiugne un nuovo calendario nel DB con il nome passato, poi ristampa l'editor
function addCalendar(name,month,year){ if(name.length==0) return; $.post('php/addCalendar.php',{'name':name},function(risposta){ if(risposta==0){ getCalendarForAdmin(month,year); //return false; } else if(risposta==1){ $('#new_cal_error').append('Il calendario <b><font color="black">'+na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calendarChanged(e) {\n var cal = {\n id: e.target.value,\n name: e.target.options[e.target.selectedIndex].text\n };\n\n if (cal.id !== '0')\n settings.calendar = cal;\n saveSettings();\n }", "function EventoCalendar(presupuesto, consumido, total, correo, nombre_alerta, resu...
[ "0.63392395", "0.6212207", "0.60270256", "0.59242594", "0.5868539", "0.5743623", "0.5675245", "0.5645592", "0.56315625", "0.557347", "0.55569106", "0.55228686", "0.55167264", "0.5477296", "0.5472888", "0.54719913", "0.54317844", "0.5391477", "0.53899556", "0.5365541", "0.5350...
0.57359934
6
Check online status and update according to changes
function checkOnline(){ if(navigator.onLine == true){ console.log("isOnline == true"); $rootScope.isOnline = true; } else { console.log("isOnline == false"); $rootScope.isOnline = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateOnlineStatus() {\n const online = typeof window.navigator.onLine !== 'undefined' ? window.navigator.onLine : true;\n\n if (!online) {\n this.emit('is-offline');\n this.info(this.i18n('noInternetConnection'), 'error', 0);\n this.wasOffline = true;\n } else {\n this.emit('is-online...
[ "0.77541965", "0.76225185", "0.75984657", "0.7428559", "0.7275677", "0.71925956", "0.71864724", "0.7157341", "0.7123631", "0.6952384", "0.69430506", "0.693279", "0.69226766", "0.68865305", "0.6864141", "0.68422705", "0.68270534", "0.68039006", "0.68038183", "0.67933923", "0.6...
0.6371336
63
The `setup` function to initialize your application
function setup() { /* Hexi has three main way that you can make sprites with animation frames. The first, lower level way, is to use the `frames` method. `frames` lets you list an array of x/y positions on an image that refer to each sub-image that you wan to use. The previous example showed you how to do ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setup () {\n }", "setup() {}", "setup() {}", "setup() {}", "function setup() {\n \n // create an HL app to start retrieving kinect datas\n // and automatically call the function update, onUserIn and onUserOut\n app = new HL.App();\n\n // set it up with our project's metadatas\n app.s...
[ "0.77397186", "0.74456203", "0.74456203", "0.74456203", "0.7420372", "0.72303027", "0.72077596", "0.70928115", "0.70897806", "0.7045832", "0.7045557", "0.7027069", "0.7004723", "0.68156284", "0.6799998", "0.67960465", "0.6785989", "0.67798823", "0.67592454", "0.6749272", "0.6...
0.0
-1
we cannot rely on `mySegmentsUpdaterTask.isRunning` to check if doing polling
function isRunning() { return running; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateTaskRunning() {\n this.taskRunning = !this.isEmpty;\n }", "function smartPausing() {\n if (!running) return; // noop if not doing polling\n const splitsHaveSegments = splitsStorage.usesSegments();\n if (splitsHaveSegments !== mySegmentsUpdaterTask.isRunning()) {\n log.info(`Turning ...
[ "0.72204465", "0.7171202", "0.66020703", "0.64585316", "0.64585316", "0.64585316", "0.64585316", "0.64585316", "0.64585316", "0.6354082", "0.61949337", "0.59740627", "0.5933138", "0.58765024", "0.58448654", "0.58354867", "0.58162254", "0.5741324", "0.57391673", "0.57269067", ...
0.5719427
20
emit SDK_SEGMENTS_ARRIVED (and thus SDK_READY) if not ready yet and splits are not using segments
function smartReady() { const isReady = context.get(context.constants.READY, true); if (!isReady && !splitsStorage.usesSegments()) segmentsEventEmitter.emit(segmentsEventEmitter.SDK_SEGMENTS_ARRIVED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupSegmentLoaderListeners_() {\n this.mainSegmentLoader_.on('bandwidthupdate', () => {\n // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n // useful to check to see if a rendition switch should be made.\n this.checkABR_('bandwidthupdate');\n this.tech_...
[ "0.5750641", "0.56873024", "0.5651679", "0.5588243", "0.53916925", "0.53481543", "0.5339523", "0.53202355", "0.52985066", "0.5227055", "0.5175594", "0.5111908", "0.50463575", "0.5001606", "0.49936208", "0.48734024", "0.48707643", "0.4848429", "0.48399127", "0.48289707", "0.47...
0.77702093
0
smartly pause/resume mySegmentsUpdaterTask while doing polling
function smartPausing() { if (!running) return; // noop if not doing polling const splitsHaveSegments = splitsStorage.usesSegments(); if (splitsHaveSegments !== mySegmentsUpdaterTask.isRunning()) { log.info(`Turning segments data polling ${splitsHaveSegments ? 'ON' : 'OFF'}.`); if (splitsHaveSeg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n running = true;\n if (splitsStorage.usesSegments()) mySegmentsUpdaterTask.start();\n }", "function SegmentUpdateWorker(segment) {\n var maxChangeNumber = 0;\n var handleNewEvent = false;\n var isHandlingEvent;\n var cdnBypass;\n var backoff = new Backof...
[ "0.6381206", "0.631058", "0.62410367", "0.61266255", "0.59800893", "0.5872631", "0.5849767", "0.58467734", "0.5786298", "0.5768773", "0.565462", "0.5642172", "0.56027126", "0.55994445", "0.55923426", "0.55735224", "0.55529857", "0.555044", "0.5513171", "0.5490042", "0.5483377...
0.7401371
0
Start periodic fetching (polling)
start() { running = true; if (splitsStorage.usesSegments()) mySegmentsUpdaterTask.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async startPolling() {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll();\n await this.delay();\n }\n }", "function startPolling() {\t\t\n\t\t// Don't accidentally start a second lo...
[ "0.7203694", "0.71464664", "0.71339357", "0.7132326", "0.70873183", "0.7069042", "0.70648205", "0.67679095", "0.6751609", "0.6630283", "0.65955323", "0.6520132", "0.6501348", "0.6501348", "0.64987195", "0.64568853", "0.6428473", "0.639237", "0.6381051", "0.63787884", "0.63613...
0.0
-1
Stop periodic fetching (polling)
stop() { running = false; mySegmentsUpdaterTask.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopPolling() {\n\t\tticking = false;\n\t}", "stopPolling() {\n this.keepPolling = false;\n if (this.interval) {\n clearTimeout(this.interval);\n this.interval = null;\n }\n }", "stopRequesting() {\n this.data = [];\n clearInterval(this.data_request);\n }",...
[ "0.7734321", "0.71777785", "0.7148235", "0.70686674", "0.68716437", "0.6760457", "0.67106366", "0.67106366", "0.6693018", "0.6641739", "0.66021436", "0.65773726", "0.65773726", "0.655462", "0.653219", "0.65169835", "0.65099704", "0.64611685", "0.6453224", "0.64481235", "0.644...
0.0
-1
constructor is also a function which we want to set dynamically we will took those as parameter of constructor function
constructor(name, address) { this.name = name; this.address = address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function construct() { }", "function _ctor() {\n\t}", "function _construct()\n\t\t{;\n\t\t}", "function construct(constructor, argList) {\r\n for (var argNames = '', i = argList.length; i--;) {\r\n argNames += (argNames ? ',a' : 'a') + i;\r\n }\r\n return Function(argNames...
[ "0.71062", "0.6809558", "0.6797726", "0.6632753", "0.6615672", "0.6585468", "0.6585468", "0.6585468", "0.65811807", "0.6525359", "0.64492553", "0.64021", "0.63962996", "0.6365394", "0.63271254", "0.63096994", "0.63096994", "0.63096994", "0.63096994", "0.63096994", "0.63096994...
0.0
-1
must use super constructor when use constructor into extended class
constructor(name, address, time) { // name and address parameter from super constructor super(name, address) this.groupSupportTime = time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(...args) {\n super(...args);\n \n }", "constructor() {\n\t\tsuper(...arguments);\n\t}", "constructor() { super() }", "constructor () {\n // Run super\n super();\n }", "constructor () {\n // Run super\n super();\n }", "constructur() {}", "constructor () { super() }", "...
[ "0.78213704", "0.7806739", "0.7760861", "0.77290887", "0.77290887", "0.7643607", "0.758601", "0.7465988", "0.7461924", "0.74467254", "0.73498034", "0.73356944", "0.7292872", "0.7292872", "0.7281397", "0.7281397", "0.7281397", "0.7281397", "0.7281397", "0.7281397", "0.7281397"...
0.0
-1
constructor is also a function which we want to set dynamically we will took those as parameter of constructor function here is function but we can't write function keyword
startSession(device) { console.log(this.name, 'start a support session from', this.address, 'by', device); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function funConstructor(arg1, arg2) {\n this.fname = arg1;\n this.lname = arg2;\n}", "constructur() {}", "function tempCtor() {}", "function construct() { }", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function TempCtor() {}", "function TempCtor() {}",...
[ "0.7085846", "0.6965579", "0.6939541", "0.68865186", "0.67874265", "0.67874265", "0.67874265", "0.6747465", "0.6747465", "0.6747465", "0.6747465", "0.6747465", "0.6747465", "0.67007977", "0.6700353", "0.65554154", "0.653836", "0.653836", "0.653836", "0.653836", "0.653836", ...
0.0
-1