« first day (2970 days earlier)      last day (37 days later) » 

12:02 AM
REFRESH! There are 7647 unanswered questions (89.4087 answered)
2 hours later…
2:14 AM
Q: Good practices for a class

OmarI was working in a class, but there are a lot of things that I'm not sure if they're a good practice or not. For example, the => instead of the { }. When should I use it? Also, I'm not pretty sure about the keywords const and readonly. For example, uriImage and key it's something that won't chang...

2 hours later…
3:53 AM
Q: C++20 Coroutine Generator

rafooHere is a coroutine generator class... Just like Python yields. It was a bit tedious to support both co_yield and co_return (should manage the cases flow out of function body and co_return separately) but it works. I wonde if it's ok, especially from the point of view of undefined behavior and me...

4:23 AM
I'd consider posting this under CodeReview rather than StackOverflow... From a personal experience / opinion point, avoiding duplicating what amounts to a few lines of easy to read & understand Linq logic and trying to abstract out and then re-integrate a predicate builder isn't worth losing sleep over. ;) — Steve Py 5 secs ago
4:44 AM
Q: Parallel word recognition in a Non-deterministic finite automaton in Rust

alexfertelI have implemented a simple NFA that recognizes words in parallel. All the code is on GitHub, here. A main recognizes method tells if a word (&str) is recognized by an NFA. Inside this method, I set up a thread pool and a channel and call a recognizes_in_parallel method. The recognizes_in_paral...

2 hours later…
6:23 AM
Q: File Picker Component - React

PrakharCreated FilePickerComponent recently. I'm new to React/Web development. Could you please help reviewing this code - export const FilePickerButton: React.FunctionComponent<FilePickerButtonFCProps> = ({ position, ariaLabel, ariaDescription, disabled, iconName, toolbarButtonI...

6:48 AM
Q: circular queue implementation using structures and pointers in generic form code should be understand by every one using make file in c

Krishna veni Mudamala#queue_put_bulk:# int queue_put_bulk(struct queue_info *queue, char *values, int len); { int i,length; char ch; } #queue_get_bulk# int queue_get_bulk(struct queue_info *queue,char *values,int *len); { int j,len; char * p; } please help me to improve coding

7:13 AM
Q: Python script that makes ngrams

Xeнεi ΞэnвϵςThis is a Python script that generates ngrams using a set of rules of what letters can follow a letter stored in a dictionary. The output is then preliminarily processed using another script, then it will be filtered further using an api of sorts by number of words containing the ngrams, the resu...

7:35 AM
@Duga Rollback by Heslacher
@Duga Example i/o, not program code
Never heard about CodeReview, will check it out. I agree that over-abstraction just adds complexity but in this case I think it would make sense. In this trivial case with just two entities it's easy to maintain the query logic, for sure. But what happens when more properties are added to e.g. Brand and there are more relationships to each entity? The downside would be that as soon something changes in an entity I have to update this query logic on different places through out the codebase. Thanks for your opinion anyway! — Slamdunk 7 secs ago
7:51 AM
@TobySpeight No CV?
8:02 AM
Q: Python PyQt6 populate QTreeWidget with a list of named tuples

Xeнεi ΞэnвϵςThis is a Python 3.9 script that pulls data from a MySQL database and converts it to a list of named tuples and then passing it to PyQt6.QTreeWidget. It has to be a list of namedtuples, because I am going to store lists of tags packed in strings dumped from json.dumps, then using json.loads to un...

If you are looking for review then please post this on the codereview.stackexchange.comPeter Csala 10 secs ago
8:34 AM
I’m voting to close this question because it is better asked on stackoverflow/review for a code review. — Ehvince 58 secs ago
Hi Stelios, As I can see you code is working. So, feel free to ask this question at codereview.stackexchange.com. Check an example codereview.stackexchange.com/questions/210685/…. Most of the times code reviews here are fire! — Thelouras 24 secs ago
9:28 AM
@Peilonrayz Question seems borderline - works for some inputs, takes too long on others. I know that's not what we usually mean by "scales poorly", but it's about acceptable.
@TobySpeight Oh, I just totally misunderstood your message D:
@Peilonrayz Ah, I see I was too terse there. Yes, I meant that the edit didn't touch the code block, but only a code-quoted sample block. Sorry for confusion.
@TobySpeight I think my "example -> off-topic" radar may have been a too eager too :) No problem, sorry
10:26 AM
Got a js zombie 12 hours ago, could use some feedback / votes here
11:21 AM
Q: VBA - Excel add in Convert number to Text currency

