« first day (2584 days earlier)      last day (40 days later) » 

12:00 AM
RELOAD! There are 6697 unanswered questions (89.9352% answered)
 
12:38 AM
0
Q: Is this redux saga test a false positive

BARNOWLI'm pretty new to redux-saga-test-plan, and i think i followed the documentation well i believe . I'm testing to see if the posts saga called succesfully. api.post.getPosts is a service that returns post data from a db. The following test passes, however im concerned if this is a false positive ...

0
Q: String manipulation functions

Daskal Botio0 I would first post the code so its easier to address my difficulties: void Extract(std::string& a,int b); // string a becomes substring of himself by deleting everything after a[b]; std::string Extract(std::string &a,char b); //If it detects a char(for expemle ' ', it will return the first...

 
 
1 hour later…
1:50 AM
0
Q: Get Next Monday and Sunday from particular Date

LathaGiven a particular Date, want to find the next occurring Monday and Sunday. Please help In Brief: If current date is 25 May 2020(Monday) - need to get next monday(1 June 2020)and Sunday(7 June 2020)from current date If Current date is 26 May 2020(Tuesday) - need to get next monday(1 June 2020)and...

 
2:12 AM
I’m voting to close this question because it is asking about improving working code. ask on Code ReviewDaniel A. White 57 secs ago
 
3:02 AM
You're welcome - your code looked nice and clean already, so it wasn't a pain to provide some advice; however, please keep in mind that this type of question is not really what StackOverflow is for. For similar advice, you should consider posting on codereview.stackexchange.comGrismar 53 secs ago
 
 
3 hours later…
6:05 AM
0
Q: Convert Exponential (e-Notation) Numbers to Decimals

Mohsen AlyafeiI have the following short function code that converts Exponential (e-Notation) Numbers to Decimals. I needed to cover all the e-notation syntax permitted by Javascript which include the following: Valid e-notation numbers in Javascript: 123e1 ==> 1230 123E1 ==> 1230 123e+1 ==>...

 
6:44 AM
As a new user here, please take the tour and read How to Ask. Concerning your question, it seems obvious that you need to adjust your compare() function, so I'm not sure what you're asking for. BTW: Compile with warnings and submit your code (once you have it working) for review at codereview.stackexchange.com. There are several things off which will cause problems sooner or later. — Ulrich Eckhardt 35 secs ago
 
6:54 AM
0
Q: How to rate limit a method by generating particular load on demand in c#?

dragonsI am working on a project where I want to generate random throughput on a particular method so that I can do some performance testing on it. This way I can test my method by generating random throughputs and see how my method works under all those scenarios. For example: I need to call my doIOSt...

 
 
1 hour later…
8:23 AM
Monking
 
Monking
 
-1
Q: Generate Rotating Strings

KlausI am trying to comeup with an algorithm which adds rotating set of strings and I am now stuck at generating the next values when the array reaches the last element. Here's my code so far String[] strings = {"a", "b", "c", "d" , "e"}; List<String> regexList = new ArrayList<>(); int ch...

 
 
2 hours later…
10:29 AM
Since your code is already working, you could try to migrate your question to Code Review. — jay.sf 42 secs ago
possible answer invalidation by Mohsen Alyafei on question by Mohsen Alyafei: codereview.stackexchange.com/posts/243164/revisions
 
11:17 AM
0
Q: Rewrite for-of loop (Angular 9)

user225271I'm new to Angular and just studying. Recently I've got a review from my teacher that I've written so much code and Angular 9 provides easier way. Would be really grateful for any advice how can I rewrite it in a correct way. Here's my code: interface Count { count: number; } @Injectable() e...

 
Hello Azzam, welcome to StackOverflow, your question does not match the communities standards, might I suggest trying to implement it yourself, then creating a question if you had problems with CSS? please check out stackoverflow.com/help/how-to-ask and CodeReview website as well. — WiGeeky 18 secs ago
 
11:41 AM
-1
Q: which for loop has better performance in javascript?

Mehrdad Kiani AnbohiI can't find out which loop is better performance than another, if you know help me. I try about loops in js and performance in this site and this is code snippet, you can run and check. const array1 = []; for (let i = 0; i <= 50000; i++) { array1.push(i); } //for... var forT0 = perform...

 
 
1 hour later…
12:49 PM
More of a question for codereview.stackexchange, and anyway you've already posted it there: codereview.stackexchange.com/questions/243168/…David 14 secs ago
 
1
Q: Random generation java logic used in Nifi

Dennis JaheruddinI was just reviewing the source code of Nifi, see explanation and public version of the source. This got me wondering whether there are any obvious improvements here to increase the performance of the random generation. As there are many people using this, the size of the random array could be ...

 
1:17 PM
0
Q: Time and Space Complexity of Prime factorization

