« first day (2730 days earlier)      last day (1272 days later) » 

12:00 AM
RELOAD! There are 7068 unanswered questions (89.7405% answered)
 
 
1 hour later…
1:09 AM
@pacmaninbw we’re racing stock for the first year, so just going to do light maintenance to it
The 3rd year we plan to start getting into modifieds
 
 
2 hours later…
2:46 AM
0
Q: LeetCode 1108: Defanging an IP Address

EmmaI'm posting a solution for LeetCode's "Defanging an IP Address". If you'd like to review, please do. Thank you! Problem Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" ...

 
 
1 hour later…
4:00 AM
3
Q: Approximation search source reconstruction localization algorithm

KeithMadisonGoal To determine the coordinates of some signal source in a 3D space, given the coordinates of four observers and the time at which each saw the signal, as well as the velocity of the signal. Algorithm The algorithm is more-or-less comprised of two pieces: the approximation search algorithm, and...

 
 
3 hours later…
6:53 AM
1
Q: Making an array of spiral numbers

Dhruv AgarwalContext I was solving a task on CodeSignal here You can view the task on the link I provided above. Code def check(matrix, num): for arr in matrix: for number in arr: if number != num: return True return False def spiralNumbers(n): array = [] ...

0
Q: Create IObservable<T> From Func<T>

Christian FindlayThese extensions create an IObservable<T> that creates a long running task that can be cancelled. It runs the Func<T> after each interval of time and passes the result to OnNext() until the task is ended by the CancellationToken. The important thing here is that only one task is created with one ...

0
Q: Naming a data-attribute to be used for calling a function on click

darkhorseI apologize beforehand if this question does not follow the rules, or seems a bit silly. I really could not find any other place to put this. I will delete it if the case is the former. Anyway, I want to name a data-attribute that performs an action when the element it is attached to is clicked. ...

 
 
3 hours later…
10:20 AM
possible answer invalidation by sanoj lawrence on question by sanoj lawrence: codereview.stackexchange.com/posts/250870/revisions
 
 
1 hour later…
11:25 AM
0
Q: strange errors in python pandas library

Michael LazinI am learning dataframes with python and I am stuck on a strange behavior of errors when I type in the code below. As you can see I am getting errors for the pandas library internals. I am stumped on this code for days and have been stumped. I tried to get help from my online school and I have...

 
Monking
 
11:49 AM
0
Q: How do I get item sub-menus to close when clicking outside the menu using Javascript and no jQuery?

GillianI have a Bootstrap 4 dropdown menu and I would like any open sub-menus to close if a user clicks or taps anywhere else on the page. The menu is dynamically created and each UL has an id created by adding the item's id number to "drop-", e.g. "drop-116". I have added onclick="closeMainMenu" to the...

 
11:59 AM
@CaptainObvious Not working as expected.
@CaptainObvious Not working as expected.
 
12:14 PM
0
Q: Can this numpy code be vectorized?

John SmithI've written the following function to produce n realizations of a CIR process for a given set of parameters: def cir_simulations(alpha, mu, sigma, delta_t, n, num_sims): x = np.reshape(np.array([mu] * num_sims), (-1, 1)) for i in range(0, n): x = np.concatenate((x, np.reshape(x...

 
Try codereview.stackexchange.com — JCWasmx86 45 secs ago
I’m voting to close this question because it would be better on codereview.stackexchange.comAlan Birtles 46 secs ago
If you want to have working code reviewed for improvement, ask at Code Review please. — πάντα ῥεῖ 48 secs ago
Not sure about simpler methods, but a quick review of the code seems to suggest it's probably linear time and thus not much you can probably do to improve it there without some kind of obscure optimization. As for why your questions are getting removed, it's because this isn't really a question suited to SO, it helps a lot if you read and follow the SO rules, would be better here: codereview.stackexchange.com Take a look at this before asking more SO questions to avoid them being removed: stackoverflow.com/help/askingNuclearman 16 secs ago
 
12:39 PM
0
Q: Java soruce code not met specification?

Steven HardmanI am writing a Java program using Bluej software and I was given a specification to be followed in order to receive full marks, but the problem is that I do not know what else to improve as the program works as expected. Can anybody help me by looking at the specification and the source code, I w...

 
I’m voting to close this question because as mentioned better suited for Code Review. — Nuclearman 35 secs ago
 
1:03 PM
0
Q: Since `strcpy`, `strcat`, and `sprintf` are dangerous, what shall we use in stead of them?

TimIn Computer Systems: a Programmer's Perspective, Unfortunately, a number of commonly used library functions, including strcpy, strcat, and sprintf, have the property that they can generate a byte sequence without being given any indication of the size of the destination buffer [97]. Such conditi...

 
1:53 PM
0
Q: Command-line utility to bump semantic version numbers in an input file

