« first day (3012 days earlier)      last day (76 days later) » 

12:03 AM
REFRESH! There are 7725 unanswered questions (89.3684 answered)
3 hours later…
2:58 AM
I downvoted because the problem to solve is not clear. If OP has messy code, show the messy code and ask if there is a better way. And then the code probably belongs on code review if it is working code that needs to be improved. — Mark Tolonen 48 secs ago
Hey, welcome to SO! I suggest you trying to get some code review on Reddit instead. This is not the place for that. — Camilo 30 secs ago
1 hour later…
4:21 AM
Some code review. Use double literals like -5.0 rather than -5 when you are working with doubles. Don't use while (1==1), just use while(true); it's clearer and less error-prone. Consider var j = (-5.0, 0); instead of your code. You have if (j == (1, 1)). Never test doubles for equality like that. Always assume some inexactness in doubles. Having two very similarly named variables be of diifferent types (double n1, int n2) is extremely confusing to the reader — Flydog57 6 secs ago
5:16 AM
however I'm uncertain if it is very efficient. -- If the code works, questions like this should go to Code Review. Having said this, this looks like a whole lot of code to simply toggle a boolean flag: bool isOn = true;... IsOn = !IsOn;...} whenever the key is hit. — PaulMcKenzie 31 secs ago
5:48 AM
Q: defining navigational property

nischalinnclasses public class FirmsModel { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int FirmId { get; set; } public string Name { get; set; } public virtual FirmServiceRegistraionModel firmserviceregistration_ { get; set; } } public cla...

6:57 AM
Just skimming over your code, there's a lot that could be improved as well. After getting it to run, submit your code for review at codereview.stackexchange.com, you won't regret it! — Ulrich Eckhardt 1 min ago
Q: Is my code following Factory Method Design Pattern?

AbhishekFile: InfoFactory.h contains four classes. CaffienatedBeverage is an Abstract class with one pure virtual function Name. It also contains some data members that are used to make a coffee based drink and name of the drink. Latte is a class that inherits CaffienatedBeverage class. Latte contains m...

1 hour later…
8:19 AM
Q: Adding websocket functionality to send live data from a Python script. Any edge-cases or unexpected consequences to beware of?

