« first day (2632 days earlier)      last day (1384 days later) » 

12:00 AM
RELOAD! There are 6831 unanswered questions (89.8602% answered)
 
12:48 AM
1
Q: Composable monadic std::function using std::optional

hyperdeliaI've implemented a simple Maybe type around std::function that implements function composition where any function in the composition can fail (causing the entire composition to fail) - in essence, a Maybe monad where operator<< implements bind. For example, // one binary function that cannot fa...

 
1:12 AM
1
Q: What would be the best way to compare two bytearray in python?

Dipayan MajiI have a 'first bytearray' with some hex values with, lets say 30 bytes. On the other hand 'second bytearray' is having 8 bytes of hex data. now if i want to search 'second bytearray' in first one, what would be the best way to do in python? Aside to this, can i search the 'second bytearray' in s...

 
 
1 hour later…
2:22 AM
I’m voting to close this question because this question is more suited to the Code Review Stack Exchange siteFluffyKitten 11 secs ago
 
 
1 hour later…
3:36 AM
0
Q: Find the available squares for rooks in empty board using boolean arrays

3sm1rI will describe two techniques, then the question will be how I can make an algorithm that is more efficient, if possible. I want to find an efficient way to determine the squares where the pieces on a chess board can go. I want to start with a simple case, and just find the square where two rook...

 
4:00 AM
0
Q: GUI application that shows all prime numbers

PeterI am new to programming, so I don't know that much... I am trying to make a GUI application that shows all prime numbers when the user inputs two random numbers in two different textBoxes and results need to show in the third textBox, now I have a code I don't know if it's good, but it works. The...

 
 
3 hours later…
6:35 AM
if (this->denominator == fraction.getDenominator()) -- could just be: if (denominator == fraction.getDenominator()). Specifying this-> all over the place is not a good habit to get into, since it indicates the newness of the C++ programmer, and could reflect negatively in things like code reviews. There are certain cases where this-> is required, like in templates in some situations, but your case is not one of them. — PaulMcKenzie 59 secs ago
 
6:49 AM
0
Q: A simple error messaging and logging system via macro(s) in C++

Francis CuglerI'm just trying to build a quick and crude error messaging system. It currently looks like this: #include <exception> #include <fstream> #include <iostream> #include <string> #include <sstream> #include <map> enum MsgTy { OK = 0, WARNING, ERROR, CRITICAL, }; class FileWriter { ...

 
7:37 AM
-2
Q: Can someone define main() method of the below code.The code below shows the class definition for a stack with no race conditions

user4096285The code below shows the class definition for a stack with no race conditions in the interface and that implements options 1 and 3: there are two overloads of pop(), one that takes a reference to a location in which to store the value and one that returns a std::shared_ ptr<>. It has a simple int...

 
Why don't you post it on Code Review? — brc-dd 33 secs ago
@brc-dd I wasn't sure which of the two sites were appropriate for this type of question... truth be told, I did post the code there, but the questioning is different. On Code Review, I was asking if any improvements could be made and other feedback. Here, I'm asking if there are any unforeseen side effects or bugs. — Francis Cugler 19 secs ago
 
 
2 hours later…
9:38 AM
This is a Really bad pattern to adopt for SQL. You should consider generating results in SQL that make sense in SQL, then having a transformation layer in your application. I would not allow this through a code review. — MatBailie 45 secs ago
 
10:01 AM
0
Q: Simulated WeakReference class

Cristian BuseI've created a fake WeakReference class for VBA by chance. A Weak Reference is not counted (i.e. IUnknown::AddRef method is not called). I knew about the Weak Reference concept from Swift and I accidentaly read about a COM Variant. In short, I am using a Variant (ByRef) to manipulate the first 2 ...

 
 
2 hours later…
12:00 PM
0
Q: If else logic not working as expected

piyush jainI have tried to use a basic if else logic but it seems it is not working as expected. outcome = "heart attack" if (outcome == "heart attack") { colnum <- 11 } else if (outcome == "heart failure") { colnum <- 17 } ##else {colnum <- 23} x <- coln...

 
12:33 PM
Monking
@SᴀᴍOnᴇᴌᴀ It's migrated, but we don't have a great Matlab presence.
 
It's hard to give criteria that a correct answer would have to satisfy. In particular, where do you want to improve efficiency? Where is most time spent? This question may be more suitable to codereview.stackexchange.com. As a new user here, also take the tour and read How to Ask. — Ulrich Eckhardt 12 secs ago
 
12:51 PM
Two suggestions: Use multiprocessing instead of multithreading. Research "reserved identifiers" for C++. Also, try to focus on optimizing one part of your code base first. Lastly, you say "stdin" is lightning fast. I have the suspicion that you're comparing to doing file IO the wrong way, in which case stdin obviously wins. I would suggest that you submit some of the code to codereview.stackexchange.com as well, there are lots of things off and/or unusual. — Ulrich Eckhardt 15 secs ago
 
Sooo, MSO has a new tag: election-withdrawal.
Did anyone have that on the 2020 bingo?
 
1:45 PM
You should split the recursion like in this post: codereview.stackexchange.com/questions/207314/…Yvain 57 secs ago
 
