« first day (3176 days earlier)      last day (846 days later) » 

12:00 AM
REFRESH! There are 8002 unanswered questions (89.2374 answered)
 
 
2 hours later…
1:47 AM
@CaptainObvious Possibly this should be migrated to SO.
 
 
2 hours later…
3:59 AM
0
Q: Optimize Laravel query builder join multiple table

CattoI have a query that joined many table at once, for now it's OK without any performance issue (only less than 100 data in the database). But I'm scared that it will cause some trouble when the data in database become large (ex: thousand of data). I'm doing join in the same table to get attendance in

 
4:23 AM
You are an absolute rockstar. This is amazing. Where did you learn this beast, regex? I'm realizing the power regex can provide to things like code styling, code review, and other handy dev tools. Was hoping you might have a clue on where I can get a more solid foundation with regex. — Ian Ferrier 53 secs ago
 
4:56 AM
If during a codereview I would find code like this I would not accept it. And I would say, split the logic in readable small inline functions or at least add extra ( ) to clearly describe intent. So my guess is someone is trying to teach you en.cppreference.com/w/cpp/language/operator_precedence doesn't mean this is good code. — Pepijn Kramer 58 secs ago
 
5:44 AM
0
Q: Optimize the data adding process to datatable from excel file

Tamal BanerjeeI'm creating a simple windows form application containing a combo box, a text box, a datagridview, a button and some radio buttons. The idea is upon the form loading the combo box is to be populated with the data of a specific column ("Party") of a source excel file. Then when a valid item is sel...

 
5:59 AM
Monking
 
 
3 hours later…
9:10 AM
0
Q: Is my way of handle user input with Regex the right way?

allenScenario I've got a one-line user input command that I need to handle and breakdown with regex. Example: In 7:00 pm In MM/DD, This is suppose to check in on a certain day In 23:11 In -1 Current day minus 1 day In 7:00 pm -1 Yesterday 7 pm In @user 7:00 pm -1 generate a time for a @user Any of t...

 
If you're just looking for general feedback on your code, check out codereview.stackexchange.com , but please take @deceze feedback into account an explain what your code is supposed to do a little clearer. Codereview expects you to post your complete code, not snippets like on here, read their help 'how to ask' section. — JeffUK 57 secs ago
 
9:40 AM
@luk2302: Fellows on CodeReview will also reject that question for the very same reason it is a bad question here: without knowing what is the input all_rows parameter, this question cannot be answered. Furthermore, (in either site) a magnitude order of the size of data probably matters, because some tools are relevant for tiny data, other for medium size and still others for huge size. So please do not post that on CodeReview and do not blindly advise to post poor questions there. — Serge Ballesta 29 secs ago
 
10:19 AM
This questions is based on opinions, you might want to take a look at codereview.stackexchange.com. Thats being said, it's indeed a good solution. — Robin Dillen 44 secs ago
 
10:44 AM
If your game works and you just need some help in improving the code, you could post it to Code review Stack Exchangeuser2314737 33 secs ago
 
0
Q: Flask-SQLAlchemy 1 to many relationship better approach

H BCurrently I have two tables Plan (plans) and User (users) and there is a foreign key constraint on users which references plans.id When I create a new user I want to assign a plan to that user via plan.id Here is how I am currently accomplishing this but I do feel there must be a better approach ...

 
 
2 hours later…
1:17 PM
@user2314737, the question needs work before it's suited to Code Review. You should 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 does (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 48 secs ago
 
1:29 PM
1
Q: invocable_traits v5

Diederick C. NiehorsterGoal: implement traits that for anything callable return its arity, return type and the argument types. Since pointers to data members are also callable, those should be handled (and be considered 0-arity). Code below, try here for MSVC and here with clang. It does not work with trunk GCC because...

 
1:39 PM
Ok, i have gone down the permutation road (adding const and ref for each argument, all permutations) trying to find an appropriate overload given a set of provided types. It has the limitations you predicted, but its something codereview.stackexchange.com/questions/272935/…Diederick C. Niehorster 1 min ago
 
2:21 PM
0
Q: function to retry n times until success

gidiwe2427I want to make a function to retry calling callback n times until it return TRUE; Here's my current code: function RetryX(callback, delay, retries) { (function wait() { if( callback() !== true && --retries > 0 ){ setTimeout(wait, delay); } }()); } Question...

 
Happy New Year to all!
 
2:38 PM
Monking
 
this question is best asked here : codereview.stackexchange.comtsamridh86 44 secs ago
it's better post this question hereSimone Rossaini 16 secs ago
 
2:56 PM
Juan M on January 13, 2022
One of our most loved traditions is Stack Gives Back. Every year since 2009, we’ve surveyed Stack Exchange moderators about charities they would like to support and then donated $100 on behalf of each moderator.
 
3:13 PM
1
Q: Ocaml add index to every item of a collection

