« first day (3098 days earlier)      last day (34 days later) » 

12:02 AM
REFRESH! There are 7877 unanswered questions (89.2917 answered)
 
12:18 AM
Another thing with having C be compile C code, is it's one letter. Not overly descripting (neither is awk, mind you) but for the sake of the poor humans that have to use this stuff, we need to get away from one-letter identifiers. If I'm slapping people around in code reviews for using 1 letter, I'd be a hypocrite if I didn't do the same over a 1 letter program name. — user4581301 29 secs ago
 
 
4 hours later…
3:58 AM
@rayhatfield Probably the Code Review SE semantics of “reinventing-the-wheel”? — Sebastian Simon 54 secs ago
 
4:17 AM
 
4:37 AM
0
Q: C++ Linked List Class Implementation

HofbrFor my class I had an assignment to test the the benefits of a Move-To-Front Linked List vs. Just a standard Linked List. The assignment was meant to practice inheritance and pointers. So the standard functionality is in the LinkedList class and then a MTFList class inherits that functionality an...

 
5:01 AM
Monking
 
5:27 AM
0
Q: (new) Python module: Function but Lazy Python

Jérome EertmansI have recently been working on a Python module and I wanted to have some feedback on it. I hope this is the right place to do so. I really enjoy Python's syntax, except for iterators where I prefer a Rust-like syntax (functional programming) due to its readability. To this end, I began to work o...

 
5:51 AM
0
Q: Convert number from old range to new numeric range