2:19 PM
I'm more surprised at how many people are ready to die on that hill.
 
2:32 PM
@DerKommissar Yea, apparently there was a bit of a faction war going on.
 
possible answer invalidation by 3sm1r on question by 3sm1r: codereview.stackexchange.com/posts/245649/revisions
 
Monking
 
@Duga I wouldn't call that an answer.
 
 
2 hours later…
4:19 PM
@Mast What happened? Yvette was getting critical responses and left emotionally?
 
0
Q: File parser for csv and xls files

AnveI made program for parsing CSV and XLS files, I just want to know if there is some space to improvement and is it all written good? My goal is when I got CSV or XLS file to parse that file and got list of objects for specific class, besides of getting list I made metod to populate datatable and s...

 
4:48 PM
0
Q: Naive Solver of Matrix with Periodic Boundary Conditions Feedback

vloveroI am creating an \$O(n)\$ solver for an \$Ax = b\$ system where \$A\$ has the form \$ A = \begin{pmatrix} a_1 & b_1 &&&d_{u}\\ c_1 & a_2 & b_2\\& \ddots & \ddots & \ddots\\& & c_{n-2}&a_{n-1}& b_{n-1}\\ d_{l} &&&c_{n-1}& a_{n} \end{pmatrix} \$ To do this, I wrote a basic functio...

 
5:20 PM
@Peilonrayz I'm not 100% sure, but that's how it looks.
@Mast Can only guess from the outside - there have been 2 groups around Yvette: One which supports her, and an other who is, let's say, very critical of her. Things get nasty. Members of one group flag everything the other group does that relates to Yvette, comments either as unfriendly or unkind, or as no longer needed (depending on the group). Moderators have to step in, deleting comments. People ask about deleted comments. In the middle is Yvette, who just want her old position back - which was promised at the time she left. — Johannes Kuhn 39 mins ago
 
5:32 PM
@Mast Oh ok. Thanks
 
0
Q: Python sudoku solver using backtrack algorithm

AkThaoMy first attempt at a sudoku solver using the backtrack algorithm. # Functions for solving Sudoku puzzles of any size # NumPy makes it easier to work with 2D arrays import numpy as np def find_empty_cells(board): """Traverse the board and return a tuple of positions of empty cells""" r...

 
 
1 hour later…
6:45 PM
@Peilonrayz there's something like reams of context that are spread across three different sites or so
 
0
Q: Scan a directory for files and load it in memory efficiently

dragonsI am working on a little project where I need to scan all the files present in a folder on the disk and load it in memory. Below is my code which does that exactly and works fine. Here are the steps: On the disk there is already a default Records folder which has all the default config files pre...

0
Q: Code based Node Editor

Chris GeorgeHi I'm trying to create a c++ code based node editor (GUI versions to be implemented). Here is how it works, each node has ports which can be of INPUT or OUTPUT (they only connect with each other so INPUT->OUTPUT or OUTPUT->INPUT). Here is the code so far main.cpp: #include <iostream> #include "a...

 
@Vogel612 I don't understand what you mean by "something like reams". Does "there's [lots] of context ..." have the same meaning?
 
7:07 PM
yea. lots of lots of lots
 
If your code is working and you're looking for a review you probably want to ask at codereview.stackexchange.com after reading their help to make sure your question is on-topic. If you're having trouble with this code then edit your question to ask about that specific problem. — Retired Ninja 22 secs ago
 
Ah, I'm not really surprised. The comments that I saw, when the election started, talked about Monica and such. So I can see this effecting multiple sites
 
7:23 PM
Accepted as answer. Thank you, Guru, for simply answering the question and not make me feel like I could find the answer elsewhere. I really tried and just couldn't find anything conclusive. Good news for me means I am doing it correctly in my website everywhere. It is basically async/await on every method. It was working, but I was worried I was going into a code review and get torn to pieces as tends to happen lol. Thanks again! — gecclesinc 28 secs ago
 
8:00 PM
0
Q: A program with a function that converts a string of digits into an integer value

German student 99Here is a programming task " Write a program with a function that converts a string of digits into an integer value. Do not use the strtol() function or any other standard C library function. Write your own!" now I did this program wish is work perfectly with no errors. so first I did the power f...

 
8:48 PM
Does your code currently work? If so this question might be more appropriate for codereview.stackexchange.comdbc 43 secs ago
 
 
2 hours later…
10:31 PM
I am voting the close the question because it lacks focus, doesn't provide an MRE and it probably belongs on SE Code Review since it seems to be a "make my code better" vs. "my code doesn't work" question — Trenton McKinney 56 secs ago
 
11:11 PM
0
Q: Find the sum of all the multiples of 3 and 5 under 1000

Muthu MeenakshisundaramI've been working on the first Project Euler problem and couldn't figure it out: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. > The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. After some research online...

 
When you are fighting the language like this it can be an indication that your design is flawed. I don't really know what problem you are trying to solve but you might consider posting on stack's code review site. — Crowcoder 53 secs ago
 
11:47 PM
I used a similar approach for my CancellablePromise but I wasn't aware of the [theSymbol.species] trick, thanks for that! — noseratio 21 secs ago
 

« first day (2632 days earlier)      last day (1384 days later) »