Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
44 votes
2 answers
40k views

Balanced parentheses

Given an expression string exp, write a program to examine whether the pairs and the orders of "{","}","(",")","[","]" are correct in exp. For example,...
konijn's user avatar
  • 33.8k
12 votes
1 answer
1k views

Responsive/adaptive website code

I have all these functions that work together to create functionality on a page. Is the structure of these functions OK? Can I do anything to speed this up or make my code better? I'm not exactly ...
HandiworkNYC.com's user avatar
12 votes
4 answers
66k views

Different way of writing multiple click functions

I have the following .click() functions: ...
khollenbeck's user avatar
9 votes
2 answers
10k views

How can I quickly find unique list items?

I use the loop-every-single-list-item approach to filter out unique elements in a given list, which tends to be very inefficient way as a list grow in size, or as function call frequency increases. ...
Nikola Vukovic's user avatar
9 votes
2 answers
2k views

Enforcing set environment variables

Context I have a node.js application that uses many other modules and libraries. Some of these modules pull details from process environment variables, such as URL's for databases, credentials, and so ...
rolfl's user avatar
  • 97.5k
7 votes
1 answer
350 views

MVC - Control Module - Version 2

All models are in the model namespace and follow a naming convention. This makes it easy to consolidate control into cType() as shown below. All control passes ...
7 votes
2 answers
203 views

Adding links to tags on StackExchange sites

This Greasemonkey script adds links to tags on StackExchange sites which allow for activating, deactivating and ignoring favorite and related tags by using UI components. Since JavaScript is not my ...
Gerold Broser's user avatar
30 votes
2 answers
819 views

Desktop Notifications for flags and queue items

After our recent election, I got elected as a moderator here on Code Review (Thank you, community members!). One of the first things I missed among the moderator tools was desktop notifications for ...
Simon Forsberg's user avatar
25 votes
3 answers
719 views

Code-Q2A - copy code blocks from questions to answers

I came up with an idea for a userscript to simplify writing answers on Stack Exchange while writing a previous answer. This userscript adds "Review"-links on the top of each code segment. When ...
Simon Forsberg's user avatar
24 votes
3 answers
3k views

Simple object-oriented calculator

After studying several ways of doing OOP in JavaScript I think I finally came up with one that seems OK to me. Is it okay? Do you see some problems I can face by using OOP in JavaScript like this? ...
Nelson Teixeira's user avatar
11 votes
1 answer
574 views

node.js passport wrapper

I have started some experiments with node.js. Any comment on style (especially the callbacks) and best practice is appreciated: PassportControl.js ...
Loki Astari's user avatar
  • 96.6k
8 votes
2 answers
21k views

Getting the divisors count of an integer

I am using mod and my code works. I am wondering if there is a more efficient way to write a method that returns the total number of divisors for an integer. ...
Aaron's user avatar
  • 955
7 votes
5 answers
8k views

Validate that brackets are balanced

I've done a test for a job (which I failed) and I'd like to know in which ways my code could've been better. Here are the questions and my answers, it's not very long. 1) Make a program that ...
Aramil Rey's user avatar
6 votes
2 answers
429 views

Simple object-oriented calculator - follow-up

This question is an improvement I did based on recommendations from this other question: Simple object-oriented calculator JSFiddle ...
Nelson Teixeira's user avatar
5 votes
2 answers
911 views

Matrix of articles and authors from large JSON dataset

Given the following JSON data containing 4 articles by 4 different authors: ...
CodeYogi's user avatar
  • 5,127
3 votes
1 answer
207 views

Simple HTML website with JavaScript navbar

The following code is a website with a nav-bar on it. It uses some simple JavaScript to make it work: index.html: ...
Julian Lachniet's user avatar
43 votes
5 answers
31k views

Determining if two words are anagrams

I was given a this problem at a technical interview and failed miserably in the time given. Afterwards, I sat down and worked out what I think is a good solution. The task was actually to build an ...
Lazloman's user avatar
  • 539
24 votes
7 answers
10k views

