« first day (2412 days earlier)      last day (42 days later) » 

12:00 AM
RELOAD! There are 6294 unanswered questions (90.0816% answered)
I guess this question belongs to codereview.stackexchange.com — snipsnipsnip 6 secs ago
12:48 AM
@snipsnipsnip Please don't suggest users post pseudo-code on CR because it is not on-topic and leads to poor reviewsSᴀᴍ Onᴇᴌᴀ 11 secs ago
1 hour later…
1:59 AM
Q: Project Euler 21: Sum of amicable numbers optimisation

J. Cricks Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b are called amicable numbers. For example, the proper divisors of 220 are 1, 2, 4, 5, 10, ...

Q: Reduction of time for the code of sorting RGB and Depth images according to timestamp values

Ankit JaiswalI have RGB Images, Depth images and OpenPose Images(generated from RGB Images). The number of RGB and Depth images are different so I have to find the exactly which RGB images corresponds to which depth images. This is done using the time stamp values I have for both RGB and Depth Images. The pr...

2:11 AM
Your post is too long. Probably full of details that are irrelevant. I didn't read it, doubt anyone else will. StackOverflow is more a place for clear and direct questions and answers. If you're looking for a code review, you can head over to: codereview.stackexchange.comJacob Penney 27 secs ago
Q: How to map nested array of objects?

Aniruddha RajeI have a use case where I need to make a query to a NoSql table (AWS DynamoDb), which will return me a list, each result further needs to query back on the same table. My table has 2 important columns - 1. sub_service_id 2. parent_id The query is made on the parent_id column of the table each ...

3:09 AM
One problem is the "not working" form is too tricky for its own good. The temp variable code is obviously correct. I had to resort to pencil and paper to see what the in-place swap was attempting. Since the in-place swap is unclear and probably less efficient, I'd reject it in code review. Having said that, I don't immediately see its error. — another-dave 10 secs ago
1 hour later…
4:26 AM
Q: ArrayList in C, trouble freeing a void**

diatrevoloI am trying to implement an vector in C to practice, and it seems to work, but I feel like I should be freeing the void** data in my struct. The runtime says I am freeing an unallocated pointer, even though I malloc and realloc it...I feel it has to do with how I am appending data, just making th...

4:52 AM
I think you can find some better answers on codereviewDenis Sheremet 31 secs ago
5:29 AM
5:48 AM
Q: DeliciousSoda: A simple parser for robots.txt files

LinnyThis is my first big project that I've decided to release publically. It's available on my Github, and through pip3: pip3 install delicioussoda. This is a simple parser for robots.txt files for a website. And yes, the name "DeliciousSoda" is a play off of "BeautifulSoup". As I intended to keep ...

6:28 AM
Reads like Design choice / question, that should be moved to codereview.stackexchange.com. Always add your minimal reproducible example code (e.g. your multi-dimensional array, or class with attempts to initialize data). — hc_dev 57 secs ago
Q: Arrays of References: Add Song

reminiscentSo we have a playlist of Song objects and one of the methods needed is an addSong method. We need to first check if there is enough space in the array of references. If it isn't, we need to create a new array and transfer the songs to the new array before assigning the new array back to the list ...

@CaptainObvious gimme the codez
6:50 AM
Q: C - Passing Same Pointer Twice to Function to Achieve In-Place Calculation

josephsturmI'm writing a toy vector library in C to learn a bit about the language. The excerpt below shows my vector structure and two functions: vec2_magnitude calculates the magnitude (length) of a vector vec2_unit uses the magnitude to calculate the unit vector #include <math.h> // A fixed-length v...

Just to let you know that there is a dedicated stackexchange forum for this type of questions and it better suits here codereview.stackexchange.comUnknown just now
7:06 AM
@SimonForsberg quick question about @Duga: What does @Duga mean with "unanswered questions" ? Question without answers or question without upvoted answers?
7:26 AM
@Peilonrayz thanks for the edit
No problem :)
8:00 AM
possible answer invalidation by SuperUSer on question by SuperUSer: codereview.stackexchange.com/posts/233770/revisions
@Duga rolled back
8:13 AM
Q: How can I use fewer case matches in this token scanner?

