Skip to main content

All Questions

Tagged with or
10 votes
3 answers
2k views

I implemented this Rubik's Cube game in Python, using Canvas and Context2d for user interaction. This was mainly an exercise in &...
QuadmasterXLII's user avatar
0 votes
0 answers
42 views

I am learning react.js, and I am on a way learning react hooks. I followed some examples on 'useReducer' where I have a search input for searching movies, and I load the list of movies from API. The ...
Rahul Shivsharan's user avatar
1 vote
1 answer
107 views

I have created Axios wrapper following SOLID principles. Is there any feedback on improving it's structure in a more cleaner and better way? axiosconfig.ts ...
C Sharp Guy's user avatar
6 votes
2 answers
287 views

I use the following snippet with my browser homepage to detect whether or not I have my VPN connection turned on. If the IP timezone is different from the browser timezone, then it is most likely the ...
jsx97's user avatar
  • 207
6 votes
1 answer
158 views

I have been tinkering about a program that would pick the support "captain" of the day on workdays with the following rules: Program should only pick a captain on weekdays (Mon. to Fri.). ...
Rosemary O'Annah's user avatar
2 votes
1 answer
57 views

I have the function which updates user data (currently only name). I would like to optimize its logic and particularly logic of updating participant name in chats. Currently I get entire chats ...
Andrian's user avatar
  • 113
2 votes
3 answers
232 views

How can I make the code more readable and more efficient? (provided code is O(n²) time, but intuition says it can be pre-processed and done in O(n) time) Description it tags the first and last of ...
FromTheStackAndBack's user avatar
4 votes
2 answers
429 views

I have attempted to implement the native Promise object provided by the browser in JavaScript. The code is pretty easy to understand. It supports most of the promise functionalities, such as chaining, ...
Napoleon Bonaparte's user avatar
2 votes
1 answer
105 views

I've implemented a function that creates a multiple regular expressions predicate. The idea behind the predicate is combining regular expressions using the disjunction operator ...
terrorrussia-keeps-killing's user avatar
7 votes
4 answers
961 views

Using the sample data from here, I'm attempting to write JS code (to the ES6 standard) that is equivalent to an SQL inner join. The solution below works fine, but it seems rather long. Is there a ...
knot22's user avatar
  • 469
1 vote
1 answer
87 views

I made an extension and got it to the point where it does what I want how I want. At this point, I have a little capacity to work on code refactoring, readability and such. And I would love some ...
BNazaruk's user avatar
  • 127
2 votes
2 answers
154 views

I have three arrays in which first index is same, so I want to merge all three array into one array based on first index element Input: ...
Murtuza Z's user avatar
  • 121
4 votes
2 answers
475 views

I wanted to detect when a user stops typing. I encountered this answer from SO (Not the selected answer, but the second one which seem to be better): https://stackoverflow.com/a/5926782/17746636 But I ...
pileup's user avatar
  • 461
0 votes
1 answer
128 views

I am trying to remake Super Mario Bros. in JavaScript and I am trying to figure out if there is a more efficient/shorter way to create and store the level data. I have created 1-1 and here's what the ...
Jake Miahn's user avatar
4 votes
2 answers
214 views

I have implementted a simple JavaScript function to find the list of abundant numbers and print them on the screen. an abundant number is a number for which the sum of its proper divisors is greater ...
Napoleon Bonaparte's user avatar

15 30 50 per page
1
2 3 4 5
45