NareshNo problem yet with the code. Here is a function that can be saved as add in and used as UDF in Microsoft excel to convert a number to text. For example, 4556.45 to RUPEES Four Thousand Five Hundred Fifty Six & PAISE Forty Five (Defaults being set to Indian Rupee). But the function can be adopted...

12:10 PM
Q: PHP Encryption (Modulo operation)

Art AntonioSo I did this in PHP, post it here so I can get comments regarding this piece of code, there may be some potentials errors or enhancement. <?php $alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z

1 hour later…
1:13 PM
@NullException CodeReview is a better place for this kind of questions. — Lenormju 11 secs ago
1:32 PM
I wrote 100 lines of typescript code that worked just as intended from the get-go :D
2:00 PM
This question is not good fit for SO, move it to code reviewNur 38 secs ago
@Vogel612 Nice, for some reason I find TS soo much easier to write than JS
2:22 PM
Ryan Donovan on June 21, 2021
Open source won. Now, the OSS way of working is making inroads into new territories: the corporate engineering department.
3:04 PM
Q: Conditional color pixel function in Racket

Wondering MindsI need to compare color pixels to determine if one has more pixels than the other color in each pixel. The from picturing programs. This is what I've got so far. I thought it would be straightforward, but when I ran it I can't just compare red with blue and green. ; simplify-colors ;(define gre...

As your code works, you could try: codereview.stackexchange.comfreedomn-m 53 secs ago
tbh, if I was reviewing this code for one of my team members I would initially have an issue with the nested if/else statements but after working through it I would realize this is "sadly" probably the most elegant way of doing it. Part of code reviews is the ability to read and understand the code. In this case... its easy to read and understand. Because its basically "math", it might be good to comment the math calculations so that others will understand it. Otherwise seems fine. — Kenneth Garza 56 secs ago
3:33 PM
I’m voting to close this question because it belongs code review: codereview.stackexchange.comKent just now
@Vogel612 The power of experience
3:53 PM
Q: Q: Paying Debt Off a Year, MIT edX 6.001 U2/PS2/P1

RacketeerHaskeller Write a program to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month. The following variables contain values as described below: balance - the outstanding balance on the credit card annualInterestRa...

4:14 PM
@SimonForsberg et. al- maybe you already saw this but if not, check out the fact at the top of Mayken's answer
A: Should moderators be able to undelete any comment, including self-deletions?

MakyenNote: Moderators can, currently, undelete any comment. However, the ability to do so is, for some comments, only exposed in the stock user interface when looking at all comments made by a user, rather than when viewing deleted comments on posts. That user interface shows only a list of the user's...

2 hours later…
5:52 PM
possible answer invalidation by Andreas Schuldei on question by Andreas Schuldei: codereview.stackexchange.com/posts/263215/revisions
Q: Two dimensional bicubic interpolation implementation in C++

JimmyHuThis is a follow-up question for Two dimensional bicubic interpolation implementation in C and A recursive_transform Template Function with Unwrap Level for Various Type Arbitrary Nested Iterable Implementation in C++. Besides the C version code, I am attempting to make a C++ version bicubic inte...

possible answer invalidation by Andreas Schuldei on question by Andreas Schuldei: codereview.stackexchange.com/posts/263215/revisions
@Duga Technically, yes.
@SᴀᴍOnᴇᴌᴀ And then they changed it.
I'll ping them in a day or so if the answer is still as-is.
5:59 PM
yay real-life
6:40 PM
@SᴀᴍOnᴇᴌᴀ ??? Real life ???
@Malachi The edit involved changing the text above the example config file from A corresponding config file, that changes the value of the port, is to A real-life config file would be this:
@Vogel612 don't know if I believe you .... writing code that works the first time out of the box..... lol jk
@SᴀᴍOnᴇᴌᴀ shouldn't that be redacted? I hope that's not a Real IP
I mean it's easy enough to find those, but they gave an open port number too
@Malachi I believe 10.x.x.x are private
@Malachi FWIW because of the way some of the corner-cases I dealt with are very reliant on race-conditions, most of the code is basically untestable
@SᴀᴍOnᴇᴌᴀ pretty sure you are right, but semi private. aren't they on a LAN or something usually or an internal network
6:46 PM
A: Is it better to use the 192.168.x.x or 10.x.x.x address range for a small business network?

Ben QuickRFC 1918 may offer you some guidance on this. At the end of it all though, you've got to design your network to suit, well, your network. If you've only got ~50 devices on the network, then any /24 ( netmask) will more then suffice What do you estimate your growth to be? Will a /24 ...

3. Private Address Space

   The Internet Assigned Numbers Authority (IANA) has reserved the
   following three blocks of the IP address space for private internets:        -  (10/8 prefix)      -  (172.16/12 prefix)     - (192.168/16 prefix)
I didn't know about 172.16
While the specific 10.*.*.* address might be somewhat sensitive, it's not something anyone can use too easily
Heh before I realized that was a private IP address I did plug it in to geobytes IP locator which I have used before... and saw the map location was somewhere off the west coast of Africa (likely 0,0)
7:18 PM
@SᴀᴍOnᴇᴌᴀ The good ol' private class A, B and C IP ranges
This question isn't good fit for SO, you should ask it in code reviewNur 24 secs ago
I believe this question is better asked on codereview.stackexchange.com. — Andreas 26 secs ago
7:33 PM
@Malachi For all intents and purposes, knowing someone's IP in the,, or space is completely useless.
7:46 PM
Q: How can I rewrite the below parser code in Java

VadymI have simple parser code in java for study project. Could any check how can I improve below code Because I have been thinking about how to improve this code for the last few days, but I couldn't get anything int counter = 0; int cacheCounter = 0; for(Map.Entry<String, File[]> path : queriedCa...

8:00 PM
@SᴀᴍOnᴇᴌᴀ Ye olde Null Island?
@TobySpeight how do they get a buoy to stay in that spot? do they tether it to the Seabed? 16k feet deep?
8:27 PM
@Malachi Cables and anchors, yes.
Halas system:
I’m voting to close this question because it belongs to codereview.se — Timothy Truckle 6 secs ago
They probably use a slightly different but related method for the really deep ones.
You usually don't need buoys in places that deep, so it doesn't happen often.
What exactly is the issue? If the code works as expected but you are just after some performance improvements or optimizations, you might be better off checking in with the Code Review stack. If you're worried about the math of the time difference, that's just straight reading the documenation to know what the output of Now - datTimestart is and debugging — Hursey 11 secs ago
You can either wait for a site admin to move the question (unlikely) or crate account at codereview.stackexchange.com yourself an post the question there again. — Timothy Truckle just now
9:00 PM
Q: detection the selfish node Using awk File

sallyI am working on detection the selfish node based on this equation Using awk File : (Node Communication Ratio) NCR= ((Get Route Request-(Get Route Request-Reply Route Request))/Get Route Request)*100 Is the code correct? BEGIN { ReqCounter=0; RepCounter=0; NCRCounter=0; Normalcount...

I was going to say, that those buoys aren't anchored 16000 feet deep
I am having a bit of an argument with the author of Wrap to a certain column N. First I complained because an obvious typo, then I realized that there are many syntax errors, to that the code cannot compile. The author argues that it is from in interview where you had to write the code on a piece of paper, without the help of an compiler. – Any opinions how to handle this?
> The buoy team at Florida Keys National Marine Sanctuary has installed and maintained buoys as deep as 130 feet and as shallow as 2 feet. Recently, the team made history when they completed the working dive with an all-female crew to 97 feet to reinstall a mooring buoy on the bow of the U.S. Coast Guard Cutter Duane.
@MartinR interesting...
@MartinR My, possibly cynical take, is we're not in an interview now... I'll read the comments and such now
@MartinR I'd say that just because that is what they handed in at the interview that doesn't make the question on topic here.
9:05 PM
I hate interviews where they tie your hands and tell you to write code
I would ask them, is this how I am going to be writing code at your company?
Hi @WaleedNader! Instead of Stackoverflow this would be better asked at codereview.stackexchange.comJNevill 13 secs ago
one place I interviewed at, we talked through how we would write the code and the reasoning. the question for the code was taken at random from CodePex or something like that
which is no longer a site....
@MartinR Closed. I think the comments can stay for now. I'll clean everything else up if the OP fixes the code. I don't know Objective C, so you happy for me to ping you if the OP edits the code and I the question looks fixed to me?
@Peilonrayz Sure. I'm “following” the question and will check possible updates.
Nice, thanks :D
9:18 PM
There's a list of all common errors. You can take the error you are getting and research what it means. Other than that we can't help you unless you narrow the question to a specific problem. If you want a code review then you can ask on codereview.stackexchange.comDharman 34 secs ago
9:41 PM
10:10 PM
@TobySpeight nice
1 hour later…
11:13 PM
Given that your code works and you are soliciting ideas for improvement, this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 5 secs ago
11:54 PM
Q: Win32 Snake game

Jimmy YangI made a trival snake game below to practice my C++ and Win32 programming skills. /* g++ snake.cpp -o snake -lgdi32 -Wl,-subsystem,windows */ #include <deque> #include <vector> #include <cstdio> #include <ctime> #include <Windows.h> #define ID_TIMER 1 constexpr int WND_WIDTH = 500; constexpr...


« first day (2970 days earlier)      last day (37 days later) »