Hungry Blue DevIntroduction bump is a command-line utility that I use to "bump" up the semantic version numbers present in any text file. It is written entirely in C and doesn't use malloc anywhere. Here's a table describing how the various bump levels work: | Bump | Release | Result on 3.2.6 | |---...

 
2:42 PM
1
Q: A get_from_variant function in C++

JimmyHuThis is the follow-up question for A recursive_transform Function For Various Type Nested Iterable With std::variant Implementation in C++. As G. Sliepen's answer mentioned, leaving only recursively transforming operation for recursive_transform() may be a better idea. As the result, the implemen...

0
Q: How can I make this console prime number calculator code shorter?(C#)

ArianI want to make my calculator code shorter. It is my code: using System; namespace ConsolePrimeNumberCalculator1 { class Program { static void Main(string[] args) { Console.Title = "ConsolePrimeNumberCalculator1"; do { do...

 
 
1 hour later…
3:56 PM
0
Q: Personal Finance Management Tool (OOP version)

George Austin BradleyCodeReview Community! I was hoping you'd be able to review my basic OOP program. Last year I did a strictly procedural one and now I’ve incorporated OOP techniques. Ignore the commented out piece of code. The Hungarian Notation is a requirement for my university course so please don’t criticise t...

 
4:20 PM
This would be better at Code Review. Se — Paulie_D 14 secs ago
 
1
Q: trigraph translator

nullptrRecently I thought would what a program look like if all its characters that could become trigraphs became trigraphs for example int main(void) { int array[10]; } would become int main(void) ??< int array??(10??); ??> . As a result I decided to make a program using ansi c89 that takes a...

0
Q: What ameliorations would you suggest on this PdfParser code?

amousAutodidact and inspired by David Beazley code (to improve my skills in Python) i would like to get your feed back on this Parser code. NB: The lazy property let the code be computed only one time if used (https://github.com/dabeaz/python-cookbook/blob/master/src/8/lazily_computed_attributes/examp...

 
5:11 PM
0
Q: Testing a template function in GoLang using mocking - making it DRY & easy to follow

user232326TL;DR I'm wondering how to organise test functions using mocks for GoLang drier & easier to follow. Function I have a template function that is very similar to ACF's getField: It take's in a string (field name) & the post ID. It checks if the ID exists and the obtains the post by ID (the f.store...

 
5:35 PM
possible answer invalidation by Aryan Parekh on question by George Austin Bradley: codereview.stackexchange.com/posts/251096/revisions
 
6:32 PM
You can get code reviews here: codereview.stackexchange.comjmargolisvt 6 secs ago
 
0
Q: Using Task.Run in timed background service that runs an action that synchronously waits

Dmitry SI have a requirement that ASP.NET background service should run Process method every day at 0:00 a.m. So, one of my team member wrote the following code: public class MyBackgroundService : IHostedService, IDisposable { private readonly ILogger _logger; private Timer _timer; public My...

 
 
1 hour later…
8:04 PM
0
Q: Hibernate - how to add table not business related (Spring Boot)

MatleyI wonder what is the best practice in my case: I have table A and I want to add table B that is not business related to table A, so data in table B should be used only to sort data from table A. So in that case there is a wrong approach to add foreign key in table A to table B. I see 2 options: ...

 
8:53 PM
0
Q: Is this a good pattern design for a Unity dispatcher for creating thread safe methods?

z3nth10nWell, my intention here is to allow users to execute Unity methods/properties in other threads by using this Dispatcher implementation: using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Collections.Specialized; using S...

0
Q: Construct list from a dataframe and a formula

Stéphane LaurentA dataframe and a right-sided formula are given: dat <- data.frame( A = c("a", "b", "c"), B = c("x", "y", "z"), NotUsed = c(1, 2, 3) ) frml <- ~ A + B + A:B From them, I want to get this list: # [[1]] # [1] a b c # Levels: a b c # # [[2]] # [1] x y z # Levels: x y z # # [[3]] # [1] a:x ...

 
9:43 PM
0
Q: CeasarAlgorithm in c#

nava b2bI've recently begun to teach myself to code. One simple project that I wanted to do was create a Caesar cipher that works well. { using System; public class CeasarAlgorithm { private const int LetterA = 'A'; private const int LetterCount = 'Z' - LetterA + 1; ...

 
Asking for libraries is off topic also. Simply put: if your code doesn't work, you're at the right place. If your code works, then Code Review could be the place to ask the question (but check the rules there). — trincot 40 secs ago
This is one of those questions which, while on-topic on SO, might be even more on-topic on Code Review. — John Coleman 28 secs ago
This is not Code Review. If you have a specific problem with your code, please describe it in detail along with a minimal reproducible example. Have a look at How to Ask and take some time to take the tourTomerikoo 26 secs ago
 

« first day (2730 days earlier)      last day (1272 days later) »