Skip to main content

Questions tagged [javascript]

JavaScript is a versatile, high-level programming language. It is the programming language in all browsers, and can be used for back-end programming with Node.js. Use this tag for questions regarding vanilla JavaScript; optionally tagged with an ECMAScript version. If you are using a preprocessor such as TypeScript please tag with that too.

Filter by
Sorted by
Tagged with
1 vote
0 answers
12 views

I wanted to create a protected member in a javascript (ES) class but, of course, there is no such concept. So I devised a way that would let me create a member or something that ”no once could touch ...
Abet Giron's user avatar
0 votes
0 answers
37 views

Explainer Problem No standardized Web Extension API to send or transfer TypedArrays or ArrayBuffers or ...
guest271314's user avatar
0 votes
0 answers
41 views

References WebSocketStream Explained WebSocketStream API design Source code https://github.com/guest271314/websocket-stream-impl Implementation ...
guest271314's user avatar
1 vote
1 answer
151 views

I created this module to help with the creation of HTML elements: ...
Justin Massey's user avatar
2 votes
0 answers
81 views

I put together this Native Messaging performance test to determine based on evidence which programming language, JavaScript engine or runtime, and WebAssembly compiled code is fastest to round trip 1 ...
guest271314's user avatar
0 votes
0 answers
38 views

Native Messaging host using Mozilla SpiderMonkey JavaScript/WebAssembly engine. Documentations Chrome Developers MDN Web Docs Microsoft Edge Developer documentation Messaging between the app and ...
guest271314's user avatar
6 votes
5 answers
1k views

The goal of the following openprocessing.org JavaScript program is to calculate the sum and difference of a pair of numbers and print the 2 results if they are both positive. I want to do the ...
Will.Octagon.Gibson's user avatar
1 vote
0 answers
40 views

Below is code for a front end calendar event element I have just finished. Though I have been programming in JavaScript for a while, this is the first time I have created a custom class and element, ...
ControlAltDel's user avatar
7 votes
1 answer
95 views

I am new to front end development and thought to recreate the GUI of Fruity Balance just for practice. I would love to hear any advice on best practices. I am also wondering if any improvements could ...
Evr's user avatar
  • 71
0 votes
0 answers
104 views

A branch of a repository I maintain has a function that can do different things based on the input and expected result, and structure of a particular inner function call. I can echo 20 MB to and from ...
guest271314's user avatar
-1 votes
2 answers
142 views

I'm looking for suggestions on how this code structure can be improved. It feels like there's a smarter way. The purpose of the script is to create live stream players if the following conditions are ...
fslap's user avatar
  • 17
2 votes
1 answer
152 views

I wrote this code below to get all possible words for an array containing \$n\$ letters. The logic of the code is that the letters of the array are mixed up in random positions and checks if this ...
John's user avatar
  • 59
6 votes
1 answer
543 views

I’ve implemented a Connect 4 AI in JavaScript using a Negamax search. My goal is to solve the game completely from the starting position (depth 42). I’m trying to make it as fast as possible and would ...
eligolf's user avatar
  • 199
5 votes
1 answer
73 views

This is my first web component. I implement it as an autonomous custom HTML element. I cannot use a customized built-in element because it's not supported by Safari. Nevertheless, as it mainly ...
gouessej's user avatar
  • 151
3 votes
1 answer
99 views

I'm using a Web extension to communicate with an Isolated Web App over externally_connectable for the capability to use Direct Sockets UDP and TCP sockets from ...
guest271314's user avatar
4 votes
3 answers
200 views

I made my first ever JavaScript project. It is a program that calculates the GCD and LCM of 2 numbers that the user inputs. It also stores these 2 numbers in cookies so that they can be accessed for ...
Ana Kullanıcı's user avatar
3 votes
1 answer
105 views

My openprocessing.org JavaScript code listed below produces the output I want but doesn’t seem very elegant to me especially the “.M” in “matrices[mat].M[row][col]”. Any comments to improve the ...
Will.Octagon.Gibson's user avatar
5 votes
1 answer
403 views

I wrote this both to help read (and edit/summarize) my own work, but mainly to be able to get through the mounds of papers I was asked to read as a graduate student. This is a summarization algorithm ...
Charles G's user avatar
  • 103
8 votes
1 answer
544 views

I am fairly new to programming using the site openprocessing.org. My program, available to play online here, is a simple puzzle game in which you slide the circles so that you end up with 4 circles in ...
Will.Octagon.Gibson's user avatar
0 votes
1 answer
166 views

This code parses a series of Uint8Arrays that comprise a Transfer-Encoding: chunked request ...
guest271314's user avatar
3 votes
1 answer
127 views

