« first day (2451 days earlier)      last day (1551 days later) » 

12:00 AM
0
Q: Creating a Concentration memory-style game with CSS/HTML/JavaScript

CoderSami85I am doing a pre-cohort coursework for General Assembly and I am somewhat stuck. I have tried making several changes, but it never seems to work right. I am trying to use Career Karma to get assistance, but if you've ever worked with them, it is all dependent on how many people are online and who...

 
RELOAD! There are 6366 unanswered questions (90.0761% answered)
 
12:41 AM
0
Q: BBC Code Dice Roller in PHP

JoshuaDI do not program PHP too often. I wanted to write a dice-roller bbc code parser for my forums. What do you see that can be improved? You can see the code running live here: https://joshuad.net/misc/dice-test.php <html> <body> <p> <h2>Syntax</h2> <ul> <li><strong>Basic Rolls:</strong> NdM: Roll...

0
Q: React-based music app

WongI just completed my minimalist music app If somebody could have a quick look at the repo and tell me how bad/good is my code it would be greatly appreciated. So, I can improve it. Thank you :) ! The code: https://github.com/thecatcampaign/SaoCLao This is example code: const loadMore = async (...

 
 
1 hour later…
2:10 AM
You should probably post this on code review instead. — David Cian 51 secs ago
 
 
3 hours later…
4:47 AM
0
Q: why ths code is not working on nither turbo-c++ nor dev c++?

Avijit MandalThis c++ code is not working on nither turbo-c++ nor dev c++ . The compiler say that on dev c++ The code is : #include<iostream> #include<conio.h> #include<graphics> #include<math.h> using namespace std; int main() { int gd=DETECT,gm; initgrap(&gd,&gm,"c:\\TC\\BGI"); int x1,y1,x2,y2,dx,dy,l;...

 
 
1 hour later…
6:14 AM
@JenniferWilson If have a working solution to the problem and you want to know how you can improve, you could post your code (here)[codereview.stackexchange.com/]. — Kerndog73 just now
 
6:49 AM
0
Q: CODE IMPROVEMENT - JAVA (Moving Average from Data Stream)

