« first day (2706 days earlier)      last day (66 days later) » 

12:00 AM
RELOAD! There are 7026 unanswered questions (89.7477% answered)
1 hour later…
1:16 AM
Q: Javascript to show folder and files by calling Web Api

Steve NgaiI have this Javascript which call the web api to see the available folder and then the available files. Any comment or code review on my code? var divFolder = document.getElementById("rootFolder"); var divFiles = document.getElementById("files"); function createFolderElement(data...

2 hours later…
2:57 AM
Q: First attempt at a python webscrape

R.TI wanted an easy way to import a large database of crystallographic values into a program I'm working on. I installed Selenium and put together a simple script to scrape space groups and coordinates. There are a total of 230 space groups with a varying number of coordinates and possible translati...

3:48 AM
Q: Candy Land in Haskell

dhuI tried to write Candy Land game in Haskell as a step to work on something bigger than those toy programs/functions I used to write. I wrote myself a python version first, with a functional mindset before I started working on the actual Haskell version, and it was a breeze and easy and I got it t...

4:09 AM
2 hours later…
5:45 AM
@Peilonrayz What would that cover that the guide you mention doesn't already?
6:41 AM
I think you should have asked this in codereview codereview.stackexchange.comShubham Srivastava 42 secs ago
6:56 AM
If you're looking for a review of already working code for improvements, better ask your question at Code Review. These kind of quesitons are considered to be too broad for Stack Overflow. — πάντα ῥεῖ just now
The question might be better suited for Code Review. — raznagul 33 secs ago
7:30 AM
Because “how to program better” is too broad a question for this site. That’s why the Code Review site exists. — Sneftel 55 secs ago
8:01 AM
Lots of misconceptions here, you could do with some code review once you get it working. For now, just single step through the code using your favourite debugger and see where it goes wrong? It's hard for anyone else to reproduce this short of typing in the same input as you are. — Lundin 34 secs ago
8:27 AM
Q: Combinatorics, C++ and optimization

Uriya HarpenessNote: I have a working solution, my question is about optimization and other approaches. Problem Description Hello, I'm re-writing an old program I made that solves nonograms. As part of solving it, I generate (for some of the lines) an array of all possible ways to fit the numbers in. I want to ...

8:53 AM
Q: Clearing up property and field confusion in C#?

user231071I understand that creating public properties that control private fields is good practice because of coupling and encapsulation, although lately I have seen it as such a waste of boilerplate code for a simple entity class like below. Take this class for instance, public class PersonEntity { p...

9:23 AM
I’m voting to close this question because this belongs on Code Review rather than here but code review isn't a valid option when flagging to close. — scotty3785 42 secs ago
10:11 AM
@Mast That guide is basically a regurgitation of help/on-topic, help/off-topic and help/how-to-ask with a sprinkling of a SO spin. This would not mention topicality at all.
10:40 AM
Since we have a working example, then I think this is now a problem for Code Review. From what I understand, std::vector<bool> is quite slow, so posting over there people might suggest how to use boost::dynamic_bitset efficiently. — Ken Y-N 27 secs ago
11:15 AM
@Peilonrayz So where there guide is meta, this would be meta-meta. I don't see a problem with that.
I'm assuming you'll base most of the content on what you wrote for Wonderland?
@Mast Kind of it'd mostly be talking about the harm of bad recommendations. And a how to write comments to minmax whether you're right or wrong. I won't talk about topicality because a good comment needs to assume that it's both right and wrong because everyone get our rules 'wrong'. I know I'm not impervious to getting the rules wrong.
Q: Modify an array of object using ES6 Pure function

Anand Deep SinghI am modifying an array of object using pure function but facing some challenge to modify userDetails object. My requirement is instead 1, I need to show true inside permissions object. Please check my code and suggest let data = [ { id: 1, title: 'admin1', permissions: { userDetails: {...

11:50 AM
Q: How to organize functions that need to do multiple things?

poletn23How to organize functions that need to do multiple things? For example logout function in client applications. Logout function needs to do: clear cookies, clear local storage, clear user state, clear user theme style, clear user specific feature, some other things... Last logout function that I...

12:49 PM
@SᴀᴍOnᴇᴌᴀ FYI: They fixed it
1:08 PM
@Mast ah nice
@CaptainObvious CNWAI
Unfortunately a new user answered it with working code :/
1:20 PM
@SᴀᴍOnᴇᴌᴀ thats basically no problem codereview.meta.stackexchange.com/questions/7051/…
1:32 PM
Q: Generalization of any() function with switchable default parameter for empty iterables

Richard NeumannI have some use-cases where I want the behaviour of the build-in any() function to be slightly different, namely to return True if the iterable is empty. Therefore I came up with the following override: _any = any # Alias built-in any. def any(iterable, *, default=False): """Generalization...

Q: SSIS and multiple API calls, a better way?

Matthew StottI am looking for some guidance on my solution as I am convinced there must be a better way. The below is my setup... SSIS Package API 1 - This calculates invoice totals and payments API 2 - This takes the above invoice totals and adds them into our payroll system, e.g. Sage So the data flow for t...

1:52 PM
@avazula I think it might just be "Monkernoon" :)
@SᴀᴍOnᴇᴌᴀ I've not played with Vue much. Just learnt how to modify parent and grandparent data and saw this. Using events are quite nice, even if I'm not using a bus yet. Much better then the black magic I was doing in AngularJS
1:58 PM
Might have to ask a question, I'm sure I'm finding a way to do it all wrong ;)
@SᴀᴍOnᴇᴌᴀ oops! :p but this form lacks the beauty of the sound "aft"! :o
@SᴀᴍOnᴇᴌᴀ You noticed that and didn't leave a comment? Taken care of.
@Peilonrayz Isn't that the best way?
@CaptainObvious Closed, ninja'd on the last vote by Peilon
2:07 PM
@Mast Damn right it is. Until you come back after a short day break ;)
@pacmaninbw Thank :)
2:29 PM
@pacmaninbw sorry I forgot... I admit I am online earlier than normal... I was going to try to do a call with a colleague in Ukraine but he said we can wait until my normal work day starts
now it is time for breakfast nom nom nom
@SᴀᴍOnᴇᴌᴀ Enjoy!
It's tea time over here.
@SᴀᴍOnᴇᴌᴀ Get some more coffee as well as breakfast. :)
2:46 PM
"The specifications are in the comment to the function..." By the specifications then, it fails any code review: The function is prototyped to return double but is spec'd to return float ( It will return an uniformly distributed float ). — ryyker 21 secs ago
@DivyanshuSharma If you have another question, you should ask another question. Though it sounds like your request would be better of at CodeReview SE. — Polygnome 15 secs ago
@pacmaninbw I don't habitually drink coffee... never stopped drinking hot chocolate, though in recent years I have been drinking more tea in an effort to reduce sugar intake
3:02 PM
@SᴀᴍOnᴇᴌᴀ Do you eat an apple with breakfast, that is as good as coffee without the cafine.
@pacmaninbw not typically, though my wife wanted some in her oatmeal so I finished the parts around the core
she doesn't go to the effort of completely eating fruit like I do
@avazula do you put emphasis on that part of the word? or pronounce it in a pirate-y/mariner-type manner?
@SᴀᴍOnᴇᴌᴀ As a rule of thumb, read everything I say in a pirate way. Adding "arr!" to the end of every one of my sentences is what's closest to how I sound IRL ;)
I don't have a parrot sidekick though (yet), as sad as it is.
I had a parrot land on my head while in Australia...
Darn. I'm jealous now.
granted there were hundreds of them and people around us were tossing out bird-food
3:14 PM
Still sounds like an incredible experience
I really need to go visit Australia one day
3:34 PM
That's a step bigger than the lories that attacked me.
3:49 PM
If your code works, but needs optimization, then Code Review might be a better fit. However, you need to include the problem description in the text of your question rather than as a link to an outside site — G. Anderson 46 secs ago
4:04 PM
Q: Planetary Alignment

Sy KerI stumbled upon this kata; the aim is to count how many epoqs it takes for n forward-counters and m backward-counters to all be equal. In the beginning, all the planets start with 0. There are two types of planets: forward-counting planets, and backward-counting planets. Every second, the displa...

Jon Chan on September 30, 2020
In response to COVID-19 and its impact on SYEP, over 50 nonprofits and technology companies came together to design the Summer Bridge 2020 plan to continue the program. As one of Summer Bridge’s partners, Stack Overflow designed a workplace challenge to give students a taste of what it’s like to work in the tech industry and to give us a chance to learn more about how students engaged with our developer community.
4:29 PM
Q: .NET Core Dependency Injection - Worker Service x Web Api

IgorFolks, I have a big question about how .NET dependency injection native works on a Service Worker project. We need to resolve a service(Scoped:IMyRepository) on constructor of an MediatR Handler, but we have an error at runtime, please see: [Shared.csproj] Repository Folder using System; namespa...

4:55 PM
Q: How would I name these types in a way that's accurate and not redundant?

temporary_user_nameI have a component that shows the status of a customer's billing plan. There are about seven different states it can be in, with about six props each (I've simplified it down to two for this example). I'm trying to create an enum that I can get the props from, to be used like this: <PlanCard {......

