« first day (3342 days earlier)      last day (668 days later) » 

12:03 AM
REFRESH! There are 8112 unanswered questions (89.2996 answered)
 
 
2 hours later…
2:00 AM
 
 
1 hour later…
3:25 AM
0
Q: Is my code for storing a custom Java Object with non-serializable fields to a file needlessly complicated or inefficient?

Spencer LoginI have a Theme class for storing themes for my javaFX application. I created a serialize method that stores its information as a String and a constructor to create a Theme from a serialized Theme. I had to do this because I can't make Theme implement Serializable, because its fields can't, and I ...

 
3:37 AM
Try to do line profiling to see the bottleneck. I think what makes your code slow is due to the Appender Anyway, you can try to post this in Code Review SE to get better suggestion :D — Kevin Choon Liang Yew 6 secs ago
 
4:23 AM
Monking
 
Monking
 
 
3 hours later…
8:26 AM
please help me where i am wrong are you asking for code review or debugging by community? Please restate your question and ask about specific problem if any. — Ivan Starostin 46 secs ago
 
8:45 AM
code review requests should be on codereview.stackexchange.comIvan Starostin 57 secs ago
 
9:27 AM
0
Q: The Right or Better Way To Structure Business Rules In Go

Muhammad IlhamHope you're doing okay. I've been learning about Clean Architecture and Hexagonal Architecture and currently, I'm a bit confused about the right / better approach to structuring my service layer In my current understanding service layer is a set of business rules, and I currently wrap it around t...

 
10:18 AM
It would probably be better to post this on the Code Review Stack Exchange: codereview.stackexchange.comjuunas 21 secs ago
 
0
Q: Simple Brainfuck interpreter in C with support for nested subroutines

throwaway364Wrote a simple brainfuck interpreter that supports nested subroutines ([ ] commands). #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <assert.h> #define MIN_MEMORY_SIZE 30000 typedef struct { uint8_t *memory; size_t pointer; } BrainfuckState; static void init(Brainf...

 
thanks for reply, i'll create post on codereview.stackexchange.com. i dont know this website. thanks — filiphasan 15 secs ago
 
11:10 AM
0
Q: Asp.Net Core CacheKey Management Best Practices?

filiphasanI created cache management structure for Asp.Net Core and Redis. But i dont know is this best practices or bad. My Github Repo First one is Store my entity keys class is public class CacheKeys { #region User Cache Keys public const string GetUserKey = "user__{0}"; ...

 
11:25 AM
Then this is perhaps more suited for https://codereview.stackexchange.com/. But I don't think there's anything wrong with the while loops for a continuously running service. The condition might ideally be something that can be terminated, e.g. while self.running or using a break in the loop. Error handling within the loop is of course important, since any error may or will terminate the loop. A scheduler approach might not have that problem. — Jeppe 17 secs ago
 
 
1 hour later…
12:27 PM
0
Q: Reverse string with identical spaces as in original String using Java

Sreedhar DanturthiThis is interview question Reverse string with identical spaces as in original String using Java For example Original String : best in the world and is greatest and is making sure the world goes well Output: llew se ogd lrowe hte ru sgnikams idn at setaer gsid nad lrowe htni tseb The code I h...

 
 
2 hours later…
2:11 PM
0
Q: Coordinate Descent Non-negative Least Squares optimization

zdebruineIn my fast implementation of Non-negative Matrix Factorization (Rcpp Machine Learning Library, RcppML), about 40% of the runtime is spent solving Non-negative Least Squares (NNLS) systems (the rest of the runtime is spent calculating the left and right sides of the NNLS systems, a and b, simple c...

0
Q: Converting 2D DP solutions to 1D solutions

SauravI am new to DP and I am learning it by myself so can anyone explain me why in the 1D Solution described below, the iteration starts from the last element and not from starting. I tried iterating from the lowest possible value and I am getting wrong answer on Leetcode. Isn't DP is about solving "S...

 
2:28 PM
Note that asking for the "best" or more "elegant" ways to do something is off-topic for Stack Overflow, as it invites opinions rather than facts. If you have more objective measurements of what you're looking for, we can help with that (e.g., fewer lines of code, faster performance, less memory-intensive, etc.). If you want a review of your code, which may also include other methods of achieving the same result, you might look at the help center for Code Review to see if the question is on topic there. — Heretic Monkey 13 secs ago
 
2:58 PM
Also please ask about a single issue at a time, and don't ask for unspecific recommendations - this is not a code review service. See How to Ask. — ADyson 35 secs ago
 
0
Q: Unsure about current NGINX configuration

CarlosMy site is working as expected, but when checking for syntax validation, an error is identified "upstream" directive is not allowed here in /etc/nginx/sites-available/website:1 I have found solutions for this on SO, but it eludes to the idea that upstream directives should be outside the server {...

0
Q: Recommendations to make better my code

jadrezzI wrote a simple project to train my beginning knowledges of OOP. My Class represent a Televisor that has two types of channel list: the first one is global, that's aplicated to all objects of my class in future, and the second one is a local list, that is, channels that can has only this object ...

 
3:27 PM
Are you asking for a code review for working code or is this advertisement/spam for koa? — Drew Reese 57 secs ago
 
0
Q: Minesweeper using Tkinter

userSo, I have completed a Minesweeper program in Python using Tkinter. A few questions: I feel I should convert this to Object-Oriented Programming. Any starting tips? Expanding on the above, I have way too many global variables. What methods to reduce these? Any basic styling and convention issues...

0
Q: Downloading code from html email in Cypress using inBucket API

TheTanaduHi so I'm searching for more optimal way of doing this. I can't rely on inbucket js client so I tried to do function by myself with native Cypress commands and JS. I try to extract from latest mail the auth code. Known bad habits as workaround (which I'd like to get rid of): cy.wait... (no clue ...

 
4:19 PM
-1
Q: Dependency track marks activemq-broker to have vulnerability

kendzikqI use spring-boot-starter-activemq for the latest version of springboot (2.7.1). The dependency tracker in our company says that activemq-broker (which is part of the starter) contains the CVE-2015-3208 vulnerability. This is related to XML External Entity Injection. We use activeMQ instead of ar...

 
4:57 PM
This may be a better fit for Code Review Stack Exchange. — Timur Shtatland 9 secs ago
 
5:11 PM
0
Q: A simple spaceship game by a newbie

Simone Licciardihow could i improve this code? it's a little game. If you run it, instructions will appear. thank you. In particular, i'd like to know whether I can a) make it considerably shorter b) any trick :) ? c) whether I can get rid of the repetition in 130-150. import keyboard import random from threadin...

 
This looks more like a codereview question — Chris 14 secs ago
This would be a good question to ask on Code Review, since you already have working code that you'd like to improve. It's specifically for these open-ended "how should I improve this code" sorts of questions. — Sneftel 39 secs ago
 
