« first day (3003 days earlier)      last day (997 days later) » 

12:03 AM
REFRESH! There are 7711 unanswered questions (89.3737 answered)
 
12:21 AM
0
Q: Rust: lazy_static the strings from evdev codes

loa_in_So I have this piece of code that produces following error: cannot return value referencing local variable `key_name` returns a value referencing data owned by the current function I want it to evaluate the Key range and produce a map of strings, but it fails on the line map. I can't seem to set...

 
12:46 AM
0
Q: floor modulo or modulo rounding towards negative infinity

0dminnimdaThe first function will always try to correct the final result, while the second uses a conditional to know when to compensate. I think that in general the second function will be faster, but it will look a little worse than the first. int floor_mod1(int a, int b) { int mod = a % b; retur...

 
 
2 hours later…
2:19 AM
 
 
5 hours later…
7:39 AM
In stack overflow we don't do code review. This is a subject of this cite. — Karen Baghdasaryan 52 secs ago
 
 
2 hours later…
9:14 AM
0
Q: how to play again if there is wrong input/error

ShubharthakI'm working on my project called Tictactoe. It is working great. So to play the game there is a function call play which takes pair of ints and decide where to play, while there's another function playO or playX which plays the game using those pair of ints returned by the play function. But if u...

 
9:39 AM
If your code works and you want a review, then try Code Review. — mickmackusa 11 secs ago
 
@RMunroe Oh no you don't...
That's a truly terrible idea.
 
 
1 hour later…
11:07 AM
well, it is a cursed connector, so ...
 
 
1 hour later…
12:09 PM
MOnking
 
0
Q: Optimization of for loop

KLMKI am trying to build a model that allows me to estimate the spread of disease in the population. The setup is similar to the SIR model, with the difference that this model includes the stochastic component. I have written an algorithm to carry out the simulation, but the lead times are really hig...

 
 
1 hour later…
1:35 PM
Ryan Donovan on July 24, 2021
In the eighth and final lesson of the series we’ll practice everything we’ve learned to date by loading and preparing some data, fitting a few different models, and comparing them. This is an open-ended session where we’ll examine some questions from our audience and demonstrate what a data analysis workflow could look like. If you…
 
2:18 PM
0
Q: Collapsing loops for parallelization with OpenMP, checking if double is initialized using NAN?

afarahI have several loops that look like this: for (i = 0; i < n; i++) { outer = something dependent on i only; for (j = 0; j < n; j++) something dependent on i,j,outer; } Where outer is of type double. I want to make them parallel. At first I thought of simply collapsing the loops and using ...

 
2:43 PM
0
Q: API for input stream with read until

ViatorusI want to create a stream class The input stream should read/parse a continuous range from left to right providing convenience methods. The implementation isn't a problem but choosing a consistence API. A basic example would be: input_stream is("Hello! 42"); is.peak(); // 'H' is.read_n(7); // "...

 
 
1 hour later…
3:44 PM
Monking
 
Monking
 
3:59 PM
0
Q: My 3D to 2D graphics algorithm is being a bit slow

DanielWith my VB.Net Windows Forms application, I would like to rotate and project a 3D object. The program works so far, which is why I'm reporting here and not Stack Overflow, but it's slow. I've already made two optimizations: 1.) All points that are on the back of the object, i.e. that cannot be se...

 
@Gerrat codereview is for working code only - but maybe the rules have changed since 2011. — ack just now
 
4:50 PM
0
Q: Map implementation in C++

PugsAreCuteI always wondered how maps work in programming languages, so I decided to write my own class for them in C++. My implementation does not sort data and uses CRC as a hashing algorithm. Features put(key, value) - Puts a new element into the map. get(key) - Gets an element based on its key. remove(k...

 
 
2 hours later…
6:22 PM
For your reference - check out this post (not direct answer) codereview.stackexchange.com/questions/224132/…Daniel Hao 43 secs ago
 
0
Q: Is there a more idiomatic way to process these strings?

Jonathan SpillerNew Scala dev here: Is there a more idiomatic or efficient way to accomplish this in Scala? Given a list of the following strings, I need to obtain the unique 'main parts' once any parts including and after a "-" have been removed. The output should be a list of sorted strings. Also note both ";"...

 

« first day (3003 days earlier)      last day (997 days later) »