« first day (3303 days earlier)      last day (138 days later) » 

12:01 AM
REFRESH! There are 8075 unanswered questions (89.3082 answered)
12:36 AM
Q: Binary Search Tree implementation in C++ with templates

NorhtherIm implementing a BST using templates and dynamic memory, here is my attempt: This is the BSTNode.hh #ifndef BSTNODE_HH #define BSTNODE_HH #include <list> #include <algorithm> using namespace std; template <class K, class V> class BSTNode { public: BSTNode(const K &key) { this->key ...

3 hours later…
3:30 AM
Q: Calculating square roots using binary search

cocomacI'm trying to find the square root of a number (num) using binary search in Rust. I'm new to Rust, but I've done quite a bit of programming in other languages, though. I'm more interested in how to generally improve this, as I'm not familiar with Rust best-practices and simaler than I am about th...

5 hours later…
8:23 AM
You might want to go over to codereview.stackexchange.com . You won't get much help here with this kind of questions. — ChemiCalChems 37 secs ago
9:03 AM
I'd recommend you use NotImplementedException alongside //TODO: Finish implementing this comments and "outsource" the added verification step to a CI/CD pipeline and code review. Automatically reject pull requests if a NotImplementedException or a TODO (without explanation as to why the todo should be merged) or a failing (new) unittest is found. Much more automated and as such less likely to result in mistakes than manually adding something — MindSwipe 23 secs ago
1 hour later…
10:05 AM
possible answer invalidation by Jay on question by Jay: codereview.stackexchange.com/posts/276678/revisions
possible answer invalidation by Jay on question by Jay: codereview.stackexchange.com/posts/276678/revisions
10:42 AM
A question like this is better suite for the code review community. However, if you post this question there, make sure the code is more complete, to make obvious what its purpose is. — KIKO Software 45 secs ago
2 hours later…
12:14 PM
This community is for questions on programming, it is NOT for reviewing existing working code. See codereview.stackexchange.com for that (but make sure to really check their help center and instructions in case you decide to ask there). — GhostCat 56 secs ago
1:04 PM
Q: Ballerina service resource methods

user272735I'm playing around to find out idiomatic way to write service resource methods for HTTP API so that the actual program logic is separated from the resource methods. Currently the (simple) program logic is located in the following function: function impl(string family, int? amount) returns Allowed...

1:53 PM
Q: Avoid a stream() inside a stream()

