« first day (2826 days earlier)      last day (1174 days later) » 

12:00 AM
RELOAD! There are 7289 unanswered questions (89.6313% answered)
 
12:42 AM
0
Q: Adding a new class property == new API version?

taylorswiftfanI have the following code: public class Car { public int numberOfWheels { get; set; } public string colour { get; set; } public Car(int numberOfWheels, string colour) { this.numberOfWheels = numberOfWheels; this.colour = colour; } } [Route("/")] public class ...

 
1:07 AM
0
Q: Multiple services with common code that gets a map and sets objects' prop using the map data

JamesI have the following service class: @Service @RequiredArgsConstructor public class AutoVendorNameService { // client of a 3rd party web service private final AutoClient autoClient; public void setAutoVendorName(ReportCars cars) { // autoVendorNamesById: ca...

 
 
3 hours later…
3:44 AM
This question would be better on codereview.stackexchange.comthethiny 8 secs ago
 
4:10 AM
There is much here that is inefficient, inelegant, or wrong, but if the code works you should post this on Code ReviewTangentially Perpendicular 17 secs ago
 
4:58 AM
Monking
 
 
4 hours later…
9:00 AM
This question belongs to Code Review. — Letsintegreat 57 secs ago
 
0
Q: Best practice to change item based on RoomDB value before inserting it using Kotlin

Igor MytyukIn my App i use Room database and i have three tables where two of them are connected. The app just save the user input and insert it in the database. The user actually just insert as input a code and quantity but before inserting that value in my table i have to check if there is in another tabl...

 
9:44 AM
Is this a request for a "code review"? Or do you have any problems and you cannot fix them yourself? Either way you need to add a minimal reproducible example in the question itself, and in case of a code review it might be a case for -> Code Review Stack ExchangeAndreas 40 secs ago
 
10:23 AM
0
Q: Pandas avoid for loop in transformation

AnkI have a pandas Series contain 0s and 1s. Now I want to convert all the 0s to 1s which come before the first 1. I can achieve that using the below code: import pandas as pd a = [0,0,1,0,0] df = pd.Series(a) for i in range(df.shape[0]): if df[i]!=1: df[i]=1 else: break print(df) But h...

0
Q: Writing Fitbit API data to database - MYSQLi PHP

Tim MThis PHP script utilizes the Fitbit API to connect to Fitbit to save user active minutes, steps, heart rate, and nutrition data to a MYSQL database utilizing MYSQLi. This file is run by crontab every night and it is also run from the user's browser if they want to update their data displayed in t...

 
11:03 AM
I agree that goto is bad practice in this case. However, it is not always bad practice. See these links for further information: 1 2 3Andreas Wenzel 10 secs ago
 
11:35 AM
This question is more appropriate for Code Review. — Ouroborus 44 secs ago
 
12:11 PM
I agree that goto is bad practice in this case. However, using goto is not always bad practice. See these links for further information: 1 2 3Andreas Wenzel 34 secs ago
 
12:29 PM
0
Q: code for checking prime or not with long long int

Deepak Silver//this code checks the number is prime or not using long long bool isP(ll n){ if(n == 2LL) return 1; if(n%2LL == 0LL) return 0; for(ll i=3;i*i<=n;i++){ if(n%i==0); return 0; } return 1; }

 
I agree that goto is bad practice in this case. However, using goto is not always bad practice. See these links for further information: 1 2 3Andreas Wenzel 42 secs ago
 
1:22 PM
Greetings, Programs.
 
1:35 PM
To fun to not share! Headline-translation: "The program can cause damage to the computer"
well it is windows....
 
2:15 PM
@Mast @SᴀᴍOnᴇᴌᴀ This was planned maintenance, the replaced one wooden pole and at least 3 transformers as well as trimmed trees back.
What were you suggesting rocks for?
 
I don't think this question is answerable on StackOverflow. Maybe cseducators.stackexchange.com or codereview.stackexchange.com but even then I think you'd want a specific project and the project requirements laid out. — Freiheit 13 secs ago
@Freiheit CodeReview is for review of working code, not just ideas — jonrsharpe 57 secs ago
 
2:36 PM
0
Q: Testing Code That Has Time Delays

AxemastaWhilst refactoring an app I'm working on I moved a piece of code from the business logic layer to a helper. The code in question is a fire and forget method that will execute a piece of code if it hasn't been cancelled after an amount of time. The method looks like this: public async static void...

 
@CaptainObvious Not real code
 
2:52 PM
@Donald.McLean What's missing? OP has said it is real code.
 
@pacmaninbw There are at least three blocks that have comments "// do something" instead of the actual code.
 
I was under the impression that stubs were specifically called out as not allowed.
 
I agree.
 
0
Q: Create Table After Deleting Rows Before Desired Range and Filter to Delete All Other Unnecessary Rows

Bob the BuilderThe code below first searches for the first searchText and deletes all rows that precede it to establish a range for a table object. Once the table object is created, it's filtered by unnecessary fields. After ensuring the searchText is in the first row (header), it deletes all visible rows below...

 
3:17 PM
@SᴀᴍOnᴇᴌᴀ - thank you, I will read the content of those links. Briefly saying - it is not a proper place for asking a code review, right? — CompactSpaces 50 secs ago
 
-1
Q: how I compere these three arrays and make one array by finding same values

user236833$label= array("January-2021", "December-2020", "November-2020", "October-2020", "Sepetember-2020", "August-2020"); $graph_ex = array( array("label"=>"January-2021", "expense"=>'7000'), array("label"=>"December-2020", "expense"=>'5000'), array("label"=>"November-2020", "...

 
@CaptainObvious I think the OP is asking us to write their code.
 
3:40 PM
@opensource-developer Stick a catch on that line and just log it, then your error goes away. To be completely frank your code is wickedly confusing and you should go back to the drawing board. You say, "it works" but it doesn't "work". Can you imagine if a bug showed up and you had to go back into this code? You'd sooner want a root canal. Check out codereview.stackexchange.com if you need help. — Adam 37 secs ago
 
3:51 PM
0
Q: How to detect screen orientation change in React Native?

Abdo RabahI'm using Video from expo-av to display my videos. My goal is to display the video depending on the Orientation of the device of the user. I'm using ScreenOrientation from expo-screen-orientation so i can detect the rotation using the addOrientationChangeListener function. I tried my code below ...

 
4:15 PM
@pacmaninbw Probably. Closed.
 
Monking
@pacmaninbw it was supposed to be sarcastic - maybe I should have used different style - e.g. used italics .... it might make sense if you read the XKCD comic it linked to
 
@Heslacher Windows warning you about Windows, classic.
 
4:47 PM
What does that code mean? A failed code review in any environment that cares about readability, maintainability, reliability, and actually preventing bugs. Remember that anyone saying that code is acceptable has never been responsible for being on 24x7 call for anything important. — Andrew Henle 57 secs ago
 
Monking
 
5:20 PM
@SᴀᴍOnᴇᴌᴀ :)
 
Here’s a question I posted that got buried: codereview.stackexchange.com/questions/255255/…. Each question I post that doesn’t get answered, I’ll post here once.
 
@my_first_c_program As long as the question is unanswered, you can still add the modifications mentioned in your comment to the actual code.
Just make sure it works again with the new revision too.
 
@CompactSpaces the links were meant for ekhumoro in an effort to not have users vote to close just because a question is on-topic on another site. Honestly after reading this meta answer I don't feel its worth continued discussion. To answer your question- generally code review questions are seen as too broad for Stack Overflow and need more focus - e.g. a narrowed/specific problem or issue that the user is facing — Sᴀᴍ Onᴇᴌᴀ 27 secs ago
 
@Mast I’ll do it if it still doesn’t get answered. And after that I guess I’ll just assume it’s fine.
 
5:35 PM
If you have already working code, and ask for possible improvements, the Code Review site is more suitable for your quesiton. — πάντα ῥεῖ 32 secs ago
Looks like its a question for Code Review. — D-RAJ 33 secs ago
I know it is not good to have such a deep nested route. But the client wants it that way itself. I tried with the one have suggested but after code review, ppl rejected the code telling that it should be handled in the active admin resource itself. — sgk 19 secs ago
 
@my_first_c_program Maybe somebody already mentioned it but in case not, please read What should I do if no one answers my question? as well as relevant meta posts like How long does it usually take to get code reviewed on this site?
(sorry for multi-ping - markdown formatting can be challenging)
 
6:01 PM
If there was a way to check that it was going to be compiled as a dll / so / dylib or not, I would be able to shorten it to only two files. But I couldn’t find anything about how to do that.
otherwise I would edit that as an improvement too
Is there a way to do that?
 
6:13 PM
@my_first_c_program Try and find out?
 
I’m saying I don’t know of any way to do it
 
If it really works and there is no issue, please consider posting it at Code Review. — Wiktor Stribiżew 1 min ago
I’m voting to close this question because it is a better fit for Code ReviewIgor 47 secs ago
If your code works fine, then format your quesiton to fit the rules of codereview.stackexchange.com and post it there. StackOverflow is generally for getting help with issues that prevent your code from working. — Random Davis 43 secs ago
I’m voting to close this question because it might be more suitable for Code Review SE site — Amessihel 7 secs ago
 
0
Q: What are good practices when it comes to write out data?

amousI have 4 csv files that i need to process (filter out Part segment and then merge them) but the problem is that they do not fit in my memory. So i decided to: [open - filter - write out] each one of theses 4 files and merge them after reopening the filtered version. I learned that it was good pra...

0
Q: python looping through rectangular array

a point in Standard StudentsIn the following code, i,j is going through the 5 by 3 array. At each step, I print N[0][0], I'm expecting out the printouts at each step for N[0][0] to be the same, because N[0][0] is only assigned once (at-least that is what I expected). Apparently sometime went wrong, I could not figure out wh...

0
Q: MSD radix sort (force avoid div or idiv compiler instruction) in C++

leixorI was trying to optimize the Radix Sort code, just because. Nothing more, nothing less. Here it is!!!. So tell me, how it looks. summary: insted of a div or mod y use left shift and right shift to avoid div or idiv compiler instruction. the dual instruction is for avoiding jumps and the usual s...

 
6:29 PM
@Igor 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, which happens frequently. — Sᴀᴍ Onᴇᴌᴀ 13 secs ago
 
61
Q: Checklist for how to write a good Code Review question

Nobody moving away from SEMany questions of new users lack some parts or common style of the site. There already are some meta questions that aggregate tips on this issue but letting new users walk through all of them is probably very discouraging. Instead I would propose to make a community wiki question and answer wit...

75
Q: How to get the best value out of Code Review - Asking Questions

rolfl I have a project I am working on, and I would like some, or all of it reviewed, how can I ask for this review on Code Review in a way that produces the best possible value? This is not about a question being on-topic, or off topic. Rather, this is about making on-topic questions great questions...

I feel like the current title of your latest question is a little long - perhaps removing the first five words "C++ program which lets you" would help - obviously it is tagged with so that doesn't need to be in the title
 
6:48 PM
0
Q: C-SCAN program in C

devinThis is a c program for C-SCAN disk scheduling algorithm. Except for the basic things I have not really understood the logic used. Can you explain the logic? #include<stdio.h> #include<stdlib.h> int main() { int queue[20],n,head,i,j,k,seek=0,max,diff,temp,queue1[20],queue2[20], ...

 
@CaptainObvious "Except for the basic things I have not really understood the logic used. Can you explain the logic?" => AOC
 
@SᴀᴍOnᴇᴌᴀ ok I did it, thanks
Anyone lmk if they know of a way to check whether or not a file is going to be compiled as a dll / so / dylib. That’s something I can edit in as an improvement if it’s possible to do that.
 
7:14 PM
-1
Q: How to reduce the time complexity of this grid function?

LisaDHow can I change this python function to get an equivalent result that runs as fast as possible? The time complexity of O(n³) takes a huge amount of time to calculate the obstacle map. I'm glad about every hint to improve the running time, including a version of this code with numpy arrays. def c...

0
Q: Select/read .csv files in time range from folder

iMS44 I have folders with .csv files with naming format: XXX_2021-01-28_18-52-37_XX.csv I want to find and read only files from certain time period. The code I have at the moment works fine, but for folders with 10.000s of files it takes too long (minutes) to process. My structure at the moment: 1 - ...

 
7:47 PM
@MadPhysicist In the current form the code above would likely be closed as off-topic on Code Review because it seems a bit too hypothetical. — Sᴀᴍ Onᴇᴌᴀ 13 secs ago
 
8:04 PM
0
Q: Nintendo Nightmare [any%] Speedrun Bot (17:37)

user64742This is a long review to get into, and as of writing this portion I suspect it will be about a week before I actually finish writing this question. I say to forewarn anyone that my description here is my attempt to summarize what is going on, but I am likely missing crucial descriptions necessary...

 
Sara Chipps on January 28, 2021
We’ve got big things planned. And small things. So much stuff. Check it out!
 
8:27 PM
@Feeds Talk is cheap, show us the progress.
3
 
8:55 PM
0
Q: Pygame Hangman with random + themes

Irkl1_import pygame import os import random import time pygame.init() WIDTH, HEIGHT = 1400, 775 WIN = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Hangman") IMAGE_WIDTH, IMAGE_HEIGHT = 400, 600 HANGMAN_POSITION = (80, 50) colors_txt = open('colors.txt', 'r') color_lst = [(c...

0
Q: Codewars Kata 'Sum of parts'

Aditya GuptaThere is a challenge on codewars that I'm doing and the code passes the basic tests but as I submit the code I get Execution Timed Out. I have read some blogs on how to make your code even more efficient, but I cant seem to simplify the code anymore. Basically you need to find the sum of recursiv...

 
9:19 PM
This might be a better fit for codereview.stackexchange.com, if your code is working fine and you just want to improve it — C_Z_ 1 min ago
 
@Mast there's a public announcement of a roadmap for the review queue changes, they mention a new hire for the CM team ...
 
9:39 PM
@Vogel612 The new editor looked cool too. Also congrats to all of you getting extra steward badges soon
 
9:50 PM
Hmm 🤔
21
Q: Steward badges being re-awarded suddenly?

Rand al'ThorI suddenly got four Steward badges re-awarded on SFF. I actually earned these between 2016 and 2020, but now they're awarded twice (?), and the old ones say: for 1000 reviews, over 200 actioned in the old review system There's an "old" review system??? A glance at the "Recent Badges" sidebar on...

10
A: Steward badges being re-awarded suddenly?

Brian NickelThis has been fixed. All the duplicate badges have been deleted. This was caused by a temporary issue related to the rollout of Visual design changes to the review queues. As part of that project, we are changing steward badges from being awarded once per queue at 1000 to be awarded per queue e...

TGTBT perhaps
 
36
Q: Visual design changes to the review queues

Lisa ParkThe Public Platform team would like to announce another release in a series of planned work for the Review queues. This release focuses on refreshing the queue user interface in preparation for further improvements to the user experience. Starting today, we will roll out these changes in three ph...

 
> Asked today
Active today
Viewed 297 times
Hotness 1229%
 
Perhaps post on code review. Might get additional good feedback. I see about 4+ points to consider. — chux - Reinstate Monica 53 secs ago
 
I got a tag badge notification on SFF the other day for a badge I had earned years ago.
 
10:07 PM
Posted. This is my first question on that site: codereview.stackexchange.com/questions/255344/…. — Gabriel Staples 59 secs ago
 
@Donald.McLean There's a bug with tag badges atm
Looks like the bugs been fixed and the metadata has been fixed again :D
 
0
Q: Avoiding redundant code using tkinter

grrfieldI'm trying to devise a tkinter gui, that, among others, lets users choose a 'working folder' and a 'destination folder (and there is more coming). I stripped the code to its bare functionality hereunder. I found myself duplicating code for the selection of both the 'working folder' and the 'desti...

0
Q: case-insensitive `strncmp()` for ASCII chars only (not UTF-8)

Gabriel StaplesHere's what I came up with. What improvements might I make? Note that I want readable and maintainable code, NOT optimized code which is impossible to read. From: https://stackoverflow.com/questions/5820810/case-insensitive-string-comp-in-c/55293507#55293507 This is a direct drop-in replacement f...

 
This looks like it would be more at home on Code ReviewCallum Watkins 52 secs ago
If this code works, and you're simply looking for peer review to see if it can be improved, you should be asking at Code Review instead. It was created specifically for that purpose. You should make sure you read that site's help center guidelines before posting, to make sure you're asking the question appropriately. — Ken White 56 secs ago
 
10:22 PM
@Peilonrayz Interesting. Well, I've only got three tag badges on two sites, so it isn't really a big deal. Though I am just a handful of votes away from a second tag badge here on Code Review.
 
@CaptainObvious Needs some work such as adding header files and including all relevant code.
OP wants us to explain the code in this question
 
No, I take that back - I forgot that the user stats lump questions and answers together, so I'm way short of the tag badge just on the answers.
 
@pacmaninbw true
4 hours ago, by Sᴀᴍ Onᴇᴌᴀ
@CaptainObvious "Except for the basic things I have not really understood the logic used. Can you explain the logic?" => AOC
 
@Donald.McLean Yeah that makes sense. I'm surprised you've got nearly 20k on SFF but you don't have many tag badges. I'm quite happy cause now I've got my joint 1st gold Python 3 badge with 200 back :D
 
@SᴀᴍOnᴇᴌᴀ I did vote up your comment.
 
10:31 PM
@Donald.McLean Is that Scala? Looks like you're pretty close 92/100 and 16/20
@pacmaninbw 🔨
 
🔨 🕙
 
Nice answer you have on money.SE there, @Kaz
 
10:55 PM
@Peilonrayz 🚫👈❓
 
Apparently I'm too old to read sign language.
@SᴀᴍOnᴇᴌᴀ @Peilonrayz ^^
 
Kaz
I just got this accepted as an answer too. Which I was, uh, not expecting. money.stackexchange.com/questions/79717/…
And cheers @SimonForsberg. It seems to have turned out rather well :)
 
@Kaz lol, hadn't even seen that one
 
Kaz
@SimonForsberg Apparently, past me had the same idea. Moral of the story: Always turn your comments into answers. money.stackexchange.com/questions/79717/…
 
11:08 PM
@Kaz Yup, I do wish there was an option to flag a comment as "It's an answer, not a comment"
 
I know it isn't the same but I have an auto-comment for that
 
11:20 PM
@SᴀᴍOnᴇᴌᴀ That's no stop sign! Whenever I think of stop signs I always think of the Jack Black octagon meme...
@pacmaninbw I edited a link in, but apparently emojis don't underline...
 
@Peilonrayz I was going for "Can't Touch This" (-‸ლ)
 
0
Q: Big Sorting - Performant Sorting

MilliornConsider an array of numeric strings where each string is a positive number. Sort the array's elements in non-decreasing, or ascending order of their integer values and return the sorted array. Return: string[n]: the array sorted in numerical order. Constraints: Each string is guaranteed to repre...

 
@SᴀᴍOnᴇᴌᴀ Oh 🤦 I think I can see why we didn't use emojis to talk since the Egyptians...
 
@SᴀᴍOnᴇᴌᴀ thanks for the Can't Touch This link. I like that song.
 
possible answer invalidation by mickmackusa on question by user1180592: codereview.stackexchange.com/posts/8502/revisions
 
11:30 PM
@Duga fine
 
11:52 PM
0
Q: What would be the most Pythonic way to output a formatted string containing newlines?

leopardxpreloadWhich of the following (or other solutions) is the most Pythonic way to output f-string formatted strings containing newlines? Multi-line f-string This seems less pythonic as it is hard to read with the misaligned lines. def newline_formatted_str_para(a, b, c): return f"""this will be a={a} t...

 

« first day (2826 days earlier)      last day (1174 days later) »