srkI have written a function that prints all the prime factors for a given number. Here is my code static void printPrimeFactorization(int number) { if (number <= 1 || isPrime(number)) { // If given number is already prime, no more factors for it System.out.println(number); return; ...

 
 
1 hour later…
2:29 PM
-1
Q: SonarQube flagging String literal duplicated for Sql query bind parameters

AndrewsWe are using SonarQube lint for code quality analysis. The problem is, it is flagging query parameter binding literals as duplicated. However, declaring them as constant does not make sense. Eg: String queryStr = "select * from Person p where p.firstName=:firstName"; Query personQuery = sessio...

 
3:17 PM
0
Q: palindromic substring of a string

sukeshGiven a string of length n. we have to count the number of substrings in which character s[i] of given string is present, where character s[i] is a vowel. example : In this string "coding", character 'o' is present in 10 substrings and character 'i' is present in 12 substrings. so total 22 is an...

 
3:41 PM
-1
Q: Implementing boost::upgrade_mutex using only standard locks

zwhconstIs this my_upgrade_mutex class a valid implementation of boost::upgrade_mutex? class my_upgrade_mutex { std::mutex xmutex; std::shared_mutex smutex; /* symbol xmutex smutex (state) (inter-state) A u u u B x u Aux Axu Aug Agu Agx Axg Axs Dgu...

0
Q: Combine 2 essentially the same method except their arguments

RomanHow to combine 2 essentially the same methods? Maybe some good design pattern exist. 1 method have argument and another don't: // 1st method public void DropCustom(DragEventArgs e) { string HtmlToPaste = default; var formats = e.Data.GetFormats(); // Drop from PC if (formats.Cont...

 
4:05 PM
0
Q: Job_Queue (Thread_Pool) Program

infinitezeroI'm new to std::atomic, std::mutex, std::unique_lock, std::condition_variable and more or less c++11 std::thread, so I wrote this little Job_Queue class, where you can submit a void() function and it will be distributed among some threads. I wonder if there's room for improvement or if I made to ...

 
 
1 hour later…
5:17 PM
0
Q: Implementing A Simple Singly Linked List

Jae BradleyImplementing A Simple Singly Linked List I'm trying to learn Go and wanted to implement various data structures and algorithms from scratch. I wanted to try and implement a singly linked list without using slices. In the sake of keeping things simple, I am not taking into account concurrent ac...

 
5:41 PM
-1
Q: PyQt5 - Custom QWidget not showing up on parent widget

KevadayI am working on a game in which I have completed the engine and the networking layers. I am now working on some GUI for the game using PyQt5 (as the drawing isn't complex). I made a custom QWidget for drawing the game board which is just a widget that positions custom QPushButtons inside itself. ...

 
6:05 PM
-1
Q: Unknown Device with Tensorflow Distributed Training

user3432195I can't seem to get clustering to work with Tensorflow 2.2.0. I'm new to machine learning, and I have read through the documentation, various online example, and posts on this website, but I still can't get a simple cluster to work. I keep getting: RuntimeError: /job:worker/replica:0/task:1/devi...

 
6:45 PM
And ask such questions on codereview.stackexchange.com =) — Guru Stron 27 secs ago
 
7:29 PM
This seems a topic more suitable on codereview.stackexchange.comGoodies 41 secs ago
 
7:42 PM
1
Q: C++ SFML fonts loader

SKIPI am writing a game via SFML. In difference places I want to use loaded fonts. So I decided to write the fonts loader, so that load fonts only one time and use them in the future from class. My code: enum class FontsID { PIXEBOY, DIGITAL7 }; class FontObject { public: FontObject::Fo...

 
8:06 PM
0
Q: In Memory Database in Unit tests, isolate the tests

JuggernautDevI have stumbled across these unit tests in a code review that are using in memory db: private DatabaseContext _context; private Fixture _fixture; [SetUp] public void Setup() { _fixture = new Fixture(); _fixture.Customize(new AutoNSubstituteCustomization()); var options = new DbCon...

 
@CaptainObvious Huh. Any idea why this was deleted?
 
8:30 PM
0
Q: Apply additions on a base array based on date ranges

always_tiredplease roast my code, I hope this is the good place to look for some advice on where I can improve. Problem definition: Apply modifications on values depending on date ranges. Data: Base array - holds dictionaries in the following format: [{'date': 20200101, 'value': 1}, {'date': 20200102, '...

 
8:40 PM
@Zeta I don't see any indication on the post itself..
there was no interaction whatsoever with that
 
9:26 PM
If I understand correctly, you want to change the display in the chrome://newtab page. You could edit the style attribute of the body HTML tag to add background-size:contain. Prior to Chrome v61.0.3161.0, you could use Tampermonkey to run a custom script to inject that CSS piece. However, since then, Chrome no longer lets extensions (incl. Tampermonkey) run scripts in the newtab page (codereview.chromium.org/2978953002). — Narvarth 48 secs ago
 
 
2 hours later…
11:06 PM
You should ask this at Code Review if it works correctly and you want suggestions to improve it. — Asocia 18 secs ago
 

« first day (2584 days earlier)      last day (40 days later) »