davidtgqThe original purpose of this script was saving data to a local file, which is still the primary purpose. Since I may only obtain one copy of a data stream (not this particular Coinbase one; it's just a free example), I'd like to add a secondary purpose using websockets to mirror the data for a Py...

9:18 AM
Maybe codereview.stackexchange.com could be a better option for refactoring questions. — pdu 1 min ago
9:35 AM
Q: binning 3D points (large dataset) with python, taking long time to load

nikita0509I am trying to make a 3D plot of a galaxy catalog and have a large amount of x,y,z coordinates and data value (w4) stored in seperate hdf5 files. Since the data content is huge, I have tried binning them. The code is as: gaspos = np.array(gas['Coordinates'])*ckpc/h ##coordinates x = gaspos[:,0] ...

Q: Scraping a dynamic website with Scrapy and Selenium

SatiI am trying to use Scrapy for one of the sites I've scraped before using Selenium over here. Because the search field for this site is dynamically generated and requires the user to hover the cursor over a button before it appears, I can't seem to find a way to POST the query using Requests or Sc...

10:31 AM
possible answer invalidation by Abhishek on question by Abhishek: codereview.stackexchange.com/posts/265621/revisions
@Duga thats ok
Q: The Abstract Factory design pattern as a Database Operations program

AbhishekFile - DatabaseOperations.h This file contain classes representing database operations for three different types of databases (relational, document based and graph based) like establishing connections, executing statements, and committing and closing the connections. There are four abstract class...

11:25 AM
Q: How to add custom route to wordpress extending rest api controller

hariRecently I completed an assignment and the task was to add a custom route on top of the wordpress rest API. I have had some experience with rest API in Laravel but not in WordPress. My code is posted below. I thought I did a good job but it didn't meet the mark. Any expert on API, better on WordP...

Question like this is offtopic here. I suggest you to try code review subsite. codereview.stackexchange.comtalex just now
11:38 AM
@talex Thanks.. I didnt know there was a new subsite for codereview.. Thanks for the suggestion — Sandeep Nair 11 secs ago
11:50 AM
Q: Efficient usage of Java Stream API to convert one object to another

Sandeep NairI have a model of Author which has books, awards and pricing as shown below (Not showing getters and setter just to avoid verbosity) Author: Has books and prices for the books public class Author { private long id; private String name; private Set<Book> books; private Set<Price> prices; ...

12:40 PM
Q: Contextual binding based on Autafac and caller assembly

kalasantyCould someone say if this kind of contextual binding for plugins has a point? //it is a AbstractModule code public abstract class AbstractModule : Module { private ContainerBuilder _containerBuilder; protected AbstractBinderBehavior BinderBehavior { get; init; } publ...

1:06 PM
Q: Avoiding cloning references in a Specs system

Daniel A. WhiteI'm working on a card game using Amethyst's Specs crate and am fairly new to Rust (therefore I'm learning through the fight with the compiler). My first System is to deal the cards to each player. I have: a Card type that has Copy semantics a Cards component that represents a set of Card the pla...

1:17 PM
You'd have more luck on codereview.stackexchange.com to optimize your code — aynber just now
1:30 PM
I’m voting to close this question because codereview.stackexchange.com might be more suited — shaedrich 28 secs ago
Q: Best way to arrange python functions in an application

ps0604I have a Java/EJB/Java EE background and transitioning to python. One difference that I see is that Java seems to be based more on classes and python on functions. It's hard for me to think and separate code into functions and files, I end up having large files with a lot of functions, instead of...

1 hour later…
2:47 PM
Q: Any suggestions to make the Controller method more light?

skoryi-rombI want to make the code bellow more prettier but I don't know what to change and how to change. I know that the controller should be easy, delegating actions related to models to services or something else. The task the code below solves is to authenticate a client with 2 factory authentication. ...

You should probably ask this in codereview.stackexchange.com. — dbraillon 37 secs ago
Code Review also has posting standards. Read them before attempting to post there. — Robert Harvey 39 secs ago
This probably should be asked on codereview.stackexchange.com? — evolutionxbox 31 secs ago
Also, you failed to take my advice about reading Code Review's posting standards first. In its present form, your question is likely to be closed there also. — Robert Harvey 46 secs ago
3:12 PM
Q: Unity C# CubeController script (jumping & moving the cube)

Abraham TugalovI'm kinda new to C# and Unity, coming from PHP/Python background. So I'm curious, if this CubeController script can be considered a bad code. I mean the coding style, performance, & overall Unity C# best practices. The code itself is a simple CubeController script. It adds jumping mechanic, and c...

Ben Popper on August 02, 2021
Our data reveals some fascinating trends in education, remote work, and web frameworks.
3:42 PM
Guten Monkin
@Feeds It makes me unhappy to see Scala so far down everywhere
@SᴀᴍOnᴇᴌᴀ Guten Taffen?
@user is that "Good guys"?
No, I just looked up the German word for monkey, and then somehow accidentally added an "n"
Guten Tag :P
1 hour later…
5:18 PM
Q: Split if a field has reached over limit number

ProtractorNewbieIm currently working with discord with Python 3.9.6 where I am trying to create a embed based on how much text I have. According to discord: +-------------+------------------------+ | Field | Limit | +-------------+------------------------+ | title | 256 characters ...

Prashanth Chandrasekar on August 02, 2021
It’s a big day at Stack Overflow! Our Prosus deal has closed and our latest Dev Survey is live.
6:09 PM
What's the question? This seems like it's more a code review request, which if so should be placed in codereview.stackexchange.comgilliduck 19 secs ago
6:32 PM
That's probably better suited at codereview.stackexchange.comA_A 31 secs ago
6:45 PM
You might have better luck on codereview.stackexchange.com on how to streamline your code — aynber 43 secs ago
@aynber 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 code above would likely be closed as off-topic because it is missing context. — Sᴀᴍ Onᴇᴌᴀ 59 secs ago
Q: Remove duplicated multiline blocks in text

ccpizzaA quick and dirty line-based approach for detecting duplicated text blocks. Did not find any references as to what (deterministic) algorithms are there for detecting duplicated text blocks, so went with the most straightforward way: take the biggest possible text block starting from fist line + 1...

IMO any(start_date := d for d in (date_a, date_b, date_c, current_date)) should never pass any sane code review — juanpa.arrivillaga 48 secs ago
1 hour later…
8:15 PM
Q: How to make a NodeJS + ExpressJS API bulletproof?

Bernard BI just started to code my first API, I'm very excited about it and looking for some advice & feedback to make my code better and secure. I thought my code is perfect as long as I called my API for the second time. The second request got data from the previous request, that's why I set the variabl...

8:45 PM
Does your code work? If so, you might want to post this on Code Review instead. — Blastfurnace 18 secs ago
1 hour later…
10:14 PM
11:01 PM
possible answer invalidation by Prasad Gavande on question by Prasad Gavande: codereview.stackexchange.com/posts/264473/revisions
@Duga rolled back

« first day (3012 days earlier)      last day (76 days later) »