« first day (2890 days earlier)      last day (1425 days later) » 

00:01
RELOAD! There are 7478 unanswered questions (89.4916% answered)
 
1 hour later…
01:10
This is very close to a code review and opinionated answers. "What is the best way" ... — Ted Lyngmo 43 secs ago
Your way around really worked! I solved the problem before looking at your suggestion. I just increased the paging size and gave to the if node_count <= 40000: to solve, it took 1h:30min to build the matrix. Is it possible I provide the full TSP code on Codereview to make suggestions like that to optimize the code more. I d really really appreciate it. Thank you so much — v_head 35 secs ago
This question more belongs on codereview.stackexchange.comNaetmul 26 secs ago
01:42
1
Q: Travelling salesman problem optimization

V_headI have this algorithm for travelling salesman problem, it solves for Nodes = 33800 in 20 minutes. I would like to have it optimized more. Please if you find better code lines alternatives, unnecessary chuncks, I d really appreciate it. The following code solves this problem: https://www.docdroid....

02:11
possible answer invalidation by DBJDBJ on question by DBJDBJ: codereview.stackexchange.com/posts/258964/revisions
02:33
0
Q: how to remove trinocular operator in Java8 Stream filter

seansinI'm practicing refactoring and Java 8 with very simple examples of Powerball. I used LottoRank enum to write a function that returns the matched LottoRank based on the number of matches and bonus balls. The 1st place is when you hit all 6 numbers. The 2nd place is when you hit 5 with bonus ball...

02:59
0
Q: Constrained<T> a new version of ConstrainSetter<T>

BanMeThis class allows for setting conditions on setting a property. it has success and failure callback, you can modify/transform the input in some way or check/validate it against a known value. This class Takes an input type, creates a private field to represent that type, optionally it can take an...

 
2 hours later…
 
2 hours later…
06:30
As your code works, this question is better suited for Code Reviewtrincot 13 secs ago
07:14
0
Q: JavaScript: Text Processor

JojiI been trying to implement a text processor in JavaScript that can handle 4 different types of operations: append, backspace, undo, redo. The input for this text processor is an array of arraries of a single element or tuples. For example: const input = [['APPEND', 'Hey'], ['APPEND', ' there'],...

07:24
Have you profiled this code? Profiling is the way to actually determine where it's spending most of its time. And really, this question is a little off-topic and better suited for codereview.stackexchange.comMichael Ruth 1 min ago
08:05
0
Q: JAVA: Input stream has been finalized or forced closed without being explicitly closed

Zabor Silamakaat restart of JEE serverlogs say this: why the imput stream was not explicitly closed? WARN java.util.logging.Logger.doLog Input stream has been finalized or forced closed without being explicitly closed; stream instantiation reported in following stack trace java.lang.Throwable: null at ...

 
3 hours later…
10:38
0
Q: Haskell - saving content of HTTP request in selected file

triveltAs a Haskell beginner I'm currently playing around the IO monad and prepared simple program which gets from the user two information: URL (http) Output file path Then it performs GET request to the provided URL and stores the result in the selected file. HTTP status code of the response is disp...

11:03
0
Q: Generating millions of hashes sha256 and random String in Java

Forcela8I would like to generate Millions of Random String and Hashes in Java fast as possible. For the moment, @Turing85 gave me a pretty good code who was pretty fast only 5 sec for 50M of random String but the next problem to which I am confronted is the slowness when I hash my passwords in my String....

11:40
I’m voting to close this question because it belongs to codereview.stackexchange.com — Islam Elshobokshy 10 secs ago
possible answer invalidation by vesii on question by vesii: codereview.stackexchange.com/posts/258987/revisions
 
1 hour later…
12:51
possible answer invalidation by Andy Sukowski-Bang on question by Andy Sukowski-Bang: codereview.stackexchange.com/posts/257544/revisions
possible answer invalidation by Andy Sukowski-Bang on question by Andy Sukowski-Bang: codereview.stackexchange.com/posts/257544/revisions
13:11
0
Q: Timer convenience class to time code execution for user output

riskypenguinI implemented a convenience class to time code execution and print it to the user. This is part of a bigger project that will be distributed to external users. I was interested in implementing this myself, so I'm not looking for an external module or similiar. Docstrings are omitted here, the fun...

13:37
0
Q: I make the code but condition is failed how to repair my code please help me

Manish sharmaLikelihoods Now let us start implementing the actual classifier. We begin with a multinomial likelihood function. Implement function multinomial_likelihood(probs, freqs) that takes two arguments: probs are dictionary of probabilities of each character (in some language) and freqs is dictionary of...

 
1 hour later…
14:40
Agreed, but unless there is an actual error here, asking for a better solution would make this more of a code review which attract mainly opinionated answers — Nkosi 52 secs ago
@Nkosi Do you recommend to move the question to codereview and remove the question on stackoverflow? — Odrai 10 secs ago
You're asking for a code review (a different site) for incomplete code (see MRE - Minimal, Reproducible Example that you haven't traced or profiled. Where does this spend its time? What does the call tree look like? You're going to have some problem with the analysis, since you defined your function to have both parameter and global dependencies (you haven't characterized the latter, let alone defined them). — Prune 44 secs ago
15:19
0
Q: Tic-Tac-Toe in C language

