query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
create an object contructor for the about page
function About(obj) { this.name = obj.name; this.giturl = obj.giturl; this.porturl = obj.porturl; this.description = obj.description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AboutViewModel() {\n \n\t \n\t \n return AboutViewModel();\n }", "function load_about() {\n\t\tvar about_card = new UI.Card({\n\t\t\tbody: 'WMATA With You\\n' +\n\t\t\t\t'version 2.5\\n' +\n\t\t\t\t'by Alex Lindeman\\n\\n' +\n\t\t\t\t'Built with Pebble.js and the WMATA API.',\n\t\t\tscrollable: ...
[ "0.65293044", "0.65177935", "0.63212216", "0.61964065", "0.61757743", "0.61757743", "0.611987", "0.609772", "0.6075698", "0.60373044", "0.601762", "0.59945744", "0.59507304", "0.59452647", "0.5937162", "0.5936154", "0.5930287", "0.5927293", "0.59219724", "0.59016234", "0.5901...
0.75398135
0
IEEE 80 bit extended float
readFloat80 (littleEndian) { this.read(10, littleEndian) return float80() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeFloat( buf, v, offset, dirn ) {\n var norm, word, sign = 0;\n if (v < 0) { sign = 0x80000000; v = -v; }\n\n if (! (v && v < Infinity)) {\n if (v === 0) { // -0, +0\n word = (1/v < 0) ? 0x80000000 : 0x00000000;\n }\n else if (v === Infinity) { ...
[ "0.6808168", "0.6808168", "0.64386445", "0.6378993", "0.63424796", "0.63230914", "0.622323", "0.61889064", "0.61809254", "0.6088265", "0.60630894", "0.60406524", "0.60131747", "0.6010828", "0.60093445", "0.59962416", "0.5969833", "0.5946727", "0.59460145", "0.5944585", "0.593...
0.7223796
0
Setup the editor panel for a special shape.
function setUpEditPanel(shape) { //var propertiesPanel = canvas.edit; //access the edit div var propertiesPanel = document.getElementById("edit"); propertiesPanel.innerHTML = ""; if (shape == null) { //do nothing } else { switch (shape.oType) { case 'Group': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addEditor() {\n // Create new editor\n this.editor = $(`\n <div id=\"${this.id}-Editor\" class=\"editCell\">\n <div class=\"editHeader\">\n <p class=\"editHeaderTitle\">${this.id} Editor</p>\n </div>\n <div class=\"editOptionTable\">\n </div>\n </div>\n `);\n...
[ "0.70467025", "0.63430184", "0.6309362", "0.6300952", "0.62441707", "0.62281024", "0.6204311", "0.5986968", "0.59697926", "0.58973294", "0.58360356", "0.58198124", "0.5749198", "0.57448304", "0.5737035", "0.5714603", "0.56999", "0.5699018", "0.56742215", "0.5621828", "0.55888...
0.7721231
0
Makes grid visible or invisible, depedinding of previous value If the "snap to" was active and grid made invisible the "snap to" will be disabled
function showGrid() { /**If grid was visible and snap to was check we need to take measures*/ if (gridVisible) { if (snapTo) { snapTo = false; document.getElementById("snapCheckbox").checked = false; } } gridVisible = !gridVisible; backgroundImage = null; //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snap() {\r\n\t\tvar snap = document.getElementById(\"snap\");\r\n\t\tif (snap.checked === true) {\r\n\t\t myDiagram.toolManager.draggingTool.isGridSnapEnabled = true;\r\n\t\t myDiagram.toolManager.resizingTool.isGridSnapEnabled = true;\r\n\t\t} else {\r\n\t\t myDiagram.toolManager.draggingTool.isGridSn...
[ "0.7160396", "0.6910818", "0.6657223", "0.66179657", "0.66085166", "0.65047735", "0.63629955", "0.63577014", "0.6345158", "0.6317878", "0.63112783", "0.6302816", "0.62902975", "0.6274988", "0.6164239", "0.6106401", "0.60991347", "0.60934", "0.6076557", "0.60635424", "0.604880...
0.7035048
1
Print current diagram Print can be triggered in 3 cases only after diagram was saved: 1 from menu 2 from quick toolbar 3 from Ctrl + P shortcut Copy link to saved diagram's png file to src of image, add it to iframe and call print of last.
function print_diagram() { var printFrameId = "printFrame"; var iframe = document.getElementById(printFrameId); // if iframe isn't created if (iframe == null) { iframe = document.createElement("IFRAME"); iframe.id = printFrameId; document.body.appendChild(iframe); } /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printDiagram() {\n var svgWindow = window.open();\n if (!svgWindow) return; // failure to open a new Window\n var printSize = new go.Size(1700, 2960);\n var bnds = myDiagram.documentBounds;\n var svg = myDiagram.makeSvg({ scale: 1.0, position: new go.Point(0, 0), size: bnds });\n svgWindow.document...
[ "0.63316315", "0.62739676", "0.6170226", "0.60262626", "0.60187477", "0.59463614", "0.59202445", "0.5874236", "0.5873068", "0.5872673", "0.58568233", "0.58197814", "0.5805974", "0.57907474", "0.5730226", "0.5699699", "0.5699699", "0.5694505", "0.5691409", "0.5687984", "0.5684...
0.7598626
0
Exports current canvas as SVG
function exportCanvas() { //export canvas as SVG var v = '<svg width="300" height="200" xmlns="http://www.w3.org/2000/svg" version="1.1">\ <rect x="0" y="0" height="200" width="300" style="stroke:#000000; fill: #FFFFFF"/>\ <path d="M100,100 C200,200 100,50 300,100" style="stroke:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_saveContextSVG(){\n this.getGraphicsContext().saveSVG();\n }", "function saveSVG(){\n\t\t\tvar blob = new Blob([canvas.toSVG()], {type: \"text/plain;charset=utf-8\"});\n\t\t\tsaveAs(blob, \"download.svg\");\n\n\t\t}", "function canvasToSVG() {\n if (chart.boost &&\n chart.boost.wgl...
[ "0.7611495", "0.760116", "0.7534128", "0.7454485", "0.74182296", "0.72102493", "0.71317697", "0.7026638", "0.69958067", "0.686196", "0.68500465", "0.67527467", "0.6705932", "0.669488", "0.6677252", "0.6640134", "0.66087085", "0.6607238", "0.65885", "0.658524", "0.6525618", ...
0.77538526
0
['Elie', 'Tim', 'Matt', 'Colt'] vowelCount
function vowelCount(str){ var vowels ="aeuio"; return str.toLowerCase().split('').reduce(function(acc, nVal){ if(vowels.indexOf(nVal) !== -1){ if(acc[nVal]){ acc[nVal]++; } else { acc[nVal] = 1; } } return acc; }, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vowelCount(str) {\n\tvar vowels = 'aeiou';\n\treturn str.toLowerCase().split(\"\").reduce(function(acc, next){\n\t\tif(vowels.indexOf(next) !== -1) {\n\t\t\tif(acc[next]) {\n\t\t\t\tacc[next]++;\n\t\t\t} else {\n\t\t\t\tacc[next] = 1;\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, {});\n}", "function countvowel...
[ "0.81807715", "0.79066265", "0.78577167", "0.7847525", "0.7834786", "0.77947104", "0.77783763", "0.76659334", "0.76409614", "0.7620593", "0.7597341", "0.75891644", "0.7570892", "0.7554376", "0.75438464", "0.75330657", "0.75097483", "0.74998695", "0.749715", "0.7488472", "0.74...
0.81547403
1
Enable async hooks Hooks are enabled by default.
enable () { this.hook.enable() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerHooks() {\n\n S.addHook(this._hookPre.bind(this), {\n action: 'functionRun',\n event: 'pre'\n });\n\n S.addHook(this._hookPost.bind(this), {\n action: 'functionRun',\n event: 'post'\n });\n\n return BbPromise.resolve();\n }", "async setup() {\n ...
[ "0.6162924", "0.6069756", "0.60573655", "0.6001707", "0.591311", "0.58630574", "0.57786167", "0.5667597", "0.56569", "0.5647904", "0.5635138", "0.56149524", "0.55609155", "0.55569375", "0.55372244", "0.55340433", "0.55156875", "0.5512929", "0.5512929", "0.5512929", "0.5512929...
0.6836857
0
Disable async hooks Context will not be maintained in future event loop iterations.
disable () { this.hook.disable() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __onContextDisable() {\n return false;\n }", "disableAsyncRequest() {\n this._asyncRequest = false;\n }", "function disable() {\n ['complete', 'addNewTags', 'removeTags']\n .forEach(m => api[m] = () => Promise.resolve([]));\n }", "function disable...
[ "0.71950406", "0.6153484", "0.6112214", "0.6021565", "0.60205686", "0.591711", "0.5854089", "0.5690456", "0.56767505", "0.5668639", "0.562131", "0.5610665", "0.55469155", "0.55469155", "0.5541081", "0.553704", "0.5526142", "0.55109835", "0.54716474", "0.5409741", "0.5400517",...
0.6993661
1
Modal dynamic centering ===================================================
function modalCentering() { $('.modal').each(function(){ if($(this).hasClass('in') === false){ $(this).show(); } var contentHeight = $(window.parent, window.parent.document).height() - 60; var headerHeight = $(this).find('.modal-header').outerHeight() || 2; var footerHeight = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function centerModals(){\r\n $('.modal').each(function(i){\r\n var $clone = $(this).clone().css('display', 'block').appendTo('body');\r\n var top = Math.round(($clone.height() - $clone.find('.modal-content').height()) / 2);\r\n top = top > 0 ? top : 0;\r\n $clone.remove();\r\n ...
[ "0.7634573", "0.75718945", "0.75614905", "0.7467109", "0.72934854", "0.7237434", "0.72195196", "0.71343297", "0.6906135", "0.6774058", "0.6645346", "0.6619515", "0.6583715", "0.6579641", "0.65769255", "0.65513873", "0.6471437", "0.64542484", "0.6451589", "0.6449236", "0.64283...
0.80270875
0
Evaluate an arbitrary chunk of script in the scene graph execution context. The script is guaranteed to be evaluated after the scene graph execution context is fully initialized. It is not guaranteed to be evaluated before or after a Model is made available in the scene graph execution context. Note that web browsers d...
async eval(scriptSource) { const port = await this[$workerInitializes]; const url = URL.createObjectURL(new Blob([scriptSource], { type: 'text/javascript' })); port.postMessage({ type: ThreeDOMMessageType.IMPORT_SCRIPT, url }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_eval() {\n if (this._alreadyStarted) {\n return;\n }\n\n // TODO: this text check doesn't seem completely the same as the spec, which e.g. will try to execute scripts with\n // child element nodes. Spec bug? https://github.com/whatwg/html/issues/3419\n if (!this.hasAttributeNS(null, \"src\") &...
[ "0.61933666", "0.59797895", "0.5734536", "0.5630442", "0.5562425", "0.5440175", "0.5411526", "0.53185433", "0.5271838", "0.52667075", "0.52625674", "0.52625674", "0.5241362", "0.5230076", "0.5201438", "0.51871127", "0.517867", "0.516801", "0.5165879", "0.51389235", "0.5137787...
0.6708901
0
Terminates the scene graph execution context, closes the designated messaging port and generally cleans up the ThreeDOMExecutionContext so that it can be properly garbage collected.
async terminate() { this[$worker].terminate(); const modelGraftManipulator = this[$modelGraftManipulator]; if (modelGraftManipulator != null) { modelGraftManipulator.dispose(); this[$modelGraftManipulator] = null; } const port = await this[$workerInitializ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "end() {\n this.medals();\n this.endMessage();\n this.cleanUp();\n this.gc();\n }", "exitFrame() {\n if (this.contexts && this.contexts.length > 1) {\n this.contexts = this.contexts.slice();\n this.contexts.splice(-1);\n this.currentContextIds.shift()...
[ "0.61951625", "0.6139838", "0.6139838", "0.60261166", "0.6016587", "0.60042286", "0.5998117", "0.5997658", "0.5953353", "0.594772", "0.5934514", "0.5889676", "0.5885655", "0.5883969", "0.58755493", "0.5869661", "0.5844082", "0.58144414", "0.58104604", "0.5806847", "0.5805008"...
0.6300904
0
query search for treatments [autocomplete]
function treatmentQuerySearch() { var tracker = $q.defer(); var results = (editMsVm.treatment.details ? editMsVm.treatments.filter(createFilterForTreatments(editMsVm.treatment.details)) : editMsVm.treatments); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _search()\n {\n var allCategoryNames = [];\n // Incorporate all terms into\n var oepterms = $scope.selectedOepTerms ? $scope.selectedOepTerms : [];\n var situations = $scope.selectedSituations ? $scope.selectedSituations : [];\n var allCategories = oepterms.concat(situations);\n allCate...
[ "0.6473379", "0.6268314", "0.61744547", "0.6118348", "0.6066907", "0.6066789", "0.60286826", "0.5998705", "0.597417", "0.5948177", "0.59417623", "0.59346545", "0.5902784", "0.5893795", "0.58632654", "0.5860122", "0.5858314", "0.5842589", "0.58420855", "0.5838895", "0.5833866"...
0.7134493
0
repeats the given string string exactly n times.
function repeatStr (n, s) { //input is a string // output string n times let repeat = s.repeat(n) return repeat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function repeatStringNTimes(string, repCount) {\n let result = string.repeat(repCount);\n console.log(result);\n}", "function repeatStr(n, s) {\n let newString = \"\";\n for (i = 0; i < n; i++) {\n newString += s;\n }\n return newString;\n}", "function repeatedString(string, n) {\n const numberOf...
[ "0.85007757", "0.8225302", "0.8168625", "0.8129868", "0.81127983", "0.81127983", "0.81127983", "0.810197", "0.80864567", "0.8082709", "0.8057919", "0.80425656", "0.7984281", "0.7947498", "0.7947498", "0.79459924", "0.79293984", "0.791726", "0.79057306", "0.7879492", "0.786288...
0.8264229
1
Display data sex distribution per category
function sex_per_category(data) { console.log(data); const indexes = []; const categories = []; const males = []; const females = []; data.forEach(item => { indexes.push(parseInt(item.index)); categories.push(item.category); males.push(parseInt(item.sum_male)); females.push(parseInt(item.sum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewSexTrade() {\n var color = d3.scale.linear()\n .range([\"#fee5d9\", \"#fcbba1\", \"#fc9272\", \"#fb6a4a\", \"#de2d26\", \"#99000d\"]);\n\n var val1 = d3.entries(data)\n // sort by value descending\n .sort(function(a, b) { return d3.ascending(a.value.sexTotal, b.value.sexTotal); })\n // tak...
[ "0.5959805", "0.59451514", "0.59236306", "0.59132034", "0.5898405", "0.5814487", "0.57751083", "0.57670313", "0.57618374", "0.57575333", "0.5697842", "0.55218154", "0.550682", "0.5409061", "0.5408525", "0.5245627", "0.5193849", "0.5162972", "0.5139002", "0.513693", "0.5131126...
0.6391051
0
handles mouse events over the lines
function handleMouseOverLines(lambdaList) { canvas.addEventListener("mousemove", e => showLineNumberInBox(e, lambdaList)); canvas.addEventListener("mouseleave", unshowLineNumberInBox); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interMouseMove() {\n var m = d3.mouse(this);\n line.attr(\"x2\", m[0]-3)\n .attr(\"y2\", m[1]-3);\n}", "function interMouseMove() {\n var m = d3.mouse(this);\n line.attr(\"x2\", m[0]-3)\n .attr(\"y2\", m[1]-3);\n}", "function updateMouseHoverLine() {\r\n for (var i=0; i<li...
[ "0.7554375", "0.7554375", "0.74858207", "0.7247059", "0.7206811", "0.71695733", "0.71290773", "0.7072641", "0.7054814", "0.70529497", "0.69415504", "0.68399286", "0.67913026", "0.674144", "0.67294276", "0.67154515", "0.6698092", "0.667147", "0.6644009", "0.662962", "0.6622562...
0.78415483
1
adds a number to the bootom of the popup box when mouse is over the corresponding line
function showLineNumberInBox(e, lambdaList) { x = e.clientX; y = e.clientY; var lineNum = 0; const xOff = e.offsetX; if (xOff % 4 <= 2) { cursor = " "; lineNum = parseInt(xOff / 4); if (lambdaList.includes(lineNum)) { cursor = lineNum; } } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showLineNumberInBox(e, lambdaList) {\n // console.log(e.target.getContext(\"2d\"));\n x = e.clientX;\n y = e.clientY;\n var lineNum = 0;\n const xOff = e.offsetX;\n if (xOff % 4 <= 2) {\n cursor = \" \";\n lineNum = parseInt(xOff / 4);\n if (lambdaList.includes(lineN...
[ "0.67592955", "0.6614352", "0.62537307", "0.6186476", "0.618575", "0.61709523", "0.61543155", "0.6144594", "0.6143707", "0.61396706", "0.61323035", "0.61254305", "0.6089654", "0.6072405", "0.6065777", "0.6059029", "0.6055843", "0.6055259", "0.6049621", "0.60314864", "0.602596...
0.6657385
1
removes the line number created in method showLineNumberInBox when mouse leaves the line
function unshowLineNumberInBox() { document.getElementById("displayArea").innerHTML = "Wavelength Number: "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "timelineUnmarkEvents() {\n this.line.setSelection();\n }", "function showLineNumberInBox(e, lambdaList) {\n // console.log(e.target.getContext(\"2d\"));\n x = e.clientX;\n y = e.clientY;\n var lineNum = 0;\n const xOff = e.offsetX;\n if (xOff % 4 <= 2) {\n cursor = \" \";\n ...
[ "0.6328683", "0.63186103", "0.622773", "0.6204096", "0.6202259", "0.6202259", "0.6109514", "0.6082548", "0.5948113", "0.5938224", "0.59150827", "0.58933675", "0.5865645", "0.58542687", "0.58542687", "0.5800403", "0.5773268", "0.57700723", "0.5767764", "0.57254225", "0.5677842...
0.6563106
1
write to Google API in batch to respect rate limits
function batchWriteToDrive(oauth2Client){ //Google Sheet API Quota: 100req/100s per user. if (queue.length > 0){ writeToDrive(oauth2Client); } setTimeout(function(){ batchWriteToDrive(oauth2Client) },3000 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doBatchWrite(batch) {\r\n\r\n let requestBatch = batch.map(function (item) {\r\n return {\r\n PutRequest: {\r\n Item: item\r\n }\r\n };\r\n });\r\n\r\n let params = {\r\n RequestItems: {}\r\n };\r\n\r\n params.RequestItems[tableName] = requestBatch;\r\n...
[ "0.7247172", "0.6488182", "0.6431659", "0.6353969", "0.62039834", "0.6197206", "0.604436", "0.59201676", "0.58174837", "0.57005084", "0.56742567", "0.5663563", "0.5654786", "0.5646171", "0.55959135", "0.55823845", "0.55812925", "0.5573223", "0.55704427", "0.55629694", "0.5561...
0.7140714
1
renders todo details in modal
function renderModalTodo(todo) { todo = $(todo); var id = todo.attr('data-id'), title = todo.attr('data-title'), priority = todo.attr('data-priority'), details = todo.attr('data-details'), created = todo.attr('data-created'), elapsed = parseInt(todo.attr('data-elapsed')), finish = todo.at...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderModalEdit(todo) {\n\t\tvar form = $('#form-todo-edit');\n\t\t\n\t\tvar id = todo.attr('data-id'),\n\t\t\t\ttitle = todo.attr('data-title'),\n\t\t\t\tpriority = todo.attr('data-priority'),\n\t\t\t\tdetails = todo.attr('data-details'),\n\t\t\t\tcreated = todo.attr('data-created'),\n\t\t\t\telapsed = p...
[ "0.7492966", "0.7484302", "0.6420262", "0.6416993", "0.6294539", "0.6256276", "0.62361515", "0.6209705", "0.6191751", "0.6191233", "0.6190431", "0.61891675", "0.6180034", "0.61781734", "0.6170497", "0.61701435", "0.61595416", "0.6092127", "0.60896057", "0.6089572", "0.6059959...
0.82247376
0
renders todo info on edit modal
function renderModalEdit(todo) { var form = $('#form-todo-edit'); var id = todo.attr('data-id'), title = todo.attr('data-title'), priority = todo.attr('data-priority'), details = todo.attr('data-details'), created = todo.attr('data-created'), elapsed = parseInt(todo.attr('data-elapsed')), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderModalTodo(todo) {\n\t\ttodo = $(todo);\n\t\t\n\t\tvar id = todo.attr('data-id'),\n\t\t\t\ttitle = todo.attr('data-title'),\n\t\t\t\tpriority = todo.attr('data-priority'),\n\t\t\t\tdetails = todo.attr('data-details'),\n\t\t\t\tcreated = todo.attr('data-created'),\n\t\t\t\telapsed = parseInt(todo.attr...
[ "0.7879672", "0.72978574", "0.71237314", "0.679732", "0.6789736", "0.6735313", "0.67139035", "0.6689956", "0.6672412", "0.66141886", "0.66096693", "0.6608107", "0.65953094", "0.6585301", "0.656784", "0.65665364", "0.6566337", "0.65657467", "0.6564237", "0.65475243", "0.647148...
0.8279227
0
Returns the path at which the asset can be found in the archive
function getPathInArchive(asset) { if (Platform.OS === 'android') { var assetDir = getBasePath(asset); // E.g. 'assets_awesomemodule_icon' // The Android resource system picks the correct scale. return (assetDir + '/' + asset.name) .toLowerCase() .replace(/\//g, '_') // Encode fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get assetPath() {}", "get assetPath() {}", "get assetBundleManifestPath() {}", "get assetpath() {\n // Don't override existing assetpath.\n if (!this.__assetpath) {\n // note: assetpath set via an attribute must be relative to this\n // element's location; accomodate polyfilled HTMLImports\n ...
[ "0.72988594", "0.72988594", "0.6928078", "0.6344683", "0.6304178", "0.62533545", "0.61659217", "0.6121274", "0.59751874", "0.5935436", "0.5926797", "0.5808916", "0.5782934", "0.5780586", "0.57536286", "0.5746315", "0.57212144", "0.56528574", "0.56408256", "0.5589051", "0.5582...
0.73705804
0
Returns an absolute URL which can be used to fetch the asset from the devserver
function getPathOnDevserver(devServerUrl, asset) { return devServerUrl + getScaledAssetPath(asset) + '?hash=' + asset.hash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function url(id) {\n var basedir = getCallsiteDirname();\n return 'url(' + requireAssets(id, basedir) + ')';\n}", "getURL(url) {\n return this.isDev() ? path.join(\"../\", url) : url\n }", "get 'asset-path'() { return process.env.PUBLIC_URL ? `\"${process.env.PUBLIC_URL}\"` : '\"/\"'; }", "get as...
[ "0.6948651", "0.6923575", "0.68518424", "0.66799545", "0.66799545", "0.65441257", "0.6415133", "0.63643956", "0.63643956", "0.63643956", "0.63643956", "0.63579535", "0.63579535", "0.62959653", "0.6251196", "0.6241207", "0.6232682", "0.62325305", "0.6221429", "0.62188184", "0....
0.74271345
0
Delete snippet by id
function delete_snippet(id) { $(".snippet_row_" + id).remove(); // if there aren't any visible rows (i.e. excluding the 0 row that we use for cloning) if ($('#manage_snippets_table .snippet_row:visible').length <= 0) { $('#no_snippets_row').show(); } else { $('#n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteExercise(id) {\n $.ajax({\n method: \"DELETE\",\n url: \"/api/exercises/\" + id\n })\n .then(function () {\n $(`[data-exercise=${id}]`).remove();\n });\n }", "function remove(id){\n var direccion = urlDelete.replace...
[ "0.6677927", "0.6606545", "0.6560378", "0.64950675", "0.64659834", "0.6445743", "0.64454406", "0.63364446", "0.6326042", "0.62944067", "0.62941897", "0.62693906", "0.62572294", "0.6239765", "0.62353086", "0.6210317", "0.61874735", "0.61831236", "0.61811054", "0.6143782", "0.6...
0.7400315
0
createSelectionForm Create an item selection form
function createSelectionForm(request, response) { try { //CreateSselection Form selectionForm = nlapiCreateForm('Add Item',true); //Create Buttons selectionForm.addSubmitButton('Submit'); //Create Fields errorLabel = selectionForm.addField('custpage_errorlabel','text', 'Error').setDefaultValu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OSelect_XFormItem() {}", "function createSellform(d,item,quant,descid,hash,itemimage,textdesc) {\n var form = document.createElement('form');\n form.setAttribute('name','sellform');\n form.setAttribute('action','managestore.php');\n form.setAttribute('method','post');\n form.setAttribute(...
[ "0.6568907", "0.61604923", "0.60122895", "0.59901494", "0.5973197", "0.5971516", "0.59151924", "0.5914817", "0.5910627", "0.5890022", "0.58494586", "0.58254844", "0.58111006", "0.580995", "0.5785791", "0.5781966", "0.574826", "0.57324183", "0.5718386", "0.56893796", "0.568786...
0.69874
0
For paginated scrolling, simply scroll the gallery one item in the given // direction and let css scroll snaping handle the specific alignment.
function scrollToNextPage() { gallery_scroller.scrollBy({ left: gallery_item_size, top: 0, behavior: 'smooth' }); // updateBtns() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "scroll(direction) {\n // Keeps the index from going higher than the max length or lower than 0\n if (direction === \"left\") {\n this.currentIndex--;\n } else this.currentIndex++;\n if (this.currentIndex < 0) {\n this.currentIndex = this.indexMax;\n retu...
[ "0.70670897", "0.675597", "0.67098963", "0.6574764", "0.6327665", "0.61983526", "0.6159656", "0.61009616", "0.60126805", "0.5959501", "0.59357655", "0.592107", "0.5913941", "0.58752733", "0.5864747", "0.58629566", "0.5848337", "0.5841379", "0.5838567", "0.58115864", "0.579824...
0.6808054
1
Fill board with moderator
fillModerator(grid) { for (var x = 0; x < this.nCols; x++) { for (var y = 0; y < this.nRows; y++) { grid[x][y] = new Moderator(x, y, this); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyBoard(){\n g_wall = new Wall(g_newBoard,0,0);\n reset();\n}", "function setNewGame() {\n const fieldsArr = board.fields;\n\n for (let i = 0; i <= 64; i++) {\n let startPostion = fieldsArr[i];\n let piece = false;\n\n if (i >= 8 && i <= 15) {\n ...
[ "0.6520373", "0.6321369", "0.6300839", "0.6237424", "0.61506736", "0.6076635", "0.60347265", "0.600643", "0.59284896", "0.5926426", "0.59053224", "0.59016913", "0.58932483", "0.5882883", "0.5870567", "0.58621615", "0.5853807", "0.5834048", "0.58315206", "0.5778541", "0.576403...
0.72101647
0
Fill edges with walls
fillEdges(grid) { for (var x = 0; x < this.nCols; x++) { grid[x][0] = new Wall(x, 0, this); grid[x][this.nRows-1] = new Wall(x, this.nRows-1, this); } for (var y = 1; y < this.nRows-1; y++) { grid[0][y] = new Wall(0, y, this); grid[this.nCols-1][y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fill(edges,inner)\n{\n var r;\n var l;\n var d;\n var u;\n\n var count=0;\n var visited = new Set();\n var visit_later=new Set([intify(inner)]);\n while(visit_later.length != 0)\n {\n v = pointify(Array.from(visit_later)[0]);\n r = intify([v[0]+1,v[1]])\n l = intify([v[0]-1,v[1]])\n d...
[ "0.6780318", "0.665928", "0.6615446", "0.6555187", "0.6404461", "0.6328344", "0.62806356", "0.62559336", "0.622399", "0.620246", "0.6186758", "0.6156086", "0.6133909", "0.6103521", "0.60797733", "0.60089236", "0.5964475", "0.59593767", "0.595872", "0.5914151", "0.59028786", ...
0.76997936
0
Create reactor from genome's data
createReactorFromGenome(genome) { for (var x = 0; x < this.nCols; x++) { for (var y = 0; y < this.nRows; y++) { this.grid[x][y] = new TILE_MAP[genome.grid[x][y]](x, y, this); } } this.fillEdges(this.grid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mating (parent1, parent2) {\n // Create a child genome\n let child = new Genome();\n\n parent1.neurons.forEach(neuron => {\n child.pushNeuron(neuron.neuron);\n });\n\n parent1.synapses.forEach(synapse => {\n if (parent2.synapses.id == synapse.id) {\n child.pushSynapse(util.randBool(...
[ "0.5178849", "0.51047647", "0.47394875", "0.4737446", "0.46850276", "0.46726274", "0.46125326", "0.46085462", "0.45834824", "0.45480216", "0.45465487", "0.45460716", "0.45187247", "0.45109233", "0.45065793", "0.45057622", "0.44775924", "0.44625717", "0.43933642", "0.43859088", ...
0.65718883
0
Returns the reactor's heat
getTotalHeat() { var totalHeat = 0; for (var x = 0; x < this.nCols; x++) { for (var y = 0; y < this.nRows; y++) { totalHeat += this.grid[x][y].heat; } } return totalHeat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stats(heat) {\r\n\t\t// If max hasn't been set yet or if the value is bigger, use the current value.\r\n\t\tif (typeof max === 'undefined' || heat > max) max = heat;\r\n\t\t// If min hasn't been set yet or if the value is smaller, use the current value.\r\n\t\tif (typeof min === 'undefined' || heat < min)...
[ "0.5725281", "0.5705587", "0.5526374", "0.5522373", "0.55149597", "0.5491786", "0.5486443", "0.53699565", "0.5363011", "0.53147906", "0.5285283", "0.52120245", "0.5204996", "0.51845163", "0.51728326", "0.5164788", "0.5143756", "0.5143756", "0.51254344", "0.50591487", "0.50378...
0.5792577
0
PIN CATEGORY SIDE BAR
function category_pin() { var category_div = document.getElementById('category_sidebar'); category_div.className = 'pinned'; var button = document.getElementById('category_pin_button'); button.innerHTML = 'открепить'; button.onclick = function(){category_unpin();}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function category_unpin()\n {\n var category_div = document.getElementById('category_sidebar');\n category_div.className = '';\n var button = document.getElementById('category_pin_button');\n button.innerHTML = 'закрепить';\n button.onclick = function(){category_pin();};\n }", "function pinSidebar(pin)...
[ "0.6158295", "0.60753703", "0.591074", "0.5605908", "0.54719955", "0.5331518", "0.53056294", "0.5298818", "0.5294535", "0.52878004", "0.5282211", "0.5244853", "0.51596785", "0.513349", "0.5128288", "0.51180726", "0.5116166", "0.5092711", "0.50923866", "0.5052136", "0.50391245...
0.6795635
0
UNPIN CATEGORY SIDE BAR
function category_unpin() { var category_div = document.getElementById('category_sidebar'); category_div.className = ''; var button = document.getElementById('category_pin_button'); button.innerHTML = 'закрепить'; button.onclick = function(){category_pin();}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function category_pin()\n {\n var category_div = document.getElementById('category_sidebar');\n category_div.className = 'pinned';\n var button = document.getElementById('category_pin_button');\n button.innerHTML = 'открепить';\n button.onclick = function(){category_unpin();};\n }", "function S...
[ "0.6633049", "0.61525327", "0.5794614", "0.5732173", "0.5698377", "0.5660663", "0.56453115", "0.5632748", "0.5581395", "0.5539151", "0.5536879", "0.5531846", "0.5501331", "0.547862", "0.5447614", "0.54385215", "0.54380804", "0.5434021", "0.5430503", "0.5367485", "0.5366992", ...
0.6570702
1
Change the test depends on the selection from the dropdown box
function test_ChangeOption(scope) { selected_Test = scope.first_test; current_test=selected_Test; scope.sample_disable=true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_dialog_dropdown_ui_values_in_the_dropdown_should_be_visible_in_edit_mode() {}", "function test_user_should_be_able_to_change_the_order_of_values_of_the_drop_down_list() {}", "fashionselect(){\n cy.get('.border-left-0').click();\n cy.get('.dropdown-menu >').contains('Fashion').then(o...
[ "0.67946875", "0.6755283", "0.6581949", "0.65648925", "0.65648925", "0.6526555", "0.6436549", "0.6434502", "0.6424533", "0.6420319", "0.6415478", "0.6392609", "0.63565344", "0.63557845", "0.635174", "0.63439506", "0.62650853", "0.6246674", "0.6242976", "0.6237628", "0.6232605...
0.7133847
0
Change the juice sample on the selection from the dropdown box
function samplechangeOption(scope) { selected_sample =scope.select_sample; sample_number= parseInt(selected_sample)+5; for (var i = 5; i < 15; i++) { var _beaker_name = "beaker_" + i; beaker_name_container = machine_container.getChildByName(_beaker_name); beaker_name_container.visible=false; } machine_co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged() {\n // Obtain selected sample from dropdown\n var selectedSample = Plotly.d3.select('select').property('value'); \n console.log('selectsamle_value : ' , selectedSample)\n // Call plot function with the new sample value\n fillOutTable(selectedSample);\n buildCharts(selecte...
[ "0.66189796", "0.6478805", "0.6455171", "0.6378742", "0.6339185", "0.62233233", "0.6163575", "0.61579686", "0.6103114", "0.6088636", "0.6085081", "0.60725796", "0.6068693", "0.6038692", "0.6037897", "0.60126996", "0.5999956", "0.5995459", "0.59934384", "0.5974364", "0.5973837...
0.6771794
0
function for aspirate the sample
function aspirateSample(scope){ aspirate_flag=true; if(current_test==0){ machine_stage.getChildByName("test_1").text = beaker_values[current_test_beaker_number-1]+" ppm"; changeFlame(1); } else{ machine_stage.getChildByName("test_1").text = beaker_values[current_test_beaker_number-1]+" ppm"; changeFlame(0);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Sample() {}", "Next() {\r\n return this.InternalSample();\r\n }", "readSample() {\n return 0;\n }", "function loopRecordedSample(name) {\n }", "function displayInitialSample(){\n\t\t//probably call it when starwars is clicked\n\t\tclearInfo();\n\t\t$spanInfo.html(\"<h4><b>Sample pie...
[ "0.640226", "0.63033336", "0.6285483", "0.6206293", "0.6042451", "0.59828913", "0.5927889", "0.5922859", "0.5878001", "0.58676636", "0.5837722", "0.5830816", "0.581275", "0.5781232", "0.5768793", "0.5758464", "0.5747044", "0.57237124", "0.5721485", "0.5719678", "0.5716194", ...
0.67916924
0
Function for changing the flames inside the machine
function changeFlame(flame){ if(flame==1){ machine_container.getChildByName("normal_flame").visible = true; machine_container.getChildByName("second_flame").visible = false; } else{ machine_container.getChildByName("normal_flame").visible = false; machine_container.getChildByName("second_flame").visible = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lightMode() {\n change(\n \"rgb(255 255 255 / 50%)\",\n \"rgb(0 0 0 / 50%)\",\n \"Light Mode\",\n \"fa-moon\",\n \"fa-sun\",\n \"img/undraw_proud_coder_light.svg\",\n \"img/undraw_feeling_proud_light.svg\",\n \"img/undraw_conceptual_idea_light.svg\"\n );\n \n}", "function flak...
[ "0.6119707", "0.589232", "0.5880041", "0.584753", "0.58289", "0.58140135", "0.5796855", "0.5793538", "0.5757344", "0.5730048", "0.5710642", "0.5705972", "0.5695456", "0.5693474", "0.5683954", "0.5680432", "0.56637627", "0.5646314", "0.56396985", "0.56367624", "0.56318754", ...
0.66716665
0
form submit delete empty file table
function delEmptyFileTable() { var arrDelNum = new Array(); var tmpSort = 0; $("[name=attanames]").each(function(i){ var attanamesId = $(this).attr("id"); var delNum = attanamesId.replace('attaname',''); var delFileInfo = ''; if(document.getElementsByName('attafiles') !=null && document.getEl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fileDeleted(){\n let form = this\n let file = ''\n $('#fileupload').bind('fileuploaddestroy', function (e, data) {\n // remove inputs named 'selected_files[]' that will interfere with the back end\n $(\"input[name='selected_files[]']\").remove();\n $(\"input[name='sf_ids']\").ea...
[ "0.7204416", "0.6918951", "0.6832437", "0.6826155", "0.67882264", "0.67180246", "0.6670666", "0.66552645", "0.6595723", "0.6572796", "0.6497151", "0.64416236", "0.6421615", "0.63921726", "0.638505", "0.6349582", "0.63241607", "0.6256853", "0.62384754", "0.6091419", "0.6085645...
0.7063793
1
avoiding old IEbug Calculates whether log level passes the given treshold
function _passingTreshold(logLevels, logTreshold, logLevel) { var tresholdValue = _.isNumber(logTreshold) ? logTreshold : logLevels[logTreshold] , logValue = logLevels[logLevel]; // when 'console' log requested, allow for any treshold greater than 0 return ('console' === logLevel) ? (logTreshold > 0)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static toLog(param) {\n const restrictionNum = this.LOG_LEVELS[this.logLevel];\n const requiredNum = this.LOG_LEVELS[param];\n return requiredNum > restrictionNum;\n }", "function is_level( level ) {\n return log_level > 0\n ? log_level > level\n : log_methods.length + log_le...
[ "0.7078592", "0.6772465", "0.67403865", "0.6683781", "0.6357224", "0.6217686", "0.61500543", "0.60483897", "0.59366786", "0.59135354", "0.5868117", "0.5868117", "0.58139783", "0.5813451", "0.5775238", "0.57187974", "0.5695288", "0.5695288", "0.5657519", "0.5653344", "0.565334...
0.78095204
0
Takes a buffer of bytes and splits it into chunks, each of which starts with a MSG_TOKEN_START An array of these chunks is returned
splitBuffer( buf ) { let chunks = []; // discard any bytes at the front before the START let position = buf.indexOf( MSG_TOKEN_START ); if( position > 0 ) { // Clear the bytes before the start buf = buf.slice( position ); } else if( position < 0 ) { // no START at all... inva...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChunk(i, message){\n\tvar m = [];\n\tfor(let j = 0; j < 16; ++j){\n\t\tm[j] = message[(i * 64) + (j * 4) + 0] << 0 |\n\t\t message[(i * 64) + (j * 4) + 1] << 8 |\n\t\t message[(i * 64) + (j * 4) + 2] << 16 |\n\t\t message[(i * 64) + (j * 4) + 3] << 24;\n\t}\n\treturn m;\n}", "func...
[ "0.61869943", "0.60298955", "0.59152037", "0.5880399", "0.5838884", "0.581013", "0.57597834", "0.5655488", "0.5653349", "0.56403196", "0.5609602", "0.5604847", "0.5600512", "0.5567884", "0.5562531", "0.55203986", "0.55201626", "0.5433067", "0.543182", "0.54123884", "0.5411549...
0.8727454
0
Called to handle a received, validated PDU.
onReceive( pdu ) { // We push it to the Transform object, which spits it out // the Readable side of the stream as a 'data' event this.push( Buffer.from( pdu.slice(3, pdu.length-1 ))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_transform(chunk, encoding, cb) {\n\n var me = this;\n //console.log('Chunk: ', chunk );\n\n // Concatenate any previous data, and split into an array of\n // encoded PDUs that start with a MSG_START byte\n let encodedPdus = this.splitBuffer( Buffer.concat([this.buffer, chunk]) );\n\n // Now we l...
[ "0.5652895", "0.55782306", "0.5489844", "0.5383237", "0.52497417", "0.5247988", "0.51484007", "0.5133036", "0.5129151", "0.51179457", "0.5115272", "0.50902283", "0.5064763", "0.4984619", "0.49633747", "0.49563098", "0.49541304", "0.49541304", "0.4942457", "0.49421838", "0.494...
0.5923784
0
calculate 2s complement checksum over a buffer, starting with a byte index
checksum( buf, start, length ) { let sum = 0; for( var i = start; i < start+length; i++ ) { sum = sum + buf[i]; } return ((~sum)+1) & 0xFF; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crc(buf){return(updateCrc(-1,buf,buf.length)^-1)>>>0;// u32\n}", "checksum_buf(com){\n\tvar cs=0;\n\tvar cl=com.length;\n\tfor(var b=0; b<cl-1; b++){\n\t var by=com.readUInt8(b);\n\t var csb = ~by & 0x7F;\n\t cs = cs ^ csb;\n\t}\n\tcom.writeUInt8(cs,cl-1);\n\treturn String.fromCharCode(cs);\n ...
[ "0.71113706", "0.69702226", "0.69534045", "0.66330284", "0.6595845", "0.63730997", "0.6250073", "0.6237258", "0.6106878", "0.59434587", "0.5887493", "0.57834655", "0.57324564", "0.5727105", "0.57150084", "0.57025385", "0.5680195", "0.5680195", "0.566878", "0.56614137", "0.564...
0.77874213
0
Gets file from S3.
static getFile (bucketName, objectKey) { const s3 = Storage._getS3Instance(); const params = { Bucket: bucketName, Key: objectKey }; return new Promise((resolve, reject) => { s3.getObject(params, (err, data) => { if (err) { reject(err); } else { reso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getFile(params) {\n try {\n console.log(\"s3.getObject Params: \", params);\n var s3 = new this.AWS.S3();\n let file = await s3.getObject(params).promise();\n return (file);\n } catch (error) {\n console.error('S3.getObject error: ', error)...
[ "0.78079504", "0.7776254", "0.7768614", "0.7666587", "0.75503224", "0.7482117", "0.7363299", "0.7182902", "0.7181803", "0.688952", "0.6852944", "0.6791557", "0.67521936", "0.6731061", "0.6689846", "0.6646522", "0.6614215", "0.6455275", "0.64538085", "0.64111936", "0.6358914",...
0.78494304
0
Gets the single S3 instance.
static _getS3Instance () { s3instance = s3instance || new AWS.S3({ apiVersion: S3_API_VERSION }); return s3instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getS3(awsAccessKey, awsSecretKey) {\n return new AWS.S3({\n accessKeyId: awsAccessKey,\n secretAccessKey: awsSecretKey\n });\n}", "async get(){\n try {\n let objectResult = await s3.getObject({\n Bucket: this.bucket,\n Key: this.key\n }).promise();\n \n ...
[ "0.6656993", "0.6265979", "0.59003764", "0.5823779", "0.57539546", "0.5641354", "0.5605176", "0.5571959", "0.5543661", "0.5536765", "0.54907435", "0.54037434", "0.5251508", "0.52197915", "0.5178293", "0.51291525", "0.5107308", "0.50706774", "0.50539833", "0.50228333", "0.4990...
0.8515359
0
post errors to error / warning div
function postErrorsAndResetErrorMessage(){ $("#errors").html(errorMessage); $("#errors").show(); // errorMessage = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onerror(e){\n\t\t$('#errors').text(e.message);\n\t}", "function puterrors(error) {\n\tvar errBox = document.getElementById(\"reg-body\");\n\t// set the error box border to solid (from unset/hidden)\n\terrBox.style.borderStyle = \"solid\";\n\t// create a br (line break) element\n\tvar br = document.creat...
[ "0.7345106", "0.7003722", "0.70031124", "0.69754785", "0.6937411", "0.6910826", "0.69068384", "0.6904859", "0.6883177", "0.6868487", "0.6841011", "0.68354553", "0.6824967", "0.6816095", "0.67859614", "0.67851627", "0.6778072", "0.67690885", "0.6754595", "0.6752317", "0.673353...
0.7158374
1
Format static value value => string lang => language by default is ptBR currency => coin local of your country
moneyBr(value, lang = 'pt-BR', currency = 'BRL'){ return new Intl.NumberFormat(lang, { style: 'currency', currency: currency }).format(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatUSCurrency(val) {\r\n return val.toLocaleString('en-US',\r\n {style: \"currency\", currency: \"USD\"});\r\n}", "callback(value) {\n return formatCurrency(value, 4);\n }", "formatCurrency(value) {\n // get signal\n const signal = Number(value) < 0 ? '-' :...
[ "0.651506", "0.64985025", "0.6482709", "0.62792337", "0.6258011", "0.6253429", "0.62495065", "0.6238753", "0.62161463", "0.62109095", "0.62088484", "0.61990064", "0.60094863", "0.5987913", "0.5980939", "0.59350103", "0.59262705", "0.5908184", "0.5867833", "0.5865651", "0.5821...
0.70016795
0
mask money event => object d = decimal point (string) sm = separator milhar (string) sd = separator decimal (string) return void
money(event, d = 2, sm = '.', sd = ','){ let decimal = d, separator_milhar = sd, separator_decimal = sd, decimal_potention = Math.pow(10, decimal), separator_thousend = `$1` + separator_milhar, override_value, value_pointer, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputuang(e) {\n $(e).maskMoney({\n precision:0,\n prefix:'Rp. ', \n // allowNegative: true, \n thousands:'.', \n // decimal:',', \n affixesStay: true\n });\n }", "function format_amount(e)\r\n {\r\n var keyUnicod...
[ "0.6767298", "0.6744517", "0.67332816", "0.65413684", "0.62796265", "0.6259652", "0.6182066", "0.61473644", "0.6076687", "0.6056442", "0.604357", "0.60005164", "0.6000347", "0.59704", "0.59254843", "0.58790016", "0.5857714", "0.5849423", "0.58411807", "0.5815827", "0.57933676...
0.8255722
0
mask postal event => object return void
postal(event){ let isObj = typeof event == 'object', isEmpty = event.target.value.length <= 0; if(!isObj || isEmpty){ throw new Error('Bad format object'); } event.target.setAttribute('maxLength', 9); let v = event.target.value; eve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MaskMarkerVisitor() {\n}", "onStoreAfterRequest(event) {\n if (this.activeMask && !event.exception) {\n this.unmaskBody();\n }\n }", "function mask_cpfcnpj(obj, event)\n{\n if ( obj.value.length > 14 )\n MascaraCNPJ(obj, event);\n else\n MascaraCPF(obj, event);\n}", "func...
[ "0.5835061", "0.56395924", "0.5594026", "0.5395339", "0.5369281", "0.5360633", "0.5350389", "0.53418493", "0.53418493", "0.53011334", "0.52943146", "0.5264602", "0.5187621", "0.5172707", "0.51695657", "0.50957537", "0.50862104", "0.50561285", "0.50167686", "0.50034493", "0.49...
0.56837326
1
This function check cookie el => (string) return bool
checkCookie(el){ let status = this.getCookie(el); if(status == "" || status == null){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chkcookies(){\n\tvar NameOfCookie=\"userID\";\n\tvar c = document.cookie.indexOf(NameOfCookie+\"=\"); \n\tif (c != -1){\n\t\treturn(true);\n\t}\n\telse{\n\t\treturn (false);\n\t}\n}", "function checkCookie(cname) {\r\n if (getCookie(cname)==\"\") {return false;}\r\n else {return true;}\r\n}", "f...
[ "0.73606443", "0.72911894", "0.7180929", "0.71735245", "0.71650785", "0.70307887", "0.6869332", "0.68459654", "0.6831618", "0.6825115", "0.67239934", "0.66806513", "0.6665405", "0.6634839", "0.6592151", "0.6562246", "0.65170187", "0.6499462", "0.64911544", "0.64473623", "0.64...
0.84635955
0
React navigation tab stack for Playlist Analyser.
function TabOneNavigator() { return ( <TabOneStack.Navigator> <TabOneStack.Screen name="PlaylistAnalyserHome" component={PlaylistAnalyser} options={{ headerTitle: 'Playlist Analyser' }} /> <TabOneStack.Screen ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n var trackers_list = get_top_trackers()\n\n return (\n <div className=\"flex-container\">\n <Tab.Container id=\"tracker-tabs\" defaultActiveKey=\"first\">\n <Row class=\"tracker-list-box\">\n <Col sm={3}>\n <Nav variant=\"pills\" className=\"flex-column...
[ "0.66776645", "0.6347059", "0.62501615", "0.60769594", "0.6051393", "0.59929645", "0.59875596", "0.59699994", "0.5966047", "0.5892641", "0.58367765", "0.58248866", "0.58224255", "0.580555", "0.57718146", "0.5764554", "0.574374", "0.5736207", "0.57299453", "0.57164484", "0.571...
0.64225847
1
React navigation tab stack for Song Analyser.
function TabTwoNavigator() { return ( <TabTwoStack.Navigator> <TabTwoStack.Screen name="SongAnalyserHome" component={SongAnalyser} options={{ headerTitle: 'Song Analyser' }} /> <TabTwoStack.Screen name="Searc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TabOneNavigator() {\n return (\n <TabOneStack.Navigator>\n <TabOneStack.Screen\n name=\"PlaylistAnalyserHome\"\n component={PlaylistAnalyser}\n options={{ headerTitle: 'Playlist Analyser' }}\n />\n <TabOneStack.Screen\...
[ "0.6475666", "0.6468039", "0.63124937", "0.60596925", "0.60255635", "0.5970851", "0.5945669", "0.59344715", "0.58610266", "0.5822944", "0.58227867", "0.5788462", "0.576454", "0.5754998", "0.57089555", "0.56597733", "0.56468105", "0.5641285", "0.56297016", "0.56173426", "0.561...
0.6485928
0
React navigation tab stack for About.
function TabThreeNavigator() { return ( <TabThreeStack.Navigator> <TabThreeStack.Screen name="AboutHome" component={About} options={{ headerTitle: 'About' }} /> </TabThreeStack.Navigator> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AboutStackNavigator() {\n\treturn (\n\t\t<Stack.Navigator>\n\t\t\t<Stack.Screen name=\"About\" component={AboutScreen} />\n\t\t</Stack.Navigator>\n\t);\n}", "function TabStack(props) {\n const tabPress = (e) => {\n global.currenRouter = e.target.split(\"-\")[0];\n };\n return (\n <Tab.Navigator...
[ "0.70132256", "0.66482043", "0.63314754", "0.63214475", "0.6297563", "0.6234316", "0.6162473", "0.61617774", "0.6129372", "0.606334", "0.6059632", "0.6044198", "0.59987694", "0.5944048", "0.5923726", "0.58679473", "0.58668506", "0.58446765", "0.5799544", "0.57880574", "0.5787...
0.688706
1
'GET' request an url, and call callback with JSON data
function request(url, callback) { var xmlhttp = new XMLHttpRequest(); xmlhttp.open('GET', url, true); xmlhttp.send(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var data = JSON.parse(xmlhttp.responseText); callback(data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get(url, callback) {}", "function jsonGet(url, callback) {\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', url, true);\r\n xhr.setRequestHeader('Content-Type', 'application/json');\r\n\r\n xhr.onreadystatechange = callback;\r\n\r\n xhr.send();\r\n}", "function getData(url, callback) ...
[ "0.78543854", "0.78474337", "0.7731454", "0.7632696", "0.7539297", "0.7533426", "0.7480702", "0.74681365", "0.7466682", "0.74615675", "0.7448217", "0.7424495", "0.74029636", "0.7398302", "0.7366457", "0.7339989", "0.73132175", "0.72810423", "0.7279093", "0.72603595", "0.72539...
0.7996012
0
make a horizon chart
function horizon() { var hrz = context.horizon(); if (type === 'm') { return hrz.extent([0, 2]) .colors(['black', 'black', 'teal', '#dd1144']); } else if (type === 'v') { return hrz; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initHorizontalChart() {\n console.log(\"initHorizontalChart\");\n\n // ordinal.rangeRoundBands(interval, padding, outerPadding)\n // computes range values so as to divide the chart area into evenly-spaced, evenly-sized bands\n // assures integers for pixel; values (avoids aliasing)\n...
[ "0.6576366", "0.6515155", "0.6300424", "0.6260759", "0.61928976", "0.6131376", "0.6125039", "0.6079667", "0.6016706", "0.60162926", "0.60162246", "0.6012936", "0.5994601", "0.5994601", "0.5994601", "0.5994601", "0.5994601", "0.5994601", "0.5935575", "0.59330875", "0.5905058",...
0.71342796
0
Renders a thumbnail view of the image.
function renderThumbnail(url) { var canvas = document.querySelector('#thumbnail'); var context = canvas.getContext('2d'); canvas.width = 100; canvas.height = 100; var image = new Image(); image.addEventListener('load', function() { var src_w = image.width; var src_h = image.height; var new_w =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display() {\n var content = this.getContent();\n var root = Freemix.getTemplate(\"thumbnail-view-template\");\n\n content.empty();\n content.append(root);\n this._setupViewForm();\n this._setupLabelEditor();\n\n var images = Freemix.property.getPrope...
[ "0.70654005", "0.6743225", "0.66222453", "0.6562471", "0.6522311", "0.6441667", "0.6409667", "0.64059156", "0.6402615", "0.63581777", "0.62729055", "0.6243776", "0.62026244", "0.61985946", "0.61974347", "0.6117547", "0.6112769", "0.60977876", "0.6074607", "0.6050965", "0.6002...
0.7134303
0
import Video from "./SaranyuPlayer/Video";
function App() { return ( <span> {/* <VideoPlayer src="https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4" /> */} <SaranyuVideoPlayer /> {/* <Video /> */} </span> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function VideoPlayer(){}", "function onPlayerReady(event) {\n //event.target.playVideo();\n}", "function onPlayerReady(event) {\n //event.target.playVideo();\n}", "function onPlayerReady(event) {\r\n //event.target.playVideo();\r\n}", "function onPlayerReady(event) {\nevent.target.playVideo();\n}", ...
[ "0.67883414", "0.628995", "0.628995", "0.626998", "0.62494785", "0.62154454", "0.6121657", "0.6107251", "0.6103174", "0.6102647", "0.60809976", "0.60392433", "0.6021456", "0.60100764", "0.5986119", "0.5975372", "0.5967229", "0.59636736", "0.5937823", "0.5931005", "0.5924925",...
0.7422757
0
/ / This cheeky function just grabs the first part of the url after the first forward slash It will return just the 'v1' or 'v5' depending on what is passed to it This means there is no need for duplicate code for each iteration oh and it only works up to to v9
function getVersion(a) { var secondBracket = a.url.indexOf('/', 1); return a.url.substring(1, secondBracket) || "v1"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFirstPart(url) {\n var indexOfTS = url.indexOf(\"//\");\n if(indexOfTS==-1) {\n return url.split(\"/\")[0];\n }\n else {\n var fp = url.substring(indexOfTS+2);\n ...
[ "0.629994", "0.6248497", "0.6241973", "0.6241973", "0.6169043", "0.5998651", "0.58641255", "0.5807509", "0.577553", "0.57436085", "0.573082", "0.57080716", "0.5697199", "0.56947345", "0.56690013", "0.5661327", "0.5617613", "0.560411", "0.55708545", "0.5549006", "0.55392975", ...
0.74001163
0
Resize JS9 in a div (id must be JS9canvas)
function resizeJS9InDiv() { let wWidth = $('#JS9-canvas').width(); let wHeight = window.innerHeight - 200; $('.JS9Menubar').attr('data-width', wWidth); $('.JS9Toolbar').attr('data-width', wWidth); $('.JS9Toolbar').attr('data-height', '30px'); $('.JS9').attr('data-width', wWidth); $('.JS9').a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeJS9() {\n let wWidth = window.innerWidth / 1.2;\n let wHeight = window.innerHeight - 125;\n $('#JS9-canvas').css('margin-left', (window.innerWidth-wWidth)/2+'px');\n $('.JS9Menubar').attr('data-width', wWidth);\n $('.JS9Toolbar').attr('data-width', wWidth);\n $('.JS9Toolbar').attr(...
[ "0.730455", "0.68586385", "0.6810608", "0.67658746", "0.67411005", "0.67411005", "0.67367375", "0.6717239", "0.66893893", "0.6601592", "0.6598368", "0.65592873", "0.64905846", "0.6427998", "0.6384384", "0.6364894", "0.63329726", "0.6315134", "0.6311764", "0.6278579", "0.62772...
0.77290565
0
dynamically adjust heights of all regions
function adjustRowRegionsHeights() { // handle region areas for upper rows if ($(".upperRow").length) { var rows = $(".regions").find(".upperRow"); rows.each(adjustUpperRowRegionsHeight); } // handle region areas for the bottom row ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adjustRowRegionsHeights() {\n // handle region areas for upper rows\n if ($(\".upperRow\").length) {\n var rows = $(\".regions\").find(\".upperRow\");\n rows.each(adjustUpperRowRegionsHeight);\n }\n\n // hand...
[ "0.767654", "0.6946048", "0.6924941", "0.6866327", "0.68433464", "0.68425596", "0.6821279", "0.68204063", "0.6752954", "0.6700764", "0.6660623", "0.6592755", "0.64511824", "0.64098984", "0.64033854", "0.636346", "0.63422424", "0.6335405", "0.63190836", "0.6309503", "0.6297684...
0.76559716
1
Returns the height of the tallest region in row, minimum 100 px
function getRowRegionsMaxHeight(row) { var rowChildren = $(row).children(); var maxHeight = 100; for (var x = 0; x < rowChildren.length; x++) { if ($(rowChildren.get(x)).outerHeight() > maxHeight) { maxHeight = $(rowChildren.get(x)).outerHeight(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get minHeight() {}", "function getRowRegionsMaxHeight(row) {\n var rowChildren = $(row).children();\n var maxHeight = 100;\n for (var x = 0; x < rowChildren.length; x++) {\n if ($(rowChildren.get(x)).outerHeight() > maxHeight) {\n ...
[ "0.7309251", "0.720936", "0.7061328", "0.6928029", "0.68662304", "0.6832829", "0.67522633", "0.6693658", "0.66890943", "0.6603465", "0.65717226", "0.6451369", "0.63987803", "0.6397883", "0.6378977", "0.63679737", "0.6314717", "0.62977296", "0.62957376", "0.6290153", "0.626327...
0.722758
1
Restores the paddingbottom value to the original for all regions in given row
function resetRowsRegionsHeight(row) { // when called by each, first argument is a number instead of a row value var row = (typeof row === 'number') ? $(this) : row; var rowChildren = $(row).children(); for (var x = 0; x < rowChildren.length; x++) { // re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetRowsRegionsHeight(row) {\n // when called by each, first argument is a number instead of a row value\n var row = (typeof row === 'number') ? $(this) : row;\n\n var rowChildren = $(row).children();\n for (var x = 0; x < rowChildren.length; x+...
[ "0.74660003", "0.6997538", "0.6979533", "0.66051126", "0.6583506", "0.620614", "0.6187582", "0.6145343", "0.59674925", "0.5963164", "0.59057003", "0.5684015", "0.56322247", "0.55764294", "0.5542175", "0.5515858", "0.54533577", "0.5434285", "0.54274756", "0.54113954", "0.53829...
0.7457637
1
Sets the paddingbottom value, so that the total height is the given value for all regions in given row
function setRowsRegionsHeight(row, maxHeight) { var rowChildren = $(row).children(); for (var x = 0; x < rowChildren.length; x++) { if ($(rowChildren.get(x)).outerHeight() != maxHeight) { var defaultPadding = parseInt($(rowChildren.get(x)).css("padding-bottom"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRowsRegionsHeight(row, maxHeight) {\n var rowChildren = $(row).children();\n for (var x = 0; x < rowChildren.length; x++) {\n if ($(rowChildren.get(x)).outerHeight() != maxHeight) {\n var defaultPadding = parseInt($(rowChildren.get...
[ "0.68334526", "0.6578797", "0.6561409", "0.630481", "0.6295874", "0.5793617", "0.56938", "0.5602352", "0.5601591", "0.55623657", "0.55230147", "0.55177695", "0.54822874", "0.54765254", "0.5461051", "0.5428732", "0.5417098", "0.5392952", "0.53739333", "0.5355399", "0.5340248",...
0.6856896
0
Takes care of the UI part of the widget rendering. Depends heavily on the HTML structure
function initWidgetUI() { $(".widget-wrapper").each(function () { var widgetId = extractObjectIdFromElementId($(this).attr("id")); styleWidgetButtons(widgetId); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initHtml () {\n\t\t\t$container.addClass(\"ibm-widget-processed\");\n\n\t\t\tif (config.type === \"simple\") {\n\t\t\t\t$hideables.addClass(\"ibm-hide\");\n\t\t\t}\n\n\t\t\tif (config.type === \"panel\") {\n\t\t\t\t$headings.removeClass(\"ibm-active\");\n\t\t\t\t$containers.slideUp(slideupSpeed);\n\t\t\t}...
[ "0.70765686", "0.6610348", "0.656258", "0.6483031", "0.6406047", "0.63583994", "0.62854594", "0.62382495", "0.6182108", "0.61615986", "0.61559427", "0.6122311", "0.61053365", "0.6097434", "0.6077922", "0.6069247", "0.6061592", "0.603879", "0.60316366", "0.6028217", "0.6028217...
0.6849971
1
Utility function to generate the html label for a userPref based on if it is required or not
function generatePrefLabelMarkup(userPref) { var markup = []; var prefLabel = (userPref.required) ? "* " + userPref.displayName : userPref.displayName; markup.push("<td class='"); markup.push(WIDGET_PREFS_LABEL_CLASS); if (userPref.required) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generatePrefInputClassMarkup(userPref) {\n var markup = [];\n markup.push(WIDGET_PREFS_INPUT_CLASS);\n if (userPref.required) {\n markup.push(\" \");\n markup.push(WIDGET_PREFS_INPUT_REQUIRED_CLASS);\n }\n return markup.j...
[ "0.6330865", "0.61747205", "0.61295223", "0.580869", "0.5763793", "0.5747451", "0.57332486", "0.5725752", "0.5665497", "0.5649104", "0.558894", "0.5561425", "0.5547449", "0.5540915", "0.5517936", "0.54994637", "0.54948455", "0.5455702", "0.5447712", "0.54466766", "0.5428423",...
0.8082545
0
Utility function to generate the css class(es) of a userPref input field based on if it is required or not
function generatePrefInputClassMarkup(userPref) { var markup = []; markup.push(WIDGET_PREFS_INPUT_CLASS); if (userPref.required) { markup.push(" "); markup.push(WIDGET_PREFS_INPUT_REQUIRED_CLASS); } return markup.join(""); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inputClass () {\n let klass = ''\n\n if (this.state.focus) {\n klass += ' usa-input-focus'\n }\n\n if (this.state.valid) {\n klass += ' usa-input-success'\n }\n\n if (this.state.checked) {\n klass += ' selected'\n }\n\n return klass.trim()\n }", "labelClass () {\n let k...
[ "0.684388", "0.6082944", "0.6043315", "0.6038432", "0.58463854", "0.5785473", "0.5770614", "0.57303566", "0.57255924", "0.57164735", "0.5619832", "0.557445", "0.5556102", "0.55518055", "0.5519978", "0.5514215", "0.5513528", "0.5507767", "0.5443522", "0.5426768", "0.5426207", ...
0.7445592
0
Utility function to validate a userPref input element
function validatePrefInput(element) { var isValid = true; var jqEl = $(element); // if the input is required verify it's trimmed input length is > 0 if (jqEl.hasClass(WIDGET_PREFS_INPUT_REQUIRED_CLASS)) { isValid = $.trim(jqEl.val()).length > 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkElement(element)\r\n{\r\n var isRequired = element.getAttribute(\"isRequired\");\r\n var inputValue = element.value;\r\n if (inputValue == \"无权限查看\")\r\n return true;\r\n\r\n var validChar = GetValidChar(element.getAttribute(\"validEnum\"));\r\n\r\n //过滤特殊字符\r\n if (inputValu...
[ "0.625641", "0.62227505", "0.6090967", "0.5930259", "0.58690655", "0.5840207", "0.5833624", "0.5761783", "0.5758281", "0.5725038", "0.5719227", "0.570561", "0.5668139", "0.56507987", "0.5622217", "0.56155854", "0.5614728", "0.56125677", "0.5596227", "0.5595975", "0.55951035",...
0.7807044
0
Toggles the display of the widget collapse/restore icon.
function toggleCollapseWidgetIcon(widgetId, collapsed) { var $toggleIcon = $("#widget-" + widgetId + "-collapse"); if (collapsed) { $toggleIcon.html(WIDGET_TOGGLE_DISPLAY_COLLAPSED_HTML); } else { $toggleIcon.html(WIDGET_TOGGLE_DISPLAY_NORMAL_HTML); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideShowExpandToggle() {\n if (minWidth) {\n setExpandedWidth(\"60%\");\n } else {\n setExpandedWidth(\"80%\");\n }\n\n if (isExpanded) {\n setExpanded(false);\n } else {\n setExpanded(true);\n }\n }", "toggle() {\n...
[ "0.70135665", "0.69897556", "0.69897556", "0.686293", "0.68112946", "0.6808528", "0.67870665", "0.6741469", "0.6725679", "0.6628447", "0.66143376", "0.65889484", "0.65522915", "0.65255564", "0.65252", "0.6519703", "0.6473483", "0.64279777", "0.6405912", "0.63805467", "0.63708...
0.731999
0
Displays the "empty page" message on the page
function displayEmptyPageMessage() { $("#emptyPageMessageWrapper").removeClass("hidden"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayEmpty() {\n var emptyCase = `\n <div class = \"alert alert-warning\" role = \"alert\">\n <h5>No new articles available.</h5>\n </div>`;\n articleContainer.append(emptyCase);\n }", "function EmptyPage() {\n return <div>Empty page</div>;\n}", ...
[ "0.6837556", "0.6818285", "0.681492", "0.6773253", "0.67297196", "0.6642752", "0.6617391", "0.6607315", "0.6561375", "0.65374064", "0.6446165", "0.6436086", "0.6409814", "0.63900256", "0.634226", "0.6312254", "0.62965447", "0.6273451", "0.6268011", "0.623355", "0.62277764", ...
0.7388173
0
Determines if a page is empty (has zero widgets)
function isPageEmpty() { return $.isEmptyObject(widgetByIdMap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPaginationEmpty(block) {\n\t return block === void 0 || block === null || block.length <= block.perPage;\n\t}", "get empty() {\n if(this.children.length === 0) {\n return true\n } else {\n return false\n }\n }", "isEmpty() {\n\t\treturn this.size === ...
[ "0.67035246", "0.6671512", "0.64998066", "0.64573294", "0.6448146", "0.64434016", "0.6433765", "0.6409741", "0.64053875", "0.6402961", "0.6402961", "0.6370084", "0.6370084", "0.6370084", "0.6370084", "0.6370084", "0.63637847", "0.6327837", "0.63211155", "0.6304488", "0.629139...
0.87860894
0
Removes a regionWidgetId from the internal widget map
function removeWidgetFromMap(regionWidgetId) { delete widgetByIdMap[regionWidgetId]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove_widget(widget_id) {\n delete this.data[widget_id];\n }", "function removeWidget(widget) {\r\n storage.get(\"tiles\", function(storage_data) {\r\n var widgets = storage_data.tiles;\r\n\r\n delete widgets[widget];\r\n\r\n storage.set({\"tiles\": widgets})\r\n });\r\n}", "function deleteWidg...
[ "0.7151344", "0.6785963", "0.6577708", "0.6394485", "0.6382265", "0.6328557", "0.62226796", "0.6040211", "0.5929866", "0.5923567", "0.5807613", "0.5766515", "0.5722185", "0.57135826", "0.5709486", "0.56413305", "0.5630386", "0.5606092", "0.5505306", "0.5474496", "0.5463774", ...
0.8964363
0
EURO TO DOLLAR CONVERT FUNCTION
function euroTodollar() { var euro2dollar = 1.10; var bedrag = document.querySelector("#bedrag").value; document.getElementById("convert").value = (bedrag * euro2dollar).toFixed(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dollarToeuro() {\n var dollar2euro = 0.91;\n var bedrag = document.querySelector(\"#bedrag\").value;\n\n document.getElementById(\"convert\").value = (bedrag * dollar2euro).toFixed(2);\n\n }", "function pond2euro() {\n var pond2euro = 1.17;\n var bedrag = document.querySelector(\"#bedrag...
[ "0.7358444", "0.67566913", "0.672828", "0.6651549", "0.6607016", "0.63641584", "0.63308567", "0.62846744", "0.6241035", "0.6185155", "0.6164351", "0.61156285", "0.6078811", "0.6071066", "0.6067765", "0.6011564", "0.6007596", "0.59942394", "0.59901863", "0.59857875", "0.598211...
0.68504477
1
Dollar To Euro CONVERT FUNCTION
function dollarToeuro() { var dollar2euro = 0.91; var bedrag = document.querySelector("#bedrag").value; document.getElementById("convert").value = (bedrag * dollar2euro).toFixed(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function euroTodollar() {\n var euro2dollar = 1.10;\n var bedrag = document.querySelector(\"#bedrag\").value;\n\n document.getElementById(\"convert\").value = (bedrag * euro2dollar).toFixed(2);\n\n }", "function toCurrency(){\n\n}", "function convertToCurrency(num) {\n return \"AUD \" + num.toFixed(2...
[ "0.7718889", "0.75523186", "0.7517815", "0.75133", "0.7273224", "0.7204205", "0.70954895", "0.7047062", "0.69806165", "0.69283384", "0.69272465", "0.69200283", "0.6892008", "0.68343306", "0.68201447", "0.681075", "0.6803525", "0.67761314", "0.6742312", "0.6741504", "0.6740030...
0.8191923
0
Euro To Pond CONVERT FUNCTION
function euroTopond() { var euro2pond = 0.85; var bedrag = document.querySelector("#bedrag").value; document.getElementById("convert").value = (bedrag * euro2pond).toFixed(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pond2euro() {\n var pond2euro = 1.17;\n var bedrag = document.querySelector(\"#bedrag\").value;\n\n document.getElementById(\"convert\").value = (bedrag * pond2euro).toFixed(2);\n\n }", "function dollarToeuro() {\n var dollar2euro = 0.91;\n var bedrag = document.querySelector(\"#bedrag\"...
[ "0.7509184", "0.70787", "0.69346756", "0.66679895", "0.66138965", "0.6537474", "0.64933497", "0.63803834", "0.63189256", "0.6294522", "0.62887555", "0.6285561", "0.62005484", "0.6194006", "0.61798245", "0.6174534", "0.6166513", "0.6156343", "0.61549664", "0.6137713", "0.61114...
0.7094993
1
Pond To Euro CONVERT FUNCTION
function pond2euro() { var pond2euro = 1.17; var bedrag = document.querySelector("#bedrag").value; document.getElementById("convert").value = (bedrag * pond2euro).toFixed(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function euroTopond() {\n var euro2pond = 0.85;\n var bedrag = document.querySelector(\"#bedrag\").value;\n\n document.getElementById(\"convert\").value = (bedrag * euro2pond).toFixed(2);\n\n }", "function dollarToeuro() {\n var dollar2euro = 0.91;\n var bedrag = document.querySelector(\"#bedrag\...
[ "0.7081263", "0.70436895", "0.6820045", "0.65416956", "0.65415627", "0.6422886", "0.6411635", "0.62857646", "0.628178", "0.6262123", "0.621799", "0.61933947", "0.6176558", "0.6171094", "0.61676157", "0.6163205", "0.6142973", "0.61243206", "0.6101886", "0.609606", "0.60783726"...
0.74830157
0
randomly change the light
function changeLight() { if (OrangeCounter > 0) { LIGHT = "Orange"; OrangeCounter -= 1; } else if (random() < ChangeProb) { newLIGHT = ((LIGHT == "Red") ? "Green" : "Red"); OrangeCounter = OrangeTime; } else if (OrangeCounter <= 0) { OrangeCounter = 0; LIG...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fakeLight(){\n pntLight = false;\n}", "function randomStopLight() {\n var randomNumber = Math.floor(Math.random() * 10);\n if (randomNumber < 3) {\n return \"Red\";\n } else if(randomNumber >= 3 && randomNumber <= 6) {\n return \"Yellow\";\n } else {\n return \"Green\...
[ "0.73495024", "0.7308613", "0.7187673", "0.6919768", "0.6912044", "0.6880123", "0.6871698", "0.6805461", "0.6795812", "0.671041", "0.6692147", "0.6655923", "0.6650478", "0.66353744", "0.6598286", "0.6590681", "0.6583609", "0.6563177", "0.6562443", "0.65593904", "0.6536377", ...
0.7821203
0
This function is in charge of loading up all the cupcakes we have in the db so we can display them on the page. The function calls the getCupcakes() method of Class CupcakeList and stores the instance in our cupcakes global variable like mentioned above. The function also calls the createHTML function that will generat...
async function loadCupcakes() { let response = await CupcakeList.getCupcakes(); cupcakes = response; console.log(cupcakes) $cupcakeList.empty(); for (let cc of cupcakes.cupcakes) { console.log(cc) const html = createHTML(cc); $cupcake...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateAndAppendCupcakeHtml(cupcake) {\n let html = `\n <li>\n Flavor:${cupcake.flavor}, \n Rating: ${cupcake.rating}, \n Size: ${cupcake.size}\n </li>\n <img src=${cupcake.image}><img>\n `;\n $updateCupcakeList.append(html);\n}", "async ...
[ "0.70023316", "0.68733466", "0.6830285", "0.6762316", "0.6643639", "0.65214336", "0.65027267", "0.6493298", "0.6473084", "0.64505863", "0.63219684", "0.6290712", "0.58831215", "0.57692075", "0.5597494", "0.5576444", "0.5563202", "0.55607176", "0.5525044", "0.5514034", "0.5389...
0.8008406
0
this is a function we use for creating a cupcake. This createCupcake function calls the createCupcake method of the CupcakeList class and passes in the values from our form. We then call the loadCupcakes function again to load the page with the newly created cupcake
async function createCupcake() { let flavor = $flavor.val(); let size = $size.val(); let rating = $rating.val(); let image = $ccImage.val(); let newCupcake = {flavor,size,rating,image} await CupcakeList.createCupcake(newCupcake) await loadCupcakes(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function makeCupcake() {\n\t// Get values\n\tconst flavor = $('#flavor').val();\n\tconst size = $('#size').val();\n\tconst rating = $('#rating').val();\n\tconst image = $('#image').val() ? $('#image').val() : null;\n\t// API POST Request\n\tif (image !== null) {\n\t\tconst response = await axios.post(BASE_UR...
[ "0.7346524", "0.685683", "0.6635601", "0.632516", "0.62356895", "0.62309295", "0.58870226", "0.58545685", "0.5793856", "0.57675123", "0.5728257", "0.5715081", "0.56606233", "0.5653223", "0.5548992", "0.54937255", "0.5357425", "0.53390926", "0.5289341", "0.52825797", "0.523701...
0.7673387
0
This function does what its name implies, deletes a given cupcake It calls the deleteCupcake method of class CupcakeList and stores the updated CupcakeList object into the global cupcakes variable so we have an updated frontend object list to work with without making another get request.
async function deleteCupcake() { let $id = $(this).data('id'); let response = await CupcakeList.deleteCupcake($id,cupcakes); cupcakes = response; console.log(cupcakes) $(this).parent().parent().parent().remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadCupcakes() {\r\n let response = await CupcakeList.getCupcakes();\r\n cupcakes = response;\r\n console.log(cupcakes)\r\n $cupcakeList.empty();\r\n\r\n for (let cc of cupcakes.cupcakes) {\r\n console.log(cc)\r\n const html = createHTML(cc);\...
[ "0.64524615", "0.58138084", "0.5637916", "0.5599224", "0.54098934", "0.53802365", "0.5373107", "0.53454834", "0.53035015", "0.5276876", "0.5218314", "0.51598454", "0.5117401", "0.50604266", "0.5028493", "0.5021291", "0.5000801", "0.49943683", "0.49820977", "0.49787343", "0.49...
0.8137888
0
Extension of EventEmitter that represents an offset in a Place heirarchy. Stores references to all child nodes in the heirarchy.
function OffsetEventEmitter() { EventEmitter.call(this); this._children = {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PlaceEventEmitter() {\n this._root = new OffsetEventEmitter();\n}", "function offsetTree(t, offset, offsetFunction) {\n for (var i = 0; i < t.length; i++) {\n var offsetpaths = offsetFunction(t[i], offset);\n if (offsetpaths.length == 1) {\n // replace array items in place\n...
[ "0.6935553", "0.51984113", "0.5137182", "0.50804555", "0.5039342", "0.49131727", "0.47989413", "0.4793834", "0.4783685", "0.47726554", "0.47673708", "0.46785817", "0.46739691", "0.46738926", "0.46738812", "0.46596697", "0.4644038", "0.46140343", "0.4613553", "0.4611032", "0.4...
0.69467854
0
Wrapper around OffsetEventEmitter to allow for listening and firing on instances of Place. Not an extension of EventEmitter, so not all of the original methods are necessarily supported.
function PlaceEventEmitter() { this._root = new OffsetEventEmitter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OffsetEventEmitter() {\n EventEmitter.call(this);\n this._children = {};\n}", "function EventEmitter(){}// Shortcuts to improve speed and size", "function EventEmitter() {} // Shortcuts to improve speed and size", "function LokiEventEmitter() {}", "function LokiEventEmitter() {}", "function Lo...
[ "0.7669674", "0.6133002", "0.60935825", "0.6057339", "0.6057339", "0.5927509", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "0.59125257", "...
0.8410292
0
Insert User in Google Analytics Accounts
function insertUser() { var profiledata; var email = document.getElementById('email'); //Email Input Field var id = document.getElementById('account-id'); //Account ID input Field if( email.value == '' || id.value == '' ){ alert('Please fill out the field!!'); return; } else { var request = gap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addUser() {\n var user = {\n primaryEmail: 'liz@example.com',\n name: {\n givenName: 'Elizabeth',\n familyName: 'Smith'\n },\n // Generate a random password string.\n password: Math.random().toString(36)\n };\n user = AdminDirectory.Users.insert(user);\n Logger.log('User %s cr...
[ "0.6451452", "0.6419818", "0.6313721", "0.6161532", "0.61206234", "0.6060208", "0.6040147", "0.6021", "0.5988509", "0.59821326", "0.5913855", "0.5874089", "0.5868384", "0.5868384", "0.5868341", "0.5867974", "0.5854902", "0.58396184", "0.5795388", "0.57788146", "0.5764151", ...
0.6815875
0
Init line chart button listeners
initLineChartButtons() { // add the Line chart buttons to the feature panel for (let i = 0; i < this.swarm_features.length; i++) { let capitalized_feature_string = this.swarm_features[i].split('_').join(' '); capitalized_feature_string = capitalized_feature_string.charAt(0).toUpperCa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SVGLineChart() {\r\n }", "_addEventsXAxis(btnDecrease, btnIncrease){\n $(btnDecrease).click(() => { this.zoomXAxis(false); });\n $(btnIncrease).click(() => { this.zoomXAxis(true); });\n }", "function initLine() {\n console.log(\"Initializing line chart...\");\n\n // Get current pdf dat...
[ "0.6141154", "0.60903716", "0.6055163", "0.5978363", "0.5973254", "0.5958651", "0.5955628", "0.5910048", "0.5902986", "0.58939797", "0.5872552", "0.5857542", "0.58491594", "0.5827673", "0.5817656", "0.581118", "0.5796051", "0.5764969", "0.5758807", "0.57560277", "0.5739931", ...
0.67187685
0
/ ObjectObserver provides concrete observer independent source and target synchronization / functionality for a particular object source with related user interface / interactive capabilities. / ObjectObserver extends from ActivityObserver and for information about activity / functions refer here.
function ObjectObserver(options) { var instance = (options.instance !== null && options.instance !== undefined) ? options.instance : this; var extender = new InstanceExtender(); instance = extender.extendFieldObserver({ 'instance': instance, 'field': 'InputObject', 'observer': options.observer }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Observer() {}", "function Observer() {\n this.update = function () {\n // /* ... */\n };\n}", "function Observer(){\n this.update = function(){\n // ...\n };\n}", "function ObserverSet(hostObject) {\n\t\tvar _observers = {};\n\t\t/** .add registers a *property name*, to notify an *...
[ "0.6643939", "0.6363023", "0.635718", "0.62948453", "0.6239872", "0.62268287", "0.61886686", "0.6037796", "0.6037796", "0.6008519", "0.5995865", "0.5980973", "0.5956034", "0.5950164", "0.58681566", "0.5849587", "0.5827112", "0.58248043", "0.5750588", "0.56799453", "0.56287414...
0.73092365
0
Sets node data when the component mounts.
componentDidMount() { this.setNodeData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assignData(node, data) {\n node.__data__ = data;\n}", "setNodeData() {\n const curNode = this.props.node;\n this.setState({\n ref: curNode.getRef(),\n fetching: true,\n asserts: [],\n invAsserts: [],\n elemClass: '',\n });\n\n API.getElemClass(curNode).then((elemC...
[ "0.6853854", "0.6525394", "0.6380003", "0.58837354", "0.5823948", "0.58108044", "0.5785606", "0.5751807", "0.5751807", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0.57361555", "0....
0.7599304
0
Use Yarn if available, it's much faster than the npm client. Return the version of yarn installed on the system, null if yarn is not available.
function getYarnVersionIfAvailable() { let yarnVersion; try { // execSync returns a Buffer -> convert to string yarnVersion = ( execSync('yarn --version', { stdio: [0, 'pipe', 'ignore'], }).toString() || '' ).trim(); } catch (error) { return null; } return yarnVersion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUpdateCommand() {\n if (YARN_INSTALL_METHOD === 'tar') {\n return 'curl -o- -L https://yarnpkg.com/install.sh | bash';\n }\n\n if (YARN_INSTALL_METHOD === 'homebrew') {\n return 'brew upgrade yarn';\n }\n\n if (YARN_INSTALL_METHOD === 'deb') {\n return 'sudo apt-get update && sudo apt-get...
[ "0.6483819", "0.626947", "0.5778673", "0.5402558", "0.53739995", "0.53731817", "0.5348117", "0.5348117", "0.5253786", "0.51260597", "0.5035994", "0.49301445", "0.48574874", "0.48516303", "0.48436052", "0.48392144", "0.48259783", "0.47912624", "0.4769956", "0.47394714", "0.462...
0.86356133
0
When a movie is clicked, this function is invoked and updates the state of the `selectedMovie` property to that movie
onMovieClick(movie) { this.setState({ selectedMovie: movie, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setSelectedMovie(movie) {\n this.setState({\n selectedMovie: movie\n });\n }", "selectedMovie(movie) {\n // Display selected movie\n this.displaySingleMovie(movie)\n }", "selectMovie(id) {\n this.movieById(movie => {\n this.selectedMovie(movie)\n }, id)\n ...
[ "0.7750631", "0.7736081", "0.7163471", "0.67256916", "0.6488958", "0.64247245", "0.6397385", "0.63854253", "0.6332612", "0.6308762", "0.63058543", "0.6278801", "0.6277684", "0.62595034", "0.6229581", "0.62176365", "0.6200571", "0.6186401", "0.6181037", "0.61073023", "0.609806...
0.8339763
0
Adds a table of size "size" at "xCord","yCord" with id "id" then redraws the map
function addTable (xCord, yCord, size, id) { for (i = 0; i < size; i++) { for (j = 0; j < size; j++) { if (yCord + i < dimension && xCord + j < dimension) { currentMap[yCord + i][xCord + j] = id } } } draw(currentMap) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapResize(newSize){\r\n\r\n // Get current position\r\n var map_x = unsafeWindow.mapX;\r\n var map_y = unsafeWindow.mapY;\r\n var map_s = unsafeWindow.mapSize;\r\n\r\n // Calculate new X and Y\r\n var delta = parseInt((map_s - newSize) / 2);\r\n\r\n // Overwrite values\r\n ...
[ "0.65854883", "0.63076633", "0.6164537", "0.615061", "0.60348946", "0.6024019", "0.5992851", "0.5977376", "0.5976345", "0.5932729", "0.5929121", "0.58895046", "0.5881419", "0.5801246", "0.57981557", "0.5783472", "0.5775159", "0.577508", "0.577232", "0.57554066", "0.5744306", ...
0.8765483
0
get popular films from API DB
async fetchPopularFilms() { let popularFilms = 'trending/movie/week?'; try { const response = await axios.get( BASE_URL + popularFilms + API_KEY + '&language=en-US&page=' + `&page=${this.localService.getPaginationPage()}`, ); this.localService.se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function getPopularMovies(){\n var url = \"https://api.themoviedb.org/3/movie/popular?api_key=\" + api_key + \"&language=fr\"...
[ "0.7264159", "0.6814281", "0.67827076", "0.651927", "0.63706785", "0.6318846", "0.6297376", "0.62494904", "0.6239027", "0.61255807", "0.6123391", "0.6102843", "0.60699", "0.60353565", "0.6029459", "0.60192186", "0.5958336", "0.595364", "0.5898756", "0.5896913", "0.5889747", ...
0.77615607
0
================fetch trailer by ID==============
async fetchTrailerById() { try { const response = await axios.get( `${BASE_URL}movie/${this.movieId}/videos?${API_KEY}&language=en-US`, ); return response.data.results; } catch (error) { return error; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTrailer(mID, cb) {\n return $.ajax({\n type: 'GET',\n url: '/api/trailer',\n data: {\n id: mID\n },\n dataType: 'json',\n success: function(data) {\n cb(data.result);\n },\n error: function(err) {\n cb(null);\n currentTrailer = null;\n console.log(err.r...
[ "0.71374357", "0.66372436", "0.65327764", "0.618922", "0.6118345", "0.6107566", "0.6033754", "0.602162", "0.6006127", "0.5993829", "0.5944225", "0.59165883", "0.59071666", "0.5898653", "0.5877318", "0.5862976", "0.5845037", "0.5840162", "0.5780638", "0.57175267", "0.5688476",...
0.7265544
0
TeamDetailController Team Detail controller use detail.html view
function TeamDetailController($scope, $timeout, $stateParams, RestFul) { if (!$stateParams.ud) { return; } $scope.teamDetailLoading = true; RestFul.error( {"action": "Account:TeamDetail", "params": {"team": $stateParams.ud}}, function(response) { if (!response) { return; }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTeamDetails(context) {\n context.loggedIn = sessionStorage.getItem('authtoken') !== null;\n context.username = sessionStorage.getItem('username');\n context.teamId = context.params._id.substring(1);\n context.isOnTeam = sessionStorage.getItem('teamId') !== \"undefined\"\n ...
[ "0.6645024", "0.6386735", "0.6361377", "0.594887", "0.5912718", "0.58985436", "0.5890389", "0.57476956", "0.5669936", "0.56580126", "0.56304306", "0.5623452", "0.5599954", "0.5529331", "0.5481744", "0.54762566", "0.5456242", "0.5450122", "0.5447499", "0.5447481", "0.54187036"...
0.66104364
1
As a user I want to participate into a colormez by clicking on participate button I can go to colorme view
participate(useruid, colormezid) { this.$state.go('colorme', { useruid: useruid, colormezid: colormezid }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joined(e) {\n userId = e.id;\n $('#controls').show();\n startPrompts();\n}", "getResult(userId, colormezId) {\n this.$state.go('outro');\n }", "function reply() {\r\n var fromWhere = JSON.parse(localStorage.getItem(\"emailToView\")).fromWhere;\r\n if (fromWhere == FROM_ADMIN_INBOX) ...
[ "0.6197418", "0.6117911", "0.5996526", "0.590721", "0.58773685", "0.5848359", "0.5722655", "0.56414956", "0.56211436", "0.5587096", "0.5571765", "0.5542437", "0.5498132", "0.5498008", "0.54924893", "0.5484999", "0.54826796", "0.5481697", "0.54814404", "0.547902", "0.54433036"...
0.75869477
0
Functions: Loads list of available website crawlers.
function loadCrawlers(e) { var datalist = document.getElementById('website-crawlers'); var country = $('input[name=country]:checked').val(); var crawlers = { uk: [ 'Yell.com' ], us: [ 'Citysearch.com', 'Yellowpag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeslideSupportedSites() {\n return { \n 'about.com': '*.about.com', 'accessatlanta.com': '*.accessatlanta.com', 'answers.com': '*.answers.com', 'aol.com': '*.aol.com', 'askmen.com': '*.askmen.com', 'bleacherreport.com': '*.bleacherreport.com', 'cafemom.com': '*.cafemom.com', 'cbslocal.com': '...
[ "0.59339124", "0.59148914", "0.5872807", "0.58536553", "0.5815739", "0.566842", "0.56557167", "0.5648528", "0.56320465", "0.5626788", "0.56198066", "0.56151825", "0.5570971", "0.55442506", "0.54660624", "0.54622036", "0.545772", "0.5441777", "0.5440059", "0.54212856", "0.5410...
0.7160564
0
Wraps the global timer methods to collect their return values, which can be later cleared in clearImaApp function
function _installTimerWrappers() { global.setInterval = (...args) => { let timer = setIntervalNative(...args); timers.push({ timer, clear: () => global.clearInterval(timer) }); return timer; }; global.setTimeout = (...args) => { let timer = setTimeoutNative(...args); timers....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timerWrapper () {}", "function Timer() {}", "clearAllTimers() {\n for (let status of ROUND_TIMED_STATUSES) {\n this.clearFlag(status);\n }\n }", "function xTimerMgr()\r\n{\r\n this.tmr = null;\r\n this.timers = new Array();\r\n}", "function checkTimers(){\n createTimerCallback(ama...
[ "0.7024895", "0.6216643", "0.6178682", "0.6061379", "0.6042539", "0.60242134", "0.6019928", "0.59608024", "0.59482926", "0.593258", "0.59140414", "0.5906312", "0.5891599", "0.58909", "0.588722", "0.58843887", "0.5851347", "0.5840052", "0.5838455", "0.57992816", "0.57936734", ...
0.681154
1
custom destroyAll watcher TODO: check this has been merged then use native destroyAll method see:
destroyAllWatchers(){ let watchers = scrollMonitor.watchers, eventTypes = scrollMonitor.eventTypes; for (var w = 0, x = watchers.length; w < x; w++) { for (var i = 0, j = eventTypes.length; i < j; i++) { watchers[w].callbacks[eventTypes[i]].len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "beforeDestroy () {\n unwatchAll(this);\n }", "removeAll() {\n this.listeners.forEach(listener => listener.destroy());\n this.listeners = [];\n }", "removeAllEvents() {\n this.destroy();\n }", "destroyAll(...data) {\n return Promise.resolve().then(() => {\n const _de...
[ "0.76400393", "0.6712945", "0.6694455", "0.6648352", "0.66223437", "0.6534911", "0.65277785", "0.65277785", "0.6472088", "0.64587104", "0.64398474", "0.64390737", "0.64331716", "0.64135945", "0.6378474", "0.6375794", "0.63658154", "0.6304516", "0.628469", "0.62536114", "0.625...
0.69550574
1
Set the active event to 0 to not have any event marked as active This function also gets called from the child component
unClickEvent() { this.setState({activeEvent: 0}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "activate() {\n this.active = true;\n }", "clearActive() {\n this.handleMenuItemChange(\"active\");\n }", "function handleActive(e) {\r\n //REMOVE ACTIVE CLASS\r\n e.target.parentElement.querySelectorAll(\".active\").forEach((el) => {\r\n el.classList.remove(\"active\");\r\n });\...
[ "0.65781116", "0.6545466", "0.6515821", "0.6304341", "0.627972", "0.6235652", "0.62111646", "0.6155374", "0.6117066", "0.61030644", "0.6091726", "0.60815614", "0.6068617", "0.60581005", "0.6040956", "0.60160506", "0.60120153", "0.5998196", "0.5996773", "0.5992884", "0.5961184...
0.717747
0
Initialize stores for the db
initializeStores() { this.stores.forEach((store) => { let [ver, storeDef] = store; console.log('Registering version %s of stores:\n%s', ver, Object.keys(storeDef).join(', ')); this.db.version(ver).stores(storeDef); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup_stores()\n{\n\t// Init Files \n\tmodels['Files'] = new IDBStore({\n\t storeName: 'Files',\n\t keyPath: 'id',\n\t dbVersion: site.config.indexeddb.Files.version,\n\t storePrefix: '',\n\t autoIncrement: true,\n\t\tindexes: site.config.indexeddb.Files.indexes,\t \n\t onStoreReady: get_files_data...
[ "0.7627842", "0.74474126", "0.7218285", "0.7168389", "0.7030366", "0.6853619", "0.6839941", "0.6811335", "0.67141503", "0.668069", "0.66200006", "0.6615841", "0.65716076", "0.64706916", "0.64464134", "0.64430267", "0.6414425", "0.63931113", "0.6374085", "0.63714373", "0.63645...
0.82220805
0
videoListUp controls theatre mode effect and animations
function videoListUp(){ $('.listUpWrap').hide(); $('.listDropWrap').slideDown(); $('.videoRowWrapper').velocity({ 'height': '60%' }, 600); $('#listContentWrap').velocity({ 'height': '40%' }, 600); $('.videoListRowWrapper').fadeIn(500, ()=>{ $('#text-carousel').slideDo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function overVideoControl() {\n videoCtrlTl.reverse();\n }", "function WeBack(theMode) {\n Mode = theMode;\n ModeCheck(Mode);\n\n areAnimated = [false, false, false, false];\n document.getElementById(\"nextVid\").style.display = \"none\";\n Learn_video.currentTime = 0;\n Learn_video.src = a...
[ "0.63554186", "0.6338707", "0.6247146", "0.6129791", "0.60924506", "0.60314065", "0.5993365", "0.59597695", "0.593787", "0.59194374", "0.5875801", "0.5864315", "0.58640885", "0.5816547", "0.578954", "0.57855105", "0.57586527", "0.5750631", "0.57198644", "0.57128775", "0.56889...
0.7239287
0
fastForwardVideo moves video forward in time 15s
function fastForwardVideo() { var fastForward = player.getCurrentTime(); var add15Seconds = fastForward + 15; player.seekTo(add15Seconds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fastForward() {\n target = this.classList[1] - 1;\n\n shownMedia[target].currentTime += 5;\n\n // If fast forward exceeds video length, goes back to beginning of video and pauses\n if(shownMedia[target].currentTime >= shownMedia[target].duration) {\n shownMedia[targe...
[ "0.77340055", "0.7658001", "0.6955349", "0.69523954", "0.68846303", "0.6644918", "0.66411155", "0.661723", "0.65360624", "0.6456723", "0.6333538", "0.6300024", "0.6300024", "0.62600034", "0.622176", "0.6207095", "0.6189372", "0.618286", "0.6170801", "0.60887", "0.6076027", ...
0.858113
0
playTYVideo pause and play functionality with tooltip and icon changes
function playYtVideo() { player.playVideo(); if (this.classList.value === playFaClass) { $('.playButton').tooltip('hide') $('.playButton').removeClass(playFaClass).toggleClass(pauseFaClass); $(this).attr('data-original-title','Pause') } else { $('....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function action_toggle_play() {\n if (video.paused) {\n video.play();\n change_icon('play'); \n } else {\n video.pause();\n change_icon('pause'); \n }\n delay = delay_value;\n}", "function playVideo() {\r\n video.play();\r\n play.innerHTML = '<i class=\"fas fa-pause fa-2x\"></i>';\r\n}", ...
[ "0.75403845", "0.72437173", "0.7180169", "0.7180067", "0.710993", "0.7079209", "0.70605505", "0.69493806", "0.69403315", "0.68844175", "0.68768364", "0.6874432", "0.6864135", "0.6862987", "0.6852703", "0.6849988", "0.679399", "0.6791494", "0.6780978", "0.6716388", "0.6700786"...
0.81265557
0
rewindVideo moves video back in time 15s
function rewindVideo() { var fastForward = player.getCurrentTime(); var minus15Seconds = fastForward - 15; player.seekTo(minus15Seconds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rewindVideo(increment) {\n player.currentTime -= increment;\n}", "function fastForwardVideo() {\n var fastForward = player.getCurrentTime();\n var add15Seconds = fastForward + 15;\n player.seekTo(add15Seconds);\n }", "function restoreTime () {\n const restoreT...
[ "0.7942025", "0.7152836", "0.7088374", "0.69246083", "0.67662406", "0.6706276", "0.66731083", "0.6651095", "0.6614244", "0.65366465", "0.6421747", "0.64172256", "0.6397", "0.6352967", "0.63216233", "0.62962365", "0.62938714", "0.62787235", "0.6264922", "0.6215699", "0.6154194...
0.858974
0
carouselLeftArrow carousel controls on bottom
function carouselLeftArrow(){ $(".carousel").carousel('prev'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideLeft() {\n var parent = $(this).closest('.carousel');\n var items = $.makeArray(parent.find('.item:not(.hidden)'));\n if (items.length == 1) {\n //already at the end\n return;\n }\n var item = $(items.shift());\n item.animate({'margin-left': item.width()*-1, opacity: '0%'}, 'slow', 'linea...
[ "0.6882294", "0.6827787", "0.67363364", "0.6665643", "0.6549694", "0.6548015", "0.65184164", "0.65014553", "0.64959544", "0.6490066", "0.6479246", "0.6466931", "0.64633083", "0.64388466", "0.64321345", "0.63685733", "0.63685733", "0.6358446", "0.6349347", "0.6349347", "0.6319...
0.7947538
0