« first day (3442 days earlier)      last day (576 days later) » 

12:05 AM
REFRESH! There are 8032 unanswered questions (89.4965 answered)
 
 
2 hours later…
2:20 AM
0
Q: Javadoc-style documentation for C and C++ headers with unnamed function arguments

StoneThrowI've been accustomed to writing Javadoc-style comments in C and C++ headers, e.g.: // main.h #ifndef MAIN_H #define MAIN_H #include <string> /** * Prints a specified string to stdout. * @param s [in] String that will be printed to stdout. */ void func(const std::string& s); #endif // MAIN_H...

 
3:12 AM
0
Q: Much Faster than std::string, fmt::format, std::to_chars, std::time and more?

Maysara Elshewehy✨⚡️ xeerx C++ Format Library ⚡️✨ A super fast c++ library for managing and formatting strings with the ability to convert from/to any type ♻️ Cross-Platform - tested by Google Test. ⚡️ Speed - faster than std::string, std::time, std::to_chars, {fmt}, .., tested by Google Benchmark. 🍃 Light - ...

 
 
2 hours later…
5:19 AM
I presume the downvotes are because the question is more about code review than about a specific programming question, which is what this forum is for. Assume we don't know what your function does and aren't interested in reverse engineering the whole thing to figure that out. Could you create a simple example <20 lines that demonstrates the kind of thing you're doing with nested loops that you'd like to do with *apply? — Jon Spring 50 secs ago
 
 
4 hours later…
9:43 AM
I’m voting to close this question because there is a code review stackexchange listed at the bottom of this page. — Rob 46 secs ago
 
10:18 AM
Monking
 
 
3 hours later…
1:24 PM
Yeah exactly, "less code" is what I meant! Sometimes the most important requisite is performance or other thing. Maybe using fgets() passing n as the maximum length would kill two bird with one stone. It's kind of overthinking but SO is possibly the only way I can learn/discuss these things as code reviews in companies never seem to get that good as SO comments hehe — Jardel Lucca 23 secs ago
 
2:11 PM
"I think the switch statement that I used in the ProtocolRxEventHandler smells and can be written in better ways. But I do not know How? Any idea?" -- will need to see some code, none of which was provided. If you want a code review, you should ask on codereview.stackexchange — BurnsBA 13 secs ago
 
0
Q: Longest Subarray With Maximum Bitwise AND