FizzBuzz in Javascript

I'm sure everyone here knows what FizzBuzz is. I would like constructive criticism for my solution. I'm a beginner to programming as a whole and this isn't my first solution, but it's what I think is ...
Zachary Woods's user avatar
23 votes
1 answer
2k views

Brainfuck interpreter in JavaScript

Just what it says on the tin: a brainfuck interpreter in JavaScript. ...
Dagg's user avatar
  • 4,531
15 votes
2 answers
2k views

Markdown to HTML

...
bjb568's user avatar
  • 659
13 votes
2 answers
191 views

Bookmarklet for selecting code snippets on Code Review

The following code will add to each code block a 'Select Code' button that will select the code belonging to that block. Please review for maintainability. In order to use this, visit http://...
konijn's user avatar
  • 33.8k
13 votes
2 answers
31k views

Changing Number to Words in JavaScript

One day I saw a question on Stack Overflow asking about changing numbers to words, I thought about it, and next day I started coding. When I had the code working, I thought it could, most likely, be ...
bpbutti's user avatar
  • 233
12 votes
2 answers
849 views

In-browser syntax highlighter

I've made a simple in-browser syntax highlighter using JQuery. It's pretty simple, it just wraps keywords, integers, and such in <span> elements with color ...
Ethan Bierlein's user avatar
11 votes
1 answer
305 views

Snake on a Plane

My code uses a canvas element to create a live snake game on a plane! ...
FreezePhoenix's user avatar
11 votes
1 answer
407 views

Brainfuck interpreter in JavaScript, take 2

The previous version is here. This version takes suggestions from that review into account: brainfuck is now an object instead of a function, and ...
Dagg's user avatar
  • 4,531
10 votes
2 answers
230 views

Associating degrees with notes of scales

I have a JS file that creates an object with notes from a music scale when given a key (aka tonic/ note). The code works and does what I want it to do. I need a critique on the way it's written, what ...
isosceles's user avatar
  • 149
9 votes
4 answers
1k views

Simple Number to Words using a Single Loop String Triplets in JavaScript

I have extensively reviewed 2 old articles on the subject: https://stackoverflow.com/questions/14766951/convert-digits-into-words-with-javascript and https://stackoverflow.com/questions/5529934/...
Mohsen Alyafei's user avatar
8 votes
2 answers
296 views

Desktop notifications for queue items

I wasn't satisfied with Simon's alert on the orange alert. I wanted to know if even 1 review item was available, so I made some modifications to the userscript so that it runs on the Review page, and ...
Malachi's user avatar
  • 28.7k
8 votes
2 answers
335 views

Local user registration

More javascript (nodejs) to go with the passport wrapper I just posted: UserBook.js ...
Loki Astari's user avatar
  • 96.6k
6 votes
3 answers
440 views

Brainfuck Interpreter in JavaScript 3

I have this Brainfuck interpreter: ...
Obinna Nwakwue's user avatar
6 votes
2 answers
444 views

Sending Email Through App Script

Background This is a function that is part of a library written in GAS. A function inside a library I've written is supposed to send out an email to another user or users with accompanying details (...
Lofton Gentry's user avatar
6 votes
1 answer
100 views

Desktop Notifications for Queue Items - Updated Code

A while ago I took one of @Simon's scripts and updated it to make it more geared towards normal users (no offense mods) and this Question was created. But the link to the Github is no longer correct ...
Malachi's user avatar
  • 28.7k
6 votes
1 answer
406 views

JavaScript module to render and handle a form to add users

I recently switched to modular JavaScript and really like the idea of having the state of your application in JavaScript and not in the DOM. I want to know if what I am doing is considered best ...
Michael's user avatar
  • 161
5 votes
4 answers
481 views

Calculate Final Grade: follow-up

I'm creating an online calculator to get the average grade of different tests my students take and also the final grade. I wonder if you see any problems in this update or any way to improve it: <...
Mori's user avatar
  • 115
5 votes
1 answer
234 views