RUser4512I want to add a unique ID to every element in a collection (before output it as a JSON object). A collection can be any set of items, as long as it has a map method implemented (Array, List and other custom collections such as trees comply with this requirement). (** For a collection 'a t returns...

0
Q: Vue JS - Error : Property 'xxxx' does not exist on type <component-name>

TnhhaamuvR hI'm new to vue, So, to describe my work: I implemented a form and bound it to the data() hooks to retrieve the data from the from, and then onSubmit() I create an object newClass{} and $emit it to parent component and to be manipulated later. It works fine, but on the console I get error regardin...

 
 
2 hours later…
4:57 PM
0
Q: Blocking call to an async function

MilosWhile migrating to structured concurrency it may be sometimes convenient to temporarily make a blocking call to an async function - e.g.: let x: Int = try blocking { try await Task.sleep(nanoseconds: 1) return 5 } print(x) I have this implemented like so at the moment, but I'm not in lo...

 
possible answer invalidation by Jason Leaver on question by Jason Leaver: codereview.stackexchange.com/posts/272899/revisions
 
Monking
 
5:12 PM
Monking
 
5:27 PM
@jcalz yes but codereview normally kick me out if it's not a full program they can test...I will rephrase. Thanks for the peaceful comments. — Minsky 39 secs ago
 
5:58 PM
possible answer invalidation by Jason Leaver on question by Jason Leaver: codereview.stackexchange.com/posts/272899/revisions
 
6:22 PM
So what is your question exactly? Code review? The code looks incomplete, you have 3 classes, but only instantiate one which is not related to the others. The extract thing from ExcelParser looks weird, when using pandas you'd want to avoid iteration with for loops. Try to_json or to_dict instead. Also you have a file_name variable which you expect to behave as a pandas dataframe... and you also put it in quotes. No one can help you if you don't know what you want from your program. — M.F. just now
possible answer invalidation by Jason Leaver on question by Jason Leaver: codereview.stackexchange.com/posts/272899/revisions
 
6:41 PM
0
Q: Looking for improvements in multiple F# solutions

anthonytimmersAfter doing about 50 Project Euler problems in my "native" language (C#) I decided to redo some of the problems I did many years ago in F#, as it's a language I always want to give a go. Judging from the code review meta it seems this is okay to post here: Project Euler Solutions My question is ...

1
Q: Pandas rolling evaluation

RUser4512I want to perform some calculations over rolling periods of a pandas DataFrame and to abstract all this in a dedicated class. The job of the class below is simply, given backward and forward looking parameters to slice a column, perform some calculations and append the results as new columns of t...

 
7:05 PM
@Duga Can't tell, too many edits. I asked the answer provider to check.
 
@pacmaninbw thanks - its been a busy morning here - meetings, then trying to release hotfixes after a code update last night
 
0
Q: List comprehension : Add new element in a list

alexisI have a list and I want to made some manipulation on it. This my list : data_two = { '2021-12-05': [['Mesure 1', { 'valeur': 0, 'name': 'User 2' }, { 'valeur': 22.6, 'name': 'User 1' } ],['Mesure...

0
Q: Graph Implementation with Dijkstra's Algorithm

GodLikeGraph Interface: import java.util.*; public interface Graph<T> { boolean addEdge(T src, Edge edge); boolean removeEdge(T source, T destination); boolean addVertex(T vertex); boolean removeVertex(T vertex); void printAdjacencyList(); List<Edge> getNeighbours(T verte...

 
@SᴀᴍOnᴇᴌᴀ Aren't you supposed to do any bug fixing before you release the code, or does the code in the field need the fixes?
 
7:42 PM
I think this belongs on Code Review. — Herohtar 26 secs ago
 
7:53 PM
@pacmaninbw yes but then there are often almost always edge cases that didn't get considered when a story was written or implemented and we currently don't have a dedicated QA person/team :/
 
@SᴀᴍOnᴇᴌᴀ Ahh, requirements creep!
 
8:50 PM
0
Q: Nelder-Mead optimization in C++

IEatBagelsI've implemented the Nelder-Mean optimization algorithm in C++. I found this document to be a very good explanation of how the algorithm works, but I'll try my best to explain it (with an example) here so it's clear for everyone. The problem I'm trying to optimize is very simple : I'm trying to f...

 
This question should be asked on the Code Review site. — Jab 54 secs ago
possible answer invalidation by parv on question by parv: codereview.stackexchange.com/posts/247616/revisions
possible answer invalidation by parv on question by parv: codereview.stackexchange.com/posts/247616/revisions
 
9:42 PM
0
Q: how to write a more consice code solution for this python problem efficiently?

KaylaIs there a more optimised way?? how to improve this? help out, below are screenshots of the coding problem import sys def findEarliestMonth(stockPrices): total1=0 total2=0 for i in range(len(stockPrices)): total2+=stockPrices[i] minnet=sys.maxsize month=0 for i ...

 
10:06 PM
I wouldn't mind a C# expert taking a look at my new question. It is a follow up on my previous question.
 
0
Q: Follow Up: Refactored C# Tool to Generate MS Word Document Mailbox List From MS Excel

pacmaninbwBackground Some very good observations were made about my original code in the 2 answers to this question. In the this version I have attempted to reduce cyclic complexity and class coupling even more as well as improve maintainability. The worst offenders of maintainability are now Visual Studio...

 
10:34 PM
0
Q: Kotlin not call statement in .flow.map { pagingData -> ... } .insertSeparators

UmAnusornWhy hasCustomEntity = true is never use or call while the next statement HealthDiaryListItem.Separator("Custom Entity") has been called? I question is how to call hasCustomEntity = true Is there anything to do with .flow .map { pagingData -> pagingData // Ma...

 
@Duga The question was closed a year ago.
 
10:50 PM
@NicolBolas: for all use cases? The invocable_traits library i wrote originally started to solve the problem that I had a user-provided callable, and i needed to know what its input arguments and return type are. Since that is in the callable definition, a bit of template programming could pull them out (if not overloaded or templated). That use doesn't require the user to specify argument types (if i understand your point correctly)? — Diederick C. Niehorster just now
 
@Duga Rolled back, one of many times. Maybe lock the question?
 
11:15 PM
@pacmaninbw I locked it
 

« first day (3176 days earlier)      last day (846 days later) »