« first day (3560 days earlier)      last day (461 days later) » 

12:08 AM
REFRESH! There are 7470 unanswered questions (90.2446 answered)
 
12:58 AM
0
Q: Uncaught Error: Call to undefined method ComposerAutoloaderInit Laravel 8.12

Sabir RajabovI have a Laravel project that should be deployed on Linux machine and served by Nginx. It runs on PHP 7.4 I cloned project from Git, install vendor packages, and changed .env file for application desired state. But when I try to access website, I got an error: Fatal error: Uncaught Error: Call to...

 
 
4 hours later…
5:21 AM
There is a Software engineering stack exchange and a code review stack exchange for discussions, opinions and best practices. — lorem ipsum 15 secs ago
 
 
1 hour later…
6:25 AM
0
Q: Sorting an array by given hierarchy

B.D LiroyI have a known hierarchy of the organization units, by descending order: $hierarchy = [ "a" => "organization", "b" => "company", "c" => "group", "d" => "unit", "e" => "sub_unit", "f" => "team" ]; I am then given an input key-value array which can consist of any of the uni...

0
Q: Nested switch statement vs tuple switch statement

arun sivaI have a function that returns a result based on two conditions Now I can use one of the following options Nested switch switch Condition1 { case A: switch Condition2 { case 1: return true case 2: return true } case B: switch Condition2 {...

 
 
2 hours later…
8:32 AM
0
Q: Avalonia user control with design time XAML property setter

Sean KearonI am trying to make an AvaloniaUI user control. I want to be able to set a property at design time from inside my XAML files and see the result in the designer in Rider, such as the "Hello World!" text below. The approach I have taken is to add a property to the control that gets and sets the T...

 
 
1 hour later…
9:39 AM
Monking
 
0
Q: Adding classes from a given array or an object

B.D LiroyI want to add classes to elements based on a source array or object. For example, it can be: classesArr = ["class1", "class2", "class3"]; or classesObj = {class1: "class1", class2: "class2", class3: "class3"}; the way I currently do it is: // for arrays classesArr.forEach(className => { ele...

 
10:42 AM
@DBS Sounds like a job for codereview.stackexchange.com :) — Keith 1 min ago
 
11:02 AM
If you dont want to get fired on your first day as JS developer, dont do this. You will get this denied on code reviews — strix25 29 secs ago
 
 
3 hours later…
2:23 PM
This should probably be asked on codereview.stackexchange.com not here — evolutionxbox 5 secs ago
 
3:04 PM
@evolutionxbox the question needs a lot of work before it's suited to Code Review. You could have pointed the asker at A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. we need a good description of the purpose of the code to give context, and question titles should simply say what the code is for (the question is always, "How can I improve this?"). It's important that the code works correctly; include the unit tests if possible. — Toby Speight 43 secs ago
 
 
1 hour later…
4:04 PM
possible answer invalidation by Gisvaldo on question by Gisvaldo: codereview.stackexchange.com/posts/282963/revisions
 
0
Q: Serilog logging extension methods

nopI've been using this extension in almost all of my projects. What's your opinion? Do you think there is something else to add or to be improved? The idea is to ignore all default ASP.NET messages that are there by default and if optionally to override stuff via configuration. I actually override ...

 
possible answer invalidation by Gisvaldo on question by Gisvaldo: codereview.stackexchange.com/posts/282963/revisions
 
4:36 PM
Monking
 
Monking
 
@Duga It appears Reinderien and chux discussed the off-topic -ness in comments on chux's answer
@Reinderien Its a matter of degree. Most code posted on Code Review is non-working in some way. After digging into this, posted what I found, found too much error and stopped. — chux - Reinstate Monica 17 hours ago
 
@Duga Rolled back and commented.
@SᴀᴍOnᴇᴌᴀ The question should really be closed. chux specified the line changed in the answer.
I'm one of the 2 VTC.
 
@pacmaninbw is it off-topic strictly because of that one line?
 
If the question should be closed because it isn't working and a fix is made on the question that would fix the problem, the edit should be allowed.
 
4:43 PM
5
A: Should we allow answer invalidation for otherwise off-topic questions?

HeslacherLet me quote the answer to which @Mast posted a link in his answer: Answers to off-topic questions are already invalid One way to look at this is to say that if a question is invalid, it should be closed and not answered. Answering an invalid question sends exactly the wrong message ...

exactly
 
I'm not convinced a couple of compiler warnings break the code. If their compiler fills in the blanks, it's dangerous code. Sure. But not broken. On their system, it works.
 
No, based on chux's answer there are multiple issues. chux quit after finding 2 many errors.
 
C is the king of undefined behaviour. Some compilers make it really easy to get shitty code to work.
 
LOL
 
Heck, half of early-JavaScript should raise a compilation failure in a decent compiled language. But it doesn't and it isn't compiled anyway.
 
4:45 PM
Probably an online compiler that doesn't follow the standard.
I left JavaScript a long time ago.
@Mast ^^
 
@pacmaninbw For example. I haven't kept up with recent compilers.
 
I haven't really kept up with c
 
These days on both Windows and Linux I compile with the latest C and C++ compilers. On Linux I have to force the latest compiler to be used. The current standard gcc/g++ doesn't fully implement C++20 year, but there is a release version of gcc/g++ that does.
 
5:05 PM
Monking
 
5:27 PM
Which version of the Intel Fortran compiler are you using? You are asking a number questions: why does it crash the compiler (this should be reported, in my opinion, to Intel). Why behave gfortran and Intel Fortran different: in short they are independent and have their own good and weak points. Is there an error in the code, this is asking for a code review and should, probably, be asked at codereview.stackexchange.comalbert 34 secs ago
 
 
1 hour later…
6:39 PM
0
Q: Row-sparse constexpr 2D array, generated at compile-time from array coordinate/value entries

AJMansfieldThe goal of the code is to enable me to express a 2D array in an unsorted coordinate-sparse representation in my code (i.e. a list of individual x, y, value entries in any order), but have this converted at compile-time to a more-readily-accessed row-sparse representation of that array (i.e. an a...

 
@RMunroe Alt text: "If an anatomical structure is named for a person, it means they were the only person to have it. Pierre Paul Broca had a special area of his brain that created powerful magnetic fields, enabling him to do 19th century fMRI research."
I wonder what he'd think about the Broca area then.
 
7:04 PM
0
Q: RGB Image Utility Class

jigglypuff256I am writing a utility class to store RGB images and do a few utility functions as a way to learn C++. #define RGB_H 203 // CHANGE THIS DEPENDING ON THE IMAGE NOTE 1512 before 810 #define RGB_W 360 // CHANGE THIS DEPENDING ON THE IMAGE NOTE 2016 before 1440 #define RGB_D 3 #define MAX_COLOR 255 ...

 
7:55 PM
0
Q: Redesigning OOP-Style Go to Idiomatic Rust

John AllisonI have a lexer (program that turns source code into tokens) written in Go that I am re-writing in Rust. I'd like to write more idiomatic Rust, using non-mutable data wherever possible, but the current 'design' is akin to OOP with a struct mutating itself in most methods. I am struggling to come u...

 
8:51 PM
The question was already answered. Why should I provide another one? A method named deleteAllById which only deletes a single entity and takes a single ID is misleading in many ways. In addition you overload a method of the CrudRepository with a different behaviour. This solution wouldn't pass any code review. I would recommend to read Uncle Bob's Clean Code instead of going ham here over a downvote. — Peter Lustig 8 secs ago
 
 
2 hours later…
10:22 PM
If your code works, the question area is not the place to post it. If you look for a code review, then maybe you should check out Code Reviewtrincot 35 secs ago
 
0
Q: Selecting a node with a minimum number of inbound paths in neo4j -- Performance considerations of aggregates and code ideomaticy

SidneySo I'm playing around with cyper/neo4j as a possible solution to my problem. Essentially it involves creating groups which a user might match on based on user profile fields; an MVC is below. There are is one position: Developer There are is one location: Wichita And there are two groups: Devs ...

 
11:00 PM
You're asking for a code review of code you're not even sharing? Don't bother doing that here, but go over to codereview.stackexchange.com and ask the question there, and don't forget to include the actual code. — Grismar 12 secs ago
 
11:16 PM
Your question is very open, you're basically asking us to come up with ideas for the game for you - StackOverflow is not the right place for that type of question. stackoverflow.com/help/on-topic - come up with some ideas, write some code and please feel free to ask about problems with your code here. If you are looking for a review of code you wrote, the Code Review Stackexchange page is good. — Grismar 1 min ago
 
11:31 PM
@Grismar There needs to be code for the code review community. There is no code in this question. This does not even come close to a question that is acceptable on Code Review. — pacmaninbw 27 secs ago
 

« first day (3560 days earlier)      last day (461 days later) »