« first day (2827 days earlier)      last day (1190 days later) » 

12:00 AM
RELOAD! There are 7296 unanswered questions (89.6232% answered)
 
 
2 hours later…
1:32 AM
That's best for codereviewZer0 54 secs ago
 
1:56 AM
0
Q: Reason why online judge says no-output?

Jiwoo KangI've run this code many times on Jupiter Notebook and the outputs seem pretty ok. Why does online judge still say there's no-output? Inputs: 3 Jagger Zhao My email is private! A2090290C Sara Wong e1234567@u.jcu.edu A6480029A Jason Lee E9826819@u.jcu.edu a6032049A Outputs: invalid SaraWong e123456...

 
 
2 hours later…
3:29 AM
Stack Overflow is for specific programming problems, for code that does not work yet. If you already have code that is already working, and you are looking for someone to review it, consider posting at CodeReview. Make sure to read their help pages on how to post your question. — Gino Mempin 35 secs ago
 
3:53 AM
@max my human compiler works overtime. I do more code review than actual coding these days so these are the things that catch my eye ( also why I hate partial examples on SO even when the parts that are missing aren't pertinent to the issue at hand) — engineersmnky 9 secs ago
 
 
1 hour later…
5:06 AM
Monking
 
6:06 AM
0
Q: Simple Python Benchmark

Noctis SkytowerThe following is a quick attempt at testing some limits of my computer: import multiprocessing import time def main(): numbers = tuple(multiprocessing.Value('Q', 0, lock=False) for _ in range(multiprocessing.cpu_count())) processes = tuple(multiprocessing.Process(target=count, args=(num...

 
 
2 hours later…
7:45 AM
0
Q: Concise way to find document label in the given code excerpt

saran3hCan someone please review the below code? I've been trying to make it simpler as one of the reviewer questioned on the code being a bit difficult to read with nullish coalescing and conditional statements clubbed into one. export const getDocumentLabel = ({ documentId, refDataResponse, }:...

 
8:10 AM
0
Q: General Quality of Neural net code

YugenswitchI have officially finished my first neural net that works properly (by my standards right now). But I know there is more than likely some details I am missing or getting wrong that might be affecting the quality of the nets intelligence. I plan on making this a library soon (hence the options for...

0
Q: Flutter api login using riverpod

user236547I'm trying to use riverpod for login with a laravel backend. Right now I'm just returning true or false from the repository. I've set a form that accepts email and password. The isLoading variable is just to show a circle indicator. I've run the code and it works but not sure if I'm using riverp...

 
9:00 AM
0
Q: Board game design in C++

MaybeI'm trying to build a board game and solve it using algorithms such as Monte Carlo Tree Search in C++. My current design follows this python project, in which I have a class hierarchy for Board and a State template as follows // board.hpp #ifndef GAME_BOARD_H_ #define GAME_BOARD_H_ #include <vector

 
9:25 AM
0
Q: How to implement Interface and optimize load of data?

HrBaggeI'm new to .NET and find it hard to connect all pieces from Youtube tutorials. The code below works, but I assume it can be (greatly?) improved? Basically I want to display a product category and the products within. I guess loading the data could be improved? And I can't figure out how to implem...

 
10:14 AM
0
Q: How to create infinite looping by 3 slides at once in BootstrapVue's Carousel?

tesicgThe code looks as following: <template lang="pug"> b-carousel.d-none.d-sm-block( id='categoryRoulette' controls no-animation :interval='0' @sliding-start="onSlideStart" @sliding-end="onSlideEnd" ) b-carousel-slide( v-for="category in chunkedCatalog" :key="category.permalink"...

 
 
2 hours later…
11:51 AM
This is a better fit for codereview.stackexchange.comLiam 51 secs ago
I’m voting to close this question because it either lacks sufficient detail or is off-topic. If you want your code reviewed try Code Review instead. — IInspectable 44 secs ago
 
0
Q: The Next Palindrome in c++

NewUserHere is a SPOJ problem I've been trying to solve: https://www.spoj.com/problems/PALIN/ My approach is the following: if the given number is a palindrome I add 1 to it to start looking for the next one. if the number is NOT a palindrome: I divide the number into 3 parts: odd: 12507 --> first = 1...

 
12:14 PM
If your code works as intended, you may want to try asking this question on codereview.stackexchange.com instead — Energya 37 secs ago
 
12:46 PM
0
Q: Secure socket programming with OpenSSL and C

Ori DavidBackground Lately, I found OpenSSL to be difficult to learn as a beginner, while it can be implemented inside beginner-friendly projects like socket programming. After two weeks of research, I've written the following program. I thought to share it with the community to detect issues that can be ...

1
Q: C++ shared pointer wrapper for lazy initialization

Martin PerryI have written a very simple wrapper around std::shared_ptr that supports lazy initialization. Do you see any problems? #include <functional> #include <tuple> #include <utility> template <class T, typename ... Args> class LazySharedPtr { public: LazySharedPtr(Args ... args) : ptr(nul...

 
1:04 PM
@Peilonrayz My knowledge is more with "obscure" traditional SFF than with the major categories where it's easy to rack up scores. Also, I'm not a badge or rep chaser and don't go out of my way to answer questions unless I think they're interesting.
@Peilonrayz Yes. I'm not always comfortable reviewing more advanced Scala. I'm entirely self-taught and there are some aspects of the language that I'm just not that good with and/or don't use.
But since I am that close, maybe I should spend a few minutes looking over some of the zombies.
Greetings, Programs.
 
1:38 PM
2
Q: SIMD Finding the maximum Euclidean distance to origin (c++)

FunnyBunny leaks memoryI am trying to find the longest Euclidean distance to the origin for each point. Their positions are stored in two float arrays, denoting each point's position on the Cartesian plane. I tried to speed up the function using SIMD (WITHOUT SVML, so no _mm256_hypot_ps), however it still seemed a litt...

 
2:07 PM
This is too vague. Please read Please read Why is “Can someone help me?” not an actual question? . Also, does the above code work to your satisfaction already? Are you possibly looking for a Code Review? — ADyson 39 secs ago
 
Medi Madelen Gwosdz on January 29, 2021
Welcome to ISSUE #58 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. This week, the unreasonable ecological cost of #cryptoart, why nobody is practicing continuous deployment, and our new feature: personalized feeds on Stack Overflow for Teams. From the blog Personalized feeds now…
 
2:30 PM
0
Q: Is it necessary to distinguish between IEnumerable and IQueryable for purpose of Count and ToList?

usr-local-ΕΨΗΕΛΩΝI am doing work based on the following code. This question is about the original open source code, not the ongoing work. The context is paginated listing from database, where you require to get both a page of elements and the total count of elements in your database. The original authors have don...

0
Q: How can I upgrade my validation in JavaScript?

PiotrHow to improve my validation in JavaScript? Namely I am wondering whether some parts of code can be shortened, improved, or removed althogether. I don't want to change the ES5 syntax because so far I am not familiar with Es6 syntax. I also want to avoid using jQuery. This is my validation code: h...

 
2:56 PM
0
Q: Enum Class in Fortran

mcocdawcI tried to implement something like a C++ enum class in Fortran. That means it should be typesafe and scope bound. (No comparison between integers and enum values for example.) The following works, but it is still possible to compare two instances of different enum classes at compile time. Do you...

 
I got an interesting coding challenge from my consultant firm today, just a fun thing some people started doing. The first challenge is: Reverse a string without using a loop. My initial thought is: Is this even possible?
Nevermind... recursion of course
what a stupid assignment
 
@CaptainObvious Off-topic, authorship and code context.
 
3:21 PM
If you already have a working code, you can post it on Code Review too (read their help center before asking) — user202729 58 secs ago
 
@SimonForsberg a lot of "without a loop" is "with recursion"
2
 
3:41 PM
What do you mean by "They do not respond to request for accounts, web mail, or email."? For Scilab, you do not need any special authorization to create your account to access the set of services (ATOMS, Bugzilla, mailing lists, CodeReview, etc). Just subscribe online (or by mail, for mailing lists), and that's it. — S. Gougeon 35 secs ago
 
0
Q: C++: eccentricity function on metric spaces

Pel de PindaAn eccentricity function with parameter r on a metric space X with N points is $$f(y) = \left(\sum_{x \in X} d(x, y)^r / N\right)^{1/r}$$ I have tried to implement this for a general MetricSpace class, with two example metric spaces, namely R^n and a metric on DNA strands. However, as currently i...

 
4:09 PM
Monking - Happy Friday!
5
 
Look I don't know the answer to your question as I am not a Java developer, however you may consider to post this question Also to (Code Review)[codereview.stackexchange.com/#] As is excatly for question for best practices. — Federico Baù 5 secs ago
 
5:03 PM
That's not my point, I am not looking for a code review, I just tried this and I will most likely need this synthax — Dimitri Kopriwa 24 secs ago
 
@SimonForsberg Unroll the loop.
In the C programming language, Duff's device is a way of manually implementing loop unrolling by interleaving two syntactic constructs of C: the do-while loop and a switch statement. Its discovery is credited to Tom Duff in November 1983, when Duff was working for Lucasfilm and used it to speed up a real-time animation program. Loop unrolling attempts to reduce the overhead of conditional branching needed to check whether a loop is done, by executing a batch of loop bodies per iteration. To handle cases where the number of iterations is not divisible by the unrolled-loop increments, a commo...
Yes, that's basically specialized recursion.
 
1
Q: BMI Calculator Java Swing Practice

Miguel MurciaThis is my first question here and I'd like to get some feedback. The program works but I'm not sure the classes I've used are right. First, a class to calculate the Body Mass Index from a double (kgs) and an integer (height in cm): //Data taken from https://codereview.stackexchange.com/questions...

 
5:36 PM
Huh, I just got 2 Steward badges.
I didn't know they were going to do that network wide already.
 
🆒 me too
 
Figured as much.
 
I got one for CV.
 
 
1 hour later…
7:16 PM
0
Q: What is the best way to use the database connection file in PHP?

user9437856I have a connection.php file into my root folder and at the bottom, I added BASE_URL <?php $hostname = "localhost"; $username='root'; $password=''; $db='demo'; $charset = 'utf8mb4'; $options = [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO:...

 
7:41 PM
This question seems more inline with Code Review. Code Review Stack Exchange is a question and answer site for peer programmer code reviews. Stackoverflow is more on-topic for questions about problems and algorithms. — lorem ipsum 42 secs ago
 
0
Q: Is it a bad practice to use BlockingObservable when you need all parallel calls to complete?

filosofo03I have a use case where I'm calling four separate downstream endpoints and they can all be called in parallel. After every call is completed, I return a container object from the lambda function, its only purpose being to contain the raw responses from the downstream calls on it. From there, the...

0
Q: Having an issue with JavaScript freecodecamp exercise

bernard brownI know how to solve this issue with simple switch statements. However, I would like to solve it using arrays and if/else statements. I seem to only get 0 hold for all of my inputs. var count = 0; var arr = [[2,3,4,5,6],[7,8,9],[10,'J','Q','K','A']] var answer = ""; function cc(card) { // Only c...

 
7:55 PM
Ask this Kind of questions at Code ReviewJens 32 secs ago
@Jens it appears that this code is not working correctly and thus would make it off-topic on CR. Please review What topics can I ask about here? before recommending users post there. — Sᴀᴍ Onᴇᴌᴀ 39 secs ago
 
0
Q: Use of parentheses in Swift

samI am learning Swift and just had a quick question about use of parentheses. The code below runs just fine w/o using parentheses, but it certainly looks a lot cleaner using them in this instance. So my question is: In SwiftUI, is it basic practice to use parentheses for the sake of cleanliness? Mi...

 
8:53 PM
It's great you're asking yourself these questions, but sadly your question is off-topic here. Please ask on codereview.stackexchange.com instead. (And, yeah, practice, practice, practice.) — idmean 30 secs ago
The advanced features of any language take time to master. The only advice I can give you (other than trying Code Review Stack Exchange) is to read a lot of code and find the sweet spot between readable and clever coding. :) — Todd A. Jacobs 12 secs ago
It's a lot easier to read code if one understands the problem it is intended to solve, so please move your statement of the problem from the end to the beginning. If your code is working you should be posting it at SO's sister-site, Code Review. SO is primarily concerned with fixing broken code. If you choose to move it (you won't be disappointed), flag the question and ask a moderator to move it, or simply delete the question and repost at CR. If you don't move it you may receive downvotes and votes to close (because the question is "off-topic"). — Cary Swoveland 22 secs ago
 
0
Q: writing a generic object pool in C++

hagoFor a hobby project, My aim is to design and implement a generic system for pooling an arbitrary class of object. I tried implementing it using templates. This pool should support 4 actions: "Create a pool" "Allocate an object from this pool" "Deallocate an object from this pool" "Destroy this pool"

 
9:22 PM
I’m voting to close this question because it belongs on codereview.stackexchange.compjs 54 secs ago
 
9:52 PM
0
Q: (c++) Used a binary search tree to implement priority queue

MoonPeI just want any help I can get with this implementation. This is my first time posting here, I am sorry if I do something wrong in the post. As the Title says, basically I just need the implementation of a priority queue using a Binary search tree (can't use heap or any other method). I did the b...

0
Q: Making my coding harder than it has to be… Ruby

Patrykdef generateHashtag(str) str = str.gsub(/\s+/, " ") if str.empty? return false else if str.length >= 140 || str == " " a = str.split().map{|x| x.capitalize}.join if a.length >= 140 || a == " " return false elsif a == "" return false ...

 
10:30 PM
@CaptainObvious I don't see a Priority Queue yet.
 
10:44 PM
0
Q: Pushing entites through multiple levels of abstraction

t3h_b0tLet's say I have an external library that I want to use in my application, which performs some long running operations: interface ExternalLibrary { void operation1(ExternalInput input); List<ExternalResult> operation2(String input); } I want to trigger those operations using REST endpo...

0
Q: ConvertAll Methods Implementation for Multidimensional Array in C# - follow-up

JimmyHuThis is a follow-up question for ConvertAll Methods Implementation for Multidimensional Array in C#. Thanks to aepot's answer and Olivier's answer. In order to match the usage of the build-in API Array.ConvertAll, the input /output array types of the implemented methods below are similar to [], [...

 
10:54 PM
Is it September already, or does September repeat in January.
 
@pacmaninbw maybe some students do a "Jan-term", or it is the start of a new semester... or schedules have changed because of a global pandemic... or cosmic rays...
 
11:09 PM
0
Q: Make numpy calculation super fast by reducing size of intermediate arrays

Make42I am trying to perform a certain numerical computation in Python with Numpy: import numpy as np # Given: I = 100 O = 1000 F = 10 o = np.random.random((O,F)) ev = np.random.choice(a=[False, True], size=(O,F)) x = np.random.random((I,F)) const1 = 1.3456 const2 = 2.3456 const3 = 3.3456 const4 = ...

 
11:34 PM
@pacmaninbw 3 more VTC needed, though it could be an RBA first
 
11:45 PM
If your code works, and you are looking for suggestions for improvements, code review will be a better place to post. — ryyker 23 secs ago
"I would like to know if there is a better way to write this code." That's very opinion based. I'd post this on code review. — Zer0 27 secs ago
 

« first day (2827 days earlier)      last day (1190 days later) »