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
declare and define functions
function removeTodo(e) { if (e.target.parentElement.classList.contains('delete-item')) { e.target.parentElement.parentElement.classList.add('fadeOut'); setTimeout(() => { e.target.parentElement.parentElement.remove() }, 990); e.stopPropagation(); } else if (e.target.tagName = 'li') { e.target.cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Func_s() {\n}", "function FunctionUtils() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "defineFn(name, words) {this.fnDefs[name] = words;}", "function funcionPorDefinicion(){\n //Body\n }", "function miFuncion (){}", "function miFuncion(){\n\...
[ "0.68294686", "0.6810166", "0.67522496", "0.67522496", "0.67522496", "0.6743535", "0.6648959", "0.66203225", "0.6489276", "0.63752633", "0.6362536", "0.6330183", "0.6318002", "0.6304405", "0.6297787", "0.6279943", "0.62477136", "0.6216903", "0.61897624", "0.6152347", "0.61447...
0.0
-1
method to sort elements in increasing order
function sort() { elementArray.sort(function (x, y) { return x.elem - y.elem; }); render(elementArray); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sort() {}", "sort() {\n for (let i = 0; i < this.values.length - 1; i++) {\n let min = i;\n for (let j = i + 1; j < this.values.length; j++) {\n if (this.values[j] < this.values[min]) min = j;\n }\n\n this.swap(i, min);\n }\n }", "function inssort2(A) {\n var temp;\n...
[ "0.7060759", "0.6896462", "0.68567777", "0.6790868", "0.6756659", "0.67541265", "0.67541265", "0.67174035", "0.66584164", "0.6652928", "0.6579025", "0.6575241", "0.6563861", "0.6518153", "0.6456966", "0.6426366", "0.6404954", "0.6399028", "0.63872916", "0.6385722", "0.6358717...
0.6623251
10
function to display dynamically created elements
function render(elementArray) { document.getElementById('elements').innerHTML = ''; for(let i = 0; i < elementArray.length; i++) { let card = document.createElement("div"); let cardValue = document.createElement("div"); card.className = "col-md-4 col-sm-4 col-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayDOM(){\r\n\t\tvar str = '';\r\n\t\tcontainer.getChildren().each(function(item){\r\n\t\t\tstr += '<div style=\"' + item.style.cssText + '\">' + item.get('text') + '</div>\\n';\r\n\t\t});\r\n\t\tdocument.id('output').set('text', str);\r\n\t}", "function show(el){\r\n el = getList(el);\r\n\r...
[ "0.68576753", "0.66220754", "0.66220754", "0.66217947", "0.65971184", "0.6596704", "0.6596704", "0.6596704", "0.65895253", "0.65471905", "0.6508946", "0.6502533", "0.6492728", "0.6475005", "0.6465796", "0.6452137", "0.64462066", "0.64462066", "0.6435482", "0.6389102", "0.6354...
0.0
-1
constructor q: what is container? is it the html container?
constructor(container) { camera = createCamera(); scene = createScene(); renderer = createRenderer(); container.append(renderer.domElement); const cube = createCube(); const light = createLights(); // TODO: Check if scene.add allows you to add: // * any type of object // * explicitly-typed paramete...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LContainer() { }", "function LContainer() { }", "function LContainer() {}", "function LContainer() {}", "function LContainer() {}", "function LContainer(){}", "constructor() {\n this._container = document.createElement(\"div\");\n }", "constructor() {\n this._container = document.crea...
[ "0.7439379", "0.7439379", "0.7337559", "0.7337559", "0.7337559", "0.7328251", "0.70548034", "0.70548034", "0.69716597", "0.69716597", "0.69349724", "0.6858214", "0.6858214", "0.6858214", "0.68473464", "0.68473464", "0.6801963", "0.6801963", "0.6801963", "0.67981917", "0.67747...
0.5921352
69
render function no parameters
render() { renderer.render(scene, camera); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {}", "render() {}", "render() {}", "render(){}", "render(){}", "_render() {}", "function render() {\n\t\t\n\t}", "function render() {\n\t}", "render() { }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "function render() {\n\t\t\t}", "function render() {\n\n\t\t\...
[ "0.8659872", "0.8659872", "0.8659872", "0.8652602", "0.8652602", "0.8313013", "0.81083506", "0.81060207", "0.80614984", "0.8010545", "0.8010545", "0.7989533", "0.7971203", "0.77132833", "0.77132833", "0.7700337", "0.7700337", "0.7667921", "0.76674515", "0.760555", "0.7482885"...
0.0
-1
todo: 'npmlink` doesn't track adding new files, so watch mode should be added
function npmLinkCommand({ project, local, deep, verbose, yarn, here }) { const noDeepLinking = deep === false; // 1. clean dist folders // 2.1 merge pkg json // 2.2 validate pkg (main, module, types) // 2.3 write pkg // 3. compile ts return utils_1.findSubmodules(project, { local }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "watch() {\n if (! process.argv.includes('--watch')) return;\n\n this.manualFiles.forEach(file => {\n new File(file).watch(() => {\n File.find(this.manifest.get(file))\n .rename(this.generateHashedFilePath(file))\n .write(File.find(file)....
[ "0.62139815", "0.61247855", "0.60881317", "0.577993", "0.57328844", "0.5674339", "0.56728595", "0.56325614", "0.55907804", "0.546793", "0.54618967", "0.54378986", "0.54240143", "0.53641075", "0.53574693", "0.53514504", "0.53398466", "0.53370374", "0.53370374", "0.53370374", "...
0.0
-1
attempt to update the version number in provided `bumpFiles`
function updateConfigs (args, newVersion) { const dotgit = DotGitignore() args.bumpFiles.forEach(function (bumpFile) { const updater = resolveUpdaterObjectFromArgument(bumpFile) if (!updater) { return } const configPath = path.resolve(process.cwd(), updater.filename) try { if (dotgit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bumpVersion(bump) {\n log('Bump version number');\n return run('npm --no-git-tag-version version ' + bump)\n .then(function getNewVersion() {\n var newVersion = JSON.parse(fs.readFileSync('./package.json')).version;\n if (!newVersion) {\n throw new Error('Error when detec...
[ "0.6643119", "0.6504301", "0.6424855", "0.6318748", "0.626895", "0.6252685", "0.6239369", "0.6018477", "0.5977049", "0.59079313", "0.5866209", "0.5852599", "0.58280015", "0.57818645", "0.57788885", "0.5754935", "0.5750461", "0.5629583", "0.5619861", "0.55889", "0.5580781", ...
0.64025974
3
displayanimalInfo function rerenders the HTML to display the appropriate content
function displayanimalInfo() { var animal = $(this).attr("data-name"); // var queryURL = "http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&limit=10&search?q="+ animal; var queryURL = "https://api.giphy.com/v1/gifs/search?q=" + animal + "&api_key=dc6zaTOxFJmzC&limit=10"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayAnimalInfo() {\n\n\t\tvar animal = $(this).attr(\"data-name\");\n\t\tconsole.log(\"animal= \" + animal);\n\t\tvar queryURL = \"https://api.giphy.com/v1/gifs/search?q=\" + animal + \"&api_key=dc6zaTOxFJmzC&limit=10\";\n\t\tconsole.log(\"queryURL= \" + queryURL);\n\t\t\t//creating AJAX call for speci...
[ "0.77738017", "0.6941505", "0.68746", "0.6629484", "0.662933", "0.65577686", "0.64657736", "0.6443781", "0.6357494", "0.635625", "0.6326772", "0.6292506", "0.6250406", "0.62418926", "0.62368184", "0.62300605", "0.6216243", "0.6216243", "0.621611", "0.6194009", "0.6180406", ...
0.70402473
1
Function for displaying animal buttons
function renderButtons() { // Deleting the animals prior to adding new animals // (this is necessary otherwise you will have repeat buttons) $("#buttons-view").empty(); //sort array of animals alphabetically ascending animals.sort(); // animals.sort(function(a, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderButtons() {\n \n //Deleting the animals prior to adding new animals, so that it doesn’t duplicate the results\n $(\"#buttons-view\").empty();\n \n for (var i = 0; i < animals.length; i++) {\n \n //Then dynamically generating buttons for each animal in the array\n var aBtn = $(...
[ "0.7541866", "0.75310713", "0.7530555", "0.7520065", "0.7504506", "0.74898547", "0.74637014", "0.7461219", "0.74562323", "0.7450784", "0.74325067", "0.74126303", "0.7411726", "0.74049664", "0.7397738", "0.737985", "0.73462707", "0.7341651", "0.73315483", "0.7316369", "0.73110...
0.7556065
0
can be expressed as where is a nonempty substring of and is a nonempty substring of . is a palindromic string. The length of is as long as possible. For each of the pairs of strings ( and ) received as input, find and print string on a new line. If you're able to form more than one valid string , print whichever one co...
function buildPalindrome(a, b) { // compare the first string char by char to the second string char by char // iterate through each char of first string // compare current char to each char of second string starting from the end // if there's a match attempt palindrome assembly // compare char righ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longPelidrom(str) {\n let n = str.length;\n\n // make dp table\n let table = new Array(n);\n for (let i = 0; i < n; i++) table[i] = new Array(n);\n\n //all substring with size one is alwasys pelindrom\n let max_length = 1;\n for (let i = 0; i < n; i++) table[i][i] = true;\n\n // chske substring wi...
[ "0.7155402", "0.66556495", "0.66113365", "0.6606774", "0.6583516", "0.6570249", "0.65677315", "0.6503448", "0.6388732", "0.63594896", "0.6359126", "0.63484883", "0.63355255", "0.63210005", "0.62887496", "0.62631017", "0.6256804", "0.6254142", "0.62492234", "0.6191387", "0.617...
0.68516505
1
OBTENER DATOS DE UN USUARIO
function getUser(req,res){ var userId = req.params.id; User.findById(userId,(err,user) => { if(err) return res.status(500).send({message: 'Error en la peticion.'}); if(!user) return res.status(404).send({message: 'Usuario inexistente.'}); followThisUser(req.user.sub,userId).then((value...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(OID_USUARIO,USUARIO){\n\t\n\t/*INSERCION DE DATOS*/\n\t\n\t$(\"#txt_usuario\").val(USUARIO);\n\t\n\t$(\"#txt_usuario\").attr(\"USER\",OID_USUARIO);\n\t\n\t$(\"#btn_enviar_usuario\").text(\"Actualizar\")\n\t\t\n\t\n}//FINAL DE LA ACTUALIZACION DE UN REGISTRO", "function desbloquearCamposHU(){\n\t\...
[ "0.62166774", "0.6138539", "0.61281127", "0.6019733", "0.5966991", "0.5945727", "0.5904028", "0.5897167", "0.5886799", "0.582947", "0.581208", "0.58022004", "0.57783204", "0.57666874", "0.576256", "0.57545966", "0.5752809", "0.57515603", "0.5738582", "0.57380193", "0.5722475"...
0.0
-1
EDITAR DATOS DE USUARIO
function updateUser(req,res){ var userId = req.params.id; var update = req.body; //BORRAR LA PROPIEDAD PASSWORD. delete update.password; if(userId != req.user.sub){ return res.status(500).send({message: 'No tienes permiso para actualizar los datos del usuario.'}); } User.find(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(OID_USUARIO,USUARIO){\n\t\n\t/*INSERCION DE DATOS*/\n\t\n\t$(\"#txt_usuario\").val(USUARIO);\n\t\n\t$(\"#txt_usuario\").attr(\"USER\",OID_USUARIO);\n\t\n\t$(\"#btn_enviar_usuario\").text(\"Actualizar\")\n\t\t\n\t\n}//FINAL DE LA ACTUALIZACION DE UN REGISTRO", "function obtenerDatosEditar()\n {\n...
[ "0.71161467", "0.6595686", "0.6566247", "0.6560221", "0.6471203", "0.64489746", "0.64330935", "0.64026713", "0.63998234", "0.63783574", "0.6361469", "0.6346078", "0.630046", "0.6284485", "0.62642616", "0.62503034", "0.62378746", "0.6194338", "0.61874884", "0.61743945", "0.615...
0.0
-1
SUBIR IMAGEN PARA EL USUARIO.
function uploadImage(req,res){ var userId = req.params.id; if(req.files){ var file_path = req.files.image.path; var file_split = file_path.split('\\'); var file_name = file_split[2]; var ext_split = file_name.split('\.'); var file_ext = ext_split[1]; if(userId ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acceder(usuario){\n console.log(`2. ${usuario} Ahora puedes acceder`)\n entrar();\n}", "function iniciar() {\n cuerpoTablaUsuario = document.getElementById('cuerpoTablaUsuario'); \n divRespuesta = document.getElementById('divRespuesta');\n var botonAlta = document.getElementById('boto...
[ "0.60534275", "0.58435017", "0.5732763", "0.57257634", "0.5681522", "0.56619763", "0.5659426", "0.5646196", "0.56385493", "0.5631666", "0.5605583", "0.55857545", "0.55813664", "0.5574059", "0.55618525", "0.5542288", "0.55407715", "0.5535551", "0.552066", "0.55182624", "0.5508...
0.0
-1
Remove HTML tags from string.
function stripHtmlTags(str) { str = toString_1["default"](str); return str.replace(/<[^>]*>/g, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripHtmlTags(str){\n\t str = toString(str);\n\n\t return str.replace(/<[^>]*>/g, '');\n\t }", "function cleanHtml(string){\n var regex = /(<([^>]+)>)/ig;\n \n return string.replace(regex, \"\")\n}", "function htmlStrip(string) {\n\n var output = string.replace(/<(.*?)>/g, '...
[ "0.8302168", "0.8137263", "0.79710877", "0.79237795", "0.77911013", "0.77765584", "0.77449584", "0.77090126", "0.7688056", "0.7641428", "0.75990945", "0.756668", "0.75078505", "0.7467474", "0.73918295", "0.73069614", "0.7176929", "0.70276827", "0.6965834", "0.688803", "0.6876...
0.81383085
1
============================================== TOPBAR FIXED ===============================================
function navFixed() { var heightNav = $('.topbar-fixed').outerHeight(); var heightTopBar = $('.topbar-absolute').outerHeight(true); $('.topbar-absolute').parent().css('height', heightNav); var topHambu = parseInt($('.side-nav__boton-sideNav').css('top'), 10); var scrollPx = $(this).scrollTop(); var pxinit ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initTopBar(){\n\tvar header = jQuery('#header')\n\tvar animSpeed = 400;\n\tvar win = jQuery(window);\n\tjQuery('.top-bar').each(function(){\n\t\tvar bar = jQuery(this);\n\t\tbar.css({\n\t\t\ttop: -bar.outerHeight()\n\t\t}).hide();\n\t\twin.bind('scroll resize orientationchange load', function(){\n\t\t\tif...
[ "0.68381476", "0.67199844", "0.67151994", "0.667919", "0.66254693", "0.66119736", "0.65985435", "0.6590434", "0.65260655", "0.6468315", "0.6466307", "0.64447695", "0.6372559", "0.63554686", "0.63512075", "0.63362247", "0.630434", "0.6285866", "0.6237688", "0.62353593", "0.622...
0.67395705
1
Callback function for the Google Maps script.
function initMap() { // Attempt to get the user's location. if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (position) { state.map.lat = position.coords.latitude; state.map.lng = position.coords.longitude; }); } map = new google.maps.Map(document.getElementBy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function beginMap() {\r\n appMod.is_error(false);\r\n win = new google.maps.InfoWindow();\r\n map = new google.maps.Map(document.getElementById('map'), {\r\n center: coordinates,\r\n zoom: 18\r\n });\r\n fetch_resorts();\r\n}", "function initialize() {\n var center = new google.ma...
[ "0.7110744", "0.70606136", "0.7004338", "0.68623734", "0.68493164", "0.6823201", "0.6801846", "0.6797154", "0.6778971", "0.6754326", "0.6746589", "0.6745704", "0.6716422", "0.6716061", "0.6709883", "0.6694243", "0.66937786", "0.6686383", "0.668621", "0.6679218", "0.6656666", ...
0.0
-1
Calls the backend for location objects.
function getLocations(bounds) { const url = "/api/v1/stores?lat1=" + bounds.getNorthEast().lat() + "&lat2=" + bounds.getSouthWest().lat() + "&lng1=" + bounds.getNorthEast().lng() + "&lng2=" + bounds.getSouthWest().lng(); // Query the backend to refresh results. $.getJSON(url, updateView); }
{ "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 }", "updateLocation() {\n this.api.exec('getLocation');\n }", "function locationizer(work_obj) {\n\n}", "component...
[ "0.6452191", "0.6297527", "0.6216586", "0.6147725", "0.6145211", "0.61318725", "0.61318725", "0.610508", "0.6100868", "0.6073528", "0.6071257", "0.6067039", "0.60230684", "0.59927094", "0.5961285", "0.5941312", "0.59357184", "0.59279853", "0.59099203", "0.5884117", "0.5871099...
0.64608437
0
Updates the Vue data
function updateView(results) { // Find which location is selected let selectedName; if (resultsList.selected !== -1 && resultsList.items.length > resultsList.selected) { selectedName = resultsList.items[resultsList.selected].name } else { selectedName = null; resultsList.selected = -1; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(data) {\n this.data = data;\n this.populate(this.dindex);\n console.log(\"Infographic of type \\\"\" + this.typename + \"\\\" updated.\");\n }", "update(data) {\n this.data = data || this.data;\n this._updateID++;\n }", "update() {\n this.dataChanged = tru...
[ "0.69307137", "0.6838959", "0.6815097", "0.6736424", "0.6709157", "0.65819496", "0.65227675", "0.64698297", "0.6445746", "0.6439201", "0.6411723", "0.6333722", "0.63000834", "0.6281043", "0.62808335", "0.6275701", "0.6241766", "0.6215161", "0.6186266", "0.61179674", "0.611705...
0.0
-1
creating a function to call when player wins and loses
function generateNumbers(){ // this empties the array so that we only end up with 4 new numbers(not add a bunch of random ones on top of the existing numbers) characterNumber=[]; //for loop to generate random number for each character for(var i=0;i<4;i++){ randomNumber = Math.floor(Math.random() * 12); //pushes ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winsAndLosses() {\n if (randomNum === playerTotal) {\n wins++;\n $('#number-of-wins').text(wins);\n alert('You Win! (╯°□°)╯︵ ┻━┻');\n reset();\n } else if (randomNum < playerTotal) {\n losses++;\n $('#number-of-losses').text(losses);\n alert('You lost! (╯°□°)╯︵ ┻━┻...
[ "0.76186585", "0.7598758", "0.7577701", "0.757557", "0.7573876", "0.7512938", "0.75018865", "0.7447839", "0.74039197", "0.73699313", "0.73696715", "0.7355213", "0.73414814", "0.7322213", "0.7310023", "0.73005456", "0.7293744", "0.7293348", "0.726427", "0.7262947", "0.7261964"...
0.0
-1
actions when you hover over, or click the characters
function gamePlay() { document.getElementById("results").innerHTML = "<p>Your Score: " + 0 + "</p>"; $(".characters").hover(function() { $(this).addClass("characterClick"); }, function () { $(this).removeClass("characterClick"); }); //adds to the score depending on which character is clicked ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function event_cat_mouseOver(){\n\tdiv_cat.style.cursor = 'grab';\n}", "hover() {}", "function handleMouseOverText(e) {\n\t\t\t\te.currentTarget.addClassName('active');\n\t\t\t\tvar parent = $(e.currentTarget).parent().get(0);\n\n\t\t\t\ttheInterface.emit('ui:emphElement', {\n\t\t\t\t\tid : e.currentTarget.get...
[ "0.6669675", "0.662272", "0.6511007", "0.65012217", "0.64592904", "0.6423126", "0.63551104", "0.63551104", "0.6341227", "0.62963045", "0.6281964", "0.6256983", "0.6255091", "0.6255091", "0.62460935", "0.62460935", "0.6215957", "0.6205709", "0.62052155", "0.62043005", "0.61834...
0.0
-1
this function can now be removed
function pressBtnRalstonAnnex() { var u = document.getElementById('location25a').innerHTML; if(u == "Ralston Hall Annex") { map.flyTo({center: [-122.286468,37.517468],speed: 0.3}); var popup = new mapboxgl.Popup({closeOnClick: true}) .setLngLat([-122.286468,37.517468]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.73518246", "0.7247393", "0.71687174", "0.69204676", "0.68473953", "0.68310493", "0.6652985", "0.64847845", "0.64604914", "0.6411417", "0.6387217", "0.6252365", "0.62090635", "0.61930454", "0.6154018", "0.6132278", "0.6126609", "0.60454065", "0.6008585", "0.6003555", "0.599...
0.0
-1
this function now can be removed
function pressBtnRalston() { var u = document.getElementById('location25').innerHTML; if(u == "Ralston Hall Mansion") { map.flyTo({center: [-122.286784, 37.517380],speed: 0.3}); var popup = new mapboxgl.Popup({closeOnClick: true}) .setLngLat([-122.286784, 37.5...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.7355305", "0.7173245", "0.71494406", "0.6875981", "0.6806564", "0.67839277", "0.6619987", "0.64201486", "0.64018667", "0.63808984", "0.636692", "0.62007827", "0.61258286", "0.6110206", "0.6107111", "0.60880846", "0.6076824", "0.5984499", "0.59570956", "0.5924319", "0.59238...
0.0
-1
this function can also be removed now
function pressBtnTheApartmentsKane() { var u = document.getElementById('location32a').innerHTML; if(u == "The Apartments Kane") { map.flyTo({center: [-122.285434,37.516556],speed: 0.3}); var popup = new mapboxgl.Popup({closeOnClick: true}) .setLngLat([-122.285...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.72497845", "0.70916903", "0.70081943", "0.6740817", "0.66799307", "0.66319406", "0.6491074", "0.640899", "0.63919187", "0.63778627", "0.6250777", "0.620593", "0.60872495", "0.6059894", "0.6025639", "0.60238975", "0.5954994", "0.5945581", "0.59154016", "0.5878295", "0.58777...
0.0
-1
Create Local Web Server
function openServer() { connect.server({ host: cfg.server.host, root: cfg.server.root, port: cfg.server.port, livereload: true }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createHttpServer() {\n\t\tutil.log('Starting http server...');\n\t\thttp.createServer(function (req, response) {\n\n\t\t\tvar setHeader = function (status, ctype) {\n\t\t\t\tif (typeof ctype === constants.variables.undef) {\n\t\t\t\t\tctype = 'text/plain';\n\t\t\t\t}\n\n\t\t\t\tresponse.writeHead(status, ...
[ "0.71234614", "0.70387495", "0.69957", "0.69330037", "0.6843447", "0.6836852", "0.6822083", "0.67772067", "0.67768407", "0.6728642", "0.6704851", "0.6613834", "0.65832794", "0.65628415", "0.6543841", "0.6536627", "0.6509445", "0.6456169", "0.64531773", "0.64123297", "0.637895...
0.63674766
21
============================================ draws height lines
function drawlines(){ stroke(0); for(var i = 0; i < 450; i = i + 45){ line(298, 135 + i, 380, 135 + i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawLines(height, id, color) {\n console.log(height, id);\n const canvas = this.refs.canvas;\n const line = canvas.getContext(\"2d\");\n \n\n line.beginPath();\n line.moveTo(20, height);\n line.lineTo(800, height);\n line.strokeStyle = color;\n line.stroke();\n }", ...
[ "0.6964813", "0.6764295", "0.67598224", "0.6623591", "0.65741205", "0.6553168", "0.6553168", "0.6507657", "0.64997023", "0.64898807", "0.64898807", "0.64898807", "0.64898807", "0.64898807", "0.64898807", "0.64898807", "0.64800787", "0.646441", "0.646441", "0.646441", "0.64644...
0.0
-1
creates and moves the puck
function drawPuck(){ //color the puck stroke(136,137,138); fill(166,167,178) if(mouseX > 280 && mouseX < 280 + 105 && mouseY > 570 && mouseY < 570 + 50){ if(mouseIsPressed){ coverWin(); //recolor the puck stroke(136,137,138); fill(166,167,178) //move puck up until reac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_moveTo (ox, oy, px, py, stage, puck) {\n // be random\n var speed = stage.width / (50.0 + Math.floor(Math.random() * 20));\n\n var oldpx = px;\n var oldpy = py;\n\n // calculate deltas\n var dx = px - ox;\n var dy = py - oy;\n\n // calculate distance between...
[ "0.6904537", "0.6877199", "0.6836366", "0.6660832", "0.6590301", "0.6559333", "0.63856685", "0.63856685", "0.62893313", "0.6280321", "0.62398505", "0.6212006", "0.62041956", "0.61116284", "0.609998", "0.6085453", "0.5985254", "0.597981", "0.5977108", "0.5959626", "0.5957291",...
0.58405536
33
cover up win screen
function coverWin() { noStroke(); fill(130, 206, 245); rect(0,0,190,85); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winScreen() {\n image(introScreenBackground, 0, 0);\n\n push();\n noFill();\n noStroke();\n rect(285, 300, 335, 100);\n pop();\n\n rainRun();\n\n lightningGenerator();\n\n animation(huntAgainAnim, 450, 350);\n\n animation(winMaskAnim, 475, 200);\n}", "function win(){\n bg.g = 0;\n ...
[ "0.72830415", "0.6549046", "0.6433411", "0.6411357", "0.63852733", "0.63171256", "0.62408155", "0.620453", "0.6204017", "0.6194736", "0.61780787", "0.6149729", "0.61131245", "0.6098682", "0.6025048", "0.602371", "0.60139835", "0.60133535", "0.60095173", "0.59790593", "0.59649...
0.7439585
0
draws strings and triangle flags
function drawStrings(){ noFill(); stroke(255); strokeWeight(1); smooth(); line(370,0,800,435); line(290,0,0,285); line(370,0,800,200); line(290,0,0,500); for(var i = -20; i < 1000; i = i + 60){ fill(255, 80, 80); noStroke(); smooth(); triangle(200 - i, 81 + i, 258 - i, 20 + i, 286 - i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawFlag(x,y,i) {\n var canvas = document.getElementById('canvas');\n if (canvas.getContext) {\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = '#FFFFFF';\n ctx.strokeStyle = '#FFFFFF'\n ctx.font = \"10px Arial\"\n if(i)\n ctx.fillText(i.toString(),x+27,y+27);\n ctx.lineWidt...
[ "0.6733783", "0.672757", "0.66360265", "0.6625516", "0.6535745", "0.64687175", "0.64041877", "0.6395423", "0.6386023", "0.6373042", "0.6371528", "0.6361682", "0.63565373", "0.63371265", "0.6294552", "0.62833184", "0.62769043", "0.6270971", "0.62678075", "0.62676424", "0.62652...
0.6923671
0
places values on machine
function pointsText(){ fill(255); textSize(12); textFont('Helvetica'); //red if(num < 20) fill(241, 136, 113); text('100 100', 300, 530); //orange if(num < 60) fill(237, 162, 85); text('200 200', 300, 485); //yellow if(num < 110) fill(243, 230, 77); text('300 300', 300, 440)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadValues() {\n\thiscore = parseInt(storage.hiscore2) || 0;\n\tlongest = parseInt(storage.longest2) || 1;\n\tspeed = parseInt(storage.speed2) || DEFAULT_SPEED;\n}", "function getInitialValues()\n\t{\n\t settings.robotDirection = gameMap.getDirection()\n\t settings.columns = gameMap.getWidth();\n\...
[ "0.54652053", "0.53157675", "0.5308366", "0.5219491", "0.5216074", "0.51918596", "0.5122067", "0.51019967", "0.50287986", "0.50066113", "0.4999236", "0.49338388", "0.4891782", "0.48901996", "0.48518118", "0.48508415", "0.484748", "0.48347765", "0.4833985", "0.48181623", "0.48...
0.0
-1
should refactor to look cleaner; aka abstract
slice(startingPoint, endPoint) { let newList = new List(); if (endPoint == undefined) { for (let i = startingPoint; i < this.length; i++) { newList.push(this[i]); } } if (typeof endPoint == 'number') { for (let i = startingPoint; i < endPoint; i++) { newList.push(this[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transient private protected internal function m182() {}", "private public function m246() {}", "obtain(){}", "transient protected internal function m189() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient f...
[ "0.61183774", "0.6102037", "0.61002564", "0.6086831", "0.59353596", "0.59352374", "0.58296084", "0.5763495", "0.5577565", "0.5539857", "0.5520026", "0.547941", "0.5465834", "0.5465151", "0.54382026", "0.54220337", "0.5388082", "0.5359314", "0.5322517", "0.53029436", "0.529987...
0.0
-1
should refactor to look cleaner; aka abstract
reduce(callback, initVal) { let startPoint; let accumulatedVal; if (initVal == undefined) { startPoint = 1; initVal = this[0]; accumulatedVal = initVal; console.log(initVal); } else { startPoint = 0; accumulatedVal = initVal; } for (let i = startPoint; i < thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transient private protected internal function m182() {}", "private public function m246() {}", "obtain(){}", "transient protected internal function m189() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient f...
[ "0.61188775", "0.6102659", "0.6100088", "0.60874933", "0.59362", "0.593559", "0.58301926", "0.5763861", "0.5578302", "0.55405974", "0.5520328", "0.54802805", "0.5467223", "0.5465896", "0.5438504", "0.5421485", "0.5386911", "0.5359492", "0.532328", "0.53034437", "0.5299812", ...
0.0
-1
fetch data from DB
fetchProject(){ axios.get('https://pilotsapp.herokuapp.com/project/getById/' + sessionStorage.getItem('projectID')) .then((response) => { console.log(response.data); this.setState({ project: response.data, loading: true ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEasyLoadRecordsFromDb(){\n\t\t$http.get(\"/easyloadList\").then(\n\t\t\t\tfunction(res){\n\t\t\t\t\t$scope.easyLoadRecords = res.data;\n\t\t\t\t\tconsole.log(\"data found from data base\");\n\t\t\t\t\tconsole.log(res);\n\t\t\t\t},\n\t\t\t\tfunction(err){\n\t\t\t\t\tconsole.log(\"data not found from da...
[ "0.70414996", "0.68321455", "0.68208855", "0.68088824", "0.67154986", "0.6709531", "0.6675608", "0.6658904", "0.65868527", "0.6551383", "0.65474236", "0.6511769", "0.6498104", "0.64715815", "0.6465587", "0.6461441", "0.64442295", "0.64366806", "0.6407264", "0.6407051", "0.638...
0.0
-1
save data onto DB
save(e) { e.preventDefault(); axios.put('https://pilotsapp.herokuapp.com/project/updateProject/' + this.state.project._id, { ...this.state.project }).then(response => { console.log(response.data); NotificationManager.success(`'${this.state.project.title}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveToDatabase() {\n idb.add(dbKeys.stations, JSON.stringify(stationList));\n idb.add(dbKeys.lastFrequency, lastFrequency);\n }", "save() {\n this.db.write();\n }", "save(data) {\n this.db.save(data);\n }", "async save() {\n const priv = privates.get(this);\n ...
[ "0.75214964", "0.7456907", "0.7452484", "0.73422784", "0.73188263", "0.7239271", "0.71831363", "0.7061881", "0.70491725", "0.69115555", "0.68896484", "0.68648165", "0.68035847", "0.6792386", "0.6764229", "0.6759208", "0.6720696", "0.67119277", "0.66773874", "0.6663222", "0.66...
0.0
-1
Add an outgoing command to the commandqueue
addToQueue(f, pushFront = false) { if (pushFront) { this.commandQueue.unshift(f); } else { this.commandQueue.push(f); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMpd(cmd, arg1, arg2){\n\t\targ1 = arg1 || null;\n\t\targ2 = arg2 || null;\n\t\n\t\tif(addqueue.length == 0){\n\t\t\taddqueue.push({command: cmd, arg1: arg1, arg2: arg2});\n\t\t\tstartCommandQueue(); \n\t\t}\n\t\telse{\n\t\t\taddqueue.push({command: cmd, arg1: arg1, arg2: arg2});\n\t\t}\n\t}", "functi...
[ "0.61343837", "0.6128398", "0.61260223", "0.61045974", "0.59778506", "0.59112126", "0.578785", "0.5748376", "0.57008773", "0.5678219", "0.5622899", "0.55686474", "0.5538657", "0.55282575", "0.55134666", "0.5490953", "0.54762465", "0.547345", "0.54557717", "0.5448049", "0.5423...
0.5450606
19
Send a global chat message
sendChatMessage(message, pushFront = false) { this.addToQueue(() => { this.socket.call("msg", [message]).catch((reason) => { if (reason === "Please wait before sending more messages." || reason === "Please wait a moment before sending more messages.") { this.sendC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendMessage() {\n \t\tvar message = data.value;\n\t\tdata.value = \"\";\n\t\t// tell server to execute 'sendchat' and send along one parameter\n\t\tsocket.emit('sendchat', message);\n\t}", "function sendMessage() {\n let message = data.value;\n data.value = \"\";\n // tell server to execute 's...
[ "0.7974548", "0.77753586", "0.77753586", "0.7769914", "0.77296084", "0.7705663", "0.75947464", "0.75587934", "0.743872", "0.7425171", "0.742344", "0.72918445", "0.72867286", "0.72767866", "0.72729826", "0.7269697", "0.72687376", "0.72603786", "0.72470915", "0.7199084", "0.719...
0.0
-1
Send a message to a particular user
sendUserMessage(user, message, pushFront = false) { user = ChatWrapper.CleanUsername(user); this.addToQueue(() => { this.socket.call("whisper", [user, message]).catch((reason) => { if (reason === "Please wait before sending more messages." || reason === "Please wait a moment ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendMessageToUser(userId, message) {\n web.conversations\n .list({ exclude_archived: true, types: \"im\" })\n .then(res => {\n const foundUser = res.channels.find(u => u.user === userId);\n if (foundUser) {\n rtm\n ...
[ "0.74648356", "0.743412", "0.73770374", "0.70162135", "0.69861406", "0.68941504", "0.68892694", "0.687978", "0.6875167", "0.6859003", "0.68459374", "0.6843708", "0.68323773", "0.68323773", "0.6814418", "0.6806661", "0.67542964", "0.6745113", "0.67390233", "0.67185134", "0.671...
0.66041464
28
Remove a particular message from the chat
removeMessage(id) { this.socket.call("deleteMessage", [id]).catch((reason) => { console.log("Delete Message Error: " + reason); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n MessagingModule.removeMessage(this.conversation, this.uuid);\n }", "function removeMessage( id ) {\n message.remove( id );\n}", "removeMessage(id){\n this.messages.delete(id);\n }", "function deleteMessage(element) {\n const id = element.attr('id');\n query('type=deleteMes...
[ "0.82337105", "0.8127739", "0.77755564", "0.7425156", "0.731952", "0.727713", "0.7268239", "0.7101123", "0.7043073", "0.69181865", "0.6857531", "0.6835183", "0.6835183", "0.67983973", "0.67933697", "0.67862046", "0.6784029", "0.6771716", "0.6754467", "0.6644745", "0.66358185"...
0.7646948
3
Start processing the command queue to funnel outgoing messages
startCommandQueue() { setTimeout(() => { let hasFunc = false; // Start an interval that every 100ms attempts to send a beam-chat-api command this.commandQueueInterval = setInterval(() => { if (this.socket) { let fn = this.commandQueue.shift...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n if (!this.stopped && !this.stopping) {\n this.channel.on('close', () => {\n if (this.forcelyStop || (!this.pausing && !this.paused)) {\n if (!this.trapped)\n this.emit('done');\n this.emit('close');\n ...
[ "0.6690176", "0.65911025", "0.65269446", "0.646472", "0.646472", "0.6434937", "0.6386433", "0.63230884", "0.62309504", "0.6191447", "0.6107536", "0.6092459", "0.6061203", "0.6061203", "0.6061203", "0.60519135", "0.601904", "0.6006691", "0.60041785", "0.59957856", "0.59957856"...
0.5795733
37
The main spotify client class!
constructor(token = 'NO TOKEN', options = {}) { this.token = token; this.onReady = options.ready || (() => { }); delete options.ready; this.cacheOptions = options; this.cache = { users: new Collection_1.default(), playlists: new Collection_1.default(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.authorizeURI = 'https://accounts.spotify.com/authorize';\n this. tokenURI = 'https://accounts.spotify.com/api/token';\n this.clientID = config.SPOTIFY_CLIENTID;\n this.redirectURI = config.SPOTIFY_REDIRECT_URI;\n this.clientSecret = config.SPOTIFY_SECRET;\n }", "function my...
[ "0.71909004", "0.6974948", "0.6949669", "0.6932511", "0.6881422", "0.68340707", "0.6737493", "0.6685235", "0.6520384", "0.65165585", "0.6499736", "0.64635646", "0.64505374", "0.64385384", "0.63931155", "0.6347447", "0.6339025", "0.633654", "0.6268117", "0.6257913", "0.6251123...
0.0
-1
generate map(array of array filled with "W" and with padding) padding is to avoid edge case(corner, edge) when count mines
generateMap(num) { return [...Array(num + 2).keys()].map(i => Array(num + 2).fill("W")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMap(start, w, h) {\n var ix, jx, data;\n\n for (ix = 0; ix < h; ix++) {\n map[ix] = [];\n mark[ix] = [];\n\n data = input[start + ix].trim().split('');\n\n for (jx = 0; jx < w; jx++) {\n map[ix][jx] = +data[jx];\n mark[ix][jx] = 0;\n }\n ...
[ "0.7099747", "0.6300533", "0.6058275", "0.5884678", "0.577169", "0.56844723", "0.56808746", "0.5654168", "0.5615094", "0.5613694", "0.55864066", "0.55722404", "0.55704874", "0.55683094", "0.5555177", "0.5552572", "0.55500966", "0.55494833", "0.5548978", "0.5544212", "0.551926...
0.6876692
1
Capitalize First Letter of string
function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LetterCapitalize(str) {\n return str.replace(/\\w\\S*/g, function(txt) {\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n });\n}", "function capitalize(str) {}", "function capitalizeFirstLetter(string) {\n string=string.toLowerCase()\n return string.charAt(0).to...
[ "0.842108", "0.8380864", "0.8375612", "0.83688587", "0.83629566", "0.83428496", "0.8338981", "0.8329437", "0.8315428", "0.83019686", "0.82882404", "0.8286483", "0.8285477", "0.8276344", "0.8276344", "0.82702726", "0.82702726", "0.82702726", "0.8266327", "0.8262205", "0.825709...
0.81636435
44
Checks for string extension
function checkUrlExtension(url, typeOfExt) { var arr = typeOfExt == "img" ? ["jpeg", "jpg", "gif", "png"] : ["mp3"]; var ext = url.indexOf(".") != -1 ? url.substring(url.lastIndexOf(".") + 1) : ""; if ($.inArray(ext, arr) == -1) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function type_validator(_extention){\nif(_extention == undefined){return false;}\nvar index = supported_type.indexOf(String(_extention));\nif(index >= 0){\n return true\n}\nindex = supported_type.indexOf(String(_extention).replace(\".\",\"\"));\nif(index >= 0){\n return true\n}\nreturn false\n}", "function fil...
[ "0.6928145", "0.68992615", "0.67724186", "0.6716921", "0.6670673", "0.6658165", "0.6654943", "0.65865076", "0.6583341", "0.6562029", "0.6562029", "0.6407334", "0.6400999", "0.6357022", "0.633308", "0.6323063", "0.6251263", "0.6238019", "0.622181", "0.618022", "0.6162779", "...
0.6489098
11
Merge options onto `app.options`. Use `app.option()` method if one exists.
function mergeOptions(app, options) { if (typeof app.option === 'function') { app.option(options); } else { var opts = utils.merge({}, app.options, options); utils.merge(options, opts); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mergeOptions (options, notMerge, lazyUpdate) {\n this.delegateMethod('setOption', options, notMerge, lazyUpdate)\n }", "mergeOptions() {\n\t\tthis.config = _.defaultsDeep(this.configFile, ServiceBroker.defaultOptions);\n\n\t\tthis.config = this.overwriteFromEnv(this.config);\n\n\t\tif (this.flags.silent)...
[ "0.6586097", "0.6392027", "0.6390061", "0.62914187", "0.6240641", "0.6217867", "0.61463195", "0.6084719", "0.60140634", "0.59662414", "0.592318", "0.59116346", "0.5908685", "0.58994037", "0.5808822", "0.579319", "0.57713825", "0.57581747", "0.57581747", "0.575082", "0.5717062...
0.82860786
0
This will add the listInput into the List of Tasks, assigning it a random number of points
function addToList(){ listInput = $('#category').val()+": "+$('#task').val(); points = (Math.floor(Math.random()*10)+1); liString = listInput+" | "+points+" "; if(listInput != '') { $.post('/addTask', { 'category': $('#category').val(), 'description': $('#task').val(), 'points': points ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask() {\n 'use strict';\n var task = document.getElementById('task');\n var output = document.getElementById('output');\n var message = [];\n\n if (task.value) {\n tasks.push(task.value);\n task.value = '';\n rNum = Math.floor(Math.random() * tasks.length);\n ...
[ "0.67296064", "0.6531027", "0.6404672", "0.6335312", "0.6308852", "0.6294946", "0.62653375", "0.6238996", "0.6194537", "0.61409956", "0.6122929", "0.60137355", "0.6004269", "0.59975904", "0.5996972", "0.5974074", "0.59650195", "0.5961351", "0.59525305", "0.5950603", "0.591960...
0.6747056
0
This will delete a task from the list TO DO : Currently not being used
function deleteFromList(element){ if(confirm('Would you like to delete this item?') == 1){ $(element).parent().remove(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteTask(task) {\n var position = toDoList.indexOf(task);\n if (position > -1) {\n return toDoList.splice(position, 1);\n }\n else {\n console.log(\"task is not in our list!\");\n }\n}", "function deleteTask (e){\n for (var i = 0 ; i< loginUser.tasks.length; i ++){\...
[ "0.8193291", "0.81615853", "0.8121757", "0.808274", "0.8004172", "0.7977931", "0.7931227", "0.79140383", "0.78764004", "0.7874437", "0.7833239", "0.7693", "0.76769716", "0.7676726", "0.7653592", "0.7650218", "0.7645165", "0.7638648", "0.76268345", "0.7599988", "0.759349", "...
0.0
-1
This will begin the roulette
function startRoulette(){ if($('#currentTask').text()=='') { allTasks = $('#taskList').children('li'); taskToDoIndex = Math.floor(Math.random()*allTasks.length); currentTaskPosition = taskToDoIndex; task = $('#taskList li').get(taskToDoIndex).innerHTML; task = task.split('|'); task[1] = parseI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roulette() {\n var tmp = 0;\n for(var l = arguments.length - 1; l > 0; l--) {\n roulette.two(arguments[l + tmp++], arguments[l-1]);\n }\n}", "rouletteWheel() \n {\n //To look at a car's progress, iterate through this.population[i] with each\n //of them being indviduals\n \n...
[ "0.73405457", "0.6687651", "0.6538136", "0.61306787", "0.60402125", "0.5998773", "0.5991221", "0.5884154", "0.5731712", "0.5704899", "0.5669253", "0.55518353", "0.5542911", "0.5505504", "0.55008376", "0.54266584", "0.54214746", "0.5417449", "0.54082495", "0.5403143", "0.54022...
0.625739
3
This will complete a task
function completedTask(){ pointsEarned = parseInt($("#pointsAvailable").text().split(':')[1]); taskCompleted = $('#currentTask').text(); taskCompleted = taskCompleted.split(':'); $('#totalPoints').text(parseInt($('#totalPoints').text())+pointsEarned); $('#completedTasks').append("<li>"+taskCompleted+"</li>");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_taskComplete() {\n //\n }", "function taskComplete(){\n inquirer\n .prompt([\n {\n type: 'confirm',\n name: 'exit',\n message: 'Do you want to exit the program?'\n }\n ])\n .then(function(answer) {\n if (answer.exit){\n connection.end();\n } else {\n start();\n };...
[ "0.7344332", "0.7229086", "0.70234877", "0.701645", "0.7006141", "0.6923766", "0.68650216", "0.68179893", "0.6776719", "0.671203", "0.66878116", "0.6658316", "0.66392463", "0.66124177", "0.6605537", "0.6605537", "0.6605537", "0.6605537", "0.65961355", "0.6578579", "0.6555182"...
0.0
-1
This will save all the data of the user
function saveData(){ points = parseInt($("#totalPoints").text()); pending = []; category = []; //This will create a list of all pending and completed tasks $('#taskList li').each(function(r){ pending.push($('#taskList li').get(r).innerHTML.split("<")[0].split(":")[1]); category.push($('#taskList li')....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SaveUserData() {\n fs.writeFileSync(usersfile, JSON.stringify(signUpUser));\n Log(\"Saved user data\");\n}", "function saveSettings() {\n \n const curUser = getCurrentUser();\n const editedUser = curUser;\n \n editedUser.firstName = document.getElementById('first2').value;\n edit...
[ "0.7649779", "0.74760765", "0.7352886", "0.7352697", "0.7270783", "0.7233754", "0.71505445", "0.71220446", "0.71174556", "0.7082855", "0.7027101", "0.70153856", "0.6963969", "0.6938114", "0.6913947", "0.6906169", "0.6858454", "0.6849305", "0.6794342", "0.674663", "0.6743393",...
0.0
-1
This will get your data back using the user id
function retrieveData(){ $.post('/retrieve',{ 'userID': userID },function(a) { $('#totalPoints').text(a.points); $("#taskList").empty(); $("#completedTasks").empty(); currentTasks = a.pendingtasks.length; for(i = 0;i < a.pendingtasks.length;i++) { $('#taskList').append("<li id="+i+">"+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUser(id){\n //postDB(\"user/Get\", { \"use_id\" : id });\n return { \"name\" : \"steven\", \"img\" : '', \"share\" : false };\n }", "function getUserById(id){\n return $http.get(url.user + id).then( handleSuccess, handleError);\n }", "getDataFromID(id) {\n return this.u...
[ "0.77560544", "0.74468654", "0.72957", "0.72918576", "0.728847", "0.72861385", "0.7195918", "0.71549565", "0.71418285", "0.711519", "0.7085099", "0.70802474", "0.70722216", "0.70372653", "0.7016149", "0.69888663", "0.69852227", "0.69844687", "0.6977619", "0.6969277", "0.69520...
0.0
-1
Function to Internationalize name (format: First LAST)
function inName(name) { name = bio.name.trim().split(" "); name[1] = name[1].toUpperCase(); name[0] = name[0].slice(0, 1).toUpperCase() + name[0].slice(1).toLowerCase(); return name[0] + " " + name[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inName(name) {\n name = name.split(\" \");\n name[0] = name[0].slice(0, 1).toUpperCase() + name[0].slice(1).toLowerCase();\n name[1] = name[1].toUpperCase();\n var internationalizedName = (name[0] + \" \" + name[1]);\n return internationalizedName;\n}", "function intlName(name) {\n\t\t\tv...
[ "0.7480656", "0.7239618", "0.692914", "0.6746035", "0.66890895", "0.6679457", "0.6636713", "0.6588265", "0.6583628", "0.6583494", "0.6580739", "0.6570104", "0.65676063", "0.6548534", "0.65413934", "0.6540972", "0.65233827", "0.6495597", "0.6478917", "0.6447949", "0.6441613", ...
0.60988945
62
import firebaseClient from "../firebaseClient"; import firebase from "firebase/app"; import "firebase/auth";
function login(props) { // firebaseClient(); const [email, setEmail] = useState(""); const [pass, setPass] = useState(""); function handleForm(field, value) { switch (field) { case "email": setEmail(value); break; case "pass": setPass(value); break; defa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n app.initializeApp(config);\n this.appAuth = app.auth();\n this.googleProvider = new firebase.auth.GoogleAuthProvider();\n this.db = firebase.firestore();\n this.functions = firebase.functions();\n this.rdb = firebase.database().ref(); //Real time databas...
[ "0.6657854", "0.6656425", "0.65274453", "0.64582175", "0.64523154", "0.6428087", "0.6319562", "0.6319562", "0.62955755", "0.6253394", "0.62485045", "0.61997247", "0.60771096", "0.6076703", "0.60504484", "0.6020725", "0.6001685", "0.6001685", "0.59958416", "0.5990641", "0.5978...
0.0
-1
Send current location to Server to receive teammate
function sendToServer(myPosition) { serverAPI.searchPartnerToPlayWith(myPosition.longitude, myPosition.latitude, UID, function (data) { console.log('searchPartnerToPlayWith: ' + data); //No other players around you. Server returns -1 if (data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateLocation() {\n this.api.exec('getLocation');\n }", "onUpdateUserLocation(location) {\n // We will emit a socket event 'change location' to the digital ocean server at 107.170.3.84:4568\n this.socket.emit('change location', location);\n this.setState({currentLoc: location});\n }", "function ...
[ "0.6260655", "0.62343246", "0.623093", "0.6212268", "0.61557215", "0.606985", "0.6045443", "0.6033653", "0.5981479", "0.5962571", "0.5927675", "0.59232867", "0.58435297", "0.5790012", "0.57852536", "0.57796454", "0.57645124", "0.5757973", "0.57401896", "0.57369506", "0.573614...
0.5411323
85
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! the result calculated in JS is wrong due to limited number range !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
function Loop() { var mem = {}; var andMask = 0xFFFFFFFFF; var orMask = 0x000000000; for (var i = 0; i < lines.length; i++) { var inst = lines[i].trim().split("="); var cmd = inst[0].trim(); var param = inst[1].trim(); if (cmd == 'mask') { andMask = 0xFFFFFFFFF; orMask = 0x000000000; for (var b = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "limitsToNumber() {\n const { target, lowerLimit, upperLimit } = this.props;\n const L = lowerLimit !== null ? 1 : 0;\n const T = target !== null ? 2 : 0;\n const U = upperLimit !== null ? 4 : 0;\n return L + T + U;\n }", "function rangeFunc() {\n let rangeNum = Math.max(num1, num2, num3) - Mat...
[ "0.649778", "0.6320112", "0.61650074", "0.613147", "0.61230487", "0.60909593", "0.60572994", "0.6048558", "0.6034542", "0.6025944", "0.5973581", "0.5958416", "0.592354", "0.591938", "0.5913903", "0.5909109", "0.59051394", "0.5900872", "0.5898595", "0.5877154", "0.58708274", ...
0.0
-1
Overridden to use a webpacked decoder. Rather than preloading the wasmBinary and sending via the init message, shim the Emscripten module function to fetch it via locateFile:
async _initDecoder() { const workerSource = ` ${decoderModuleSource} var _DracoDecoderModule = DracoDecoderModule DracoDecoderModule = (config) => { config.locateFile = () => new URL('${decoderWasmPath}', self.origin).href; return _DracoDecoderModule(config); }; (${DR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadWasmModuleAsync(moduleName, jsUrl, binaryUrl, doneCallback) {\n\t\tloadScriptAsync(jsUrl, function () {\n\t\t\tvar lib = window[moduleName];\n\t\t\twindow[moduleName + \"Lib\"] = lib;\n\t\t\tlib({\n\t\t\t\tlocateFile: function () {\n\t\t\t\t\treturn binaryUrl;\n\t\t\t\t},\n\t\t\t}).then(function (inst...
[ "0.5782038", "0.57724607", "0.5752613", "0.5694263", "0.56649077", "0.5659264", "0.5619589", "0.5558347", "0.55414575", "0.5486637", "0.5438503", "0.54004914", "0.53431934", "0.52699643", "0.5253605", "0.5231879", "0.52143633", "0.51908743", "0.51736397", "0.5152874", "0.5152...
0.66014385
0
Route that redirects client to the login form if he hasn't joined the room
function PrivateRoute({ children, ...rest }) { const { room, username } = useSelector((state) => state.connection); return ( <Route {...rest} render={({ match, location }) => room && username ? ( children ) : ( <Redirect to={`/join/${match.params.id}`} /> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToRoom(e) {\n\te.preventDefault();\n\n\tvar roomName = $.trim($('#roomName').val());\n\n\tif(!roomName){ return; } \n\n window.location.href = '/covert/room/' + roomName;\n}", "function handleLogin() {\n\t// If the user is logging in for the first time...\n\tif (okta.token.hasTokensInUrl()) {\n\t\t...
[ "0.65786815", "0.64098537", "0.6391505", "0.63437563", "0.6274434", "0.6257958", "0.62422395", "0.620749", "0.6186719", "0.61631435", "0.6143711", "0.61312336", "0.6017081", "0.5992875", "0.59639394", "0.5940613", "0.5927464", "0.59123605", "0.590499", "0.5872567", "0.5854928...
0.5736804
41
Even if the view is not a CollectionView ensureRendered() to provide similar behavior to a model
function onSetCollection(collection) { // Undefined to force conditional render var options = this.getObjectOptions(collection) || undefined; if (this.shouldRender(options && options.render)) { // Ensure that something is there if we are going to render the collection. this.ensureRendered(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "view() {\n // console.log('Render called');\n return this._view.renderView();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "render(){if(this.renderer){this.renderer.call(this.owner,...
[ "0.65954155", "0.65325737", "0.6409883", "0.6398221", "0.6382312", "0.6382312", "0.6371436", "0.62967384", "0.62914705", "0.6161445", "0.6116898", "0.6092733", "0.60922515", "0.6086017", "0.60699826", "0.60437137", "0.603137", "0.60267735", "0.60247856", "0.6021356", "0.59687...
0.59581727
21
Add a hasmany relationship for this model. When retrieving models of the current type, N model objects of the specified type may be retrieved.
addHasMany( child, options ) { if( options == undefined ) { options = {}; } this._hasMany.push( { child, options } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static hasMany( model, options ) {\n\t\tif( this.name == \"Model\" ) {\n\t\t\tthrow \"Cannot invoke method directly on Model class\";\n\t\t}\n\n\t\tcache.relationships( this.name ).addHasMany( model, options );\n\t}", "static associate(models) {\n this.hasMany(models.Image, {\n foreignKey: \"imageabl...
[ "0.64406514", "0.6031205", "0.60205275", "0.5890146", "0.5872715", "0.5841686", "0.58242255", "0.5790629", "0.5781117", "0.571162", "0.57099396", "0.5707088", "0.56772", "0.56446433", "0.56115854", "0.56012547", "0.5599025", "0.55988836", "0.55861855", "0.5582766", "0.5575521...
0.6211596
1
Add a hasone relationship for this model. When retrieving models of the current type, a model object of the specified type may be retrieved.
addHasOne( sibling, options ) { if( options == undefined ) { options = {}; } this._hasOne.push( { sibling, options } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get hasOne() {\n\t\treturn this._hasOne;\n\t}", "static associate(models) {\n // define association here\n this.belongsTo(models.Content_Types, {\n foreignKey: 'id_Content_Type'\n });\n\n this.hasOne(models.Contents, {\n foreignKey: 'id_Content_Rating'\n });\n }", "sta...
[ "0.59265685", "0.58053607", "0.5784279", "0.5708834", "0.56848305", "0.5558938", "0.5505939", "0.54947686", "0.54885024", "0.5469731", "0.54409283", "0.5385433", "0.53846145", "0.5376806", "0.536041", "0.53412306", "0.5332535", "0.5324282", "0.5307066", "0.5305832", "0.528875...
0.6116382
0
Get a list of the hasone relationships for this model
get hasOne() { return this._hasOne; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRelated() {}", "get relatesTo() {\n\t\treturn this.__relatesTo;\n\t}", "function includePolymorphicHasOne(callback) {\n var sourceIds = [];\n //Map for Indexing objects by their id for faster retrieval\n var objIdMap = {};\n for (var i = 0; i < objs.length; i++) {\n var obj = objs...
[ "0.68987685", "0.61487544", "0.6027363", "0.58761775", "0.58463377", "0.5805136", "0.5754584", "0.5703502", "0.553503", "0.53726923", "0.5371594", "0.53639746", "0.53346974", "0.53336334", "0.53199184", "0.5313706", "0.5261409", "0.5260003", "0.5255058", "0.5251571", "0.52494...
0.60700727
2
Get a list of hasmany relationships for this model
get hasMany() { return this._hasMany; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRelated() {}", "get relatesTo() {\n\t\treturn this.__relatesTo;\n\t}", "async getUserRelations() {\n const teamWithUsers = await this._client.helix.teams.getTeamById(this.id);\n return teamWithUsers.userRelations;\n }", "static exposeRelations() {\n const me = this;\n\n if (me.hasOw...
[ "0.6878659", "0.63323647", "0.62736666", "0.5938625", "0.59321356", "0.5886438", "0.5825853", "0.5759898", "0.5756541", "0.5724223", "0.5704923", "0.5517365", "0.5509743", "0.55063987", "0.54997", "0.54328436", "0.5431783", "0.5417359", "0.5339411", "0.5327363", "0.53154194",...
0.65229684
1
Add a belongsto relationship for this model. When retrieving models of the current type, a parent object of the specified type may be retrieved.
addBelongsTo( parent, options ) { if( options == undefined ) { options = {}; } this._belongsTo.push( { parent, options } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static belongsTo( model, options ) {\n\t\tif( this.name == \"Model\" ) {\n\t\t\tthrow \"Cannot invoke method directly on Model class\";\n\t\t}\n\n\t\tcache.relationships( this.name ).addBelongsTo( model, options );\n\t}", "static associate(models) {\n // define association here\n ProductCategory.hasMan...
[ "0.6219698", "0.61491764", "0.61391664", "0.59458405", "0.5839886", "0.5798191", "0.56869906", "0.56379896", "0.5633153", "0.56187236", "0.5594757", "0.5588937", "0.5585499", "0.5581669", "0.5564453", "0.55341905", "0.5518197", "0.5509216", "0.55029976", "0.55013824", "0.5489...
0.63986987
0
Get a list of belongsto relationships for this model
get belongsTo() { return this._belongsTo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get relatesTo() {\n\t\treturn this.__relatesTo;\n\t}", "getRelated() {}", "getRelationshipNames(type) {\n let model = this.getModel(\n this.constructor.getModelName(type, this.inflector.singular)\n );\n return util.getReferencePaths(model);\n }", "static associate(models) {\n comments.bel...
[ "0.65083855", "0.64711404", "0.57460123", "0.5628265", "0.56105375", "0.5574629", "0.55522084", "0.55414104", "0.55407417", "0.55378604", "0.5523495", "0.5494089", "0.54740804", "0.545909", "0.54529953", "0.544155", "0.54403824", "0.54116136", "0.5399285", "0.5381972", "0.534...
0.6446438
2
Given a Model object of the type associated with this Relationships object, attach all of the defined relationships for this type to the object as accessor properties. Resolves to a Promise object.
attach( obj, fields ) { let belongs = this.belongsTo.map( ( element, index, array ) => { let belongs = element.parent; let options = element.options; let key = 'key' in options ? options['key'] : namer.toForeignKeyID( belongs.name ); let lazy = 'lazy' in options ? options['lazy'] : true; let member = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attachRelationships( model, obj ) {\n\tlet r = cache.relationships( model.name );\n\n\n}", "static exposeRelations() {\n const me = this;\n\n if (me.hasOwnProperty('relationsExposed')) return;\n\n if (me.relationConfig) {\n me.relationsExposed = true;\n me.relations = [];\n\n me....
[ "0.59146315", "0.562054", "0.5558384", "0.5542222", "0.55338585", "0.54198736", "0.5309598", "0.52964157", "0.52761626", "0.52741593", "0.52637345", "0.52509266", "0.52458644", "0.5226481", "0.5218306", "0.52124584", "0.52124584", "0.52124584", "0.52122283", "0.52005553", "0....
0.5731722
1
add dependency for angular bootstrap Lightbox
function bookController($uibModal, $cookies, $stateParams, bookService, signInTitle, dontMissOutMessage, luckyDayMessgae, loginService, gbsHotelConfig, $state, base64, hoteldetailService, scope, Lightbox, topNavigationService) { var vm = this; vm.isDisabled = false; vm.bookHotel = bookHotel; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initLightbox() {\n\t\tif (jQuery.fancybox != null) {\n\t\t\tjQuery('a.lightbox, a[rel*=\"lightbox\"]').fancybox({\n\t\t\t\thelpers: {\n\t\t\t\t\toverlay: {\n\t\t\t\t\t\tcss: {\n\t\t\t\t\t\t\tbackground: 'rgba(0, 0, 0, 0.65)'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tafterLoad: function(current, pre...
[ "0.6214217", "0.6178263", "0.6161205", "0.6104012", "0.60720986", "0.60283697", "0.5975248", "0.5899931", "0.5841094", "0.58254915", "0.580368", "0.5796946", "0.57480806", "0.559905", "0.5522319", "0.55151147", "0.54960936", "0.5477676", "0.5475328", "0.5470543", "0.5464596",...
0.0
-1
Bind the Hotel Details and all the relavant objects
function SelectedHotel(culture, userId) { //vm.hotelBookingConfirm = bookService.getSelectedHotel(); // if hotelBookingConfirmation object null then get the object from the State Parameter, Its use to Make URL to anytime access for booking. if (vm.hotelBookingConfirm =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HotelCollection(attrs) {\n _.extend(this, _.map(attrs, HotelClass.build).filter(Boolean));\n // this.data = _.map(attrs, HotelClass.build).filter(Boolean);\n }", "function hotelBooking() {\n\n // Comment it- No need to default Hotel Room selected on avaialbility load\n ...
[ "0.62943375", "0.61110705", "0.5949075", "0.5888359", "0.5713022", "0.55092865", "0.5508702", "0.54448915", "0.54233885", "0.5417948", "0.54058516", "0.5388644", "0.5352086", "0.5341387", "0.5313017", "0.53030896", "0.529068", "0.5282575", "0.5276515", "0.5276491", "0.5276487...
0.0
-1
bind hotel informations object
function BindBookObjects(hotelBookingConfirm,culture, userId) { //below object will Used for changeDate functions.//its json objects if (hotelBookingConfirm) { //set current currency again from cookie //hotelBookingConfirm.storeHotelConfirms.currencyco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Hotel(name,rooms,booked){\n this.name = name;\n this.rooms = rooms;\n this.booked = booked;\n}", "function HotelCollection(attrs) {\n _.extend(this, _.map(attrs, HotelClass.build).filter(Boolean));\n // this.data = _.map(attrs, HotelClass.build).filter(Boolean);\n }", "function g...
[ "0.62362593", "0.606078", "0.57710654", "0.57194155", "0.5510869", "0.5441143", "0.5408162", "0.5364575", "0.5358531", "0.5357205", "0.53394836", "0.5309018", "0.5259203", "0.52282345", "0.51498795", "0.5124984", "0.51245326", "0.51194656", "0.51068634", "0.51055175", "0.5104...
0.47650525
76
call when the date changed model popup call
function ChangeBookingDate() { //set vm object to price,roomtype,count and policy that was coming from hotelbooking previous page. vm.tempObj = { hotelid:vm.HotelInformation[0].HotelID ,pricetype:vm.hotelBookingConfirm.pricetype ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function afterModelShown() {\n \n $('.input-group.date.start').datepicker({\n format: 'dd-mm-yyyy',\n autoclose: true\n }).on('changeDate', function (e) {\n compareDate(e.date, $(this));\n });\n\n $('.input-group.date.end').datepicker({\n format: 'dd-mm-yyyy',\n ...
[ "0.70628345", "0.6869198", "0.664149", "0.65964466", "0.65794146", "0.65463597", "0.6531577", "0.65286547", "0.6464555", "0.6461296", "0.6405077", "0.6405077", "0.6405077", "0.6405077", "0.64026755", "0.6399691", "0.63875544", "0.6387227", "0.6381962", "0.6353457", "0.6309026...
0.0
-1
call this function to reupdate price and counts.
function GetValuesWhileChangelangRe(json) { bookService.getValuesWhileChangelangRe(json).then(function (response) { //debugger; SelectedHotelAfterChangeDate(response); }).catch(function (error) { vm.tempObj = null; toastr.er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePrices() {\n}", "function updateprice(){\n\n}", "refresh() {\n if (this.date && this.price)\n this.update(this.date, this.price);\n }", "function updatePrices() {\n clickUpgrades['shovel'].price = clickUpgrades['shovel'].newprice;\n clickUpgrades['excavator'].price = clickUpgrad...
[ "0.7559779", "0.6838988", "0.6777526", "0.677688", "0.66928816", "0.6452063", "0.6319338", "0.6223703", "0.6206444", "0.6173199", "0.6155833", "0.6152469", "0.61329603", "0.6125377", "0.60645527", "0.6028685", "0.6007", "0.60050434", "0.59976053", "0.5989746", "0.5981638", ...
0.0
-1
In case of IE8, TYPE_BACK_FORWARD is undefined.
function isBackForwardNavigated() { return performance && performance.navigation.type === TYPE_BACK_FORWARD; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function History_Force_MoveBack()\n{\n\t//can we go back?\n\tif (__SIMULATOR.History.CurrentStateIndex > 1)\n\t{\n\t\t//Go back\n\t\t__SIMULATOR.History.MoveBack();\n\t}\n}", "function navigationBack(breadCrumbBack){\n\t\n\tif(!breadCrumbBack){\n\t\tbreadCrumbBack=-1;\n\t} else if(breadCrumbBack>=0){\n\t\tbreadC...
[ "0.60677665", "0.6023602", "0.59616166", "0.5947526", "0.5847864", "0.5810231", "0.57710546", "0.57541686", "0.5754057", "0.5653688", "0.5646662", "0.5645931", "0.5642388", "0.5566274", "0.55658007", "0.5556532", "0.555058", "0.5538328", "0.55370986", "0.5534883", "0.55344456...
0.72549057
0
flush current history state
function reset() { setState(null); } // in case of reload
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearChangeHistory() {\n changeHistory = [];\n historyPosition = 0;\n }", "function flushChanges() {\n self.changes = [];\n }", "function flushChanges() {\n self.changes = [];\n }", "function clearUndoHistory() {\n getHistoryFromServer(resetHistList);\n}", "...
[ "0.709372", "0.7037455", "0.7037455", "0.7015005", "0.69102156", "0.69056433", "0.68692094", "0.6843131", "0.68182665", "0.6756189", "0.67134213", "0.6679908", "0.66752666", "0.66752666", "0.66124856", "0.6514325", "0.65132195", "0.6504792", "0.64853007", "0.64226294", "0.636...
0.5601759
93
Calculation of memory based on the quantity of nodes and pod Size.
function calculateBasedMem() { //var theForm = document.forms["capacity_form"]; var qtyAppNode = document.getElementById('qtyAppNode').value; var appNodeMem = document.getElementById('memNodeSize').value; var memPodSize = document.getElementById('memPodSize').value; var totalAppNodeMem = appNodeMem * qtyAppNod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_ec2_instance_memory_metrics() {}", "function getMemorySize(functionObject) {\n return Number(functionObject.batch.memory)\n || Number(functionObject.memory)\n || 2048;\n}", "function getMemoryUsage( args ) {\n const v8 = require('v8');\n var\n resul...
[ "0.60825574", "0.547923", "0.5438218", "0.54215586", "0.5411552", "0.5401423", "0.53176326", "0.5300492", "0.53000724", "0.53000724", "0.52344966", "0.5232492", "0.52264345", "0.5218635", "0.52157664", "0.5209452", "0.51787233", "0.51787233", "0.517836", "0.51290905", "0.5110...
0.60951483
0
Calculation of CPU based on the quantity of nodes and pod consumption estimative.
function calculateBasedCpu() { var qtyAppNode = document.getElementById('qtyAppNode').value; var appNodeCpu = document.getElementById('cpuNodeSize').value; var cpuPodSize = document.getElementById('cpuPodSize').value; var totalAppNodeCpu = appNodeCpu * qtyAppNode; var totalPodPerCpu = totalAppNodeCpu / cpuPod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async calculateCpuUsage() {\n this.__cpuUsage = await utils.getCpuUsage({ timeout: this.__cpuUsageInterval });\n }", "getCpuAvg() {\n const cpus = os.cpus();\n \n let totalIdle = 0;\n let totalTicks = 0;\n\n /**\n * For each CPUs we will loop though \n ...
[ "0.67683554", "0.64406323", "0.62723964", "0.6034224", "0.6014722", "0.59824187", "0.597318", "0.5917256", "0.5902481", "0.5895085", "0.58676404", "0.5846269", "0.5712935", "0.5691643", "0.55996555", "0.55874866", "0.5482893", "0.5474179", "0.5424992", "0.54225546", "0.540201...
0.7328461
0
Remove form from screen
function removeForm() { const form = document.querySelector('#dino-compare'); form.style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeFormFromScreen() {\n const form = document.getElementById('dino-compare');\n form.innerHTML = '';\n }", "removeForm() {\n if (this.$formContainer === null) {\n return;\n }\n\n delete this.formSaveAjax;\n // Allow form widgets to detach properly.\n ...
[ "0.810475", "0.75761366", "0.71618485", "0.7082091", "0.7013428", "0.6915914", "0.6882819", "0.6719752", "0.6582965", "0.65381867", "0.6485931", "0.64838356", "0.6465963", "0.64475906", "0.64359534", "0.64168155", "0.6416033", "0.6414364", "0.64049774", "0.6392198", "0.637911...
0.7465148
2
On button click, prepare and display infographic
function compare() { // Async call getDinoJson(); // Sync call getHumanData.human(); removeForm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "displayInfo() {\n clear(dogInfo())\n\n let image = document.createElement('img')\n image.src = this.image\n\n let h2 = document.createElement('h2')\n h2.innerText = this.name\n\n let button = document.createElement('button')\n button.innerText = this.buttonText()\n button.id...
[ "0.6723959", "0.65339196", "0.6478391", "0.645503", "0.6427861", "0.6356751", "0.62749684", "0.62307644", "0.6226864", "0.62153983", "0.6205258", "0.6145078", "0.6138057", "0.61349994", "0.61347896", "0.6117146", "0.60669357", "0.6055199", "0.6041539", "0.6032471", "0.6024384...
0.0
-1
Return the rect we'll want to transition towards, if known.
get _animationTargetRect() { return ppixiv.app.getRectForMediaId(this.parent._wantedMediaId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEndPosition() {\n const radius = (this.tunnelWidth - 1) / 2\n if (this.direction === 'NORTH') {\n return { x: this.x + radius, y: this.y }\n } else if (this.direction === 'SOUTH') {\n return { x: this.x + radius, y: (this.y + this.height) - 1 }\n } else if (this.direction === 'EAST') {\n ...
[ "0.57610255", "0.57414514", "0.5710045", "0.570407", "0.5690902", "0.56481826", "0.5636718", "0.5471735", "0.54362524", "0.54191005", "0.5416372", "0.53913856", "0.5387716", "0.5386074", "0.5365105", "0.536001", "0.5349921", "0.5349921", "0.53157014", "0.53098994", "0.5300958...
0.54065996
11
The screen was set active or inactive.
activate({cause}) { // Run the show animation if we're not shown, or if we're currently hiding. if(!this.dragger.visible || !this.dragger.isAnimatingToShown) { // Skip the animation if this is a new page load rather than a transition from // something else. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onActiveScreenChanged_() {}", "function changeScreen(screen) {\n activeScreen = screen;\n}", "setInactive () {\n\t\tthis._active = false;\n\t\tthis.$element.removeClass('screenlayer-active');\n\t}", "setActive () {\n\t\tthis._active = true;\n\t\tthis.$element.addClass('screenlayer-active');\n\t}", "functi...
[ "0.74071354", "0.66647243", "0.66076165", "0.65237576", "0.6340045", "0.62961864", "0.62043893", "0.6174892", "0.61645514", "0.6091437", "0.6084864", "0.58559227", "0.5828769", "0.5827496", "0.5820854", "0.5780353", "0.5772206", "0.5749203", "0.5732877", "0.56980854", "0.5693...
0.0
-1
Return a promise that resolves when there's no animation running, or null if no animation is active.
get waitForAnimationsPromise() { return this.dragger.finished; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isAnyAnimationRunning() {\n for (const action in this._animationActions) {\n if (this._animationActions[action].isRunning()) {\n return true;\n }\n }\n return false;\n }", "get current_animation() { return (this.is_playing() ? this.playback.assigned : ...
[ "0.5722611", "0.55922925", "0.5585994", "0.5545919", "0.5495163", "0.5403856", "0.5263135", "0.5252508", "0.5245202", "0.5202926", "0.5202926", "0.51895094", "0.5163437", "0.5151894", "0.51438594", "0.5086871", "0.5049114", "0.503145", "0.50097895", "0.5008574", "0.50067025",...
0.613387
0
Scroll the thumbnail onscreen in the search view if the search isn't currently visible.
scrollSearchToThumbnail() { if(this.isAnimating || !this.parent.active || this.dragger.position < 1) return; ppixiv.app.scrollSearchToMediaId(this.parent.dataSource, this.parent._wantedMediaId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showSearchResult() {\n pixabayApi\n .fetchImages()\n .then(dataArray => galleryCardTpl(dataArray))\n .then(markup => {\n markupRender(markup, galleryListRef);\n // The condition to prevent the page from scrolling on the very first batch of images\n if (pixabayApi.pageNumber > 2) {...
[ "0.6421427", "0.6204483", "0.6203048", "0.6193864", "0.6105691", "0.60230446", "0.5922342", "0.5897609", "0.58785486", "0.5838355", "0.58358186", "0.5810879", "0.5798874", "0.5772602", "0.5772602", "0.56912094", "0.5662592", "0.56622535", "0.5646828", "0.56360835", "0.563576"...
0.8229058
0
========================== Load Modules End ==============================================
function glogin(loginDetail) { return superAdminService.glogin(loginDetail) .then(function (result) { let token =result.token; if(token == null){ token = randomstring.generate(5); } let str = result.email + ":" + result.id + ":" + result.role ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_loadModules() {\n const modules = includeAll({\n dirname: this.loadPath,\n filter: this.filter\n });\n\n Object.keys(modules).forEach(module => {\n const moduleName = module.toLowerCase()\n .replace(\"_\", \"\")\n .replace(\"-\", \"\")\n .replace(this.type, \"\");\n\n ...
[ "0.74074703", "0.73393846", "0.7286648", "0.71619457", "0.70987093", "0.7093772", "0.695527", "0.6927254", "0.6906776", "0.6877943", "0.68752927", "0.6868552", "0.6862309", "0.68588", "0.6841948", "0.6815628", "0.6722725", "0.6722725", "0.6721548", "0.6693581", "0.66857797", ...
0.0
-1
Function & Prompt for User to select password length from 8128
function lengthPrompt() { while (length === "" || length === null || length < 8 || length > 128) { length = prompt( "How many characters would you like to include in your password? Please select a number between 8-128." ); if (length >= 8 && length <= 128) { return length; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseLength() {\n do {\n passwordLength = parseInt(window.prompt('How Long Do You Want Your Password to Be? Choose a number between 8 and 128 characters', \"\"));\n } while(isNaN(passwordLength) || passwordLength < 8 || passwordLength > 128)\n}", "function passCharLength () {\n charLimit =parseI...
[ "0.8530329", "0.83937323", "0.8208733", "0.8032275", "0.8026836", "0.7867448", "0.7849628", "0.7807894", "0.77992564", "0.77986324", "0.7731731", "0.772057", "0.7719936", "0.7680814", "0.7673526", "0.76701087", "0.7605969", "0.7601792", "0.7593146", "0.75797164", "0.7569442",...
0.777062
10
Functions to generate random characters
function getRandomUppercase() { var randomUpper = uppercaseChar[Math.floor(Math.random() * uppercaseChar.length)]; return randomUpper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRandomChar() {\n var randNum = Math.floor(Math.random() * 25);\n var randCharCode = \"A\".charCodeAt(0) + randNum;\n return String.fromCharCode(randCharCode);\n}", "function randomNumericCharacters(){\n return String.fromCharCode((Math.random()*10)+48)\n }", "generateRandomAphabet...
[ "0.81255794", "0.80817217", "0.7900217", "0.78989863", "0.7877435", "0.78714836", "0.78649974", "0.78327173", "0.78208065", "0.7795399", "0.7766177", "0.77611524", "0.77419806", "0.77365613", "0.77284926", "0.77230525", "0.7714792", "0.77047676", "0.770172", "0.76877356", "0....
0.0
-1
Write password to the password input
function writePassword() { var password = generatePassword(); var passwordText = document.querySelector("#password"); //console.log(passwordText); passwordText.value = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function writePassword() {\n var password = getPasswordOptions();\n var passwordText = document.querySelector('#password');\n \n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.qu...
[ "0.88605946", "0.85434437", "0.8511256", "0.8500835", "0.84896296", "0.84846", "0.84719414", "0.84686357", "0.8454292", "0.8443738", "0.8431387", "0.8419759", "0.8418786", "0.8406216", "0.8403772", "0.8400314", "0.8392802", "0.83758265", "0.8370068", "0.83642554", "0.836013",...
0.0
-1
global translation function in every component
_(...args) { return frappe._(...args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onTranslation() {\n }", "function TI18n() {}", "function TI18n() {}", "function TI18n() {}", "function TI18n() { }", "function TI18n() { }", "function TI18n(){}", "function translate(key) { return ___WEBPACK_IMPORTED_MODULE_0__[\"Translator\"].translate(key); }", "translate(...args) {\n\t\tif (t...
[ "0.78237504", "0.77589774", "0.77589774", "0.77589774", "0.76902324", "0.76902324", "0.7437776", "0.68515146", "0.6838039", "0.67411757", "0.6649431", "0.6579866", "0.6566981", "0.6552186", "0.65230167", "0.6468058", "0.6468058", "0.6456392", "0.64158654", "0.6398815", "0.639...
0.0
-1
Round number to x35 Ball Size
function roundBall (x) { return (x % 35) >= 17.5 ? parseInt(x / 35) * 35 + 35 : parseInt(x / 35) * 35; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dxt35Size(width, height) {\n return Math.floor((width + 3) / 4) * Math.floor((height + 3) / 4) * 16;\n }", "grid(number) {\n const sizeInRem = parseFloat(number) * (12 / 16);\n // e.g. 1 = 1 column of 12px\n return sizeInRem.toString() + 'rem';\n }", "functi...
[ "0.64935464", "0.6266777", "0.6255168", "0.62466186", "0.621668", "0.6128024", "0.6125321", "0.6071111", "0.60450405", "0.6044182", "0.601271", "0.59848076", "0.59829056", "0.59644765", "0.59400874", "0.5939498", "0.5922163", "0.59056735", "0.58998793", "0.5896174", "0.588496...
0.69166565
0
Check if Player Win the Game.
function wonGame (side) { hand = false; shooters.fadeOut('slow'); info.html(side + ' Won this hand ..!'); // Log Move console.log(side +' is Winner !'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForWin() {\n\n var d = $vast.MathUtil.getPointDistance(mainPlayer.x, mainPlayer.y, goal.x, goal.y);\n if (d <= 1) {\n mainPlayer.setPosition(64, 64);\n }\n }", "function checkWin(currentPlayer) {\n return winCombos.some((combination) => {\n return combinat...
[ "0.73942417", "0.7335883", "0.7319909", "0.7318273", "0.73145324", "0.72821105", "0.72162926", "0.7197219", "0.7183024", "0.71531975", "0.71497726", "0.7140183", "0.71295965", "0.71164185", "0.7105305", "0.71047807", "0.7082425", "0.7070454", "0.706073", "0.7055957", "0.70472...
0.0
-1
Turn Hand to Other Player.
function turnHand (turn) { info.html('Ball <span class="ballid">' +ballId + '</span> Shooted, Now <span class="'+turn+'">'+ turn + '</span> Turn '); hand = turn; shooter = (hand == 'Left') ? homeRight : homeLeft; homeLeft.animate({opacity: 1}, 1); homeRight.animate({opacity: 1}, 1); shooter.animate({opacity...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "switchTurn() {\n if (!this.extraTurn) {\n this.playerOne.isTurn = !this.playerOne.isTurn;\n this.playerTwo.isTurn = !this.playerTwo.isTurn;\n }\n else {this.extraTurn = false;}\n }", "function switchPlayer(){\n\t\tif (player === 'X') {\n\t\t\tplayer = 'O'\n\t\t}else{\n\t\t\...
[ "0.6998644", "0.671709", "0.6703266", "0.666196", "0.6554206", "0.6467016", "0.63960004", "0.63847643", "0.6372689", "0.63328445", "0.62752694", "0.62499815", "0.623674", "0.62093663", "0.62032026", "0.6189294", "0.6155482", "0.6132459", "0.6111025", "0.6089528", "0.60598934"...
0.0
-1
Diff the expected and the actual when the expected is primitive
function diffPrimitive(context, expected, actual) { if (_.isEqual(expected, actual)) return; context.throw(`diff value, ${JSON.stringify(expected)} ≠ ${JSON.stringify(actual)}`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subtracttest(v1, v2, expected) {\n results.total++;\n var r = calculator.subtraction(v1, v2);\n if (r !== expected) {\n results.bad++;\n console.log(\"Expected \" + expected +\n \", but was \" + r);\n }\n }", "notBeConstantValueOf() {\n this._processArguments(arguments...
[ "0.61451936", "0.60641617", "0.60108227", "0.5935327", "0.5932052", "0.59303796", "0.59246814", "0.59134644", "0.5905881", "0.59023505", "0.59019244", "0.59019244", "0.58855927", "0.5878998", "0.5865687", "0.5859692", "0.5855156", "0.58326507", "0.580832", "0.5803507", "0.577...
0.78268546
0
Diff the expected and the actual when the expected is primitive
function diffArray(context, expected, actual, strict) { diffType(context, expected, actual); let sameLength = expected.length === actual.length; if (strict && !sameLength) { context.throw(`diff size , ${expected.length} ≠ ${actual.length}`); } expected.forEach(function(elem, index) { diff(context.ente...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diffPrimitive(context, expected, actual) {\n if (_.isEqual(expected, actual)) return;\n context.throw(`diff value, ${JSON.stringify(expected)} ≠ ${JSON.stringify(actual)}`);\n}", "function subtracttest(v1, v2, expected) {\n results.total++;\n var r = calculator.subtraction(v1, v2);\n if (r !=...
[ "0.78268546", "0.61451936", "0.60641617", "0.60108227", "0.5935327", "0.5932052", "0.59303796", "0.59246814", "0.59134644", "0.5905881", "0.59023505", "0.59019244", "0.59019244", "0.58855927", "0.5878998", "0.5865687", "0.5859692", "0.58326507", "0.580832", "0.5803507", "0.57...
0.5855156
17
Diff the expected and the actual when the expected is object
function diffObject(context, expected, actual, strict) { diffType(context, expected, actual); let expectedKeys = Object.keys(expected); let actualKeys = Object.keys(actual); if (strict) { matchKeys(context, expectedKeys, actualKeys); } expectedKeys.forEach(function(key) { diff(context.enter(key), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepEqual(actual, expected) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n\n // 7.2. If the expected value is a Date object, the actual value is\n // equivalent if it is also a Date object that refers to the same time.\...
[ "0.6894458", "0.6778054", "0.6700734", "0.6700734", "0.6696655", "0.6632594", "0.66102976", "0.658458", "0.65817195", "0.6562065", "0.65209377", "0.64989775", "0.64959455", "0.64913374", "0.64876384", "0.64370275", "0.63828546", "0.63554484", "0.6318232", "0.6309705", "0.6294...
0.72513825
0
Wheter the expected and the actual have same properties
function matchKeys(context, expected, actual) { let excludes = _.difference(expected, actual); let includes = _.difference(actual, expected); if (excludes.length === 0 && includes.length === 0) return; let errMsg = ``; if (excludes.length) { errMsg += `, ++ ${excludes.join('|')}`; } if (includes.len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertSimilar(actual, expected, message) {\n assertOk(JSON.stringify(actual) === JSON.stringify(expected), message);\n }", "function assertObjectsEqual(actual, expected, testName) {\n // your code here\n var check = 0;\n if ( Object.keys(actual).length === Object.keys(expected).length) {\n fo...
[ "0.7080603", "0.70543015", "0.7050365", "0.7003055", "0.6955575", "0.69348603", "0.6872712", "0.6872712", "0.6806349", "0.6806349", "0.6805955", "0.6789299", "0.6759444", "0.675652", "0.6695409", "0.6669557", "0.6650413", "0.66113466", "0.6550676", "0.64478105", "0.64477533",...
0.65479594
19
sftp = new Sftp(credential);
function uploadAll(){ sftp.load(credential).then(function () { console.log('\n --> config success ... '); fs.readdir(__dirname + '/uploads', (err, files) => { files.forEach(file => { //console.log(file); sftp.put(__dirname + '/uploads/' + file, '/Test Backup/NodeTest/' + file).then(function (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sftp() {\n if (!this.ready) {\n throw 'connection not ready';\n }\n return this.client.sftpAsync().then(sftp => {\n return BPromise.promisifyAll(sftp);\n });\n }", "function getFtpConnection() { \n return ftp.create({\n host: hostAddress,\n u...
[ "0.7122845", "0.551786", "0.54302067", "0.5346828", "0.5263898", "0.5238331", "0.5237373", "0.50734836", "0.5044842", "0.50176877", "0.4983439", "0.49187765", "0.4906311", "0.48784193", "0.48694104", "0.4837845", "0.4837476", "0.47983062", "0.4797424", "0.47334343", "0.471694...
0.5007549
10
Wrap FileReader in a Promise and returns it.
loadContentFromFile(content) { return new Promise((resolve, reject) => { // Rejects the Promise immediately if the `content` argument is not // a Blob object provided by a browser's file input control. if (!(content instanceof Blob)) { reject('Unable to load y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readFile() {\n return new Promise((resolve, reject) => {\n fs.readFile(SOURCE, {\n encoding: 'utf-8'\n }, (err, data) => {\n if (err) {\n reject(err);\n // puts the callback given to the .catch in the Promise pending callbacks queue\n ...
[ "0.7051898", "0.6949164", "0.69316256", "0.68050337", "0.6763172", "0.66277003", "0.65974766", "0.6508646", "0.64433646", "0.6439634", "0.63854676", "0.6362101", "0.6362101", "0.63462716", "0.63388497", "0.6333231", "0.6244455", "0.62320644", "0.6211521", "0.61395043", "0.613...
0.6036343
31
import v4 from 'UUID'
function HogsContainer(props) { // function handleClick(event){ // // } const hogList = props.hogsObj.map(hogItem => { return < Hog key={hogItem.name} {...hogItem} /> }) return( <div> { hogList } </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UUIDjs() {\n}", "function UUID(){}", "function UUID(){}", "function UUID(){}", "function UUID(){}", "function UUID(){}", "uuidv4() { // Not crypto strong, but good enough for prototype.\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n var r = Math.r...
[ "0.7610103", "0.76069224", "0.76069224", "0.76069224", "0.76069224", "0.76069224", "0.73807055", "0.7344456", "0.7257235", "0.7243811", "0.7221438", "0.71958315", "0.71388555", "0.7136347", "0.7115268", "0.7113394", "0.7097397", "0.70626885", "0.70552975", "0.7040583", "0.703...
0.0
-1
Cache un element HTML.
function afficherSection(nomClasse) { $("." + nomClasse).css("display", "block"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCachedHtml() {\n if (!this.el.caching) return;\n debug('update cached html');\n var items = this.el.querySelectorAll('.gfl-item, .gfl-section');\n var html = [].map.call(items, el => el.outerHTML).join('');\n this.setCache('html', html);\n }", "function CacheEl() {\n \n }", "func...
[ "0.70183635", "0.67558354", "0.59926915", "0.5977295", "0.5962273", "0.595558", "0.58919007", "0.58891004", "0.58357704", "0.5829128", "0.5787081", "0.56784534", "0.5672599", "0.5639562", "0.56295717", "0.5619898", "0.55908895", "0.55647546", "0.5531162", "0.5531126", "0.5518...
0.0
-1
Pour activer le bouton valider.
function activerBouttonValidation(){ activerChamp(ID_BOUTON_VALIDER); $(ID_BOUTON_VALIDER).removeClass("disabled"); $(ID_BOUTON_VALIDER).click(function(){ activerChargementPage(); submit(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPaiementCb(){ \n\t\tjQuery('.payer').click(function(e) {\n\t\t\t// Open Checkout with further options:\n\t\t\thandler.open({\n\t\t\t\tname: 'SpamTonProf',\n\t\t\t\tdescription: 'Abonnement de '.concat(montant,' € par semaine'),\n\t\t\t\tzipCode: false,\n\t\t\t\tamount: montant*100,\n\t\t\t\temail : ema...
[ "0.62998134", "0.5957227", "0.5834577", "0.5816229", "0.58057374", "0.57961804", "0.57553494", "0.57021916", "0.56724715", "0.56668687", "0.56640667", "0.565835", "0.55882996", "0.55853593", "0.55728674", "0.55620223", "0.5554889", "0.55506456", "0.55473113", "0.55411875", "0...
0.55310214
20
insert valid colors into the database here
async function validColors(){ await pool.query('insert into valid_colors(color_name,count) values($1,$2)') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function populatedColours() {\n for (let i = 0; i < validColors.length; i++) {\n await pool.query('INSERT INTO valid_color (color_name, count) VALUES($1, 0)', [validColours[i]]);\n }\n }", "function insertMasterData() {\n PaintColor.create(paintColors, function (err, paintCol...
[ "0.74186105", "0.63340425", "0.62619114", "0.62283933", "0.60494375", "0.57800055", "0.57658297", "0.5718206", "0.5692778", "0.56724125", "0.5618062", "0.56137556", "0.56040674", "0.5594785", "0.5590798", "0.55860156", "0.5571974", "0.55610424", "0.5551909", "0.55421746", "0....
0.76230925
0
These are all autoadvancing slideshows with a dot interface (no arrows). Several selectors use the same JS config but might have somewhat different CSS styling.
function simpleSlideshow() { $('.slideshow--simple, .slideshow--research').on('init', (e, slick) => { $('.slick-dots, .slick-arrow').on('click', function() { $('.slideshow--simple, .slideshow--research').slick('slickPause'); }); }); $('.slideshow--simple, .slideshow--research').slick({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showSlides(n) {\r\n var i;\r\n var slides = document.getElementsByClassName(\"item\");\r\n var dots = document.getElementsByClassName(\"slider-dots_item\");\r\n if (n > slides.length) {\r\n slideIndex = 1;\r\n }\r\n if (n < 1) {\r\n slideIndex = slides.length\r\n }\r\n for (i = 0...
[ "0.66771805", "0.6642597", "0.6585317", "0.65111977", "0.65019935", "0.64967835", "0.64787585", "0.6424", "0.641578", "0.6347684", "0.6342151", "0.6338555", "0.6324641", "0.63232696", "0.62713134", "0.62050897", "0.62006515", "0.6182053", "0.61611027", "0.61393267", "0.612265...
0.61827606
17
1: Declare a function fullName and it takes firstName, lastName as a parameter and it returns your full name.
function fullName(firstName, lastName) { return `${firstName} ${lastName}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fullName(firstName, lastName) {\n return firstName + \" \" + lastName;\n}", "function fullName(firstName, lastName) {\n return firstName + lastName;\n}", "function fullName(firstName, lastName){\n\treturn firstName + ' ' + lastName;\n}", "function fullName(firstName,lastName){\n return first...
[ "0.8881458", "0.88737214", "0.88322276", "0.8826729", "0.8772284", "0.87502325", "0.8748245", "0.8719939", "0.8715858", "0.8714357", "0.87116116", "0.8666644", "0.8573065", "0.85386944", "0.8527971", "0.8527971", "0.85206133", "0.847364", "0.8464109", "0.8445292", "0.8434827"...
0.8542763
13
2: Declare a function addNumbers and it takes two two parameters and it returns sum.
function addNumbers(a, b) { return a + b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNumbers(number1, number2) {\n return number1 + number2\n}", "function addNumbers(number1, number2) {\r\n return number1 + number2;\r\n}", "function addNumbers(number1, number2){\r\n return number1 + number2;\r\n}", "function addNumbers (num1, num2) {\n return num1 + num2;\n}", "function...
[ "0.88294387", "0.87762517", "0.8746095", "0.8743836", "0.8731216", "0.8708869", "0.86807096", "0.8645056", "0.86405414", "0.8606762", "0.85920876", "0.8515729", "0.84760696", "0.8412499", "0.8396251", "0.83880335", "0.83538747", "0.8340948", "0.83117884", "0.82913226", "0.828...
0.8775269
3
4: Temperature in oC can be converted to oF using this formula: oF = (oC x 9/5) + 32. Write a function which convert oC to oF convertCelciusToFahrenheit.
function convertCelciusToFahrenheit(number) { return oC * 1.8 + 32; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function celsiusToFahrenheit (c) {\n var fahrenheit = ( c * ( 9 / 5) ) + 32;\n return fahrenheit;\n }", "function celsiusToFahrenheit(temperature)\n{\n return (temperature *9/5) +32;\n\n}", "function celsiusToFahrenheit(temperature){\n return (temperature*9/5)+32;\n}", "function celsiusToF...
[ "0.7840106", "0.78061855", "0.78042555", "0.77826196", "0.7770678", "0.7755724", "0.7750259", "0.77181304", "0.7676519", "0.7673072", "0.7663598", "0.7657139", "0.7649349", "0.7644979", "0.76303184", "0.760765", "0.76003414", "0.7569199", "0.7535723", "0.7534968", "0.7526583"...
0.81132466
0