dopatramanHere is my code: defmodule LineScanner do @spec scan(String.t()) :: [Token.t()] def scan(line) when is_binary(line), do: scan_(line, {[], ""}) |> Enum.reverse() ### The function below needs some refactoring ###### @spec scan_(String.t(), {[Token.t()], binary()}) :: [Token.t()] ...

@Heslacher She means whatever the API means. Probably the same as this: codereview.stackexchange.com/unanswered/tagged/?tab=newest
ok, thanks
> Note that just because a question has an answer, that does not mean it is considered answered. While the rules are subject to change, at this time a question must have at least one upvoted answer to be considered answered.
found it
8:35 AM
Welcome to Stack Overflow! Please visit help center, take tour to see what and How to Ask. You have a very large narrative and many questions, some are for code review. Please ask ONE question at a time and use a minimal reproducible example - you can click edit, then [<>] snippet editor and add a working example of ONE thing you need help fixing — mplungjan 29 secs ago
I asked one question. A code review. There is nothing more. This all is just ONE code not many. It is serving one particular function and the pieces working together. I don't see any issue in here. Nor many questions. — Dr.Random 17 secs ago
If your code is working as intended you should post this on codereviewHeslacher 55 secs ago
possible answer invalidation by SuperUSer on question by SuperUSer: codereview.stackexchange.com/posts/233770/revisions
So it is a request for code review. Then it is off topic here. — mplungjan 42 secs ago
@Duga thats ok just adding a link to the follow-up question
8:54 AM
Q: Find size for elements to fit in certain width

SuperUSerThis is a follow-up on Change size of elements until parent reaches certain height The goal of the function is to find a size for the elements inside a parent, so they all fit in a single row. I tried it with a loop (check previous question), and now I changed it to if statements. However I woul...

9:34 AM
@pacmaninbw No, we don't need a moderator for this.
@Peilonrayz Thank you.
Q: Reviewing working JavaScript code. ( object manipulation, array copying etc…)

Dr.RandomI have written a code for my little little website to make it multilanguage. It is a simple "developer" page where you can select from four different languages. Hungarian, English, Deutch and Roman. Then i wanted to modify all the words each by each in a table like div on the page and then save i...

10:01 AM
If your code is working, but need improved performance, I suggest you post it here: codereview.stackexchange.comPrebsus 40 secs ago
If you are going to post this question on Code Review please read codereview.meta.stackexchange.com/questions/5777/… before posting. — Heslacher 34 secs ago
10:16 AM
Q: Leaflet geoJSON layer filtering

