« first day (2732 days earlier)      last day (41 days later) » 

12:00 AM
RELOAD! There are 7068 unanswered questions (89.7440% answered)
 
1:00 AM
0
Q: A piece of JS code that renders a cherry animation is eating up 66% of my CPU, how do I deal with it?

JJJohnThis code is to render a cherry animation. var RENDERER = { INIT_CHERRY_BLOSSOM_COUNT : 30, MAX_ADDING_INTERVAL : 10, init : function(){ this.setParameters(); this.reconstructMethods(); this.createCherries(); this.render(); }, setParame...

 
 
4 hours later…
4:42 AM
Monking
 
5:07 AM
0
Q: A simple HTML/PHP form application

ttoshiroI've been having issues making the HTML portions of the following PHP file display. I'm not expecting full functionality at all, I'm simply trying to make the labels and text areas show -- but instead, the site is completely blank. What am I doing wrong? <body> <?php function validateinput($data,...

 
5:20 AM
This pattern would fail any of my code reviews, instantly. — The General 40 secs ago
 
 
1 hour later…
6:21 AM
1
Q: C++ Number Guessing Game

Sir BroccoliaI created a simple guessing game where the player can choose whether the player is guessing the number or the computer. If the player is guessing the number, then the computer will generate a random number between 1 to 100. Then, the player must guess the computer's number. First, the player will...

 
 
2 hours later…
8:00 AM
0
Q: Indexed sum for-loop

OverLordGoldDragonN, M = 500, 2000 a = np.random.uniform(0, 1, (N, M)) k = np.random.randint(0, N, (N, N)) out = np.zeros((N, M)) for i in range(N): for j in range(M): out[k[i, j], j] += a[i, j] Can this be made any faster?

 
@bitsapien I see CODEOWNERS offers code reviews to be triggered. Can you explain how to use it to restrict access to only a part of the repository? — Suma 13 secs ago
 
8:25 AM
0
Q: Cannot create border around maze in depth first search maze algorithm (MST)

Naveen KashyapI'm trying to create a maze with depth first search algorithm. the algorithms seems to be working fine but it remove the walls from the border when it's on even index node it remove the right and bottom wall and right and bottom wall when it's on odd node. this.boxes is a 1d 40x40 array containin...

 
9:14 AM
0
Q: Depth first search maze algorithm

Naveen KashyapI have implemented this depth first search maze algorithms but i'm little confused about how to create borders around the maze. I move two steps at a time to create walls between them. Here the code this.boxes is 1d array contains html elements that contains the index of box index based grid is 1...

 
9:29 AM
for reviews of code there is codereview.stackexchange.com, though you are expected to post correct code there — idclev 463035818 just now
 
10:02 AM
This is too vague. We're not going to double-check it for you (especially as we don't even know what tests you've already run and what the exact results were). And "improve" is meaningless - we've no idea what your criteria for that are. As I've just explained, we're not a testing or code review service. — ADyson 16 secs ago
 
10:48 AM
Welcome to stackoverflow. There is another stackexchange site for code-review: codereview.stackexchange.com maybe your question would be more fitted in that context. Other than that read @dandan78 s How to Ask and also please read the help pages, take the SO tour, read How to Ask, as well as this question checklist. Lastly please learn how to create a minimal reproducible example. — Jan 23 secs ago
Is the code working? Do you want a code review? — Some programmer dude 31 secs ago
 
 
1 hour later…
12:07 PM
1
Q: Text centered in a circular component

dcorkingI have surrounded my initials with a circle. This is intended to be a re-usable component in a responsive layout. (When it is re-used the text will always be two letters, and the font won't change. It behaves sensibly when the browser zooms in and out, but I haven't yet considered if a different ...

 
12:30 PM
possible answer invalidation by sanoj lawrence on question by sanoj lawrence: codereview.stackexchange.com/posts/250870/revisions
 
1
Q: Django Appointment Model

uberI am building a doctor appointment app with Django and Django Rest Framework. The app will have the functionality for secretaries to add appointments to a Doctor's calendar, and each Doctor may have more than one clinic (and multiple secretaries). I build this Calendar Model to store the availabi...

 
1:12 PM
If your code works fine, may I suggest codereview.stackexchange.com? — Broots Waymb 45 secs ago
 
0
Q: Refactoring function based on cyclomatic complexity metric - Python 3

svacxpythonI have intermediate experience as a programmer in Python and was recently introduced to static code analysis tools and their relationship to code coverage, which if done right, should provide a rough idea of how many tests should be written to test the code. Since this is a new topic for me, I st...

 
Welcome to being a programmer! Your code has an error. You are putting questions.question into the HTML. But questions is an array of questions. You might be able to do questions[0].question and that will work. Once your quiz is working, why not submit it to the code review stack exchange? — speciesUnknown 41 secs ago
coders are in general not keen on going through lines of code without knowing what to look for. Rewrite your question such that it becomes obvious as soon as possible before jumping in code. Also consider posting this question at codereview SO sister site. (see text balloon next to "rep" and "?" upper-right corner. — ZF007 just now
 
2:10 PM
0
Q: Express.js blogging application

Razvan ZamfirI have put together this blogging application with Express, EJS and MongoDB. There is a public, front-end part and a dashboard. In index.js I have: // Bring the Dashboard const dashboardRoute = require("./routes/admin/dashboard"); // Register Dashboard Routes app.use('/dashboard', dashboardRoute...

1
Q: Filtered result of LEFT OUTER JOIN... Are the queries the same?

peprDoes the query... SELECT * FROM dbo.[company$Customer] AS cu LEFT OUTER JOIN dbo.[company$Customer] AS cu_billto ON cu.[Bill-to Customer No_] != '' AND cu_billto.No_ = cu.[Bill-to Customer No_] WHERE cu.timestamp > @max_ts OR cu_billto.timestamp > @max_ts ... p...

 
2:35 PM
2
Q: Python : adding a columns with count of missing values by row

lcrmorinI have a big python data-frame and I am trying to add a column to it with average number of missing values by row. I have inherited some code that is working but I'd like to reduce memory usage by removing intermediary values. Here is a toy exemple : students = [ ('jack', np.NaN, 'Sydeny' , 'Aust...

1
Q: Arithmetic Expression evaluator

theProgrammerThis program takes text input and evaluates the expression. This is meant to be an exercise. I reinvented a stack class though I know C++ provides one in the standard library but it isn"t meant for production use but to solidify my knowledge on linked list data structure I also made an infix post...

 
2:52 PM
Please post your current solution. Also, the Code Review site is more appropriate for questions about how to improve code. — Scott Hunter 40 secs ago
 
0
Q: Why does it keep putting the same number? I believe it is an issue with the for loop

SeveralNote: This is simply for test and I do not plan on using for malicious reasons, just educational purposes from selenium import webdriver from time import sleep driver = webdriver.Chrome("C:\\Users\\Abdul_szuzdge\\Downloads\\chromedriver_win32\\chromedriver.exe") Numbers = ['10', '20', '40', '30...

 
Why use a / 10 instead of a coordinate? This mandelbrot function is a simplified version of what I've written, but it seems odd to pass a single integer into a function that should be expecting a complex number. — Carcigenicate 21 secs ago
If you have working code, and want to make it better, consider asking at codereview.stackexchange.com — kojiro just now
 
3:09 PM
@CaptainObvious Broken code.
 
3:34 PM
@Ryan You don't think that asking us to look through all of this code and tell you "notable things you should change" is a whole code review? — GrumpyCrouton 27 secs ago
 
@pacmaninbw closed
 
@Heslacher Thank you.
 
4:13 PM
1
Q: A recursive_transform for std::array with various return type

JimmyHuThis is a follow-up question for A recursive_transform for std::vector with various return type. Thanks to G. Sliepen provide further review suggestions. After digging into the topic of achieving a more generic recursive_transform function in both various output type and various container type, I...

 
4:37 PM
@DaveNewton Best not to recommend sites that you aren't involved in, now we have to close the question over there as well: codereview.stackexchange.com/q/251174CertainPerformance 21 secs ago
 
1
Q: Array.map vs just rendering elements at all times

Predrag BeocaninLet's assume I have a socket that feeds me an array of five items, none of which have unique keys. Let's also assume that that data changes very very often, like every 300ms or so. This would be the shape of the data: const data = [ { name: "John Brun", avatar: "https://upload.wik...

0
Q: Why is my Sieve of Eratosthenes using generators so slow

jay jayjayThis is my prime sieve based on the Sieve of Eratosthenes. import itertools sieve = itertools.count(2) primes = [] nprime = 0 for _ in range(10000): nprime = next(sieve) primes.append(nprime) sieve = filter(eval(f"lambda x: x % {nprime} != 0"), sieve) On my computer this code takes 1...

-2
Q: What does this code do and how to make it more readable

c_kusanagiI was trying to update a page but I did not understand how it source code was working since the first developer obfuscated it and now he is dead. I tried my best by making some comment on the code since it was not commented. I did by best but I still don't understand what the code is supposed to...

 
Hmm... I was looking at this just now... codereviewvideos.com/course/…Ajay Kulkarni 21 secs ago
 
Monking
 
5:23 PM
Impressive algorithm approach, I can open a question for it on Stack Overflow or Code Review if you wish and accept your answer, but this question (as stated) was about speeding up a general computation — OverLordGoldDragon 22 secs ago
 
5:47 PM
I VTC'd on Code Review because it's off-topic there. I haven't VTC'd here yet because the question is salvageable if you (1) add a bit more context - how is the function called (2) remove the "How to improve it" part (which is too opinion-based for SO) — CertainPerformance 48 secs ago
 
@CaptainObvious Broken code, the walls of the maze are disappearing.
I would appreciate a second opinion on this from a JavaScript Guru. @SᴀᴍOnᴇᴌᴀ
 
6:03 PM
@pacmaninbw sounds like CNWAI to me...
 
Thanks!
 
6:43 PM
If your code works, please post on Code Review. — Thomas Matthews 37 secs ago
 
Having my best day ever on CR. Just got to 200 Rep for the day.
4
 
yay rep-capping
That can happen when you answer a HNQ
 
@SᴀᴍOnᴇᴌᴀ And 3 new badges, 2 Nice Answers and a Motarboard. Yeaha!
 
I told my wife I got a "Nice Question" badge last week for the recent meta post about lowering the close vote threshold - she asked if she should start giving me badges for things she asks me to do :)
 
6:58 PM
Did you say yes?
I would have
 
LOL!
 
we just laughed
 
Or at least gold stars on the refrigerator.
 
"If you're going to downvote me when I do things wrong you should give me upvotes and badges when I do things right."
Or am I the only one who gets downvoted when I do things wrong?
 
No you're not the only one, nor do you have to do something wrong to get a down vote, it just helps.
 
6:59 PM
I don't get downvotes from my SO
She either says "great job" or "acceptable job"
Because she didn't want to do it so even if I was only half right that's better than her having to deal with it
 
I think that is a new meaning for SO in this chat room
 
Significant Other
 
I already guessed that.
Since it's time to eat lunch I guess I should make breakfast.
 
Probably
I had Chipotle for lunch
Which was also breakfast
And I got a car battery charger / jumper while I was out because my backup car is dead
 
7:08 PM
It is what it is
I work from home now and have two cars because I'm selling the nice one and going to drive the (currently backup) permanently
But I think it needs a new battery
I rescued it from my dad's ex-wife
 
just borrow a Ryobi lawn-mower battery :)
 
It had been sitting for 3 years...this battery was a year old when she stopped driving it
Those don't have the output for it or I would
They make a transformer that converts the 40V to 12V (which is what the car needs) but the amperage is super low and obviously not gonna work
 
 
3 hours later…
9:42 PM
A better place to ask this is codereview.stackexchange.com, not StackOverflow. Also after about 10 minutes with Firefox on a bad laptop, it was able to freeze — Samathingamajig 49 secs ago
@Samathingamajig when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the post above would likely be closed as off-topic because the code is not embedded and might be considered not working as intended. — Sᴀᴍ Onᴇᴌᴀ 19 secs ago
 
9:59 PM
0
Q: Animal Storage TreeView - Tkinter

Aaron WrightBit of a pointless program (at the moment). It's intended more as practice for myself rather than anything else. General idea is that you add details of a particular cat or dog, and it'll update a TreeView. A dog or cat can then be removed based on their assigned number. Many thing I wasn't too ...

 
10:15 PM
 
@RMunroe does it have crime deterrent?
 
@SᴀᴍOnᴇᴌᴀ Perhaps the 3,000,000 Volt Arc can be used as a taser?
 
mayhaps...
if not that then maybe the coherent ultracapacitor-pumped emission would provide some assistance
 
0
Q: Using `Func<T, TResult>` to wrap a repetitive retry functionality?

TacoI am working on an application that is required to be constantly running, and as a requirement should make multiple attempts for particular processes such as web API/database calls, just in case network connectivity goes down for a moment, or something similar. In this case, I'm constantly having...

 
10:48 PM
0
Q: How to approach separation of layers mapping response to model in Angular app?

greatromulI want to organize mapping for my Angular app so that code structure would clear for other developers and I want to have as less code as possible. I have an api service that is responsible for communicating with API. I create separate data services, which utilize the api service, to get backend d...

0
Q: LeetCode: Number of enclaves C#

Giladhttps://leetcode.com/problems/number-of-enclaves/ Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land) A move consists of walking from one land square 4-directionally to another land square, or off the boundary of the grid. Return the number of land squares in the grid f...

 

« first day (2732 days earlier)      last day (41 days later) »