« first day (2601 days earlier)      last day (1714 days later) » 

00:00
RELOAD! There are 6751 unanswered questions (89.8981% answered)
00:17
This may be better suited to Code Review, but it is definitely not "opinion based" on Stack Overflow, so I'm voting to reopen. — pppery 39 secs ago
01:01
0
Q: ReadAsync: Continuously reads stream and spits out Packets and Fill incomplete Packets

Johnny Camargoi have difficult when : 1: sometimes game client send a list of packet in the same buffer and need split it before processing ( but it's not the biggest problem sometimes in the list of packets any packet dont comes complete exemple let's say all packets have same size of 1000bytes and then reciv...

Since your code is fully working, but may or may not require some improvement, I'd suggest you use Code review stackexchange instead of SO. — PajLe 58 secs ago
 
2 hours later…
02:58
0
Q: The isalpha() library function is not inline, is it a better option to rewrite the function inline?

user226263I have this code: static inline int DirentFilter(const struct dirent *Entry) { register const unsigned short Len = (unsigned short)strlen(Entry->d_name); return Entry->d_type == DT_REG && IsAlpha(*Entry->d_name) && IsAlpha(Entry->d_name[1]) && (Len == 7 || (Len == 10 && Entry->d_name[2] =...

03:09
Thank you for all your comments. I think it "Code Review Checklist" will work for me. — Nguyên Thành 47 secs ago
@Duga false positive
This should probably go on the code review stack exchange instead of here — Sean 8 secs ago
03:28
Thanks Sean! I wasn't aware of that forum. I have opened a question there: codereview.stackexchange.com/questions/244018/…Elron 54 secs ago
possible answer invalidation by Jess Lim on question by Jess Lim: codereview.stackexchange.com/posts/243961/revisions
@Peilonrayz That c question looks like the style of this question stackoverflow.com/questions/62401536/… and this question codereview.stackexchange.com/questions/243951/… and the user hasn't created an account.
It is also a dumb question as pointed out by the answer chux gave.
While I was the first VTC I wasn't the first down vote, I suspect the first down vote was chux.
@pacmaninbw I don't understand you point, the one on Code Review has been well received. Additionally whether a user even has an account (migration) or it's unregistered shouldn't matter.
@pacmaninbw Up or downvote anyway you wish*, I'm just confused about the CV
The user that wrote the other 2 questions was removed yesterday.
The CR question was no well received and the user edited my rollbacks twice.
A moderator cleaned up the comments.
03:43
I'm going off SE's definition of "well received". If you think that there's something fishy with then you'll get much better results from a flag.
I raised one the other day, it was declined in the end. But I'm happy the mods looked at what could have been a problem.
2
Q: JavaScript function that flips brackets direction

ElronI have these strings: )hello( this has ]some text[ flip }any{ brackets even with )))]multiple[((( brackets As you can see, the brackets are all in the wrong direction. I have a function called flipBracketsDirection() for each string. Here is an example of input and output of the above strings: f...

I'm gunna leave it open cause it doesn't seem off-topic to me.
04:28
Doesn't sound rude does it?
Welcome to Code Review! Posting simplified code can under very rare circumstances be ok, but in addition with using different domain objects makes the question IMO off-topic. Hence I vote to close because it's not fair to afford a great amount of time to review the code in question, e.g telling you that it isn't necessary to have a generic Car and it would be easier to just pass the manufacturer to the Car's ctor and later on being told that the real code is different. — Heslacher 59 secs ago
@Heslacher Seems fine to me, but that probably doesn't count for much.
Hmm, I think it's off-topic too, your comment addresses it well
Thanks. Got a little bit rusty with comments hence I wanted to ceck ;-)
04:57
0
Q: Racket code to find missing ranges

George MauerI'm doing some toy problems in a variety of languages and wanted to do the following in Racket Lisp. Given a sorted integer array nums, where the range of elements are in the inclusive range [lower, upper], return its missing ranges. 0, 1, 3, 50, 75 Lower: 0 Upper: 99 Expected Output: ["2", "4->49

05:30
Assuming you are talking about score.txt file. You can refer implementation at Link. — pcsutar 31 secs ago
05:46
@Heslacher Sounds fine.
06:25
If this is working code and you want improvement suggestions then codereview is a more appropriate site for this question. — kaylum 6 secs ago
06:47
No onebox? sigh
> Porsche: Introdcuing [sic] the new Porsche, with more buttons than ever.

> Me: Aren’t you concerned the UI for the car can never change with a software update?

> Porsche: That’s okay, we have no clue how to do a software update
 
1 hour later…
08:05
0
Q: Secure/Bulletproof Image Upload Using PHP

markfizHere is my code that check and upload an image to my website. Is this code really secure? anything i have to add to this code to make it more secure?, i have also blocked execution of PHP in images folder using php_flag engine off in .htaccess of images folder. I can also move images folder out ...

08:28
0
Q: How do I end my game properly for hangman python

user226273When the first time the player choose to end the game it stop nicely however, if they choose to continue playing and want to end the game second time, it have problem ending the game. can someone help? if guesses > 6: #game over lost hangman_graphic(guesses) print("Do you want...

0
Q: ATM Bank project Python

OpalFor my ICT homework, I have to set up python codes related to ATM function. Needed it to actually work. The below is the function required to set up : User to set pin number first Login with a pin number (3 attempts only) Balance checking Withdrawal with minimum RM 20 in account Fund Transfe...

08:47
i think you could learn a lot when you post your (working) code on codereview - thats the place to get such feedback (i would answer it on that stack) — Martin Frank 22 secs ago
Generally speaking, we shouldn't be using exceptions to control the flow of an application. This question might be better suited in the code review exchange. codereview.stackexchange.comJack hardcastle 13 secs ago
0
Q: Handling multiple try-catches in a for loop

boomfireGood day! I would like to know if this is possible to be refactored into a cleaner code. The reason I'm doing it like this is to catch the column that the error appeared on and then potentially output the column name and value for the client to view later on. // Make the name act as the key and t...

09:18
This looks like a question that should be asked at: codereview.stackexchange.comVincent 48 secs ago
If you want a code review, you have to post this question on... well.. codereview. This is the site of the Stackexchange network dedicated to that. — Cid 31 secs ago
possible answer invalidation by Saad on question by Saad: codereview.stackexchange.com/posts/243996/revisions
CSV files and guessing datatypes, always fun.
Ordinarily I'd specify the values of the columns, but I have 260 columns today.
Memory will have to suffer, shrug.
@Duga Rolled back.
10:03
0
Q: Simulate sliding range selector with string values

yunzenI need to have a range selector that accepts string values instead of integer value. This is not possible with standard HTML, so I needed to simulate one by using (hidden) radio buttons that are coupled with the range selector and change the label of the range selector accordingly. My code is a b...

10:21
If you dont get an error, then the question is better suited for the code review, not SO. codereview.stackexchange.comKostas K. 6 secs ago
10:35
0
Q: Is it OK to cross post here and in SO?

yunzenThis is the dedicated realm in SE to post questions about reviewing one's code. But this is not a SE site that has many members in comparison to SO. The possibility to have this code review helped with is much higher on SO than it is on Code Review. So I want to know, if it would be bad manners, ...

Please include it in your question, not in a comment. And if the only issue is speed, then your question belongs in Code Review, not Stack Overflow. — braX just now
11:12
@JLRishe Yes I would be very interested to see what improvements could be made. I must warn that I am an absolute novice at coding and this code is copmletely Frankenstein-ed together. I'll try to get it on code review but right now all descriptions are in Dutch and without descriptions it is hard to track through I think. Also have to check it for proprietary information. I'll try and do it today and let you know! — ThomasW 7 secs ago
0
Q: How to refactor to avoid manual fields updating between structs and other redundant code

Fred HorsI'm using GraphQL and go-pg and I have many times functions like these: func (db *postgres) Update(context context.Context, id int, input types.PlayerInput) (*types.Player, error) { var actualPlayer types.Player newPlayer := graphqlToDB(&input) tx, err := db.Begin() //handle er...

11:37
0
Q: Lock free ring buffer

PeteI am hoping that someone can take a look at my implementation of a lock-free ring buffer and critique the implementation. I'm hoping that the focus can be of the correctness of the atomic operations and thread safety. The buffer is implemented as a single producer/single consumer ring buffer, an...

11:55
@Feeds No.
1
Q: How to make this query better (e.g. avoid repeating subquery in a query)?

TimStack Exchange provides access to query their MS SQL databases. They have a table Posts where each post is either a question or an answer (see the schema on right hand side in https://data.stackexchange.com/unix/query/new). I saw a query for questions answered by more than three 50k users (https...

If you're in a hurry: I think the question might get better response from codereview.stackexchange.com which is a sister site to SO which helps with optimizing/enhancing code for people. Strictly speaking SO is more for "I have X problem that I don't know how to solve", but in your case the code is working and those people over at CR might give faster responses. But as I mentioned, I might come back here in a few days and post a suggested solution as I value Pyglet quite a lot and like to see people continue using it. — Torxed 59 secs ago
@Torxed Code Review can't accept this if the code is not included in the question itself. Links can rot. — Mast 21 secs ago
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 10 secs ago
12:44
@Mast You look like a one man army today :O
@Peilonrayz Sometimes it feels like that as well.
@Peilonrayz Just wondering, did you see the threat in the edit history? codereview.stackexchange.com/posts/244016/revisions
@pacmaninbw No, I did not
1
Q: XML Tree Reformatter requested code. C#

ThomasWSo this is a post as per request in a different post on stack overflow: https://stackoverflow.com/questions/62412713/why-does-my-c-sharp-xml-code-only-work-when-i-enumerate-variable-enumerable. The goal of this code is to re-format an XML-file containing a treeview of a sort of folder structure. ...

@pacmaninbw Thanks for the heads up, closed and on my shit-list.
12:50
@Mast It's also flagged for moderator attention.
At least there's people in the queues nowadays. That has been much worse a few weeks back.
13:11
-1
Q: IndexError: index 5 is out of bounds for axis 0 with size 5 while using recursive function in python

WejdeneCan someone help me fix this problem ? i'm writing a recursive function and i didn't find why i get such an error: def invertCollapsedBlockMatrix(collapsedCovarianceMatrix, nTimes,nGenes, noise): #collapsedcov mat is a column vector, nT=4 if nTimes<=1: invertedCollapsedBlockM...

@CaptainObvious Sometimes hanging out in the second monitor means you don't even have to go into the queues.
13:35
0
Q: Meme (title with picture) exchanger

MironProject structure without code: Packages: Classes in packages: In ConfigConstants I store path to folder, where I save pictures. Also in WebConstants I store URL of Servlet. Here is mySQL script for creating db: drop database meme_exchanger; CREATE SCHEMA `meme_exchanger` DEFAULT CHARACTER SE...

@pacmaninbw Oh yes, sometimes I 'review' a question straight from chat.
Looking at your code, i don't see a private function (although you could have private function). There is a difference between a function and a property. I suspect you will come across it at some point. Also, as your query is not because you have an issue with your code, you might want to post this in Code Review site — Zac 56 secs ago
14:16
Put another way: encoding/json does not support multiple struct fields for the same JSON key. You'll have to do this yourself, either by implementing UnmarshalJSON, or by unmarshaling into one field and copying to the other yourself. However, I would very very strongly recommend a thorough code review, because there should be no situation where you actually need the described behavior if the design is correct. — Adrian 59 secs ago
14:40
Codereview would be a better place to ask such questions. An even better idea would be to seek help at architecting first (before you have written a single line of code). — Sinatr 37 secs ago
14:52
Greetings, Programs.
Greetings
0
Q: PHP Status class : pattern or anti-pattern

benjaminhullI want to abstract some code which does a bunch of checks and returns a boolean - since I am using the business logic in several places. But I also want to get back the reason why, if it was returned FALSE. I have this in mind... class ContactCanBeContactedCheck { public $not_contactable_reas...

0
Q: How to implement FizzBuzz with functions

Mohammad Zuhair KhanI am new to coding and so I was trying out some common problems. After watching Tom Scott's video on FizzBuzz, I tried implementing both techniques (if-else and adding strings) in python. Now I wanted to improve it further and I thought that instead of repeating some lines, I could define a funct...

Yaakov Ellis on June 17, 2020
If you have been active on the Stack Exchange network (especially the Meta sites) or have been a reader of this blog for any significant amount of time, you will see the term Community used quite often. But who is a member of the Community? Why is the Community important? The answer to this will probably depend on who you ask.
15:21
0
Q: Nested For loops taking too long

Chris H.I have built a covid model using uva data. Currently that data is unavailable so I'm using another source. The new source is, of course, a differnt format. So rather than refactor all of my model macros, I'm formating the new data in the old format on import. The new data looks like this. The xl...

15:39
read the consumer- producer desigin pattern — yaodav 59 secs ago
0
Q: Using std::function to write a function that returns a function

Fede2424Our C++ professor told us to practise the use of std::function, lambda and pointers to functions. He asked us to: Write the function std::function<bool(float)> interval(float low, float high). The function should accept two values low and high and should return a function. The function returned...

16:08
0
Q: Takes a list and return a dict of distinct values pointing to a list of index locations of each value

CarbonI came up with a way to get a dict of distinct elements in a list pointing to the location of each element; it works, but I feel pretty awful about this code, it's very ugly. Is there a more natural/pythonic way to do this? from itertools import groupby sample_data = [1,2,3,3,1,0,5] give_groups =...

0
Q: jQuery dropdown using each

JeffersonCan someone please review the code and suggest any improvements / changes? Note that this method works but wanted to see if there is a better way for self learning purpose JavaScript/jQuery. Example https://jsfiddle.net/tjmcdevitt/Lx0vnb89/4/ var AppType = [ ['All'], ['API'], ['AWS'],...

0
Q: Custom crossplatform extended Ascii converter

infinitezeroProblem/Background: I want to support only some special unicode characters for my program (greek letters and some math operators). C++ provides a char type, which is always 1 byte in size. Obviously, this is too short to display all characters. Normally this is solved by choosing an encoding like...

16:22
Monking
16:55
0
Q: Alphabet Rangoli Challenge

Gobinda DebThe question is about printing alphabets in a rangoli pattern of size/dimension inputted by the user. Example: size 3 ----c---- --c-b-c-- c-b-a-b-c --c-b-c-- ----c---- The picture contains details about the challenge OR https://www.hackerrank.com/challenges/alphabet-rangoli/problem Sample Code:...

0
Q: The conversion from UTF-16 to UTF-8 manually

Lion KingI have created a function that converts from UTF-16 to UTF-8. This function converts from UTF-16 to codepoint firstly, then from codepoint to UTF-8. void ToUTF8(char16_t *str) { while (*str) { unsigned int codepoint = 0x0; //-------(1) UTF-16 to codepoint ------- if...

17:18
0
Q: How can I use a wrapper on my variables while organizing variables into arrays?

BrianI'm using a wrapper on my variables so that I can use functions to change them later: var firstItemXCoordinate = {value : width-2}; var firstItemYCoordinate = {value : 1}; ... function randomlyIncrement(i) { i.value = i.value + (Math.round(Math.random()) * 2) - 1; } ... randomlyIncrement(firstIte...

BTW, your coding guidelines would not pass a professional code review. Macros for abbreviations are discouraged; take a keyboarding class if necessary. Variables should be named for a purpose, excepting loop index variables. In order to read your code, I have to take an identifier (name) then check your abbreviation list, then go back to the code location. — Thomas Matthews 34 secs ago
17:56
Hey tucuxi, I'd love to select your answer as the correct one because I think its the most readable and still works perfectly, with small performance issues. Can you post your answer to this post as well? codereview.stackexchange.com/questions/244018/…Elron 48 secs ago
18:21
@Torxed I didn't know about the code review StackExchange, thanks for the suggestion! I've gone with the GitHub because you need graphics in order to run the code, also it's a bit longer code, but I thought it was necessary to post it as it was. And I'm not in a hurry at all! Take your time, make a tutorial from it or whatever. It's true that the only tutorials for Snake I could find were for simple Snake. I thought about making tutorial myself tbh if it woked properly that is. Nobody seems to bother with more complex Snake. I think Snake is a great game to get into more complex Pyglet though. — Teasin951 1 min ago
0
Q: user password is stored securely or not? is there any other major issue with this code?

Gourav ThakurI am developing a social networking website to share pictures with family and friends. People need to register to this website in order to share their pictures. The front end has already been developed using the Model-view-controller (MVC) architectural pattern. I need someone to review it before...

19:24
0
Q: How can I use the State monad effectively in Haskell?

OrestisI have written a simple fibonacci function in Haskell that uses the State monad to save solutions to overlapping sub-problems. Now despite the function working I am not really happy with the solution, especially with the last map lookup. How can I improve my solution? Thank you. module Lib ( ...

0
Q: Example of why IReadOnlyList<T> is better than public List<T> { get; private set; }

Rick DavinEarly today, I gave an answer to someone where I recommended using IReadOnlyList<T>. Then I was asked why not just use a private setter, e.g. public IList<T> { get; private set; }? This was not an entirely unexpected question. I provided a small example as an update to my answer. However, my ...

Lisa Park on June 17, 2020
We’ve heard from our users that the inability to say “thank you” is frustrating—especially for new users who don’t have enough reputation to upvote or comment. Even when users gain these privileges, they still want to say “thanks.”
19:48
1
Q: Simple-ish Rust implementation of 'cat'

onContentStopI've seen some other implementations of cat (even in Rust) on this site, but none attempted to completely implement the GNU cat CLI as far as I can tell. This version that I am developing is complete (minus the -u parameter that is ignored by GNU cat anyway) and, as far as I can tell, works. Some...

@Feeds Why not just allow people to up-vote on their own posts...
3
@Peilonrayz No kidding
> We hear you, you can't say thank you, instead of giving you the ability to upvote and downvote any response to your own post regardless of reputation we're going to add a whole new thing so you can say "thanks" without having any meaningful impact on the person you are thanking.
20:06
If it's implemented I can see there being comments like: "Please don't just click the clapping hands if you want to thank me, please click the up arrow above them."
Or people will just stop answering questions from low-rep users even more than they already do.
I don't really care all that much either way, it's just another absolutely useless decision being made for the wrong reasons so they can say "look what we did!"
I agree with that 100%
Unfortunately SO is not a place to ask for opinions, maybe codereview.stackexchange.com is the most suitable place. — eyllanesc 44 secs ago
I feel as though this should be on codereview.stackexchange.com and that some of the choices are very opinion-based — user120242 57 secs ago
20:25
Monking
20:44
Is it a CommonMark thing that allows my multi-line code span to overflow the width of the comment container?
Unfortunately now the indentation error is moved down a few lines - see this sample which yields line 8 df = df[0].str.strip(' \t"').str.split('[,|;: \t]+', 1, expand=True)... ^ IndentationError: expected an indented block Sᴀᴍ Onᴇᴌᴀ 9 hours ago
Monking
@SᴀᴍOnᴇᴌᴀ That's so odd. Wat
I’m voting to close this question because it belongs on codereview.stackexchange.comMad Physicist 30 secs ago
1
Q: Callback C++ Class method from C

mmcblk1I am trying to callback C++ class methods from C. Now I have got something working, but am not sure if this is the best solution. I am looking for feedback, as to if there is something wrong with this approach, and how could I make this better. So, here goes my code: This is the C++ class Foo. Th...

0
Q: Using method trait to return something in laravel model

Muhammad Dyas YaskurI have question about scope yesterday, and someone gives an answer to don't return anything in scope. Is return something in scope really bad practice? Should I not return anything in the model except query? Rather than scope, I want to create a normal method to return the select2 format. I have...

21:00
@MadPhysicist While this may be on-topic on CR in the future, please don't use the existence of the Code Review site as a reason to close a question. Evaluate the request and use a reason like needs focus, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see Does being on-topic at another Stack Exchange site automatically make a question off-topic for Stack Overflow?Sᴀᴍ Onᴇᴌᴀ just now
@eyllanesc In the current form this post would not be on-topic on CR because the OP mentioned "if I call the get_data method twice in a row I get an error". See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 47 secs ago
21:17
@Peilonrayz while they may have already heard it, you (or somebody) should comment on that Feeds post with that suggestion...
21:39
I recently noticed the edit button in a close container, and this makes sense:
84
Q: Now that the Edit Question button for closed questions is more prominent, it's time to stop non-OP edits from submitting to the reopen queue

Ryan MThe closed question notice was recently changed to display an "Edit question" button prominently in the lower left hand corner (in addition to the text link in the body of the message): This seems like a positive change overall - many posters today will delete and repost questions rather than ed...

@SᴀᴍOnᴇᴌᴀ it is already mentioned on SO meta
1
Q: What is the benefit of the reaction in a answer?

VencovskyQuestion: What is the benefit that SO will have with reactions in a answer? Why have a reaction the way it is? Context: I'm not 100% sure of this, but one of the reasons that I see a lot of people answering questions on SO is to get the score (I confess that when I started answering on SO, I only...

0
Q: Python - Predicting the probability of 6 Heads or Tails in a row from a set sample size

MahdeenSkyI'm wondering whether there is a way to make this even more efficient or reduce the number of variables. import random numberOfStreaks = 0 results = [] head_streak = ['H'] * 6 tail_streak = ['T'] * 6 sample_size = 1000000 for i, experimentNumber in enumerate(range(sample_size)): # Code that c...

@SᴀᴍOnᴇᴌᴀ that is about to get closed as a duplicate of this
-52
Q: Feature test: Thank you reaction

Lisa ParkWe just announced a new feature test for the "thank you" reaction on The Overflow blog. We discovered that “thanks” appears in 1 of 6 comments left under answers. Although it’s less common on questions, the percentage of “thanks” comments have continued to slowly increase over the last few years....

22:09
0
Q: Web Scraping Tennis Data in Java

cloudy_eclispseSo as a starter Java project I decided to web scrape some data (specifically all historically No. 1 ranked players for weeks starting from 1973) from the ATP website, and do something with it (IPR). I'm in the process of refactoring my working web scraper and wanted some feedback. Currently my s...

22:28
hehe:
also "Downvote but thank" — Jean-François Fabre ♦ 1 hour ago
0
Q: Ideas for code state improvement

DavidGreen55I'm reading data from file line by line and adding it to the list_clipboard_values. Then data from this list will be written to the Entry Widget(Tkinter). Number of entries are 15. Important to mention that file can contain: 15 strings that is ideal situation. More then 15 strings that can cause...

22:56
0
Q: Python - Making A Valid Date Checker - using Regular Expressions

MahdeenSkyDate Detection: Write a regular expression that can detect dates in the DD/MM/YYYY format. Assume that the days range from 01 to 31, the months range from 01 to 12, and the years range from 1000 to 2999. Note that if the day or month is a single digit, it’ll have a leading zero. Then store these ...

0
Q: Analog Clock in AEC

FlatAssemblerguys! I've made a simple terminal-based analog clock for Linux in AEC. Here we go: Syntax GAS ;This is yet another example of how to target Linux using GNU Assembler. AsmStart ;What follows is code produced by GCC 9.3.0 on Linux, I don't understand much of it either, and it's not important. ....

23:12
@Derick, don't get discouraged by down votes, asking for help is in general ok. If it is a working code a better place to ask for assistance in improving it might be codereview.stackexchange.com and get constructive criticism there — predmod 56 secs ago
@predmod 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, and it almost sounds like a request for users to rewrite the code. — Sᴀᴍ Onᴇᴌᴀ 32 secs ago

« first day (2601 days earlier)      last day (1714 days later) »