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
Generate error if something went wrong durning drawing new menu
function errorHandle(obj) { return { type: 'ERROR', payload: obj, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function raise_error()\n\t{\n\t\tvar icon = jQuery('#topmenu_info_error');\n\t\tif (!icon.length)\n\t\t{\n\t\t\tvar icon = jQuery(egw(_wnd).image_element(egw.image('dialog_error')));\n\t\t\ticon.addClass('topmenu_info_item').attr('id', 'topmenu_info_error');\n\t\t\t// ToDo: tooltip\n\t\t\ticon.on('click', egw(_wnd...
[ "0.64111423", "0.59739", "0.5905022", "0.5847469", "0.58411723", "0.57503134", "0.57303566", "0.5628384", "0.5622994", "0.56206226", "0.5602329", "0.55321914", "0.5526573", "0.5472521", "0.54644024", "0.54386955", "0.5432773", "0.5423164", "0.5407445", "0.5402406", "0.5393659...
0.0
-1
If generated combination is not array this function modify and calculate combination to array type
function modifyCombination(combinationTypeArray, combinationDescription, weightMultiplier, pricePlus, kcalPlus) { const randomCombination = combinationTypeArray[Math.floor(Math.random() * combinationTypeArray.length)]; const randomCombinationKcal = (randomCombination.kcal * weightMultiplier) + kcalPlus; const ran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCombinations(array, len) {\n let arr = array;\n if (arr instanceof Set) {\n arr = Array.from(array);\n }\n let resultSet = [], result, x, i;\n \n // shortcut special cases\n if (arr.length < len) return [];\n if (arr.length === len) return [arr.slice(0)]; // return ar...
[ "0.6442448", "0.6186887", "0.6171135", "0.61263394", "0.6108022", "0.60916895", "0.6067353", "0.5937105", "0.5929782", "0.58683836", "0.58603686", "0.5852875", "0.582177", "0.5779168", "0.57726884", "0.5762949", "0.57041454", "0.5644281", "0.5642587", "0.56379586", "0.5618300...
0.5532363
26
Sum new menu price and kcal. If user configured limit, check if new menu is in between user configuration if isn't then generate new menu. If everything is alright dispatch new menu to reducer, make shure there is no error message and dispatch sum of price and kcal to reducer.
function checkNewMenu(generatedMenu, userConfiguredValues, dispatch) { const price = generatedMenu.reduce((sum, order) => sum + parseFloat(order.products[2]), 0); const kcal = generatedMenu.reduce((sum, order) => sum + parseFloat(order.products[1]), 0); if (kcal < userConfiguredValues.minCalories || kcal > userC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addToTotal (price, optionName, subOptionName) {\n // create new object and copy all properties from state object to avoid manual modifying state\n let newStorage = Object.assign({}, this.state.selectionStorage);\n if (!this.state.selectionStorage[optionName]) {\n // use Queue for O(1) data insert and...
[ "0.5775074", "0.5548871", "0.5455782", "0.5440645", "0.5395257", "0.5384581", "0.53807217", "0.5367114", "0.5361107", "0.5331271", "0.5327821", "0.5285571", "0.5283183", "0.5257427", "0.5232816", "0.52174497", "0.5217172", "0.51909673", "0.5164245", "0.5152732", "0.5140678", ...
0.7330434
0
Initialisation de l'ATM / Fonctions
function unlockCard(card, codeInput){ if(codeInput.substring(codeInput.length-1) == 'V'){ if(codeInput.startsWith(card.password)){ displayScreen(3); } else{ remainingTries--; if(remainingTries==0){ displayScreen(5); } else { displayScreen(2); } } } else { document....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _init () {\t\t\n\t \t\t \t\n\t\t\tvar r = $scope.local;\n\t\t\t_getPricePerson();\n\t\t\tr.pax=$scope.totalPax;\n\t\t\t\n\t\t\t//(neto dmc)\t\t\t\n\t\t\tr.subtotalpax = $scope.booking.breakdown.agency.payment;\n\t\t\tr.total = r.subtotalpax;\n\t\t\tr.topay = r.subtotalpax;\n\t\t\t\n\t\t\t// calcular...
[ "0.6221756", "0.6191041", "0.61863065", "0.613959", "0.61300397", "0.6050758", "0.6050034", "0.60456", "0.5968844", "0.5960755", "0.5950382", "0.5931318", "0.59267586", "0.5909361", "0.59024924", "0.58949107", "0.5893124", "0.588222", "0.5860437", "0.5855042", "0.5841239", ...
0.0
-1
Collects all layers underneat into array
function colorGroupTags( __parent ) { var refLayer = new RegExp( /_REF_/gim ); for ( var i = 0; i < __parent.layers.length; i++ ) { var currentLayer = __parent.layers[ i ]; var visible = currentLayer.visible; if ( !currentLayer.name.match( refLayer ) ) { if ( currentLayer.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get layersArray() {\n return [this.inputLayer, ...this.hiddenLayers, this.outputLayer];\n }", "getLayerOuts(){\n var lo=[];\n this.neurons.forEach(function(neuron) {\n lo.push(neuron.output);\n });\n this.layerOutputs=lo;\n return this.layerOutputs; \n }...
[ "0.73353034", "0.69434726", "0.6781319", "0.6695699", "0.6655652", "0.6643357", "0.6517108", "0.6471991", "0.64253616", "0.64201486", "0.6392211", "0.6286195", "0.6270684", "0.623685", "0.62332267", "0.6196833", "0.6184349", "0.6132536", "0.6113652", "0.6097198", "0.608059", ...
0.0
-1
calculation of count of matches eslintdisablenextline nounusedvars
function countOfMatches(matches, deliveries) { let teams = matches.map(element => element.season); const team = new Set(teams); let uniqueYears = Array.from(team); let MatchesWonByteamPearYear = matches.reduce((accumulatorOfteams, match) => { if (match['winner'] !== '') { if (accumulatorOfteams[matc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countVars()\n\t{\n\t\tvar i = 0;\n\t\tfor (var prop in this)\n\t\t{\n\t\t\tif (prop !== \"count\")\n\t\t\t\ti++;\n\t\t}\n\n\t\treturn i;\n\t}", "function wordMatchCount(tweet, target_tier) {\n //put # here and get rid of createKeywordTier ?\n var normalized_text = tweet.text.toLowerCase().replace(/[\\...
[ "0.61521465", "0.56054497", "0.55931747", "0.55931747", "0.55931747", "0.55931747", "0.55756325", "0.55756325", "0.55756325", "0.55756325", "0.55756325", "0.5572493", "0.5572493", "0.55700284", "0.55408823", "0.5527263", "0.55133146", "0.54702026", "0.5469747", "0.54521656", ...
0.0
-1
extra runs scored are generated here
function extraRunsScored(matches, deliveries, season) { let matchId = calculatingMatchIds(matches, season); //creating match id's array let extraRuns = deliveries.reduce((tempExtraRuns, delivery) => { if (matchId.includes(delivery.match_id)) { tempExtraRuns[delivery['bowling_team']] = tempExtraRun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {}", "function run() {\n\n }", "function run() {\n }", "firstRun() { }", "function run() {\n\n}", "Run() {\n\n }", "run () {\n }", "buildEnd() {\n runs++;\n }", "run() {\n setDestGlobals(this, this._run);\n }", "function setRunTimeVariables(){\r\n\ti...
[ "0.65448254", "0.63476956", "0.62776583", "0.62702847", "0.6209783", "0.6191668", "0.60856897", "0.6070658", "0.6060062", "0.60450166", "0.5871524", "0.58123267", "0.58111256", "0.57348776", "0.57232404", "0.56897086", "0.5652976", "0.56445265", "0.56445265", "0.56445265", "0...
0.0
-1
top ten economic bowlers are calculated here for any season
function top10EconomicBowlers(matches, deliveries, season) { let matchId = calculatingMatchIds(matches, season); const listOfPalyerstheirEconomies = deliveries.reduce( (perPlayerTotalRunsAndBalls, devlivery) => { if (matchId.includes(devlivery.match_id)) { if (!perPlayerTotalRunsAndBalls[devlivery...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visualizeTenEconomicalBowlers(topTenEconomicalBowler) {\n let seriesData = [];\n for (let player in topTenEconomicalBowler) {\n seriesData.push([player, topTenEconomicalBowler[player].economuRate]);\n }\n seriesData = seriesData.slice(0, 10);\n\n console.log(seriesData, \"economical player\");\n ...
[ "0.6342711", "0.6051446", "0.58530915", "0.57725066", "0.57233745", "0.5701307", "0.56934166", "0.5687448", "0.56269866", "0.5625207", "0.5619788", "0.55971044", "0.5584038", "0.5501683", "0.549591", "0.54957634", "0.5473388", "0.5466437", "0.54330605", "0.5429785", "0.541540...
0.7867041
0
Got parameters and all that, now actually interact with the device
function load_accessor (accessor_id, accessor_ir, parameters, saved_device) { accessors.load_accessor(accessor_ir, parameters, function (err, accessor) { if (!err) { // Successfully loaded this device. If this is new and we are saving, // now would be a good time to save it. if (!argv.no_save && !saved_de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotData() {\n var currentString = serial.readLine(); // read the incoming data\n trim(currentString); // trim off any trailing whitespace\n if (!currentString) return; // if the incoming string is empty, do no more\n\n //hopefully, it's in the format \"key=value\"\n // e.g. \"com...
[ "0.6127319", "0.6028121", "0.599493", "0.57454854", "0.57319266", "0.56189144", "0.5585091", "0.55234575", "0.55193204", "0.5505024", "0.5487244", "0.5416845", "0.54069704", "0.5389491", "0.5385169", "0.53764355", "0.536172", "0.53516334", "0.53516334", "0.53516334", "0.53516...
0.0
-1
JS9 CSS have some references to .gif wrong and Django collectstatic command (with WhiteNoise installed) failed see issue
function js9DelCSS() { return del([ paths.js9Target + '/**/*.css', '!' + paths.js9Target + '/js9-allinone.css', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createStatic() {\n fs.copy(config.paths.assets_dir, config.paths.public_dir + \"/\" + config.paths.public_assets_dir)\n .then(() => {\n renderToPublic();\n })\n .catch(err => {\n console.error(err)\n })\n}", "function buildStatic() {\n return gulp.src(config.assets.client.static)...
[ "0.5492653", "0.546243", "0.5446303", "0.5425248", "0.5165241", "0.5164585", "0.51383936", "0.5133504", "0.5110384", "0.5096305", "0.5080548", "0.5078687", "0.5060855", "0.5033571", "0.5005982", "0.49873093", "0.49787137", "0.4966206", "0.49431023", "0.49266654", "0.49236125"...
0.0
-1
Bring third party dependencies from node_modules into vendor directory
function modules() { // Bootstrap JS var bootstrapJS = gulp.src('./node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/js/*') .pipe(gulp.dest(paths.vendor + '/bootstrap/js')); // Bootstrap Select var bootstrapSelectJS = gulp.src('./node_modules/bootstrap-select/dist/js/*') .pipe(gulp.dest(paths.ve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyDependenciesTask(){\n\treturn src('node_modules/**/*')\n\t\t.pipe(dest('assets/vendor'))\n}", "function vendors() {\n\tlet scripts = [\n\t\t'node_modules/custom-event-polyfill/polyfill.js',\n\t];\n\treturn src(scripts)\n\t\t.pipe(dest('build/js/vendors/'));\n}", "function copy() {\n gulp.src(np...
[ "0.6720896", "0.6701445", "0.6671517", "0.66111195", "0.6492628", "0.646621", "0.6400143", "0.62847066", "0.62485087", "0.6209608", "0.6208317", "0.6153658", "0.61467487", "0.61025614", "0.6081769", "0.6056696", "0.6018629", "0.595846", "0.5951985", "0.59358716", "0.589643", ...
0.5392478
62
The application entities controller
function EntitiesController() { // The application entities list set this.setList = [[], [], []]; // Mixin reference to the main the application entities list set to the main // entity factory entityFactory.init(this.setList); // Create the current application background and player user entity entityFac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get entities() {\n return this.system.entities;\n }", "function AppController() {\n}", "function actionEmpleadoController() {\n if (vm.empleadoCreate && vm.empleadoCreate._id) {\n updateEmpleadoController()\n } else {\n createEmpleadoController()\n }\n }", "get entities() {\n r...
[ "0.579991", "0.5766181", "0.57250196", "0.5665381", "0.56606555", "0.5608345", "0.55991906", "0.5598238", "0.55408204", "0.54702014", "0.54653466", "0.5463622", "0.5420822", "0.5416572", "0.5401184", "0.5390437", "0.53559786", "0.53414327", "0.5338002", "0.5336449", "0.531940...
0.7081644
0
mix measurements and real values from the dataset for one place ID
function mixMeasurementsAndRealValues(measurements, realValues, id) { var toSend = []; var everything = []; // Make an array with everything everything = everything.concat(measurements); everything = everything.concat(realValues); // Sort by date everything.sort(function (data1, data2) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__init() {this._measurements = {};}", "__init() {this._measurements = {};}", "__init() {this._measurements = {};}", "function getUnitOfMeasurement(id) {\n for (i = 0; i < unitOfMeasurements.length; i++) {\n if (unitOfMeasurements[i].unitOfMeasurementId == id)\n return unitOfMeasurements[...
[ "0.532343", "0.532343", "0.532343", "0.5229617", "0.5176349", "0.51758915", "0.51105124", "0.50730866", "0.5039849", "0.5023575", "0.49989697", "0.49688524", "0.49230483", "0.4922382", "0.48837823", "0.48765847", "0.487466", "0.48743886", "0.48575607", "0.48566252", "0.484851...
0.635513
0
takes one measurement and return the number of correct signals.
function modelForward(measurement, config) { if ((config || modelConfig).min === undefined || (config || modelConfig).max === undefined || (config || modelConfig).employee === undefined) return (measurement); var nbSignals = 0; if (!measurement.signal_strengths) return null;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSignalQuantity()\n {\n return parseInt(this.quantity);\n }", "function countSamples() {\r\n\treturn samplesPayload.length;\r\n}", "function count() {\n return Object.keys(signals).length;\n}", "function SignalCounter(numberOfSignals, callback)\r\n{\r\n this.sendSig...
[ "0.59872097", "0.5983644", "0.59784955", "0.5640691", "0.5628445", "0.55960023", "0.5502333", "0.5495805", "0.53914964", "0.5356429", "0.5297528", "0.5293205", "0.5260964", "0.52487385", "0.5208951", "0.5201309", "0.51989233", "0.5189112", "0.5134066", "0.5128877", "0.5122303...
0.48837546
42
takes two arrays of int (number of people), and return some stats about them
function getStats(signalsNumbers, realDatas) { var correlation; var rmse; if (signalsNumbers.length === realDatas.length && signalsNumbers.length) { correlation = ubique.corrcoef(signalsNumbers, realDatas)[0][1]; var sum = 0; for (var i = 0; i < signalsNumbers.length; i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getInformation(brain1, brain2) {\n let matching = 0, totalDiff = 0.0;\n brain1.genes.forEach((val1) => {\n for (let i = 0; i < brain2.genes.length; i++) if (val1.innovationNumber === brain2.genes[i].innovationNumber) {\n matching++;\n totalDiff += Math.abs(val...
[ "0.6216994", "0.6015914", "0.6013489", "0.5945501", "0.5903798", "0.58893836", "0.588634", "0.58713156", "0.5849022", "0.5828117", "0.5770429", "0.5742784", "0.5733705", "0.5716131", "0.5695362", "0.56681013", "0.56516457", "0.56371886", "0.5634783", "0.56047684", "0.55955744...
0.0
-1
Splits the first argument (an Array) into two arrays depending on the values in the second.
static splitByGroup(iData, iGroups, iLabel) { let A = []; let B = []; for (let i = 0; i < iData.length; i++ ) { if (iGroups[i] === iLabel) { A.push(iData[i]); } else { B.push(iData[i]); } } return [A, B]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function split(array) {\n let middle = Math.floor(array.length / 2);\n let l = array.slice(0, middle);\n let r = array.slice(middle);\n return [l, r];\n}", "function split(arr){\n return [[].concat(...arr), arr.map(a => [a.length])];\n\n}", "function divideInArray(elenco){\n return parola=elenco.split(\"...
[ "0.6765869", "0.642234", "0.6338049", "0.63285905", "0.62253916", "0.61764383", "0.6099052", "0.6018261", "0.60149336", "0.5865735", "0.58601254", "0.5835062", "0.5831507", "0.58143127", "0.5812526", "0.58012205", "0.57987094", "0.5790296", "0.5759283", "0.57506454", "0.57263...
0.0
-1
With host I mean the one who stayed fixed and with guest I mean the one who was dropped into the host
function join_group(host, guest) { if(host.group === -1) { guest.group = -1; var taken_groups = []; characters.forEach(function(character) { if(!taken_groups.includes(character.group)) taken_groups.push(character.group); }); taken_groups.sort(function(a,b) { return b-a; }); host.group ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeHost(data){\n if(iHost.indexOf(roomIn) == -1){\n\n } else {\n if(confirm(\"Are you sure? This gives the user to kick and ban anyone, including you.\")){\n socketio.emit(\"makeHost\", {host:data, room:roomIn});\n }\n }\n }", "repickHost() {\n ...
[ "0.5367126", "0.53270173", "0.50534195", "0.49809948", "0.494453", "0.49420547", "0.49203184", "0.48838994", "0.48743254", "0.48479494", "0.4844905", "0.4829046", "0.47907314", "0.47774783", "0.4765278", "0.4752419", "0.47437572", "0.47335064", "0.47334626", "0.46557602", "0....
0.45822328
37
GET BOOK BY ID
async function getBookByID(req, res) { const book = await table().findOne({ _id: mongoDB.ObjectId(req.params.id) }); res.send(book); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBook(id){\n\t\treturn this.books.find( it => it.id === id);\n\t}", "function get_boat(id){\n const key = datastore.key([BOATS,parseInt(id,10)]);\n const q = datastore.createQuery(BOATS).filter('__key__','=', key);\n return datastore.runQuery(q).then( (entities) =>{\n return entities[0].map(fro...
[ "0.7617059", "0.75945735", "0.6999244", "0.69261616", "0.6842698", "0.67289746", "0.67081696", "0.66425794", "0.6561723", "0.65590364", "0.6555528", "0.6548755", "0.6453725", "0.64208424", "0.6366338", "0.63644576", "0.63644576", "0.62931883", "0.6270351", "0.6228599", "0.622...
0.5928814
34
DELETE BOOK by ID
async function deleteBookByID(req, res) { const book = await table().deleteOne({ _id: mongoDB.ObjectId(req.params.id), }); res.send("Record deleted"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteBook(id) {\n API.deleteBook(id)\n .then((res) => loadBooks())\n .catch((err) => console.log(err));\n }", "function deleteBook(id) {\n API.deleteBook(id)\n .then(res => loadBooks()) \n .catch(err => console.log(err))\n }", "function deleteBook(id) {\n API.deleteBo...
[ "0.74528885", "0.7451224", "0.7445654", "0.7445654", "0.7445654", "0.7411514", "0.7295137", "0.6986319", "0.6950861", "0.6923358", "0.69154173", "0.69039345", "0.6870944", "0.68193555", "0.6799071", "0.67858446", "0.676211", "0.670194", "0.66449904", "0.6595352", "0.6583357",...
0.6623117
19
Funcion usada en asignacion centro de costos
function getUsuarios() { var usuarioId = document.getElementById('SelectUsuario').value; $("#sistemas").load(raiz+"/external_functions/SystemsAndCostCentersSelectForId/" + usuarioId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function custoFinal(custoFabrica, percDistribuidor, percImpostos ){\n let custoFinal = custoFabrica + ((custoFabrica * percDistribuidor) / 100 ) + ((custoFabrica * percImpostos ) / 100)\n\n return custoFinal;\n}", "Costos(excesoM3) {\n this.registro.excessCosto = excesoM3 * this.registro.excessConsu...
[ "0.6883033", "0.6623537", "0.66180676", "0.66023904", "0.6571747", "0.64926076", "0.6483948", "0.64681476", "0.64591765", "0.6418116", "0.6393853", "0.63921034", "0.6384622", "0.6383986", "0.63587636", "0.63417333", "0.63331044", "0.63305086", "0.6329248", "0.63273597", "0.63...
0.0
-1
primera funcion para modulo usuario_profiles
function getSistemasProfile() { var usuarioId = document.getElementById('SelectSistema').value; $("#segundoSelect").load(raiz+"/external_functions/SistemasSelectForId/" + usuarioId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listProfiles() {\n $http({\n method: 'GET',\n url: baseUrl + 'admin/profile/list/' + idAdminSession,\n data: {},\n headers: { 'Authorization': 'Bearer ' + localStorage.getItem('jeton') }\n }).then(function successCallback(re...
[ "0.6766007", "0.6744138", "0.6732221", "0.6624528", "0.64907366", "0.64857906", "0.64355475", "0.643349", "0.6380497", "0.6348889", "0.6287393", "0.62767303", "0.6251401", "0.62444365", "0.6208829", "0.6189252", "0.6162081", "0.61545527", "0.6123067", "0.61227614", "0.6118106...
0.0
-1
primera funcion para modulo usuario_profiles
function getSistemasProfile2() { var usuarioId = document.getElementById('SelectSistema').value; $("#segundoSelect").load(raiz+"/external_functions/SistemasSelectForId/" + usuarioId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listProfiles() {\n $http({\n method: 'GET',\n url: baseUrl + 'admin/profile/list/' + idAdminSession,\n data: {},\n headers: { 'Authorization': 'Bearer ' + localStorage.getItem('jeton') }\n }).then(function successCallback(re...
[ "0.67655706", "0.67452675", "0.6731815", "0.6623842", "0.649065", "0.6485465", "0.64362925", "0.64344525", "0.6381227", "0.6348998", "0.62870187", "0.6276608", "0.6251078", "0.62461036", "0.6209552", "0.6190924", "0.61622405", "0.615611", "0.6122982", "0.61214006", "0.6119235...
0.0
-1
///////////////////////funcion usada para asignar perfiles a usuarios///////////////////////////////////////
function getSistemasForProfiles() { var usuarioId = document.getElementById('SelectUsuario').value; $("#sistemas").load(raiz+"/external_functions/getSistemasForProfiles/" + usuarioId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function escucha_Permisos(){\n\t/*Activo la seleccion de usuarios para modificarlos, se selecciona el usuario de la lista que\n\tse muestra en la pag users.php*/\n\tvar x=document.getElementsByClassName(\"work_data\");/*selecciono todos los usuarios ya qye se encuentran\n\tdentro de article*/\n\tfor(var z=0; z<x.l...
[ "0.57540536", "0.5704063", "0.5640284", "0.5607014", "0.55906934", "0.54088444", "0.5400451", "0.53702766", "0.52946967", "0.52453065", "0.5238245", "0.5204459", "0.5168937", "0.5161415", "0.51569474", "0.5146027", "0.5132238", "0.511134", "0.5105688", "0.5103681", "0.5098300...
0.0
-1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////...
function getOtherUsuarios() { var usuarioId = document.getElementById('SelectUsuarioReemplazado').value; $("#segundoSelect").load(raiz+"/external_functions/ReemplazoDiv/" + usuarioId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async bringUser(req,res){\n //función controladora con la lógica que muestra los usuarios\n }", "function escucha_users(){\n\t/*Activo la seleccion de usuarios para modificarlos, se selecciona el usuario de la lista que\n\tse muestra en la pag users.php*/\n\tvar x=document.getElementsByTagName(\"articl...
[ "0.64341396", "0.63700944", "0.6248254", "0.61954343", "0.61377454", "0.61375177", "0.6100204", "0.60300946", "0.60016096", "0.59169537", "0.5903393", "0.5861551", "0.58548063", "0.582123", "0.58025825", "0.5799934", "0.5768778", "0.5766745", "0.5763487", "0.5753392", "0.5750...
0.0
-1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////...
function getProvinces() { var regionId = document.getElementById('region').value; $("#provinces").load(raiz + "/communes/gettingProvinces/" + regionId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function carregaOpcoesUnidadeSuporte(){\n\tcarregaTipoGerencia();\t\n\tcarregaTecnicos();\n\tcarregaUnidadesSolicitantes();\t\n\tcarregaEdicaoTipos();//no arquivo tipoSubtipo.js\n\tcarregaComboTipo();//no arquivo tipoSubtipo.js\n}", "getCommanditaires() {\n\t\tthis.serviceTournois.getCommanditaires(this.tournoi....
[ "0.6106732", "0.5919647", "0.58276117", "0.5824613", "0.56459635", "0.5624412", "0.5623822", "0.5572741", "0.55568236", "0.5526488", "0.55173755", "0.54958516", "0.54883146", "0.54663056", "0.5453434", "0.5432447", "0.54245585", "0.54105085", "0.5382859", "0.5342518", "0.5332...
0.0
-1
////////////////////////////////////////Funcion para agregar direcciones//////////////////////////////////////////
function validateAddressForUser() { var forUser = document.getElementById('for_user').value; if(forUser == 1) { $('#users').show('fast'); } else { $('#users').hide('fast'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cddown(subdir,dir) {\n //this.dirs.push(dir);\n this.lastpath = this.path;\n this.path += '/' + subdir;\n this.resources = [];\n }", "function criarDiretorios(element) {\n let newElemento = {} \n let tipo = element.TIPO\n\n \n if(tipo!=='CARTAFRETE') {\n sendLog('AVISO',`...
[ "0.6799725", "0.62306035", "0.61537325", "0.61402214", "0.610652", "0.6030581", "0.6009226", "0.5750662", "0.5745869", "0.5681251", "0.5658185", "0.5625894", "0.5610103", "0.55319494", "0.5503652", "0.548517", "0.5481722", "0.5425308", "0.54144466", "0.54050285", "0.54032284"...
0.0
-1
This method looks for the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS environment variables.
function getAuthObj( callback, keyCredentialsPath = '../' + process.env.GOOGLE_APPLICATION_CREDENTIALS ) { console.time('Authenticating'); const key = require(keyCredentialsPath); const jwtClient = new google.auth.JWT( key.client_email, null, key.private_key, ['https://www.googleapis.com/auth/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCredentials () {\n\n var keys = ['OSTORE_AUTH_URI', 'OSTORE_AUTH_UN', 'OSTORE_AUTH_PW'];\n var okay = keys.every( function ( key ) { return process.env[key]; });\n\n if ( ! okay ) {\n console.log( 'Failed to find required environment variables', keys );\n process.exit( 1 );\n ...
[ "0.6370175", "0.60349864", "0.59580535", "0.5925014", "0.5782053", "0.56183785", "0.54957503", "0.5450952", "0.5422152", "0.5415787", "0.5384582", "0.5341948", "0.5324487", "0.52376664", "0.5189074", "0.5163752", "0.5133395", "0.51117074", "0.51007694", "0.50823957", "0.50647...
0.44201577
89
List of tasks to grab only data for new animes and new users
static get grabNewsTasksKeys() { return [ 'GenresOnce', 'Animes_New', 'AnimesUserrecs_New', 'UserLogins_New', 'UserLists_New', 'UserProfiles_New', //'SpUserLogins_Re', //'UserProfiles_Re', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadImportantTasks() {\n const response = await fetch(url + '/api/tasks/filter=important');\n if (!response.ok) {\n throw new ResponseException(response.status + \" \" + response.statusText);\n }\n\n const tasks = await response.json();\n return tasks.map(t => {\n t = ({...
[ "0.7069122", "0.69571877", "0.68730223", "0.67697316", "0.6708866", "0.6668082", "0.66391075", "0.65272516", "0.6472017", "0.6459703", "0.6405393", "0.64030683", "0.6386544", "0.6352999", "0.6338892", "0.63331294", "0.6295268", "0.62169504", "0.6210612", "0.6205691", "0.62009...
0.58532846
71
List of tasks to check udpates
static get grabUpdatesTasksKeys() { return [ //'UserLists_All', //too slow, better UserListsUpdated_* + UserLists_Updated //'UserListsUpdated_WithList', //also slow, better to split users on active and non-active 'UserListsUpdated_Active', //run frequently 'UserListsUpdated_WithoutList', //r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function pingTaskRunner(arr) {\n try {\n const respones = await Promise.all(arr);\n if (localDebug) { console.log('respones: ' + JSON.stringify(respones, null, 2)); };\n for (let res of respones) {\n if (localDebug) { console.log('res: ' + JSON.stringify(res)); };\n ...
[ "0.61742747", "0.61473423", "0.60758007", "0.6070703", "0.59962773", "0.59343284", "0.59043664", "0.58196837", "0.57745415", "0.5752343", "0.5714065", "0.5696549", "0.5610069", "0.55796516", "0.5496015", "0.54859906", "0.5482334", "0.5463578", "0.541435", "0.5414214", "0.5407...
0.5933621
6
Before running task with 1+ concurrent scanners, do once some preparations, like getting cnt of total ids, list of ids
static beforeTask(taskKey, anyScanner) { if (taskKey.indexOf('Animes_') == 0) { let mode = taskKey.substring('Animes_'.length); if (mode == 'New') { return Promise.all([ anyScanner.provider.getApproxMaxAnimeId({}), anyScanner.redis.getAsync("mal.maxGrabbedAnimeId") ])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async collect(aCount) {\n let response = await this.kojac.performRequest(this);\n\t\tlet result = response.result();\n\t\tif (!_.isArray(result) || result.length===0)\n\t\t\treturn result;\n\t\tvar resource = response.request.ops[0].key;\n\t\treturn this.kojac.collectIds(resource,result,null,aCount);\n\t}", "...
[ "0.58796215", "0.5705579", "0.55338264", "0.55276984", "0.5466537", "0.5403947", "0.53992987", "0.53919435", "0.53634036", "0.5213082", "0.5188713", "0.51501906", "0.51079094", "0.51052976", "0.5083314", "0.50539327", "0.5032738", "0.49892825", "0.4979771", "0.49782312", "0.4...
0.7167806
0
mode 'New' only for animes with never checked yet userrecs, 'All'
grabAnimesUserrecs(data, mode = 'All') { let key = 'AnimesUserrecs_'+mode; let cond = '1=1'; if (mode == 'New') cond = "recs_check_ts is null"; return this.grabByIds({ key: key, isByListOfIds: true, getTotalIdsCnt: () => data.totalIdsCnt, getListOfIds: () => data.listOfIds,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allCurrent()\n{\n mode = \"allCurrent\";\n refresh();\n}", "function currentMod() {\n return UserRecords.focusRecord;\n }", "function userSetMode(){\n // remove the sensitive list and add the user list to websiteMap\n removePreloadListFromBlacklist();\n preloadUserSet();\n ...
[ "0.5718948", "0.53308254", "0.52198684", "0.5169243", "0.5167447", "0.5006741", "0.5006741", "0.5006741", "0.49961188", "0.49378794", "0.49378794", "0.48819745", "0.48717397", "0.48349372", "0.4820172", "0.48176762", "0.47994635", "0.47958055", "0.4790532", "0.47560298", "0.4...
0.53352207
1
mode 'Lost' to check user logins by "holes"ids, 'Re' regrab user logins with ids in redis' set "mal.recheckUserIds"
grabUserLoginsByList(data, mode = 'Lost') { let key = 'SpUserLogins_' + mode; return this.grabByIds({ key: key, isByListOfIds: true, getTotalIdsCnt: () => data.totalIdsCnt, getListOfIds: () => data.listOfIds, getDataForIds: (ids) => null, fetch: (id) => this.provider.userIdTo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "recheckUserProfiles(data) {\n let key = 'UserProfiles_Re';\n return this.grabByIds({\n key: key,\n isByListOfIds: true,\n getTotalIdsCnt: () => data.totalIdsCnt,\n getListOfIds: () => data.listOfIds,\n getDataForIds: (indexes) => {\n let logins = {};\n for (let idx of i...
[ "0.57862175", "0.5759261", "0.5598421", "0.5555654", "0.5455302", "0.544883", "0.5441436", "0.54204714", "0.5303968", "0.52439374", "0.5235141", "0.52310264", "0.52177346", "0.52075964", "0.5170776", "0.5169468", "0.51688266", "0.5131782", "0.50927955", "0.5073815", "0.505891...
0.6186561
0
mode 'New' only for users with missing profile data, 'All'
grabUserProfiles(data, mode = 'New') { let key = 'UserProfiles_' + mode; let cond = '1=1'; if (mode == 'New') cond = "reg_date is null"; else if (mode == 'All') cond = "is_deleted = false"; return this.grabByIds({ key: key, isByListOfIds: true, getTotalIdsCnt: () => dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpDisplayNewProfile() {\n $scope.logOfChanges = [];\n $scope.input = {dirty:false};\n $scope.mode = 'view'; //can view or edit profiles\n $scope.input.newDatatype = $scope.dataTypes[0];\n $scope.input.multiplicity = 'opt';\n if ($scope.model){\n ...
[ "0.630948", "0.5816811", "0.5814845", "0.5811839", "0.5780819", "0.56775963", "0.562731", "0.5541897", "0.5539413", "0.55322236", "0.5493568", "0.54826015", "0.5369418", "0.5349583", "0.5333449", "0.5316441", "0.53127974", "0.53010815", "0.52838457", "0.5279342", "0.5267604",...
0.576624
5
Regrab user profiles with logins in redis' set "mal.recheckUserLogins"
recheckUserProfiles(data) { let key = 'UserProfiles_Re'; return this.grabByIds({ key: key, isByListOfIds: true, getTotalIdsCnt: () => data.totalIdsCnt, getListOfIds: () => data.listOfIds, getDataForIds: (indexes) => { let logins = {}; for (let idx of indexes) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshLogin(nickName) {\n localStorage.removeItem('storelogin');\n store.is_login = true;\n store.nickname = nickName;\n refreshBookmark();\n refreshTopNav();\n}", "function resetUserBlacklist(){\n if(mode == \"userset\"){\n removeUserSet();\n }\n usersetWebsites = {};\n chrome.storage.sync...
[ "0.592418", "0.582648", "0.5657705", "0.562222", "0.5602693", "0.5587511", "0.55746627", "0.5570741", "0.5524085", "0.5504027", "0.55005735", "0.54604554", "0.5437881", "0.5424112", "0.5409056", "0.5385971", "0.5370103", "0.53646034", "0.53293246", "0.5327166", "0.5300466", ...
0.67869496
0
mode 'WithList' for users with list, 'WithoutList' for users w/o list, 'Active' for users with list updated not more than year ago, 'NonActive' for users with list updated long time ago, 'All'
grabUserListsUpdated(data, mode = 'All') { let key = 'UserListsUpdated_' + mode; let cond = "1=1"; if (mode == 'WithList') cond = "list_update_ts is not null and is_deleted = false"; else if (mode == 'WithoutList') cond = "list_update_ts is null and is_deleted = false"; else if (mode ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isUserList() {}", "function processActiveUsersList() {\n $(\"#rlc-activeusers ul\").empty();\n updateArray = [];\n\n for(let i = 0; i <= activeUserArray.length; i++){\n if (updateArray.indexOf(activeUserArray[i]) === -1 && activeUserArray[i] !== undefined) {\n updat...
[ "0.57546484", "0.54246354", "0.5421953", "0.5381629", "0.5368035", "0.5296085", "0.5259963", "0.5254093", "0.5232712", "0.51100224", "0.5104222", "0.5088542", "0.5071703", "0.50645053", "0.5016857", "0.49983603", "0.49673095", "0.4946208", "0.4940212", "0.49297884", "0.492577...
0.5920292
0
mode 'New' only for users with never checked yet list, 'Updated' only with flag need_to_check_list == true, 'All'
grabUserLists(data, mode = 'All') { let key = 'UserLists_' + mode; let cond = '1=1'; if (mode == 'New') cond = "list_check_ts is null"; else if (mode == 'Updated') cond = "need_to_check_list = true"; return this.grabByIds({ key: key, isByListOfIds: true, getTotalIdsCnt:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grabUserListsUpdated(data, mode = 'All') {\n let key = 'UserListsUpdated_' + mode;\n let cond = \"1=1\";\n if (mode == 'WithList')\n cond = \"list_update_ts is not null and is_deleted = false\";\n else if (mode == 'WithoutList')\n cond = \"list_update_ts is null and is_deleted = false\";\n ...
[ "0.6166324", "0.561812", "0.5599286", "0.55620915", "0.5533576", "0.54569685", "0.5416248", "0.537239", "0.53655076", "0.53373134", "0.53216004", "0.52626526", "0.525661", "0.52534634", "0.5252642", "0.52454615", "0.52450204", "0.52075255", "0.5202608", "0.51939636", "0.51798...
0.58285534
1
Prompt customer and make db calls to buy items
async function main() { await amazonDB.displayAllItems(); var userOptions = [ { type: 'input', name: 'itemId', message: 'Which item would you like to buy? (enter item id)' }, { type: 'input', name: 'quantity', message: 'What quantity would you like to buy?' } ];...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buy()\n{\n\t//query the databse for all items being sold\n\tconnection.query(\"SELECT * FROM products\", function(err, res)\n\t{\n\t\t\n\t\tif(err) throw err;\n\n\t\t//Prompt the user to input data\n\t\tinquirer.prompt([\n\n\t\t\t{\n\t\t\t\t//Ask for id of the product the user wants to buy\n\t\t\t\tname: ...
[ "0.7674815", "0.7653276", "0.7362935", "0.7306923", "0.7279577", "0.7253647", "0.7222781", "0.718164", "0.717446", "0.7165936", "0.71472", "0.7120296", "0.7109585", "0.710656", "0.70840067", "0.7079043", "0.70773727", "0.7074629", "0.7057307", "0.7042648", "0.70317245", "0....
0.72048813
7
Listen SDK events. This method will be updated when SDK provides self synchronous status
subscribeToEvents(client, updateOnSdkUpdate, updateOnSdkTimedout, updateOnSdkReady) { if (!client.isReady) { // client is not ready /** * client still might be ready if it was created before using `getClientWithStatus` function * (for example if the client was instantiated ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n ...
[ "0.64434665", "0.6197497", "0.6197497", "0.61391085", "0.6097737", "0.6075637", "0.60025376", "0.5955337", "0.591629", "0.591629", "0.59035784", "0.58868706", "0.58836013", "0.5869983", "0.5853096", "0.58443576", "0.5841461", "0.5821937", "0.58181083", "0.5814673", "0.5789458...
0.63942665
1
returns blank string if the property is undefined, else the value
function orBlank(v) { return v === undefined ? '' : v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getValue() {\n return this.defined ? this.value : \"None\";\n }", "function checkUndefined(value) {\n if (JSON.stringify(value) === undefined) {\n return \"\";\n } else {\n return value;\n }\n }", "function emptyOrString(property) {\n return !is_Empty(property) ? property : \...
[ "0.70305246", "0.69047487", "0.6835377", "0.6835377", "0.6772228", "0.6709989", "0.6658278", "0.655411", "0.6535934", "0.6382159", "0.63630986", "0.63347906", "0.6291454", "0.626579", "0.6254178", "0.6212612", "0.6212612", "0.6158912", "0.6154588", "0.6142879", "0.6078397", ...
0.5943465
32
From: jQuery File Upload User Interface Plugin 6.8.1 Copyright 2010, Sebastian Tschan Licensed under the MIT license:
function formatBytes(bytes) { if (typeof bytes !== 'number') { return ''; } if (bytes >= 1000000000) { return (bytes / 1000000000).toFixed(2) + ' GB'; } if (bytes >= 1000000) { return (bytes / 1000000).toFixed(2) + ' MB'; } return (bytes / 1000).toFixed(2) + ' KB'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uploader(btnUpload, action, inputFile, status, onSubmit, onComplete, extensions, responseType)\r\n{\r\n if(typeof btnUpload != 'object') btnUpload = $(btnUpload);\r\n if(status && typeof status != 'object') status = $(status);\r\n var indicator = btnUpload.parent().find('.indicator');\r\n ...
[ "0.7346173", "0.7269545", "0.71793306", "0.7072399", "0.7055385", "0.70220786", "0.70204324", "0.6941316", "0.6892936", "0.6869155", "0.6865775", "0.6849341", "0.68297905", "0.68177813", "0.68130076", "0.68064237", "0.67923033", "0.67892325", "0.6775249", "0.67480564", "0.672...
0.0
-1
Bootstrap Alerts Function Name showAlert() Inputs message,alerttype,target Example showalert("Invalid Login","alerterror","alertplaceholder") Types of alerts "alerterror","alertsuccess","alertinfo" Required You only need to add a alert_placeholder div in your html page wherever you want to display these alerts "" Writt...
function showAlert(message, alerttype, target) { $('#'+target).append('<div id="alertdiv" class="alert ' + alerttype + '"><a class="close" data-dismiss="alert">×</a><span>'+message+'</span></div>') setTimeout(function() { // this will automatically close the alert and remove this if the users doesnt close it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lb_alert(type, message) {\n bs_alert(\".featherlight .alert-box\", type, message)\n}", "function dt_alert(type, message) {\n bs_alert(\".top-alert-box\", type, message)\n}", "function bsAlert(){return _callWithEmphasis(this, oj.div, 'alert', 'info', arguments)}", "function showAlert(type,message){...
[ "0.79541725", "0.7758982", "0.7467297", "0.71238285", "0.7116306", "0.70953023", "0.7056593", "0.705531", "0.705178", "0.704039", "0.7036209", "0.69665897", "0.6950952", "0.6932573", "0.6921446", "0.69142073", "0.69090277", "0.6908891", "0.6903944", "0.6895904", "0.68597424",...
0.65075064
69
Attaches a simple dirty flag (one shot change detection) to the supplied model, then once the model changes, autosaves the model using the supplied key every autoSaveIntervalInSeconds seconds.
function autoSaveModel(viewModel, saveUrl, options) { var defaults = { storageKey:window.location.href+'.autosaveData', autoSaveIntervalInSeconds:60, restoredDataWarningSelector:"#restoredData", resultsMessageId:"save-result-placeholder", timeoutMessageSelector:"#timeoutMess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autosave() {\r\n\tif(!changes){\r\n\t\tsetTimeout(save,30000);\r\n\t\tchanges=true;\r\n\t}\r\n}", "function automaticSave() {\n setTimeout(() => {\n let newValue = simplemde.value()\n // skip this method if value not changed\n if (oldValue != newValue) {\n repo.save(ne...
[ "0.6007879", "0.56064135", "0.5348627", "0.5264776", "0.52493846", "0.52258736", "0.5163748", "0.5149728", "0.5081478", "0.5068899", "0.5014792", "0.49835995", "0.49708262", "0.49614742", "0.49614742", "0.49614742", "0.49614742", "0.49614742", "0.49614742", "0.49302855", "0.4...
0.54642534
2
A function that works with documents. Intended for inheritance by ViewModels
function Documents() { var self = this; self.documents = ko.observableArray(); self.findDocumentByRole = function(documents, roleToFind) { for (var i=0; i<documents.length; i++) { var role = ko.utils.unwrapObservable(documents[i].role); var status = ko.utils.unwrapObservable(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isDocument (obj) {\n return MapQLDocument.isDocument(obj);\n }", "get selectedDocument() {\n return new Document(this.object.document, this)\n }", "getDoc () { return this.doc }", "getDoc () { return this.doc }", "getDoc () { return this.doc }", "constructor() {\n\t\t/**\n\t\t * Sel...
[ "0.6463847", "0.63813674", "0.6166319", "0.6166319", "0.6166319", "0.61318016", "0.6105276", "0.606182", "0.597701", "0.59607714", "0.59327036", "0.58911055", "0.5864474", "0.58336675", "0.58336675", "0.58336675", "0.58336675", "0.58336675", "0.5803147", "0.5801819", "0.57806...
0.0
-1
this fuction builds as much of a column as it can without splitting nodes in half. If the last node in the new column is a text node, then it will try to split that text node. otherwise it will leave the node in $pullOutHere and return with a height smaller than targetHeight. Returns a boolean on whether we did some sp...
function columnize($putInHere, $pullOutHere, $parentColumn, targetHeight){ // // add as many nodes to the column as we can, // but stop once our height is too tall while((manualBreaks || $parentColumn.height() < targetHeight) && $pullOutHere[0].childNodes.length){ var node = $pullOutHere[0].childNod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function split($putInHere, $pullOutHere, $parentColumn, targetHeight) {\n if ($putInHere.contents(':last').\n find(prefixTheClassName('columnbreak', true)).length) {\n //\n // our column is on a column break, so just end here\n return;\n }\n if ($putInHere...
[ "0.7348661", "0.7296158", "0.7235158", "0.7235158", "0.71318084", "0.58580196", "0.57960284", "0.57960284", "0.57960284", "0.5776816", "0.5753325", "0.5753325", "0.557834", "0.5552796", "0.55462533", "0.55462533", "0.5542468", "0.5542468", "0.5542468", "0.5542468", "0.5542468...
0.7477146
1
Split up an element, which is more complex than splitting text. We need to create two copies of the element with it's contents divided between each
function split($putInHere, $pullOutHere, $parentColumn, targetHeight){ if($putInHere.contents(":last").find(prefixTheClassName("columnbreak", true)).length){ // // our column is on a column break, so just end here return; } if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitter(el) {\n if (jQuery(el).children().length === 0) {\n return injector(jQuery(el), '', 'char', '');\n }\n return jQuery.each(el.children(),\n function(index, value) {\n splitter(value);\n });\n }", "functio...
[ "0.6221599", "0.62183446", "0.6123562", "0.5961655", "0.5908241", "0.5651793", "0.56041276", "0.556304", "0.54351777", "0.5434215", "0.5429628", "0.53652346", "0.53652346", "0.5342167", "0.52925396", "0.52741706", "0.5216525", "0.5210116", "0.51834863", "0.51795", "0.51526886...
0.5082586
28
returns true if the input dom node should not end a column. returns false otherwise
function checkDontEndColumn(dom){ if(dom.nodeType == 3){ // text node. ensure that the text // is not 100% whitespace if(/^\s+$/.test(dom.nodeValue)){ // // ok, it's 100% whitespace, // so we should return checkDontEndColumn // of the inputs previousSibling if(!dom.previousS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkDontEndColumn(dom) {\n if (dom.nodeType == 3) {\n // text node. ensure that the text\n // is not 100% whitespace\n if (/^\\s+$/.test(dom.nodeValue)) {\n //\n // ok, it's 100% whitespace,\n // so we should return checkDontEndColumn\n ...
[ "0.80605835", "0.70705205", "0.6157889", "0.6101478", "0.6082113", "0.60299027", "0.60009205", "0.5868677", "0.5680208", "0.56675434", "0.56581473", "0.565601", "0.56371117", "0.56084275", "0.5605189", "0.55666125", "0.555669", "0.5554644", "0.5484126", "0.548383", "0.5480782...
0.80314475
2
move blocking element back into the DOM where it started
function reset(els,data,opts,el) { var $el = $(el); if ( $el.data('blockUI.isBlocked') ) return; els.each(function(i,o) { // remove via DOM calls so we don't lose event handlers if (this.parentNode) this.parentNode.removeChild(this); }); if (data && data.el) { data.el.style.display...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keepOriginalElementInDom() {\n var itemsNow = config.items;\n\n if (!draggedEl.parentElement && (!itemsNow[originIndex] || draggedElData[ITEM_ID_KEY] !== itemsNow[originIndex][ITEM_ID_KEY])) {\n document.body.appendChild(draggedEl);\n watchDraggedElement();\n hideO...
[ "0.6339286", "0.61949056", "0.6192937", "0.5956754", "0.5705287", "0.57004553", "0.5686601", "0.56710845", "0.5644719", "0.5632133", "0.5576373", "0.5551481", "0.55444336", "0.5483715", "0.54382765", "0.5428388", "0.54260254", "0.5397131", "0.5372994", "0.5372904", "0.5369641...
0.0
-1
event handler to suppress keyboard/mouse events when blocking
function handler(e) { // allow tab navigation (conditionally) if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) { if (pageBlock && e.data.constrainTabKey) { var els = pageBlockEls; var fwd = !e.shiftKey && e.target === els[els.length-1]; var back = e.shiftKey && e.target === els[0]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ignorePendingMouseEvents() { ignore_mouse = guac_mouse.touchMouseThreshold; }", "function Browser_BlockEvent(event)\n{\n\t//cancel\n\tevent.cancelBubble = true;\n\t//and block\n\tevent.returnValue = false;\n\t//reset key code\n\tevent.keyCode = 0;\n\t//has prevent default?\n\tif (event.preventDefault)\n...
[ "0.7241742", "0.70665693", "0.6937034", "0.6928056", "0.6894002", "0.688127", "0.677871", "0.6776174", "0.67558634", "0.6724156", "0.67120045", "0.66971225", "0.66899556", "0.6681311", "0.66722447", "0.66555977", "0.665429", "0.66305244", "0.6626462", "0.658317", "0.6577224",...
0.0
-1
Above are the variables that should be accessible by all functions
function attachListeners() { // starts a game as soon as a click is done on the table $('td').on('click', function(event){ doTurn(event); }) // switches the game when any of the elements from the #game div is clicked $("#games").click(function(event) { var state = parseState(event) swapGame(state, getGameId...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "function TempVars() {\n}", "_variablesChanged() {}", "calcVars () {}", "function _getCurrentVariables(){\n return [\"ina\", \"ik\", \"il\"];\n }", "transient protected internal function m189() {}", "function initializeStatefulVariables() {\n ...
[ "0.68817985", "0.65352833", "0.6299759", "0.6231364", "0.61901313", "0.6103792", "0.6088014", "0.6074147", "0.5985812", "0.5947501", "0.5947501", "0.59204435", "0.58724195", "0.5865168", "0.58569556", "0.5848911", "0.58345115", "0.58345115", "0.5833634", "0.58254516", "0.5795...
0.0
-1
browsing games gets the JSON from GamesControllerindex and lists previous games on the click of the "Show Previous Games" button
function getPreviousGames() { $.getJSON("/games").done(function(response){ console.log(response.games); showGames(response.games); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function presentPreviousGames() {\n $.get(\"/games\").done(function(response) {\n if (response.data.length > 0) { // games exist in the DB\n response.data.forEach(function(game) { // iterate over the games\n if (game.id > $('#games button:last').text()) {\n $('#games').append(`<button oncl...
[ "0.73368144", "0.6595487", "0.65575755", "0.6539805", "0.64878726", "0.64518386", "0.62074196", "0.618472", "0.617509", "0.61683816", "0.61399555", "0.6102965", "0.6050858", "0.6046813", "0.6041888", "0.6030712", "0.60195106", "0.6013901", "0.60010284", "0.59963304", "0.59947...
0.85388774
0
take the list of games received by AJAX request and displays them in the games div
function showGames(games){ var dom = $(); games.forEach(function(game) { dom = dom.add( showGame(game) ); }) $("#games").html(dom); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAndDisplayBoardGames() {\n $.getJSON(GAMES_URL, function(result) {\n \tlet element = result.boardGames;\n let boardGameElements = $(element).map(function(i) {\n return makeBoardGame(\n element[i].id, \n element[i].name, \n element[i].type, \n element[i].players, \n...
[ "0.7897033", "0.76087713", "0.75789", "0.73254275", "0.7210308", "0.7068327", "0.7038671", "0.70365363", "0.70184046", "0.7009366", "0.69655734", "0.694582", "0.69212514", "0.68853426", "0.68853426", "0.68424433", "0.68140054", "0.6802308", "0.67989445", "0.67824787", "0.6738...
0.72407824
4
switching games is called by click event
function swapGame(state, id) { placeMarks(state); currentGame = id; turn = findTurn(state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switch_game(home, away) {\n ls_update_all = 1;\n ls_home_id = home;\n ls_away_id = away;\n ls_validate_matchup(ls_home_id,ls_away_id);\n ls_check_if_bye();\n show_game(ls_home_id, ls_away_id);\n update_scores();\n if (ls_includeInjuryStatus) ls_update_injuries();\n ls_add_icons(ls_home_id);\n tr...
[ "0.77373", "0.7401686", "0.7335614", "0.7200498", "0.7020434", "0.6967457", "0.6922035", "0.6905323", "0.6892432", "0.6802658", "0.680205", "0.6790794", "0.67844504", "0.67820865", "0.676443", "0.67476743", "0.6731618", "0.67286134", "0.67284214", "0.67168957", "0.6712585", ...
0.0
-1
gets the state for the clicked game
function parseState(event) { return $(event.target).data("state").split(","); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGameState() {\n\t\treturn gameOngoing;\n\t}", "function mousePressed() {\n if (state === \"menu\") {\n if (isDancingClicked(mouseX, mouseY)) {\n state = \"dancing\";\n }\n if (isHowToClicked(mouseX, mouseY)) {\n state = \"howToPlay\";\n }\n }\n}", "function getStates(game) ...
[ "0.6788104", "0.6748973", "0.6717737", "0.67076385", "0.6562135", "0.6543168", "0.65346456", "0.6495112", "0.64665264", "0.64637774", "0.6463495", "0.6447612", "0.6447612", "0.64106256", "0.63832265", "0.63656557", "0.6332343", "0.63305545", "0.63093936", "0.62601656", "0.624...
0.0
-1
gets the game id
function getGameId(event) { return $(event.target).data("gameid"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get gameId() {\n return this._data.game_id;\n }", "getGameId() {\n return this.GameID;\n }", "function createGameID () {\n return \"game\"+(+Date.now());\n}", "static getLastId(){\n let lastId =0\n if (games.length > 0) {\n lastId = games[games.length-1].id\n ...
[ "0.78416777", "0.7479232", "0.7221545", "0.7174587", "0.70469683", "0.6870788", "0.6754401", "0.6575839", "0.6539271", "0.6479426", "0.64720404", "0.64587665", "0.6433042", "0.64295477", "0.642609", "0.6420077", "0.641189", "0.64040184", "0.63949406", "0.6383447", "0.63736206...
0.7095299
4
saving game stores game state in an array
function getMarks() { var marks = [] $("td").each(function(i) { marks.push($(this).text()) }) return marks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "save() {\n localStorage.setItem(\"game\", JSON.stringify(state))\n }", "function saveGame() {\r\n\tlocalStorage.setItem(\"Bread\", bread);\r\n\tlocalStorage.setItem(\"Eggs\", eggs);\r\n\tlocalStorage.setItem(\"Gold\", gold);\r\n\tlocalStorage.setItem(\"Demand\", demand);\r\n\tlocalStorage.setItem(\"Inf...
[ "0.769413", "0.75217646", "0.744899", "0.7427699", "0.7415808", "0.7406155", "0.73233575", "0.7250621", "0.72401786", "0.7217965", "0.71856564", "0.7149255", "0.7036016", "0.7003734", "0.695997", "0.6951975", "0.6871854", "0.6816829", "0.6808591", "0.6777476", "0.67244285", ...
0.0
-1
save with resetCurrentGame that can be set to true
function saveGame(resetCurrentGame) { var url, method; // if no currentGame is defined (has never been saved) we do a POST request, otherwise if replay we PATCH if ( currentGame ) { url = '/games/' + currentGame; method = 'PATCH'; } else { url = '/games'; method = 'POST'; } $.ajax({ url: url, method...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveGame () {\n console.log('PROTOCOL saveGame()', vm.game);\n gameService.push(vm.game)\n .then(handlePrompt.bind(this, 'push'))\n .then(restoreDefaults);\n }", "function saveGame() {\n if (store.getState().lastAction == 'GAME_SAVE' && store.getState().currentP...
[ "0.77726483", "0.75713694", "0.7302409", "0.7171476", "0.7163809", "0.7090016", "0.7084111", "0.7064267", "0.70455945", "0.69870853", "0.6951256", "0.69045806", "0.6788768", "0.67135316", "0.66545147", "0.66478765", "0.6620634", "0.6606951", "0.65598106", "0.6534874", "0.6531...
0.74226236
2
Returns a random integer between min (inclusive) and max (inclusive).
function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n }", "static randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randInt(min, max) { re...
[ "0.9156091", "0.9156091", "0.91516286", "0.91516286", "0.9120011", "0.911338", "0.9112962", "0.91129196", "0.9109812", "0.91025627", "0.91025627", "0.9089922", "0.9075936", "0.9075936", "0.9075936", "0.9075936", "0.9075936", "0.9075936", "0.9075936", "0.9073463", "0.9073463",...
0.0
-1
A simple form that is reusable for all fields
getValidationState(fieldName) { const SUCCESS = 'success'; const ERROR = 'error'; const { pokemon } = this.state; if (fieldName === 'title') { // Bootstrap validation doesn't provide touched event, // we need to prevent showing errors when the form is pristine if (!pokemon.title) retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FormField(input) {\n var _this = this;\n this.HasLabel = true;\n this.Bind = function (e) {\n _this.Value = e.target.value;\n };\n this.Name = input.Name;\n this.Type = input.Type;\n this.Value = input.Value || 0;\n this.Attributes = input...
[ "0.6385348", "0.6379464", "0.63215274", "0.6283504", "0.6264183", "0.6171667", "0.6104887", "0.6093845", "0.60632324", "0.6036023", "0.6023283", "0.6013389", "0.6008199", "0.599792", "0.5997089", "0.59798", "0.5975083", "0.5974343", "0.59646356", "0.5960714", "0.5954643", "...
0.0
-1
FIXME: BROKEN... authentication helper
function finalize(err, uid) { console.error('AUTHENTICATE', err && err.stack || err, uid); // no such user or logout? -> remove req.session if (err || !uid) { // FIXME: instead set a flash with error? delete req.session; // ok? -> set req.session.uid } else { console.error('SIGNE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkAuth() { }", "_parseAuthInfo(){\n if(this.authInfo){\n const authCode = this.authInfo.split(/\\s+/)[1]\n const authDecode = new Buffer(authCode, 'base64').toString()\n const creds = authDecode.split(':')\n this.login = creds[0]\n this.password = creds[1]\n this.user = User.f...
[ "0.74761754", "0.7298278", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", "0.6800699", ...
0.0
-1
MOONHUNTER.NET ======================= Estimated USD difference for Profit Trailer 2.0 Created by ProfitTanker0156 Bug fixed by MoonHunter: 'NaN' in parsing 4 digits number
function parseNumber(val) { return val === undefined ? 0 : parseFloat(val.replace("$", "").replace(",", "")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function usdfunc()\r\n{\r\n inr.value = parseFloat(usd.value) * 2.03032;\r\n eur.value = parseFloat(usd.value) * 1.41544;\r\n cad.value = parseFloat(usd.value) * 1.01941;\r\n aud.value = parseFloat(usd.value) * 0.88297;\r\n}", "function usd(amount) {\n // return +(parseFloat(amount).toFixed(4));\n ...
[ "0.63520557", "0.6225798", "0.6150784", "0.6012591", "0.60009205", "0.59710574", "0.59710574", "0.59361076", "0.5930092", "0.5927534", "0.5906404", "0.5887691", "0.58823514", "0.58745354", "0.58730006", "0.58330894", "0.5825652", "0.580185", "0.57931525", "0.5786377", "0.5784...
0.0
-1
fills spans aray with stored data
function getSpans(){ var spanTextData = localStorage.getItem(pageURL); if(spanTextData == null){ spanTextData = "[]"; }; spans = JSON.parse(spanTextData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fill() {\n\tvar tabel = document.getElementById('time_data');\n\tfor (i = 0; i < sessionTimes.length; i++) {\n\t\t// Creation\n\t\tvar row = tabel.insertRow(i + 1);\n\n\t\tvar numberCell = row.insertCell(0);\n\t\tvar timeCell = row.insertCell(1);\n\t\tvar ao5Cell = row.insertCell(2);\n\t\tvar ao12Cell = r...
[ "0.569011", "0.55489993", "0.55075246", "0.54872185", "0.54769135", "0.5423604", "0.5352598", "0.533586", "0.533402", "0.533402", "0.533402", "0.5328429", "0.53229463", "0.5268488", "0.5263821", "0.5263821", "0.5263821", "0.5263821", "0.5263821", "0.5263821", "0.5263821", "...
0.0
-1
it normalizes offests according to whole text of page
function normalizeOffset(textNode, offset) { if (textNode.nodeType !== 3) { return -1; } // Find entry in textmap array (using binary search) var textmap = textMap, iEntry = textmap.length, entry; while (iEntry-- > 0) { entry = textmap[iEntry]; if (textNode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "normalise (s) {\n // normalise the body text (handling stop words)\n return s.tokenizeAndStem(this.options.keepStops).join(' ')\n }", "function allWords(area) { return toWords(text(area)); }", "function extendText() {\n findTextNodes(document.body).forEach(node => {\n node.textContent = node.text...
[ "0.5638904", "0.546171", "0.5446596", "0.5381771", "0.5342082", "0.533709", "0.53214884", "0.52771103", "0.5252166", "0.52020526", "0.520047", "0.5196596", "0.5190393", "0.5156184", "0.5155825", "0.5155302", "0.5089024", "0.5087325", "0.5086983", "0.50847024", "0.504917", "...
0.0
-1
adds new data to spans array
function addSpan(start, end){ // spans must be ordered // normalize span if (start > end) { var tmp = start; start = end; end = tmp; } start = Math.max(0, start); end = Math.min(textLength, end); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(span) {\n\t if (this.spans.length > this._maxlen) {\n\t span.spanRecorder = undefined;\n\t } else {\n\t this.spans.push(span);\n\t }\n\t }", "add(span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n...
[ "0.6770084", "0.6719987", "0.6674933", "0.62951505", "0.62951505", "0.62894523", "0.62886566", "0.6266881", "0.6266881", "0.6266881", "0.6201024", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6193062", "0.6193062", "0.6193062",...
0.5605906
63
adds new data to spans array
function removeSpans(start, end){ // spans must be ordered // normalize span if (start > end) { var tmp = start; start = end; end = tmp; } start = Math.max(0, start); end = Math.min(textLength, end); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(span) {\n\t if (this.spans.length > this._maxlen) {\n\t span.spanRecorder = undefined;\n\t } else {\n\t this.spans.push(span);\n\t }\n\t }", "add(span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n...
[ "0.6770084", "0.6719987", "0.6674933", "0.62951505", "0.62951505", "0.62894523", "0.62886566", "0.6266881", "0.6266881", "0.6266881", "0.6201024", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6194758", "0.6193062", "0.6193062", "0.6193062",...
0.0
-1
it removes all added spans from page
function unrender(){ var textmap = textMap, i = textmap.length - 1, entry, Node, Parent; // 1st pass, remove highlights while (i-- > 0) { entry = textmap[i]; Node = entry.n.parentNode; if (Node && Node.className && Node....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptySpans() {\n let spans = document.getElementsByTagName(\"SPAN\");\n if (spans.length > 0) {\n for (let i = 0; i < spans.length; i++) {\n spans[i].innerHTML=\"\";\n \n }\n }\n}", "function delspan()\r\n{\r\n\tif(hspan)\r\n\t{\r\n\t\t$(hspan).css(\"display\...
[ "0.7315643", "0.6955964", "0.66749203", "0.6491484", "0.64805007", "0.6417569", "0.6417011", "0.6395754", "0.6388039", "0.6380805", "0.6307153", "0.62608147", "0.6257608", "0.6257165", "0.62461174", "0.6216785", "0.6191758", "0.6178032", "0.61706984", "0.616635", "0.6154547",...
0.0
-1
it adds all spans to page
function render(){ var i = spans.length, span; while (i-- > 0) { span = spans[i]; renderSpan(span.start, span.end); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseDOMspans(info) {\n var validatedSpans = info.spans;\n var longStr = validatedSpans.join('');\n var replaced = longStr.replace(/\\&nbsp\\;/g, '\\n');\n $('.rendered-markdown').append(converter.makeHtml(replaced));\n}", "function update() {\n $spans.each(updateSpan);\n}", "function update() {\...
[ "0.6408164", "0.635124", "0.635124", "0.6012666", "0.59934336", "0.5935627", "0.58354574", "0.57809293", "0.5740574", "0.57397574", "0.5725478", "0.56996477", "0.56972754", "0.5661155", "0.56573427", "0.5641847", "0.5639312", "0.56180257", "0.5561177", "0.5546056", "0.553819"...
0.6829978
0
Test a typed array to have a specific byte length.
byteLength(byteLength) { return this.addValidator({ message: (value, label) => `Expected ${label} to have byte length of \`${byteLength}\`, got \`${value.byteLength}\``, validator: value => value.byteLength === byteLength }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkArrayTypeAndLength(x, expectedType, minLength, maxLength) {\n if (minLength === void 0) { minLength = 0; }\n if (maxLength === void 0) { maxLength = Infinity; }\n assert(minLength >= 0);\n assert(maxLength >= minLength);\n return (Array.isArray(x) && x.length >= minLength && x.length <...
[ "0.6838614", "0.6838614", "0.6818135", "0.6652152", "0.66399574", "0.6259701", "0.62532926", "0.6203186", "0.6203186", "0.6203186", "0.6203186", "0.6203186", "0.6203186", "0.6203186", "0.6203186", "0.6184658", "0.6184658", "0.6128399", "0.609936", "0.60783577", "0.59867877", ...
0.55627185
59
Test a typed array to have a minimum byte length.
minByteLength(byteLength) { return this.addValidator({ message: (value, label) => `Expected ${label} to have a minimum byte length of \`${byteLength}\`, got \`${value.byteLength}\``, validator: value => value.byteLength >= byteLength, negatedMessage: (value, label) => `Expect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayMinSize(array, min) {\n return array instanceof Array && array.length >= min;\n}", "function checkArrayTypeAndLength(x, expectedType, minLength, maxLength) {\n if (minLength === void 0) { minLength = 0; }\n if (maxLength === void 0) { maxLength = Infinity; }\n assert(minLength >= 0);\n ...
[ "0.7189821", "0.686665", "0.686665", "0.66744685", "0.6665305", "0.6605961", "0.63925785", "0.636897", "0.6155216", "0.6109351", "0.5971618", "0.5968523", "0.5952954", "0.5948141", "0.5928137", "0.58816046", "0.5875954", "0.58716553", "0.586564", "0.586564", "0.586564", "0....
0.6288018
8
Test a typed array to have a minimum byte length.
maxByteLength(byteLength) { return this.addValidator({ message: (value, label) => `Expected ${label} to have a maximum byte length of \`${byteLength}\`, got \`${value.byteLength}\``, validator: value => value.byteLength <= byteLength, negatedMessage: (value, label) => `Expect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayMinSize(array, min) {\n return array instanceof Array && array.length >= min;\n}", "function checkArrayTypeAndLength(x, expectedType, minLength, maxLength) {\n if (minLength === void 0) { minLength = 0; }\n if (maxLength === void 0) { maxLength = Infinity; }\n assert(minLength >= 0);\n ...
[ "0.7192286", "0.68644315", "0.68644315", "0.6674301", "0.6663063", "0.6601315", "0.6391064", "0.6367478", "0.6289902", "0.61573833", "0.61084247", "0.59688836", "0.5967645", "0.5949987", "0.5946424", "0.59265935", "0.5880095", "0.58765614", "0.5870917", "0.58641803", "0.58641...
0.5499223
52
Test a typed array to have a specific length.
length(length) { return this.addValidator({ message: (value, label) => `Expected ${label} to have length \`${length}\`, got \`${value.length}\``, validator: value => value.length === length }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkArrayTypeAndLength(x, expectedType, minLength, maxLength) {\n if (minLength === void 0) { minLength = 0; }\n if (maxLength === void 0) { maxLength = Infinity; }\n assert(minLength >= 0);\n assert(maxLength >= minLength);\n return (Array.isArray(x) && x.length >= minLength && x.length <...
[ "0.75266296", "0.75266296", "0.7333707", "0.7007651", "0.678963", "0.67461306", "0.6671103", "0.66513723", "0.66513723", "0.6630188", "0.6623687", "0.65716314", "0.656002", "0.6557172", "0.6543019", "0.65286064", "0.65140665", "0.64761657", "0.6459527", "0.6457148", "0.637164...
0.0
-1
Test a typed array to have a minimum length.
minLength(length) { return this.addValidator({ message: (value, label) => `Expected ${label} to have a minimum length of \`${length}\`, got \`${value.length}\``, validator: value => value.length >= length, negatedMessage: (value, label) => `Expected ${label} to have a maximum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayMinSize(array, min) {\n return array instanceof Array && array.length >= min;\n}", "function checkArrayTypeAndLength(x, expectedType, minLength, maxLength) {\n if (minLength === void 0) { minLength = 0; }\n if (maxLength === void 0) { maxLength = Infinity; }\n assert(minLength >= 0);\n ...
[ "0.8075727", "0.7398518", "0.7398518", "0.71952534", "0.71290547", "0.6515402", "0.6498852", "0.6453549", "0.64494944", "0.63962364", "0.6355595", "0.6343485", "0.6307826", "0.63015276", "0.62351143", "0.6232307", "0.62289536", "0.62289536", "0.62289536", "0.62241185", "0.622...
0.0
-1
Test a typed array to have a maximum length.
maxLength(length) { return this.addValidator({ message: (value, label) => `Expected ${label} to have a maximum length of \`${length}\`, got \`${value.length}\``, validator: value => value.length <= length, negatedMessage: (value, label) => `Expected ${label} to have a minimum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayMaxSize(array, max) {\n return array instanceof Array && array.length <= max;\n}", "function maxLen(array, maxLength) {\n if (array && array.length > maxLength) {\n array.length = maxLength;\n }\n}", "function checkArrayTypeAndLength(x, expectedType, minLength, maxLength) {\n i...
[ "0.82629126", "0.7983378", "0.7212769", "0.7212769", "0.7172668", "0.71151936", "0.7114076", "0.6943962", "0.68769884", "0.68241435", "0.6817225", "0.67285746", "0.672175", "0.6637734", "0.6575016", "0.65212125", "0.64222217", "0.64220715", "0.6392729", "0.63564575", "0.63080...
0.58190036
97
add Template button click
function addNewTemplate() { var templateHtml = $("#template").html(); var template = new Template(); template.makeHtml("templateContent", templateHtml, function(templateName) { console.log('template call back!!..'); // jquery日付の呼び出す初期化 $(".datepicker").datepicker(); // 連動呼び出す itemAreaHide(templateName +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function templateClicked() {\n\t// Now that all the global variables have been set, push everything to the database with a single call\n\tdatabase.ref().push({\n\t\tImageUrl: ImageUrl,\n\t\tcardTemplateURL: cardTemplateURL,\n\t\tcharacterName: characterName,\n\t\tswapiWeight: swapiWeight,\n\t\tswapiHeight: swapiHe...
[ "0.7052271", "0.67935735", "0.6791982", "0.6697078", "0.6575924", "0.6465748", "0.64147484", "0.64147484", "0.6364265", "0.6343695", "0.63207453", "0.61889464", "0.6181934", "0.61471266", "0.6140553", "0.6053418", "0.6045647", "0.603476", "0.6013971", "0.5993287", "0.5981054"...
0.75511914
0
add Item button click
function addItem(countId, content, itemName) { var itemHtml = $("#itemTemplate").html(); var itemCount = $("#" + countId).val(); var item = new Item(); item.makeHtml(content, itemHtml, function(name) { console.log('template call back!!..'); // jquery日付の呼び出す初期化 $(".datepicker").datepicker(); // 連動呼び出す i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function btnAddClick() {\n addItem(); \n}", "click(){\n createAddItemWindow();\n }", "function addItemBtn() {\n $('#')\n $('#add-list-item').show('fast', function() {\n\n });\n console.log ('add item clicked')\n }", "function addItem() {\n\n}", "...
[ "0.7826753", "0.76419085", "0.76067847", "0.7573431", "0.7457935", "0.74014944", "0.7400193", "0.73952156", "0.72785664", "0.7254135", "0.723163", "0.7222317", "0.721541", "0.7204295", "0.7191345", "0.71803045", "0.7178618", "0.7152126", "0.71239865", "0.71187055", "0.7085743...
0.65245533
97
add Item button click
function addValue(countId, content, name) { var valueCount = $("#" + countId).val(); var valueHtml = $("#valueTemplate").html(); var value = new Value(); value.makeHtml(content, valueHtml, function(name) {}, valueCount, name); $("#" + countId).val(parseInt(valueCount) + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function btnAddClick() {\n addItem(); \n}", "click(){\n createAddItemWindow();\n }", "function addItemBtn() {\n $('#')\n $('#add-list-item').show('fast', function() {\n\n });\n console.log ('add item clicked')\n }", "function addItem() {\n\n}", "...
[ "0.7826753", "0.76419085", "0.76067847", "0.7573431", "0.7457935", "0.74014944", "0.7400193", "0.73952156", "0.72785664", "0.7254135", "0.723163", "0.7222317", "0.721541", "0.7204295", "0.7191345", "0.71803045", "0.7178618", "0.7152126", "0.71239865", "0.71187055", "0.7085743...
0.0
-1
delete Item button click
function deleteItem(id) { //該当値行を削除する $('#' + id).remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteItem(e){\n}", "function clickDeleteItem(id) {\n\t\tdeleteBtnHandler(id, 'item', 'items');\n\t}", "function clickDeleteItem(id) {\n\t\tdeleteBtnHandler(id, 'item', 'items');\n\t}", "onClickDeleteBtn(e, index) {\n this.deleteItem(e, arguments[1]);\n this.showNumberOfItems();\n ...
[ "0.83052033", "0.81410164", "0.81410164", "0.80075693", "0.7996822", "0.7899084", "0.7814926", "0.7723597", "0.77108675", "0.76359344", "0.7624054", "0.7611176", "0.76042813", "0.75704753", "0.75414705", "0.75093734", "0.7500908", "0.7494193", "0.74434483", "0.7431888", "0.73...
0.0
-1
delete Template button click
function delTemplate(id) { //該当値行を削除する $('#' + id).remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteTemplateElement(req){\n deleteElement(dataTable_templates,'#template_'+req.request.data);\n updateTemplateSelect();\n}", "function deleteCurrentTemplate() {\r\n\t\t$('ul#template_queue').children('li').each(function (key, val) {\r\n\t\t\t$('div.bqremove:first').click();\r\n\t\t});\r\n\t}", ...
[ "0.78183687", "0.73161745", "0.69009876", "0.6776956", "0.6747475", "0.6720643", "0.67001957", "0.66598094", "0.66447", "0.6610649", "0.6584556", "0.64965594", "0.64945596", "0.6443326", "0.6424617", "0.6424617", "0.6420385", "0.6393972", "0.638159", "0.63601524", "0.63335806...
0.7221708
2
delete Template button click
function delValue(id) { //該当値行を削除する $(id).parent().parent().remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteTemplateElement(req){\n deleteElement(dataTable_templates,'#template_'+req.request.data);\n updateTemplateSelect();\n}", "function deleteCurrentTemplate() {\r\n\t\t$('ul#template_queue').children('li').each(function (key, val) {\r\n\t\t\t$('div.bqremove:first').click();\r\n\t\t});\r\n\t}", ...
[ "0.78183687", "0.73161745", "0.7221708", "0.69009876", "0.6776956", "0.6747475", "0.6720643", "0.67001957", "0.66598094", "0.66447", "0.6610649", "0.6584556", "0.64965594", "0.64945596", "0.6443326", "0.6424617", "0.6424617", "0.6420385", "0.6393972", "0.638159", "0.63601524"...
0.0
-1
Crea dos empleados y los aniade a la tabla
function inicializarEmpleados() { monitor = new Monitor("Pedro", "123A", "678", "Zumba - Yoga", 10, 20); aniadirEmpleadoTabla(monitor); vectorEmpleados.push(monitor); fisio = new Fisioterapeuta("Marina", "123B", "692", 8); aniadirEmpleadoTabla(fisio); vectorEmpleados.push(fisio); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aniadirEmpleadoTabla(empleado) {\n\tvar tablaEmpleados = document.getElementById(\"tablaEmpleados\");\t\n\tvar celda;\n\tvar contadorCeldas = 0;\n\tvar fila = tablaEmpleados.insertRow(-1);\n\n\t//Vamos creando las celdas con el contenido del objeto\n\tvar newCell = fila.insertCell(contadorCeldas);\n\tnewC...
[ "0.747786", "0.7425982", "0.7033116", "0.68910986", "0.6873037", "0.6845921", "0.6811374", "0.67956847", "0.67766273", "0.67678195", "0.6765312", "0.6731641", "0.67006916", "0.6688527", "0.66873187", "0.66729856", "0.6656581", "0.6651684", "0.66354346", "0.66195285", "0.66132...
0.6715516
12
Crea los vectores de actividades y las aniade a la tabla
function inicializarActividades() { //Creamos actividades por defecto actividad1 = new Actividad("Yoga", 60, 1); actividad2 = new Actividad("Cross-Fit", 45, 2); actividad3 = new Actividad("Zumba", 30, 1); vectorActividades.push(actividad1); vectorActividades.push(actividad2); vectorActividades.push(actividad3);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearActividad() {\n\tvar name = document.getElementById(\"nombreActividad\").value;\n\tvar duracion = document.getElementById(\"duracion\").value;\n\tvar selectorSala = document.getElementById(\"selectorSala\");\n\tvar sala = selectorSala.options[selectorSala.selectedIndex].value;\n\n\tif (name == \"\" |...
[ "0.65439653", "0.65216327", "0.62512594", "0.6192529", "0.6170626", "0.61427724", "0.6018191", "0.6016725", "0.6010616", "0.5998011", "0.59895694", "0.5989401", "0.59836406", "0.5969645", "0.59450334", "0.5943393", "0.5942992", "0.59416306", "0.59220016", "0.5920224", "0.5911...
0.7834233
0
Crea las salas por defecto y las aniade a la tabla
function inicializarSalas() { //Creamos salas por defecto -- No vamos a dar opcion de crear mas sala1 = new Sala(1, 25, vectorActividades); // Las 3 actividades por defecto se pueden hacer en las dos salas sala2 = new Sala(2, 20, vectorActividades); vectorSalas.push(sala1); vectorSalas.push(sala2); //Aniadimos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearTablaEscalerasValoresObservacionFinal(){\n db.transaction(function (tx) {\n tx.executeSql('CREATE TABLE escaleras_valores_finales (k_codusuario,k_codinspeccion,o_observacion)');\n }, function (error) {\n console.log('transaction error: ' + error.message);\n }, function () {\n $('#texto_ca...
[ "0.6606981", "0.6527885", "0.6501044", "0.64393634", "0.6326659", "0.6301627", "0.6296828", "0.6192872", "0.61517745", "0.61172867", "0.6102464", "0.6100184", "0.6086248", "0.60736746", "0.60704154", "0.6050321", "0.600709", "0.59819627", "0.5977101", "0.5930683", "0.5893659"...
0.70204216
0
Misma funcion que en la practica pasada. Crea la tabla del horario
function crearHorario() { var tabla = document.getElementById("horario"); //limpiarHorario(tabla); for (var fila = 1; fila < tabla.rows.length; fila++) {//Empezamos en 1 para saltarnos el header for (var col = 1; col < tabla.rows[0].cells.length; col++) { var indiceAleatorio = Math.floor(Math.random() * ve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearTablasInspeccionAscensores(){\n crearTablaInformeValoresAudios();\n\n crearTablaAscensorValoresAudios();\n crearTablaAscensorValoresFotografias();\n crearTablaAscensorValoresIniciales();\n crearTablaAscensorValoresPreliminar();\n crearTablaAscensorValoresProteccion();\n crearTablaAscensorValor...
[ "0.7442934", "0.7414031", "0.72917414", "0.7268136", "0.7242222", "0.72209245", "0.71889883", "0.71631294", "0.71617836", "0.7150736", "0.71454984", "0.7142688", "0.71335065", "0.71327186", "0.71208626", "0.7102329", "0.7100471", "0.7077742", "0.70771056", "0.7075644", "0.707...
0.76945937
0
Recibe los datos del input y crea una nueva actividad
function crearActividad() { var name = document.getElementById("nombreActividad").value; var duracion = document.getElementById("duracion").value; var selectorSala = document.getElementById("selectorSala"); var sala = selectorSala.options[selectorSala.selectedIndex].value; if (name == "" || duracion == "" || sala...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInput(data) {\n\n}", "function Input() {}", "receiveInputData() {\n const receivedItem = {};\n receivedItem.title = document.getElementById('input-item').value;\n // receivedItem.status = \"active\";\n this.data.push(receivedItem);\n this.addItem(receivedItem);...
[ "0.69409335", "0.63020325", "0.59090143", "0.58569765", "0.58086467", "0.5775636", "0.57628775", "0.5761727", "0.5734639", "0.57238775", "0.5706503", "0.56872016", "0.5677073", "0.5660345", "0.56531733", "0.56277186", "0.5622509", "0.56119204", "0.55864894", "0.5579362", "0.5...
0.53852177
48
Al igual que en la actividad, recoge los datos del form y crea el objeto empleado. Se podria hacer con la validacion de los formularios mas rapido que con DOM e ids...
function crearEmpleado() { var name = document.getElementById("inputNombreEmpleado").value; var dni = document.getElementById("inputDniEmpleado").value; var telefono = document.getElementById("inputTelefono").value; var horasConsulta = document.getElementById("inputHorasConsulta").value; var actividades = document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateJs2Form(){\n\t//Primero determinamos el modo en el que estamos;\n\tvar mode = getMMGMode(get('cobEtapaDeudaFrm.accion'), \n\t\tget('cobEtapaDeudaFrm.origen'));\n\n\n\tset('cobEtapaDeudaFrm.id', jsCobEtapaDeudaId);\n\tset('cobEtapaDeudaFrm.codEtapDeud', jsCobEtapaDeudaCodEtapDeud);\n\tset('cobEtapa...
[ "0.70248365", "0.7017789", "0.6929477", "0.68616927", "0.68355525", "0.6810763", "0.6805125", "0.6771461", "0.6733029", "0.6693359", "0.6674359", "0.6670295", "0.66633505", "0.6660323", "0.6637963", "0.6629598", "0.6611089", "0.6596922", "0.65768343", "0.6556844", "0.6553413"...
0.0
-1
Aniade el empleado dado por parametro a la tabla de empleados
function aniadirEmpleadoTabla(empleado) { var tablaEmpleados = document.getElementById("tablaEmpleados"); var celda; var contadorCeldas = 0; var fila = tablaEmpleados.insertRow(-1); //Vamos creando las celdas con el contenido del objeto var newCell = fila.insertCell(contadorCeldas); newCell.innerHTML = emplead...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function empDt() {\n let depdtArr = empDataTable();\n depdtArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function getOrdenes() {\n\tvar tabla = $(\"#ordenes_trabajo\").anexGrid({\n\t class: 'table-striped table-bordered table-hover',\n\t...
[ "0.62773633", "0.6182904", "0.6106214", "0.60893327", "0.5977278", "0.5953416", "0.5870151", "0.5827029", "0.5802315", "0.5788374", "0.5781245", "0.57295185", "0.57191426", "0.57111835", "0.56974185", "0.5684481", "0.5676672", "0.5644361", "0.56347054", "0.5632179", "0.563206...
0.59644306
5
Muestra los datos del empleado
function mostrarDescripcion(boton) { var indiceFila = boton.parentNode.parentNode.rowIndex; // El padre es el td cuyo padre es el tr var empleado = vectorEmpleados[indiceFila - 1]; // El row index no empieza en cero alert(empleado.getDescripcion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEmpleadosTabla() {\n $http.post(\"EmpleadosTabla/getEmpleadosTabla\").then(function (r) {\n if (r.data.cod == \"OK\") {\n vm.lista.data = r.data.d.tablaEmpleado\n vm.lista.disp = [].concat(vm.lista.data);\n }\n })\n }", "function ca...
[ "0.6928956", "0.66288215", "0.6520214", "0.6512977", "0.63150424", "0.62313217", "0.6177899", "0.61690485", "0.61628234", "0.6161493", "0.61439484", "0.6138259", "0.6128048", "0.6125711", "0.61202204", "0.60593057", "0.60458124", "0.60245466", "0.6009038", "0.6006609", "0.598...
0.0
-1
User pressed arrow down or up in an editor and on last or first line of code block respectively: Append or prepend an exit block
function onArrow (opts, event, editor, next) { const { value } = editor if (value.selection.isExpanded) { return next() } const { document } = value const currentLine = value.startBlock const currentBlock = value.document.getParent(currentLine.key) const parent = value.document.getParent(currentBloc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertBreak(editor) {\n editor.insertBreak();\n }", "insertBreak(editor) {\n editor.insertBreak();\n }", "function EditorCleanup() {\n SwitchInsertCharToAnotherEditorOrClose();\n}", "function editor_tools_handle_code() {\n editor_tools_add_tags('[code]\\n', '\\n[/code]\\n');\n editor_tools_foc...
[ "0.6639814", "0.6639814", "0.6275196", "0.62031776", "0.6119647", "0.6040599", "0.6032469", "0.59775144", "0.59257925", "0.5922741", "0.5866341", "0.5857611", "0.58367807", "0.58362275", "0.58217204", "0.5818992", "0.5816265", "0.57657313", "0.5762224", "0.5735324", "0.571694...
0.6355222
2
Place the marker for the user; if the marker exists already, update its location and tooltip
function placeMarker(location) { if (!userMarker) { userMarker = new google.maps.Marker({ position: location, map: map, icon: { path: google.maps.SymbolPath.BACKWARD_CLOSED_ARROW, fillColor: "#4444FF", fillOpacity: 0.8, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function placeMarker(location) {\n if (userMarker) {\n //if marker already was created change position\n userMarker.setPosition(location);\n } else {\n //create a marker\n userMarker = new google.maps.Marker({\n position: location,\n map: map,\n });\n ...
[ "0.7583034", "0.71829665", "0.70582646", "0.6945859", "0.6939484", "0.6745597", "0.67153454", "0.6661863", "0.66487074", "0.65811604", "0.65630376", "0.65558755", "0.653586", "0.6529525", "0.649346", "0.64912677", "0.6473043", "0.6471981", "0.6471981", "0.644836", "0.64245296...
0.76558787
0
Update the position, title, and location state for the user's marker
function updateMarkLocation(location) { userMarker.setPosition(location); userMarker.setTitle("Lat: " + location.lat() + ",\nLng: " + location.lng()); userMarkerLocation = location; console.log("userMarkerLocation = " + userMarkerLocation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUserMarker() {\n if (bigMap.config.markers.hasOwnProperty('user')) {\n $log.log(TAG + 'updateUserMarker');\n bigMap.config.markers.user.lat = UserLocation.real.lat;\n bigMap.config.markers.user.lng = UserLocation.real.lon;\n }\n }", "function updateUserLocationOnM...
[ "0.73853785", "0.7164105", "0.7037052", "0.703011", "0.68525493", "0.6827663", "0.6760321", "0.67558885", "0.6742756", "0.6738667", "0.67203563", "0.66845286", "0.66702724", "0.66569847", "0.66450655", "0.66411245", "0.66302806", "0.6618201", "0.65600944", "0.6555724", "0.655...
0.81913465
0
b64 image conversion docxtemplater
function base64DataURLToArrayBuffer(dataURL) { Canvas = require('canvas'); let im = new Canvas.Image; im.onload = function() { imgHeight = im.height; imgWidth = im.width; }; im.src = dataURL; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "raw_blob(txt) { return Base64.decode(txt) }", "async function imgTob64 (image_source){\n\n}", "apply_blob(blob) { return Base64.encode(blob) }", "function convertImage(type, data) {\n return \"\\\"data:image/\" + type + \";base64,\" + (new Buffer(data).toString('base64')) + \"\\\"\";\n }", "getInlineAt...
[ "0.5901633", "0.58949137", "0.5892903", "0.56014067", "0.5574752", "0.55634284", "0.55337286", "0.5533561", "0.5468988", "0.54689276", "0.54233843", "0.5416242", "0.540525", "0.53508604", "0.53462464", "0.5324312", "0.5285355", "0.528146", "0.5259243", "0.52364594", "0.523307...
0.0
-1
ILLEGAL 0 DIRECT 1 INHERENT 2 BRANCH_REL_16 3 IMMEDIAT_8 4 BRANCH_REL_8 5 INDEXED 6 EXTENDED 7 IMMEDIAT_16 8
function disasm(i, a, b, c, d, pc) { const toHexN = function(n,d) { var s = n.toString(16); while (s.length < d) { s = '0' + s; } const hexString = '$' + s.toUpperCase(); return hexString; }; const toHex2 = function(n) { return toHexN(n & 0xff,2); }; co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function Hx(a){return a&&a.ic?a.Mb():a}", "static final private protected public internal function m102() {}", "protected internal function m252() {}", "static final protected internal function m110() {}", "handleDemodData(iFloat,iShort,asComplex) {\n // if( this...
[ "0.53264403", "0.52010924", "0.50357825", "0.49647465", "0.4892886", "0.48928475", "0.4867899", "0.4841626", "0.48355803", "0.4819605", "0.48020056", "0.4779521", "0.47770098", "0.47763973", "0.4757987", "0.4754351", "0.47490466", "0.4730819", "0.47296825", "0.47293013", "0.4...
0.0
-1
Gets the value from the target event.
function getTargetValue(target, emptyToNull = false) { if (target.type === "checkbox") return target.checked if (target.type === "select-multiple") { const values = [] for (let i = 0; i < target.options.length; i++) { if (target.options[i].selected) { values.push(target.options[i].value) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTargetValue(event) {\n var target = event.target, val = target.value;\n switch (target.tagName) {\n case \"SELECT\":\n // React treats <… someAttr={null|true|false|option} …>\n // specially. So working around that.\n if (val == 'null') {\n va...
[ "0.7102261", "0.68661124", "0.6576179", "0.6560834", "0.6440241", "0.6370441", "0.6335942", "0.62138057", "0.61270726", "0.6087654", "0.6068149", "0.60491353", "0.60491353", "0.6024862", "0.5955683", "0.5942752", "0.59248424", "0.58989894", "0.58847076", "0.5869741", "0.58697...
0.566892
59
Utils / TODO(wnh): This is SOOOO gross. I feel dirty.
function seasonToFrom(season) { if (season === 1980) { return '0001-01-01' } else { return format(new Date(season, 5, 1), 'YYYY-MM-DD') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "static final private internal function m106() {}", "transient private protected internal function m182() {}", "transient protected internal ...
[ "0.68980974", "0.667935", "0.6661462", "0.63947666", "0.63805366", "0.6230205", "0.61643595", "0.60453004", "0.60284567", "0.6002365", "0.59873414", "0.5981893", "0.5957777", "0.5867205", "0.5839009", "0.5826664", "0.5826664", "0.5782677", "0.5778402", "0.5728496", "0.5709247...
0.0
-1
undefined You may concatenate strings, but you may not use any other properties or methods from JavaScript's builtin String class.
function repeat(string, times) { if (typeof(times) !== 'number' || times < 0) return undefined; let repeatedString = ''; for (let counter = 1; counter <= times; counter += 1) { repeatedString += string; } return repeatedString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function String$prototype$concat(other) {\n return this + other;\n }", "function String$prototype$concat(other) {\n return this + other;\n }", "function sc_stringAppend() {\n return \"\".concat.apply(\"\", arguments);\n}", "function concatenateStrings(string1, string2) {\r\n return string1 + st...
[ "0.75446695", "0.75446695", "0.7429713", "0.73296845", "0.7152561", "0.7094211", "0.7052889", "0.7033952", "0.69779974", "0.6912561", "0.675513", "0.6731801", "0.66960657", "0.6627119", "0.657617", "0.6570003", "0.65683526", "0.6523998", "0.65044135", "0.6472389", "0.6429307"...
0.0
-1
Google Analytics function to track User interaction on page
callEvent(event) { trackEvent('Single Page', 'clicked ' + event.currentTarget.id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GAtracking() {\n // Custom Google Analytics tracking code\n // ...\n}", "viewed() {\n this.tracker('trackPageView')\n this.trackPageViewCalled = true\n }", "function invokeCustomEventTracking() {\n $('body').addClass('google-analytics-loaded');\n\n // Utility method\n if (!Array.protot...
[ "0.71072525", "0.7061238", "0.704074", "0.6918714", "0.69016784", "0.6805087", "0.67995614", "0.67598534", "0.6731259", "0.66740566", "0.6654815", "0.66443247", "0.66085446", "0.6605992", "0.6538758", "0.6525258", "0.6514609", "0.65133154", "0.646828", "0.64312494", "0.640337...
0.60041803
51
find if atall that agent owners the advert he wants to do operations on
static AgentAndOwner(req, res, next) { const { user, property } = res.locals; console.log(property.owner.id,user.id) if (user.id !== property.owner.id) return res.status(403).send({ status: 403, error: 'Your do not own this property' }); next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getallwillOwners() {\n let accounts = await web3.eth.getAccounts();\n let owners = await contract.methods\n .getAllUsersAddresses()\n .call({ from: accounts[0] });\n setWillOwner(owners);\n }", "findOwners() {\n return this._getRelationship('owner', 'from');\n }", "functi...
[ "0.5952044", "0.5919046", "0.5598377", "0.55591834", "0.5559001", "0.5544693", "0.5461297", "0.54320186", "0.53842175", "0.5318146", "0.5317091", "0.525518", "0.52470493", "0.5229367", "0.52173334", "0.52139896", "0.519506", "0.5181414", "0.51415807", "0.5136928", "0.5115603"...
0.545539
7
Function That Runs the Entire Game
function runGame() { var counter = 0; // Randomly Generated Target Number var targetNumber = Math.floor(Math.random() * ((120-19)+1) + 19); $("#numberToMatch").text(targetNumber); // Four Generated Crystal Values var numberOptions = []; while (numberOptions.length < 4) { var randomNumber = M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runGame() {\n\t// DISPLAY WELCOME BANNER\n\n\t// STORE INITIAL GAME STATE\n\n\t// WHILE LOOP FOR WHEN GAME IS NOT WON\n}", "runGame(){\n\t\t\tthis.scene.runGame();\n\t\t}", "function run () {\n var $canvasBox;\n \n $('#newGameLink').removeAttr('disabled'); // can click new game link\n\n if...
[ "0.80655736", "0.7854961", "0.764418", "0.7537031", "0.75156623", "0.7477185", "0.7476809", "0.74653804", "0.7330553", "0.7293605", "0.7282074", "0.72342056", "0.7231701", "0.7223763", "0.7220658", "0.7196074", "0.71845615", "0.7180061", "0.71345645", "0.7127852", "0.71277416...
0.0
-1
Function That Checks the Score and Updates HTML Then Restarts Game
function scoreChecker() { if (counter === targetNumber) { wins++; $(".wins-losses").append('<p class="statusDisp">You Won!</p>'); $("#winsNumber").text(wins); counter = 0; $("#totalScore").text(counter); numberOptions = [0, 0, 0, 0]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scoreCheck() {\n\tscoreHTML.innerHTML = score;\n\thealthHTML.innerHTML = health;\n\n\tif(score >= 100) {\n\t\talert('You Win!!')\n\t\treloadPage();\n\t}\n\telse if(health <= 0) {\n\t\talert('You Lose! :( \\nPlease Play Again')\n\t\treloadPage();\n\t}\n}", "function startGame() {\n\n //Reset game\n sco...
[ "0.7557851", "0.7476955", "0.7464238", "0.7454161", "0.7405778", "0.734346", "0.73181313", "0.7277198", "0.72594535", "0.7253612", "0.72498614", "0.72311425", "0.72269225", "0.72224325", "0.72180855", "0.720875", "0.72049445", "0.7203711", "0.71855295", "0.7185341", "0.715994...
0.6962042
46
Passing an invalid presence object may crash application as there is currently no type checking
updatePresence(presence = {}) { debug('discord updatePresence') debug(JSON.stringify(presence)) if (!DiscordLib) { return } // We convert the strings into buffers // Probably good idea to perform other checks or set defaults here Object.keys(presence).forEach(key => { if (typeof presence[key] === '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notValid_anySimpleType(strObj) {\n\treturn false;\n }", "function ofTypeOrThrow(obj, type, error) {\n if (typeof obj == type || false) {\n return obj;\n } else {\n throw error || 'Invalid type: must be a ' + type;\n }\n }", "function checkObject (aObject,...
[ "0.5495193", "0.54228336", "0.53856474", "0.53567576", "0.5238295", "0.5215152", "0.51847214", "0.5173523", "0.5162918", "0.5138519", "0.51368195", "0.51279855", "0.5125452", "0.5125452", "0.5125452", "0.5125452", "0.5125452", "0.5125452", "0.51138955", "0.50986904", "0.50917...
0.0
-1
SwitchCase function determines which command gets called
function SC(command, term) { switch (command) { case "concert-this": concertSearch(term); break; case "spotify-this-song": songSearch(term); break; case "movie-this": if (term === "" || term === null) { movieSearch(); } else { movieSearch(term); } break; case "do-w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchBoard() {\n // console.log(\"The value of command is: \" + command);\n\n switch (command) {\n case \"concert-this\": \n // console.log(\"option1\");\n concertThis(queryTerm);\n break;\n case \"spotify-this-song\":\n // console.log(\"opt...
[ "0.7696083", "0.7643788", "0.7557666", "0.7212474", "0.72003806", "0.7093032", "0.7085555", "0.6960804", "0.6672576", "0.6590863", "0.656491", "0.6558844", "0.65409446", "0.64592755", "0.64245313", "0.64216834", "0.6417106", "0.6417106", "0.6319001", "0.63008916", "0.624878",...
0.0
-1