KevinkunI'm beginner on doing programming and just started learning C language. Then, i decide to make Tic-Tac-Toe as my first program. My Tic-Tac-Toe summary: User can choose whether want to play 2 player or against computer. For computer player, i use Minimax Algorithm so it's not easy for user to win,...

15:49
@Duga rolled back
16:10
0
Q: CS50 - Scrabble game in C. Is there a more efficient way to do this?

Jack SharpeI am new to C and programming in general and currently going through CS50 and learning C. I have a scrabble game running which takes player 1 and player 2's input, calculates the score. Whichever player has the highest score is the winner or a tie if the score is the same. It all seems to work ho...

16:35
-1
Q: How to pause code execution in one function while letting other parts run

Dave SmithI have the following code which requests data from an API but there is a limit to the amount of requests that can be made at the same time, thus I have added a pause code for when the limit is reached: def requests(self): while a < self.dataneeds: do requests... if self.requested ...

17:01
0
Q: count points in octant of a square of size M closer in angle to the x-axis

greybeardIn response to easy function from a pair of 32-bit ints to a single 64-bit int that preserves rotational order by Aubrey da Cunha, Mark Dickinson presented a pair of mutually recursive functions instrumental to that end. The almost repetition irritates me: Below the almost original code and a sta...

@CaptainObvious CNWAI
17:26
0
Q: A C++ Program to Plot An Equation

expr_champ2I am fairly new to C++ and I was wondering if there is anything I can improve in this code(perf, readability)? Thanks. This is the full code: Github Link I will post the parser and eval here(the rest is on the github): std::vector<std::variant<double, std::string>> s_yard(const std::string& str, ...

17:52
0
Q: S-expression comments in Common Lisp

FluxI have written a Common Lisp implementation of Scheme's s-expression comments (SRFI 62): (eval-when (:compile-toplevel :load-toplevel :execute) (defun handle-s-expression-comment (stream char n) (declare (ignore char)) (when n (error "Infix parameter not a...

18:20
@NathanPierson: i * i <= number would require a multiply every iteration because i*i isn't loop-invariant. There's a better trick to test only up to the square root: do{}while( num/i >= i). Since you're doing trial-division anyway, and on many ISAs including x86 getting num % i also gives you num / i for free, use that result as part of the loop condition. (See this code-review Checking if a number is prime in NASM Win64 Assembly for hand-written asm with C-like comments) — Peter Cordes 15 secs ago
18:43
0
Q: Return target informations from nested api json output

curiousHow could i improve the following code. This part was easy to implement but there is a lot of redondancy and i use pandas to return as dict which seems quite odd. def pipeline_place_details(place_id, fields, lang): """Return a dataframe with useful information Args: place_id ([st...

0
Q: How to prevent exceeding maximum allocatable memory comparing the content of multiple image files

oRoiDevI'm trying to make a console application to sort and delete duplicate image files. I have a folder with about 20000 images which take up roughly 70GB of space. I wrote the following script and it seems to work fine, but the issue is that my PC runs out of available RAM memory (it has 16GB) withou...

@SᴀᴍOnᴇᴌᴀ @Mast So has anyone thrown in their hat yet?
@pacmaninbw I haven't heard of any such occurrences yet
19:02
@greybeard: Fine by me. I rarely visit CodeReview - as far as I'm concerned, what you do there is entirely between you and that community. — Mark Dickinson 31 secs ago
@pacmaninbw Not that I know.
Although I strongly suspect a couple of people are considering it.
19:59
0
Q: Speed performance of sqlite3 queries looped in python

KhaledI have a table data stored in a database ships.db, the data are informations of tracked ships hourly. The table data looks like this. time | shipId | longitude | latitude --------------------------------------------------------------------- 00:00:00 1 xx.xxxx yy...

 
1 hour later…
21:16
0
Q: Constructing Functions Patterned After Common Lisp Built-in Functions

davypoughThis is an experiment to see what's involved in adding new functional capability to the Common Lisp baseline. In this case, it's adding a sequence function to select elements from a sequence satisfying a predicate. I don't regard such baseline functions as simple utilities, because they seem more...

21:42
1
Q: imap on generator object without monkey patch?

Potter AI am processing an unknown "length" of generator object. I have to keep things "lazy" because of memory management. The processing is compute heavy, so writing it multiproc style is the solution (or at least it seems for me). I have solved this problem of multiproc on generator object with a com...


« first day (2890 days earlier)      last day (1425 days later) »