Kemal GulpınarI wrote a code for one of the leetcode problems but I am not satisfied. I believe I could improve it. Here is my code: class MovingAverage { Queue<Integer> myQueue; int size; /** Initialize your data structure here. */ public MovingAverage(int size) { myQueue = new Link...

 
7:17 AM
Monking
 
7:48 AM
Monking
 
 
2 hours later…
9:35 AM
2 major issues, do not name your variables with the same names as builtins, change your list name from list to something else. and move the sort out of the loop, there is no need to sort after each number, its enough o sort once after you get them all. Also, stackoverflow is about solving problems, i think you want code reviewNullman 59 secs ago
 
9:52 AM
0
Q: Refactor huge if else Clutter based on many independant conditions

AnirudhCurrently I am cleaning up hard to maintain and test if else clutter which is based on conditions which have to be checked in isolations: What is the basic semantic of the conditions? Big Entity Objects have to be checked based on two entity keys namely Trans and Right for state change as in...

 
 
1 hour later…
11:18 AM
@Zabuza not needed, unless you read code out of the IDE, like during code reviews. — JB Nizet 28 secs ago
 
11:36 AM
@jonrsharpe Thanks for the tip. I haven't really looked at the Code Review site. — John Szakmeister 19 secs ago
 
 
2 hours later…
1:15 PM
You can have answers for this type of questions in codereview.stackexchange.com, not in stackoverflow. — pymym213 36 secs ago
 
1:36 PM
-1
Q: Regular Expression to extract specific lines from text

RobI am working with the project gutenberg GUTINDEX.ALL file, I have this regular expression ^[0-9\p{L}].+\d+(\s+)?[A-Z]?$ which looks for the first line of each book declaration, from which I parse the rest of the book information from. Lincoln's Gettysburg Address, given November 19, 1863, on th...

-1
Q: The method is a sequence of the small and merely structurally similar steps. Any pattern(s) to refactor the method to?

bob-12345I need some help to understand if the code below could be refactored to something less straightforward, less repetitive and more towards any appropriate pattern. What I feel uncomfortable with in the code is the flow of repetitive tasks with the same pattern like: // Get the result from some o...

 
1:56 PM
0
Q: python - class not returning the expected result. I am using function and a class

Gunasekaran DesaiyanI am trying to pass 2 values from a function to the class and get a result from the class. For example, if I send value "dog" I should get the result as "dog runs" as a returned result. Need help with the code. class secrets: def init(self,which,why): self.which=which self.w...

 
Monkknig
 
 
1 hour later…
3:18 PM
-1
Q: Table data getting refresh on every key up function

Ahamed SafnajI am getting products and displaying in a table by scanning product code. But if i scan for the second item the the existing record in the table getting removed. Here i have used jquery and Ajax to retrieve data. I wanted to keep existing data in the table while i am adding new. Suggest me a way ...

 
 
1 hour later…
4:39 PM
0
Q: React setState function in useEffect

ElmoI'm toggling a state when the browser is resized: const [expanded, setExpanded] = useState(true) useEffect(() => { const listener = () => { if (document.documentElement.clientWidth > 1024) return setExpanded(false) } window.addEventListener('resize', listener) return () => window...

 
5:20 PM
0
Q: Simple custom HashMap implementation Java

here4learnI have implemented a very simple idea of HashMap, I tried to cover cases like "get, put, delete, containsKey, resize," etc in the following implementation. Please take a look and suggest improvements to my coding styles and thought processes. // Interface public interface Map<K, V> { boolea...

0
Q: Dutch National flag solution in C++

Rahul Wadhwanithis week I learned about QuickSort and used the technique to solve the Dutch National Flag problem. I would appreciate it if someone would review my code and give feedback. Code: pair<int, int> Partition(vector<int> &nums, int low, int high) { int pivotElement = nums.at(low), lt = low, gt = ...

 
5:40 PM
0
Q: What would be a better contract (interface) for a presentation layer, cotract that expect to return scheduled events?

RikiConsider my simple business requirement as follows: There is a list of talk and they need to scheduled in tracks, each track has morning session starts at 9am and afternoon session starts at 1pm ends by 4pm and a lunch break at 12pm to 1pm. Given: A list of talk Talk.txt Python session...

 
6:10 PM
@Barmar thanks for pointing me in the Code Review direction. I'll post there after I do some performance checks and decide if I need further oprimization. — Ben S. 1 min ago
 
6:21 PM
0
Q: Machine learning python MNIST dataset

user216888I'm a noob to machine learning and i've been struggling with this for a few days now and I can't understand why my neural net is having trouble classifying the mnist dataset. I checked my math and used gradient checking, but I can't seem to find the problem. import pickle as pc import numpy as n...

 
7:02 PM
-1
Q: How can I read a string from the text file that I wrote into, and write that string into my text boxes in VB?

LiterHow can I read a string from the text file that I wrote into, and write that string into my text boxes in VB? I need this string information to be separated and written into specific text boxes. Private Sub WritingFile() Dim objMyStreamWriter As System.IO.StreamWriter = System.IO.File.Cr...

 
 
2 hours later…
9:24 PM
-1
Q: Ambient time context to help unit testing

Dmitry NoginThe following test demonstrates the functionality of Time class which is supposed to be used instead of DateTime.Now. [TestClass] public class Time_Should { [TestMethod] public void Adjust() { Assert.IsTrue(Time.Now > new DateTime(2020, 1, 1)); using (new Time(2010, 1...

 
 
2 hours later…
11:05 PM
1
Q: Brainf*** interpreter in Rust

user62350I'm learning Rust coming from an intermediate background in Python. I've completed the first 8 chapters of the book and I wanted a project that would solidify the concepts I learned, so I made a Brainf*** interpreter designed around the things I wanted to make sure I knew. This meant that I wante...

 

« first day (2451 days earlier)      last day (1551 days later) »