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
Limpieza de indicadores de error
function clearErrors(){ input.value = ""; msg.classList.remove('error'); input.classList.remove('invalid'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get ERROR() { return 3 }", "static get ERROR () { return 0 }", "function err( i ) {\n if ( !data.errors ) return \"🚨 (Modular): \";\n\n let args = data.errors[i],\n type = `[${ args[0] }]`,\n position = \"\",\n information,\n error;\n\n // Removing error type\n args.shi...
[ "0.67293704", "0.6532073", "0.65063846", "0.6459033", "0.64382535", "0.63953424", "0.6358278", "0.6352945", "0.6308334", "0.62788403", "0.6245247", "0.6242229", "0.6242229", "0.6242229", "0.6231162", "0.6231162", "0.62229353", "0.6221002", "0.62200373", "0.62200373", "0.62195...
0.0
-1
MUESTRO VISUALMENTE LA RESPUESTA DE LA API
function displayUi(oldUrl, newUrl){ const li = document.createElement('li'); const p1 = document.createElement('p'); const div = document.createElement('div'); const p2 = document.createElement('p'); const button = document.createElement('button'); //agrego contenido p1.textContent = oldUrl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchMyAPI() {\t\t\n\t\tPromotionsService.getActivePromotions().then(\n\t\t\tresponse => {\n\t\t\t\tsetData(response);\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tif (error.response.status === 404) {\n\t\t\t\t\talert(`L'application nécessite une mise à jour`);\n\t\t\t\t} else {\n\t\t\t\t\talert(`Uho, il se...
[ "0.6511057", "0.64829797", "0.64829797", "0.6476581", "0.6469098", "0.6402954", "0.63540393", "0.63293284", "0.61495763", "0.6115795", "0.6106972", "0.608739", "0.6084094", "0.60233134", "0.60104924", "0.5989436", "0.5989291", "0.5968756", "0.59522885", "0.59505546", "0.59417...
0.0
-1
AGREGO A SESSION STORAGE
function addSessionStorage(oldUrl, newUrl){ let newResult = { 'user': oldUrl, 'api': newUrl }; //chequeo si existe algo ya almacenado if(sessionStorage.result){ result = JSON.parse(sessionStorage.getItem('result')); } else { //creo un array para almacenar los resultados de cada llamado ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addSessionToStorage() {\n localStorage.setItem(STORAGE_KEY, JSON.stringify(this._session));\n }", "function saveSession(){\n sessionStorage.setItem('timers', JSON.stringify(Timers));\n sessionStorage.setItem('settings', JSON.stringify(settingsDefaults));\n}", "function storesessiondata(){\n\tv...
[ "0.73048264", "0.7066374", "0.7026301", "0.6859056", "0.68513286", "0.6837905", "0.68222857", "0.67020285", "0.66775215", "0.66774887", "0.6670891", "0.6670348", "0.6631777", "0.6587968", "0.6545353", "0.65426356", "0.6519907", "0.6505121", "0.6505121", "0.6478499", "0.647153...
0.0
-1
Trying something//////////////////////////////////// Event Handler
function lookUpWeatherForZipCode_Click() { var zcode = $("#zipBox").val(); lookupLatLong("", "", zcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleEvent() {}", "handleEvent() {}", "onEvent() {\n \n }", "handleEvents() {\n }", "_evtChange(event) { }", "updated(e){}", "function handler() {\n fired = true;\n }", "handleEventChange() {\n }", "firstUpdated(e){}", "function handleEvent(event) {\n\n }", "function InternalEv...
[ "0.71512485", "0.71512485", "0.68533635", "0.6753761", "0.6749496", "0.6581471", "0.65708816", "0.6570296", "0.64803374", "0.646806", "0.64430255", "0.64430255", "0.64430255", "0.64430255", "0.64430255", "0.64321715", "0.6416889", "0.6343475", "0.6338494", "0.631101", "0.6308...
0.0
-1
search for dates on selected prov and area
function searchFromProv_Area(prov,area){ $scope.dates = []; dates = []; console.log("searchFromProv_Area is : "+$scope.selectFilter.prov+" : "+$scope.selectFilter.area); refJobsID.on("value", function(snapshot) { $scope.JobsIDdata = snapshot.val(); // console.log($scope.JobsIDdata...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchHotelsByDate(){\n totalNight();\n resultHotel= [];\n const start = new Date (dateFrom.value).getTime();\n const end = new Date (dateTo.value).getTime();\n if(start <= end){\n resultHotel = hotels.filter((hotel)=>{\n let available = false\n hotel.availability.forEa...
[ "0.6518934", "0.6397725", "0.61156696", "0.61156696", "0.598729", "0.59050137", "0.5884962", "0.5827258", "0.5797925", "0.57933146", "0.5698595", "0.5692704", "0.5645925", "0.5639306", "0.56091005", "0.5602812", "0.55887926", "0.55663097", "0.5556487", "0.55528945", "0.555134...
0.69208556
0
A day from the previous/next month on the grid
function FillDay(day) { this.type = "fill" this.day = day this.dayOfMonth = day.getDate() if(day.getDate() == new Date().getDate() && day.getMonth() == new Date().getMonth()){ this.isToday = true; } else{ this.isToday = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "prevMonth() {\n if (this.monthIndex==0){\n this.monthIndex = 11;\n this.month = monthsArray[this.monthIndex];\n this.year -= 1;\n } else {\n this.monthIndex -= 1;\n this.month = monthsArray[this.monthIndex];\n }\n this._renderCalend...
[ "0.6835745", "0.6595409", "0.65933484", "0.6583589", "0.64852077", "0.6473222", "0.644993", "0.64374924", "0.64237547", "0.64189696", "0.6401385", "0.63944346", "0.63944346", "0.63845456", "0.63840914", "0.6323784", "0.62878793", "0.6270032", "0.6215791", "0.62087804", "0.616...
0.0
-1
A day from the current month
function Day(day) { if(validDateWeek(day)) this.type = "day"; else this.type = "fill"; this.day = day; this.dayOfMonth = day.getDate(); if(day.getDate() == new Date().getDate() && day.getMonth() == new Date().getMonth() && day.getFullYear() == new Date().getFullYear()){ this.isToday = true; } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findCurrentDayInMonth(){\n let day = currentDate.getDate();\n console.log(\"current day is\",day);\n return day;\n}", "function monthDay() {\n return doFormat(date, {\n month: 'long',\n day: 'numeric'\n });\n }", "getDayOfTheMonth(){\...
[ "0.77977735", "0.749841", "0.694612", "0.6912491", "0.6885996", "0.68562734", "0.68249285", "0.67991513", "0.67844594", "0.6759236", "0.6714634", "0.65998226", "0.65794307", "0.6551553", "0.6517213", "0.65166897", "0.6419557", "0.639618", "0.63886636", "0.63886315", "0.638739...
0.0
-1
this method is called when your extension is deactivated
function deactivate() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deactivate() {\n\tconsole.log('关闭扩展')\n}", "function deactivate() {\n example.deactivate();\n console.log(`Extension(${example.name}) is deactivated.`);\n}", "function deactivateExtension() {\n Privly.options.setInjectionEnabled(false);\n updateActivateStatus(false);\n}", "function deactivat...
[ "0.8011084", "0.7815618", "0.7768406", "0.76137966", "0.7570413", "0.75452274", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", "0.73553675", ...
0.0
-1
Clear the contents of the MappedDisposable. Disposables keyed to objects are not disposed of.
clear(){ if(this.disposed) return; this.disposables.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearObjects() {\n setMapOnAll(null);\n}", "clearAndClose() {\n this.tensorMap.forEach(value => value.dispose());\n this.tensorMap.clear();\n this.handle.dispose();\n }", "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.len...
[ "0.70600116", "0.68788904", "0.66818184", "0.6596393", "0.6539745", "0.6482883", "0.6376435", "0.6275623", "0.626515", "0.6254403", "0.6252425", "0.6252425", "0.6252425", "0.6252425", "0.6252425", "0.6252425", "0.6252425", "0.6252425", "0.6252425", "0.6248486", "0.6231537", ...
0.6888086
1
Remove all patterns and values held in the instance.
clear(){ const patterns = instancePatterns.get(this); patterns.clear(); super.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static purgeSettings() {\n for (const value of GM_listValues()) {\n GM_deleteValue(value);\n }\n }", "clear()\n {\n this._keywordByFilter.clear();\n this._simpleFiltersByKeyword.clear();\n this._complexFiltersByKeyword.clear();\n this._compiledPatternsByKeyword.clear();\n...
[ "0.63957787", "0.62388974", "0.62306243", "0.61691856", "0.6167477", "0.6074893", "0.6072258", "0.60537624", "0.60425174", "0.6032658", "0.59973025", "0.5977745", "0.5965149", "0.59548", "0.59474117", "0.59020555", "0.58762676", "0.5854243", "0.5831974", "0.5824452", "0.58220...
0.79024583
0
Empty the contents of the PatternSet.
clear(){ const patterns = instancePatterns.get(this); patterns.clear(); super.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n\t\tlet e = this.first();\n\t\twhile (e != 0) { this.delete(e); e = this.first(); }\n\t}", "clear()\n {\n this._keywordByFilter.clear();\n this._simpleFiltersByKeyword.clear();\n this._complexFiltersByKeyword.clear();\n this._compiledPatternsByKeyword.clear();\n this._keywordlessCompil...
[ "0.68450814", "0.64846677", "0.639715", "0.6306062", "0.62646896", "0.6197863", "0.6183276", "0.61721927", "0.6166993", "0.6142827", "0.61361665", "0.6071749", "0.6049376", "0.60389614", "0.60263574", "0.60206383", "0.60143834", "0.6009029", "0.60050595", "0.59976524", "0.599...
0.72453606
1
I don't think Array.isArray is well supported. Use this function instead for now so that if we need to add a fallback it won't take as much effort.
function isArray(object) { return Array.isArray(object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isArray(value) {\n return Array.isArray(value);\n }", "function array_test(x) {\n if (Array.isArray === undefined) {\n return x instanceof Array;\n } else {\n return Array.isArray(x);\n }\n}", "function array_test(x) {\n if (Array.isArray === undefined) {\n return x instanc...
[ "0.7794904", "0.77205926", "0.77205926", "0.7704778", "0.76857483", "0.76857483", "0.76857483", "0.76857483", "0.76857483", "0.76857483", "0.7678376", "0.75791544", "0.7548115", "0.7524575", "0.7522537", "0.74651825", "0.74515444", "0.7437701", "0.7437701", "0.7431835", "0.74...
0.0
-1
Tests to see if an object is a Plain Object produced from an object literal. This is good for testing things like function options.
function isPlainObject(object) { if (!(object && toString.call(object) === '[object Object]')) return false; return Object.getPrototypeOf(object) === Object.prototype; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){\n \tif (obj.constructor.name===\"Object\"){\n \t\treturn true;\n \t}\n \treturn false;\n }", "function isPlainObjec...
[ "0.773077", "0.773077", "0.7658938", "0.76326376", "0.76164806", "0.76164806", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.76002574", "0.75867015", "...
0.0
-1
Tests if an object is a string literal
function isString(object) { return typeof object === 'string'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isString(obj) {\n\t\treturn !!(obj === '' || (obj && obj.charCodeAt && obj.substr));\n\t}", "function isString(obj) {\n return Object.prototype.toString.call(obj) === '[object String]';\n}", "function isString(obj) {\n return Object.prototype.toString.call(obj) === '[object String]';\n}", "fun...
[ "0.7382565", "0.73711777", "0.73711777", "0.7338176", "0.7331735", "0.7305545", "0.7298398", "0.72960085", "0.72093195", "0.7203717", "0.7194645", "0.7184463", "0.716219", "0.7141981", "0.7134836", "0.71302617", "0.7127283", "0.7102086", "0.70855486", "0.70855486", "0.7085359...
0.69975805
21
takes an array or object, iterates over it, and calls on each iteration if the function returns anything, the iteration is halted and the result is returned
function each(collection, func, context) { var result; context = context || null; if (isArray(collection)) { var length = collection.length; for (var i = 0; i < length; i++) { result = func.call(context, collection[i], i); if (result !== undefined) return result; } } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function each(objOrArr, callBack) {\n\n\n}", "function each(obj, fn) {\n\t\tif (!obj) { return; }\n\t\t\n\t\tvar name, i = 0, length = obj.length;\n\t\n\t\t// object\n\t\tif (length === undefined) {\n\t\t\tfor (name in obj) {\n\t\t\t\tif (fn.call(obj[name], name, obj[name]) === false) { break; }\n\t\t\t}\n\t\t\t...
[ "0.67102194", "0.6587491", "0.61599946", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", "0.6076382", ...
0.55088645
67
If is a number, it will round it. If is an Array it will try to round it's contents. If is present, it will round to that decimal value. The default is 4.
function round(value, precision) { precision = precision || 4; if (isArray(value)) { for (var i = 0; i < value.length; i++) { value[i] = this.roundIfNumber(value[i], precision); } } else { value = roundIfNumber(value, precision); } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundNumbers(arr){\n let number = arr[0];\n let precision = arr[1] > 15 ? 15 : arr[1];\n\n return +number.toFixed(precision);\n}", "__round(arr, dp = 2, isSeries) {\n if (dp < 0) {\n dp = 1\n }\n if (isSeries) {\n\n let new_arr = []\n arr.ma...
[ "0.67224723", "0.6514573", "0.6401076", "0.63434494", "0.63315237", "0.6267124", "0.61346567", "0.6091439", "0.608804", "0.60773957", "0.6047535", "0.6047535", "0.6047535", "0.6027353", "0.60267293", "0.600914", "0.60087115", "0.59910095", "0.59706706", "0.5963209", "0.596320...
0.6850762
0
If is a number, we round it to whatever the current setting is at.
function roundIfNumber(value, precision) { if (typeof value === 'number') { value = Number(value.toPrecision(precision)); } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundme(val) {\n return val;\n }", "round(value) {\n const context = this.context;\n\n // eslint-disable-next-line\n if (value instanceof window.JQX.Utilities.BigNumber && typeof value._d === 'bigint') {\n return value;\n }\n else if (value instanc...
[ "0.73870987", "0.6828576", "0.67663556", "0.6619762", "0.658353", "0.6573355", "0.6557229", "0.6469224", "0.6461486", "0.6436302", "0.64319086", "0.6428056", "0.6422254", "0.6416061", "0.64107734", "0.63939893", "0.63939893", "0.63939893", "0.63685", "0.6366713", "0.6361206",...
0.6511679
7
Checks the time of day and returns the appropriate URL to hit based on train station.
function buildTrainApiURl() { // if (new Date().getHours() >= 11) { // return 'https://huxley2.azurewebsites.net/delays/read/30?accessToken=b09cb836-f190-445d-8b96-372eb024141d&expand=true'; // } else { // return 'https://huxley2.azurewebsites.net/delays/tot/30?accessToken=b09cb836-f190-445d-8b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseCorrectStation() {\n\n // If we are in the afternoon look for return trip to Woking\n if (new Date().getHours() >= 11) {\n return 'Woking';\n } else {\n return 'Guildford';\n }\n\n}", "function getTrainStatus(sender,trainNo,date){\n\n\trequest('http://api.railwayapi.com/l...
[ "0.64522046", "0.6344683", "0.60039604", "0.57328594", "0.5655025", "0.56101674", "0.56046885", "0.55396634", "0.55240345", "0.5517143", "0.55117553", "0.5411827", "0.5408991", "0.5369996", "0.5361896", "0.53344214", "0.53108865", "0.53030497", "0.5296514", "0.5278855", "0.52...
0.7028632
0
Checks the time of day and returns the appropriate station.
function chooseCorrectStation() { // If we are in the afternoon look for return trip to Woking if (new Date().getHours() >= 11) { return 'Woking'; } else { return 'Guildford'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeatherWithTime() {\n $currentText.text(vm.weather.current.condition.text + ' during the ' + tod);\n currentW = vm.weather.current.condition.text;\n\n var xuCode = _.where(vm.weather, function(e) {\n return e.code == vm.weather.current.condition.code;\n });\n\n ...
[ "0.6689355", "0.6641448", "0.6343621", "0.63420206", "0.6239128", "0.62349623", "0.59183747", "0.58747727", "0.5874179", "0.57307476", "0.57271034", "0.56749135", "0.56129146", "0.5598697", "0.5587506", "0.5555465", "0.55228287", "0.55176777", "0.5501689", "0.54782933", "0.54...
0.74762666
0
Get the details of the next train.
async function getTrainDetails() { // Hit the train API const trainApiUrl = buildTrainApiURl(); const trainResult = await logFetch(trainApiUrl); // Loop & sort through the results if (trainResult.trainServices && trainResult.trainServices.length > 0) { // Loop through the results ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trainDescriptionString(train) {\n let stationsList = parseStations2();\n let trainDestinationName = stationsList[train.destination].name;\n return train.id + \" \" + train.line + \" \" + trainDestinationName;\n}", "function trainItem(train, inc) {\n\n\t\tvar output = \"\",\n\t\t\tnextStop = tra...
[ "0.5847996", "0.5783764", "0.57609385", "0.57466775", "0.574301", "0.5679681", "0.5621736", "0.5512493", "0.54536885", "0.5446247", "0.54402345", "0.5418041", "0.5387577", "0.5385201", "0.5332874", "0.53322786", "0.5317305", "0.53035533", "0.52753365", "0.5271592", "0.526864"...
0.6842976
0
Get the current weather for my location. Uses
async function getWeatherDetails() { // Hit the weather API const weatherApiUrl = 'https://api.openweathermap.org/data/2.5/forecast/daily?q=totnes&units=metric&cnt=1&appid=d94bcd435b62a031771c35633f9f310a'; const weatherResult = await logFetch(weatherApiUrl); // Update the temp const weatherTemper...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeather() {\n navigator.geolocation.getCurrentPosition(\n locationSuccess,\n locationError,\n {timeout: 15000, maximumAge: 60000}\n );\n}", "function getWeather() {\n var location = globals.location,\n usrInput = $('.input-div input').val() || '';\n\n getCityWeathe...
[ "0.82890683", "0.82332456", "0.80677617", "0.8034235", "0.78167856", "0.77768064", "0.77768064", "0.77768064", "0.77768064", "0.76997554", "0.7692944", "0.7669589", "0.7614594", "0.7590046", "0.75650954", "0.75384516", "0.74990547", "0.74937207", "0.74558777", "0.7447485", "0...
0.0
-1
Determines the type of bin collection for this week.
function determineBinCollection(){ const today = new Date(); // Every even week is rubbish if (today.getWeek() % 2 ==0){ recycling.innerHTML = "<img src='img/trash.svg' width='70px'><br>Rubbish collection week<br>& Garden Waste collection week"; } else { // every odd week is recycling ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBinned(bin) {\n\t return bin === 'binned' || (isBinParams(bin) && bin.binned);\n\t}", "function isBinned(bin) {\n return bin === 'binned' || isBinParams(bin) && bin.binned === true;\n }", "function determineBinSize() {\n\tif(viewerVars.userFixedBinSize) {\n\t\treturn;\n\t}\n\tvar duration = (...
[ "0.5419424", "0.53026104", "0.52212816", "0.49759498", "0.49611023", "0.48859206", "0.48388422", "0.48164538", "0.47966653", "0.4746346", "0.47349995", "0.47256774", "0.46395594", "0.45054802", "0.449226", "0.4490523", "0.44813368", "0.44509187", "0.44161347", "0.44117406", "...
0.6361204
0
init and returns an instance of Progress
static factory() { return new Progress().init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.instance = createProgressBar();\n }", "function Progress(){\n P.apply(this, arguments);\n\n this.size(50);\n this.fontSize(24);\n this.color('rgba(31,190,242,1)');\n this.font('helvetica, arial, sans-serif');\n this.background('rgba(255,255,255,1)');\n}", "functio...
[ "0.7777847", "0.7189115", "0.7174", "0.6478092", "0.6471121", "0.6470263", "0.6460724", "0.63855565", "0.6371226", "0.6348988", "0.634239", "0.6307678", "0.62605333", "0.6202721", "0.6183455", "0.61696446", "0.6111481", "0.6052021", "0.6052021", "0.6052021", "0.6046232", "0...
0.81976646
0
initial value,It is the reason that the deleting components is easy why I use object
function Button(element,sColorON,sColorOFF,sNamePlanet){ this.value = sNamePlanet; this.switch = false; this.element = element; this.switch = false; this.bgcolorON = sColorON; this.bgcolorOFF = sColorOFF; element.style.backgroundColor = this.bgcolorOFF; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.value = {};\n this.num = 0;\n }", "constructor() {\n this.stage = null//stage c'est l'écran de jeu en gros\n this.objects = [] // je fais une liste vide dans laquelle je vais metre tous les objets du jeu\n this.ids = 0\n }", "constructor() {\n this.obj =...
[ "0.64510226", "0.63935375", "0.6336393", "0.6282307", "0.625636", "0.6126073", "0.61055267", "0.60473216", "0.6014822", "0.5999465", "0.59942657", "0.5989982", "0.5947329", "0.59398866", "0.5937694", "0.592179", "0.5889372", "0.58819264", "0.5878264", "0.58765644", "0.5860101...
0.0
-1
Funcion para pintar la tabla de pedidos del usuario
function getFacturas() { var espacio = document.getElementById("resalto"); var botonPedidos = document.getElementById("resultadoPedidos"); var botonCuenta = document.getElementById("modificarCuenta"); if (botonPedidos.style.display === 'none') { botonPedidos.style.display = "block"; boto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iniciarTablaUsuario(tx) {\n\ttx.executeSql('CREATE TABLE IF NOT EXISTS Usuario (ID unique, Nombre, Password, IsAdmin)');\t\n}", "function userTable() { }", "async function preencheTabela() {\n\n let moduloSelecionado = document.getElementById('selecionaModulo').value\n \n const dadosRecebidos...
[ "0.63771605", "0.6148342", "0.61241806", "0.597691", "0.5948794", "0.5946766", "0.5944438", "0.5909169", "0.58859867", "0.5879889", "0.58672124", "0.584158", "0.5725355", "0.5704584", "0.5695114", "0.5670802", "0.5669452", "0.56421417", "0.5628315", "0.56281555", "0.56186324"...
0.0
-1
Funcion para pintar el formulario de modificacion de la cuenta
function getFormCuenta() { var espacio = document.getElementById("resalto"); var botonCuenta = document.getElementById("modificarCuenta"); var botonPedidos = document.getElementById("resultadoPedidos"); if (botonCuenta.style.display === 'none') { botonCuenta.style.display = "block"; boto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyForm() {\n\tshowStatusMessage(\"\");\n\t// override manual deposit fields\n\tif ((dojo.byId('status').value == 'PROC' && dojo.byId(\"moduleId\").value == \"ADVW003\") ||\n\t\t\t((dojo.byId('status').value == 'APPR' && dojo.byId(\"moduleId\").value == \"ADVW003\") || \n\t\t\t(dojo.byId('status').valu...
[ "0.67076755", "0.6521138", "0.6479333", "0.6421623", "0.6377064", "0.63492125", "0.6343599", "0.6275725", "0.6223106", "0.6205455", "0.6190618", "0.61753243", "0.61285675", "0.60795224", "0.6055702", "0.6048755", "0.6004309", "0.5956308", "0.59474814", "0.5923576", "0.5920043...
0.0
-1
Funcion con Ajax para enviarle los inputs con los datos, en este caso un array que los contenga, para modificar al usuario en el PHP UpdateUser
function modificarCuentaUsuario() { var xmlhttp = new XMLHttpRequest(); var arrayInput = document.getElementsByTagName("input"); var idUsuario = document.getElementById("modificar").getAttribute("data-id"); var data = {} var url = "../Api/UpdateUser.php"; for (let i = 0; i < arrayInput.length; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modificarDatosUsuario(){\n //donde se mostrará lo resultados\n divResultado = document.getElementById('resultado');\n //valores de los inputs\n cu=document.formulario.curp.value;\n nom=document.formulario.Nombre.value;\n ape=document.formulario.Apellido.value;\n gra=document.formulario.Grado.value;...
[ "0.710824", "0.69423276", "0.69074976", "0.6885367", "0.6884673", "0.6880189", "0.68705165", "0.6866044", "0.685479", "0.68456334", "0.67329794", "0.67261094", "0.6702824", "0.6693368", "0.66924584", "0.6667032", "0.664835", "0.6639176", "0.6627283", "0.6618021", "0.6611528",...
0.69772404
1
Funcion con Ajax para enviarle los inputs con los datos, en este caso un array que los contenga, para modificar al usuario en el PHP UpdateUser
function getBillProfile(e) { var xmlhttp = new XMLHttpRequest(); var arrayInput = document.getElementsByTagName("input"); var fact = e.currentTarget.getAttribute("data-id"); var idUsuario = document.getElementById("modificar").getAttribute("data-id"); var data = {} var url = "../Api/getBillWord...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modificarDatosUsuario(){\n //donde se mostrará lo resultados\n divResultado = document.getElementById('resultado');\n //valores de los inputs\n cu=document.formulario.curp.value;\n nom=document.formulario.Nombre.value;\n ape=document.formulario.Apellido.value;\n gra=document.formulario.Grado.value;...
[ "0.71081597", "0.6977313", "0.69429994", "0.6906251", "0.68846804", "0.68843", "0.68794096", "0.68691546", "0.68672556", "0.6854354", "0.68448526", "0.6731379", "0.67258584", "0.67014265", "0.66931474", "0.6691615", "0.66669744", "0.6648613", "0.6638524", "0.6627828", "0.6617...
0.0
-1
int Bind (IDispatch, string, string)
Bind(IDispatch, string, string) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Component_BindingHandler() {}", "function Bind_A_Obound() {\r\n}", "bindResponder(_responder) {\n }", "bindResponder(_responder) {\n }", "function Bind_Obound() {\r\n}", "function Bind_A_A_A() {\r\n}", "function bindable(){\n\t\t\n\t}", "function Bind_A_Oother() {\r\n}", "function Bind_A...
[ "0.652874", "0.6359866", "0.6313454", "0.6313454", "0.62571216", "0.6064689", "0.59890056", "0.59293824", "0.5873056", "0.583148", "0.5757355", "0.5699284", "0.569582", "0.5686329", "0.5585851", "0.55058354", "0.55058354", "0.5499269", "0.5499269", "0.54651004", "0.5430335", ...
0.93775713
0
define functions 1. main slide funtion
function goToSlide(index){ $slideGroup.animate({left: -100 * index + "%"}, 400); currentIndex = index; update() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach\n\n slideEls = document.querySelectorAll('.presentation > div')\n\n // Specific slide tech\n $('pre, code').each(function(i, block) {\n hljs.highlightBlock(block)\n });\n\n // Set up\n getSlideNumb...
[ "0.7397232", "0.73610973", "0.71461684", "0.7035936", "0.69285965", "0.6922403", "0.6744746", "0.6693899", "0.66894877", "0.6665247", "0.6652298", "0.66491705", "0.6619514", "0.6586867", "0.65711707", "0.6568348", "0.65635955", "0.6556759", "0.65275407", "0.6512946", "0.65104...
0.0
-1
2. auto slide start function
function startTimer(){ timer = setInterval(function(){ var nextIndex = (currentIndex + 1 ) % $slides.length; // 슬라이드 제작시 많이 쓰는 공식 goToSlide(nextIndex); console.log(nextIndex); }, 2000) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideStart()\n{\n\n\tcontinueFollow='continue';\n\t\tsliderDrag();\n}", "function startAutoSlide() {\n\t// if (autoSlideInterval) { // if the interval has been set already\n\t\tclearInterval(autoSlideInterval); // clear the interval\n\t// }\n\t// MAYBE SHOULD WAIT FOR FINAL RESIZE EVENT??? TEST TO FIND ...
[ "0.81570256", "0.7804483", "0.7780646", "0.76676464", "0.74800533", "0.73905337", "0.73668736", "0.7356376", "0.7330425", "0.7324", "0.7304307", "0.72740877", "0.72647136", "0.723816", "0.7091694", "0.70783985", "0.706661", "0.70332074", "0.7017015", "0.7004169", "0.700324", ...
0.68962467
29
3. auto slide stop funtion
function stopTimer(){ clearInterval(timer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideStop()\n{\n\t\n\tcontinueFollow='stop';\n\tsliderDrag();\n}", "function stopAutoSlide(){\n clearInterval(moveSlides);\n}", "function stopAutoSlide() {\n clearInterval(autoSlideInterval);\n autoSlide = null;\n}", "function stopAutoslide() {\n if ($run.autoslideId) {\n ...
[ "0.8165256", "0.8004957", "0.7644965", "0.7207027", "0.71406525", "0.71380246", "0.7089723", "0.7084637", "0.6986903", "0.6915306", "0.6894919", "0.6871284", "0.68291974", "0.68247664", "0.6798121", "0.6779139", "0.6738189", "0.6734049", "0.6716566", "0.6701337", "0.6681524",...
0.0
-1
4. stop slide when slide is in first or last index
function update(){ if(currentIndex === 0){ $nav.find(".prev").hide(); }else{ $nav.find(".prev").show(); } if(currentIndex === $slides.length - 1 ){ $nav.find(".next").hide(); }else{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideStop()\n{\n\t\n\tcontinueFollow='stop';\n\tsliderDrag();\n}", "changeSlideOnEnd(){\n if(this.dist.movement > 120 && this.index.next !== undefined){\n this.activeNextSlider();\n }else if(this.dist.movement < -120 && this.index.prev !== undefined){\n this.activePrevSlider();\n }els...
[ "0.72086966", "0.6869755", "0.6748433", "0.67288196", "0.6595142", "0.6564813", "0.65273565", "0.65159845", "0.65078783", "0.6499572", "0.64684343", "0.6447258", "0.64466035", "0.6440369", "0.64292544", "0.64075315", "0.64049035", "0.63178974", "0.6267503", "0.6246699", "0.62...
0.0
-1
true ako su svi igraci mrtvi
done() { for (let i = 0; i < this.players.length; i++) { if (!this.players[i].dead) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _checkAi(){return true;}", "function siamoNellaPrimaSettimana() {\n return indiceSettimana == 0;\n }", "function kiemTra(X, Y, viTriMoi){\n X = viTriX + X;\n Y = viTriY + Y;\n viTriMoi = viTriMoi || ViTriXoay; // khi xoay khoi co bi qua ngoai man hinh khong\n\n\n\n for ( var y = 0; y <...
[ "0.62881213", "0.6106665", "0.59497046", "0.5901296", "0.5720537", "0.5700155", "0.56874716", "0.5684375", "0.56332403", "0.56296945", "0.5599713", "0.5568872", "0.5567031", "0.5537956", "0.5530381", "0.55146855", "0.55019957", "0.5489751", "0.5480038", "0.54756325", "0.54726...
0.0
-1
zove se kada su svi igraci mrtvi (this.players) i nova generacija se pravi
naturalSelection() { let previousBest = this.players[0]; this.speciate(); //razvrstava igrace po vrstama this.calculateFitness(); //Racuna se fitnes svih igraca this.sortSpecies(); //Sortira vrste od najbolje ka najgoroj if (this.massExtinctionEvent) { this.massExtinction(); this.massExt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "placePlayers() {\n this.players.forEach((player) => {\n player.initPlayer(this.map);\n this.map.addPlayerToCell(player);\n });\n }", "createPlayers() {\r\n var sword = new Weapon(\"sword\");\r\n var chakram = new Weapon(\"chakram\");\r\n var Axe = new Weapon(...
[ "0.7199472", "0.7172245", "0.6963491", "0.68712753", "0.67852336", "0.6767366", "0.6744942", "0.6645938", "0.6625114", "0.66124725", "0.66082346", "0.6561628", "0.6559118", "0.65578765", "0.65509635", "0.6544635", "0.65433", "0.6534485", "0.6530251", "0.65182483", "0.6509511"...
0.0
-1
Podeli igrace u vrste u odnosu na to koliko se razlikuju od najboljeg u vrsti
speciate() { //Reset vrsti for (let s of this.species) { s.players = []; } for (let i = 0; i < this.players.length; i++) { let speciesFound = false; for (let s of this.species) { if (s.sameSpecies(this.players[i].brain)) { //Ako je igrac dovoljno slican da pripadne to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function naVrsti() {\n // Preveri za konec igre\n let zm = await zmagovalec();\n if (zm != \"undefined\") {\n if (Number(zm) == igralec) {\n location.replace('/igra/zmaga');\n } else {\n location.replace('/igra/zguba');\n }\n...
[ "0.6753502", "0.65285033", "0.6390136", "0.61814785", "0.6113063", "0.6066457", "0.5998599", "0.5985392", "0.5966415", "0.5933652", "0.5931987", "0.59226835", "0.5871933", "0.58610696", "0.5856169", "0.58499134", "0.5846479", "0.58304036", "0.5823336", "0.5797134", "0.579227"...
0.0
-1
Racuna fitnes svih igraca
calculateFitness() { for (let i = 1; i < this.players.length; i++) { this.players[i].calculateFitness(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function caricaModello() {\n // CARICA MAPPA DISPLACEMENT\n mappaTemp = mappa;\n //mappaTemp.filter(BLUR, oggetto.Smooth);\n\n\n mappaTemp.loadPixels();\n let f = 0;\n let k = 0;\n for (let x = 0; x < mappaTemp.width-res; x+=res) {\n punti[f] = [];\n for (let y = 0; y < mappaTemp.height-...
[ "0.61084867", "0.587679", "0.5835429", "0.5835396", "0.58104366", "0.57809347", "0.5733182", "0.56833196", "0.5661794", "0.56308764", "0.55949163", "0.55936474", "0.54703647", "0.5454087", "0.54278964", "0.54215914", "0.5387993", "0.53754514", "0.53615636", "0.53598315", "0.5...
0.0
-1
Sortira vrste po fitnesu
sortSpecies() { //Sortira igrace po vrsti for (let s of this.species) { s.sortSpecies(); } //Sortira vrste po fitnesu najboljeg igraca let temp = []; for (let i = 0; i < this.species.length; i++) { let max = 0; let maxIndex = 0; for (let j = 0; j < this.species.length; j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortujPoTytule() {\n \n // resetujemy monit o dodaniu filmu (aby caly czas sie nie wyswietlal)\n // paragraf ten bedzie istnial juz w dokumencie HTML\n // przy pierwszym wywolaniu tej funkcji\n parWalidacjaDodanegoFilmu.innerHTML = \"\";\n\n if (tytulRosnaco) {\n\t// mozliwosc przeslania...
[ "0.75513285", "0.7389637", "0.7382015", "0.72622705", "0.7226599", "0.7138333", "0.71343917", "0.703388", "0.6953784", "0.69508684", "0.68845403", "0.68337154", "0.677369", "0.6678424", "0.66772634", "0.66655105", "0.65253365", "0.65228224", "0.6495499", "0.6495499", "0.64810...
0.6938738
10
Ubija sve vrste koje nisu napredovale 15 generacija
killStaleSpecies() { const species = []; for (let i = 2; i < this.species.length; i++) { if (this.species[i].staleness < 15) { species.push(this.species[i]); } } this.species = species; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateNumCommande() {\n var random = Math.floor(100000000 + Math.random() * 900000000);\n num_commande = 'NH'+random\n }", "generarSecuencia(){\n this.secuencia = new Array(10).fill(0).map(m => Math.floor(Math.random() * 4))\n }", "popuniIzvjes...
[ "0.64151925", "0.63466394", "0.63394314", "0.62483096", "0.6232708", "0.619188", "0.6047631", "0.5987114", "0.59727186", "0.59648025", "0.5924548", "0.5900105", "0.5898745", "0.58840585", "0.5847552", "0.58471006", "0.58075136", "0.580641", "0.5797946", "0.57711625", "0.57690...
0.0
-1
Ubija ispod prosecne vrste
killBadSpecies() { let averageSum = this.getAvgFitnessSum(); for (let i = 1; i < this.species.length; i++) { if ((this.species[i].averageFitness / averageSum) * this.players.length < 1) { this.species.splice(i, 1); i--; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostraNotas(){}", "efficacitePompes(){\n\n }", "function comportement (){\n\t }", "function Deplacement_ennemiLimitrophe(Territoire){\r\n\tif (Territoire.army < 2) {return false}\r\n for (var i=0 ; i < Territoire.voisins.length ; i++){\r\n if (Territoire.proprietaire != Territoire.voisi...
[ "0.5991874", "0.5929998", "0.58855665", "0.5880484", "0.5826916", "0.5814434", "0.58114797", "0.57789046", "0.57528603", "0.5747532", "0.5745941", "0.5696208", "0.5688028", "0.5653418", "0.5638048", "0.56352746", "0.5616234", "0.5600099", "0.5567552", "0.55365455", "0.5536464...
0.0
-1
Vraca sumu svih prosecnih fitnesa u svim vrstama
getAvgFitnessSum() { let averageSum = 0; for (let s of this.species) { averageSum += s.averageFitness; } return averageSum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculVitesseX(){\r\n //rajout de 1 facteur\r\n if (this.vitesseXFacteur < this.limiteFacteur){\r\n this.vitesseXFacteur +=1; // faire en fonction de la largeur du terrain\r\n }\r\n else {/*rien car la vitesse ne peux pas depasser la limite*/}\r\n }", "function hitungPVA...
[ "0.6234949", "0.6215388", "0.6214699", "0.62072855", "0.6154536", "0.6128888", "0.60022205", "0.5992152", "0.5958583", "0.5939029", "0.59319997", "0.59251493", "0.5917981", "0.59012586", "0.58720964", "0.5853507", "0.5850155", "0.58134836", "0.58088577", "0.57654166", "0.5749...
0.0
-1
Ubija donju polovinu svake vrste
cullSpecies() { for (let s of this.species) { s.cull(); //Ubija donju polovinu vrste s.setAverage(); //Setuje prosecan fitnes } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function naVrsti() {\n // Preveri za konec igre\n let zm = await zmagovalec();\n if (zm != \"undefined\") {\n if (Number(zm) == igralec) {\n location.replace('/igra/zmaga');\n } else {\n location.replace('/igra/zguba');\n }\n...
[ "0.65396804", "0.62866277", "0.62442654", "0.61705977", "0.6155482", "0.6117599", "0.60125554", "0.5963607", "0.5949079", "0.5923952", "0.59168214", "0.59164137", "0.5882406", "0.58366066", "0.58339584", "0.58339113", "0.5800258", "0.5781609", "0.57718915", "0.575292", "0.573...
0.0
-1
this part is more like a temporary stay in this file, would moving to a independent 'setting page' someday.
constructor(props){ super(props); this.state = { }; this.style={ selfCom_Setting_: { width: '100%', height: '100%', position: 'absolute', top: '0%', left: '0%' }, selfCom_Setting_email_: { width: '70%', height: '24%', pos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _settings_page() {\n}", "function additionalSettings(){\n\n\n}", "function settingSetup(){\n\tif(settings.get('network') === undefined){ settings.set('network', 'bitmark'); }\n\tif(settings.get('auto_update') === undefined){ settings.set('auto_update', true); }\n if(settings.get('directory') === unde...
[ "0.7138184", "0.6283134", "0.6170119", "0.6125169", "0.6111438", "0.6037352", "0.59966815", "0.59806174", "0.5917414", "0.5916246", "0.5869842", "0.58078647", "0.5799425", "0.5796724", "0.57943803", "0.5762157", "0.5746978", "0.5728973", "0.5726674", "0.5718057", "0.57178485"...
0.0
-1
Anchor method for updating
update(delta) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UpdateAnchorsHandler() { }", "set anchor(value) {}", "get anchor() {}", "anchor() {\n this.__anchors++;\n }", "anchor() {\n this.__anchors++;\n }", "anchor() {\n this.__anchors++;\n }", "anchor() {\n this.__anchors++;\n }", "update() {\n\tlet usp = new...
[ "0.72916204", "0.69752336", "0.6894827", "0.6742493", "0.6742493", "0.6742493", "0.6742493", "0.6624592", "0.6604059", "0.64496326", "0.6418013", "0.63974416", "0.6310246", "0.6221733", "0.6213902", "0.6185177", "0.6141847", "0.61350256", "0.6090274", "0.6022484", "0.6017475"...
0.0
-1
Anchor method for rendering
render(delta, spriteBatch) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n let anchorAttributes = {\n class: {\n [this.activeClass]: this.match !== null,\n },\n onClick: this.handleClick.bind(this)\n };\n if (this.anchorClass) {\n anchorAttributes.class[this.anchorClass] = true;\n }\n if (this.custom === 'a') {\n anchorAttribute...
[ "0.7293357", "0.725551", "0.6827036", "0.67869955", "0.6448339", "0.6386757", "0.6336245", "0.6336245", "0.6336245", "0.6336245", "0.6198019", "0.61884713", "0.614755", "0.61313796", "0.6124272", "0.6094945", "0.60794866", "0.6052326", "0.6043256", "0.6003522", "0.59908676", ...
0.0
-1
! ZRender, a high performance 2d drawing library. Copyright (c) 2013, Baidu Inc. All rights reserved. LICENSE
function Ni(t){delete Li[t]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSurface() {\n wgl.takeBufferData(positionLocation, positionBuffer, 3, gl.FLOAT, false, 0, 0);\n wgl.takeBufferData(normalLocation, normalBuffer, 3, gl.FLOAT, false, 0, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6 * (map.points.length - 1) * (map.points.length - 1));\n }", "render(r...
[ "0.6581787", "0.6546497", "0.65223056", "0.65223056", "0.65223056", "0.6495967", "0.64545876", "0.6426752", "0.64223933", "0.6346952", "0.6334454", "0.63129914", "0.6310721", "0.6300453", "0.6299124", "0.62815106", "0.62755704", "0.62755704", "0.6267502", "0.6267502", "0.6267...
0.0
-1
! vuerouter v3.5.3 (c) 2021 Evan You
function i(t,e){for(var n in e)t[n]=e[n];return t}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "function version(){ return \"0.13.0\" }", "...
[ "0.5826432", "0.5783646", "0.5761382", "0.5714104", "0.56972057", "0.5668579", "0.56480795", "0.559433", "0.5578421", "0.5549824", "0.55136424", "0.5491717", "0.54752815", "0.54628813", "0.5451074", "0.539044", "0.53702855", "0.53666264", "0.5360071", "0.5360071", "0.5360071"...
0.0
-1
interface and a POSIXlike interface. (The POSIXlike calls are implemented on top of the ncurseslike calls, not the other way round.)
function VT100(wd, ht, scr_id) { var r; var c; var scr = document.getElementById(scr_id); this.wd_ = wd; this.ht_ = ht; this.scrolled_ = 0; this.bkgd_ = { mode: VT100.A_NORMAL, fg: VT100.COLOR_WHITE, bg: VT100.COLOR_BLACK }; this.c_attr_ = { mode: VT100.A_NORMAL, fg: VT100.COLOR_WHITE, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function system() { }", "function Terminal () {}", "function rc(){}", "function os_func() {\n this.execCommand = function (cmd, callback) {\n exec(cmd, (error, stdout, stderr) => {\n if (error) {\n console.error(`exec error: ${error}`);\n return;\n }\n\n callbac...
[ "0.550285", "0.5476711", "0.49394187", "0.48925105", "0.47765994", "0.47370273", "0.47320688", "0.47286943", "0.47102764", "0.47073632", "0.47050738", "0.467522", "0.46740142", "0.4655727", "0.46541288", "0.46445587", "0.46295154", "0.46079046", "0.45822662", "0.45442832", "0...
0.0
-1
show additional fields function
function unhide(n) { var btn = document.getElementById('btn'+n); if (btn.style.display = 'inline'){ btn.style.display = 'none' }else{ btn.style.display = 'inline' } var field = document.getElementById("hidden"+n); if (field.style.display === "none") { field.style...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fields () {\n return ['title', 'subtitle', 'body', 'favicon'];\n }", "ViewAllAccountFields() {\r\n this.showFields = !this.showFields;\r\n }", "function printFormEdit() {}", "function printDetailsModified() {\n\treturn `${this.name} (${this.type}) - ${this.age}`;\n}", "function toggleAd...
[ "0.63581353", "0.62687105", "0.6215431", "0.62147444", "0.6098865", "0.6083523", "0.60084903", "0.60084903", "0.59657437", "0.5959002", "0.59469956", "0.5934652", "0.59211195", "0.5872767", "0.5866661", "0.5839486", "0.58375657", "0.5815293", "0.579804", "0.5795084", "0.57926...
0.0
-1
reverse the given velocity
function reverse(o, p) { o[p] *= -1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function invertVelocity(axis)\n{\n\tif (axis == \"x\")\n\t{\n\t\tballVelocityX = ballVelocityX * -1;\n\t}\n\telse if (axis == \"y\")\n\t{\n\t\tballVelocityY = ballVelocityY * -1;\n\t}\n}", "function vectorReverse(u) {\n var u1 = u[0];\n var u2 = u[1];\n var v = [-1*u1, -1*u2];\n return v; \n}", ...
[ "0.6928222", "0.6587256", "0.65199554", "0.62969434", "0.6155193", "0.6111139", "0.6028411", "0.6022161", "0.6018839", "0.60057366", "0.59929657", "0.59702194", "0.59670824", "0.5954948", "0.5945233", "0.593444", "0.5929564", "0.5908246", "0.5895618", "0.5879419", "0.586276",...
0.56837505
27
verify the current automata in display
function verifyEditorAutomata() { const json = activeJSON(); const testedString = editor2.getValue(); if (json.type !== "finite-automata") { triggerToast("Erro", "Operação não suportada para os tipos de linguagem selecionados") return; } const valid = verify(json, testedString); const title = valid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _checkAi(){return true;}", "function verification() {\r\n countTrue();\r\n if (choice == 'c') {\r\n render(complete);\r\n } else if (choice == 'l') {\r\n render(laziness);\r\n } else {\r\n render(mass);\r\n }\r\n }", "function assertView() {\n \n\tswitch (currentView)...
[ "0.5910028", "0.5820131", "0.5729723", "0.5710434", "0.56639796", "0.56508213", "0.5616431", "0.5499719", "0.5447277", "0.5445098", "0.54385877", "0.5430272", "0.54191184", "0.5417161", "0.541713", "0.5388745", "0.5355606", "0.5343009", "0.53365827", "0.5327624", "0.5322725",...
0.70362014
0
get current location data
function getWeatherByCoords(position) { let apiKey = "0ae703064e17d8cb6a410a5138e15a28"; let apiUrl = "https://api.openweathermap.org/data/2.5/weather?"; let lat = position.coords.latitude; let lon = position.coords.longitude; axios .get(`${apiUrl}lat=${lat}&lon=${lon}&appid=${apiKey}&units=metric`) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocation() {\n\t\tTitanium.Geolocation.getCurrentPosition( updatePosition );\n\t}", "function getcurentposition() {\n\tnavigator.geolocation.getCurrentPosition(GeoOnSuccess, GeoOnError, {enableHighAccuracy: true});\n}", "function getLocation() {\n\tif (navigator.geolocation) {\n\t\tnavigator.geoloc...
[ "0.7286039", "0.71908706", "0.7152735", "0.7148169", "0.71307313", "0.71043324", "0.70790267", "0.7006134", "0.70034903", "0.69885075", "0.6959577", "0.69345903", "0.69285995", "0.69171876", "0.69151944", "0.6887525", "0.68814385", "0.687113", "0.6867752", "0.685529", "0.6849...
0.0
-1
const testDiv=dom.find('test')[0]const test2=dom.find('test2')[0] console.log(testDiv)/console.log(dom.find('.red',test2)[0])
parent(node) { return node.parentNode }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDiv(obj){\n\twhile(obj.nodeName != 'DIV'){\n\t\t\tobj = obj.nextSibling;\n\t}\n\treturn obj;\n}", "function findOneChild(test, nodes) {\n return nodes.find(test);\n }", "function getDivFromId(html){\n var foundDive = '';\n return div;\n}", "function getEl (mix,arr) {\n\tlet res...
[ "0.58055466", "0.5766705", "0.57636005", "0.57591295", "0.5710178", "0.5706812", "0.5706812", "0.5706812", "0.5706812", "0.5706812", "0.5706812", "0.56580675", "0.56580675", "0.56344193", "0.54981434", "0.54804426", "0.5472307", "0.54700834", "0.546232", "0.5446266", "0.54427...
0.0
-1
THE END OF DOCUMENT.READY()
function say() { console.log("ok"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageDocReady () {\n\n}", "pageReady() {}", "function DOMReady() {\n }", "onPageReady () {}", "onReady() {}", "function onLoadComplete () {\n // ready = true;\n}", "function ready() {\n if (!isReady) {\n triggerEvent(document, \"ready\");\n isReady = true;\n }\n }", "ready(...
[ "0.7816856", "0.7520798", "0.7399275", "0.73742586", "0.719712", "0.71568376", "0.71178716", "0.71035826", "0.71035826", "0.71035826", "0.71035826", "0.71035826", "0.71035826", "0.71035826", "0.71035826", "0.7045191", "0.7019945", "0.6991388", "0.6991286", "0.6967816", "0.694...
0.0
-1
Sets and stores a set of preferenes in the PortletPreferences
function pag_setPreferences(setPrefsUrl, namespace, storePrefsUrl) { // Make the request from the arguments var args = pag_setPreferences.arguments; var postRequest = "namespace=" + encodeURIComponent(namespace); for (var i = 3; i < args.length; i += 2) { postRequest += "&name=" + encodeURIComp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startPreferences(){\n preferences.set(to_json({\n\t\t\"list\": [\"n\", \"s\", \"o\", \"l1\", \"t1\", \"c1\", \"v\"],\n \"enterprise\": [\"n\", \"s\", \"o\", \"l1\", \"t1\", \"c1\", \"v\"],\n\t\t \"followUp\": [\"ABE.MC\",\"ABG.MC\",\"ACS.MC\",\"ACX.MC\",\"ANA.MC\",\"BBVA.MC\",\"BIBE.MC\",\"BK...
[ "0.7080287", "0.6612643", "0.62301767", "0.6156726", "0.61562616", "0.5953245", "0.5952078", "0.5913905", "0.5895778", "0.58920187", "0.5891158", "0.57420784", "0.57243925", "0.5721223", "0.5703076", "0.5673602", "0.56454885", "0.5637326", "0.563437", "0.5587519", "0.5580934"...
0.571238
14
Goes to the last visited venue
function pag_goToPreviousVenue() { // If there is no previous venue, report an error if (pag_previousVenues.length == 0) { alert("There are no more venues to go back to!"); } else { pag_previousVenues.pop(); pag_setStatus('Entering venue...'); pag_xmlRpcClient.call("enterPre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "gotoLastHit() {\n this.gotoHit(this.found.length - 1);\n }", "gotoLastHit() {\n this.gotoHit(this.found.length - 1);\n }", "gotoLastHit() {\n this.gotoHit(this.found.length - 1);\n }", "gotoLastHit() {\n this.gotoHit(this.found.length - 1);\n }", "function hasVisited( venue ) {\n if ( Wo...
[ "0.5940994", "0.5940994", "0.5940994", "0.5940994", "0.58590245", "0.577744", "0.56647384", "0.56524396", "0.56198406", "0.56050557", "0.5584691", "0.5574535", "0.55630714", "0.55039597", "0.549068", "0.548776", "0.5487753", "0.54824454", "0.54723954", "0.5455079", "0.5454175...
0.65885055
0
Adds venues to the list of venues
function pag_addVenuesToList(namespace, parent, connections, venueClientControllerId) { for (var i = 0; i < connections.size(); i++) { pag_venueTree.addTreeNode( parent, "pag_venue" + connections.get(i).getId(), null, connections.get(i).getName(), connections...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pag_expandVenueList(namespace, venueId){\n pag_xmlRpcClient.call(\"expandVenue\",venueId);\n}", "function featureVenues(){\n\t\tfor (i=0;i<hoods.length;i++){\n\t\t\tif (venues.neighborhood = hoods[i]){\n\t\t\t\tfeatVen = venues;\n\t\t\t\tvar x = Math.floor(Math.random() * featVen.length);\n\t\t\t\tco...
[ "0.6278627", "0.6086471", "0.5929419", "0.5926679", "0.5814627", "0.5639007", "0.56181884", "0.5587607", "0.55733824", "0.5558537", "0.55414367", "0.54809374", "0.5468348", "0.5412412", "0.53753245", "0.5342769", "0.5342769", "0.52828264", "0.52623916", "0.52481157", "0.52392...
0.6353486
0
Expands a venue on the list
function pag_expandVenueList(namespace, venueId){ pag_xmlRpcClient.call("expandVenue",venueId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pag_collapseVenueList(namespace, venueId){\n pag_xmlRpcClient.call(\"collapseVenue\",venueId);\n}", "function harmonizePlace() {\n if (W.selectionManager.selectedItems.length === 1) {\n var item = W.selectionManager.selectedItems[0].model;\n if (item.type === ...
[ "0.60256994", "0.57891405", "0.55040437", "0.53381175", "0.5305966", "0.5304756", "0.52917457", "0.52594346", "0.5215929", "0.5199276", "0.5189215", "0.51701415", "0.51659375", "0.51357186", "0.50884235", "0.5088083", "0.50785536", "0.5066447", "0.5047672", "0.50451094", "0.5...
0.7017585
0
Collapses a venue on the list
function pag_collapseVenueList(namespace, venueId){ pag_xmlRpcClient.call("collapseVenue",venueId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapseListInTable( current ) {\n\t\t\tif ( current.closest( 'div' ).hasClass( 'selectlist' ) ) {\n\t\t\t\tif ( current.closest( 'div' ).find( 'button' ).attr( 'aria-expanded' ) === 'true' ) {\n\t\t\t\t\tcurrent.closest( 'div' ).find( 'button' ).trigger( 'click' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "onSelec...
[ "0.61195076", "0.5816635", "0.5762781", "0.5762025", "0.5760627", "0.57226455", "0.56708497", "0.5624067", "0.56172806", "0.5594775", "0.5588918", "0.5534294", "0.5525181", "0.5523257", "0.5514511", "0.5494143", "0.5485672", "0.5470954", "0.5461294", "0.5439176", "0.54179555"...
0.7172639
0
Toggles the sending of video
function pag_toggleVideo(button) { if (button.title == "Disable video") { button.title = "Enable video"; document.getElementById(button.id + "_image").src = pag_context + "/images/cameraDisabled.png"; document.pag_venueClientController.enableVideo(0); } else { button....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggle(message){\n\tif (isSnapVisible){\n\t\tisSnapVisible = false;\n\t\tvideo_out.style.display = 'block';\n\t\tsnap_out.style.display = 'none';\n\t\tpause();\n\t\tend_send_loop();\n\t\tif(!message){\n\t\t\tsend_toggle_message();\n\t\t}\n\t\t//window.phone.mystream.getVideoTracks()[0].enabled = true;\n\t...
[ "0.76611525", "0.7508566", "0.73137957", "0.71956885", "0.7057195", "0.70305187", "0.70295316", "0.69461167", "0.688114", "0.6848042", "0.6832435", "0.6820944", "0.6811815", "0.6809342", "0.68023044", "0.67885274", "0.6707438", "0.6675227", "0.6672023", "0.66316885", "0.65370...
0.6408858
24
Brings up the node services configuration dialog
function pag_configureNodeServices() { document.pag_venueClientController.configureNodeServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DialogServiceConfig() {\n }", "function openConfig() {\n vm.isConfiguring = true;\n vm.dialogActive = true;\n }", "function ac_showConfigPanel() {\n\tac_switchTool(\"cfg\");\n}", "function main(){\n init_config_form();\n K.ui.bind_action(A);\n }", "function s...
[ "0.66428524", "0.6249317", "0.61133564", "0.6059722", "0.58882725", "0.5877399", "0.58584946", "0.58522576", "0.583835", "0.5781579", "0.5758966", "0.57413214", "0.5714511", "0.55931014", "0.55864793", "0.55803865", "0.5573363", "0.5570003", "0.55594295", "0.55532455", "0.554...
0.6134289
2
Changes the mode of the venue list
function pag_changeVenueSelection(mode) { pag_xmlRpcClient.call("changeVenueSelection", mode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitFullMode() {\n if (!this.isListMode) {\n this._mode = 'list';\n this.dispatchEvent(new Event('modechange'));\n }\n }", "setMode(mode) {\n this.mode.current = mode;\n this.$location.search('mode', mode);\n return this.setFilters();\n }", "changeGameMode(mode)...
[ "0.6479708", "0.6071328", "0.6061877", "0.5975722", "0.5946537", "0.58889264", "0.5883734", "0.5834775", "0.58242404", "0.5807688", "0.5747229", "0.57219607", "0.5692376", "0.56654924", "0.5660581", "0.565553", "0.5648557", "0.5645331", "0.5632412", "0.56288797", "0.5529522",...
0.72086847
0
Sets the current client profile
function pag_setProfile(currentVenueId, isInVenue, nameId, emailId, phoneId, locationId, homeId, typeId) { if (document.getElementById(nameId).value == "") { alert("You must enter a name!"); } else if (document.getElementById(emailId).value == "") { alert("You must enter an e-mail addres...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setProfile() {\n\t\tProfileStore.getProfile(this.props.result._id);\n\t}", "function _updateClientProfile(message) {\n profile.set(message.data.profile.device_id, message.data);\n }", "function changeCurrentProfile() {\n $cookies.put('customerID', vm.currentProfileId, {expires: new Date().ad...
[ "0.7270808", "0.6747086", "0.67028195", "0.6512975", "0.6238305", "0.6161745", "0.61460733", "0.608612", "0.6079535", "0.6064214", "0.6032083", "0.59488547", "0.59306955", "0.5868228", "0.58257633", "0.58126026", "0.57811844", "0.5766699", "0.57007396", "0.5694798", "0.565513...
0.0
-1
Allows the user to configure their profile
function pag_configureUserProfile(profileFormId) { document.getElementById(profileFormId).style.visibility = "visible"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setProfile() {\n\t\tProfileStore.getProfile(this.props.result._id);\n\t}", "updateProfile() {}", "function Profile() {\n\t}", "createProfile() {}", "editProfile(){\n\t\tresources.profileEdit().click();\n\t}", "function loadProfile() {\n if(!supportsHTML5Storage()) { return false; }...
[ "0.6613246", "0.65201426", "0.6515455", "0.6393162", "0.63072085", "0.62113386", "0.61646914", "0.6132881", "0.61245334", "0.6105772", "0.6088496", "0.6077995", "0.60442907", "0.60389894", "0.6016383", "0.60099936", "0.5999849", "0.59751046", "0.5936447", "0.5933309", "0.5924...
0.0
-1
tranforms options to [switch] [value] does not manage urls
function forge_yslow_args(options){ var known_switchs = [ 'info', 'format', 'ruleset', 'beacon', 'dict', 'threshold', 'ua', 'viewport', 'headers', 'console', 'cdns' ]; var args = []; for( var n in options ){ if( known_switchs.indexO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions(choice, value){\n let options = {\n headers: {\n 'Client-ID': config['Twitch Client ID'],\n }\n };\n\n switch (choice) {\n\n case 'channel':\n options.url = 'https://api.twitch.tv/kraken/channels/' + value;\n break;\n\n case 'stream':\n options.url = 'https://api.twitch...
[ "0.6103674", "0.60494983", "0.5902205", "0.5703334", "0.5684817", "0.5636264", "0.56265336", "0.55905986", "0.5565767", "0.5534924", "0.55065197", "0.5493929", "0.5430844", "0.5423568", "0.54178995", "0.54065526", "0.5395617", "0.53879917", "0.5362268", "0.533147", "0.5325717...
0.0
-1
grunt task confirmation message
function end_message(urls,responses){ grunt.log.ok("Parsed: "+responses.length+"/"+urls.length); if( urls.length !== responses.length ){ grunt.log.error("report bug to"); grunt.log.error("https://github.com/maboiteaspam/phantomizer-yslow/issues"); grunt.fail.warn("could not parse correctly ys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "finish() {\n const grunt = _chalk.green('grunt');\n const gruntTestCommand = _chalk.yellow('test');\n const gruntMonitorUnitCommand = _chalk.yellow('monitor:unit');\n const gruntMonitorApiCommand = _chalk.yellow('monitor:api');\n const gruntFormatCommand = _chalk.yellow('format')...
[ "0.6613369", "0.6129055", "0.5791702", "0.57858026", "0.57025886", "0.5655006", "0.5574036", "0.5511337", "0.5481397", "0.54351366", "0.5434001", "0.5422423", "0.53939104", "0.537695", "0.53761375", "0.5372629", "0.535721", "0.53159606", "0.5297009", "0.52678686", "0.523203",...
0.0
-1
write yslow output files after console output parsing if output is '', goes to console if output is null, displays nothing if output is junit|tap, records results in some_output_path/report.(junit|tap) otherwise, records results in some_output_path/some/url_path/url_filename.ext.(xml|json|plain)
function write_yslow_output(format,output,responses,readable){ if(output!="-"&&output!=null){ if( format.match(/(junit|tap)/) ){ var content = ""; for(var n in responses ){ content+=responses[n].response; content+="\r\n\r\n"; } var filep = output+"/report."+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeOutput() {\r\n HTML_output = new java.io.FileWriter(\"active-hits/shortn-results.\" + soylentJob + \".html\");\r\n lag_output = new java.io.FileWriter(\"active-hits/shortn-\" + soylentJob + \"-fix_errors_lag.csv\");\r\n lag_output.write(\"Stage,Assignment,Wait Type,Time,Paragraph\\n\");...
[ "0.63936573", "0.6166272", "0.6156874", "0.61409837", "0.59925956", "0.5958521", "0.5942677", "0.56270903", "0.5400741", "0.53747886", "0.53433347", "0.526257", "0.5239293", "0.52391547", "0.52317715", "0.51808566", "0.5151781", "0.51302665", "0.512924", "0.5106412", "0.50957...
0.7465816
0
runs phantomjs and pipes output to grunt
function run_phantomjs(args,then){ args.unshift(yslow.path); var stdout = ""; var stderr = ""; grunt.log.write(phantomjs.path+" "+args.join(" ")); var pantomjs_process = require('child_process').spawn(phantomjs.path, args); // with live output piping pantomjs_process.stdout.on('data', fun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function task(grunt) {\n function logCompileStatus() {\n return through.obj(function (file, enc, cb) {\n grunt.verbose.or.writeln('Compiling \"' + file.path + '\"...');\n this.push(file);\n cb();\n });\n }\n\n // Please see the Grunt documentation for more in...
[ "0.6286816", "0.6242427", "0.6196365", "0.59870887", "0.5930146", "0.5848738", "0.5834331", "0.58222145", "0.57663476", "0.572182", "0.56671965", "0.5663967", "0.5650866", "0.5641634", "0.5625576", "0.5625099", "0.55608153", "0.5522843", "0.5493636", "0.54874825", "0.54365164...
0.71803695
0
Revert all changes made to the contact and stop editing the contact.
revertContact() { this.getContact().restore(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelEditCard() {\n // 8-1 Set isEditing flag to update the view.\n this.isEditing = false\n\n // 8-2 Reset the id we want to edit.\n this.idToEdit = false\n\n // 8-3 Clear our form.\n this.clearForm()\n}", "discardChanges() {\n this.editMode = false;\n this.removeListen...
[ "0.66719586", "0.64675707", "0.64196837", "0.6246502", "0.6233333", "0.6232131", "0.6226049", "0.616502", "0.61240137", "0.6013594", "0.60111177", "0.5989721", "0.59214896", "0.59017706", "0.58883774", "0.5882475", "0.58626676", "0.5858237", "0.58482", "0.57804984", "0.577231...
0.79837286
0
Save all changes made to the contact and stop editing the contact.
saveContact() { const contact = this.getContact(); if (contact.isNew() || contact.isDirty()) { contact.save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editContact(){\n var id = readLineSync.question('Lua chon id contact can sua: ');\n var name = readLineSync.question('name: ');\n var phone = readLineSync.question('phoneNum:');\n listContact[id].Name = name;\n listContact[id].Phone = phone;\n save();\n console.log(\"\\nsua thanh cong...
[ "0.6590464", "0.64225984", "0.6344823", "0.63035953", "0.62980086", "0.6267901", "0.62558484", "0.6176916", "0.61483413", "0.6123719", "0.6115538", "0.60831296", "0.6026321", "0.59915984", "0.5989036", "0.59882796", "0.5953554", "0.592548", "0.5917238", "0.5896775", "0.587842...
0.74033976
0
Return the contact that is currently being edited.
getContact() { return this.scope.attr('contact'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEditContact() {\n\t var contactName = Session.get(\"editContact\");\n\t return Template.contacts.__helpers[\" findContact\"](contactName);\n\t}", "get contact() {\n\t\treturn this.__contact;\n\t}", "get contact() {\n\t\treturn this.__contact;\n\t}", "get contact () {\n\t\treturn this._contact;\n\t}"...
[ "0.78231084", "0.70191115", "0.70191115", "0.6989194", "0.6989194", "0.6989194", "0.6989194", "0.6601513", "0.64119923", "0.62740356", "0.6252663", "0.6207401", "0.59106225", "0.5908959", "0.5902027", "0.583154", "0.58213204", "0.57893884", "0.5729577", "0.5728997", "0.572755...
0.61655927
12
Set the contact that is being edited to the provided contact model
setContact(contact) { this.scope.attr('contact', contact); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editContact(){\n var id = readLineSync.question('Lua chon id contact can sua: ');\n var name = readLineSync.question('name: ');\n var phone = readLineSync.question('phoneNum:');\n listContact[id].Name = name;\n listContact[id].Phone = phone;\n save();\n console.log(\"\\nsua thanh cong...
[ "0.6863164", "0.66345423", "0.6378787", "0.6335341", "0.6314018", "0.62220573", "0.61681384", "0.6136392", "0.61141276", "0.60601896", "0.59828055", "0.5960374", "0.59480196", "0.5918278", "0.5901357", "0.5839305", "0.5778192", "0.5706472", "0.57013464", "0.5696255", "0.56785...
0.71465987
0
Respond to control events.
'.save click'() { this.saveContact(); Navigator.openParentPage(); // Prevent the default submit behavior return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Control() {}", "function Control() {}", "function Control() {}", "function Control() {}", "handleControl(e, type) {\n switch (type) {\n case \"play\":\n return clickPlay(e, this.videoEle);\n case \"pause\":\n return clickPlay(e, this.videoEle);\n case \"skip\":\n ...
[ "0.6599393", "0.6599393", "0.6599393", "0.6599393", "0.6341922", "0.6204775", "0.6074866", "0.6049745", "0.5986637", "0.5972554", "0.596404", "0.59246373", "0.5886188", "0.5880047", "0.58776325", "0.5828921", "0.5820891", "0.5783242", "0.577699", "0.57562387", "0.5744859", ...
0.0
-1
Listen for changes to the page's registered route attribute, "contactId" in this case.
routeChange(event, contactId) { let contact = null; if (contactId === 'new') { // Create a new contact to edit contact = new Contact(); } else { // Lookup the contact in the global list by its contact contact = Contact.store[contactId]; if (contact) { // Save a copy of ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "routeChange() {\n\n // Validating the routes object\n if (!router.routes) return;\n if (router.routes.constructor !== Object) throw err(9);\n\n const route = router.getRoute(window.location.pathname);\n const entries = Object.entries(router.routes);\n\n // Looping through all routes i...
[ "0.62488955", "0.5920935", "0.58955485", "0.5677418", "0.5662065", "0.55713654", "0.5518173", "0.5505462", "0.5443795", "0.5357002", "0.53530777", "0.53530777", "0.53530777", "0.53530777", "0.53530777", "0.53530777", "0.53285944", "0.53179985", "0.53078014", "0.5302581", "0.5...
0.702257
0
this reset will first calculate qps, then qps willl be used to determine which apps are under allocated and over allocated, and how much capacity over allocated apps can spare in adjust_capacity, after adjust_capacity is done, each app's tokens will be refilled based on new capacity.
function resetQPSRates() { resetRates('QPS'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\r\n super.reset();\r\n this.maxInstructionCount = 10;\r\n if (!this._queue) {\r\n this._queue = [];\r\n }\r\n else {\r\n this._queue.length = 0;\r\n }\r\n }", "_resetState () {\n this._wsQueue = [];\n this._subscriptionsBy...
[ "0.6036791", "0.5486369", "0.54608387", "0.54495", "0.5395226", "0.5291027", "0.5289564", "0.5278413", "0.52441865", "0.52296174", "0.52206147", "0.52105176", "0.52105176", "0.52105176", "0.51682013", "0.5140166", "0.5135158", "0.51187843", "0.51128334", "0.51113206", "0.5096...
0.526385
8
On every 2 second, refresh global variables.
function sched_refresh_global() { setTimeout(function() { client.get('refresh_interval', function(err, reply) { refreshInterval = reply; }); client.lrange('op-qps', 0, -1, function(err, ops) { qpsOps = ops; }); client.lrange('op-bps', 0, -1, function(err, ops) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshGamesEachSec() {\n setInterval(refreshGameStatus, 1000);\n}", "function init() {\n var interval = setInterval(handleRefresh, 3000);\n handleRefresh();\n}", "function refreshOn()\n{\n refreshInterval = setInterval(function () {refresh()}, 1000);\n}", "function reload_functions(){\n ...
[ "0.6916931", "0.6825754", "0.6821909", "0.66755337", "0.6561338", "0.6559765", "0.6549051", "0.6519118", "0.6498947", "0.647729", "0.646576", "0.6455169", "0.6413914", "0.64119446", "0.6408904", "0.63957936", "0.63896096", "0.63820535", "0.6362571", "0.6340827", "0.6308774", ...
0.6925086
0
Schedule reset and refresh global
function sched_all() { setInterval( function() { resetQPSRates(); resetBPSRates(); resetConnectionQuota(); }, refreshInterval*1000 ); sched_refresh_global(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sched_refresh_global() {\n setTimeout(function() {\n client.get('refresh_interval', function(err, reply) {\n refreshInterval = reply;\n });\n\n client.lrange('op-qps', 0, -1, function(err, ops) {\n qpsOps = ops;\n });\n\n client.lrange('op-bps', 0, -1, function(er...
[ "0.7460981", "0.73237044", "0.73237044", "0.72612077", "0.6795095", "0.6535646", "0.6525502", "0.6495455", "0.64361024", "0.63936114", "0.6358318", "0.6345908", "0.6344723", "0.6324688", "0.6303937", "0.6299245", "0.6299245", "0.6286268", "0.62667626", "0.6265286", "0.6259451...
0.73144734
3
distribute capacity evenly among apps capacity: capacity to distribute apps: apps to receive distributed capacity op: operation capacities: origin capacities of apps
function distributeCapacityEvenly(capacityPrefix, capacity, apps, op, capacities) { var extra = Math.floor(Math.abs(capacity/apps.length)); if(capacity < 0) extra = -1*extra; // luckApp is randomly picked up app to receive the remaining capacity, // example: capacity = 3, #app is 2, each of which gets 1, lucky...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deductCapacity(prefix, total, apps, belowCapacities, op, capacities) {\n log('debug', 'deduct capacity '+total+' from '+apps.toString()+'-'+op);\n if(total == 0) return ;\n for(var appi = 0; appi < apps.length; appi++) {\n var app = apps[appi];\n var spare = belowCapacities == null ? capaciti...
[ "0.7069955", "0.58525044", "0.5813267", "0.56941843", "0.5681254", "0.56757516", "0.56363803", "0.56097686", "0.5544227", "0.54869956", "0.5424184", "0.5418268", "0.5388014", "0.53603345", "0.53312665", "0.5312672", "0.5288557", "0.5276781", "0.52696323", "0.5251796", "0.5206...
0.82013744
0
deduct capacity from apps in a greedy manner total: total capacity to deduct apps: apps to deduct capacity from op: operation capacities: origin capacities of apps
function deductCapacity(prefix, total, apps, belowCapacities, op, capacities) { log('debug', 'deduct capacity '+total+' from '+apps.toString()+'-'+op); if(total == 0) return ; for(var appi = 0; appi < apps.length; appi++) { var app = apps[appi]; var spare = belowCapacities == null ? capacities[app][op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function distributeCapacityEvenly(capacityPrefix, capacity, apps, op, capacities) {\n var extra = Math.floor(Math.abs(capacity/apps.length));\n if(capacity < 0) extra = -1*extra;\n // luckApp is randomly picked up app to receive the remaining capacity, \n // example: capacity = 3, #app is 2, each of which gets...
[ "0.7280792", "0.6030185", "0.5960411", "0.59151447", "0.58256453", "0.58124816", "0.579335", "0.577354", "0.5760222", "0.57476294", "0.57385993", "0.5705017", "0.56829", "0.56331295", "0.56328785", "0.5624944", "0.56230646", "0.56078887", "0.5589725", "0.5578539", "0.5573018"...
0.82035005
0
Ready App & Container DOM
init(project_key, notificationIds) { log.start = 'init' log(`Project ${project_key} set. (v${this.version})`); this.project_key = project_key; log(`프로젝트 키에 기반해, 라이브 중인 공지 아이디들을 사전에 가져와 준비합니다. (${notificationIds})`); if (notificationIds) this.notificationIds = notificationIds; log('프레임 컨테이너를 b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onDOMReady() {\n // Make sure that the DOM is not already loaded\n if (isReady) return;\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if (!document.body) return setTimeout(onDOMReady, 0);\n // Remember that the DOM is ready\n isReady = true;...
[ "0.68753535", "0.6778299", "0.676979", "0.6682022", "0.65858215", "0.65858215", "0.65714586", "0.6564208", "0.6564208", "0.65623665", "0.6522091", "0.6480908", "0.64750654", "0.6445943", "0.64169675", "0.641138", "0.6393167", "0.63738227", "0.63666546", "0.635851", "0.635851"...
0.0
-1
Function as eventhandler of loadendevent
function applyThematicStyle() { //console.log("applyThematicStyle: initiated"); mapLoadMask.hide(); // Create StyleMap-Object for the thematic layer thematicStyleMap = new OpenLayers.StyleMap({ 'default': getThematicStyle("Staaten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregarEventoLoad(funcion){\n window.addEventListener(\"load\",funcion,false);\n \n}", "function handle_event(data) {\n // Check if a new page has to be loaded\n if (!is_empty_page(data.page)) {\n page = data.page;\n load_page(function() {\n handle_event_page_load(da...
[ "0.7173061", "0.70058787", "0.6759938", "0.6649352", "0.6596349", "0.6586023", "0.6554718", "0.6488561", "0.6485456", "0.64559567", "0.6447819", "0.6431176", "0.6431176", "0.6421897", "0.63971066", "0.6380551", "0.63796043", "0.6373616", "0.63673687", "0.63668597", "0.6359794...
0.0
-1
featureSelected pushed a selected feature to the selectedFeatures array
function featureSelected(feature){ selectedFeatures.push(feature); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectFeature(response) {\n sel_features.push(response);\n console.log(\"Selected \" + response + \" as Feature!\");\n }", "function multiSelectSupport(feature, layer) {\n layer.on(\"click\", function(e){\n if (selectEnabled) {\n var layerId = geojsonGroup.getLayerId(layer)\n if (se...
[ "0.7381456", "0.6663814", "0.6645318", "0.63579714", "0.6344896", "0.6312278", "0.6239654", "0.6216479", "0.6216479", "0.62096614", "0.615395", "0.61014277", "0.6088105", "0.6080157", "0.6057675", "0.6049705", "0.60324883", "0.5907792", "0.59023225", "0.589004", "0.5889153", ...
0.9071196
0
featureUnselected removed a unselected feature from the selectedFeatures array
function featureUnselected(feature){ for (var i = 0; i < selectedFeatures.length; i++) { if (selectedFeatures[i].data.SOVEREIGNT == feature.data.SOVEREIGNT) { selectedFeatures.splice(i, 1); } else { console.log("featureU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unselectFeature(response) {\n var index = sel_features.indexOf(response);\n if (index > -1) {\n sel_features.splice(index, 1);\n }\n console.log(\"Unselected \" + response + \" as Feature!\");\n }", "function unselectPreviousFeatures() {\n var i;\n for(i=0...
[ "0.7970649", "0.72647816", "0.7117742", "0.6794716", "0.67596906", "0.6720562", "0.6547242", "0.65273386", "0.6523119", "0.6517166", "0.64499676", "0.64484805", "0.64395726", "0.6430554", "0.6419875", "0.6396876", "0.63834465", "0.6358797", "0.63059276", "0.6292515", "0.62881...
0.8378116
0
[ INFINITY, 1, 1, 2, 3, ... ]
function maxSum(arr) { if (arr.length < 2) throw new Error('array must have at least 2 numbers'); let max = arr[0] + arr[1]; /** * O(n^2) */ /* n times */ for (let i = 0; i < arr.length; i++) { let sum = arr[i]; /* n - i times */ for (let j = i + 1; j < arr.length; j++) { sum += arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function n() {\n return [0, 0];\n }", "function n() {\n return [0, 0, 0];\n }", "function e$1(){return [1,0,0,0,1,0,0,0,1]}", "function nbv(i) { var r = []; fromInt(r,i); return r; }", "function n$c(){return [0,0,0,0]}", "function e() {\n return [1, 0, 0, 1, 0, 0];\n }...
[ "0.6784448", "0.67633986", "0.6424508", "0.63915807", "0.63427794", "0.623128", "0.6225784", "0.6222549", "0.6209126", "0.62045467", "0.6034835", "0.5998435", "0.5979571", "0.5965476", "0.5964587", "0.5946165", "0.59375685", "0.5924184", "0.58742857", "0.58521545", "0.5851373...
0.0
-1
[1, 3, 6, 8, 11], [2, 3, 5, 8, 9, 10]
function merge(array1, array2) { let newArray = []; const lengths = array1.length + array2.length; for (let i = 0; i < lengths; i++) { (array1[0] > array2[0]) ? newArray.push(array2.shift()) : newArray.push(array1.shift()); } return newArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test() {\n var arr = [];\n arr[0] = [1, 2, 3, 4, 5];\n arr[1] = [1, 2, 3, 4, 5];\n arr[2] = [1, 2, 3, 4, 5];\n arr[3] = [1, 2, 3, 4, 5];\n arr[4] = [1, 2, 3, 4, 5];\n arr[5] = [1, 2, 3, 4, 5];\n arr[6] = [1, 2, 3, 4, 5];\n arr[7] = [1, 2, 3, 4, 5];\n arr[8] = [1, 2, 3, 4, 5];\n arr[9] = [1, 2, ...
[ "0.57144004", "0.5660034", "0.56201154", "0.5613612", "0.5558231", "0.554691", "0.54856217", "0.548562", "0.54820263", "0.5437023", "0.54198307", "0.54141223", "0.5402316", "0.53890705", "0.53593963", "0.53589123", "0.5357243", "0.53563535", "0.5341555", "0.5319725", "0.53148...
0.0
-1
The height of your card. Home Assistant uses this to automatically distribute all cards over the available columns.
getCardSize() { return 3 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setCardHeight(){\n const UIflashcard = document.querySelector('#flash-card');\n let cardWidth = UIflashcard.offsetWidth;\n let setHeight = cardWidth / 1.666666666667;\n UIflashcard.style.height = `${setHeight}px`;\n}", "calcHeight() {\n\n const card = document.querySelector('.card'...
[ "0.7270746", "0.70865035", "0.70676345", "0.69745034", "0.69406766", "0.6917146", "0.68742836", "0.68742836", "0.68616426", "0.6858979", "0.6858979", "0.68569076", "0.6824045", "0.681302", "0.681302", "0.6777474", "0.6764611", "0.67553926", "0.67107004", "0.6659473", "0.66495...
0.6338811
52
Parameters: A jobtitle and a preference for a job title Function: Checks the title for each segment of a job title preference Output: True if it contains all segments of a job title, false otherwise
function rateJobTitle(jobTitle, jobTitlePref){ //splits a multiword jobtitle into multiple cells of an array titlePrefList = jobTitlePref.split(' '); valid = true; //checks jobTitle to see if it contains all segments of a job title for(var i = 0; i < titlePrefList.length; i++){ if(_.includes(jobTitle, titlePre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isExist(title){\n for(let i=0; i<setOfLists.length; i++){\n if(setOfLists[i].name.toUpperCase()==title.toUpperCase()){\n return true;\n }\n }\n return false;\n }", "function containsTitle (arr, val) {\n logger.trace(\"Entering containsTitle...
[ "0.53449136", "0.5339336", "0.52949375", "0.5259956", "0.52465093", "0.5150919", "0.49525732", "0.48551226", "0.48396122", "0.483126", "0.4821487", "0.480658", "0.48033437", "0.47864965", "0.47662243", "0.47383064", "0.47288242", "0.47250688", "0.47084957", "0.4693188", "0.46...
0.6863708
0
Parameters: A job's title, snippet, and body as well as a keyword preference Function: Checks the title, snippet, and body for keyword segments Output: True if all segments of a keyword are present somewhere, false otherwise
function rateKeyword(jobTitle, jobSnippet, jobBody, jobKeywordPref){ //splits a multiword keyword into multiple cells of an array keywordPrefList = jobKeywordPref.split(' '); validKeyword = [0]; //checks to make sure each individual segment of a keyword exists in at least one of the job parameters //returns fals...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkBadWords(note) {\n let notes = document.querySelector('div.note-container');\n\n let noteTitle = note.title.toLowerCase()\n noteTitle = noteTitle.split();\n\n let noteDetails = note.details.toLowerCase();\n noteDetails = noteDetails.split();\n\n if (noteTitle.includes(\"banana\", \"...
[ "0.57094926", "0.56351435", "0.5600545", "0.55483174", "0.5374679", "0.5321924", "0.52911985", "0.5243705", "0.5152925", "0.51045793", "0.5012968", "0.5009523", "0.49521115", "0.4920817", "0.49020803", "0.48910818", "0.48652738", "0.48642173", "0.4859905", "0.4859905", "0.485...
0.6471116
0
Paramters: A geojson point for the job location, and a geojson point for the preference, and a distance in km Function: Returns true if the distance between two points is within the distanceLimit Output: True if the distance between two points is within distanceLimit
function rateLocations(jobPoint, jobPointPref, distanceLimit){ locationArray = []; locationArray.push(geojsonTools.toArray(jobPoint)); locationArray.push(geojsonTools.toArray(jobPointPref)); var distance = geojsonTools.getDistance(locationArray); if(distanceLimit > distance){ return true; } else{ return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDistanceBetweenPointsWithinRange (userLat, userLong, reportLat, reportLong, radius){\n \n\tvar radlat1 = Math.PI * userLat/180;\n\tvar radlat2 = Math.PI * reportLat/180;\n\tvar radlon1 = Math.PI * userLong/180;\n\tvar radlon2 = Math.PI * reportLong/180;\n\tvar theta = userLong-reportLong;\n\tvar radt...
[ "0.61146367", "0.58124584", "0.57533336", "0.5712166", "0.5633345", "0.5553269", "0.544273", "0.5412067", "0.53357184", "0.5278168", "0.5219505", "0.5161254", "0.50875306", "0.5045397", "0.50160444", "0.5005412", "0.5005412", "0.5005412", "0.50002146", "0.4994492", "0.4988412...
0.7307359
0
pad a string with another string
function pad(s, i, c) { s = s.toString(); i = i || 0; c = c || ' '; while (s.length < i) s += c; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "padString(str, { length = 3, char = \"0\" } = {}) {\n return (char.repeat(length) + str).substr(-length, length)\n }", "function pad(str,length)\n{\n\tvar hold = str;\n\twhile((hold.length) < length)\n\t{\n\t\thold = \"0\" + hold;\n\t}\n\treturn hold;\n}", "pad (string, length){\r\n let strlen = str...
[ "0.79101264", "0.77842706", "0.7777383", "0.77577114", "0.773878", "0.7718352", "0.7715782", "0.7708549", "0.7677997", "0.7644627", "0.7644627", "0.76391006", "0.7629087", "0.76229614", "0.75703764", "0.7557782", "0.75477916", "0.7535909", "0.7535909", "0.7535909", "0.7535909...
0.71723634
50
trim the right side of a string
function rtrim(s) { return s.replace(/\s+$/, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FFString_trimRight( value ){\n\tif(value==null || value==\"\") return \"\";\n\n\tvar length = value.length;\n\n\tvar i;\n\tfor(i=length-1;i>=0;i--){\n\t\tif(value.charAt(i) != \" \") break;\t\t\t\n\t}\n\treturn value.substring(0,i+1);\t\n}", "function rightTrim(str) {\n var i;\n for (i = str.lengt...
[ "0.81257385", "0.7704638", "0.76750183", "0.74728", "0.74419576", "0.73458874", "0.7305989", "0.72334325", "0.7211007", "0.7165027", "0.71606374", "0.71409476", "0.7122035", "0.70639", "0.7053085", "0.70468867", "0.70270354", "0.70139444", "0.70003986", "0.6988761", "0.697556...
0.7037609
16
called at process start and optionally every 10 seconds
function go(initial) { // totals for --status var totals = { hosts: [ 0, 0, 0, 0 ], services: [ 0, 0, 0, 0 ], }; var problems = 0; // read the status file var data; try { data = parse(fs.readFileSync(opts.file, 'utf8')); } catch (e) { if (initial) { console.error('failed to read %...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startProcessingHandler(noTimer) {\n\tlet processor = child.spawn(\"node\", [\"processor.js\"], {});\n\tprocessor.stdout.on('data', (data) => {\n\t\tconsole.log(`Processor: ${data}`);\n\t});\n\n\tprocessor.stderr.on('data', (data) => {\n\t\tconsole.error(`Processor: ${data}`);\n\t});\n\n\tprocessor.on('clo...
[ "0.66415465", "0.6625516", "0.6484524", "0.6356058", "0.6308685", "0.62354547", "0.62024814", "0.6184439", "0.6176344", "0.6145836", "0.6140045", "0.6120244", "0.61116046", "0.61116046", "0.6096776", "0.6087877", "0.6069133", "0.6066285", "0.6058613", "0.60339177", "0.6028709...
0.0
-1
View on hand inventory table
function viewAll() { connection.query('SELECT * FROM products', function(err, res) { // Sets up table for our raw data already populated within MYSQL Workbench var table = new Table({ head: ['ID', 'Product Name', 'Department', 'Price', 'Stock Quantity'] }); // displays a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function itemInventoryTable() { }", "function displayInventory() {\n\tconnection.query('SELECT * FROM Products', function (err, res) {\n\t\tif (err) { console.log(err) };\n\t\tvar table = new Table({\n\t\t\thead: ['item_id', 'item_name', 'department_name', 'price', 'stock_quantity'],\n\t\t\tcolWidths: [10, 30, 3...
[ "0.7741324", "0.77149165", "0.75064796", "0.74855506", "0.72279596", "0.72108257", "0.71113974", "0.7097282", "0.70656294", "0.70075804", "0.69856364", "0.6980996", "0.6943741", "0.6929568", "0.6878967", "0.6870501", "0.68538916", "0.68464184", "0.6820746", "0.6780449", "0.67...
0.68632287
16
Shopping function begins here! Custom message to request user to enter an item ID
function whatToBuy() { inquirer.prompt([ { type: "input", name: "itemID", message: "Enter the Item ID of the item would you like to purchase", validate: function (input) { if (isNaN(input)) { return "Enter the product number...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function checkIfItem() {\n // query bamazon DB for the entered item\n connection.query(\"SELECT id FROM products WHER...
[ "0.7060397", "0.7060397", "0.7060397", "0.7060397", "0.7060397", "0.7060397", "0.70532393", "0.6922326", "0.6922326", "0.6891539", "0.681535", "0.67691576", "0.6713867", "0.6713709", "0.6709138", "0.66785085", "0.6658387", "0.662832", "0.66213024", "0.6586365", "0.65727323", ...
0.64394224
37
function to check if valid item
function checkIfItem() { // query bamazon DB for the entered item connection.query("SELECT id FROM products WHERE id=?", [itemToBuy], function (err, res) { if (err) throw err; // if itemToBuy exists in the databse, call howManyToBuy function else if (res[0].id == itemToBuy) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isValid(item) {\n return typeof item === \"object\" \n && item.length === 2\n && Utils.isNumeric(item[0])\n && Utils.isNumeric(item[1]);\n }", "isValid() {\n return this.item.name.length > 0;\n }", "static isValidItem(item = TestQuestion.structure){\n try {...
[ "0.76029485", "0.75375587", "0.74150586", "0.7307445", "0.72420293", "0.72135204", "0.7013635", "0.6976951", "0.6947556", "0.68969434", "0.6866377", "0.66421527", "0.6627664", "0.66092545", "0.6572679", "0.65712", "0.6505685", "0.6413965", "0.6401731", "0.6401731", "0.639394"...
0.64233446
17
function to ask the user how much they would like to purchase
function howManyToBuy() { inquirer.prompt([ { type: "input", name: "quantityToBuy", message: "How many would you like to purchase?", validate: function (input) { if (isNaN(input)) { return false; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function purchase() {\n connection.query(\"SELECT * FROM products\", function (err, res) {\n if (err) throw err;\n console.table(res);\n inquirer.prompt([{\n name: \"itemId\",\n type: \"number\",\n message: \"Enter the item ID of the item you want to buy.\"....
[ "0.77463454", "0.7717637", "0.75207883", "0.7491422", "0.7392726", "0.7387674", "0.735296", "0.7296927", "0.7260908", "0.72424406", "0.72271824", "0.7200973", "0.7173265", "0.7154713", "0.7149934", "0.71435267", "0.7115118", "0.7111415", "0.7102524", "0.7099218", "0.7096273",...
0.7729691
1
function to check if sufficient quantity of item
function checkIfAvailable() { // query bamazon DB for the entered item and available quantity connection.query("SELECT stock_quantity, product_name, price FROM products WHERE id=?", [itemToBuy], function (err, res) { if (err) throw err; // if quantity entered is higher than quantity available, a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customItemQuantity(value) {\r\n if (!isNaN(value)) {\r\n quantityCheck = 0;\r\n return true;\r\n }\r\n else {\r\n quantityCheck++;\r\n\r\n }\r\n if (quantityCheck == 2) {\r\n throw new Error('You must buy atleast 1 item');\r\n }\r\n return true;\r\n}", "f...
[ "0.7579272", "0.73282003", "0.71425194", "0.70702934", "0.7042903", "0.68729836", "0.6799015", "0.6772563", "0.6766669", "0.6738168", "0.67060864", "0.6670088", "0.65696377", "0.65606016", "0.65384585", "0.6503784", "0.6470413", "0.64573795", "0.6455297", "0.6446519", "0.6425...
0.67004436
11
function to update quantity in MySql
function updateQuantity() { connection.query("UPDATE products SET stock_quantity = stock_quantity - ? WHERE id = ?", [ quantityToBuy, itemToBuy ], function (err, res) { if (err) throw err; updateProductSale(); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateQuantity() {\n var query = connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: updatedStock\n },\n {\n item_id: answer.userId\n }\n ],\n )...
[ "0.842471", "0.8302666", "0.8280131", "0.81796205", "0.7951781", "0.79413843", "0.79346824", "0.7868829", "0.78555834", "0.78479797", "0.7804991", "0.77859235", "0.7766199", "0.7707437", "0.76579356", "0.76409584", "0.7638949", "0.7637598", "0.76352155", "0.76307696", "0.7630...
0.8082354
4
function to update product sales
function updateProductSale() { // select the item in database connection.query("SELECT price, id FROM products WHERE id =?", [itemToBuy], function (err, res) { if (err) throw err; // update sales of item in database connection.query("UPDATE products SET product_sales=product_sales + ? WH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSales(count, iid){\n connection.query(\"UPDATE products SET product_sales = product_sales + price * ? WHERE item_id = ?\", [count, iid], function (err, res, fields){\n })\n }", "function updateTotalSales() {\n\n // Query to update total sales based on product id\n var queryTerms = \"...
[ "0.77876556", "0.7751386", "0.7660903", "0.70968693", "0.7096621", "0.70925105", "0.7073948", "0.70247966", "0.69607884", "0.6929334", "0.68044317", "0.6779899", "0.6672747", "0.6668108", "0.66392916", "0.6631746", "0.6619539", "0.65385276", "0.6520975", "0.65193194", "0.6514...
0.790691
0
Sets the screen name according to whether this is a new assignment evaluation or an old one
async componentDidMount() { if (this.state.readOnly === true) { FirebaseFunctions.setCurrentScreen( "Past Evaluation Page", "EvaluationPage" ); } else { FirebaseFunctions.setCurrentScreen( "New Evaluation Page", "EvaluationPage" ); } const student...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScreenName(name) {\n __params['cd'] = name; //Screen name / content description.\n}", "function setAssignName()\n\t{\n\t\tvar name = 'Student and Overall Grade Report';\n\n\t\tvw.drawList.setParam('aName', 'text', name);\n\t}", "function changeScreen(screen) {\n activeScreen = screen;\n}", "f...
[ "0.7034886", "0.65000105", "0.63262886", "0.6184646", "0.6184646", "0.5886744", "0.5866059", "0.5853502", "0.58063877", "0.5804812", "0.5780485", "0.5764793", "0.5626207", "0.56235445", "0.5547913", "0.5513338", "0.5463264", "0.54274255", "0.54072237", "0.54008514", "0.538261...
0.0
-1