« first day (3388 days earlier)      last day (43 days later) » 

12:04 AM
REFRESH! There are 8118 unanswered questions (89.3416 answered)
@devlincarnate No, that's not the criteria for what belongs on Code Review. Please do not suggest sites whose scope you are unfamiliar with, and, more importantly, do not turn away questions that are on-topic where they were asked (like this one is). — Cody Gray ♦ 45 secs ago
 
 
4 hours later…
4:02 AM
0
Q: Counting the number of elements common in both the arrays. It is not able to pass all test cases

Navneet KumarI have written NumberofElementsInIntersection function code, other code was by default available in editor. My logic to find number of common element is, i will store elements of first array and its time of apperance in map, then i will traverse through 2nd array and check whether 2nd array eleme...

 
 
2 hours later…
6:32 AM
0
Q: Optimizing barycentric triangle rendering algorithm

Jimmy YangI created this piece of Go code that renders a shaded triangle using a Barycentric algorithm type Vertex struct { x int16 y int16 r uint8 g uint8 b uint8 } ... func (gpu *GPU) ShadedTriangle(v1, v2, v3 *Vertex) { // Area of the parallelogram formed by edge vectors a...

 
 
2 hours later…
8:48 AM
Welcome to Stack Overflow. This question is for code review, which is off-topic on this site. Please consider migrating it to the Code Review StackExchange site. — ljmc 46 secs ago
 
8:59 AM
@MadPhysicist I am parsing in this brute force way, and the code reviewer left a comment to implement with a pythonic way using iterator. — Exploring 33 secs ago
What code? Also, that's off topic here. Code Review might be a better fit for you, but I'm not sure — Mad Physicist 28 secs ago
 
9:26 AM
0
Q: I create too many vectors to draw a small cylinder

Danielthe goal is to draw a cylinder and rotate it by -30° around the y-axis (i.e., towards me). This should be done as large and performant as possible. But the drawing should look reasonable, otherwise I can stay with MS Paint :D My current problem is that I can't increment small enough. The drawing ...

0
Q: React good practise to render one screen inside another when one screen component needs almost everything from another screen component?

juliascodingIm using react native and I have (among others) 2 screens. SearchScreen Component and ReportScreen Component. In my ReportScreen I basically need everything from SearchScreen (I render the search input field and the autocomplete component for the search suggestions plus all the functions from my ...

 
 
2 hours later…
11:05 AM
0
Q: Reading a dynamic data resource

NeslyI need to read a dynamic data source from such as https://daten.berlin.de/datensaetze/berliner-stra%C3%9Fen-und-volksfeste-2022 In my current application, I have started writing a static parsing, I want to convert this to dynamic reading. The challenges are The data source contains redundant piec...

 
11:25 AM
Monking
 
11:55 AM
0
Q: Exception handling for list of events

NeslyI am looking for a better way of using exceptions while querying some events. It is used as filtering some parameters over a JSON source and returns a list of events. The result is the format of the page, and what could be the best type of exceptions to catch. Thanks. EventQueryService.java packa...

 
12:20 PM
0
Q: Sum of FizzBuzz numbers with modern C++

Thomas WellerI am learning to write more modern C++, since my C++ is from the 1990s (I'm a C# programmer). I need to get used to the STL algorithms and such. So I tried some kata, summing up numbers in a given range that are divisible by 3 or 5, using new C++11/14/17 stuff. I know that it can be solved mathem...

0
Q: First Lua program - Print external IP and VPN status

luanoobI started learning Lua yesterday and wanted to write a quick program as a practice. It queries an external service for the IP address and country code, and naively check for the existence of network interface names used by VPNs (like Nordvpn or other). It then prints a colored output containing t...

 
1:10 PM
0
Q: Simple ID Generator

Dexter ThornTask Write a program that can generate IDs. The user should determine how long the IDs have to be and what symbols they are composed of. Design choices made by me The program functionalities are used via command line arguments A configuration file determines which scheme the IDs correspond to an...

 
 
1 hour later…
2:28 PM
0
Q: JavaScript Drag & Drop Sortable List

DumbMathBoyI'm building a drag and drop sortable list in Javascript. This is what I have so far. Is this a good way to solve the problem? How can I improve my code? <div id="list"> <ul> <li data-value="Bananas" draggable="true">Bananas</li> <li data-value="Keys" draggable="true">Keys</li>...

 
2:49 PM
Thank you for your feedback and code proposal. I tested it, unfortunatelly it does not what I ment. It excludes all not available options. And final result should have a full list with all possible options and as last column availability status (available/not available, green, wood etc.). Regarding approach: I will put a little bit later my whole code to the code review with detailed description of the business logic. Else quite detailed description is available here marked with "12.08.2022". — Clipart - Designer 8 secs ago
 
3:21 PM
-3
Q: Why while(is >> x) works but not if(is >> x)

ProgramIn C++ using input stream, while(is >> x) returns false when the stream cannot read more, but if(is>>x) does not compile. The compiler seems to interpret the condition (is>>x) differently for while() and if(). Why?

 
4:05 PM
0
Q: Attempting an OOP approach for PDF Paranoia - Automate the Boring Stuff CH 15

RamzaThis exercise is called PDF Paranoia and it comes from CH 15 of the book Automate the Boring Stuff With Python - second edition. There are two parts to the exercise, which I've separated into two Python files. The code I've provided uses Python 3.10 and PyPDF2 v. 2.10.0. The instructions are as f...

 
 
2 hours later…
5:56 PM
@Kache Maybe not exactly StopIteration / "ContinueIteration", but here is what I has in mind when justifying "Continue" codereview.stackexchange.com/questions/278825/…Roman Susi 1 min ago
 
6:11 PM
0
Q: Query builder with alternative approaches

Roman SusiThe function alternative_computations below should produce a query using potentially different approaches (for brevity, I have provided just one). The caveat is that not all filters are supported so NotImplementedError is used to skip failed methods as a whole. The emphasis here is not on the sim...

 
6:36 PM
0
Q: Refactored ternary conditional to a function feedback

TS1887I am currently working on a custom TabBar component for my expo project using React Navigation V6. However, the example code that I used on the React Navigation docs to add in a custom tab bar shows an ugly nested ternary function inside the const label variable. I have created a solution that re...

 
7:25 PM
0
Q: Project euler #3 in python

Bankole OluwasemiloreMy program is written in python and I have tested it with small numbers like 21 and 35, but i tried running it with 600851475143 but it is taking forever to spit out my answer. Anyways, my code is as follows: def prime(number): prime_factors = [] for num in range(1, number): if nu...

 
7:47 PM
That's a post for Code Review: codereview.stackexchange.com Here you need to have a specific question, not just "make my code better" — sfgblackwarkrts 16 secs ago
 
8:23 PM
@kylie.zoltan So, there is no problem but only a code styling issue? You might want to ask this question on codereview.stackexchange.com instead, but check their help pages first. — Progman 28 secs ago
possible answer invalidation by toolic on question by hjkl: codereview.stackexchange.com/posts/278800/revisions
possible answer invalidation by toolic on question by hjkl: codereview.stackexchange.com/posts/278800/revisions
 
9:28 PM
maybe codereview that checks you mongo apporach, would be a good start — nbk 54 secs ago
 
9:52 PM
Is the code working and you are more just looking for a code review, or is there an actual issue you want addressed? — Drew Reese 28 secs ago
 
10:49 PM
@Duga Edit provided by the poster that answered.
 

« first day (3388 days earlier)      last day (43 days later) »