query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Get Offline Activity DB
function getOfflineActivities(nsp, callback) { storeGet(null, "activities", function(results) { if (results) { if (nsp) { nsp.emit('api', {activities: results}); } if (callback) { callback(null, results); } } }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_offline_data() {\n var data = store.get(\"app_activities\", []);\n return data;\n}", "getOffline(name) {\n return this.get(Config.db, name);\n }", "async GetActivityList() {\n try {\n\n let query = sps.USP_ACTIVITY_GETLIST + \"()\";\n const result = awa...
[ "0.7573794", "0.6557611", "0.6164333", "0.58994746", "0.5879029", "0.5835382", "0.57735837", "0.5772534", "0.5742374", "0.573192", "0.57201904", "0.56354547", "0.56209105", "0.55505264", "0.54924756", "0.5442635", "0.5441581", "0.53832996", "0.53797966", "0.5370264", "0.53693...
0.67953104
1
Begin the current transaction
async beginTransaction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async beginTransaction () {\n await this._db.beginTransaction()\n await this._yarnlockStore.beginTransaction()\n }", "async beginTransaction() {\n await this.executeSQL(sqlBeginTransaction,[]);\n }", "function beginTransaction (callback) {\n workQueue.enqueue(driverCommandEnum.BEGIN_TRANSACTIO...
[ "0.78498745", "0.7483979", "0.7466401", "0.69608945", "0.6765175", "0.6691298", "0.6478217", "0.6436503", "0.63793486", "0.6269261", "0.62512755", "0.6203125", "0.6084113", "0.59843224", "0.5931838", "0.58858734", "0.5858245", "0.57847846", "0.5762529", "0.56798", "0.5654914"...
0.77025867
1
Rendering data for each kiosk
function renderKioskRow (kiosk) { var newTr = document.createElement('tr'); tableEl.appendChild(newTr); var newTd = document.createElement('td'); newTd.textContent = kiosk.name; newTr.appendChild(newTd); for (var f = 0; f < kiosk.numLbsHour.length; f++) { var tdData = document.createElem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render() {\n res.render('socList', {\n title: 'Sentinel Project: SOC Manager',\n socs: socs,\n datapoints: resultsDatapoints\n });\n }", "function renderHikeView(data, status){\n\n\t\tdocument.body.scrollTop = 0;\n \tdocument.documentElement.s...
[ "0.6172553", "0.5770667", "0.5757202", "0.5704495", "0.5695656", "0.5684655", "0.56663436", "0.5644345", "0.56273556", "0.56002676", "0.55831516", "0.55659", "0.55622476", "0.55576146", "0.5544033", "0.55317515", "0.5524766", "0.551677", "0.54935145", "0.5473981", "0.5471041"...
0.6274117
0
this function will read the help file and display it to the user. it doesn't take any parameters but depends on the file help.txt
function showHelp() { const helpText = fs.readFileSync('./help.txt',{encoding:'UTF-8'}); console.log(helpText); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showHelp() {\n\t//Use figlet npm package to convert text to art/drawing.\n\tfiglet('LIRI help', function (err, data) {\n\t\tif (err) {\n\t\t\tconsole.log('Something went wrong...');\n\t\t\tconsole.dir(err);\n\t\t\treturn;\n\t\t}\n\t\tconsole.log(data)\n\t});\n\tvar helpInfo = \"Usage: node liri.js <comman...
[ "0.6871856", "0.6845412", "0.6844288", "0.6844288", "0.66199476", "0.65260786", "0.65247333", "0.6489144", "0.64870775", "0.6411413", "0.6304012", "0.624101", "0.618254", "0.6145087", "0.61164904", "0.6097362", "0.6085597", "0.60375965", "0.6025317", "0.6017112", "0.60093004"...
0.77802444
0
add an item to the todo list this functions takes the todoFile json and the commands array as parameters. It adds the new items to it and at the end it will write it the new object to the Todo file this way we can save our new todos and keep our old ones
function addTodoItem(jsonObject,commands) { //assign the task text to a variable. let itemToAdd = commands[1]; //check if the user has entered text or not if(itemToAdd === undefined || itemToAdd.length < 1){ console.log('Please enter a name for your task'); }else{ //push the text the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTodosList(jsonObject,commands) {\n let itemToUpdate = commands[1];\n let newText = commands[2];\n if(itemToUpdate > jsonObject.tasks.length) {\n console.log('This item does not exist');\n }else {\n jsonObject.tasks[itemToUpdate - 1] = newText;\n console.log('Updated ...
[ "0.7286457", "0.6699562", "0.65514714", "0.65159297", "0.6496331", "0.64887565", "0.647841", "0.6434301", "0.64140713", "0.6375791", "0.6372819", "0.63716793", "0.63247234", "0.6282232", "0.6274123", "0.6272624", "0.6267701", "0.61859393", "0.61844975", "0.61787134", "0.61665...
0.82300144
0
removes an item from the todo list takes the todosFile json and the commands array as parameters. updates the todofile at the end when it's done removing the tasks
function removeTodoItem (jsonObject,commands) { //assign the task number to a variable let itemToRemove = commands[1]; //checkc if the task number exists and makes sense if(itemToRemove > jsonObject.tasks.length + 1) { console.log('This item does not exist'); }else{ //remove the task...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static deleteItem(description){//description iz faila index\n fs.readFile(pathToRegularTaskFile, (error, fileContent)=>{\n let tasks=[];\n if(!error){\n tasks=JSON.parse(fileContent);\n }\n for(let i=0; i<tasks.length; i++){\n if(task...
[ "0.72289723", "0.6738879", "0.66767305", "0.6662932", "0.6642404", "0.66035426", "0.65929586", "0.65452915", "0.65380716", "0.6483369", "0.6469267", "0.6462026", "0.6450403", "0.6438163", "0.6428322", "0.6420224", "0.6420096", "0.6394114", "0.63908744", "0.63882226", "0.63820...
0.7922762
0
resets the amount of tasks to 0 takes the todosFile json and modifies the tasks in it this function is invoked when the user enter the command 'reset'
function resetTodosList (jsonObject) { //empty tasks jsonObject.tasks = []; console.log('tasks list emptied successfully'); //turn into string and save it to the file jsonObject = JSON.stringify(jsonObject); return fs.writeFile('todo.json',jsonObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetTasks() {\n\t\t\tfor (var i = 0; i < vm.tasks.length; i++) {\n\t\t\t\ttasks.removeTask(vm.tasks[i]);\t\n\t\t\t}\n\t\t}", "function reset() {\n processText(task.text);\n remark();\n }", "async function reset() {\n // delete todoist tasks\n const [label] = await todoi...
[ "0.6904172", "0.6688393", "0.6563052", "0.6544437", "0.6515954", "0.6432918", "0.63438404", "0.62546754", "0.6252801", "0.6164747", "0.6155703", "0.6100688", "0.60968125", "0.60948807", "0.60858583", "0.60788643", "0.6076229", "0.6061824", "0.60613984", "0.6059395", "0.60393"...
0.70289314
0
update the item the user wanted takes two arguments, the todosFile json and the arguments array invoked when the user enters the command 'update'
function updateTodosList(jsonObject,commands) { let itemToUpdate = commands[1]; let newText = commands[2]; if(itemToUpdate > jsonObject.tasks.length) { console.log('This item does not exist'); }else { jsonObject.tasks[itemToUpdate - 1] = newText; console.log('Updated item number ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static update(todos) {\n fs.writeFile(p, JSON.stringify(todos), (err) => console.log(err));\n }", "update(index, todo){\n //this.init => read json file => promise\n return this.init().then(()=>{\n //match client todoList to server todoList\n this.todo.toDoList[index]=todo;...
[ "0.6523437", "0.6374642", "0.6355525", "0.6155953", "0.61224395", "0.6028121", "0.6020941", "0.6020909", "0.59057736", "0.5902242", "0.5890481", "0.5866906", "0.5825024", "0.57992756", "0.57860047", "0.57356554", "0.5717262", "0.5705674", "0.5681794", "0.56771296", "0.5673656...
0.7228506
0
Populate sites on map
function populateSitesOnMap() { clearData(); $.when(loadSites()).done(function(results) { if (sites.length) { log('sites', sites); for (var s in sites) { // log('Placing marker', sites[s].location.geo); var marker = new google.maps.Marker({ position: new google.maps.LatLng(sites[s].locatio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSites() {\n require([\n\t\t\t\"esri/map\",\n\t\t\t\"esri/geometry/Point\",\n\t\t\t\"esri/symbols/SimpleMarkerSymbol\",\n\t\t\t\"esri/graphic\",\n\t\t\t\"esri/layers/GraphicsLayer\",\n\t\t\t\"esri/layers/ArcGISDynamicMapServiceLayer\",\n\t\t\t\"esri/layers/ImageParameters\",\n\t\t\t\"esri/layers/...
[ "0.64461994", "0.64236814", "0.63412565", "0.6227345", "0.61336637", "0.60315096", "0.5992072", "0.5967178", "0.588515", "0.58698815", "0.5865766", "0.58633786", "0.5860518", "0.5858236", "0.5850648", "0.5831753", "0.58269215", "0.5804969", "0.5803458", "0.58031905", "0.57763...
0.7734919
0
grade rooms and insert the result in json
function gradeRooms(json,callback){ var insertedRed; var insertedOrange; for(var i=0;i<json.rooms.length;i++){ insertedRed=false; insertedOrange=false; for(var j=0;j<json.rooms[i].data.length;j++){ if(json.rooms[i].data[j].type=='temp'&&json.rooms[i].data[j].AVGvalue>TEMP_RED_MIN){ json.rooms[i].data[j]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getJoinedRooms() {\n $.post(\"/chatroom/joinedRooms\",{username:username},function(data) {\n let joinedRoomsGroup = $(\"#joinedRooms\");\n let map = new Map()\n let reads = []\n let all = $(\".badge-danger\");\n for (let i = 0; i < all.length; i++) {\n read...
[ "0.5997347", "0.59777844", "0.5864371", "0.5826145", "0.58193344", "0.57039386", "0.56360745", "0.56301457", "0.5584449", "0.55577725", "0.55152017", "0.5503786", "0.5493576", "0.54675585", "0.54618204", "0.54320246", "0.5425592", "0.54017496", "0.5392918", "0.5379288", "0.53...
0.6714033
0
This is the standard function for parsing process.argv. It will return an object that where `argumentName` is a property name and the proceding argument is the value. If there is no proceeding value then it will be interpreted as a boolean true.
function parseArgv(argv) { params = {} argv.forEach(function(arg, i) { if (arg.substr(0, 2) == '--') { paramName = arg.substr(2, arg.length) nextArg = argv[i+1] if ((typeof nextArg == 'string' && nextArg.substr(0, 2) == '--') || nextArg == undefined) { params[paramName] = true } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseArgv(argv) {\n params = {}\n argv.forEach(function(arg, i) {\n if (arg.substr(0, 2) == '--') {\n paramName = arg.substr(2, arg.length)\n nextArg = argv[i+1]\n if (typeof nextArg == 'string' && nextArg.substr(0, 2) == '--') {\n params[paramName] = true\n }\n else {...
[ "0.6757052", "0.6725362", "0.66235924", "0.65186995", "0.6138633", "0.6006105", "0.5992808", "0.5942129", "0.58524734", "0.5833385", "0.5751423", "0.5700204", "0.56973004", "0.5659057", "0.5632719", "0.5632719", "0.5632719", "0.5632719", "0.5632719", "0.5632719", "0.5631453",...
0.67482567
1
send the allHistory command to one client, with the complete history
function sendHistory(ws) { sendMessage(ws, {what: 'allHistory', history}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateHistory() {\n io.emit('update history', chatrooms);\n }", "function setHistory() {\n // clear undo history\n $('#undoHistoryList')\n .empty();\n\n // load new history list from server\n getHistoryFromServer(addHistList);\n}", "function getChatHistory() {\n chatSoc...
[ "0.7282557", "0.6960499", "0.6879143", "0.6733825", "0.662247", "0.6472941", "0.6427359", "0.6415061", "0.6409478", "0.64003736", "0.6386554", "0.6363018", "0.6333709", "0.63168", "0.6316776", "0.6269283", "0.61446404", "0.6128404", "0.60898864", "0.6046195", "0.60307723", ...
0.7420387
0
Wrapper around `QueryBuilder.getCost()`. This must exist because the cost returned `QueryBuilder.getCost()` and therein the Hedera Network doesn't work for `ContractCallQuery`'s. However, if you multiply the cost by ~1.1 then _most_ contracts calls seem to complete fine.
getCost(client) { const _super = Object.create(null, { getCost: { get: () => super.getCost } }); return __awaiter(this, void 0, void 0, function* () { return (yield _super.getCost.call(this, client)).multipliedBy(1.1); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCost(client) {\n const _super = Object.create(null, {\n getCost: { get: () => super.getCost }\n });\n return __awaiter(this, void 0, void 0, function* () {\n // deleted accounts return a COST_ANSWER of zero which triggers `INSUFFICIENT_TX_FEE`\n // if you se...
[ "0.68140924", "0.5838521", "0.54999816", "0.5489196", "0.54326797", "0.53571326", "0.52959776", "0.52197593", "0.51766866", "0.5174479", "0.51538235", "0.51332223", "0.51184237", "0.5112208", "0.5030626", "0.5024486", "0.5009781", "0.49963805", "0.49937958", "0.49804315", "0....
0.6595597
1
Utelly API best for determining what streaming service offers a given title Function to build Utelly query URL:
function buildUtellyURL() { var title = $("#movie-search").val().trim(); // Setting up API parameters: var settings = { url: "https://utelly-tv-shows-and-movies-availability-v1.p.rapidapi.com/lookup?term=" + title + "&country=us", method: "GET", headers: { "x-rapidapi-ho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSearchUrl(query, fields){\n if(query === null) return;\n var words = query.split(\" \");\n var url = \"https://api.spotify.com/v1/search\";\n url += \"?q=\";\n for(var i = 0; i < words.length; i++){\n url += words[i];\n if(i != words.length - 1) url += \"%20\";\n }\n\...
[ "0.5928144", "0.5775693", "0.57701", "0.5767222", "0.57587767", "0.5670579", "0.5669642", "0.56405187", "0.5600656", "0.55830693", "0.5547151", "0.5544561", "0.5526787", "0.5497247", "0.54726386", "0.54646426", "0.54641545", "0.54628897", "0.5459951", "0.5424949", "0.54187745...
0.713536
0
Function to update page with movie data
function updatePage(movieData) { // Error handler if movie isn't available for streaming if (movieData.results.length === 0) { $("#movie-section").html("Title not found, please enter another movie"); } else { // Var for array of available locations to stream: var locations = mov...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retrieveMovie(address){\n\t\n $.ajax({\n url: address,\n success:\n function(text)\n {\n //Update other input fields\n $(\"#updateTitle\").val(text.title);\n $(\"#updateYear\").val(text.year);\n $(\"#updateD...
[ "0.69002926", "0.6854016", "0.68459266", "0.6725453", "0.66868746", "0.66830647", "0.6609912", "0.65837556", "0.6577461", "0.652805", "0.6513714", "0.6510664", "0.6495441", "0.6488748", "0.6425865", "0.6415159", "0.64037746", "0.64031875", "0.6400151", "0.6386912", "0.6381624...
0.71564204
0
This function holds the ajax call from the City GeoLocation Lookup API, it is fed three parameters, integerId, zipcodeValue, cityName. All three come from the click event for the dropdown menu. Only one is being fed into the url for the API, cityName comes from the cityValue variable that holds the value of the user in...
function renderingCoords(integerId, zipcodeValue, cityName) { var settings = { "url": `https://devru-latitude-longitude-find-v1.p.rapidapi.com/latlon.php?location=${cityName}`, "method": "GET", "headers": { "x-rapidapi-host": "devru-latitude-longitude-find-v1.p.rapidapi.com", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNationalityCities(){\r\n let code = nationalityInput.value;\r\n jQuery.ajax({\r\n url: requestURL,\r\n type: 'post',\r\n data: { \"callDestinationCity\": code},\r\n success : function (data) {\r\n let parser = new DOMParser();\r\n let xmlD...
[ "0.6802866", "0.6710651", "0.6623703", "0.6578345", "0.6562163", "0.6544644", "0.6529109", "0.6486711", "0.64740604", "0.6433308", "0.63409954", "0.63399893", "0.6330368", "0.6318629", "0.6315644", "0.6311285", "0.63059574", "0.6294274", "0.6285368", "0.6281831", "0.6265819",...
0.7600783
0
Show the Green/Red Markers after the Perceptron guesses
function putmarkers(guess, point) { //if the perceptron guesses correctly, display the point with a green dot noFill(); strokeWeight(2); if (guess == point.label) { stroke(color(76, 209, 55)); //fill green ellipse(point.x, point.y, 15, 15); //draw a dot on the circle } else { stroke(255, 0, 0); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mousePressed() {\n for (var i = 0; i < points.length; i++) {\n perceptron.train([points[i].x, points[i].y, points[i].bias], points[i].label);\n }\n\n}", "function predictPattern() {\n let dataForPrediction = inputGridToMatrix();\n let prediction = NETWORK.predict(dataForPrediction);\n...
[ "0.60856944", "0.5771329", "0.5657981", "0.54231375", "0.5352029", "0.5341359", "0.52697796", "0.52261055", "0.5216624", "0.51824814", "0.51605093", "0.5142358", "0.5136783", "0.5129823", "0.5124084", "0.51132923", "0.5110545", "0.5099372", "0.50988513", "0.50913376", "0.5084...
0.6496862
0
Use: let lock = makeLock(); ... let done = await lock(); ... done();
function makeLock() { let pending = []; let held = false; function done() { if (pending.length > 0) { let next = pending.shift(); next(once(done)); } else { held = false; } } return function lock() { if (held) { return new Promise(resolve => { pending.push(res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function claimLock() { // () => Promise of /*release*/ () => ()\n const vid_DEBUG = vidGen_DEBUG();\n\n const t0 = performance.now();\n\n await (queue.length ? ( // Lock is already held by this env, or being waited upon; append to the pending queue.\n new Promise(resolve => {\n queue.push(re...
[ "0.69649166", "0.6842727", "0.6710828", "0.6706212", "0.6685063", "0.66664106", "0.6627982", "0.6539788", "0.6539788", "0.6534205", "0.65095943", "0.6459468", "0.6410587", "0.638926", "0.6360782", "0.6355016", "0.632911", "0.6293801", "0.6259282", "0.6217069", "0.61884034", ...
0.69795626
0
set background colour for UV Index based on level of the UV
function createUvLevel(uvIndex){ if (uvIndex >= 11){ $(".uvLevel").text("EXTREME").css("background-color","#B705B7"); }else if (uvIndex >= 8){ $(".uvLevel").text("VERY HIGH").css("background-color","#F80101"); }else if (uvIndex >= 6 ){ $(".uvLevel").text("HIGH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uvColor (index) {\n if (index > 0 && index < 3 ) {\n green (index)\n }\n else if (index > 3 && index < 5 ) {\n yellow (index)\n }\n else if (index > 3 && index < 5 ) {\n yellow (index)\n }\n else if (index > 5 && index < 8 ) {\n orange (index)\n }\n else if (...
[ "0.7245835", "0.68028885", "0.6759527", "0.6690023", "0.6595818", "0.64551765", "0.6116045", "0.6038293", "0.6007516", "0.59736836", "0.59352124", "0.5804426", "0.5690114", "0.5627026", "0.5620407", "0.55501395", "0.5536652", "0.552803", "0.5520849", "0.5517025", "0.5475707",...
0.72998935
0
Create a controller with the given date the cert will also be loaded already.
function createCtrlWithExpiration(date) { var ctrl = undefined; cert.expiration = date; ctrl = createController(); $rootScope.$apply(); return ctrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createTrainingDate(payload) {\n return this.request.post('/create-training-date', _objectSpread({}, payload));\n }", "async retrieveController() {\n this.contr = await Controller.createController();\n }", "prepareCreatedAt(date) {\n const decoded = this.getPayload();\n return decoded && d...
[ "0.50854474", "0.5081621", "0.47456568", "0.4705881", "0.4667815", "0.46223873", "0.46109527", "0.46090376", "0.45857996", "0.45747346", "0.45747346", "0.45747346", "0.45692682", "0.45615572", "0.44863", "0.44797257", "0.4479648", "0.44742686", "0.44704768", "0.44703096", "0....
0.76822734
0
process results of a (new) currently playing track
function processCurrenttrack(data) { setSongInfo(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processCurrenttrack (data) {\n setSongInfo(data)\n}", "function processTracks(tracks) {\n if (tracks) {\n tracks.status = 'success';\n log.info('sending back search results to ' + socket.id);\n socket.emit('search_results', tracks);\n } else {\n log.info('sending...
[ "0.74021554", "0.6710094", "0.6550789", "0.64853853", "0.64669126", "0.6456381", "0.6319179", "0.62932676", "0.62695605", "0.62356704", "0.62127686", "0.6176752", "0.6140089", "0.61162347", "0.6088242", "0.6088242", "0.60436094", "0.5963253", "0.59617484", "0.5949504", "0.592...
0.74027544
0
process results of a repeat
function processRepeat(data) { setRepeat(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makerun(generator,mode, factor,repeat) {\n var tasks = [ {\n cmd : \"state\",\n data : {\n generator : generator, \n mode : mode,\n factor : factor\n }\n } ];\n angular.forEach($rootScope.results.data().queries,\n function(v...
[ "0.5720165", "0.5567649", "0.5496304", "0.54727787", "0.54688394", "0.54270464", "0.5410911", "0.5381379", "0.53675616", "0.5347502", "0.5332566", "0.53165084", "0.52815104", "0.5272552", "0.5224569", "0.5223186", "0.5183576", "0.5156034", "0.5144518", "0.51388747", "0.513511...
0.7203784
0
process results of random
function processRandom(data) { setRandom(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateResultGrid () {\n this.results = this.shuffleArray(this.baseNumbers)\n }", "function randomizeFakeResults(){\n //define and set toDistribute\n let toDistribute = 0;\n for (let i=0; i<diceterms.length; i++){\n let diceterm = diceterms[i];\n for (let j=0; j<diceterm.fakeResults.lengt...
[ "0.6424792", "0.641811", "0.6380445", "0.6367376", "0.6242041", "0.6152536", "0.6134028", "0.61317676", "0.60870224", "0.6028318", "0.5989704", "0.5978005", "0.59727675", "0.5861143", "0.5824314", "0.5815385", "0.5809268", "0.5745128", "0.5732472", "0.57312065", "0.5725032", ...
0.73138547
0
process results of consume
function processConsume(data) { setConsume(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "consume() {}", "function processResults(err, results) {\n\n self.refillInProgress = false;\n self.emit('refill done', results);\n\n }", "async function _readTheStream (err, reply) {\n try {\n\n if (error === true) {\n return;\n }\n \n var items = reply[0][1]...
[ "0.6405453", "0.6290328", "0.62448245", "0.6162874", "0.6092475", "0.59269077", "0.5859718", "0.58058107", "0.5793987", "0.57686394", "0.5720506", "0.5714463", "0.5657026", "0.5628764", "0.5625991", "0.5591637", "0.5581198", "0.55609155", "0.55609155", "0.55609155", "0.556091...
0.6341157
1
process results of single
function processSingle(data) { setSingle(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnSingleResult(resp) {\n return resp.result[0];\n}", "function processParticipation(result) {\n \n}", "function processResults(data, requestStatus, requestId) {\n\t\tconsole.log('data:', data);\n\t}", "function processMulti(response){\n response = response.results;\n results_list = [...
[ "0.6132282", "0.6035679", "0.59941924", "0.5947634", "0.5848026", "0.5840544", "0.5835938", "0.5825172", "0.57934135", "0.5756894", "0.57501155", "0.5715959", "0.56516147", "0.56110173", "0.5606614", "0.5599613", "0.5598945", "0.55793154", "0.5574784", "0.55449426", "0.55102"...
0.6558081
0
process results of current position
function processCurrentposition(data) { var pos = parseInt(data); setPosition(pos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }", "function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n...
[ "0.6231444", "0.6231444", "0.6231444", "0.6231444", "0.6231444", "0.60505295", "0.5739136", "0.57330614", "0.5710799", "0.5681255", "0.56428725", "0.5601574", "0.5580114", "0.5556471", "0.55382794", "0.55325377", "0.5528312", "0.55153877", "0.55064034", "0.54999506", "0.54942...
0.6454858
0
process results of a browse list
function processBrowseDir(resultArr) { var backHtml = '<li style="background-color:#ccc"><a href="#" onclick="return getBrowseDir();"><h1 class="trackname"><i class="fa fa-arrow-circle-left"></i> Back</h1></a></li>' if ( (!resultArr) || (resultArr == '') || (resultArr.length == 0) ) { $('#browsepath').h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileBrowse(evt){\n\tvar files = evt.target.files;\n\t\n\tvar output = [];\n\tfor (var i=0, f; f = files[i]; i++){\n\t\t//build the HTML list output\n\t\toutput.push('<li><strong>', escape(f.name), '</strong> (', f.type || 'n/a', ') - ',\n\t\tf.size, ' bytes, last modified: ',\n\t\tf.lastModifiedDate...
[ "0.6201971", "0.5871316", "0.5867347", "0.5745395", "0.5738066", "0.57202387", "0.5690149", "0.56872034", "0.5662646", "0.5648527", "0.56411076", "0.557911", "0.5555607", "0.5526286", "0.55127066", "0.54927385", "0.5489395", "0.5468619", "0.544026", "0.54202557", "0.54013175"...
0.61488795
1
process results of list of playlists of the user
function processGetPlaylists(resultArr) { if ((!resultArr) || (resultArr == '')) { $('#playlistslist').empty(); return; } var tmp = '', favourites = '', starred = ''; for (var i = 0; i < resultArr.length; i++) { var li_html = '<li><a href="#" onclick="return showTracklist(this.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showUserPlaylists() {\n getUserPlaylists().then(text => {\n var playlists = JSON.parse(text);\n for (var playlist in playlists) {\n console.log(playlist);\n if (playlist != 'favourites') {\n createAsidePlaylist(playlists[playlist]);\n }\n ...
[ "0.70926446", "0.6753554", "0.66716695", "0.6602215", "0.65431553", "0.6527973", "0.6488679", "0.6468963", "0.64342743", "0.63787866", "0.62754667", "0.62742364", "0.6236285", "0.6199178", "0.61911374", "0.6148783", "0.61442924", "0.6114278", "0.6111273", "0.6089369", "0.6060...
0.7365227
0
process results of a returned list of playlist track refs
function processPlaylistItems(resultDict) { var trackUris = [] for (i = 0; i < resultDict.items.length; i++) { trackUris.push(resultDict.items[i].uri); } return mopidy.library.lookup(null, trackUris).then(function(tracks) { // Transform from dict to list and cache result var newp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processPlaylistItems (resultDict) {\n if (resultDict.items.length === 0) {\n console.log('Playlist', resultDict.uri, 'is empty')\n showLoading(false)\n return\n }\n var trackUris = []\n for (i = 0; i < resultDict.items.length; i++) {\n trackUris.push(resultDict.item...
[ "0.74830306", "0.73249245", "0.69076896", "0.67632306", "0.67089313", "0.6664564", "0.66089606", "0.64599186", "0.63638633", "0.63330233", "0.6332106", "0.62675995", "0.6198457", "0.6182618", "0.61820173", "0.6174503", "0.61704206", "0.6162259", "0.6153686", "0.6142879", "0.6...
0.734411
1
process results of the queue, the current playlist
function processCurrentPlaylist(resultArr) { currentplaylist = resultArr; resultsToTables(currentplaylist, CURRENT_PLAYLIST_TABLE); mopidy.playback.getCurrentTlTrack().then(processCurrenttrack, console.error); updatePlayIcons(songdata.track.uri, songdata.tlid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processCurrentPlaylist (resultArr) {\n currentplaylist = resultArr\n resultsToTables(currentplaylist, CURRENT_PLAYLIST_TABLE)\n mopidy.playback.getCurrentTlTrack().then(processCurrenttrack, console.error)\n updatePlayIcons(songdata.track.uri, songdata.tlid)\n}", "function processPlaylistItem...
[ "0.74364066", "0.68373424", "0.6740201", "0.6458972", "0.636385", "0.62635803", "0.61173606", "0.6071387", "0.60286367", "0.60011256", "0.5979991", "0.5973898", "0.5964424", "0.58906126", "0.5874862", "0.5865561", "0.58647287", "0.5860339", "0.5834621", "0.5822264", "0.581545...
0.7470922
0
process results of an artist lookup
function processArtistResults(resultArr) { if (!resultArr || (resultArr.length == 0)) { $('#h_artistname').text('Artist not found...'); getCover('', '#artistviewimage, #artistpopupimage', 'extralarge'); showLoading(false); return; } customTracklists[resultArr.uri] = resultArr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function artistSearch() {\n let userInput = id(\"artist-query\").value;\n if (userInput.includes(\" \")) {\n userInput = userInput.replace(\" \", \"_\");\n }\n let apiURL = BASE_URL + \"artist.search?q_artist=\" + userInput + \"&page_size=1&\" + API_KEY;\n apiURL = encodeURIComponent(apiURL);\n...
[ "0.71512794", "0.7072958", "0.68472725", "0.66813654", "0.6606661", "0.6571175", "0.65292037", "0.65289146", "0.6471775", "0.6428898", "0.63987523", "0.6375366", "0.636309", "0.6350941", "0.6331577", "0.630909", "0.6294827", "0.6287093", "0.6239418", "0.6231897", "0.6206874",...
0.77264833
0
process results of an album lookup
function processAlbumResults(resultArr) { if (!resultArr || (resultArr.length == 0)) { $('#h_albumname').text('Album not found...'); getCover('', '#albumviewcover, #coverpopupimage', 'extralarge'); showLoading(false); return; } customTracklists[resultArr.uri] = resultArr; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAlbumsResult(r) \n{\n if (!r.success) {\n\t\t\tif (r.error) {\n\t\t\t\tTi.UI.createAlertDialog({title:L('error'),message:r.error}).show();\n\t\t\t} else {\n\t\t\t\tTi.UI.createAlertDialog({title:L('error'),message:L('uns')}).show();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t//Convert the result to j...
[ "0.6880821", "0.65761435", "0.65745723", "0.6481566", "0.6433334", "0.6276126", "0.62158334", "0.6185506", "0.6168003", "0.6115505", "0.610815", "0.6058353", "0.6025164", "0.6017864", "0.60142654", "0.5916643", "0.58989257", "0.58752036", "0.5856814", "0.5845192", "0.5834745"...
0.77291363
0
Draws a filled cell with a different color for each class value.
function drawcell(x, y, val) { let x1 = x * cellw; let y1 = y * cellw; // Select color based on class value let color = "#FFFFFF"; if (val == 0) color = "#FFDBC2"; // red if (val == 1) color = "#C2DBFF"; // blue if (val == 2) color = "#DBFFC2"; // green if (val == 3) color = "#FAFC8...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paint_cell(x, y, num)\n\t{\t\n\t\tvar gc_colors = [\"#1BCFC3\", \"#1BCFC3\" , \"#1BCFC3\"];\n\t\tctx.fillStyle = gc_colors[num % 3];\n\t\tctx.fillRect(x*cell_w, y*cell_w, cell_w, cell_w);\n\t\tctx.strokeStyle = gc_colors[num % 3];\n\t\tctx.strokeRect(x*cell_w, y*cell_w, cell_w, cell_w);\n\t}", "function...
[ "0.6820282", "0.6718877", "0.66619587", "0.6645207", "0.65138924", "0.64272183", "0.64091456", "0.63898444", "0.6386217", "0.6381432", "0.6348018", "0.62364715", "0.6222553", "0.61882484", "0.61754006", "0.6156766", "0.6156605", "0.61360306", "0.6133287", "0.6114607", "0.6083...
0.7049344
0
Draws the labels from the dataset.
function draw_labels(data, opt) { for (let i = 0; i < data.no_examples(); i++) { let xe = data.x[i]; let ye = data.y[i]; let x1 = (xe[0] - opt[2]) / opt[0] * 100; let x2 = (xe[1] - opt[3]) / opt[1] * 100; drawlabel(x1, x2, ye); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLabels() {\n window.dGO.printArea.innerHTML = ''; // Clear out previous labels.\n\n var items = getLabelData(null);\n // Create a label for each line of the CSV.\n items.data.forEach(function(item, i) {\n window.dGO.printArea.appendChild(createLabel(item, i));\n })\n\n // Ge...
[ "0.68691015", "0.683887", "0.6826028", "0.6775398", "0.6697428", "0.66380465", "0.66248566", "0.66000766", "0.6585198", "0.65848327", "0.65469515", "0.64799225", "0.6451175", "0.6446644", "0.6354955", "0.63408244", "0.63080007", "0.6305982", "0.6261865", "0.6216425", "0.62102...
0.72321427
0
When receives a list of things to wrap as Promises. it will then wait for: a) all to settle b) first to reject c) first to settle with a falsy value c) is suboptimal, since it has a specific narrow usecase for save hooks
function when(items) { items = items || []; var resolveAll, rejectAll, allResolvedPromise = new Promise(function(resolve, reject) { resolveAll = resolve; rejectAll = reject; }); var remaining = 0, settledWith = [], itemsCopy = Array.isArray(items) ? items.slice() :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static allSettled(iterable) {\n return CustomPromise.handleArray(iterable, { finishAll:1 });\n }", "backtrackTheChain() {\r\n this.orderQueue.forEach(([waitingPromise, successCallback]) => {\r\n //if the passed arg is not a function simply return the observed value w.out executing\r\n ...
[ "0.6101876", "0.6077281", "0.60380834", "0.5997596", "0.5852811", "0.58042485", "0.56723773", "0.5633267", "0.5597934", "0.5591547", "0.554415", "0.5536965", "0.5470341", "0.5412738", "0.54035985", "0.5401315", "0.5317316", "0.52838373", "0.52603704", "0.52502376", "0.5247059...
0.6300731
0
TEST DRIVEN DEVELOPMENT (TDD) Test.assertEquals(findOutlier([0, 1, 2]), 1) Test.assertEquals(findOutlier([1, 2, 3]), 2) Test.assertEquals(findOutlier([2,6,8,10,3]), 3) Test.assertEquals(findOutlier([0,0,3,0,0]), 3) Test.assertEquals(findOutlier([1,1,0,1,1]), 0) Easier Solution
function findOutlier(integers) { let evenNumbers = integers.filter(a => { return (a % 2) == 0 }) let oddNumbers = integers.filter(a => { return (a % 2) != 0 }) return (evenNumbers.length > 1) ? (oddNumbers[0]) : (evenNumbers[0]) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findOutlier(integers){\n return integers.filter(x => x % 2 == 0).length == 1 ? integers.filter(x => x % 2 == 0)[0] : integers.filter(x => x % 2 != 0)[0];\n}", "function findOutlier(integers){\n let n = 0,m = 0;\n let outlier = 0; \n for(let i = 0; i < 3; i++){ /* Count number of odd and even integ...
[ "0.71032697", "0.7084983", "0.7053895", "0.7040491", "0.6969499", "0.69418687", "0.69384086", "0.69229627", "0.68829304", "0.6882326", "0.68572664", "0.6794082", "0.67358476", "0.672498", "0.65832996", "0.64937985", "0.63330597", "0.63100344", "0.6269079", "0.61286753", "0.61...
0.7090173
1
restructuring monthly flow data for database
function structureMonthFlowData() { for (i = 0; i < self.flowCategories.length; i++) { if (self.flowCategories[i].item_amount === undefined || self.flowCategories[i].item_amount === null) { self.flowCategories[i].item_amount = 0; } var monthlyBudgetCategoryDat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "timesheets() {\n var from = FlowRouter.getParam(\"from\");\n var to = FlowRouter.getParam(\"to\");\n var projectId = FlowRouter.getParam(\"projectId\");\n var timesheets = [];\n var result = null;\n\n //if it's date range, making sure query reflects the range\n if (from == null |...
[ "0.5831998", "0.57460713", "0.56781405", "0.5677768", "0.566528", "0.55891526", "0.5565818", "0.55518556", "0.5443717", "0.5424973", "0.54132026", "0.54067206", "0.5404428", "0.53736144", "0.5354569", "0.5343752", "0.5303638", "0.5298522", "0.52678895", "0.52651894", "0.52435...
0.6214831
0
gets initial budget data
function getBudgetData() { budgetFactory.getBudget().then(function(response) { var budget = response; self.startingMonthID = budget.budget_start_month; self.startingYear = budget.budget_start_year; setStartingMonth(); setYears(); }); } //en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startData() { return {\r\n unlocked: false,\r\n points: new Decimal(0),\r\n best: new Decimal(0),\r\n spent: new Decimal(0),\r\n first: 0,\r\n auto: false,\r\n autoBld: false,\r\n pseudoUpgs: [],\r\n }}", "startData() { return {\r\n unlocked: fals...
[ "0.661441", "0.6335871", "0.6277702", "0.62259376", "0.62001413", "0.61328554", "0.6131324", "0.6117622", "0.611307", "0.6086324", "0.60594034", "0.60430115", "0.60271996", "0.6025311", "0.60213244", "0.5919569", "0.59155464", "0.5873227", "0.58686393", "0.58306056", "0.58241...
0.7552833
0
sets years of months
function setYears() { if (self.budgetMonths[0].month === 'January') { for (i = 0; i < self.budgetMonths.length; i++) { self.budgetMonths[i].year = self.startingYear; } } else { var newYear = false; for (i = 0; i < self.budgetMonths.length; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetYears() {\n curYearRange = [1950, 2020];\n}", "function setMonthYear(date) {\n var month = date.getMonth();\n var year = date.getFullYear();\n\n // update properties if different\n if (month !== that.selectedMonth || year !== that.selectedYear) {\n ...
[ "0.6902443", "0.6837085", "0.67638874", "0.67588884", "0.6658069", "0.6589951", "0.6565343", "0.6563366", "0.6558804", "0.65468043", "0.6492999", "0.63957506", "0.6380759", "0.63528144", "0.6344006", "0.633138", "0.6320641", "0.63155377", "0.63048", "0.6298474", "0.6281829", ...
0.8208167
0
function to reset index and data when advancing a month
function setNextMonthData() { if (self.currentMonthIndex < 12) { self.currentMonthIndex++; } else { self.currentMonthIndex = 1; } for (var i = 0; i < self.budgetMonths.length; i++) { if (self.currentMonthIndex == self.budgetMonths[i].month_id) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetNum(){\n//fill=>cambia todos los elementos en un arreglo por un valor estático, desde el índice start (por defecto 0) hasta el índice end\n//Devuelve el arreglo modificado\n monthlySales.fill(0);\n monthlySalesChart.update();\n}", "function setPrevMonthData() {\n if (self.currentMonthIndex...
[ "0.6712864", "0.6347262", "0.6254416", "0.62491876", "0.61447614", "0.6141875", "0.61399084", "0.6017625", "0.6016132", "0.60136044", "0.6009189", "0.6009189", "0.60044956", "0.5943604", "0.5921476", "0.5853857", "0.5818912", "0.5799261", "0.57903075", "0.578556", "0.57768667...
0.6404882
1
function to reset index and data when regressing to the previous month
function setPrevMonthData() { if (self.currentMonthIndex > 1) { self.currentMonthIndex--; } else { self.currentMonthIndex = 12; } for (var i = 0; i < self.budgetMonths.length; i++) { if (self.currentMonthIndex == self.budgetMonths[i].month_id) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prevMonth() {\n // -- remove one month from the viewDate --/\n $directive.viewDate.setDate(1);\n $directive.viewDate.setMonth($directive.viewDate.getMonth() - 1);\n // -- reload the viewdate woopwoop --/\n setViewDate($directive.viewDate)...
[ "0.65944326", "0.64694345", "0.64374757", "0.6392123", "0.6372806", "0.6201053", "0.61936826", "0.61653155", "0.61097705", "0.61004037", "0.60232157", "0.6008905", "0.5942191", "0.5942021", "0.59003955", "0.5852028", "0.58410203", "0.5840923", "0.58194935", "0.58051205", "0.5...
0.676731
0
console.log('===========================> '+intervalslength+' '+starttimestay+ ' ' +stoptimestay)
function intervals(y, a, b) { // console.log('======================> INTERVAL '+starttime+' '+a+' | '+b) // IF STARTTIME POINTS WITH SCHEDULE if(starttime <= a && starttime < b) { // LOOP OR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "logIntervals() {\n\n logNode(this.root, 0)\n\n function logNode(node, indent) {\n\n var space = \"\"\n for (var i = 0; i < indent; i++) space += \" \"\n console.log(space + node.interval.low + \" \" + node.interval.high) // + \" \" + (node.interval.value ? node.interv...
[ "0.63129425", "0.5872062", "0.5719215", "0.5631008", "0.5594386", "0.55822307", "0.5552734", "0.5525822", "0.55051345", "0.5480968", "0.5480243", "0.54791373", "0.5447731", "0.5427098", "0.5426832", "0.5398293", "0.53880954", "0.536931", "0.5365479", "0.5360197", "0.5340013",...
0.63510925
0
Je souhaite recuperer la totalite des fests afin de les afficher sur cette page J'appelle la fonction qui va effectuer ma requete au chargement de la page dans le lifecycle componentDidMount
componentDidMount() { this.fetchAllFests(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.getTrending();\n this.getTopRated();\n this.getDurflixContent();\n this.getGenreRows();\n }", "componentDidMount() {\n this.inicio();\n this.mostraralergias();\n this.eliminaralergias();\n this.mostrarhabitos();\n this.eliminarh...
[ "0.6885651", "0.6712242", "0.6702357", "0.66621006", "0.66407627", "0.6638463", "0.6579271", "0.65371525", "0.65127707", "0.64984876", "0.64481145", "0.6433534", "0.64254975", "0.64041257", "0.6397943", "0.6397046", "0.63774365", "0.6375945", "0.63687176", "0.63624793", "0.63...
0.70823973
0
the float values of width and height of a single grid position
function getGridWidth(){ return canvas.width/xGridAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGridCellSize() {\n return (min(width, height) / 2 - 50) / gridSize;\n}", "function getGridSize() {\n\t\t\t\t return (window.innerWidth < 500) ? 1 :\n\t\t\t\t (window.innerWidth < 1179) ? 2 : 3;\n\t\t\t\t}", "get cellWidth() {\n return (min(width, height) - 2*GRID_BUFFER) / this.c...
[ "0.736196", "0.6727754", "0.6726652", "0.6687459", "0.66481024", "0.66007274", "0.6564529", "0.6536379", "0.65284693", "0.6528043", "0.6513623", "0.64992946", "0.6496006", "0.64678127", "0.6464577", "0.64515036", "0.64497304", "0.64442205", "0.6440751", "0.64369386", "0.63958...
0.6962638
1
level starts at 1, increment level when player deletes 5 lines player gains more score the higher their level, as well as time step decreasing
function LevelSystem(){ level = Math.floor(lineCounter/ 5) + 1; if(artAgent ==false){ originalTimeStep = 0.3 - ((level -1) * 0.05); } evaluateMove("line"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkLevel(){\r\n let r = Math.floor(lines / 10) + 1\r\n if(r > level) {\r\n level = r\r\n }\r\n adjustDropSpeed()\r\n}", "function updateLevel(){\n\tlevel = 1 + Math.floor(score / 1000);\n\ttimeBetweenDrops = 1000 * Math.pow(.75, level - 1);\n\tdocument.getElementById(\"gameStatus\").innerHTML =...
[ "0.754828", "0.7323957", "0.72756547", "0.7243296", "0.7203691", "0.720216", "0.7173527", "0.71576273", "0.7097584", "0.6995797", "0.6956461", "0.6924696", "0.6892905", "0.686492", "0.68484753", "0.6830253", "0.6808393", "0.67936075", "0.67915654", "0.6776626", "0.6759848", ...
0.75706494
0
preload() Load dog image and sound
function preload() { dog.image = loadImage("assets/images/dog.png"); dog.sound = loadSound("assets/sounds/bark.wav"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preload() {\n song = loadSound('hit.mp3');\n reimu = loadImage('reimu.png');\n stage = loadImage(\"stage3.gif\");\n //stagel = createImg(\"stage3.gif\");\n song2 = loadSound(\"bgm.mp3\");\n song3 = loadSound(\"deathbgm.mp3\");\n}", "function preload(){\r\nsadDog=loadImage(\"Dog.png\");\r\nhappyDog...
[ "0.84714043", "0.84141517", "0.84141517", "0.8410634", "0.8405355", "0.83926815", "0.83519614", "0.83241796", "0.82715684", "0.8262027", "0.82513696", "0.8249188", "0.8228731", "0.82128304", "0.81618017", "0.81477195", "0.813913", "0.8131525", "0.81134886", "0.8092503", "0.80...
0.8654506
1
setup() Put the dog in a random location and set up its sound
function setup() { createCanvas(windowWidth, windowHeight); // We'll draw from the center imageMode(CENTER); // Choose a random location for the dog, use offsets to avoid having it // appear half off-screen dog.x = random(0 + dog.image.width / 2, width - dog.image.width / 2); dog.y = random(0 + dog.image...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n createCanvas(windowWidth,windowHeight);\n\n // We'll draw from the center\n imageMode(CENTER);\n // Choose a random location for the dog, use offsets to avoid having it\n // appear half off-screen\n dog.x = random(0 + dog.image.width/2,width - dog.image.width/2);\n dog.y = random(0 + do...
[ "0.7541421", "0.738637", "0.7316427", "0.68457836", "0.6670316", "0.66661227", "0.6597871", "0.6592278", "0.6590857", "0.6569458", "0.6545864", "0.65162843", "0.6486387", "0.64356107", "0.6310258", "0.62961286", "0.6295936", "0.62924415", "0.62739867", "0.6269637", "0.6263456...
0.7508007
1
draw() Tracks distance of mouse from the dog and alters its barking volume and pan to indicate its location. Displays a circle around the invisible dog if you find it.
function draw() { // A nice green background background(100, 200, 100); // Calculate the distance to the dog from the mouse let d = dist(mouseX, mouseY, dog.x, dog.y); // If the mouse is over the dog, we found it if (d < dog.image.height / 2) { // Display the invisible dog (tinted to transparent becau...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n // A nice green background\n background(100,200,100);\n\n // Calculate the distance to the dog from the mouse\n var d = dist(mouseX,mouseY,dog.x,dog.y);\n\n // If the mouse if over the dog, we found it\n if (d < dog.image.height/2) {\n // Display the invisible dog (tinted to transparen...
[ "0.7853688", "0.64473414", "0.6381959", "0.6336725", "0.6303292", "0.629753", "0.6275566", "0.62710136", "0.6264798", "0.62570894", "0.6244775", "0.6208065", "0.6187439", "0.6157922", "0.61294246", "0.6104633", "0.6022216", "0.6020263", "0.5995075", "0.5988761", "0.5961302", ...
0.7862773
0
Get the unsafeWindow object. Compatible with Firefox, Chrome, etc.
function _getUnsafeWin() { var divElem; /* If aleady save window object */ if (_window !== undefined) return _window; if (this.unsafeWidnow !== undefined) { // In Firefox _window = this.unsafeWindow; } else if (unsafe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWindow() {\n return BrowserWindow.getAllWindows()[0];\n}", "_getWindow() {\n const doc = this._getDocument();\n const win = (doc === null || doc === void 0 ? void 0 : doc.defaultView) || window;\n return typeof win === 'object' && win ? win : null;\n }", "_getWindow() {\n ...
[ "0.6538369", "0.65288883", "0.6528697", "0.645649", "0.6434572", "0.6414191", "0.6414191", "0.6414191", "0.6414191", "0.6414191", "0.6414191", "0.632511", "0.63247275", "0.63247275", "0.63247275", "0.6313114", "0.6313114", "0.6313114", "0.6285607", "0.6285607", "0.62623996", ...
0.8481128
0
randomize array of images
function randomizeImages() { Array.prototype.randomize = function() { var i = this.length, j, temp; while (--i) { j = Math.floor(Math.random() * (i - 1)); temp = this[i]; this[i] = this[j]; this[j] = temp; } }; images.randomize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomizeImages(){\n Array.prototype.randomize = function()\n {\n var i = this.length, j, temp;\n while ( --i )\n {\n j = Math.floor( Math.random() * (i - 1) );\n temp = this[i];\n this[i] = this[j];\n this[j] = temp;\n }\n };\n \n images.randomize();\n}", "shuffleIm...
[ "0.82435745", "0.80695266", "0.7987446", "0.7851185", "0.77113974", "0.7676017", "0.7617143", "0.76083344", "0.7456259", "0.7432647", "0.74320525", "0.74316585", "0.7406008", "0.7393563", "0.72906256", "0.72882974", "0.72865546", "0.72838795", "0.72811264", "0.7236827", "0.72...
0.816844
1
Function used to increment the counter value in server
function increment() { // Increment the counter value in server socket.emit('incrementCounterValue'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function incrementCounter() {\n return counterValue += 1;\n }", "function incrementCounter () {\r\n counter ++;\r\n console.log('counter', counter);\r\n }", "function incrementCounter() {\n setCounter(counter + 1);\n }", "function increment() {\n return increment.count++;\n }", ...
[ "0.8089834", "0.79025114", "0.7867599", "0.7795239", "0.77934253", "0.77934253", "0.77934253", "0.77717245", "0.7697232", "0.7666514", "0.7643924", "0.7523244", "0.749825", "0.74633634", "0.739434", "0.73625547", "0.7292364", "0.7246194", "0.72299266", "0.70884323", "0.707310...
0.8595941
0
JavaScript Singly LL node (Link)
function SinglyLink( data, child ){ /** Declare default node properties. */ this.data = data; this.next = child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function oldGLnk(target, description, linkData)\n{\n}", "link() {\n\t\t// Call super link to link members of Top Level (Identified)\n\t\tsuper.link();\n\t\t\n this._built = this._sbolDocument.lookupURI(this._built);\t\t\n }", "function addLink() {\n SC.RunLoop.begin();\n Nodelink.store.createRecord...
[ "0.64776355", "0.6336853", "0.6332159", "0.6259292", "0.62099564", "0.6201409", "0.61882645", "0.6159848", "0.6153417", "0.6118532", "0.5988353", "0.5961093", "0.5946511", "0.59419924", "0.5910377", "0.58957255", "0.58837306", "0.5879296", "0.5855988", "0.5850666", "0.5842455...
0.70813
0
Constructs a new GetDealsSummaryDataWeightedValuesTotal. The total weighted values of the deals grouped by deal currency. The weighted value is calculated as probability times deal value.
constructor() { GetDealsSummaryDataWeightedValuesTotal.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumValues() {\n return data.reduce((temp, currValue) => temp + currValue.cost, 0);\n }", "function calcTotals() {\n var incomes = 0;\n var expenses = 0;\n var budget;\n // calculate total income\n data.allItems.inc.forEach(function(item) {\n incomes+= it...
[ "0.5158893", "0.50778484", "0.5030752", "0.5030752", "0.5012512", "0.50006986", "0.49107364", "0.49039957", "0.48960465", "0.48946", "0.48440638", "0.4830397", "0.48159832", "0.4809473", "0.4809473", "0.48049474", "0.47618723", "0.47525272", "0.4733743", "0.47291613", "0.4725...
0.65768063
0
displays the window dimensions on a window to assist with stuff.
function windowDimensions(controlId) { var winW = 630, winH = 460; if (document.body && document.body.offsetWidth) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } if (document.compatMode == 'CSS1Compat' && document.documentElement && document.documentElement.offsetWidth) { winW ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayWindowSize() {\n var win = $(window);\n $('.window-size').html('(' + win.width() + ', ' + win.height() + ')');\n //console.log(win.height());\n }", "function resizeToShowDimensions() {\n var resizeDiv = document.getElementById(\"resize\")\n let dimensInput = document...
[ "0.8095872", "0.70221496", "0.69896746", "0.6856162", "0.683335", "0.6808305", "0.6803121", "0.67568433", "0.6745173", "0.6716822", "0.6709737", "0.6696207", "0.6691299", "0.66597164", "0.66491884", "0.6640339", "0.66365373", "0.6630479", "0.6616578", "0.65860534", "0.6585178...
0.7034768
1
Function to convert possession date to monthyear format
convertToMonthYear(dateM) { let date= new Date(dateM); var month = new Array(); month[0] = "Jan"; month[1] = "Feb"; month[2] = "March"; month[3] = "April"; month[4] = "May"; month[5] = "June"; month[6] = "July"; month[7] = "Aug"; month[8] = "Sept"; month[9] = "Oct"; month[10] = "Nov"; month[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yearMonth() {\n return doFormat(date, {\n year: 'numeric',\n month: 'long'\n });\n }", "function formatYearMonth(date) {\n return date.getFullYear() + \"-\" + (\"0\" + (date.getMonth() + 1)).slice(-2)\n}", "function getYYYYMM(date) {\n c...
[ "0.7872865", "0.7347882", "0.7130242", "0.7006602", "0.7000134", "0.6748602", "0.6679107", "0.66190773", "0.65791786", "0.6517738", "0.6487417", "0.64538443", "0.64226955", "0.64106894", "0.63696986", "0.63615495", "0.634028", "0.63278997", "0.63185745", "0.62920487", "0.6238...
0.7469537
1
we need this method to drill down to current area and current scene and call `updateSceneStatus` it is mainly used for updating status once area is being chnaged.
updateSceneStatus(status: number) { let sceneRef: any const currArea = this.currentAreRef if (currArea) { sceneRef = currArea.currentSceneRef if (sceneRef) { sceneRef.updateSceneStatus(status) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "switchScene() {\r\n\t\tswitch(this.id) {\r\n case 'cliffsA':\r\n completeLevels.cliffs[0] = true;\r\n\t\t\t\ttrackEvent('LevelComplete', 'Cliffs A');\r\n\t\t\t\tthis.scene.start('endGame');\r\n\t\t\t\tbreak;\r\n\t\t}\r\n }", "updateScene(data) {\n const newScene = this.getSceneByI...
[ "0.62652016", "0.6031967", "0.59938395", "0.5959271", "0.578973", "0.5785013", "0.57828355", "0.5777627", "0.5762941", "0.57315737", "0.5692797", "0.5686578", "0.56536597", "0.5647883", "0.56178594", "0.56150967", "0.56150967", "0.5588653", "0.55864114", "0.557862", "0.555721...
0.7658099
0
validate if the sum of the percentages is less or equal 100
function validate_total_percentage(element){ var total_percentage = 0.0; $("[id$='percentage']").each(function(){ //the element not visible is the template used to create the allocations form if($(this).is(":visible")) total_percentage += parseFloat($(this).val())...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTotalPercentage100(element) {\n var isTotalPercentage100 = false;\n var totalPercentage = 0;\n \n $('[name^=\"percentageBeneficiary\"]:visible').each(function() {\n totalPercentage += parseInt($(this).val());\n });\n \n \n if (100 === totalPercentage) {\n isTotalPercent...
[ "0.77014554", "0.74425817", "0.725542", "0.71086204", "0.6853656", "0.6853656", "0.676622", "0.6762156", "0.67047065", "0.67033905", "0.66742545", "0.6668227", "0.6668227", "0.66669333", "0.66669333", "0.66669333", "0.66669333", "0.66669333", "0.6641261", "0.6641261", "0.6641...
0.77698636
0
Calculate the residual value
function calculate_residual(){ var $initial_balance = $("#id_initial_balance"); if($initial_balance.val()){ var initial_balance = parseFloat($initial_balance.val().replace(",", "")); $("[id$='total']").each(function(){ //the element not visible is the template us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function irrResult(v, d, r) {\n var result = 0.0\n\n var r = r + 1\n var result = v[0]\n for (var i = 1; i < v.length; i++) {\n result += v[i] / Math.pow(r, dateDiff(d[i], d[0], \"days\") / averageDaysPerYear)\n }\n return result\n}", "function realR(R)\n{\n\n\t//E96 1% Resistors\n\tif(l...
[ "0.56543773", "0.5594436", "0.5406236", "0.54058105", "0.5342948", "0.5327884", "0.5180827", "0.50994045", "0.5049582", "0.49469602", "0.49445608", "0.49432993", "0.4939941", "0.49356365", "0.49353045", "0.49350378", "0.49305", "0.49305", "0.49218476", "0.49135998", "0.491159...
0.700909
0
Funcion: permite captar el evento clicked sobre un link para luego cargarlo en el div respectivo
function loadPiece(href,divName) { //$("#espera").css("display", "inline"); $(divName).load(href, {}, function(){ var divPaginationLinks = divName+" #pagination a,#order a"; $(divPaginationLinks).click(function(){ var thisHref = $(this).attr("href"); loadPiece(thisHref,divName...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClick(el,e) {\n\tloadURL(el.attributes.target,el.text);\n}", "function onClick() {return thisObj.load(this.href);}", "function onClick() {return thisObj.load(this.href);}", "function bindingArticleClick() {\n $('#rovat .content a').bind('click', function (event, ui) {\n document.getE...
[ "0.67235357", "0.6462019", "0.6462019", "0.6448082", "0.6447516", "0.64057696", "0.63591623", "0.6301767", "0.62711066", "0.62178326", "0.61961675", "0.6183315", "0.6171785", "0.61702174", "0.61581707", "0.6123844", "0.6123844", "0.6122794", "0.60835266", "0.60835266", "0.605...
0.68469214
0
resets the dom and the choice array and adds the event listener
function reset() { choices.splice(0, 2); $els.rock.style.backgroundColor = 'goldenrod'; $els.paper.style.backgroundColor = 'goldenrod'; $els.scissors.style.backgroundColor = 'goldenrod'; $els.winner.textContent = ''; $els.container.addEventListener('click', checkChoiceAndCompare); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addListeners(){\r\ndocument.getElementById(\"choice1\").addEventListener(\"click\",choice1Select);\r\ndocument.getElementById(\"choice2\").addEventListener(\"click\",choice2Select);\r\ndocument.getElementById(\"choice3\").addEventListener(\"click\",choice3Select);\r\ndocument.getElementById(\"choice4\").a...
[ "0.6412466", "0.61070555", "0.60928744", "0.60544556", "0.6052471", "0.6052216", "0.60283124", "0.6011623", "0.6001941", "0.5996505", "0.59784317", "0.5976992", "0.59495944", "0.5944243", "0.5920199", "0.5866415", "0.5855884", "0.5843572", "0.57731676", "0.57599497", "0.57579...
0.6527877
0
function to display forecast time
function showForecastTime (timestamp) { let forecastDate = new Date (timestamp); let days = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]; let day = days[now.getDay()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayTime() {\n $(\"tbody\").empty();\n setInterval(displayTime, 10 * 1000);\n $(\"#currentTime\").html(\"<h2>\" + moment().format(\"hh:mm a\") + \"</h2>\");\n displayTrain();\n }", "function displayForecast(times) {\n ++count;\n var temp = times[i]...
[ "0.66429484", "0.66140246", "0.6487239", "0.6439274", "0.6438702", "0.64238256", "0.63943624", "0.6340462", "0.6337971", "0.632005", "0.63160354", "0.6300918", "0.628688", "0.62425655", "0.62358516", "0.6235806", "0.6231561", "0.62292117", "0.6223461", "0.62094724", "0.620779...
0.6900441
0
Bound Action Creators that automatically dispatches fetchNewsThreads fectchNewsThread
function fetchNewsThreads () { return dispatch => { dispatch(requestNewsThreads()); return fetch(`${BASE_API_URL}topstories.json`) .then(response => response.json()) .then(json => { let skim = json.slice(0,MAX_THREAD_NUMBER); // reduce the page size dispatch(receiveNewsThreads(skim)); }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async renderNews() {\n this.addPageFunctionalities();\n const response = await this.controller.getTopNewsApi();\n let data = response.articles;\n this.createCards(data, \"Salvar\", (noticia) => {\n this.clickBotao(noticia);\n });\n }", "function _initAddToNewsfeed() {\n\n $addPostButt...
[ "0.57513213", "0.5731554", "0.5515042", "0.5500603", "0.5382613", "0.5371085", "0.53684366", "0.53295255", "0.53192025", "0.5308168", "0.528516", "0.5241659", "0.52403146", "0.52348584", "0.5214322", "0.52080077", "0.51687986", "0.51679987", "0.51616967", "0.5145389", "0.5142...
0.690752
0
Some checking functions before fetching shouldFetchNewsThreads shouldFetchNewsThread
function shouldFetchNewsThreads ( state = { ids: new Map() }) { return state.ids.size === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchNewsThreads () {\n\treturn dispatch => {\n\t\tdispatch(requestNewsThreads());\n\t\treturn fetch(`${BASE_API_URL}topstories.json`)\n\t\t\t.then(response => response.json())\n\t\t\t.then(json => {\n\t\t\t\tlet skim = json.slice(0,MAX_THREAD_NUMBER); // reduce the page size\n\t\t\t\tdispatch(receiveNews...
[ "0.6651384", "0.61560977", "0.6100472", "0.6100472", "0.5974894", "0.59515744", "0.5936014", "0.57917583", "0.57402563", "0.57152045", "0.57092464", "0.5639746", "0.5638252", "0.5610574", "0.5586605", "0.5586605", "0.5550783", "0.5487978", "0.5470669", "0.5439602", "0.5407575...
0.7052856
0
Define a function called "render" to specify app entry point mount JQBX iframe inside a section
function render() { return react.createElement("section", null, [ react.createElement("iframe", { className: "jqbx", src: "https://app.jqbx.fm/rooms", frameborder: "0", sandbox: "allow-forms allow-popups allow-scripts allow-same-origin allow-top-navigation allow-popups-to-escape-sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n return getMainUI(this.state.pageExtension);\n }", "renderPage() {}", "_injectResourcesInsidePreview() {\n const stl = this._iframeRefs.document.createElement('style');\n\n stl.innerHTML = `\n\t\t\tbody {\n\t\t\t\tmargin:0;\n\t\t\t\tpadding:0;\n\t\t\t}\n\t\t\t#wrapper {\n\t\t\t\tpadding: ...
[ "0.6072601", "0.59788066", "0.5870179", "0.58472365", "0.5807117", "0.5790229", "0.5790229", "0.5790229", "0.5716896", "0.5716846", "0.57093257", "0.57056266", "0.5699917", "0.56846195", "0.56754214", "0.56565475", "0.56565475", "0.5636482", "0.5627678", "0.56249696", "0.5607...
0.67326486
0
take all carts in a list traverse through list ,get title ,if title is desired then we need to click on add button
function selectitems(product){ element.all(by.tagName("app-card")).each(function(item){ item.element(by.css("h4 a")).getText().then(function(text){ if(text==product){ //click on add button item.element(By.css("button[class*='btn-info']")).click(); } }) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCart(){\n for (var i = 0; i<cart.length; i++) {\n var item = cart[i].Flavor+\", \"+cart[i].Glazing+\", \"+cart[i].Amount;\n // learned about HTML DOM create text node from W3 School //\n // create a <li> element under the <ol> element for each item in the cart //\n va...
[ "0.6834967", "0.6762056", "0.6724898", "0.6640666", "0.65819484", "0.65368855", "0.65182734", "0.65070146", "0.64750636", "0.6457259", "0.6438775", "0.6434262", "0.643132", "0.64241636", "0.64214766", "0.641884", "0.64154667", "0.64130795", "0.640444", "0.6396963", "0.6394984...
0.6971129
0
Wrapper function to obtain the user credentials based on the username/password or oauth token. Failure to provide those query parameters will throw an error.
function getUserCredentials(query) { var credentials = {}; if (query.token) { credentials = { 'x-access-token': query.token, }; } else { throw Error('missing user credentials, provide either [user, pass] or [token] queries.'); } return credentials; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function auth() {\n \n var token = getParameterByName('token');\n var auth = getParameterByName('auth');\n if (auth == 'rest') {\n return authWithRest(token);\n } else {\n return authWithSDK(token);\n }\n}", "getCredentials () {\r\n var key = window.prompt('')\r\n var decrypted = window.CryptoJ...
[ "0.64731264", "0.6116889", "0.5864218", "0.58553296", "0.58364576", "0.58329225", "0.5822474", "0.57621646", "0.5747807", "0.5730142", "0.57175833", "0.5717094", "0.5714259", "0.5667575", "0.5664327", "0.5653641", "0.56529355", "0.562766", "0.56170344", "0.5598809", "0.559309...
0.6915321
0
update all ground position and draw: Check for collision with player too
function updateGround(){ //animate ground : player.isFalling = true; player.isGrounded = false; for(var i= 0 ; i<ground.length; i++) { ground[i].update(); ground[i].draw(); //landing player on top of platform var angle; if (player.minDist(ground[i]) <= player.heigh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\n if (score == 8) {\n water();\n score++;\n }\n\n //reposition our player\n move();\n\n //check if we're in the lava, if so, restart I guess?\n collision(player, lava);\n\n //check collision with coin\n if (coin.on) collision(player, coin);\n\n //will move...
[ "0.7347828", "0.72426474", "0.7238298", "0.7220382", "0.71354127", "0.70948935", "0.7040417", "0.7019317", "0.70036733", "0.6978895", "0.69769174", "0.6975367", "0.69428456", "0.6934991", "0.69331604", "0.6929788", "0.6912214", "0.69106036", "0.6903247", "0.6899235", "0.68871...
0.7845984
0
Update the water position and draw : object pool water sprites
function updateWater() { // animate water for (var i = 0; i < water.length; i++) { water[i].update(); water[i].draw(); } // remove water that has gone off screen if (water[0] && water[0].x < -platformWidth) { var w = water.splice(0, 1)[0]; w.x = water[water.length-1].x + pla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawWaterfall(){\n\t\t\n\t\t}", "function Update() {\n drawBackground();\n blocs.forEach(bloc => {\n bloc.draw();\n bloc.move();\n });\n}", "updatePlant(){\r\n // Set to decor layer then remove the plant sprites\r\n this.map.setLayer(3);\r\n this.map.removeT...
[ "0.7089675", "0.66581315", "0.66451323", "0.6625578", "0.6617248", "0.652468", "0.65001446", "0.6478438", "0.6457987", "0.64145607", "0.63751227", "0.6359385", "0.6357871", "0.63404673", "0.6311384", "0.6299535", "0.6289458", "0.6289382", "0.6286234", "0.62771", "0.6273764", ...
0.7176692
0
Implements an endpoint to create a shortened list url.
createShortenedListURL(params) { return ApiService.post('/link', { url: params.url }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function expandShortUrlToLongUrl(req, res, next) {\n\tif(!req.query.shortUrl) {\n return res.status(400).send({\"status\": \"error\", \"message\": \"A short URL is required\"});\n }\n db.any('SELECT * FROM urls WHERE short_url = $1', [req.query.shortUrl])\n .then(function (data) {\n res.send(data.leng...
[ "0.6531951", "0.6418047", "0.62486327", "0.60598886", "0.59958196", "0.5838629", "0.58126044", "0.5777023", "0.57556033", "0.5644726", "0.5633217", "0.562828", "0.56264037", "0.56202406", "0.5586715", "0.5581302", "0.55472666", "0.55391365", "0.55381125", "0.55033475", "0.549...
0.8142054
0
Implements an endpoint to delete a list.
deleteList(params) { return ApiService.delete('/list', params.id, { Authorization: `Token ${params.auth}` }, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteItem(req, res) {\n //grab the index where we will delete and use it for a splice\n const { index } = req.params;\n list.splice(index, 1);\n res.status(200).send(list);\n }", "'click .delete'() {\n \t\tMeteor.call('lists.remove', this._id, (error) => {\n\t\t\tif (error) {\n\t\t\t\tBert.alert( '...
[ "0.741362", "0.71482426", "0.7132472", "0.70912", "0.6976293", "0.6976068", "0.687478", "0.6650792", "0.6643771", "0.650522", "0.6500362", "0.648318", "0.6474227", "0.6449422", "0.64390785", "0.6307785", "0.62956125", "0.62813807", "0.62589544", "0.6256753", "0.6228819", "0...
0.80201757
0
Adds the cell at coordinates i, j to the regions combining existing regions as necessary.
function updateRegions(i, j){ // Setup coordinates var me = i + "," + j var up = (i - 1) + "," + j var left = i + "," + (j - 1) // Find or make regions var myRegion = new Set() myRegion.add(me) var topRegion = getRegion(up) var leftRegion = getRegion(left) // Co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCells(width, height) {\n for (var x = 0; x < width; x += boxSize) {\n for (var y = 0; y < height; y += boxSize) {\n\n let tempCoord = new Coord(x + boxSize/2 + padding, y + boxSize/2 + padding);\n let rightCoord = new Coord(x + 3*boxSize/2 + padding, y + boxSize/2 + padding);\n let b...
[ "0.54048336", "0.5054957", "0.5023897", "0.4987501", "0.49685496", "0.48616612", "0.4834937", "0.48323828", "0.47988462", "0.47661042", "0.4741725", "0.47409493", "0.47188878", "0.4710914", "0.46998906", "0.4699161", "0.46935886", "0.4653539", "0.45959952", "0.45860666", "0.4...
0.75561714
0
Finds and returns the region containing the given coordinates
function getRegion(coords){ for (var region of regions){ if (region.has(coords)){ return region } } // No existing regions had the cell return undefined }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findRegions(x, y, w) {\n var xregions = [];\n var yregions = [];\n var i = parseInt(x/REGION_WIDTH)*REGION_WIDTH;\n\n while (i <= x+w){\n xregions.push(i);\n i += REGION_WIDTH;\n }\n\n i = parseInt(y/REGION_WIDTH)*REGION_WIDTH;\n while (i <= y+w){\n yregions.push(...
[ "0.6333436", "0.61411357", "0.6078759", "0.6047894", "0.6033159", "0.59704536", "0.5943537", "0.59033597", "0.58421725", "0.5808018", "0.5771431", "0.5771431", "0.5761106", "0.5743988", "0.5742358", "0.5734698", "0.5730143", "0.57066876", "0.5666174", "0.56566924", "0.5655359...
0.74681175
0
Returns the query client for invoking queries
getQueryClient() { if (!this.connection) { return this.db.connection(this.config.connection); } return typeof this.connection === 'string' ? this.db.connection(this.connection) : this.connection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClient() {\n return new Client({\n host: 'my_postgres_container',\n user: 'admin',\n password: 'admin',\n database: 'hgop'\n });\n}", "query() { }", "function getClient() {\n return new cassandra.Client({\n contactPoints: config.db.contactPoints,\n keyspace:...
[ "0.6446473", "0.6354828", "0.62756294", "0.6174384", "0.6161915", "0.6161915", "0.6034279", "0.601302", "0.601302", "0.601302", "0.59995115", "0.59717995", "0.59644264", "0.59644264", "0.59644264", "0.59511214", "0.5950764", "0.5913885", "0.5908075", "0.5901238", "0.5860963",...
0.7163954
0
Returns the query builder instance for the users table
getUserQueryBuilder() { return this.getQueryClient().from(this.config.usersTable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUsers() {\n return db('users')\n .select('id', 'username')\n}", "allUsers() { return queryAllUsers() }", "function getUsersTable() {\n return new AWS.DynamoDB({params: {TableName: 'users'}});\n}", "function getUsers() {\n return db(\"users\").select(\"users.*\");\n}", "function ge...
[ "0.6231029", "0.5992548", "0.59528464", "0.5951293", "0.57240003", "0.5704541", "0.567933", "0.56719524", "0.5633017", "0.5602688", "0.56005377", "0.5579408", "0.55687934", "0.5543393", "0.55324525", "0.5520747", "0.5490256", "0.5475036", "0.5466967", "0.53781015", "0.5323286...
0.8246486
0
Ensure "user.id" is always present
ensureUserHasId(user) { /** * Ignore when user is null */ if (!user) { return; } if (!user[this.config.identifierKey]) { throw new utils_1.Exception(`Auth database provider expects "${this.config.usersTable}.${this.config.identifierKey}" to alway...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static checkUser(user) {\n assert(user, 'No user provided');\n assert(user.id, 'User must have `id`');\n }", "function isNewUser(id) {\n return users[id] == undefined;\n}", "function validateUserId(req, res, next) {\n const { id } = req.params;\n console.log(\"This is id in validateUserId(): \", id);...
[ "0.6996269", "0.6624366", "0.6422508", "0.6418663", "0.6359716", "0.6321997", "0.62907034", "0.6274357", "0.6196554", "0.6173096", "0.6109978", "0.6100459", "0.60795337", "0.60793936", "0.6014364", "0.59892243", "0.59805334", "0.59787756", "0.5936088", "0.58935565", "0.589187...
0.76431143
0
Executes the query to find the user, calls the registered hooks and wraps the result inside [[ProviderUserContract]]
async findUser(query) { await this.hooks.exec('before', 'findUser', query); const user = await query.first(); if (user) { await this.hooks.exec('after', 'findUser', user); } return this.getUserFor(user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getUser () {\n\t\tconst query = {\n\t\t\tsearchableEmail: this.request.body.email.toLowerCase()\n\t\t};\n\t\tconst users = await this.data.users.getByQuery(\n\t\t\tquery,\n\t\t\t{ hint: UserIndexes.bySearchableEmail }\n\t\t);\n\n\t\t// return an already-registered error if there is a matching registered user...
[ "0.62919927", "0.6084445", "0.60827136", "0.60745186", "0.60593814", "0.6049926", "0.60243165", "0.60123336", "0.5999335", "0.5960913", "0.59246624", "0.5923691", "0.59133756", "0.5911464", "0.589028", "0.5859836", "0.58349824", "0.5833866", "0.58244663", "0.5819734", "0.5819...
0.6710509
0
Returns a user from their remember me token
async findByRememberMeToken(id, token) { const query = this.getUserQueryBuilder() .where(this.rememberMeColumn, token) .where(this.config.identifierKey, id); return this.findUser(query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserFromToken() {\n const token = getToken();\n return token ? JSON.parse(atob(token.split('.')[1])).user : null;\n}", "async getUserForRememberMeToken(id, token) {\n const authenticatable = await this.provider.findByRememberMeToken(id, token);\n if (!authenticatable.user) {\n ...
[ "0.72654325", "0.7085583", "0.69452715", "0.6845965", "0.67650026", "0.67001104", "0.6673669", "0.6669659", "0.66461915", "0.66324216", "0.6620324", "0.6620324", "0.66076493", "0.6600815", "0.6577644", "0.6574301", "0.65149176", "0.6451328", "0.6442027", "0.639975", "0.637343...
0.71581936
1
Returns the user row by searching the uidValue against their defined uids.
async findByUid(uidValue) { const query = this.getUserQueryBuilder(); this.config.uids.forEach((uid) => query.orWhere(uid, uidValue)); return this.findUser(query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserRowFromId(userId,callback){\n // Exceptions\n var func = arguments.callee.toString().match(/function ([^\\(]+)/)[1];\n if ((typeof userId=='string' && userId=='') || (typeof userId!='string' && typeof userId!='number')){\n throw `${func}: userId must be nonempty string o...
[ "0.6076665", "0.5992456", "0.59178746", "0.5790937", "0.5778074", "0.5479562", "0.5446321", "0.5413929", "0.5373999", "0.5337236", "0.5306758", "0.5295124", "0.52898014", "0.52127934", "0.5208614", "0.5200681", "0.5181274", "0.51795244", "0.5173411", "0.5170995", "0.5169392",...
0.7596815
0
Updates the user remember me token
async updateRememberMeToken(user) { this.ensureUserHasId(user); await this.getUserQueryBuilder() .where(this.config.identifierKey, user[this.config.identifierKey]) .update({ remember_me_token: user.getRememberMeToken(), }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setRememberMeCookie(userId, token) {\n const value = {\n id: userId,\n token: token,\n };\n this.ctx.response.encryptedCookie(this.rememberMeKeyName, value, {\n maxAge: this.rememberMeTokenExpiry,\n httpOnly: true,\n });\n }", "setRemembe...
[ "0.68580925", "0.6819272", "0.6529235", "0.6363325", "0.63479286", "0.6270973", "0.6252035", "0.6228409", "0.6122913", "0.6111272", "0.609261", "0.608957", "0.60292864", "0.6006912", "0.5949251", "0.58859664", "0.58569217", "0.58568704", "0.5841685", "0.5836367", "0.5803044",...
0.7791699
0
Change the bill payment status to billPaid once the payment is done by the user.
changePaymentStatus(bill) { const query = "CALL billPaid(?,?)"; return new Promise( (resolve, reject) => { dbConnection.query(query, [bill.bill_id, bill.payment_dt], function(error, result) { if (error) { reject(error); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _qboCallback(err, bill){\n if (err) return console.error(JSON.stringify(err, null, 2));\n console.info('The following bill was created for ' + org.name + ': ' + bill.Id);\n // save all payments, setting each to \"Paid\"\n async.each(payments, fu...
[ "0.66843486", "0.6592756", "0.65549564", "0.6323846", "0.6064618", "0.6013438", "0.6005179", "0.59767324", "0.58927983", "0.58716756", "0.5722093", "0.5690359", "0.56793547", "0.56179637", "0.5598369", "0.5593926", "0.55857486", "0.557586", "0.55553705", "0.55186164", "0.5485...
0.6664074
1
The offset getter mark the voxel as modified because the returned vector is mutable
get offset() { setModified.apply(this); return this._offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOffset(b) {\nreturn this.offsetVector[b];\n}", "offset(that) {\n return [that.x.subtract(this.x), that.y.subtract(this.y)];\n }", "getRaw(pos) {\n return this.vec[pos];\n }", "getRaw(pos) {\n return this.vec[pos];\n }", "getRaw(pos) {\n return this.vec[pos];\n }", "getPosition(out) {\n...
[ "0.6401824", "0.61093557", "0.60179675", "0.60179675", "0.60179675", "0.6008175", "0.582796", "0.5820187", "0.5816326", "0.5747746", "0.5707662", "0.5674075", "0.56724817", "0.5661946", "0.5646961", "0.55818677", "0.55122685", "0.5505044", "0.5494443", "0.543386", "0.5395738"...
0.6796633
0
Handling the revisit of a user and updating the data
function revisit (user, data, ip) { firebase.database().ref('users').child(user).child('visits').transaction(function (visits) { visits++; return visits; }); firebase.database().ref('users').child(user).child('last_visit').set(Date.now()); firebase.database().ref('users').child(user).child('last_ip').set(ip); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userUpdated(response) {\n\tif (response.type != \"error\") {\t// type is \"User ___ updated\" on success\n\t\tlocation.reload(true);\n\t} else if (response.type == \"error\") {\n\t\talert(\"Failed to edit user:\\n\" + response.payload[0].msg);\n\t}\n}", "function updateUser(){\n // use save instead o...
[ "0.6533582", "0.6484628", "0.63409317", "0.6187385", "0.6185401", "0.6108481", "0.6087007", "0.60800374", "0.6034677", "0.5968679", "0.59658074", "0.5930021", "0.59299916", "0.5927795", "0.5919851", "0.59158075", "0.59006363", "0.58921164", "0.5885657", "0.5882431", "0.587803...
0.66773814
0
Function to increment the number of views of the page of href `page`
function pageCountIncrement(page) { var flag_p = false; str = process_page_path(page); firebase.database().ref('page_wise_visits/' + str).once('value', function(snap) { if(snap.exists()){ flag_p = true; } if(flag_p) { firebase.database().ref('page_wise_visits/' + str).transaction(function(count) { return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildCounter(page){ return page; }", "changePageNo(inc){\r\n\r\n\t var currentpageNo=this.state.pageNo+inc;\r\n\t this.getStories(currentpageNo); \t\t\t\t// geting stories of current Page\r\n}", "function nextPage() {\n page += 1;\n getURL();\n updateButton();\n\n}", "nextPage(st...
[ "0.69237167", "0.6754369", "0.6747859", "0.67032224", "0.6602716", "0.6599737", "0.65241295", "0.6478546", "0.64660925", "0.6465282", "0.64103824", "0.64079815", "0.63693947", "0.6366506", "0.6350261", "0.63070184", "0.62949884", "0.62631774", "0.62625253", "0.62601036", "0.6...
0.7587564
0
prints random pairs of an array to a DOM element.
function printRandomPairs(arr, element) { // copy the old array so randomization won't affect it. var tempArr = arr.slice(0); // shuffle the array shuffleArray(tempArr); // create a string to hold the output as HTML var output = ""; // if the array length is odd, make a trio if (tempArr.leng...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showRandomNumbers() {\n for (var i = 0; i < randomArray.length; i++) {\n console.log(randomArray[i]);\n document.querySelector(\".t1\").innerHTML = randomArray;\n\n }\n}", "function arrayToScreen(){\n var outputString = \"\";\n for (var i = 0; i < randomArray.length; i++){\n ...
[ "0.66513854", "0.6528639", "0.6528639", "0.6383376", "0.6369571", "0.6366414", "0.63318014", "0.61370564", "0.6133385", "0.6126957", "0.6019279", "0.5978362", "0.5978362", "0.5977561", "0.596748", "0.59600747", "0.59600747", "0.5959499", "0.58983433", "0.5883854", "0.58521813...
0.77704775
0
Determine whether the given properties match those of a ``CfnAliasProps``
function CfnAliasPropsValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description)); errors.collect(cdk.propertyValidator...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(aProperty){\n if(aProperty.name == this.name){\n return true;\n } else {\n for(let i = 0; i < this.aliases.length; i++){\n let myAlias = this.aliases[i];\n if(aProperty.hasAlias(myAlias)){\n return true;\n }...
[ "0.7035131", "0.69545615", "0.6727528", "0.6445936", "0.6081353", "0.59954005", "0.59603", "0.5942337", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.59291244", "0.5...
0.6968091
1
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Alias`` resource
function cfnAliasPropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnAliasPropsValidator(properties).assertSuccess(); return { FunctionName: cdk.stringToCloudFormation(properties.functionName), FunctionVersion: cdk.stringToCloudFormation...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aliasResourcePropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n AliasResourcePropsValidator(properties).assertSuccess();\n return {\n FunctionName: cdk.stringToCloudFormation(properties.functionName),\n ...
[ "0.6542443", "0.5808708", "0.5742638", "0.571092", "0.55551356", "0.5489775", "0.51874596", "0.51661867", "0.5148942", "0.51485497", "0.49849617", "0.498393", "0.49661675", "0.49198833", "0.4910356", "0.48402414", "0.48402414", "0.4824282", "0.47876367", "0.47744524", "0.4774...
0.60923094
1
Determine whether the given properties match those of a ``AliasRoutingConfigurationProperty``
function CfnAlias_AliasRoutingConfigurationPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('additionalVersionWeights', cdk.requiredValidator)(properties.additional...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(aProperty){\n if(aProperty.name == this.name){\n return true;\n } else {\n for(let i = 0; i < this.aliases.length; i++){\n let myAlias = this.aliases[i];\n if(aProperty.hasAlias(myAlias)){\n return true;\n }...
[ "0.7276575", "0.6684467", "0.6429888", "0.62284696", "0.62284696", "0.5801944", "0.57962507", "0.56594753", "0.5594896", "0.5551748", "0.5550305", "0.5523839", "0.54615486", "0.54250926", "0.54083127", "0.5386659", "0.5386438", "0.5378138", "0.5335749", "0.5251359", "0.522891...
0.6748054
1
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Alias.AliasRoutingConfiguration`` resource
function cfnAliasAliasRoutingConfigurationPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnAlias_AliasRoutingConfigurationPropertyValidator(properties).assertSuccess(); return { AdditionalVersionWeights: cdk.listMapper(cfnAliasVersionWeigh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aliasResourceAliasRoutingConfigurationPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n AliasResource_AliasRoutingConfigurationPropertyValidator(properties).assertSuccess();\n return {\n AdditionalVersio...
[ "0.6570287", "0.58696103", "0.52868277", "0.52489424", "0.51618814", "0.501432", "0.4917634", "0.4917634", "0.48797816", "0.4860068", "0.48256794", "0.47291264", "0.46963477", "0.46758097", "0.46541855", "0.46116632", "0.45997423", "0.45768535", "0.45747483", "0.45716846", "0...
0.63459337
1
Determine whether the given properties match those of a ``VersionWeightProperty``
function CfnAlias_VersionWeightPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('functionVersion', cdk.requiredValidator)(properties.functionVersion)); errors.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AliasResource_VersionWeightPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('functionVersion', cdk.requiredValidator)(propert...
[ "0.7054453", "0.6323823", "0.5880388", "0.58630556", "0.5668054", "0.5646472", "0.5636294", "0.5589137", "0.5532833", "0.5503024", "0.53986114", "0.5278358", "0.5240324", "0.5229196", "0.52050513", "0.51911503", "0.51683617", "0.51606756", "0.515124", "0.5138854", "0.51198924...
0.68970776
1
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Alias.VersionWeight`` resource
function cfnAliasVersionWeightPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnAlias_VersionWeightPropertyValidator(properties).assertSuccess(); return { FunctionVersion: cdk.stringToCloudFormation(properties.functionVersion), Func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aliasResourceVersionWeightPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n AliasResource_VersionWeightPropertyValidator(properties).assertSuccess();\n return {\n FunctionVersion: cdk.stringToCloudFormat...
[ "0.7025086", "0.5725364", "0.5641766", "0.56127626", "0.55649245", "0.5369017", "0.51587963", "0.50780207", "0.50700045", "0.5055301", "0.5021444", "0.50034827", "0.49745336", "0.49683076", "0.48851725", "0.47204164", "0.47021234", "0.46889848", "0.46648252", "0.46615872", "0...
0.65477896
1
Determine whether the given properties match those of a ``AliasResourceProps``
function AliasResourcePropsValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description)); errors....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(aProperty){\n if(aProperty.name == this.name){\n return true;\n } else {\n for(let i = 0; i < this.aliases.length; i++){\n let myAlias = this.aliases[i];\n if(aProperty.hasAlias(myAlias)){\n return true;\n }...
[ "0.6913815", "0.6586948", "0.6025471", "0.59934056", "0.5981964", "0.5981964", "0.5880659", "0.58245325", "0.57888454", "0.56285554", "0.56166846", "0.56089187", "0.5562659", "0.5534124", "0.5515722", "0.54718566", "0.54715216", "0.5452281", "0.5448808", "0.54375255", "0.5435...
0.69343424
0
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Alias`` resource
function aliasResourcePropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } AliasResourcePropsValidator(properties).assertSuccess(); return { FunctionName: cdk.stringToCloudFormation(properties.functionName), Funct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnAliasPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnAliasPropsValidator(properties).assertSuccess();\n return {\n FunctionName: cdk.stringToCloudFormation(properties.functionName),\n FunctionVersion: cdk.stringToCl...
[ "0.60932213", "0.5808247", "0.57426715", "0.5711398", "0.5557098", "0.5494023", "0.5189691", "0.516257", "0.5146476", "0.5145711", "0.49814308", "0.49810746", "0.49618512", "0.49174002", "0.491293", "0.48368084", "0.48368084", "0.48211658", "0.47843793", "0.47770572", "0.4771...
0.65420616
0
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Alias.AliasRoutingConfiguration`` resource
function aliasResourceAliasRoutingConfigurationPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } AliasResource_AliasRoutingConfigurationPropertyValidator(properties).assertSuccess(); return { AdditionalVersionWeights: c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnAliasAliasRoutingConfigurationPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnAlias_AliasRoutingConfigurationPropertyValidator(properties).assertSuccess();\n return {\n AdditionalVersionWeights: cdk.listMapper(cfnAliasV...
[ "0.6346307", "0.5867593", "0.5285561", "0.5250663", "0.51637346", "0.5015765", "0.49179736", "0.49179736", "0.48788354", "0.48598468", "0.48235825", "0.473004", "0.46948364", "0.46742028", "0.46549013", "0.46106976", "0.46005967", "0.4575609", "0.4575075", "0.4570432", "0.456...
0.65705657
0
Determine whether the given properties match those of a ``VersionWeightProperty``
function AliasResource_VersionWeightPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('functionVersion', cdk.requiredValidator)(properties.functi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CfnAlias_VersionWeightPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('functionVersion', cdk.requiredValidator)(properties.functionVersion));\n ...
[ "0.6896886", "0.63251686", "0.5879516", "0.58649236", "0.5667136", "0.56472456", "0.56367815", "0.5589686", "0.5534046", "0.55033237", "0.5399862", "0.52793455", "0.5240649", "0.5231851", "0.52058655", "0.5191817", "0.51701933", "0.5161917", "0.51510376", "0.51398957", "0.512...
0.70544523
0
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Alias.VersionWeight`` resource
function aliasResourceVersionWeightPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } AliasResource_VersionWeightPropertyValidator(properties).assertSuccess(); return { FunctionVersion: cdk.stringToCloudFormation(propert...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnAliasVersionWeightPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnAlias_VersionWeightPropertyValidator(properties).assertSuccess();\n return {\n FunctionVersion: cdk.stringToCloudFormation(properties.functionVersion),\n...
[ "0.65477896", "0.5725364", "0.5641766", "0.56127626", "0.55649245", "0.5369017", "0.51587963", "0.50780207", "0.50700045", "0.5055301", "0.5021444", "0.50034827", "0.49745336", "0.49683076", "0.48851725", "0.47204164", "0.47021234", "0.46889848", "0.46648252", "0.46615872", "...
0.7025086
0
Determine whether the given properties match those of a ``CfnEventSourceMappingProps``
function CfnEventSourceMappingPropsValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('batchSize', cdk.validateNumber)(properties.batchSize)); errors.collect(cdk.property...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(properties) {\n for (const type in properties) {\n const component = this.component(type);\n if (!component.exists())\n return false;\n for (const key in properties[type]) {\n const value = properties[type][key];\n if (component.property(ke...
[ "0.6725484", "0.64117354", "0.63650894", "0.6048175", "0.6010788", "0.59969616", "0.595679", "0.595679", "0.5897467", "0.5880563", "0.5825618", "0.58075166", "0.58035773", "0.56931734", "0.5691938", "0.5660248", "0.5638868", "0.5633078", "0.56311893", "0.5626602", "0.5618232"...
0.71008366
0
Renders the AWS CloudFormation properties of an ``AWS::Lambda::EventSourceMapping`` resource
function cfnEventSourceMappingPropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnEventSourceMappingPropsValidator(properties).assertSuccess(); return { EventSourceArn: cdk.stringToCloudFormation(properties.eventSourceArn), FunctionName:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eventSourceMappingResourcePropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n EventSourceMappingResourcePropsValidator(properties).assertSuccess();\n return {\n EventSourceArn: cdk.stringToCloudFormation(prop...
[ "0.6889089", "0.61096853", "0.57929146", "0.5747527", "0.5741013", "0.5408606", "0.5408606", "0.5384197", "0.538251", "0.53707904", "0.5297366", "0.5294859", "0.5294859", "0.5293253", "0.5241592", "0.5211349", "0.5211349", "0.5210892", "0.5210892", "0.5204264", "0.5204264", ...
0.6476419
1
Creates a new ``AWS::Lambda::EventSourceMapping``.
constructor(parent, name, properties) { super(parent, name, { type: CfnEventSourceMapping.resourceTypeName, properties }); cdk.requireProperty(properties, 'eventSourceArn', this); cdk.requireProperty(properties, 'functionName', this); this.eventSourceMappingName = this.ref.toString(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(parent, name, properties) {\n super(parent, name, { type: EventSourceMappingResource.resourceTypeName, properties });\n cdk.requireProperty(properties, 'eventSourceArn', this);\n cdk.requireProperty(properties, 'functionName', this);\n this.eventSourceMapping...
[ "0.5766343", "0.5455021", "0.5419204", "0.5311191", "0.5255185", "0.50785154", "0.49350795", "0.49205467", "0.49088058", "0.49011484", "0.48353973", "0.48192814", "0.48161379", "0.4811502", "0.48044866", "0.4747807", "0.47468773", "0.47464195", "0.47426265", "0.47426265", "0....
0.58928996
0
Determine whether the given properties match those of a ``EventSourceMappingResourceProps``
function EventSourceMappingResourcePropsValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); errors.collect(cdk.propertyValidator('batchSize', cdk.validateNumber)(properties.batchSize)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(properties) {\n for (const type in properties) {\n const component = this.component(type);\n if (!component.exists())\n return false;\n for (const key in properties[type]) {\n const value = properties[type][key];\n if (component.property(ke...
[ "0.66887915", "0.62417173", "0.6185802", "0.6185802", "0.6125569", "0.6114513", "0.60332274", "0.5953579", "0.5860267", "0.56649864", "0.56604284", "0.56579256", "0.564922", "0.5602807", "0.5590468", "0.55801094", "0.55602664", "0.555179", "0.555159", "0.5548655", "0.55102146...
0.68562543
0
Renders the AWS CloudFormation properties of an ``AWS::Lambda::EventSourceMapping`` resource
function eventSourceMappingResourcePropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } EventSourceMappingResourcePropsValidator(properties).assertSuccess(); return { EventSourceArn: cdk.stringToCloudFormation(properties.even...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnEventSourceMappingPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnEventSourceMappingPropsValidator(properties).assertSuccess();\n return {\n EventSourceArn: cdk.stringToCloudFormation(properties.eventSourceArn),\n F...
[ "0.6476419", "0.61096853", "0.57929146", "0.5747527", "0.5741013", "0.5408606", "0.5408606", "0.5384197", "0.538251", "0.53707904", "0.5297366", "0.5294859", "0.5294859", "0.5293253", "0.5241592", "0.5211349", "0.5211349", "0.5210892", "0.5210892", "0.5204264", "0.5204264", ...
0.6889089
0