Skip to main content

All Questions

Tagged with
2 votes
1 answer
77 views

Helper functions to get, set and remove from Firefox browser storage. Also, to get, push and remove from lists stored in the database

I am making a plugin for Firefox, this is (more or less) my first time working with JavaScript. Is this a reasonable design for working with both values and lists in a database? ...
Emil Holmsten's user avatar
3 votes
2 answers
675 views

Getting data from database through Ajax post request

Is the method used below to get data from a database efficient and optimal? The data is in a MySQL database, and in my server I have a PHP file with the following code to return some information: <...
Riccardo Perego's user avatar
3 votes
1 answer
184 views

Static Arrays and Variables (JavaScript)

I would like to know if this code of the database for my Pokemon clone game follows general practices in syntax and general readability. I feel like I could cut down on my comment usage, and place ...
Osman Mammedov's user avatar
0 votes
1 answer
385 views

Getting data from API every x seconds and store it in a database

I'm currently getting data from an API every 15 seconds. This data contains a json with 100-2000 new items every time. Now i don't need all the items that are in there but still quite some of them and ...
Awesom-o's user avatar
  • 107
0 votes
1 answer
65 views

How to refactoring function when I've to do many things in one function

I always want to improve my code by refactoring but when I've to work with complicated function that have many thing to do . How can I refactoring them. Here is my data for example I get data from ...
Ach's user avatar
  • 11
2 votes
1 answer
259 views

Using IndexedDB as an in-browser cache

In my site: Users have many Activities Each Activity has encoded_polyline data I display these encoded_polylines on a map I want to use IndexedDB (via Dexie) as an in-browser cache so that they don't ...
James Chevalier's user avatar
0 votes
1 answer
49 views

Handling a PUT API call to write to a database using promises

The following function is accepting PUT connection to a server API, checks authorization to write and then performs write to a database. The eslint linting tool ...
Emanuele Paolini's user avatar
4 votes
1 answer
120 views

Mongoose schema to store items from Wynncraft's API

I am making a Schema to store items from Wynncraft's API. See an example assortment of items here: https://api.wynncraft.com/public_api.php?action=itemDB&search=a I have not finished making the ...
user avatar
1 vote
1 answer
57 views

Creating Mongoose model

I'm creating a Mongoose model for a web service. I have a secondary index on facultyId because majority of the reads would want to search by ...
abrarisme's user avatar
  • 278
2 votes
1 answer
347 views

Checking a DB table before doing an insert using AWS Lambda

Pretty new to AWS Lambda and Javascript, and particularly Promises. Simple check db table before insert. It all seems to be working - I'm just wondering if there was a neater way of doing any of ...
L G's user avatar
  • 57
10 votes
1 answer
288 views

Job listings database project in Node.JS

Build a project which can allow user to post and search for job listings, I have written some code and divided into different modules. My motivation is to understand how much over-engineering is ...
CodeYogi's user avatar
  • 5,137
2 votes
1 answer
2k views

AngularJS code to query DB and update $scope

I have an AngularJS function that is used to determine which $scope associative array variable is to have data pushed into it. I would love to be able to remove the ...
Evan Bechtol's user avatar
  • 1,255
2 votes
1 answer
146 views

Database module for node.js

This will get quite clumsy if I continue down the road with this design, so I'm asking you, enlightened ones, is there a way to make this prettier and easier to understand? Primarily the ...
Mobilpadde's user avatar
2 votes
0 answers
124 views

Bitcoin, detecting deposits to the node.js server

I'm trying to detect deposits that a user will make. I added explainatory comments inline. Can you spot any flaws in it? ...
Arthur's user avatar
  • 21
2 votes
1 answer
139 views

Observable storage - revised

Previous question: JavascriptObservable Storage The idea is to have some storage interface that exists of different buckets - known as Eagles: ...
Pinoniq's user avatar
  • 2,970

15 30 50 per page