Q: How to Refactor multiple elif statements, i dont know how to approach it im a beginner

Cheezy Nuggets(The "anykey" has not been used) def load1(): print( "Please choose your region\n 1 for Region 1\n 2 for CAR \n 3 for Region II\n 4 for Region III\n 5 for Region IV\n 6 for NCR\n 7 for Region V\n 8 for Region VI\n 9 for Region VII\n 10 for SOCCSKARGEN\n 11 for Region VIII\n 12 for CARAGA\n 13 for...

@CaptainObvious MD - Missing description
6:11 PM
Q: group lists within list together given they have at least one common element

bluerayI am grouping lists within list together given they have one element in common. My input data is [[1, 2], [3, 4], [5, 6], [1, 2, 7], [8, 2], [9, 5]] My output is: [[1, 2], [1, 2, 7], [8, 2], [3, 4], [5, 6], [9, 5]] The code I am using to accomplish this is: mylist = [[1, 2], [3, 4], [5, 6], [1,...

What do you mean with "compile without a file"? Don't you mean "run without a file as argument" instead? Then, while(inFile.eof()) seems to use the wrong stop condition. In any case, checking for EOF before trying to read something is wrong, you should be able to find lots of explanations here. Three more things: Once you have it running, submit your code at codereview.stackexchange.com. As a new user here, further take the tour and read How to Ask. — Ulrich Eckhardt 20 secs ago
...Optimal in time? Memory? You could post it at cs.stackexchange.com instead which, in my opinion, is more fit for questions like this. Then, when you have the algorithm, you can ask specific/minimal questions on the implementation details. And, finally, if you want, you could ask for a review on codereview.stackexchange.com. — Georgy 43 secs ago
welcome! please consider posting on Code ReviewDaniel A. White 8 secs ago
1 hour later…
7:38 PM
Have you heard of Code Review? With a little editing, your question would be more fit there then here in Stack Overflow. Just make sure to take their tour and read their How To Ask before posting. — Pedro Lima 42 secs ago
@PedroLima It's a shame the close option, in SO doesn't have the option for code review, I think SO Dev's could do with adding it. — Keith 36 secs ago
@Keith I partially agree. Close options suggesting another Stack Exchange site usually result in the question being automatically transferred to the target site. The problem is Code Review's guidelines describe a very restricted question format. Much more restricted then Stack Overflow. This question, for exemple, does NOT follow the Code Review's guidelines and would likely be flagged there if it were directly transferred. Which is why I suggested OP to read the Tour and How To Ask before posting there, because the question would require editing first. — Pedro Lima 29 secs ago
Code review questions belong to codereview.stackexchange.com, I'm voting to close. — Lesiak 27 secs ago
I’m voting to close this question because it belongs to codereview.stackexchange.comLesiak 55 secs ago
8:16 PM
I vote to reopen this as OP clearly as "Is there a more efficient way of doing so?" AFAIK, I don't believe he would get an answer to that core question on Code Review. — ldog 15 secs ago
8:38 PM
It is not clear what specific problem you need help with. If you are looking for people to simply comment on code that otherwise appears to be working, this is the wrong forum. You may find that codereview.stackexchange.com can accept such a question, if presented correctly for that site. If there is something not working about the code above, you haven't said so. If there is, please fix your question so that it's clear what you are asking. — Peter Duniho 44 secs ago
Q: unexpected result in code for detecting prime numbers till number 10

Pouya AbdyI coded this as a book suggest . everything is right but when I execute the last result is illogical. here is the code : for x in range(2,n): if n%x ==0 : print(n,'equals',x,'*',n//x) break else: print(n,'is a prime number') break``` here is the execution result : 3 is a prime ...

Q: How to use *args and *kwargs to refactor adding arguments to the function

Bartek KobylinskiI made simple REST API with flask and I come to place where i see that it might be some how that I could refactor my code with using *args and **kwargs but I've stocked in. Could someone provide me some hint: worker_arguments = reqparse.RequestParser() and my view for endpoint class looks like: ...

@CaptainObvious broken
9:09 PM
Q: djikstra vs floyd warshall C++

gccrossI was trying to implement a solution to find the shortest path between all pairs of nodes in a directed graph. I didn't know Floyd-Warshall in the beginning, so my approach was to create a stack and put all children of a node on that, and then pop each in turn and process it. It seems to work, bu...

9:32 PM
@Idog I would like if you can re-open the post, I have posted the question on Code Review, and did not get the answer I was looking for, helpful answers nontheless. And next premutation is not exactly what I need, I do not just need re-ordering, or I missed the way this can be used in this case. — Uriya Harpeness 28 secs ago
Q: Optimize usage and implementation of sparse matrix in Python for performance

Fabian FritzI have some scientific calculation to do. And I want to optimize an important function fun for performance: I have a matrix A. For every block [x:x+2, y:y+2] in matrix A, I calculate its unit vector. Now for the part I want to optimize: using my own implementation of a sparse matrix, I store the ...

9:45 PM
I’m voting to close this question because this is asking for testing support and/or code review. — Prune 22 secs ago
9:59 PM
Q: PHP Email Verification, Sanitizing Email Input for Database Table

BoogermetimbersIntro The purpose of this post is review and feedback. I've been working with PHP for three weeks and have reached a point where I require the advice from those with much more experience. The PHP scripts I've written are fully functional and have already been perfected to the best of my abilities...

10:14 PM
@CaptainObvious I'm going bed now. Can someone check in on the answer to this question in a bit. I removed some fluff but I think the OP will add it back.
@Peilonrayz I can look at it but can't promise anything...
@CaptainObvious I hadn't seen username of answerer before... at first I thought _ verisimilidude_ was supposed to be a play on words with vermicelli rice but apparently verisimilar is an adjective stemming from latin
@SᴀᴍOnᴇᴌᴀ I couldn't ask for more. Thanks :)
@RMunroe can we order some?
10:26 PM
When your code works as expected but you would like improve code quality, it's best to ask such questions at codereview.stackexchange.com. — R Sahu 57 secs ago
1 hour later…
11:41 PM
Q: How can I optimize this Java 2D Array BFS?

aruneswaraThis is a Google foobar question. The gist of it is that I have to find the shortest path from top left to bottom right in a 2d array of 1's and 0's, where I can only traverse on 0's. However, the twist is that I can change one 1 to a 0. My code works for the first three test cases, but it fails ...

11:55 PM
possible answer invalidation by Pankaj on question by Pankaj: codereview.stackexchange.com/posts/249980/revisions
@Duga rolled back

« first day (2706 days earlier)      last day (66 days later) »