3D 1st Person Snake Game #2

This is an iterative review of this question: 3D 1st Person Snake Game #1 The next iteration can be found here: 3D 1st Person Snake Game #3 Here is a snippet of the code: ...
FreezePhoenix's user avatar
5 votes
2 answers
162 views

Event emitter npm module

I was asked to complete the task described below: Event Emitters are objects that serve as the core building block in event-driven architectures. They simplify the process of handling asynchronous ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
4 votes
1 answer
456 views

Determine whether any permutation of a string is a palindrome

The task: Given a string, determine whether any permutation of it is a palindrome. For example, "carrace" should return true, since it can be rearranged ...
thadeuszlay's user avatar
  • 3,991
4 votes
2 answers
7k views

Codewars: Sum of Pairs

I've been working on this task (see screenshot). Here's my answer to it so far: ...
chiich's user avatar
  • 79
4 votes
2 answers
5k views

Laravel 8 registration and login with user profiles

I am working on a Laravel application (Github repo) that requires user registration and login. After registration, the users can change their registration details (except password, for which there is ...
Razvan Zamfir's user avatar
4 votes
2 answers
1k views

Wrath Cookie Switch for Auto Golden Cookie Clicker

Sometimes you feel like a wrath cookie and sometimes you don't. Here is a function that I created that will run on an interval, so all I have to do is set a boolean when I want to switch between ...
Malachi's user avatar
  • 28.7k
4 votes
1 answer
595 views

HTML Editor : online HTML editor with real-time preview

Note Please review the new question and ignore the following. Overview HTML Editor is an online HTML editor with a minimalist approach. Edit your HTML, CSS, and JavaScript code and monitor the ...
Mori's user avatar
  • 115
4 votes
1 answer
1k views

HTML5 Snake Game

This is the first version of my first HTML5 game. Beyond the standard features, I've added a high scores board which uses local storage to keep track of the scores. You can move the snake with the ...
user109327's user avatar
3 votes
1 answer
220 views

Login Server with Node.js

I'm currently learning Node.js. To practice, I've decided to create a login server. The program goes as follows: User connects to local website (10.0.0.79, props to this users answer for helping me ...
Linny's user avatar
  • 10.4k
3 votes
2 answers
1k views

Find the elements that appear only once

The task: Given an array of integers in which two elements appear exactly once and all other elements appear exactly twice, find the two elements that appear only once. For example, given ...
thadeuszlay's user avatar
  • 3,991
3 votes
1 answer
81 views

HTML5 Tile Cycle Puzzle

It's been a while since I did anything with JavaScript. I made a tile puzzle game to help me brush up. You can find it here: https://compucademy.net/tile-puzzle/ I would like some feedback on my use ...
Robin Andrews's user avatar
3 votes
1 answer
301 views

Simple object-oriented calculator - part 3

This question is an improvement I did based on recommendations from these other questions: Simple object-oriented calculator Simple object-oriented calculator - follow-up To those looking this ...
Nelson Teixeira's user avatar
3 votes
2 answers
4k views

Javascript based War card game

I'm working on a game of War for a potential employer and I was hoping someone could review my code and provide feedback on my code. HTML/CSS ...
Robert's user avatar
  • 219
3 votes
1 answer
352 views

Contact form with spam-prevention

Idea After a handfull of small javascript-projects, I also wanted to work a bit with php now. I decided to create a simple contact-form. Of course, I wanted it to be as spam-save as possible, so I ...
user avatar
2 votes
2 answers
79 views

Dim Hero & Add Background to Nav on scroll

I have followed a tutorial that initially was for adding a 'sticky' nav. I adapted this slightly so it adds a background to the Nav when the page scroll reaches the top-third point of the hero area. ...
Bagseye's user avatar
  • 401
2 votes
2 answers
168 views

A package for sort algorithms - v2

Looking for general feedback and praise. This is for learning an not implementation as I would expect the built is sort algos to be much faster. Addressed issues here: A package for sort algorithms ...
user avatar

1
2 3 4 5
10