SkullyI have written a function that takes a specific number and a range that number cannot exceed, and converts it to a new numerical range. /** * @param int number The number to adjust. * @param int oldMin The old minimum value. * @param int oldMax The old maximum ...

 
6:25 AM
If you're looking for an actual review of your code then codereview.stackexchange.com might be the place to ask. Be sure to read through their help section to make sure your question is on-topic and includes everything needed for best results. With just a cursory look I see a few things that bug me. — Retired Ninja 30 secs ago
 
 
1 hour later…
7:40 AM
@SᴀᴍOnᴇᴌᴀ I saw no option but to remove it, to prevent it from becoming even more of a mess.
Congratulations to @StephenRauch on getting elected as Stack Overflow moderator!
7
 
 
1 hour later…
8:44 AM
0
Q: What changes are required to this function to suppress C26430 code analysis warnings?

Andrew TruckleSee this method: HRESULT CChristianLifeMinistryHtmlView::CustomContextMenu(const POINT* ppt, IUnknown* pcmdtReserved) { IOleWindow* oleWnd = nullptr; HWND hwnd = nullptr; HMENU hMainMenu = nullptr; HMENU hPopupMenu = nullptr; HRESULT hr = 0; INT ...

 
9:08 AM
0
Q: How to not to use instanceof

MatleyI wnoder how can I refactor my code: protected Map<String, Object> convert(Object entity) { if (entity instanceof A) { return convertToJSONMap(entity, APushDto.class); } else if (entity instanceof B) { return convertToJSONMap(entity, BPushDto.class); ...

 
9:33 AM
0
Q: K largest elements in an array

Vladimir CppI solve problems to prepare for interviews. Now I have written the algorithm of finding K largest numbers in array. Various solutions are described here: https://www.geeksforgeeks.org/k-largestor-smallest-elements-in-an-array/. Initially, I came up with the solution myself and looks my solution c...

 
possible answer invalidation by Toby Speight on question by Barry: codereview.stackexchange.com/posts/127531/revisions
possible answer invalidation by Toby Speight on question by Barry: codereview.stackexchange.com/posts/127531/revisions
 
10:13 AM
Perhaps the Code Review StackExchange site is a more suitable place, although you'll actually need to post your code so that people can critique it. There's not really much we can say in response to this question, as it stands. — canton7 34 secs ago
 
0
Q: Nested try-except for raising exceptions in Python

cuzureauI'm wondering if the nested "try/except/else" structure (in the main function) is a good practice in Python. Right now, the structure is not that deep but I could continue on and on with additional conditions in the "else" part. Is there a better way to implement this ? My code written in main.py...

 
 
3 hours later…
1:03 PM
@Mast Thanks, gonna be very interesting...
 
1:14 PM
@StephenRauch Does "interesting" mean busy?
 
0
Q: Execute a third party API call for every object in my queryset in a Django ListView

atianalisiI have a ListView that displays every customer (class Cliente in my code) of a company. Every Cliente object has a specific id (piva in my code) that is necessary to make a third party API call. My goal was to press a button in the template that makes an API call for every Cliente object in my Li...

 
1:31 PM
i'm not sure if this is more of a codereview.stackexchange question — Vultuxe 7 secs ago
 
@pacmaninbw Yes busy, as well as it appears some may remain salty about the way I got elected.
 
2:12 PM
Prashanth Chandrasekar on October 27, 2021
Organizations and leaders have a responsibility to ensure people are heard, to build high levels of trust and enable them to show up authentically— all so they can do their best work.
 
@StephenRauch Looked to me like you were the best possible candidate.
Can we provide you with a nice big shovel?
Seems to go well with the picture of flags posted in the congratulations message.
 
2:28 PM
@pacmaninbw Thanks, I will see how well that shovel works. There a cadre of folks on SO that are very active, and have strong opinions that they like to share. Many of them also hang out on various Chat Rooms, and get close. I don't chat much. Strike 1. Also recently much of my activity has been on sites other than SO. Strike 2. And then not filling out the "optional" questionnaire. Strike 3.
 
@StephenRauch Personally I think you're a bit too busy to chat. It might be people from the other sites that elected you since you do so much there.
 
2:53 PM
0
Q: How to add and remove a field set from a form?

Chico LindoI want to add and remove fieldsets from a form. The remove() part works great. The add() is wrong and written like that on purpose to indicate that is what I want to change. On the very bottom of this post there is an example from W3Schools that I am trying to apply to this work, but haven't yet...

 
3:18 PM
0
Q: Implementing std::format

upkajdtOne of the most exciting new functions in C++20 is std::format. I have never liked the ways that strings are formatted in C++ and have been guilty many times of using sprintf and such. Since std::format is not implemented by any of the major compilers at this time, I fought I would try out my own...

 
3:30 PM
@StephenRauch It's Stack Overflow, there's always someone salty. Don't worry, you'll do fine.
 
Getting your code checked for security vulnerabilities is not a topic for Stack Overflow. But you could try it on Code Review. — Klaus D. 16 secs ago
Since you have an implementation that works and are asking an open-ended question about improvements, this question would be more suitable to Code Review Stack Exchangeharold 16 secs ago
I’m voting to close this question because questions about improving working code belong on Code Review. — 41686d6564 just now
SO is not meant for code reviews. If you have a specific question, you are welcome. Please read the help on how to ask a good question here. — qwerty_so 9 secs ago
This doesn't belong on Code Review either, at least not in its current form. Nobody should be required to take a guess at where the bottlenecks are. — Jeroen Mostert 8 secs ago
@JeroenMostert That's why the link in my comment is to Code Review's Help Center, which the OP should go through if they decide to post there. — 41686d6564 14 secs ago
 
4:07 PM
0
Q: How to speed up this method side performance

mecab95Hello I have this method that returns an IEnumerable list , it takes 5 seconds to execute , so I want to know how can I optimize it side performance time of response. private IEnumerable<dynamic> GetData(IEnumerable<dynamic> listD) { List<dynamic> data = new List<dynamic>(); foreach (var...

 
4:28 PM
Monking
 
0
Q: Fastapi Session Captcha

Landon PattersonI am testing captcha setups with Fastapi. Currently, I am using an in-memory session (stored in a dictionary. Seems to not be a problem as there is no load balancing, etc...). To fill out the contact form the frontend app makes a request to start a session (thus retrieving the captcha image and ...

 
 
2 hours later…
6:13 PM
0
Q: Calling multiple ACF field - how do I write my code prettier?

user2059370Im using a bunch of ACF fields for my WooCommerce email templates and for this example Im calling these in my email_header template. Im using this with WPML, and need to call each language settings. The code works, but seems like it should be a way to write this better. This is used to set and fe...

0
Q: Java database connection and DAO implementation feedback

ApelliFirst things first, I made a DatabaseConnection-class which connects to the database like so: public class DatabaseConnection { private Connection con; public Connection getConnection() { try { con = DriverManager.getConnection("jdbc:mysql://localhost:3306/todolistdb",

0
Q: Is this a good solution to "Shortest Word" kata on codewars?

Chris OkwakolSo the kata/problem was: "Simple, given a string of words, return the length of the shortest word(s)." Example test: findShort("Bitcoin will maybe save the world") And my solution was: function findShort(s){ // convert string to array const strArr = s.split(' '); // loop throug...

 
6:37 PM
0
Q: How can I optimize this pairwise Euclidean distance search algorithm?

Никита Михалков x and y are two-dimensional arrays with dimensions (AxN) and (BxN), i.e. they have the same number of columns. I need to get a matrix of Euclidean distances between each pair of rows from x and y. I have already written four different methods that give equally good results. But the first thre...

 
7:02 PM
0
Q: Changes to make prime factorization work

sznailcI have prime factorization function, but it starts to work wierd with numbers from 30, like 40, 100, 120 etc. Adds some additional powers. Example: 30 >> 2 x 3^2 x 5. 100 >> 2^2 x 5^4. 40 >> 2^3 x 5. How do I change it to work well? Before that functon in main() I have stated to print 1 if input ...

 
7:51 PM
0
Q: Simple item and inventory system in C#, my first actually competant looking piece of code as a beginner. Really proud of it

MesalonItems.cs, Creates dictionaries, enumerators, and classes for every type of item. using System; using System.Collections.Generic; public class Item { // Medical public static Dictionary < Medical, ItemMedical > Medicals = new Dictionary<Medical, ItemMedical>() { { Medical.bandage, new...

 
@Duga is now back after a short power outage
 
8:09 PM
@A.Hendry Ironically, that realpython article is clearly wrong. The current Qt5 and Qt6 QThread docs show both approaches, and do not recommend either one. That blog post is merely one person's outdated opinion. A colleague wrote a countering article (You were not doing so wrong) which eventually resulted in the current docs being revised so as not to discourage the sub-classing approach. — ekhumoro 49 secs ago
 
@SimonForsberg right on
 
8:33 PM
You might want to ask this on codereview.stackexchange instead — David Brossard 35 secs ago
This is a good question, but as currently phrased maybe not the best fit for Stack Overflow. Consider checking whether it is on-topic on Code Review or Software Engineering, and if so, ask there instead. — TylerH 48 secs ago
 
9:30 PM
0
Q: Split an array into multiple arrays that start with 1 and end with 100

Harshit DangI have an array which will will have equal number of 1s and 100s and some elements between 1 and 100. Think of 1 as start and 100 as end : [1,2,3,100,1,2,100,1,100,1,2,3,4,100] I have to break the array into List of multiple arrays that start with 1 and end with 100. Output: {[1,2,3,100], [1,2,1...

 
10:19 PM
0
Q: Remove redundant loops

a aI have the following Abstract class: class ADrawableNode : public sf::Drawable { public: ADrawableNode() = default; ~ADrawableNode() = default; ADrawableNode(sf::Vector2f size, sf::Color color); void setSize(sf::Vector2f size); ...

0
Q: Best way to design React component architecture regarding handlers?

nickSo a coworker and I were discussing the best way to write React components, taking into account: readability, developing time, performance. Suppose we have a medium size component: i.e: 400 lines. I proposed doing something like this: Folder structure MyComponent ├── MyComponent.js ├── MyComponen...

 
11:09 PM
1
Q: How to make my Collatz Conjecture code run a lot faster? (and even better, how do I implement it into multiple computers?) Python

Friendio1I have been writing this piece of code for a while now, and I was wondering, is it possible to run this code multiple times on my pc? For example could I make the code solve all the numbers from 1 to 1000 and all from 1001 to 2000 at the same time? And, if this is possible, could I use multiple c...

 

« first day (3098 days earlier)      last day (34 days later) »