Mariusz KrukarI have the code. I would like to make it a little bit smarter. $.getJSON(url, function(data) { //Initial Setup with layer Verified No mdu = L.geoJson(data, { pointToLayer: function(feature, latlng) { return L.circleMarker(latlng, { color:'black', ...

@CaptainObvious Interesting.
10:35 AM
@Someprogrammerdude and @Mat Thanks a lot for your help, though it might be pretty obvious for an experience C++ dev. by using unique_ptr for every object instantiation in generateAst it works fine now. However, as mentioned by @KonradRudolph it is a complex and error-prone architecture. I think I will add it on CodeReview to get some feedback on how I could improve it. — Patrick 18 secs ago
Q: Refactor code to avoid the setting of the same properties for different objects in C#

akhilHow can we refactor the below code to avoid the setting of the same properties for different objects multiple times and make a common method to accomplish this, I have tried using Generic methods but making all the types implement a common Interface is not an option for me.. public void BulkIns...

10:49 AM
Welcome to the Stackexchange sites network. Stack Overflow is for concrete problem questions, see <stackoverflow.com/help/on-topic>. However you are looking to general code improvements, so I'm voting to move the question to <codereview.stackexchange.com>. — daxim 10 secs ago
Welcome to the Stackexchange sites network. Stack Overflow is for concrete problem questions, see <stackoverflow.com/help/on-topic>. However you are looking to general code improvements, so I'm voting to move the question to <codereview.stackexchange.com>. — daxim 18 secs ago
Q: java swing super simple calculator mvc

lesmanai am trying to learn mvc (model view controller). there are many texts out there explaining what mvc is. but not many explaining how to actually code mvc. i found a bunch of questions here asking about mvc. some seem to contradict each other (view observe model or not, controller listens to view ...

Q: XML parser + bs4 combo

Andrea DodetI just wrtoe a short function to parse SO xml feed and return dicts containing information about each job entry. Now, each job entry page is visited to grab info not present in the xml feed (company logo url, salary info, etc.) through bs4 with couple functions in the get_so_extras module. parse_...

11:18 AM
Q: Fleissner-Grille / Turning-Grille in Java

chrysaetos99I've implemented the cryptographic method of the Fleissner-grille aka Turning-grille (wikipedia). Here's the code: import java.util.Scanner; import java.util.Random; public class fleissner { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); S...

11:39 AM
Q: can you help me to optimize my perl code(dice game)?

alechey guys so my professor told me to optimize my perl code he would't tell me what exactly just make it simpler i change some little things but nothing major. Am i missing something? thanks the task was: Perl program that allows the user to simulate the simultaneous throwing of several cubes. ...

12:21 PM
1:01 PM
Maybe best suitable for a question on codereview? — PJProudhon 29 secs ago
Q: LZ77 compression and decompression

asymmetriqI'm implementing LZ77 compression algorithm. To compress any file type, I use its binary representation and then read it as chars (because 1 char is equal to 1 byte, afaik) to a std::string. Current program version compresses and decompresses files (.txt, .bmp, etc) just fine – size of raw file i...

Q: Custom Ranking algorithm

Padmanabhan-PaddyCould you review the approach and let me know if there is a better way to implement the same using different java techniques (also performant)? Requirement as follows: The products that are returned for a request, need to be ranked to offer the most relevant product to the user. we will rank b...

1:53 PM
Q: writing Vec compare in a more compact way

JACK MI have this code snippet comparing 2 ref Vec: fn compare(&self, a: &[u8], b: &[u8]) -> i64 { let mut p1 = a.as_ptr() as *mut u8; let mut p2 = b.as_ptr() as *mut u8; let mut min_len = cmp::min(a.len(), b.len()); let mut ret = 0; while min_len > 0 { unsafe { i...

2:30 PM
I'm voting to close this question as off-topic because it belongs on Code ReviewCompo 32 secs ago
2:44 PM
Q: Detect (czech) charset of string from byte array in Kotlin

K.H.I needed in my project to import .txt files without knowing their encoding, but knowing, they will most likely be in czech. Sadly there is bunch of possible encodings so I decided to create code, that will try to detect encoding based on content of these bytes. Idea is to convert all characters, ...

2:56 PM
I'm voting to close this question as off-topic because this is about reviewing code rather than an actual question. Note that there is a site callled Code Review that accepts running code! — Maarten - reinstate Monica 29 secs ago
I think your question should be here codereview.stackexchange.comRuben Martirosyan 33 secs ago
Q: Cis 194: Homework 3 (Histogram)

yasarI am following CIS 194: Introduction to Haskell (Spring 2013) online to teach myself Haskell. Following is my response to thirdexercise of Homework 3, namely Histogram. In which ways I could improve this, without getting too much into advanced topics of Haskell? {- For this task, write a functio...

3:16 PM
Donna Choi on December 11, 2019

👋Hello! I’m Donna, the Community Design Lead at Stack Overflow. 

Welcome to CHAPTER #1 of The Loop, a new blog series from the Stack Overflow Community team. This post is a deep-dive into our research approach: what it used to be, what it is now, and how it continues to evolve. 

Learn more about The Loop in CHAPTER #0 (yes, our chapters are zero-based).

If you work on a product that’s ever benefited from research – whether that’s talking directly to users, analyzing experiment data, or any number of other research methods – you know how indispensable these inputs are for making the right decisions.  …

Seems rather a codereview question in case you are just looking for optimizations of working code. It might be a bit short though :) — Icepickle 56 secs ago
@Duga When someone on SO says a question may be a bit short for a code review, it must really be short.
4:07 PM
Q: Multi-merge algorithm in C++

E. VakiliAs you know there is an algorithm in C++ standard library called std::merge, that merges two sorted ranges into another range. I try to write another merge (called multi_merge) that gets multiple sorted ranges (one or more), and merged them in one. The code is as follows: #include <utility> #inc...

4:54 PM
5:09 PM
Q: Count number of unique adjacent cells in a matrix

BlascoI want to write an algorithm to count how many islands are in a given matrix. Consider for example: A = [ [1, 2, 1, 3], [2, 2, 3, 2], [3, 3, 2, 3] ] Directly adjacent (north, south, east, west, but not diagonally) numbers constitute an island, in this example matri...

5:37 PM
Sorry, @JacobPenny, I wasn't aware of code review at the time of writing. Thanks for clarifying what it is! — Samuel Crawford 28 secs ago
5:48 PM
@MathieuGuindon @410_Gone and anyone else, by popping open new windows am I breaking the MVVM design pattern?
not necessarily ..depends how it's done :)
Q: Populate a list with combinations of one- and two- object functions

Andrew PattersonI have a nested set of for loops which achieves the desired outcome, but I don't know if it is the most efficient / pythonic way of populating this list. I would like all combinations of the one object functions, combined with 0 to n combinations of the two object function. Here, I have abstrac...

but, rule of thumb, dialogs-based popups are MSForms/1990's
WPF/MVVM philosophy is more about "pages"
but nothing wrong with having a command whose job is to pop a dialog and get a piece of data from the user
(IMO anyway)
6:11 PM
Q: A generic DFS in JavaScript

EvgenyI implemented a general function for a depth-first-search (DFS) using JavaScript with default arguments and functions that need to be provided in order for it to work. This function is using async & await, but both can be removed to make it synchronous. Is the naming sensible? Are there missin...

6:43 PM
@MathieuGuindon Sometimes a dialog is the right option. 🤷‍♂️
7:10 PM
Q: Generated Minecraft stone texture in R

Dexter CDI needed a Minecraft-like stone texture, instead of creating it using image editing software I decided to generate one using R. The idea is to create some noise and stretch it horizontally so the texture tends to have some horizontal lines. Example output (this example is upscaled, the original...

1 hour later…
8:14 PM
@spoonsearch: thanks. I think the confusion is that this site is for Question and Answer, and it sounds like you're looking for something more akin to code review or discussion since you already have an Answer. If abandoning the request rather than canceling gives you the leeway you need, then it seems like a reasonable solution. My only quick suggestions here are to add another longer Context timeout to the request itself so a Client.Do can't hang indefinitely, and look at the DefaultTransport too see all the defaults and how the Dialer is defined.. — JimB 12 secs ago
8:55 PM
Q: Python Turn Based Game, Can't Find A Way To Skip To Next Player

Legomert99So I have simple project in Python. I have to makea simplified 2 person UNO game. I'm having a problem with the turns. I don't know why but player 2 can't paly the game. It always lets the first player to play. My code is basically like this: Turn=1 while (Turn>0): if (Turn%2==1): ...

9:16 PM
We can't judge the "goodness" of your solution without knowing what you don't like about regular dicts. But even in that case, this is off-topic as primarily opinion-based. If you can tighten up your question you might have better luck on Code Review. — Chris 54 secs ago
9:54 PM
PSA: is 2 questions short of being badgeable!
10:14 PM
@MathieuGuindon so there is a 100 question minimum before the bronze tag badge is available?
yep :)
I remember making a big deal of reaching 100 posts!
oh I finally see that in the text on the right side of bronze Tag badges
> If enough votes are earned in a tag with 100+ total questions, the badge will be automatically created and awarded.
it appears two users already have more than 100 points in that tag
Simon and skiwi?
Simon and 200
darn... can't nest the tag link inside another link
1 hour later…
11:38 PM
this post was reopened recently ... is it worthy of upvotes, now that it contains the code to be reviewed?
Q: Promise Library

TimI have a C# Promise implementation (based off Promises/A+ and ES6 with some alterations to support cancelations and normalized progress). It is fully functional in a single-threaded environment. Promise: using System; namespace Proto.Promises { public abstract partial class Promise : ICancel...

@KeithNicholas—there's no need for two loops either. Critique of the code would take more time and effort than it's worth, maybe this should be on code review? — RobG just now
@RobG: It shouldn’t be on Code Review unless it works. And I don’t think pointing out the wrong variable being used counts as critique. — Ry- ♦ just now

« first day (2412 days earlier)      last day (42 days later) »