« first day (4007 days earlier)      last day (10 days later) » 

12:01 AM
 
12:16 AM
REFRESH! There are 6222 unanswered questions (91.9787 answered)
 
1:08 AM
0
Q: Why does clang say `warning: variable '<X>' set but not used`?

KJ7LNWBackground I'm trying clang -Wall on a codebase that I maintain, and the following functions are triggering warnings. Question Why does clang think these are unused? See the // USED! comments near the bottom of each listing below. input.c:162:7: warning: variable 'nwire' set but not used [-Wunu...

 
 
3 hours later…
4:33 AM
0
Q: Snail matrix in Java - version II

coderodde(This post is the continuation of Snail matrix in Java.) As previously, a snail matrix is any square matrix \$M_n = \mathbb{N}^{n \times n}\$ with cell elements from the set \$\{ 1, 2, \ldots, n^2 \}\$ such that they resemble the snail pattern. For example, for \$n = 4\$, \$M_n\$ looks like that:...

 
 
7 hours later…
11:21 AM
0
Q: Snail matrix in Java - version III (generalizing)

coderoddeOnce again, in the previous version, Alexander Ivanchenko helped me with his awesome answer. Now, I have improved the toString() and, also, generalized the class to handle matrices of any dimensions, not only square indices. Code package com.github.coderodde.fun.snailmatrix; import java.util.Ar...

 
 
1 hour later…
12:44 PM
This belongs on codereview.stackexchange.com — SimonC 33 secs ago
 
12:59 PM
Perhaps this question would be better suited to code review, however be sure to read their how-to-ask page. — import random 17 secs ago
@SimonC Unless the user is willing to share the code they are currently hiding, this question does not belong on Code Review. — pacmaninbw 32 secs ago
 
 
1 hour later…
2:17 PM
I’m voting to close this question because IMO this would be better suited on Code Review — ControlAltDel 55 secs ago
 
0
Q: Java Generic with Factory Pattern and Enum

TrevorI am running into a weird case where the compile is complaining about raw use of parameterized class. I understand the problem but I am not sure how to fix it. public enum Notify { CHAT, EMAIL } public interface NotifyMessageCreator<T> { Collection<Messages> createMessages(T t); Notify g...

 
No, @ControlAltDel: the question needs work before it's suited to Code Review. Specifically, it's missing sufficient review context and would likely be closed for that reason. You could have pointed the asker at A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. we need a good description of the purpose of the code to give context, and question titles should simply say what the code is for (the question is always, "How can I improve this?"). — Toby Speight 27 secs ago
 
2:51 PM
Monking
 
3:05 PM
If your code works, but you want to make it work better you should probably be asking on codereview.stackexchange.com. — Chris 31 secs ago
Before you post at Code Review, be sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code is for, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight 52 secs ago
 
4:08 PM
Monking
 
4:18 PM
Monking
 
4:39 PM
0
Q: BlackJack in python

Joseph BeegleI began creating blackjack in python; however, I'm looking to simulate it, so I'm thinking I'm going to need to optimize it so that I don't just leave my computer running for three hours waiting for just 3000 games to be simulated. I'm very new to this stuff so feel free to be as hard on me as yo...

 
4:55 PM
also if you have a working solution but want help optimizing, code review SE might be a better place to ask — depperm 13 secs ago
 
0
Q: Image Rotation with Shear Transformation in C++

JimmyHuThis is a follow-up question for Image Rotation and Transpose Functions Implementation in C++ and An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. I am trying to implement another image rotation function with shear transformation in this post. As another ...

 
5:14 PM
This code looks fine to me in that context (for what that's worth). If this question gets downvoted and closed, you might have better luck on codereview.stackexchange.com — cobbal 25 secs ago
@cobbal I'm afraid this question is not suitable for the code review stack exchange - that exchange is exclusively for code style, not for correctness and functional issues. I'm honestly not sure why the question got downvoted - granted, it's not typical, so I actually read the posting guidelines before submitting it, but I'm fairly sure this is the best place to post it and that it follows the guidelines. — Przemysław Wrzesiński 23 secs ago
codereview.stackexchange.com/help/on-topic specifically mentions security issues, so to me this would be on-topic. I think it's also on-topic for this site, but it is more of an open-ended question, and SO isn't as good at those. — cobbal 31 secs ago
 
5:47 PM
0
Q: Coding puzzle - Passing year books

Hariharasudhan GunasekaranQuestion: There are n students, numbered from 1 to n, each with their own yearbook. They would like to pass their yearbooks around and get them signed by other students. You're given a list of n integers arr[1..n], which is guaranteed to be a permutation of 1..n (in other words, it includes the i...

 
 
1 hour later…
6:51 PM
Question 1 (how to improve my code) is off topic here, but might be on topic on codereview.stackexchange.com (be sure to read A guide to Code Review for Stack Overflow users first). Question 2 might be on topic, but not if you ask two questions in the same post. — Chayim Friedman 11 secs ago
 
7:14 PM
Thanks for your advise, I will move the question to codereview.stackexchange.com , and keep the second question here. — user24615633 15 secs ago
 
1
Q: Simple Profiler in Rust

user24615633I am writing code for a simple 'Profiler', using a struct, a hashmap, Options, and some methods. I call the profiler at many places in my code with the functions names, and the hashmap gets fed, linking function names with their performances. A function can be called many times, and the total run...

 
 
3 hours later…
10:20 PM
0
Q: Simple C++ event loop - static vs dynamic dispatch performance

JnukI have two extremely simple toy implementations of an event loop, and would like to understand the performance differences between them. First impl - events with a virtual 'handle' method - dynamic dispatch: #include <memory> #include <vector> class Event { public: virtual bool handl...

 
10:52 PM
(Which is all to say -- set -e and ERR traps and equivalents are all hopelessly broken; get in the habit of explicitly using || return and || exit, and checking for presence of same during code review). — Charles Duffy 30 secs ago
 

« first day (4007 days earlier)      last day (10 days later) »