« first day (3190 days earlier)      last day (115 days later) » 

12:00 AM
REFRESH! There are 8063 unanswered questions (89.1817 answered)
REFRESH! There are 8063 unanswered questions (89.1817 answered)
 
 
1 hour later…
1:13 AM
0
Q: Number of numbers from 1 to 100 where three numbers from 1 to 100 cubed equal n

Bgil Midol From numbers from 1 to 100, count the numbers where the following equation is satisfied with \$1 <= a <= 100\$, \$1 <= b <= 100\$, and \$1 <= c <= 100\$: $$a^3 + b^3 + c^3$$ I have this: def has_power3(n): for i in range(1, n+1): for j in range(1, n+1): for k in range(1,...

 
1:40 AM
0
Q: Find the third biggest integer of an array

antonio-erickHow can i make this work with fewer lines? The goal here is to get the third biggest integer of an array. I would also appreciate if someone polished this code. let array = [442, 93, 3, 5, 30, 10]; const f = (arr) => { let secureArr = [...arr]; let big0 = Math.max.apply(null, secureArr...

 
 
1 hour later…
3:00 AM
0
Q: Small Scheme Interpreter evaluating operators?

TheSinisterStoneI'm writing a mini-Scheme interpreter in Java, and everything works well right now. Though, one part is driving me slightly insane because of how it looks. I'm constructing an AST for each type of expression in Scheme e.g., applications, defines, cond, if, lambda, so on and so forth. The applicat...

 
Stack Overflow is meant for questions on specific problems on non-working code. This "Suggest changes please, I want to get better." seems like you are asking for a code review on an already working code, ....which does not work well here. Take the tour and How to Ask. — Gino Mempin 27 secs ago
 
 
3 hours later…
5:35 AM
Monking
 
6:31 AM
possible answer invalidation by N3buchadnezzar on question by N3buchadnezzar: codereview.stackexchange.com/posts/273406/revisions
 
 
2 hours later…
8:35 AM
I am still not sure, what you are asking. Are you looking for Code Review? — ceving 19 secs ago
 
8:50 AM
0
Q: replace all multiple spaces and tabs to a single space only in a file

quentin99Is there a way to replace all multiple space and tabs in a file to single space only? I searched and so far I can only find the replacing multiple space: my $var = "try string here"; $var =~ tr/ //s; print "$var";

 
9:07 AM
I’m voting to close this question because it belongs to codereview.stackexchange.comzubergu 57 secs ago
 
@Duga Not sure about that one - it looks like it's adding code for review, which might be better in a blockquote. But does it need to be in the question at all?
 
If your code works and you just want someone to review it and come with suggestions, please post it over at Code Review instead. — M. Eriksson 7 secs ago
Do you have a specific problem or are you seeking some sort of code review? — MickyD 32 secs ago
 
 
1 hour later…
10:38 AM
I'm very sorry I posted in the wrong section! Anyway, thank you for your suggestions. Just to make sure I understand, should I post my question under codereview section? — user18045552 58 secs ago
 
11:04 AM
0
Q: This code transforms a normal map into a 2d gradient field and then iteratively integrates it to a likely solution. C++/CUDA

Niklas HauberI don't have a lot of experience with C++/CUDA yet and would appreciate some advice mainly on the code style specific to C++ (I come from a C# background). Any advice on increasing performance would also be appreciated (using shared CUDA memory comes to my mind and I might implement that later). ...

 
11:26 AM
I think you have to ask this question on code reviewSarout 39 secs ago
Questions asking how to improve successfully-running code are too open-ended for Stack Overflow's remit. This question might be appropriate to codereview.stackexchange.com, but read their help first to be sure it's on-topic and that you form the question correctly. — T.J. Crowder 58 secs ago
 
12:03 PM
@Peilonrayz It lost a couple hundred points again.
@TobySpeight It's a bit iffy indeed, but if I read the answer the original question wasn't particularly clear either.
@SᴀᴍOnᴇᴌᴀ I don't know what OS he's running, but most have the option to have multiple (virtual) desktops inbuilt. OpenSUSE had it almost a decade ago already and Win10 added it a year or two back.
Sometimes I'm at 5 at work, although it only works if you stick with 1 application per desktop. Trying to open Excel on 3 out of 5 will give you a bad time when opening/closing files since it's going to switch instances in an unhelpful way.
 
12:25 PM
0
Q: Skill leveling system with different skill level titles (JavaScript)

LuckyLukeI'm making a text-based RPG in JavaScript. I made a skill leveling system that works, but I feel like the function arguments get passed around a lot and, the code is not very scalable. Do you have any suggestions on how I can improve this code? Ideally, I want to call only one function like: addE...

 
12:40 PM
Questions about optimization of running code is better asked at Code ReviewJens 16 secs ago
 
1:23 PM
I’m voting to close this question because there is no error but OP wants a code review. — vanje 54 secs ago
 
1:47 PM
0
Q: program that demonstrates the reservation of tickets

NostradamusI wrote a ticket reservation system for an event that consists of a server (daemon) that takes into account the record of reserved seats and a client that can display vacancies / occupied respectively to reserve a specific place. The system allows concurrent display of vacancies, but reservations...

 
2:17 PM
 
2:41 PM
0
Q: Knuth up-arrow notation

Bgil MidolI have implemented Knuth up-arrow notation in Python: from functools import lru_cache @lru_cache def kuan(a, b, arrows): if arrows == 1: return a ** b res = a for i in range(b): res = kuan(a, res, arrows - 1) return res This can calculate kuan(3, 3, 1) pretty q...

0
Q: Find the number of intervals between given lists in Java

VibajI want to create a function which will return me the sum of the integer present in the lists and also the intervals between the integer lists (please refer to example for clarity) Input 1 list = [30, 450] Output : sum of the lists : 30+450 = 480 intervals : (0 to 30) and (31 to 450) Input 2 lis...

 
3:15 PM
Lori Colston on January 27, 2022
An introduction to psychological safety and ways to evaluate the level of safety in your organization.
 
possible answer invalidation by Vibaj on question by Vibaj: codereview.stackexchange.com/posts/273449/revisions
 
3:34 PM
Please show your actual code instead of pseudocode. — Reinderien 46 mins ago
> You've shown a strange pseudo-code solution that uses for-loops. — Reinderien (in the answer)
Looks like AI. But IDK what Reinderien was expecting.
 
 
1 hour later…
4:52 PM
Monking
 
1
Q: Windows standard calulator replica in WinForms C#

TommasoI tried my best to replicate, in style and functionality, the Windows standard calculator: I would like to get some feedback on the efficiency and readability of my code as well as the approach i chose (for example the one of using the evaluate function on the expression textbox): Form1.cs using...

 
5:17 PM
I voted to close this question as an authorship issue, someone else chose MRC which is equally valid in this case.
 
-1
Q: Is using abbreviations for frequently used long type names acceptable in production code

AlwaysLearningIn a particular module, I find myself writing string::const_iterator a lot. Some functions take four iterators as arguments and their signature becomes impressive indeed. In such a module, is it OK (in terms of coding style) to define using SCI = string::const_iterator; and use SCI throughout?

 
@CaptainObvious See my comment above it has 2 VTC.
@CaptainObvious Not really asking for a code review, is asking a style question.
 
5:49 PM
0
Q: Excel VBA Hide Rows Based Upon List Selection Performance

BrandonI currently have a worksheet with approximately 40K rows and 108 columns that I am working with. What I am doing is creating a list that when user selects a particular text in that list then certain columns and/or rows are hidden. The issue I am encountering is that when 'Unsecured Streamline' is...

0
Q: What is the best/pythonic way to update my dictionary?

JThaoSo I need to update my nested dictionary where the key is "compensationsDeltaEmployee". I created a string cost_perhour to hold the value of my conditional statements. Now that I am done with the string. What is the best or pythonic way to update my nested dictionary with a new key "costPerHour" ...

 
I’m voting to close this question because it belongs on Code Reviewburan 8 secs ago
 
0
Q: Can we have the First VTC post a comment?

pacmaninbwQuite often I encounter a question with at least one Vote To Close, but no comment and no down vote, so that the OP doesn't know that anything is wrong. Would it be possible for the first VTC post a community comment with the selected Vote to Close reason, so the OP has at least been notified tha...

 
@pacmaninbw Thanks, closed as GBP.
 
Always glad to be of service.
 
6:09 PM
Also this is not a code review site. Please read How to Ask and ask a specific programming question — Tomerikoo 29 secs ago
 
0
Q: CLI Generator & Parser

conaticusI have written a module that allows the developer to generate a CLI and parse given arguments. I am fairly new to C and would love to hear feedback on my code to improve it. All feedback is welcome however I am mainly concerned about best practises and optimisation. Included is the header file an...

0
Q: Proper way to transform nested lists to nested maps

PapluscI want to transform a list of lists of lists that I have in a mongodb document into a map of maps of maps in my java Domain class. The problem I have is that the fields are mixed between the levels. For instance, the value of the deepest list in the document is the key of the first level map in t...

 
6:34 PM
CodeReview.SE is a better venue for this question. — BrokenBenchmark 39 secs ago
 
6:47 PM
Monking
 
Questions about optimisation of running code is better asked at Code ReviewJens 59 secs ago
 
7:37 PM
0
Q: C++ thread-safe object pool

wcochranThis is a modern C++ implementation of a thread-safe memory pool -- I want to make sure I am solving the critical section problem correctly (no deadlocks, starvation, bounded waiting) and I am getting details like the rule of five correct (copy not allowed, move doesn't trigger double release). D...

 
8:04 PM
0
Q: Javascript convert number string to Boolean

JeffersonI'm making this control toggle between hide and show base on the value in this hidden value. I wanted to use a Boolean because I can just do something like == true. Is this the best way to do this? Working sample https://jsfiddle.net/tjmcdevitt/4bdrfgcu/12/ $("#hdMeetingDateId").val(500); ...

 
8:33 PM
@TedLyngmo and what would you do with this object, other than destroying it in a well-defined manner? Please don't tell me you are going to dynamic_cast before doing anything, this would be laughed out of a code review. — n. 1.8e9-where's-my-share m. 51 secs ago
 
8:46 PM
"named with _, it means it is immutable" - that may be a convention used by some teams, but there's nothing that enforces it other than code reviews or a custom analyzer. — madreflection 42 secs ago
 
8:57 PM
0
Q: Creating a class and an object in PHP

ijustwanttolearnI tried to take a PHP course in Treehouse and they have an "Object oriented PHP basics" course from 2015. In some of the course students learn and practice with the following code pattern: <?php class Fish { public $common_name = "name"; public $flavor = "flavor"; public $record_weight = "...

 
9:24 PM
0
Q: custom `string` to `int` converter

digito_evoI have written the following function: #include <iostream> #include <utility> #include <string> #include <string_view> #include <limits> #include <optional> #include <stdexcept> // header file std::optional<int> isInteger( const std::string_view token, const std::pair<int, int> acceptableRange...

 
9:43 PM
@CaptainObvious ugh.... OP didn't write code but I can answer the last two questions 😏
 
10:20 PM
Sorry, what is the question here? Is there an issue with the code? If the code is correct and working then perhaps it'd be better suited for code review. — Drew Reese 54 secs ago
 
10:40 PM
This is not a code review site. Please see the tour, the How to Ask page, the minimal reproducible example page, and this help center topic to get an understanding of what kinds of things you can ask here. — Random Davis 18 secs ago
 
11:22 PM
Please be aware that fiddling with a print statement until the results look right and then "saving" the output to a variable is not considered normal practice and would be rejected in a homework exercise or code review. You would instead be expected to format a string correctly using Python's many convenient functions for this, that can easily mimic what print does. — that other guy 14 secs ago
 

« first day (3190 days earlier)      last day (115 days later) »