5:37 PM
I’m voting to close this question because it is working code asking for a Code ReviewDaniel A. White 14 secs ago
 
6:03 PM
0
Q: How would I write this composition point free?

OlaBandolaI've recently tried to write my functions by using composition. But this one, renderCross' is especially difficult to convert fully. It's the n that I'm trying to make disappear. I've tried using <*>, and pointfree.io uses liftA2 (but this results in very ugly code) so I would believe I'm at leas...

 
 
1 hour later…
7:20 PM
0
Q: javascript backtracking algorithm with unexpected behavior!

aserwin"use strict"; let puzzle = [ [0, 0, 7, 0, 0, 3, 5, 0, 0], [6, 0, 5, 4, 0, 8, 3, 0, 2], [0, 0, 4, 5, 2, 0, 9, 0, 6], [0, 0, 0, 0, 7, 1, 2, 0, 9], [0, 0, 0, 0, 0, 0, 0, 0, 0], [8, 0, 9, 2, 3, 0, 0, 0, 0], [9, 0, 1, 0, 8, 5, 6, 0, 0], [7, 0, 3, 9, 0, 2, 8, 0, 5], ...

 
7:38 PM
This is probably worth putting on codereview.stackexchange.com instead of here — evolutionxbox just now
 
 
2 hours later…
9:29 PM
0
Q: Conditionally adding entries to array/object

Matthew JensenI want to initialise an array where some or all of the items should be added conditionally. What I have currently is something like this, using spread and ternary operators: const options = [ option1, option2, option3, ...user.isAdmin() ? [ adminOption1, adminOpt...

 
10:20 PM
0
Q: A C++ Job Manager Class

big54macI've created a JobManager class that manages the execution of submitted Jobs on periodic intervals. While the JobManager is running, the API allows the user to: Add or Remove a Job to/from the JobManager Change a Job's interval, function parameter, and function Signal a Job to run if it is waiti...

0
Q: Stay DRY in jQuery

kvkootenI'm new to JavaScript / jQuery and I have no idea where to look to simplify my verbose code: $(function() { $("#first-item-marker").hover(function() { $("#first-item-heading").toggleClass("focus"); }); $("#second-item-marker").hover(function() { $("#second-item-heading").toggleClass("

 

« first day (3342 days earlier)      last day (668 days later) »