Victor CuiI have the following code. private List<MarketplaceSubCategory> getTagsFromRecordsForCategoryType( MarketplaceCategoryType category, List<MarketplaceOfferWithSubcategoriesRecord> records) { return MarketplaceSubCategoryType.getSubcategoriesForCategory(cate...

possible answer invalidation by Damian on question by Damian: codereview.stackexchange.com/posts/276616/revisions
@Duga Changed example data, don't think there was any AI.
2:18 PM
Q: std::array based push-only circular buffer

SdraMinimal implementation of a circular buffer based on std::array, where elements can only be pushed and iterated. I'm interested on potential failures and very trivial optimizations, as I'd like to keep it as simple as possible. #ifndef CIRCULAR_BUFFER_H #define CIRCULAR_BUFFER_H #include <array>...

2:43 PM
Q: Program to calculate average in C

manungsaI made a program that will loop and calculate the average of the input given by the user. There are no problem here. I just want to know if there is a better way to do this, or a way to optimize this code. How this program works: First, the program will check a double and a separator in a forever...

2:54 PM
You can see from my Code Review account to see exactly how good I am at programming, I know I am far from the best programmer, but I only learned programming in a year and half and it is really just a hobby, but I am a fast learner and I really did gave my 100% into it. I have such a low reputation on this site, is not because I am incapable of programming, but it is because of my extremely low social skills, I really have no friends at all. And this account is not my first account I registered here. — Ξένη Γήινος 52 secs ago
3:15 PM
3:30 PM
possible answer invalidation by Ξένη Γήινος on question by Ξένη Γήινος: codereview.stackexchange.com/posts/276677/revisions
possible answer invalidation by Ξένη Γήινος on question by Ξένη Γήινος: codereview.stackexchange.com/posts/276677/revisions
@Duga wait, that became a HNQ? score is currently +2 with only 48 views currently and 1 answer at +2 🤔
the images do look nice...
perhaps relative to other posts at the similar time frame it stands out
But from the code you have posted here, there are no instances involved except the controls. But I assume you didn't show the full code. There is a ComboBox but no items source is connected in your code. So, don't expect much help by a code review... Use the memory profiler to inspect the heap. — BionicCode 58 secs ago
@Duga anyway, I don't believe there is AI - it appears that the past two edits are additional description
@Duga I believe that is okay - it appears to be in response to a consistency issue mentioned in a comment by @Vogel612
It's suspicious to me that you'd need the mode that is currently not in use outside of the ModeController... — Vogel612 8 hours ago
@Vogel612 oh yes, that's a typo, really embarrassed that I missed that — Jay 6 hours ago
none of the answers appear to discuss the visibility of the method
though there is one deleted answer which could get undeleted, which currently has the method in the former visibility - i.e. public...
@CaptainObvious TIL about ballerina
3:58 PM
Q: Basic Stack Operations using Linked List in C

UltimateI have made a few functions for some basic stack operations using linked lists. Please review my code and suggest some ways to increase its readability. I would also love to hear ideas on how to make my code more compact and simple. #include <stdio.h> #include <stdlib.h> struct node { int da...

4:13 PM
4:48 PM
Q: How can we optimize the below code in java functional style

AaruhiHow can we optimize the below code in java functional style if (nonNull(response) && nonNull(response.getCodes())) { List<String> codes = response.getCodes().get(); if (isNotEmpty(codes)) return of(codes.get(0)); }

5:26 PM
Code optimization is better suited for code reviewCyanCoding 36 secs ago
1 hour later…
6:52 PM
Q: (Godot 4.0) I want my code to wait 1 second then add a value to my money and then wait again... but it won't work

KrakENzBackif upg4Dis == 1: $ScrollContainer/VBoxContainer/Upg4.disabled = true await get_tree().create_timer(1000).timeout money += 1 * multiplier so basically, my problem is that line 3 is waiting once, and after that, line 4 is constantly adding 1 * multiplier to it, when what I want the cod...

7:07 PM
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — gunr2171 35 secs ago
Q: MVVM Architecture in WPF

Rao HammasI'm trying to use MVVM approach in .NET 6 WPF app. I've a simple project that has an object Entity and I have implemented EntityService as data access layer. My project structure looks like this. EntityService.cs public class EntityService : IEntityService { public List<IEntity> GetEntities(...

1 hour later…
8:24 PM
8:34 PM
Sounds like you're looking for Code ReviewsRandom Davis just now
8:51 PM
If you want help improving working code, you should post this on CodeReview.SE. If you do decide to do so, please delete the question here. — NathanOliver 31 secs ago
9:03 PM
If you have working code that you think could be improved, see Code Review, but note you'll need to actually include the code in your question. — jonrsharpe 55 secs ago
9:31 PM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 20 secs ago
I’m voting to close this question because it belongs ob codereview ... — tink 42 secs ago
1 hour later…
10:43 PM
@MickyD None of the answers in those Meta questions support your assertion/conclusion that "questions about code optimisations are off-topic". That Code Review might be a better place to ask an optimization question does not mean Stack Overflow is a bad or unacceptable place to ask the same question. Though this question, in its current state, might be lacking or even off topic due to missing code/details, that the end-goal is optimizing code I don't think is enough, by itself, to make it off topic. — Lance U. Matthews 42 secs ago
10:55 PM
Not that this is a code review, but that resize logic would probably not pass. — Ted Lyngmo 47 secs ago

« first day (3303 days earlier)      last day (138 days later) »