Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
removes selected social media link
function remove_social(element) { // var selected = element.id.replace('_remove_btn', ''); // var selected = element.id.substring(0, element.id.indexOf("_remove_btn")); var parent_grp_btn_id = element.id.replace('_remove_btn_', '_btn_group_'); console.log(parent_grp_btn_id); var soc_id_val = $('#' + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeSocialSharebuttons() \n {\n $(\".share-links li:not(.webshare-list-item)\").each(function(){\n $(this).remove();\n });\n }", "removeWebSharebutton() \n {\n $(\".webshare-list-item\").remove();\n }", "function hideSocialMedia()\n{\n document.getElementById(\"s...
[ "0.7253325", "0.69139683", "0.63045955", "0.6214459", "0.61572784", "0.61509544", "0.60294044", "0.6018908", "0.59621835", "0.5956737", "0.594827", "0.5924572", "0.5857242", "0.5845435", "0.58188325", "0.5808758", "0.5787198", "0.57603425", "0.57272404", "0.57263535", "0.5702...
0.55322486
33
hides hidden sections of all tabs
function hide_hidden_sections() { $('#hidden_send_ref').css('display', 'none'); $('#hidden_send_ref').css('visibility', 'hidden'); $('#hidden_mt_section').css('display', 'none'); $('#hidden_mt_section').css('visibility', 'hidden'); $('#sel_customer').val(''); if ($('#hidden_send_ref').css('vi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideAllTabs(tab) {\n tabData = document.getElementById(tab);\n tabDivs = tabData.getElementsByTagName('DIV');\n\n for (i = 0; i < tabDivs.length; i++) {\n tabDivs[i].style.display = 'none';\n }\n }", "function showHideTabs() {\n $.each(tabArray, function ...
[ "0.753704", "0.73750126", "0.7371592", "0.7230655", "0.72148335", "0.7171366", "0.7157636", "0.7137125", "0.7071333", "0.70711774", "0.70445967", "0.7042836", "0.69745344", "0.6972081", "0.6953152", "0.69454926", "0.68705237", "0.68563294", "0.68136513", "0.6765834", "0.66890...
0.68902373
16
shows new machine tool adding section
function unhide_mt_section() { $('#hidden_mt_section').css('display', 'block'); $('#hidden_mt_section').css('visibility', 'visible'); if ($('#hidden_mt_section').css('visibility') === 'visible') { $('html, body').animate({ scrollTop: $("#hidden_mt_section").offset().top }, 1000)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addVMachineElement(request,vm_json){\n var id = vm_json.VM.ID;\n\tvar element = vMachineElementArray(vm_json);\n\taddElement(element,dataTable_vMachines);\n //Popup info panel after creation.\n updateVMInfo(null,vm_json);\n}", "function showDialogAdd() {\n var title = 'Add Parts to Locations';...
[ "0.63644606", "0.63368803", "0.6336446", "0.62742007", "0.61818147", "0.60039", "0.5892143", "0.5861056", "0.58412564", "0.57253206", "0.5719638", "0.5650119", "0.56247395", "0.56167996", "0.5613448", "0.56122965", "0.5605191", "0.55998474", "0.558882", "0.5581254", "0.553592...
0.0
-1
Fill machine tools categories
function get_mt_types() { var metal_cutting_types = [ {'description': 'Torna', 'selected': false, 'text': 'Turning Lathe', 'value': '1'}, {'description': 'Freze', 'selected': false, 'text': 'Milling', 'value': '2'}, {'description': 'Çok fonksiyonlu CNC', 'selected': false, 'text': 'Multi Ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetEquips() {\r\n\tvar equips = [\"tool\", \"head\", \"body\", \"arms\", \"legs\", \"feet\", \"other\"];\r\n\tvar cat = catList[$(\"#cat-id\").val()];\r\n\tfor (var i=0;i<7;i++) {\r\n\t\tvar type = equips[i];\r\n\t\tif (type==\"tool\") {\r\n\t\t\ttoolList[cat[type]]++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\teq...
[ "0.57374185", "0.56203294", "0.5605264", "0.5551722", "0.54426694", "0.5435616", "0.5350048", "0.52828765", "0.52733546", "0.5230809", "0.5222472", "0.5215492", "0.5184863", "0.517407", "0.51614964", "0.5141401", "0.51369554", "0.5126151", "0.51166356", "0.51039386", "0.50836...
0.0
-1
Get the category machine tool brands
function get_mt_brands() { var brands = [ {'description': 'Mazak', 'selected': false, 'text': 'Yamazaki Mazak', 'value': '1'}, {'description': 'Goodway', 'selected': false, 'text': 'Yama Seiki Goodway ', 'value': '2'}, {'description': 'Chevalier', 'selected': false, 'text': 'Chevalier', 'va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBrand()\n{\n\tvar brand = new Array([111,'华为'], [222,'中兴'], [333,'华三'], [444,'HP']);\n\treturn brand;\n}", "getBands(){\n return this.bands\n }", "function getCategory()\n{\n\tvar category = new Array([111,'server'], [222,'switcher'], [333,'storage'], [444,'workstation']);\n\tretu...
[ "0.6146491", "0.6123653", "0.6054413", "0.6000045", "0.5792593", "0.5748871", "0.5513455", "0.55010986", "0.54949284", "0.54832613", "0.5465303", "0.54520017", "0.5391159", "0.5367597", "0.53379524", "0.5308935", "0.53012925", "0.5289897", "0.52510387", "0.5242206", "0.523227...
0.0
-1
Get the brand machine tool series
function get_mt_series() { var series = [ {'description': 'Serie 1', 'selected': false, 'text': 'Serie 1', 'value': '1'}, {'description': 'Serie 2', 'selected': false, 'text': 'Serie 2', 'value': '2'}, {'description': 'Serie 3', 'selected': false, 'text': 'Serie 3', 'value': '3'}, {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBrand()\n{\n\tvar brand = new Array([111,'华为'], [222,'中兴'], [333,'华三'], [444,'HP']);\n\treturn brand;\n}", "get brand() {\n\t\treturn this.__brand;\n\t}", "getPresets () {\n const out = { device: 'BeatStep' }\n return out\n }", "function getBrand(obj) {\n let brands = [];\n obj.shoes.for...
[ "0.63389015", "0.58147466", "0.57751274", "0.5594691", "0.5588611", "0.5374147", "0.53575975", "0.5346975", "0.5324458", "0.5297386", "0.52393395", "0.5232085", "0.50793445", "0.5067511", "0.50659424", "0.50478554", "0.5047782", "0.5021995", "0.50191766", "0.5013562", "0.4994...
0.0
-1
unhide selected machine tool properties section
function show_sel_mt() { $('#sel_mt_title').empty(); $('#sel_mt_title').append($('#selected_mt_brand').val() + " " + $('#selected_mt_series').val()); $('#sel_mt_props_div').css('display', 'block'); $('#sel_mt_props_div').css('visibility', 'visible'); if ($('#sel_mt_props_div').css('visibility') =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hidePropMenu() {\n propBoxLabel.hide();\n ipNameLabel.hide();\n colNameLabel.hide();\n labCaptLabel.hide();\n opNameLabel.hide();\n inputIsTopBox.hide();\n inputCaptionBox.hide();\n outputCaptionBox.hide();\n outputColorBox.hide();\n labelTextBox.hide();\n clockspeedLabel....
[ "0.65618217", "0.63718444", "0.63506556", "0.61814195", "0.61032385", "0.6030066", "0.59650654", "0.58993506", "0.58806837", "0.5876478", "0.5867116", "0.58549666", "0.58186805", "0.5811952", "0.5792802", "0.57775855", "0.5770937", "0.57674026", "0.5734523", "0.573401", "0.57...
0.0
-1
reset all selected machine tools
function reset_sel_mt() { $("#selected_mt_category").empty(); $("#selected_mt_type").empty(); $("#selected_mt_brand").empty(); $("#selected_mt_series").empty(); $('#machine_types').ddslick('destroy'); $('#machine_brands').ddslick('destroy'); $('#machine_series').ddslick('destroy'); $(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetAll(){\n suicideCreeps();\n suicideInvader();\n resetMemory();\n return 'Reset all creeps, invaders and memory';\n}", "function resetAllToolselectionClasses(){\n document.getElementById(\"tool-toolSelector-paint\").className = \"\";\n document.getElementById(\"tool-toolSelector-er...
[ "0.6837093", "0.67170054", "0.6658762", "0.64947945", "0.6402345", "0.63160795", "0.6220019", "0.62055176", "0.6194884", "0.6112191", "0.6111778", "0.6077456", "0.6060944", "0.60522467", "0.6051632", "0.60430926", "0.60234416", "0.60227925", "0.60226285", "0.60120744", "0.598...
0.56354105
80
Call all machine properties
function call_sel_mt_props() { $('#pg').propertygrid({ url: '../../../../jsinline/props.json', showGroup: true, scrollbarSize: 0 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function apply_properties(props){\n console.log(\"[INFO] Read properties :\");\n props.each((key, value) => {\n console.log(\"[\" + key + \"] : \" + value);\n })\n\n var props_port = props.get('server.port');\n var props_save_folder = props.get('server.save.folder');\n var props...
[ "0.5851757", "0.57953066", "0.57818526", "0.5756217", "0.5740223", "0.5700614", "0.5656353", "0.56016934", "0.5512997", "0.54360837", "0.5398187", "0.5390277", "0.53208005", "0.5315129", "0.5315129", "0.5289898", "0.52594334", "0.5237043", "0.5228521", "0.5142909", "0.5129753...
0.51453936
19
Markers and Labels Function to update the position of the markers and make the transition, based
function buildMarkers(markersGroup, newXScale, updateXAxis, newYScale, updateYAxis) { // When the event listener is triggered, make the transition markersGroup.transition() .duration(500) .attr("cx", d => newXScale(d[updateXAxis])) .attr("cy", d => newYScale(d[updateYAxis])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMarkers() {}", "UpdateMarkers() {\n\n }", "function updateMarkerPositions() {\n var updatedDetections = [];\n markers_FirstFloor.forEach(marker => {\n\n var randomIndex = Math.floor(Math.random() * demo.config.initialDetections.WaliedCheetos.detections.length);\n let ...
[ "0.7486718", "0.72485477", "0.70139235", "0.672763", "0.6567579", "0.6567401", "0.6551834", "0.65298724", "0.6525471", "0.64548", "0.6439837", "0.63994044", "0.6393561", "0.6379992", "0.637825", "0.637825", "0.6368765", "0.63545704", "0.6336583", "0.63143146", "0.63038665", ...
0.60333407
51
Function to update the position of the labels and make the transition
function buildLabels(addLabels, newXScale, updateXAxis, newYScale, updateYAxis) { // When the event listener is triggered, make the transition addLabels.transition() .duration(500) .attr("x", d => newXScale(d[updateXAxis])) .attr("y", d => newYScale(d[updateYAxis])); return addLabels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redrawLabels() {\n labels\n .transition()\n .duration(1500)\n .attr(\"x\", d => d.x)\n .attr(\"y\", d => d.y);\n\n links\n .transition()\n .duration(1500)\n .attr(\"x2\", d => d.x)\n .attr(\"y2\", d => d.y);\n }", "function setLabelPositions(){\n labelPo...
[ "0.7593358", "0.7239507", "0.7223144", "0.71207064", "0.706447", "0.7028561", "0.7024113", "0.7022887", "0.7013098", "0.7008146", "0.6919251", "0.68840003", "0.6860897", "0.68466914", "0.68402934", "0.6837199", "0.6803192", "0.66672885", "0.661854", "0.6571846", "0.65064454",...
0.6530178
20
animacion que se ejecuta cuando se hace Focus en el input
function animacionInputFocus(){ $(".content").append('<div class="backdrop"></div>'); $(".marco").addClass('marco-in'); $(".img-background").css('filter', 'blur(9px)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "focus() {}", "focus() {}", "function focus(){}", "onFocus() {\n this.refs.widget.animate(\n {\n a: 1\n },\n 0.25\n );\n }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusIn...
[ "0.7261614", "0.7261614", "0.7212254", "0.71258086", "0.7110226", "0.7110226", "0.7110226", "0.7110226", "0.7110226", "0.6970529", "0.696974", "0.69593686", "0.69548404", "0.69039315", "0.6891865", "0.68828434", "0.68465376", "0.68460757", "0.6793343", "0.6751561", "0.6654129...
0.7415363
0
Reinicia y remueve elementos DOM
function Backdrop(){ $(".backdrop").click(function () { $(this).remove(); $(".marco").removeClass('marco-in'); $(".img-background").css('filter', ''); foco=false; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "limpiarHTML(){\n while(detPedido.firstChild) {\n detPedido.removeChild( detPedido.firstChild)\n }\n }", "limpiarHTML(){\n while(totalPedidoMostrar.firstChild) {\n totalPedidoMostrar.removeChild( totalPedidoMostrar.firstChild)\n }\n }", "function limpiarHT...
[ "0.67558926", "0.6748497", "0.6609558", "0.6558095", "0.648624", "0.64491767", "0.6346695", "0.6338764", "0.6323329", "0.6322333", "0.6299777", "0.62709", "0.62606484", "0.6248309", "0.624652", "0.62221056", "0.62059015", "0.61699826", "0.61609197", "0.6151846", "0.6149874", ...
0.0
-1
Ordena los numeros en forma ascendente y los devuelve
function Reordernar(numeros) { for(var i = 0; i < numeros.length; i++){ for(j=i+1; j < numeros.length; j++){ if(numeros[i] > numeros[j]){ auxiliar = numeros[i]; numeros[i] = numeros[j]; numeros[j] = auxiliar; } } } return numeros; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByNum(a, b) {\n return (a.peoplenum + a.recognized) < (b.peoplenum + b.recognized);\n }", "function sortNumber(a, b) {\n return b.puntuacion - a.puntuacion;\n}", "function sortNumber(a, b) {\n return b.puntuacion - a.puntuacion;\n}", "function sortNumbersAscending(a, b) {\n\t re...
[ "0.7220116", "0.7179296", "0.7179296", "0.70653075", "0.6862883", "0.68076694", "0.68027526", "0.6791032", "0.67873114", "0.67713815", "0.67657405", "0.6745926", "0.6730402", "0.6727516", "0.67023706", "0.6670501", "0.6657503", "0.6640287", "0.66369146", "0.66357285", "0.6634...
0.73305523
0
checkEnemyCollision makes sure enemy bugs don't bump into each other, if the one behind gets close to the enemy at the front, enemy speeds up
function checkEnemyCollision(){ for (var i = 0; i < allEnemies.length; i+=2) { if (Math.abs(allEnemies[i].x - allEnemies[i+1].x) < 50 && Math.abs(allEnemies[i].y - allEnemies[i+1].y) < 50 ) { this.x = -DIMENSIONS.TILE.WIDTH; this.y = enemy.enemyY[Math.floor(Math.random() * 3)]; this.enemySpeed =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCollision() {\n // enemies with layout\n game.activeEnemies.forEach(function(enemy) {\n enemy.x = enemy.x>game.canvas[0].width?enemy.cleanUp():enemy.x;\n enemy.x = enemy.x<-75?enemy.cleanUp():enemy.x;\n // enemies with hero\n if ((enemy.x>=hero.x-20&&enemy.x<hero.x+40)&&(ene...
[ "0.8011571", "0.7438318", "0.7436455", "0.7395389", "0.7375292", "0.73429847", "0.7319639", "0.7316996", "0.7273469", "0.7259062", "0.7247421", "0.723833", "0.7232073", "0.7227917", "0.7207806", "0.72042155", "0.7200765", "0.7185452", "0.71804637", "0.7116754", "0.708451", ...
0.78040713
1
`App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization. This allows for keeping state between navigation, custom error handling, injecting additional data.
async function appGetInitialProps(_ref) { var { Component, ctx } = _ref; var pageProps = await (0, _utils.loadGetInitialProps)(Component, ctx); return { pageProps }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AppPage() {\n Page.apply(this, arguments);\n }", "function MyApp() {\n return (\n <div>\n <AppPage /> \n </div>\n )\n}", "function AppComponent(_page) {\n this._page = _page;\n this._page.actionBarHidden = true;\n }", "function App() {\n\treturn (\...
[ "0.77505255", "0.6773226", "0.66305465", "0.6567328", "0.64741445", "0.64676905", "0.6411856", "0.63242155", "0.631326", "0.630522", "0.6266524", "0.6238018", "0.6224131", "0.6165173", "0.6123365", "0.61198324", "0.61090267", "0.6103032", "0.610199", "0.60872763", "0.60669583...
0.0
-1
Check login status on load
componentDidMount() { this.loginCheck(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_login_status(){\r\n\t//if not login, then check login save info\r\n\tif(CommInfo.is_login)\r\n\t{\r\n\t\tlogin_init();\r\n\t}\r\n}", "checkLoggedInStatus() {\n this.bitski.getUser().then(user => {\n this.toggleLoading(false);\n this.validateUser(user);\n }).catch(error => {\n ...
[ "0.7831027", "0.7691122", "0.7531885", "0.74117696", "0.7362905", "0.7362474", "0.72764045", "0.72764045", "0.7260933", "0.7254636", "0.7250359", "0.7250359", "0.7250359", "0.7250359", "0.7250359", "0.7250359", "0.7250359", "0.72470456", "0.7219962", "0.7219962", "0.7219962",...
0.0
-1
Draw something that looks like bark beetle tunnels.
function drawBarkbeetleTunnels() { let _line = null; let pdist = 10; let leftElements = {}; let rightElements = {}; var t = -10000; var minT = 0.0; var maxT = 1.0; for (var i in pb.drawables) { if (!(pb.drawables[i] instanceof Line)) continue; _line = pb.drawables[i]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static draw() {\n tick++;\n\n background(51);\n\n for( let b of Ball.zeBalls ) {\n b.show();\n b.step(tick);\n }\n\n // if( tick < 1000 )\n // Ball.saveScreenshot( \"balls-\" + Ball.leadingZeroes(tick, 3) );\n }", "function drawTower(){\n push();\n for(var i=0; i<18; i++)\n { \n...
[ "0.64883286", "0.6464958", "0.6236258", "0.62218535", "0.61849517", "0.6135724", "0.6129581", "0.61288244", "0.6102077", "0.6086873", "0.6067224", "0.60637826", "0.60635996", "0.5963439", "0.5959759", "0.5953613", "0.59421223", "0.59413695", "0.5941256", "0.5940576", "0.59145...
0.77808195
0
Get the offset position of the navbar var sticky = navbar.offsetTop; Add the sticky class to the navbar when you reach its scroll position. Remove "sticky" when you leave the scroll position
function myFunction() { if (window.pageYOffset > 100) { navbar.classList.add('sticky'); } else { navbar.classList.remove('sticky'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myNavBar(){\r\n if(window.pageYOffset >= sticky){\r\n navbar.classList.add(\"sticky\")\r\n } else{\r\n navbar.classList.remove(\"sticky\")\r\n }\r\n}", "function stickyNavbar() {\n if (window.pageYOffset >= sticky) {\n navbar.classList.add(\"sticky\");\n main.classList.add(\"mainPadding\...
[ "0.862685", "0.8549038", "0.8506891", "0.8505102", "0.8448909", "0.8385679", "0.83689517", "0.8368898", "0.8365485", "0.83388", "0.828528", "0.82653683", "0.82509065", "0.8239262", "0.8239185", "0.8239185", "0.8220974", "0.8214635", "0.8204271", "0.8201077", "0.81964344", "...
0.8065262
62
Converts an RDF literal, resource or integer into a string.
function getRDFValue(aLiteral) { if (aLiteral instanceof Ci.nsIRDFLiteral) return aLiteral.Value; if (aLiteral instanceof Ci.nsIRDFResource) return aLiteral.Value; if (aLiteral instanceof Ci.nsIRDFInt) return aLiteral.Value; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_encodeLiteral(literal) {\n // Escape special characters\n let value = literal.value;\n if (escape.test(value)) value = value.replace(escapeAll, characterReplacer);\n\n // Write a language-tagged literal\n if (literal.language) return `\"${value}\"@${literal.language}`;\n\n // Write dedicated lit...
[ "0.6129258", "0.6083934", "0.60751593", "0.5987465", "0.5952733", "0.59140295", "0.58445853", "0.5630766", "0.5630766", "0.55807894", "0.55537444", "0.54389286", "0.5395988", "0.53607136", "0.5326008", "0.52381", "0.5225947", "0.52235043", "0.5220612", "0.5220612", "0.5213027...
0.5872214
6
Gets an RDF property as a string
function getRDFProperty(aDs, aResource, aProperty) { return getRDFValue(aDs.GetTarget(aResource, EM_R(aProperty), true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sdfg_property_to_string(prop, settings=null) {\n if (prop === null) return prop;\n if (prop.type === \"Indices\" || prop.type === \"subsets.Indices\") {\n let indices = prop.indices;\n let preview = '[';\n for (let index of indices) {\n preview += sdfg_property_to_str...
[ "0.6943708", "0.6720511", "0.6357082", "0.63385683", "0.5788042", "0.5772762", "0.574519", "0.5730488", "0.571776", "0.57074165", "0.56585854", "0.56419533", "0.5634193", "0.5625813", "0.56173277", "0.5602821", "0.5582436", "0.5576129", "0.55513614", "0.5537305", "0.55264366"...
0.6585492
2
Asynchronously fill in the _repositoryAddon field for one addon
function getRepositoryAddon(aAddon, aCallback) { if (!aAddon) { aCallback(aAddon); return; } function completeAddon(aRepositoryAddon) { aAddon._repositoryAddon = aRepositoryAddon; aAddon.compatibilityOverrides = aRepositoryAddon ? aRepositoryAddon.compatibilit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async updateAddonRepositoryData() {\n let addons = await this.getVisibleAddons(null);\n logger.debug(\"updateAddonRepositoryData found \" + addons.length + \" visible add-ons\");\n\n await Promise.all(addons.map(addon =>\n AddonRepository.getCachedAddonByID(addon.id).then(aRepoAddon => {\n if ...
[ "0.7007328", "0.57252586", "0.5624226", "0.55017406", "0.5460881", "0.5237818", "0.5126229", "0.5088602", "0.50455487", "0.50340366", "0.5012736", "0.5009715", "0.5009715", "0.5009715", "0.5009715", "0.5009715", "0.5009715", "0.5009715", "0.5009715", "0.5009715", "0.5009715",...
0.5936654
1
Wrap an APIsupplied function in an exception handler to make it safe to call
function makeSafe(aCallback) { return function(...aArgs) { try { aCallback(...aArgs); } catch(ex) { logger.warn("XPI Database callback failed", ex); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function catcher () { return fn }", "function handlerWrapper(handler, ...args) {\n try {\n handler.apply(this, args)\n } catch (error) {\n logger.error('caught error from api handler', handler.name, error.message, 'continuing', error)\n }\n}", "function unsafeFunction() {\n return function() {\n ...
[ "0.6909226", "0.67388093", "0.64075744", "0.63652194", "0.6312806", "0.63108695", "0.63108695", "0.6283178", "0.6283178", "0.6283178", "0.6283178", "0.6283178", "0.62450117", "0.6237321", "0.62220305", "0.61905646", "0.61836517", "0.6129052", "0.6128075", "0.60783017", "0.607...
0.0
-1
A helper method to asynchronously call a function on an array of objects, calling a callback when function(x) has been gathered for every element of the array. WARNING: not currently errorsafe; if the async function does not call our internal callback for any of the array elements, asyncMap will not call the callback p...
function asyncMap(aObjects, aMethod, aCallback) { var resultsPending = aObjects.length; var results = [] if (resultsPending == 0) { aCallback(results); return; } function asyncMap_gotValue(aIndex, aValue) { results[aIndex] = aValue; if (--resultsPending == 0) { aCallback(results); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function asyncForEach (arr, callback) {\n\t\t\tfor (let i = 0; i < arr.length; i++) {\n\t\t\t\tawait callback(arr[i], i, arr);\n\t\t\t}\n\t\t}", "async function asyncForEach(array, callback) {\n for (let index = 0; index < array.length; index++) {\n await callback(array[index], index, array);\n ...
[ "0.76687324", "0.7500857", "0.7488048", "0.74831736", "0.7478919", "0.7462765", "0.74556476", "0.74372435", "0.74241793", "0.7418561", "0.74153334", "0.74153334", "0.74113864", "0.7309617", "0.7307867", "0.7271912", "0.69781893", "0.6873613", "0.66978675", "0.6669231", "0.665...
0.72649926
16
A generator to synchronously return result rows from an mozIStorageStatement.
function resultRows(aStatement) { try { while (stepStatement(aStatement)) yield aStatement.row; } finally { aStatement.reset(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRows() {\n\t\toriginal().then(row => (originalRow = row));\n\t\texpected().then(row => (expectedRow = row));\n\t}", "function iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n creat...
[ "0.59459305", "0.57889813", "0.57889813", "0.57889813", "0.57889813", "0.5783354", "0.5783354", "0.5783354", "0.5730917", "0.5730917", "0.5730917", "0.5696429", "0.56929594", "0.56929594", "0.568381", "0.56622916", "0.56500685", "0.5637988", "0.56232095", "0.56232095", "0.544...
0.6853015
0
A helper function to step a statement synchronously and log any error that occurs.
function stepStatement(aStatement) { try { return aStatement.executeStep(); } catch (e) { logSQLError(XPIDatabase.connection.lastError, XPIDatabase.connection.lastErrorString); throw e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function doWork() {\n try {\n console.log(\"s1\");\n await step1();\n console.log(\"s2\");\n await step2();\n console.log(\"s3\");\n await step3();\n console.log(\"s4\");\n } catch (err) {}\n}", "function step() {\n\n // if there's more to do\n if (!result.done) {\n ...
[ "0.6012193", "0.5291208", "0.52767044", "0.51869804", "0.5162063", "0.5153391", "0.51208574", "0.5069206", "0.500666", "0.49981013", "0.49962687", "0.4994846", "0.49857542", "0.49842882", "0.4975557", "0.4974309", "0.4971994", "0.4965547", "0.49655372", "0.4956888", "0.495075...
0.6598547
0
Copies properties from one object to another. If no target object is passed a new object will be created and returned.
function copyProperties(aObject, aProperties, aTarget) { if (!aTarget) aTarget = {}; aProperties.forEach(function(aProp) { aTarget[aProp] = aObject[aProp]; }); return aTarget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function objectAssign(target, source) {\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n target[prop] = source[prop];\n }\n }\n return target;\n}", "function objectAssign(target, source) {\n for (var i = 0, keys = Object.keys(source); i < keys.length; i++...
[ "0.7668141", "0.7214924", "0.7168717", "0.7135813", "0.7129331", "0.69660354", "0.69174415", "0.69174415", "0.6914605", "0.6879163", "0.6879113", "0.686949", "0.686949", "0.686949", "0.6857128", "0.68570924", "0.68570924", "0.68570924", "0.68570924", "0.6787988", "0.6787988",...
0.7212006
2
Copies properties from a mozIStorageRow to an object. If no target object is passed a new object will be created and returned.
function copyRowProperties(aRow, aProperties, aTarget) { if (!aTarget) aTarget = {}; aProperties.forEach(function(aProp) { aTarget[aProp] = aRow.getResultByName(aProp); }); return aTarget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function objectAssign(target, source) {\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n target[prop] = source[prop];\n }\n }\n return target;\n}", "function makeObject(row, headers) {\n var ret = {};\n headers = headers || [];\n ...
[ "0.54436636", "0.5423477", "0.5417666", "0.53865623", "0.53534704", "0.5330333", "0.5285327", "0.52086973", "0.517831", "0.5173238", "0.50022525", "0.49995705", "0.4953827", "0.49147812", "0.49144235", "0.49098578", "0.4889723", "0.48885065", "0.47951165", "0.4786868", "0.477...
0.69184417
0
The DBAddonInternal is a special AddonInternal that has been retrieved from the database. The constructor will initialize the DBAddonInternal with a set of fields, which could come from either the JSON store or as an XPIProvider.AddonInternal created from an addon's manifest
function DBAddonInternal(aLoaded) { copyProperties(aLoaded, PROP_JSON_FIELDS, this); if (aLoaded._installLocation) { this._installLocation = aLoaded._installLocation; this.location = aLoaded._installLocation.name; } else if (aLoaded.location) { this._installLocation = XPIProvider.installLocationsBy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init (db) {\n\t db.api = new DoozyApi(db);\n return db;\n\t}", "function db_wrapper(idb) {\n\t\tObject.defineProperty(this, \"_db\", {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: false,\n\t\t\tvalue: idb,\n\t\t});\n\n\t\tstores.forEach(function (store) {\n\t\t\tObjec...
[ "0.5470114", "0.54157376", "0.5415163", "0.5322771", "0.5322771", "0.50715196", "0.5061638", "0.5055312", "0.5006508", "0.49803582", "0.49634925", "0.49399343", "0.49304548", "0.49121857", "0.4905559", "0.48919958", "0.48919958", "0.4876987", "0.48464388", "0.4829987", "0.478...
0.71925604
0
Internal interface: find an addon from an already loaded addonDB
function _findAddon(addonDB, aFilter) { for (let addon of addonDB.values()) { if (aFilter(addon)) { return addon; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DBAddonInternal(aLoaded) {\n copyProperties(aLoaded, PROP_JSON_FIELDS, this);\n\n if (aLoaded._installLocation) {\n this._installLocation = aLoaded._installLocation;\n this.location = aLoaded._installLocation.name;\n }\n else if (aLoaded.location) {\n this._installLocation = XPIProvider.insta...
[ "0.60988647", "0.6060185", "0.55068576", "0.5440904", "0.5388755", "0.5315323", "0.5313011", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "0.53047395", "...
0.73479813
0
Internal interface to get a filtered list of addons from a loaded addonDB
function _filterDB(addonDB, aFilter) { return [for (addon of addonDB.values()) if (aFilter(addon)) addon]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAddons() {\n const addonConfigs = await this.addonStore.getAll();\n return addonConfigs.map(a => this.filterSensitiveFields(a));\n }", "function getAllAddons() {\n self.getAsyncStatement(\"getAllAddons\").executeAsync({\n handleResult: function(aResults) {\n let row...
[ "0.732888", "0.6910615", "0.65657777", "0.61421853", "0.55845463", "0.5364592", "0.5202794", "0.51602983", "0.5025346", "0.5018741", "0.49722144", "0.4966984", "0.49647334", "0.49647334", "0.4964688", "0.49465412", "0.49341345", "0.49198452", "0.49090892", "0.49011582", "0.48...
0.75182277
0
Need to make sure no other addon has this GUID
function excludeSyncGUID(otherAddon) { return (otherAddon._key != aAddon._key) && (otherAddon.syncGUID == aGUID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guid() {return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();}", "function checkAndSaveDeviceGuid(callback) {\n if (typeof (localStorage.deviceGuid) == UNDEFINED) localStorage.deviceGuid = PMCommonFunction.generateUUID();\n\n var guid = localStorage.deviceGuid;\n ...
[ "0.66532576", "0.6375723", "0.636994", "0.6351056", "0.6344357", "0.6341215", "0.6327617", "0.6295845", "0.6293049", "0.6280127", "0.6233335", "0.6226187", "0.62217194", "0.62081975", "0.61910546", "0.61815965", "0.6162378", "0.61582065", "0.6154055", "0.6146783", "0.61211765...
0.68331623
1
Returns a map of ID > addon. When the same addon ID exists in multiple install locations the highest priority location is chosen.
flattenByID(addonMap, hideLocation) { let map = new Map(); for (let installLocation of XPIProvider.installLocations) { if (installLocation.name == hideLocation) continue; let locationMap = addonMap.get(installLocation.name); if (!locationMap) continue; for (let [id, ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getVisibleAddons(addonMap) {\n let map = new Map();\n\n for (let [location, addons] of addonMap) {\n for (let [id, addon] of addons) {\n if (!addon.visible)\n continue;\n\n if (map.has(id)) {\n logger.warn(\"Previous database listed more than one visible add-on with id \"...
[ "0.60391766", "0.5513182", "0.5026466", "0.47219703", "0.46827057", "0.46774393", "0.457309", "0.45535347", "0.4500297", "0.44599062", "0.44295806", "0.44259253", "0.44064832", "0.43883646", "0.43544045", "0.4349359", "0.4326107", "0.4322322", "0.43217558", "0.4321646", "0.42...
0.6958519
0
Finds the visible addons from the map.
getVisibleAddons(addonMap) { let map = new Map(); for (let [location, addons] of addonMap) { for (let [id, addon] of addons) { if (!addon.visible) continue; if (map.has(id)) { logger.warn("Previous database listed more than one visible add-on with id " + id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "flattenByID(addonMap, hideLocation) {\n let map = new Map();\n\n for (let installLocation of XPIProvider.installLocations) {\n if (installLocation.name == hideLocation)\n continue;\n\n let locationMap = addonMap.get(installLocation.name);\n if (!locationMap)\n continue;\n\n ...
[ "0.6025527", "0.5576867", "0.5549276", "0.5394855", "0.5394855", "0.53882414", "0.5242352", "0.51960415", "0.51208943", "0.51175874", "0.5077084", "0.5077084", "0.5063914", "0.50364107", "0.5033793", "0.50336576", "0.50148094", "0.5011944", "0.49639416", "0.49568036", "0.4956...
0.82814795
0
Called to add the metadata for an addon in one of the install locations to the database. This can be called in three different cases. Either an addon has been dropped into the location from outside of Firefox, or an addon has been installed through the application, or the database has been upgraded or become corrupt an...
addMetadata(aInstallLocation, aId, aAddonState, aNewAddon, aOldAppVersion, aOldPlatformVersion, aMigrateData) { logger.debug("New add-on " + aId + " installed in " + aInstallLocation.name); // If we had staged data for this add-on or we aren't recovering from a // corrupt database and we don'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateMetadata(aInstallLocation, aOldAddon, aAddonState, aNewAddon) {\n logger.debug(\"Add-on \" + aOldAddon.id + \" modified in \" + aInstallLocation.name);\n\n try {\n // If there isn't an updated install manifest for this add-on then load it.\n if (!aNewAddon) {\n let file = Cc[\"@mozilla...
[ "0.6482083", "0.58848226", "0.56163025", "0.543559", "0.5203723", "0.5181749", "0.51795274", "0.5067034", "0.50538707", "0.5040509", "0.49870986", "0.49727994", "0.49727994", "0.49379423", "0.48800668", "0.4865799", "0.48557815", "0.484776", "0.48402065", "0.4837727", "0.4834...
0.73768073
0
Called when an addon has been removed.
removeMetadata(aOldAddon) { // This add-on has disappeared logger.debug("Add-on " + aOldAddon.id + " removed from " + aOldAddon.location); XPIDatabase.removeAddonMetadata(aOldAddon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove() {\r\n if (!inExtensionPage && !confirm(\"Do you really want to remove this script?\"))\r\n return;\r\n \r\n API_GetTabURL(function(url) {\r\n var domain = url.match(/^[\\w-]+:\\/*\\[?([\\w\\.:-]+)\\]?(?::\\d+)?/)[1];\r\n storage.deleteScript([\"ss\", domain],...
[ "0.6698447", "0.6423329", "0.6390652", "0.6384423", "0.6323448", "0.6318253", "0.6277432", "0.6273667", "0.6196619", "0.6196054", "0.61794835", "0.61723125", "0.6161019", "0.6154962", "0.612749", "0.6111693", "0.6111693", "0.6047643", "0.6041509", "0.6031186", "0.6029023", ...
0.62494284
8
Updates an addon's metadata and determines if a restart of the application is necessary. This is called when either the addon's install directory path or last modified time has changed.
updateMetadata(aInstallLocation, aOldAddon, aAddonState, aNewAddon) { logger.debug("Add-on " + aOldAddon.id + " modified in " + aInstallLocation.name); try { // If there isn't an updated install manifest for this add-on then load it. if (!aNewAddon) { let file = Cc["@mozilla.org/file/local;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async reload() {\n const addon = addonFor(this);\n\n logger.debug(`reloading add-on ${addon.id}`);\n\n if (!this.temporarilyInstalled) {\n await XPIDatabase.updateAddonDisabledState(addon, true);\n await XPIDatabase.updateAddonDisabledState(addon, false);\n } else {\n // This function su...
[ "0.6532545", "0.64590526", "0.6438954", "0.61724806", "0.5914429", "0.5691028", "0.5489822", "0.5477995", "0.5314828", "0.52431554", "0.5235301", "0.51940656", "0.5165846", "0.5162283", "0.51600397", "0.5134487", "0.51232797", "0.51115", "0.5109991", "0.5097067", "0.50833833"...
0.62871844
3
Updates an addon's descriptor for when the addon has moved in the filesystem but hasn't changed in any other way.
updateDescriptor(aInstallLocation, aOldAddon, aAddonState) { logger.debug("Add-on " + aOldAddon.id + " moved to " + aAddonState.descriptor); aOldAddon.descriptor = aAddonState.descriptor; aOldAddon._sourceBundle.persistentDescriptor = aAddonState.descriptor; return aOldAddon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateMetadata(aInstallLocation, aOldAddon, aAddonState, aNewAddon) {\n logger.debug(\"Add-on \" + aOldAddon.id + \" modified in \" + aInstallLocation.name);\n\n try {\n // If there isn't an updated install manifest for this add-on then load it.\n if (!aNewAddon) {\n let file = Cc[\"@mozilla...
[ "0.5871198", "0.55201274", "0.5489919", "0.51445454", "0.5040976", "0.50146", "0.501199", "0.49752796", "0.49533904", "0.49505103", "0.4938235", "0.4922888", "0.49100903", "0.4880319", "0.48227596", "0.48130608", "0.4812665", "0.4812665", "0.48016453", "0.47943452", "0.476186...
0.737932
0
Called when no change has been detected for an addon's metadata but the application has changed so compatibility may have changed.
updateCompatibility(aInstallLocation, aOldAddon, aAddonState, aOldAppVersion, aOldPlatformVersion) { logger.debug("Updating compatibility for add-on " + aOldAddon.id + " in " + aInstallLocation.name); // If updating from a version of the app that didn't support signedState // then fetch that property now ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processFileChanges(aManifests, aUpdateCompatibility, aOldAppVersion, aOldPlatformVersion) {\n let loadedManifest = (aInstallLocation, aId) => {\n if (!(aInstallLocation.name in aManifests))\n return null;\n if (!(aId in aManifests[aInstallLocation.name]))\n return null;\n return aMa...
[ "0.60983455", "0.5840615", "0.57109785", "0.55290407", "0.54335725", "0.54146075", "0.5381169", "0.5331872", "0.5292159", "0.52578086", "0.5228718", "0.51577586", "0.5153742", "0.51036745", "0.5067842", "0.5067842", "0.50559676", "0.50424623", "0.5024146", "0.5013126", "0.501...
0.54650474
4
Compares the addons that are currently installed to those that were known to be installed when the application last ran and applies any changes found to the database. Also sends "startupcacheinvalidate" signal to observerservice if it detects that data may have changed. Always called after XPIProviderUtils.js and exten...
processFileChanges(aManifests, aUpdateCompatibility, aOldAppVersion, aOldPlatformVersion) { let loadedManifest = (aInstallLocation, aId) => { if (!(aInstallLocation.name in aManifests)) return null; if (!(aId in aManifests[aInstallLocation.name])) return null; return aManifests[aIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateActiveAddons() {\n logger.debug(\"Updating add-on states\");\n for (let [, addon] of this.addonDB) {\n let newActive = (addon.visible && !addon.disabled && !addon.pendingUninstall);\n if (newActive != addon.active) {\n addon.active = newActive;\n this.saveChanges();\n }\n ...
[ "0.61218166", "0.58395356", "0.58271873", "0.57964206", "0.57736635", "0.5670379", "0.55972946", "0.55748993", "0.54984105", "0.54817975", "0.54798347", "0.54708034", "0.5406228", "0.53459114", "0.5328774", "0.5312735", "0.5301908", "0.528154", "0.5276978", "0.5271622", "0.52...
0.6138465
0
Este script hace q se muestre por consola la resolucion del navegador, osea el alto y el ancho visibles. var cajita_img=$('div.cajita_img'); var img=$('div.cajita>img'); console.log("el alt del browser: "+alto_browser); console.log("el alt del browser: "+ancho_browser);
function mostrar_ancho(ancho,alto){ if(ancho<=1200 && ancho>=800){ console.log("entre 800 y 1200"); }else if(ancho<800 && ancho>=600){ console.log("entre 600 y 800"); }else if(ancho<600 && ancho>=480){ console.log("entre 480 y 600"); }else if(ancho<480 && ancho>=320){ console.lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Calcular_resolucion_browser(){\r\n\t\tvar ancho_browser=window.innerWidth;\r\n\t\t//var alto_browser=window.innerHeight;\r\n\t\tCalibrar_ancho_browser(ancho_browser);\r\n\t}", "function retrocederImagen() {\n\t\t\tif(ImagenSeleccionada == 1) {\n\t\t\t\tImagenSeleccionada = ImagenesCantidad;\n\t\t\t} els...
[ "0.6676036", "0.6426295", "0.64069295", "0.62231183", "0.62057394", "0.61511743", "0.61500925", "0.61369604", "0.61355346", "0.611638", "0.6106891", "0.6106891", "0.6086231", "0.6019488", "0.6009636", "0.59659445", "0.59318894", "0.5886686", "0.586168", "0.585072", "0.5846825...
0.54934967
72
Creates an instance of the current type.
constructor () { super() // Attach a shadow DOM tree to this element and // append the template to the shadow root. this.attachShadow({ mode: 'open' }) .appendChild(template.content.cloneNode(true)) /* Nickname screen properties */ this._chatNicknameState = this.shadowRoot....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(classType) {\n return new classType();\n}", "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "static create () {}", "function type(name) {\n if (isundefined(name))\n throw new TypeError('I...
[ "0.7055567", "0.69097465", "0.67445123", "0.6681196", "0.6595515", "0.6581877", "0.6414508", "0.6332356", "0.6328426", "0.62497425", "0.6218948", "0.62132883", "0.62132883", "0.62132883", "0.62132883", "0.62132883", "0.62132883", "0.61470604", "0.61324906", "0.6126644", "0.61...
0.0
-1
Called after the element is inserted into the DOM.
connectedCallback () { this._input.focus() // Sets the text input to have focus from the start }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@action\n\tdidInsert(element) {\n\t\tthis.debug(`didInsert: `, element);\n\t\tthis._element = element;\n\t}", "@action\n\tdidInsert(element) {\n\t\tthis.debug(`didInsert`);\n\t\tthis._element = element;\n\n\t\trun.next(() => {\n\t\t\tif(this.isDestroying || this.isDestroyed)\n\t\t\t\treturn;\n\n\t\t\tthis._eleme...
[ "0.7315346", "0.7115101", "0.70993817", "0.70123583", "0.695272", "0.6836858", "0.65680605", "0.6419122", "0.6418633", "0.63603765", "0.6321771", "0.6265375", "0.616304", "0.6106633", "0.6094104", "0.60385", "0.599225", "0.5969825", "0.59177226", "0.5902245", "0.58754945", ...
0.0
-1
Called after the element has been removed from the DOM.
disconnectedCallback () { document.removeEventListener('keydown', this.keyDownFunction) document.removeEventListener('keyup', this.keyUpFunction) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n this.element.remove();\n }", "remove () {\n $(this.element).remove ();\n }", "remove() {\n try { this.element.remove(); }\n catch (e) {}\n }", "destroy() {\n\t\tthis.element.remove();\n\t}", "remove() {\n\t\tif (this.$element) {\n\t\t\tthis.$element.remove();\n\t...
[ "0.7352721", "0.717958", "0.71744174", "0.71315897", "0.71307576", "0.7094543", "0.708197", "0.70648724", "0.7035613", "0.7035613", "0.7035613", "0.7035613", "0.6889741", "0.68771535", "0.68771535", "0.68771535", "0.68771535", "0.68771535", "0.68771535", "0.68771535", "0.6877...
0.0
-1
Returns true if this token is not x and does not contain x.
isConstant() { if (this.type == "name" && this.value == "x") { return false } if (this.left != undefined && !this.left.isConstant()) { return false } if (this.right != undefined && !this.right.isConstant()) { return false } retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function not(x) {\n return !x;\n }", "function notFreeIn(x,exp) {\n return freeVars(exp).indexOf(x) === -1;\n}", "function not(x) { return !x; }", "function isnt(x, y){\n\t return !is(x, y);\n\t }", "function absenty(x) {\n return !existy(x);\n}", "function notElem(x, xs){\r\n return...
[ "0.6545994", "0.6098929", "0.6062846", "0.5938166", "0.59094155", "0.58015895", "0.5666884", "0.5578427", "0.54330486", "0.54222", "0.53786427", "0.5369895", "0.53559923", "0.53371274", "0.53371274", "0.53223234", "0.5296415", "0.5248047", "0.5242938", "0.5231799", "0.5220983...
0.48659644
70
Remove all cards from the pile.
clear() { if (this.top !== null) { this.top.element.remove(); } this.cards = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n for (let card of this.playPile) {\n card.destroy();\n }\n\n for (let card of this.drawPile) {\n card.destroy();\n }\n\n this.drawPileCard.destroy();\n }", "function removeCards() {\n\t\tgame.workingSet.forEach(element => {\n\t\t\t$(`.card[data-cardIndex=${ element }]`).remo...
[ "0.7585091", "0.7425486", "0.72009164", "0.7123478", "0.70402974", "0.70388716", "0.7027342", "0.6978103", "0.6932353", "0.693233", "0.6909866", "0.6881826", "0.6827338", "0.6817694", "0.6813373", "0.67601764", "0.66958064", "0.66952354", "0.6680769", "0.66724455", "0.6669232...
0.6478954
27
$location instead of window location
function SignupController($scope, UserFactory, $http, $location) { UserFactory.username = $scope.username; UserFactory.password = $scope.password; $scope.processForm = function () { $http.post('/signup', JSON.stringify({ username: $scope.username, password: $scope.password })) .success(function (respon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirect(url) {\n url = url || '/'\n $location.path(url)\n }", "getWindowLocation() {\n return window.location;\n }", "function redirect(url){\n\t\turl = url || '/';\n\t\t$location.path(url);\n\t}", "function redirect(url) {\n url = url || '/';\n $location.path(url);...
[ "0.6797174", "0.676025", "0.67527986", "0.67001146", "0.67001146", "0.67001146", "0.66786", "0.6601063", "0.6601063", "0.6546467", "0.65099716", "0.65099245", "0.63816726", "0.63193303", "0.6318958", "0.630779", "0.6296294", "0.6287124", "0.62610877", "0.62331676", "0.6184397...
0.0
-1
takes in a URL and calls the function callbackforOne on the response given by httpget, which is data. now I just don't know how to get the output into the right format.
function doOneURLasOneLineString(url, callbackforOne) { http.get(url, function callback(response) { response.on("data", callbackforOne).setEncoding('utf8')}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetURLResponse(url, callback) {\n\n\n $.getJSON(url + \"&callback=?\", function(parsedJSON) {\n\n var outPutResults = \"\";\n outPutResults = parsedJSON.toString();\n\n results(outPutResults);\n\n })\n}", "function download_one(one, callback) {\n\tvar url = one.url;\n\tvar fna...
[ "0.6394054", "0.6265755", "0.60764253", "0.60364467", "0.60237014", "0.6018017", "0.60107416", "0.5978176", "0.59560734", "0.5951921", "0.5941667", "0.5930855", "0.5903251", "0.5902512", "0.58794963", "0.5866054", "0.58616227", "0.5844003", "0.5843235", "0.58148855", "0.58097...
0.6948301
0
returns a new object with all keys of objA & objB. objA & objB should not be mutated when calling this function. If objects objA & objB share keys, objB's key should take precedence over objA's.
function merge(objA, objB) { const newObject = {}; for (let key in objA ) { newObject[key] = objA[key]; } for (let j in objB) { newObject[j] = objB[j]; } // console.log(newObject); return newObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getShallowUnequalKeyValues(objA, objB, keys) {\n\t // default param values let null values pass through, so we have to take\n\t // this more thorough approach\n\t var definedObjA = objA == null ? {} : objA;\n\t var definedObjB = objB == null ? {} : objB;\n\t var filteredKeys = _filterKeys(d...
[ "0.7279413", "0.6896398", "0.6870134", "0.6754371", "0.67255527", "0.6718956", "0.6594925", "0.65845233", "0.6543232", "0.65138274", "0.65138274", "0.6496566", "0.64595026", "0.64316165", "0.6412187", "0.639406", "0.63548", "0.633746", "0.6310677", "0.6276898", "0.6259594", ...
0.70346546
1
check what last bracket was, to make sure it corresponds if it doesn't match type then we are unbalanced at end of loop, we need to check that stack is empty before we return true O(n) time | O(n) Space
function balancedBrackets(string) { // string of all of opening brackets, check if char is opening bracket const openingBrackets = '([{' // string of all closing brackets const closingBrackets = ')]}' // hash table that maps all closing brackets to all opening brackets const matchingBrackets =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check(stack){\n\n for(let i = 0; i<stack.length; i++){\n if(stack[i.length]>stack[i.length-1]){\n }\n \n return true;\n \n }\n\n \n\n\n\n\n}", "function parser2(exp){\n const stk = new Stack \n let positionN = null\n let positionC = null\n let posit...
[ "0.7508796", "0.7204975", "0.7202035", "0.7181683", "0.6975451", "0.6814553", "0.67858547", "0.67653126", "0.6745862", "0.67373747", "0.6727657", "0.6724338", "0.67187774", "0.67168534", "0.66673887", "0.6665317", "0.664407", "0.6585288", "0.6531942", "0.6514977", "0.64857036...
0.6557483
18
funcion para validar el dni de ususario
function validarForm() { // alert("Procedemos a la comprobacion de datos"); let dni = document.getElementById('dni').value; console.log(dni); let nombre = document.form1.nombre.value; console.log(nombre); let apellido = document.form1.apellido.value; console.log(apellido); let telefono = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarDNI() {\r\n var result = true;\r\n var dni = document.getElementById('nif');\r\n\r\n if (dni.value == '') {\r\n result = false;\r\n dni.className = 'error';\r\n dni.focus();\r\n document.getElementById('errores').innerHTML = 'el DNI no puede estar en blanco';\r\...
[ "0.7506925", "0.7197471", "0.7159134", "0.7138638", "0.70940447", "0.6653782", "0.638976", "0.6337259", "0.6288783", "0.6187212", "0.61797696", "0.60676336", "0.6034489", "0.6010852", "0.5951278", "0.59416044", "0.58656865", "0.58422923", "0.5826848", "0.5814122", "0.580662",...
0.5699899
27
simple data cleaning function, removing anything that's not a number for quant fields.
function isNumber(arrayItem) { return !isNaN(parseFloat(arrayItem)) && isFinite(arrayItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function priceClean(str){\n str = str.replace( /^\\D+/g, '');\n str = str.replace(/\\s/g, '');\n return str;\n}", "function cleanNumericValueForSaving(num) {\n if (num[0] == '(') {\n num = num.slice(1, num.length);\n }\n while (num.indexOf(',') != -1) {\n num = num.replace(',', '');\n }\n\n w...
[ "0.71438015", "0.7064229", "0.69204676", "0.6621973", "0.652822", "0.6361587", "0.6349341", "0.6305838", "0.6285063", "0.6212896", "0.62030303", "0.6186496", "0.6166471", "0.6127126", "0.61171234", "0.6101076", "0.6047333", "0.60421336", "0.6015633", "0.5993247", "0.59908795"...
0.0
-1
method to read an uploaded csv file. takes file and inserts it into csv parse method
function uploadDealcsv() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileUpload(f, cb) {\n if (f.type !== 'text/csv') {\n return ws.snackBar('The file is not a valid CSV file');\n }\n\n var reader = new FileReader();\n\n reader.onload = function(e) {\n clear();\n //events.emit('ClearSeriesForImport');\n loadCSV({ csv: e.target.result }...
[ "0.7338072", "0.73250276", "0.7159867", "0.7019359", "0.69987774", "0.6971879", "0.68941396", "0.6879007", "0.68549347", "0.68306994", "0.67689115", "0.67156917", "0.661096", "0.6574592", "0.6565861", "0.65523124", "0.65111434", "0.6493205", "0.6491973", "0.64483345", "0.6439...
0.6688683
12
method to determine if a field is quantitative or qualitative by looking at the second row of data.
function typeSeparate(masterObject) { // console.log(masterObject); let columnNames = masterObject.colNames; // console.log(columnNames); let reg = /^[a-zA-Z]/g; let colMap = masterObject.csvArray[1].map((col) => { let n = col.search(/[a-zA-Z]/i); let p = col.search(/[0-9]/i); if (n == -1 && col.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isField(field) {\n return isString(field) && !!this.config.fieldsToColumns[field];\n }", "isCompoundField() {\n\t\tif (this.role && this.type) {\n\t\t\tconst isObject = this.type === Type.OBJECT || this.baseType() === Type.OBJECT;\n\t\t\treturn isObject && this.role === ParamRole.COLUMN;\n\t\t}\n\t\treturn f...
[ "0.55681676", "0.5547703", "0.51839024", "0.51491565", "0.5064741", "0.5058148", "0.50312304", "0.5026614", "0.5024268", "0.4976581", "0.49708283", "0.4965839", "0.49353582", "0.49232897", "0.49117464", "0.489692", "0.48655194", "0.4859069", "0.48584554", "0.4848066", "0.4841...
0.0
-1
checks each field to see if it is quantitative. if it is, it creates a preliminary histogram with the help of d3
function histogramGenerate(obj) { console.log(obj) for (let i = 0; i < obj.colTypes.length; i++) { if (obj.colTypes[i] === 'quant') { console.log(`${i}th column is quantitative`); let tempArray = []; obj.csvArray.map((item) => { // console.log(item[i]) let n; if (item[i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typeSeparate(masterObject) {\n // console.log(masterObject);\n let columnNames = masterObject.colNames;\n // console.log(columnNames);\n let reg = /^[a-zA-Z]/g;\n let colMap = masterObject.csvArray[1].map((col) => {\n let n = col.search(/[a-zA-Z]/i);\n let p = col.search(/[0-9]/i);\n if (n =...
[ "0.5769182", "0.5510798", "0.5480876", "0.54671335", "0.5455959", "0.5394941", "0.5334264", "0.5309501", "0.5297814", "0.52413654", "0.52038723", "0.51881987", "0.5185722", "0.5179088", "0.51713973", "0.5168086", "0.51536375", "0.5136944", "0.5136783", "0.51348454", "0.513355...
0.66357166
0
function for bar graph of counts for qualitative data
function binSortForBar(obj, colNum) { // console.log(obj, colNum); let tempArray = []; obj.csvArray.map((item) => { if (item[colNum]) { tempArray.push(item[colNum]); } }) tempArray.shift(); //looping through our header-less array to determine how many different types of qual data there are ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numberOfBars(numTrials){\n //returns dataset with desired bars (4/8)\n}", "function barXFunc (d, i) { return (i * barwidth)+\"%\" ; }", "function showBarGraphNumBytes() {\n var margin = {top: 20, right: 20, bottom: 100, left: 100},\n width = 600 - margin.left - margin.right,\n height = 300 - ma...
[ "0.6795068", "0.6481606", "0.64810413", "0.626651", "0.6241164", "0.6226912", "0.62079686", "0.617567", "0.6158569", "0.61380404", "0.6130675", "0.60689414", "0.6067158", "0.6066416", "0.6065875", "0.60336584", "0.6032841", "0.6028669", "0.60177183", "0.60136676", "0.6010305"...
0.0
-1
function for generating exploratory scatterplots will need a mirror version for swapping x/y axes
function scatterPlot(obj) { console.log(obj); //preparing to add switch throughs, mirroring x/y axes: //starting with for loops, a more sophisticated approach may be to map, or to use recursion + counters for (let i = 0; i < obj.cleanQuantArrays.length - 1; i++) { for (let j = i + 1; j < obj.cleanQuant...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Draw_Scatterplot(data){\n xScale = d3.scaleLinear()\n .domain(getExtent(data, \"x\"))\n .range([0, contentWidth]);\n yScale = d3.scaleLinear()\n .domain(getExtent(data, \"y\"))\n .range([0, contentHeight]);\n Update_Tsne_node(data)\n}", "function showVisual(dataset, ...
[ "0.60069937", "0.5976267", "0.5875977", "0.5867753", "0.565754", "0.5621252", "0.55414575", "0.55363154", "0.5508744", "0.54634744", "0.54066044", "0.5393576", "0.5376856", "0.537172", "0.53660613", "0.5351515", "0.53496766", "0.53496766", "0.5337004", "0.53297806", "0.531271...
0.52803487
25
Loops through each file, processing each
function processFiles(resolve, reject, entry, files) { var procs = []; files.forEach(function forEachFile(file, indx) { procs.push(new promise(function (resolve, reject) { processFile(resolve, reject, entry, file); })); }); //wait for all the files to be processed and then resolv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleFiles(files) {\n [...files].forEach(this.__readAndHandleFile, this);\n }", "processFiles(files) {\n for (let file of files){\n file.processing = true; // Backwards compatibility\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING;\n this.emi...
[ "0.70687234", "0.64871275", "0.6427357", "0.6357622", "0.6336841", "0.63275856", "0.6302801", "0.62967646", "0.62487084", "0.6208561", "0.6201858", "0.61696637", "0.60831237", "0.60629946", "0.6015749", "0.60070086", "0.5961811", "0.59565806", "0.5946224", "0.59261155", "0.58...
0.588508
21
asseses a file's type, and converts if nonjs, then performs linting
function processFile(resolve, reject, entry, fileObj) { //get the annotations var data = fileObj.data , ans = annotation.getAll(data) ; //update the entry's fileTypes property if (entry.fileTypes.indexOf(fileObj.ext) === -1) { entry.fileTypes.push(fileObj.ext); } //remove the an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detect_file_type(file_name) {\r\n\t\tif (/\\.x?html?$/i.test(file_name)) {\r\n\t\t\treturn 'text';\r\n\t\t}\r\n\t\tif (/\\.css$/i.test(file_name)) {\r\n\t\t\treturn 'style';\r\n\t\t}\r\n\r\n\t\tvar main_type = library_namespace.main_MIME_type_of(file_name);\r\n\t\tif (main_type === 'text') {\r\n\t\t\tretu...
[ "0.6182884", "0.59617", "0.5944129", "0.5923065", "0.57513857", "0.5725219", "0.5694478", "0.56784874", "0.5674767", "0.5674767", "0.56002814", "0.55845016", "0.5584055", "0.5548115", "0.55449545", "0.55383503", "0.55346775", "0.5527265", "0.551381", "0.544457", "0.54251003",...
0.53802276
24
Performs linting on a file and resolves the results
function lintFile(data, fileObj, finish) { //run the linter promise type_javascript_linter(data) .then(function (results) { //add the results to the fileObj fileObj["lint"] = results; //run the junction callback finish(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lint() {\n return gulp.src(\n [\n srcRoot + \"**/*.js\"\n ]\n ).pipe(\n eslint()\n ).pipe(\n eslint.format()\n ).pipe(\n eslint.failAfterError()\n );\n }", "validateFile(filename) {\n const...
[ "0.6968074", "0.68321455", "0.62912095", "0.62132925", "0.6180103", "0.615792", "0.6104082", "0.60104525", "0.59387815", "0.5904827", "0.5858985", "0.5833167", "0.5784911", "0.5782597", "0.5772029", "0.57658523", "0.5702813", "0.56976557", "0.5691589", "0.5654821", "0.5558430...
0.7235373
0
rattacher div et images
function carousel() { //fonction onclick /*La variable image cilbe l'attribut src afin d'incorperer les images du carousel*/ var imageCarousselElt = document.getElementById('imagesCarousel').getAttribute('src'); //console.log(imageCarousselElt); switch (imageCarousselElt) { case 'images/space-invad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregaimgdeprendaldiv(imgenbase64,iddeldiv,iddelaprenda) // Primero llega a la funcion de abajo cargarpeliculasdelmesyanno\r\n\r\n {\r\n document.getElementById(iddeldiv).innerHTML += \"<img src='\"+imgenbase64+\"' height='42' width='42' id= \"+iddelaprenda+\" onclick='cargaprendas(\\\"\"+idde...
[ "0.58743364", "0.57324356", "0.5712907", "0.5653442", "0.55876577", "0.5587628", "0.5583869", "0.55719745", "0.55477214", "0.5538954", "0.55299014", "0.5507198", "0.5499996", "0.5499745", "0.5466111", "0.54375106", "0.54183125", "0.539077", "0.53880197", "0.5380325", "0.53752...
0.0
-1
Adds marker to map
function addNewMarker(e){ e.preventDefault(); var data = $(e.target).serialize(); var request = $.ajax({ type: 'POST', url: '/', data: data, dataType: 'json' }); request.done(function(data){ navigator.geolocation.getCurrentPosition(codeAddress); // Makes the new marker based on addr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addMarker(marker) {\n this._markers[marker.id] = marker;\n this._markerListDirty = true;\n }", "function addMarker(place){\r\n var coordinates = {\r\n lat: place.location.lat,\r\n lng: place.location.lng\r\n };\r\n\r\n self.marker = new google.maps.Marker({\r\n map:...
[ "0.7728235", "0.74410343", "0.7414508", "0.7400767", "0.73872066", "0.7385351", "0.7353224", "0.73496497", "0.7323511", "0.7313925", "0.73136777", "0.73136777", "0.7267117", "0.7266334", "0.7265437", "0.7247493", "0.72467345", "0.72435", "0.7219543", "0.7208817", "0.7203733",...
0.0
-1
Creates a initial map with marker location of current user
function createMapWithUserMarker(location){ var currentLocation = new google.maps.LatLng(location.coords.latitude, location.coords.longitude) var mapCanvas = document.getElementById('map-canvas'); var mapOptions = { center: currentLocation, zoom: 3, mapTypeId: google.maps.MapTypeId.ROADMAP } ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInitialMap() {\n // detect screen size\n let z = detectScreenWidth();\n // Map work by Nikita\n let center = [-36.8977931, 174.7854973];\n mymap = L.map('mapid').setView(center, z);\n // create actual map\n createMapPart(center);\n // run the function to detect users location\n mymap.locate...
[ "0.8037661", "0.77158487", "0.76442295", "0.7528152", "0.74490964", "0.73982555", "0.7397527", "0.73889774", "0.73810804", "0.7370101", "0.7357395", "0.73473734", "0.73413426", "0.7331414", "0.7322978", "0.731889", "0.73187804", "0.7318274", "0.7317335", "0.7314964", "0.72989...
0.76272446
3
Defines search form based on Places library, biases LatLong bounds
function setUpAutocompleteForm(){ var defaultBounds = new google.maps.LatLngBounds( new google.maps.LatLng(33.695441, -117.805632), new google.maps.LatLng(45.250434, -69.377900)); var options = { bounds: defaultBounds, types: ['(cities)'] }; var input = document.getElementById('address'); v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n // body...\n map = new google.maps.Map(document.getElementById('map'),{\n center: egypt,\n zoom: 15,\n mapTypeId: google.maps.MapTypeId.ROADMAP \n });\n\n var request = {\n location: egypt,\n radius: 1000,\n types: ['restaurant']...
[ "0.73709023", "0.7220117", "0.7210366", "0.7206443", "0.71796614", "0.71717966", "0.7169379", "0.7139448", "0.706977", "0.70613885", "0.7047062", "0.7044853", "0.69964033", "0.6889661", "0.6886504", "0.6879005", "0.6875965", "0.6855833", "0.6827867", "0.68154484", "0.68053323...
0.62512964
100
gets all locations from server
function populateLocations() { var request = $.ajax({ type: 'GET', url: '/locations' }); request.done(function(data){ console.log("we in the for loop populateLocations") console.log(data) for (var i = 0; i < data.length; i++) { console.log("in da for loop") addMarkerFromDataba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static list() {\n return api_base_1.default.request('locations/').then((locations) => {\n return locations.data.map(each => new Location_1.default(each));\n });\n }", "function getLocations() {\n return $http.get('location.json')\n .then(successFn, errorFn);\...
[ "0.76305616", "0.73966926", "0.7327118", "0.7326489", "0.72722167", "0.72274214", "0.701054", "0.6859208", "0.68295497", "0.6764145", "0.6751557", "0.67425674", "0.66328484", "0.6630882", "0.65838075", "0.6577562", "0.6577562", "0.65658724", "0.6560269", "0.6556356", "0.65494...
0.0
-1
Ophalen en verversen van gegevens uit de database
function updateCycle(){ $.ajax({ url: '../../simulation/update.php', data: {data: serverStatus}, type: "POST", success: function(result){ doorStatus = result; } }); $(".sim-deur-status").text(doorStatus); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function majNiveaux() {\n // on ouvre la base, et on déclare les listeners\n var request = indexedDB.open(\"spacelash2\", 1);\n request.onerror = errorOpen;\n request.onupgradeneeded = createDatabase;\n\n request.onsuccess = function(event) {\n var db = event.target.result;\n\n // on o...
[ "0.62453014", "0.58863133", "0.5832325", "0.5736833", "0.5644531", "0.5607172", "0.55727047", "0.5520471", "0.55078745", "0.54587626", "0.5450796", "0.54457796", "0.54398376", "0.54390603", "0.54139125", "0.5413364", "0.5412882", "0.53981644", "0.5385075", "0.5378589", "0.536...
0.0
-1
Updaten van de server status tekst
function updateServerLabel(){ if(serverStatus[0]){ $(".sim-server-status-1").text("Status: Online"); }else{ $(".sim-server-status-1").text("Status: Offline"); } if(serverStatus[1]){ $(".sim-server-status-2").text("Status: Online"); }else{ $(".sim-server-status-2").te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateServerStatus(status, info) {\n\n\t\tif (status) {\n\n\t\t\tdocument.querySelector('#ojd-server-status').classList.remove('ojd-status-bad');\n\t\t\tdocument.querySelector('#ojd-server-status').classList.add('ojd-status-good');\n\t\t\tdocument.querySelector('#ojd-server-status .ojd-indicator-text').in...
[ "0.6969841", "0.6852442", "0.6810783", "0.6791903", "0.6684815", "0.6641175", "0.6586885", "0.65492946", "0.6509334", "0.6481491", "0.6462284", "0.63923496", "0.6369377", "0.63660145", "0.63637555", "0.63245076", "0.63141346", "0.6311129", "0.6283232", "0.6267982", "0.6263042...
0.6215575
23
Het opslaan van de deur status in de database
function setDeur(status){ $.ajax({ url: '../../simulation/setDeur.php', data: {data: status}, type: "POST" }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUpdateStatus(e) {\n let obj = e.target,\n id = obj.dataset.pk\n ;\n\n MakeRequest({\n method: 'put',\n url: 'actividad/put/' + id,\n data : JSON.stringify({ estado : obj.checked ? 1 : 0 })\n }).then(response => {\n if (response =...
[ "0.6583636", "0.649198", "0.64393365", "0.6425664", "0.6413399", "0.63350385", "0.63221353", "0.63151777", "0.62721896", "0.61327577", "0.6085841", "0.6078714", "0.6070155", "0.6045789", "0.6045789", "0.6045789", "0.6045789", "0.6045789", "0.6045789", "0.6045789", "0.6045789"...
0.0
-1
Subtracted from end position. Max y value = .75
function ApplyDammage (TheDammage : int) { Health -= TheDammage; if (Health <=maxHealth) { renderer.material.color=Color.blue; } if (Health <=(maxHealth*.8)) { renderer.material.color=Color.cyan; } if (Health <=(maxHealth*.6)) { renderer.material.color=Color.green; } if (Health <=(maxHealth*.4)) { r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get adjustedY() { return this.y - this.originY }", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-1].p2.w.y; }", "function getFinalY() {\n\t\treturn Math.abs(this.finalY - this.originY);\n\t}", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-...
[ "0.6901789", "0.6859573", "0.66267073", "0.64992476", "0.632986", "0.62466806", "0.62091756", "0.61612606", "0.61024964", "0.610098", "0.6085039", "0.60116595", "0.5999852", "0.59911424", "0.598556", "0.595978", "0.5936895", "0.5930415", "0.5914528", "0.59062696", "0.5903067"...
0.0
-1
some tweaks for smaller windowa
function checkSize() { if ($(".navbar-toggle").css("display") == "block") { //Cart Tab tweaks $('.cart-parent').wrapInner('<span></span>');     } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizedw(){\n\t\n}", "function win() {\n \"use strict\";\n // gridul si bara de stiri isi schimba dimensiunea daca fereastra este mai mica de 1320px.textul in bara\n //de stiri se modifica la redimensionare\n if ($(window).width() >= 1320) {\n\n $(\".grid\").css(\"width\", \"1320px\")...
[ "0.693954", "0.68727285", "0.66858554", "0.6653337", "0.6568905", "0.65611666", "0.6553328", "0.65317774", "0.6528443", "0.6523486", "0.65083444", "0.65077853", "0.6505004", "0.6488854", "0.6488854", "0.6488854", "0.64668745", "0.6452027", "0.64275825", "0.6426498", "0.641524...
0.0
-1
Consider the following object:
function Thing() { this._thing = ''; this.print = function() { console.log(this._thing); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obj(objec){\nreturn objec;\n}", "function Object() {}", "function Object() {}", "function Obj() {}", "function NXObject() {}", "get object() {\n\n }", "function obj() { return this; }", "function Object(){}", "function Object(){}", "objd(obj) {\n\n return toObject(obj);\n }", ...
[ "0.66912264", "0.6451986", "0.6451986", "0.6420693", "0.6317516", "0.62842244", "0.62428874", "0.62350225", "0.62350225", "0.6207038", "0.6202252", "0.61777306", "0.61112595", "0.60987127", "0.60478073", "0.6016157", "0.5996029", "0.59690213", "0.59541744", "0.5953222", "0.58...
0.0
-1
"this" is a keyworded object that contains values which are both specific to the scope of its declaration, AND the execution of its parent. While there is only ever 1 this object, it does not get created or destroyed in the traditional sense; only the inner data does. This data however, can persist if we pass it around...
function whatsThis(this) { console.log('This is the window!'); return JSON.stringify(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contextOfThis(){\n return this\n}", "function doSomethingElse() {\n console.log(this, 'normal function, this has its own context here');\n console.log(self, 'normal function with a workaround to use this storing it in a variable called self');\n }", "function functionTh...
[ "0.6703184", "0.6144191", "0.6049003", "0.6021045", "0.5950627", "0.58854675", "0.5853159", "0.58450174", "0.5834992", "0.58338696", "0.5832205", "0.58298767", "0.58289695", "0.5825634", "0.5824494", "0.5814644", "0.5801913", "0.57752395", "0.5758985", "0.5751817", "0.5751817...
0.0
-1
What!?! Well then how the heck did we use it last time!! It's subtle, but the this object isn't actually something we can reference normally. However, we can reference the parameters we've previously defined, or those we expect to be there in the parent scope. Closures!
function Name() { // Closures use inner functions to force the execution window to persist, even after the main function has returned! // This means that the "name" variable persists even after the function has finished executing! Holy crap! var name = ''; // If we return an object from the function, w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function someFunc(param) {\n console.log(\"param:\", param)\n console.log(\"this:\", this)\n}", "function getThisGuyRightHere() {\n return {\n callExpression: callExpressionNode,\n node: findInjectedArgument(callExpressionNode),\n scope: context.getScope(),\n };\n }", "funct...
[ "0.65025777", "0.6442416", "0.61393714", "0.6094905", "0.6037986", "0.6014754", "0.6001251", "0.59933054", "0.58636355", "0.5806419", "0.578247", "0.5776646", "0.5751905", "0.5718216", "0.5710103", "0.5710103", "0.57003903", "0.56987536", "0.5687603", "0.5679586", "0.5669518"...
0.0
-1
this directive can only be used as an attribute (A), other options are class(C), element(E), comment(M)
link(scope, element, attributes, ngModel) { // execute this, access to ngModel and do something to it // check validation ngModel.$validators.match = function (modelValue) { // modelValue = thing in this field // console.log(modelValue, scope.otherField); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AttributeDecorator() { }", "function AttributeDecorator() { }", "function attributeWithoutValue(className){return['$mdUtil','$interpolate',\"$log\",function(_$mdUtil_,_$interpolate_,_$log_){$mdUtil=_$mdUtil_;$interpolate=_$interpolate_;$log=_$log_;return{restrict:'A',compile:function compile(element,a...
[ "0.63721734", "0.63721734", "0.63020563", "0.623563", "0.6117753", "0.6117753", "0.6112075", "0.6052923", "0.6005651", "0.59951144", "0.59887284", "0.59731984", "0.59232944", "0.59232944", "0.59232944", "0.59232944", "0.58895504", "0.58415025", "0.5817297", "0.58124477", "0.5...
0.0
-1
addEventListener support for IE8
function bindEvent(element, eventName, eventHandler) { if (element.addEventListener) { element.addEventListener(eventName, eventHandler, false); } else if (element.attachEvent) { element.attachEvent("on" + eventName, eventHandler); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lstn(o, t, f)\r\n{\r\n if (o.addEventListener) {\r\n // Because MSIE only has a bubbling phase, capture will always be false.\r\n o.addEventListener(t, f, false);\r\n return true;\r\n } else if (o.attachEvent){\r\n return o.attachEvent(\"on\" + t, f);\r\n }\r\n return false;\r\n}", "func...
[ "0.71274567", "0.7073508", "0.700226", "0.6843906", "0.68175477", "0.67562616", "0.6682874", "0.6629685", "0.6614326", "0.6610981", "0.661086", "0.6591254", "0.6557177", "0.6543855", "0.65189236", "0.6471816", "0.6471816", "0.6466234", "0.6464598", "0.6449186", "0.64407414", ...
0.0
-1
Sends object to server via POST request
function postObj(path, obj, responseCallback = null) { let xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => { if (xhr.readyState == 4 && xhr.status == 200) { if (responseCallback !== null) responseCallback(xhr); } }; xhr.open("POST", path, true); xhr.setRequestH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_post (urlPath, obj, portalOpts) {\n const options = {\n method: 'POST',\n data: obj\n };\n return this.request(urlPath, options, portalOpts);\n }", "send() {\n var instance = this;\n var data = instance.toServerObject();\n $.ajax({\n type: \"POST\",\n ...
[ "0.694854", "0.6554959", "0.6527018", "0.65104645", "0.64442754", "0.64370143", "0.6418177", "0.63512784", "0.63268316", "0.63132584", "0.6273447", "0.6224629", "0.62216526", "0.62174284", "0.61591583", "0.6144681", "0.6137106", "0.61094487", "0.6021429", "0.6005348", "0.6000...
0.6515583
3
Sends text request to server via POST request
function postReq(path, textReq, responseCallback = null) { let xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => { if (xhr.readyState == 4 && xhr.status == 200) { if (responseCallback !== null) responseCallback(xhr); } }; xhr.open("POST", path, true); xhr.send(te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendRequest(text, context) {\n // Build request payload\n var payloadToWatson = {};\n if (text) {\n payloadToWatson.input = {\n text: text\n };\n }\n if (context) {\n payloadToWatson.context = context;\n }\n\n // Built http request\n var http = new XMLHttpRequ...
[ "0.67963624", "0.67902386", "0.6773011", "0.6685615", "0.6566787", "0.6561243", "0.6452982", "0.64036673", "0.6345258", "0.6291422", "0.62730736", "0.6266071", "0.62454396", "0.6224432", "0.6219143", "0.6219143", "0.61826444", "0.6119901", "0.6053349", "0.6053251", "0.6038465...
0.67354405
3
Sends text request to server via GET request
function getReq(path, responseCallback = null) { let xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => { if (xhr.readyState == 4 && xhr.status == 200) { if (responseCallback !== null) responseCallback(xhr); } }; xhr.open("GET", path, true); xhr.send(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function http_get(req_url){\n request.get(\n bal_query,\n function(error, response, body) {\n console.log(\"Clickatell GET:\")\n node.send(\"Clickatell GET:\");\...
[ "0.6609755", "0.64338917", "0.64338917", "0.61725855", "0.60620505", "0.6057109", "0.602382", "0.6016275", "0.5972942", "0.5866391", "0.5863765", "0.5849668", "0.58295524", "0.5820599", "0.58040816", "0.57979566", "0.5763103", "0.57588875", "0.5754414", "0.57541394", "0.57428...
0.0
-1
Send a message to the child iframe
function sendMessage(msg, dest = "*") { // Make sure you are sending a string, and to stringify JSON iframeEl.contentWindow.postMessage(msg, dest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send(message) {\n iframe.contentWindow.postMessage(JSON.stringify(message), identityOrigin);\n }", "function sendMessages(){\n var message = {\n action: \"ivalid\",\n data: \"data\"\n }\n\n //postMessage is a function defined on the window object of an iframe\n let ...
[ "0.75105894", "0.7475883", "0.71864986", "0.7048848", "0.684932", "0.67617863", "0.6749488", "0.67136085", "0.6558323", "0.6411426", "0.6401999", "0.6385664", "0.6383416", "0.63569736", "0.6348282", "0.6278983", "0.6265543", "0.6247943", "0.6231001", "0.62224853", "0.6216456"...
0.71856654
3
write message to page
function writeToPage(msg) { results.innerHTML = msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printToPage(msg) {\n\t\tif(document.getElementById(\"message\") != null){\n\t\t\tdocument.getElementById(\"message\").innerHTML = msg;\n\t\t}\n\t\telse{\n\t\tvar message = \"<p id=\\\"message\\\">\" + msg + \"<\\p>\";\n\t\t$(\"#result\").append(message);\n\t\t}\n\t}", "function writeMessage(message) {\n...
[ "0.7275484", "0.67013484", "0.66258514", "0.65946376", "0.6590907", "0.65269995", "0.6504604", "0.65041864", "0.64863914", "0.64572704", "0.64441484", "0.6443956", "0.642997", "0.63790095", "0.63298357", "0.6307156", "0.6297376", "0.6269001", "0.6247377", "0.62394834", "0.622...
0.78567326
0
Service created lifecycle event handler
created() { this.api = create({ baseURL: this.settings.url }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "created() {\n this.onCreatedHandler();\n }", "initService() {\n\t\tthis.settings = new ServiceSettings();\n\t\tthis.service = new Service({\n\t\t\tonDisconnect: (hadError) => {\n\t\t\t\tthis.stopCancellableQueues(!!hadError, !!hadError);\n\t\t\t}\n\t\t});\n\t}", "constructor() { \n \n ...
[ "0.68104994", "0.62169826", "0.6168721", "0.6160913", "0.6160913", "0.6120587", "0.6102565", "0.60706156", "0.60706156", "0.60693103", "0.60516995", "0.6039917", "0.59990174", "0.5970325", "0.59458774", "0.59178203", "0.58980954", "0.5827469", "0.58196217", "0.57974803", "0.5...
0.0
-1
Service started lifecycle event handler
started() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startService() {\n $log.log(TAG + 'starting');\n running = true;\n }", "started() {\n\n }", "started() {\n\n }", "started() {\n\n }", "function startService() {\n $log.log(TAG + 'starting.');\n running = true;\n }", "preStart() {\n }", "started() {\r\n\r\n...
[ "0.6499744", "0.6481714", "0.6481714", "0.6481714", "0.6466969", "0.64300233", "0.6360081", "0.63329774", "0.6273166", "0.6265744", "0.6257828", "0.6257828", "0.6257828", "0.6257828", "0.6257828", "0.6257828", "0.6257828", "0.6257828", "0.62467164", "0.62467164", "0.62467164"...
0.61457056
44
Service stopped lifecycle event handler
stopped() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stopped() {\n\n }", "stopped() {\n\n }", "stopped() {\n\n }", "stopped () {\n\n }", "stopped () {\n\n }", "stopped () {\n\n }", "stopped() {\r\n\r\n\t}", "stopped() { }", "destroy() {\n logger.log({level: 'info', type: 'service', message: 'Destroying Service'});\n this.end = true;...
[ "0.7112766", "0.7112766", "0.7112766", "0.7092005", "0.7092005", "0.7092005", "0.69909805", "0.6959387", "0.6932032", "0.6929068", "0.6929068", "0.6929068", "0.6929068", "0.6929068", "0.6915478", "0.69113386", "0.69113386", "0.69113386", "0.69113386", "0.69113386", "0.6911338...
0.67638737
48
Populates a div with a current member's photo and modal displaying their biography. Assumes ZURB Foundation grid elements (row, columns).
function populateMemberGrid(gridId, memberXmlPath) { var $grid = $('#' + gridId); var gridObjects = []; var modalObjects = []; $.ajax({ url: memberXmlPath, dataType: 'xml', success: function(data) { $(data).find("member").each(function() { // build member object var $member = buildMemberObject($(t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateInfoContainer (firstName,lastName,picture,email,city,phone,street,zipcode,dob,state){\n $('.modal-info-container')\n .empty()\n .append(`<img class=\"modal-img\" src=\"${picture}\" alt=\"profile picture\">`)\n .append(`<h3 id=\"name\" class=\"modal-name cap\">${firstName} ${lastName}...
[ "0.66995996", "0.662816", "0.6362041", "0.6359437", "0.6305357", "0.62876916", "0.62724274", "0.62672", "0.62618583", "0.6241879", "0.62211907", "0.61693984", "0.61680686", "0.61112714", "0.6107875", "0.6105526", "0.60941035", "0.60936916", "0.6080429", "0.60802215", "0.60785...
0.0
-1
Creates an HTML modal object and returns it, given the member's information. ================================================ Member's Photo Member's Name, Member's Grad Year Member's Voice Part Member's Hometown Member's Major Member's Bio Member's Solos
function makeMemberModal(modalId, member) { // instantiate modal var $modal = $('<div/>').attr({ id: modalId, 'class': 'reveal-modal', 'data-reveal': '' }); // insert member titles $modal.append($('<img/>').addClass('memberPhoto').attr('src', member.photo)); $modal.append($('<h4/>').addClass('name').html(me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeModalInfo() {\n const modalInfo = $('<div>').addClass('modal-info-container');\n const modalImage = $('<img>').addClass('modal-img')\n .attr('src', this.picture)\n .attr('alt', 'profile picture');\n const modalH3 = $('<h3>').addClass('mod...
[ "0.7581149", "0.6845122", "0.67452115", "0.6582994", "0.6576648", "0.65744686", "0.6568689", "0.65136355", "0.6506931", "0.6502977", "0.649405", "0.6476971", "0.6447318", "0.64277726", "0.64249843", "0.64160776", "0.64139783", "0.63908", "0.6372755", "0.63580084", "0.63569707...
0.76737416
0
end of $(function); recipt
function carReceipt(){ carBuyer={"Name":localStorage.fName+" "+localStorage.lName,"ID":localStorage.id,"Email":localStorage.eMail,"Car":$(":selected").val(),"Car Number":theCar,"Km":km,"Cost":cost}; onerInfo=""; for(var key in carBuyer){ onerInfo+="<tr><td>"+key+"</td><td>"+carBuyer[key]+"</td></tr>"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateJQuery($) {\n if (!$ || ($ && $.bridget)) {\n return;\n }\n $.bridget = jQueryBridget;\n }", "function updateJQuery($) {\n if (!$ || ($ && $.bridget)) {\n return;\n }\n $.bridget = jQueryBridget;\n }", "function scriptLoadHandler() {\n\...
[ "0.5724318", "0.56627935", "0.5600697", "0.5592054", "0.55894977", "0.5582296", "0.5576607", "0.55516195", "0.5547896", "0.55475295", "0.5542611", "0.5542537", "0.5542537", "0.5542537", "0.5542537", "0.5531679", "0.55020815", "0.55020815", "0.54869175", "0.5483166", "0.546244...
0.0
-1
end of recipt car back
function carBack(){ var available ; var carSrc; var carNum; var theTable=""; var x= carArray(); // wicth cell in the car[x] Array; if(x!==""){ available=car[x].available; carSrc = car[x].imgSrc; carNum=car[x].carNum; } var carBackInfo={"car":$(":selected").val(),"carNum":carNum,"carSrc":carSr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "end() { }", "Rewind() {}", "function endConv(){\n\n }", "end() {\n }", "end() {\n }", "mateEnd() {}", "_onEnd() {}", "get end() {}", "function end(){\n return end;\n}", "set end(value) {}", "async end() {\n return;\n }", "_complete() {\n this._resetCurrent(true);\n\n ...
[ "0.63369423", "0.6258701", "0.6198271", "0.6171614", "0.6171614", "0.6102238", "0.6070324", "0.59487", "0.59366065", "0.59310424", "0.5923307", "0.58669645", "0.5837556", "0.5826809", "0.5826809", "0.5826809", "0.5826809", "0.58009046", "0.57967335", "0.57896477", "0.5765554"...
0.0
-1
end car back wicth car you selecet!!
function carArray(){ for(var i=0; i<car.length ;i++){ if (car[i].carName==$(":selected").val() ){ return i; }else{ return ""; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comportement (){\n\t }", "function escreveConteudo(){}", "function wa(){}", "function iniciar() {\n \n }", "function main()\r\n\t{\r\n\t\tif ($(\"font[color*='#007700']\").length>0)\r\n\t\t{\r\n\t\t\tvar captchars = $(\"img[src*='cap_']\");\r\n\t\t\tvar capText='';\r\n\t\t\t$(\"img...
[ "0.5953153", "0.57534003", "0.5725935", "0.56484807", "0.5529016", "0.54652596", "0.5442244", "0.543125", "0.53974205", "0.5360624", "0.53477573", "0.53446275", "0.5332663", "0.5320048", "0.5296303", "0.5288156", "0.52723455", "0.52663136", "0.52580136", "0.5257738", "0.52435...
0.0
-1
reciveTheCar back to aviable to true
function reciveTheCar(){ var i=carArray(); if(i!==""){ car[i].aviable=true; localStorage.clear(); alert("working"); $( "#popUpDivReciveCar" ).popup( "open" ); //$(":mobile-pagecontainer").pagecontainer("change", "#home");‏ setTimeout(function(){$.mobile.changePage('#home', {transition: 'pop'})},2000); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkCostume(car) {\n this.requirements.newCostume.bool = (car.currentCostumeIndex != 2)\n }", "function checkCarState(){\r\n if (carState == true){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "drive () {\n\t\tif (this.driver.age >= 16)\n\t\t\tthis._car.drive();\n\t\telse\n\...
[ "0.6967334", "0.6552914", "0.6402253", "0.62903166", "0.6081413", "0.60582864", "0.60198855", "0.5950857", "0.5887845", "0.5855767", "0.5778213", "0.5738443", "0.5702289", "0.5598165", "0.5590822", "0.5587549", "0.5587522", "0.5571013", "0.5529409", "0.551625", "0.5500896", ...
0.5120985
71
end of car selecting local storage
function save(){ var y =$(this).attr("id"); var g= JSON.stringify(y); localStorage.setItem(y, $(this).val()); // localStorage.setItem("lastname", "Smith"); localStorage.getItem("lastname"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSelection()\n{\n\tlocalStorage.setItem(\"chosenFlag\" , flagIndex)\n\tlocalStorage.setItem(\"chosenCarbody\" , carbodyIndex);\n\tlocalStorage.setItem(\"chosenColour\", colourIndex);\n\tlocalStorage.setItem(\"chosenWheel\" , wheelIndex);\n}", "function saveSelection()\r\n{\r\n\tlocalStorage.setItem(\...
[ "0.6519383", "0.6175296", "0.617474", "0.60022575", "0.59192175", "0.58761185", "0.58340746", "0.5833063", "0.58196044", "0.5809958", "0.58037746", "0.58029264", "0.5794411", "0.57918847", "0.57745755", "0.57661", "0.5761246", "0.57566035", "0.5751564", "0.57199645", "0.57198...
0.0
-1
end local storage validation
function validForm(event){ var cellphoneFlag=false, homeFlag=false; var cell=$cellphone.val(); var home=$homeNum.val(); if( (cell==null || cell=="") && (home==null || cell=="") ){ $( "#popUpDiv" ).popup( "open" ); return false; }else{ $.ajax({ type: "POST", url: "su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateLocalData(data) {\n return true;\n }", "function check_local_storage() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API\n try {\n var x = '__storage_test__';\n localStorage.setItem(x, x);\n localStorage.removeItem(x);\n return true;...
[ "0.66321915", "0.6585436", "0.6570179", "0.6512296", "0.6496299", "0.6486117", "0.64588624", "0.6432741", "0.64031833", "0.6400917", "0.63809234", "0.6372299", "0.6369743", "0.63542217", "0.63522846", "0.6348598", "0.63379985", "0.6284249", "0.62638897", "0.62536454", "0.6226...
0.0
-1
validate start recording messages
function validate (p) { if (p.type === 'start-recording') if (typeof p.duration === 'number') return true return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validationBegins()\n {\n if (validationInProgress)\n throw new Error(\"Internal error: Validation is already in progress\");\n\n validationInProgress = true;\n }", "function startRec(){\n\t$('#message').val(\"\");\n\t$(\"#startRecord\").attr(\"disabled\",true);\n\t$(\"#sto...
[ "0.6046201", "0.59119296", "0.58906657", "0.58874536", "0.5741941", "0.5644159", "0.5610418", "0.55539703", "0.5508649", "0.55020887", "0.54744", "0.54665905", "0.54564655", "0.53927106", "0.53622293", "0.53581953", "0.5354032", "0.5353725", "0.5336909", "0.5332736", "0.53246...
0.6536306
0
get startrecording messages adds stuff to ongoingRecordings
function handlePost (sampleRate) { // returns post handler function (p) { } return function (p) { if (validate(p)) { if (opts.debug) console.log('got start-recording message!', JSON.stringify(p)) let filename = `${p.sid}.${p.tag}.${Date.now()}.csv` let path = join(opts.o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onRecordingStarted() {\n this.set('recordingStarted', true);\n }", "function startRecord(){\n if(!isRecording){\n rec.record();\n isRecording = true;\n }\n}", "function startListening(){\n\trecord();\n}", "function startRecording() {\n recorder.record();\n}", "onSessionRecord...
[ "0.6700047", "0.6605217", "0.6348853", "0.6313395", "0.6302876", "0.62992465", "0.6211129", "0.6126928", "0.6102495", "0.5984047", "0.5937758", "0.5893853", "0.5871142", "0.5838898", "0.582282", "0.58146083", "0.57416403", "0.5726747", "0.5625774", "0.56056", "0.5604499", "...
0.0
-1
here vec4 are used to avoid circular dependency (Only 'constuctor' and 'set' methods are used)
function copySign(a, b) { return b < 0 ? -Math.abs(a) : Math.abs(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() // etc) smaller and more cache friendly.\r\n { super( \"positions\", \"normals\", \"texture_coords\" ); // Name the values we'll define per each vertex.\r\n this.positions .push( ...Vec.cast( [-1,-1,0], [1,-1,0], [-1,1,0], [1,1,0] ...
[ "0.7083818", "0.70529866", "0.7039522", "0.70253205", "0.69769984", "0.68589133", "0.68044615", "0.6761904", "0.67553335", "0.6737572", "0.67230767", "0.669343", "0.6668082", "0.66304564", "0.6536098", "0.6524227", "0.6514451", "0.6504376", "0.6499688", "0.64986414", "0.64613...
0.0
-1
Checks the utils have been initialized.
function checkInit() { if (glEnums == null) { throw 'WebGLDebugUtils.init(ctx) not called'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkInitialized() {\n\t\t\tif (!isInitialized) {\n\t\t\t\tthrow 'You need to call `screenLog.init()` first.';\n\t\t\t}\n\t\t}", "function InitializeUtility() {\n\tvar tInitOk = true;\n\t// FIXME: Make a better initialized test later\n\tDebugInitialize();\n\n\ttInitOk = EnvManagerInitialize();\n\n\tInit...
[ "0.7317129", "0.7098219", "0.66580665", "0.66580665", "0.64958304", "0.6476148", "0.6270847", "0.62442464", "0.6226077", "0.6173672", "0.6162321", "0.60520554", "0.6044789", "0.6004956", "0.5934385", "0.590811", "0.5900689", "0.58973855", "0.588215", "0.5844571", "0.58215785"...
0.67265993
2
Makes a function that calls a function on another object.
function makeFunctionWrapper(original, functionName) { //log("wrap fn: " + functionName); var f = original[functionName]; return function() { //log("call: " + functionName); var result = f.apply(original, arguments); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function objectchanger (fnc, obj) {\r\n\t// I call the function in the object, to modify its value\r\n\treturn fnc.call(obj);\r\n} // objectchanger", "function callFunction(obj) {\n if (typeof obj == \"function\") {\n obj.call();\n }\n }", "function demothodize(f) {\n return function(x, y)...
[ "0.6558173", "0.6308104", "0.63020134", "0.60364", "0.598852", "0.57998013", "0.5753741", "0.57470393", "0.57447517", "0.5691585", "0.5682428", "0.5672952", "0.5622537", "0.56052864", "0.55982345", "0.5582322", "0.5555122", "0.5555122", "0.5555122", "0.5555122", "0.5555122", ...
0.0
-1
Makes a function that simulates WebGL when out of context.
function makeLostContextFunctionWrapper(ctx, functionName) { var f = ctx[functionName]; return function() { // log("calling:" + functionName); // Only call the functions if the context is not lost. loseContex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cleanupWebGL() {}", "handleWebGLContextRestored() {\n }", "handleWebGLContextLost() {\n ol.obj.clear(this.bufferCache_);\n ol.obj.clear(this.shaderCache_);\n ol.obj.clear(this.programCache_);\n this.currentProgram_ = null;\n }", "function onContextLost(event)\n {\n event.preventDefaul...
[ "0.71436775", "0.6674779", "0.6513883", "0.64104795", "0.63905406", "0.63833356", "0.6359314", "0.6286318", "0.62786007", "0.62774956", "0.62618726", "0.6237458", "0.6237458", "0.6223418", "0.6122143", "0.6090727", "0.60476255", "0.60472363", "0.6042742", "0.6024915", "0.6008...
0.6275717
10
Database URL. Change this to restaurants.json file location on your server.
static get DATABASE_URL() { const port = 1337 // Change this to your server port return `http://localhost:${port}/restaurants`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get DATABASE_URL() {\r\n\t\tconst port = 8000; // Change this to your server port\r\n\t\treturn `http://localhost:${port}/data/restaurants.json`;\r\n\t}", "static get DATABASE_URL () {\r\n const port = 1337 // Change this to your server port\r\n return `http://localhost:${port}/data/restaurants.json...
[ "0.84923065", "0.84130734", "0.84049183", "0.8402741", "0.82732916", "0.8135573", "0.8112575", "0.8041077", "0.79351616", "0.7848779", "0.77804327", "0.7625075", "0.75526065", "0.7548682", "0.7548682", "0.75460887", "0.75303555", "0.7517311", "0.74211156", "0.7408399", "0.732...
0.75542194
16
Fetch all restaurants using Fetch API
static fetchRestaurants(callback) { idbPromise.then(db => { const tx = db.transaction('restaurant-store', 'readwrite'); tx.objectStore('restaurant-store').getAll().then(restaurantsFromDb => { if (restaurantsFromDb.length > 0) { return callback(null, restaurantsFromDb); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fetchRestaurants() {\r\n return fetch(DBHelper.DATABASE_URL)\r\n .then( response => {\r\n if (response.ok){\r\n return response.json();\r\n }\r\n }).catch(function(err){\r\n console.log('Fetch error', err);\r\n });\r\n }", "fetchRestaurants() {\n return this._updateFr...
[ "0.81888163", "0.7902799", "0.77704287", "0.76916605", "0.7647066", "0.76094", "0.7532838", "0.7483338", "0.7437478", "0.7337936", "0.72989696", "0.723425", "0.7219135", "0.7193335", "0.7169805", "0.71391064", "0.71160364", "0.7022634", "0.698118", "0.69478714", "0.6923686", ...
0.68275785
23
Fetch a restaurant by its ID.
static fetchRestaurantById(id, callback) { // fetch all restaurants with proper error handling. DBHelper.fetchRestaurants((error, restaurants) => { if (error) { callback(error, null); } else { const restaurant = restaurants.find(r => r.id == id); if (restaurant) { // G...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fetchRestaurantById(id) {\r\n // fetch all restaurants with proper error handling.\r\n return fetch(DBHelper.DATABASE_URL_ID(id))\r\n .then( response => {\r\n if (response.ok){\r\n return response.json();\r\n }\r\n }).catch(function(err){\r\n console.log('Fetch error', err)...
[ "0.8452753", "0.84212226", "0.8360339", "0.82336164", "0.82127", "0.80327094", "0.78300273", "0.7825595", "0.77980983", "0.7770592", "0.7770082", "0.77020645", "0.76998043", "0.76956695", "0.75832427", "0.75832427", "0.75832427", "0.75832427", "0.75832427", "0.75750667", "0.7...
0.7529001
35