This is something I've been writing for a paper I'm working on. There is a debate about what is formal text and what is not, but what I know about myself and my writing is that I use certain words (...
Charles G's user avatar
  • 103
2 votes
0 answers
110 views

Following on from my previous question, I would like to know what could be improved here and whether it is now secure. I had to use Java 8 because the Blade lib was built with it, and I want to extend ...
Tobias Grothe's user avatar
4 votes
1 answer
146 views

First of all: I was looking for a simple image captcha solution for a website, but all I found were "Over-the-top" solutions for me. So I decided to write something to self. I mainly use two ...
Tobias Grothe's user avatar
1 vote
1 answer
88 views

A runtime agnostic WebSocket server. Tested with node, deno, bun, ...
guest271314's user avatar
6 votes
3 answers
148 views

When reading a pressure transducer, I'm currently using the following code to apply the "device under test data" from the calibration report. How can I determine which range segment of ...
Lenny Cunningham's user avatar
3 votes
2 answers
174 views

rodde's Pacman clone I have this clone implementation of Pacman. It looks pretty much like the original, yet I had to impose some relaxations as I am not sufficiently masochistic to implement all the ...
coderodde's user avatar
  • 32.3k
4 votes
1 answer
167 views

I am new to programming using the site openprocessing.org. The code given does the following on my iPad: Draw a red circle Wait until I finger tap near the red circle’s center Erase the red circle ...
Will.Octagon.Gibson's user avatar
6 votes
2 answers
150 views

There's been talk about implementing WebRTC Data Channel over WHATWG Streams for a while https://github.com/w3c/webrtc-pc/issues/1732 https://github.com/w3c/webrtc-nv-use-cases/issues/44 https://...
guest271314's user avatar
4 votes
4 answers
279 views

I am working on a blogging application in Laravel 8. I have added "live validation" to the registration form with JavaScript. For password strength, I use Zxcvbn. The registration form ...
Razvan Zamfir's user avatar
2 votes
1 answer
112 views

I developed a chatbot using the Telegraf.js framework. Although the latest version of Telegraf offers TypeScript support, I chose to use JavaScript. I followed a tutorial to deploy it and would like ...
Vilela's user avatar
  • 21
2 votes
1 answer
113 views

The requirement is to split the headers from the request body, most efficiently. Possible approaches I have employed and/or considered Decode to text, match ...
guest271314's user avatar
2 votes
1 answer
234 views

I really don't post a lot on here, but decided to share this because I thought first that it could be helpful and second that it could be improved. In my first versions, It was all javascript, like ...
Charles G's user avatar
  • 103
2 votes
2 answers
152 views

I am trying to manage state in vanilla JavaScript—without using frameworks like React or Vue. I am also not using state management libraries. My requirements are: Reactivity Time Travel (Undo/Redo) ...
Ahmad Ismail's user avatar
1 vote
1 answer
178 views

I'm writing JS for the FreeCodeCamp todo list; the corresponding HTML and CSS for this can be found on their page. I have made one edit to the HTML - the button with type "submit" has been ...
ApexPolenta's user avatar
5 votes
1 answer
70 views

I use the following code to create a call graph from javascript file(s). I generate the output in Graphviz DOT language in order to create visualizations of that graph using the Graphviz command line. ...
Ahmad Ismail's user avatar
3 votes
1 answer
236 views

I am working on a blogging application in Laravel 8. I have put together a way to preview and remove the main article image. In the ArticleController.php controller,...
Razvan Zamfir's user avatar
3 votes
1 answer
322 views

Overview HTML Editor is a web-based HTML editor designed for web developers, designers, and learners. It offers a lightweight, minimalist environment for writing and previewing HTML, CSS, and ...
Mori's user avatar
  • 197
3 votes
1 answer
175 views

I have created a simple text editor with a "replace all" feature. It's meant to be part of a larger project, so it needs to be robust and work reliably across various scenarios. Please ...
Mori's user avatar
  • 197
0 votes
0 answers
62 views

I'm working on a modeling app and want to provide block scope for evaluation of user entered code. I'm assuming that the user is not malicious, but error prone, like all of us. At the same time, I ...
Lowclouds's user avatar
5 votes
1 answer
264 views

The following example shows how to use markdown-it to parse and render Markdown. It works, but there is a dirty trick there, which I absolutely don't like: to ...
jsx97's user avatar
  • 207
1 vote
1 answer
124 views

The code makes unnecessary API calls because there are two useEffect hooks that both fetch data. The first useEffect runs on mount and fetches data for page 1, while the second useEffect runs whenever ...
Tomasz Waszczyk's user avatar
4 votes
1 answer
131 views

I'm using Google Earth Engine (GEE) to calculate the Euclidean distance from sample points to the nearest brightest pixel above the threshold value "avg_rad > 10" in nighttime light data. ...
research_bugz's user avatar
4 votes
2 answers
102 views

I am pretty new to SQL databases and in particular to the better-SQLite3 database. I have managed to insert, update, and delete data in a way I desire. All of it running in the background of a self-...
godfatherjohn's user avatar
1 vote
1 answer
96 views

I have this code that I feel like could be done more efficiently; is there any way i could fix it? I'm trying to make a pomodoro timer with html,css and javascript and i want to add popup ...
onsei's user avatar
  • 11
6 votes
1 answer
163 views

I have an image gallery of old internet banner ads that pulls URLs and metadata from a JSON file and then displays them based on a set of user-selectable filters. The filters can show/exclude images ...
fish's user avatar
  • 160
5 votes
2 answers
194 views

I have made a "tags selector" in plain JavaScript, without using any plugin. ...
Razvan Zamfir's user avatar
6 votes
3 answers
863 views

I wrote an algorithm how to detect the collision detection of two rects with rounded borders (the code was written using TypeScript but I tried to name things as clear as possible to code be readable ...
EzioMercer's user avatar
7 votes
1 answer
231 views

We have a web-based customer management application. When copy-and-pasting data into our application, users sometimes enter leading or trailing spaces or special characters (tabs, or even control ...
Heinzi's user avatar
  • 723
5 votes
1 answer
167 views

I made a simple vanilla JS slider for a recruitment task. It works well, but I would be a lot calmer if someone could review it or push me in the better direction. Task is to create a banner with ...
Daniel Wnuk's user avatar
4 votes
0 answers
71 views

I have a checkbox form question component I made in Vue 2, and I'm migrating to Vue 3 so want to simplify it as much as possible and make sure I've taken advantage of all the new feature of Vue 3. ...
Sara's user avatar
  • 41

1
2 3 4 5
189