Michal SobanskiHow I can faster count the longest subarray of numbers. This is my solution: (define/contract (longest-subarray nums) (-> (listof exact-integer?) exact-integer?) (define maxL (apply max nums) ) (define (counts a x n c) (cond [(null? a) (apply max (append c (list n)))] [(eq? (f...

 
3:13 PM
2
Q: Dynamic type implementation in C

PearDynamic Type - [ int, char, bool, ... => dtype ] Dynamic Type in C, A project that I had been thinking of for a while and made it. How it works ? Dtype currently is same as char, when doing dtype var[size]; size bytes are reserved for var as normal char would do. The actual working of dtype is th...

 
3:39 PM
0
Q: Project sequence to multiple sequences using LINQ (or extension methods)

SuperJMNI'm creating a method that expands a sequence. This is a sample of how it works: Input: {1, 2, 3} Output: {1}, {1, 2}, {1,2,3} So far, I've been able to solve the algorithm using 2 different approaches: Approach 1 public IEnumerable<IEnumerable<T>> Expand<T>(IEnumerable<T> sequence) { return...

 
Please tell us what went wrong. Was there a traceback? Then post it. Its best to write a small example script that shows just the problem area. Most of us are not going to do a code review of a large code dump. — tdelaney 52 secs ago
 
4:01 PM
Monking
 
4:23 PM
Is this an alternative implementation or a review?
0
A: plotting Monte Carlo Simulation from excel sheet

VBasic2008Monte Carlo Simulation The code took 8s to produce the result (A15:C34) in the screenshot. If you put all hard-coded values in constants at the beginning of the code, you'll know where to quickly find and modify them. Put all the values in variables and in data structures (only arrays here) a...

I could read it either way.
 
 
1 hour later…
5:44 PM
@Mast whether it is a real review seems questionable, however it does appear that the first few bullet points provide explanations with justification
the last bullet point is quite the opposite of ... motivational
 
6:23 PM
Rather than using goto, put the validation code into a forever loop and put that loop in a function. Return from the function when valid input has been received. Now you have a reusable function (even more reusable if you pass the threshold in as a parameter) and don't have the nigh-impossible task of getting the goto through a code review. — user4581301 41 secs ago
 
7:06 PM
I’m voting to close this question because code works and it simply needs somebody to review it. It is therefore better suited on CodeReview: codereview.stackexchange.comTerry just now
 
7:30 PM
1
Q: Optimizing a large report sorting macro

Dallin DeFordI've been working on this project for my organization for a few months now, and am looking for ways to increase performance on this macro. I work for an insurance company as a claims auditor. I get a report daily of claims that were ran the day before and look for abnormalities to audit. The belo...

0
Q: Searching shortest path in binary tree Codeforces 520B

Benjamin ChenTitle. Issue is that I'm not getting the shortest path for a test case. I'm not sure if the problem lies in creating the binary tree or finding the shortest path. Problem I'm solving: https://codeforces.com/contest/520/problem/B #include <iostream> #include <set> #include <limits> std::set<int> ...

 
 
1 hour later…
8:47 PM
0
Q: polarimetric imager in python

Omar Morales RiveraMy code takes 3 images taken with a polarising filter rotated 45° between them and transform them into a single image encoding the polarization parameters as HSV. what can be improved? imagefiles=glob.glob(r"C:\Users\HP\My Python stuff\openCV\Polarization\IMG*") imagefiles.sort() imag...

 
9:13 PM
0
Q: Guardian: Guard Clause Package

RoeiI'd like a review of a python package I created called Guardian. I'd like to know what you think about the usage, and quality of the code. Any suggestions are welcomed. Full Package Code & Examples: https://github.com/RoeiOhayon/Guardian Motivation Guard Clauses allow validation of information, ...

 
monking
 
Monkernoon
 
9:35 PM
Code Review could be the right place, as long as the review request fits their on-topic standards. But Stack Overflow definitely is not the right place. To learn more about this community and how we can help you, please start with the tour and read How to Ask and its linked resources. — David 14 secs ago
 
10:09 PM
0
Q: modifying const from function when calculating a total - feels wrong

user4681670My code is something like this - I have an initial value, a form with multiple inputs, and a button. When the button is clicked, I want to sum all the values from the inputs, add it to the initial value for my grand total figure. Seems to work but I feel like I'm doing something wrong amending a ...

 
10:50 PM
I have ambiguous feeling on this, from the one side looks like premature optimization and may_(but not necessarily _will) confuse a reader "why there is useMemo? should we care about referential equality? but where?". From the other side, it guarantees all the operations on this list will probably be kept in single place, without spreading across the component(due to team members' laziness and lack of code review :) ) — skyboyer 37 secs ago
 
11:03 PM
@DJanssens Welcome back :-)
 
11:26 PM
0
Q: Basic ATM Software from a Udemy Project

Th3 M0rrig4nRecently starting to learn programming, I'm looking to move to making larger projects and am just picking up the basics now. I have a feeling this code sort of missed the point? Am looking for feedback for better/ more efficient practices to make it more functional/clean. The following was the pr...

 
11:52 PM
0
Q: Unsafe Rust FFI code to access Razer products on macOS

kolrieI am new to Rust and specially new to FFI programming, and I am porting a macOS specific C library called librazermacos to Rust. While writing some public APIs I came up with my first two methods which, incidentally, are the ones I needed to write to check my mouse battery and build some kind of ...

 

« first day (3442 days earlier)      last day (576 days later) »