12:00 AM

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

I'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

Goal 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

Context 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

These 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

I 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

I 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

I 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

I'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

I 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

In 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

Introduction 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

This 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

I 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

CodeReview 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

Recently 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

Autodidact 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

TL;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

I 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

I 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

Well, 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

A 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

I'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