« first day (3687 days earlier)      last day (323 days later) » 

12:10 AM
REFRESH! There are 7300 unanswered questions (90.5240 answered)
2
 
0
Q: How to efficiently merge a list of deeply nested HashMaps?

CristianSuppose I have a list of hashmaps (<String, Object>). Values can be either scalar types or a nested HashMap with the same type. I need to merge a list of this maps into a final HashMap, each map in the list has higher precedence than the one before. Also the merge has to be deep: i.e.: map1 = {...

0
Q: Python Script to Display Data in Table From Databases

BennyTrying to display data from two databases into a table, but am running into issues when I run the code. Object Orientated Programming Error Traceback (most recent call last): File "C:\Users\Kevin\Documents\HeidiSQL\rwis_to_cst.py", line 142, in <module> RWIS_TO_CST().main() File "C:\Users...

 
1:07 AM
Stack Overflow is not a tutorial or code review site. Google and YouTube have many good tutorials, and Code Review is a place to get review for working but possibly inelegant code. — Mad Physicist 17 secs ago
This question is better suited for the code review site, but just glancing at the code it looks fine. I do see some parts of the code are similar and could probably be reduced by using a loop, but doing so would reduce the clarity of how each time format is processed, so I think this is fine. — Squarish 15 secs ago
 
0
Q: I have an SVG path. I want that path to infinitely scroll, horizontally, like how a text marquee moves across a screen

JackFrostMy SVG path makes a shape across the screen. I want that shape to move across the screen, left to right, scrolling infinitely. What I have : <svg id="svg" viewBox="-300 0 950 270" > <path d="M-314,267 C105,364 400,100 812,279" fill="white" stroke="white" stroke-width="120" stroke-linecap="round"

 
 
3 hours later…
3:47 AM
Welcome to Stack Overflow! If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 16 secs ago
 
 
1 hour later…
5:04 AM
1
Q: Skeleton for a command-line program that takes files in C

Gabriel Silva SchiliveFirst. If this question is not allowed, I am sorry. Please, tell me so, and I will try to delete this. If it is, I will delete this paragraph. Personal-ish note/Motivation I was studying assembly because of Tanenbaum and C, and decided to make a "graduation" project from the book: a C compiler fo...

 
5:54 AM
Monking
 
0
Q: c++ text based Tic-Tac-Toe

Alice Aaron-forceI am just beginning to learn coding and decided to create a text based tic tac toe board as my first solo c++ project, my goals were as follows - be able to test if there is a winning state on any given board - be able to call the boardstate - have the computer play O's for any possible position ...

 
6:13 AM
I guess you could paste this as a question-answer pair instead, but first make sure the question hasn't been asked yet. Otherwise paste it as an answer under an existing question. Or try one of the other subsites, like Code Review. — Lover of Structure just now
Welcome to Stack Overflow! If you believe that the code works correctly, consider presenting your work (with its unit tests if you can) in a more-complete fashion over at Code Review. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. Before you do that, make sure to read A guide to Code Review for Stack Overflow users first, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". — Toby Speight 22 secs ago
Thank you very much, did not know about code review. Will post it there since it seems a better fit. — Jarne Vercruysse 27 secs ago
 
6:31 AM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 10 secs ago
 
 
1 hour later…
7:39 AM
0
Q: Javascript design not implementation

user273939Design for a Music Streaming Service Use the Strategy pattern to handle various music formats, such as Mp3 and Wav. Implement the Observer pattern to monitor the music playback status. Define a Subject interface to update the Ui whenever there are any changes. Apply the Factory pattern to create ...

 
8:09 AM
I’m voting to close this question because it is off-topic. You could post your question on codereview.stackexchange.comnilsK 30 secs ago
 
 
2 hours later…
10:51 AM
If your code works but you are looking for improvements consider posting it on codereview.stackexchange.com (note: I am NOT saying it is off-topic here since question may be on-topic on many sites). — Pshemo 57 secs ago
 
11:06 AM
0
Q: Accurate countdown timer

StackeritoI modified a code from for an accurate timer from Stack Overflow to create a countdown timer: countdownTimer(5); // seconds function countdownTimer(duration) { duration *= 1000; // convert to ms let interval = 1000; // ms let expected = Date.now() + interval; setTimeout(step, interva...

 
 
2 hours later…
12:55 PM
You could ask this question in CodeReview too (codereview.stackexchange.com). — LoukasPap 30 secs ago
 
1:05 PM
@LoukasPap If the OP is not the author of the code the question can't be asked on Code Review. The question says I found this code, not I wrote this code. — pacmaninbw 54 secs ago
 
1:41 PM
1
Q: Terminal Based Blackjack

Katie Grace PorterThis is my attempt at a terminal based blackjack game. At present, the game does not support betting, although I intend to add it in the future. I would very much appreciate general feedback, but I am especially interested in the following: Comments on docstrings and type hints, as this is my fi...

 
 
2 hours later…
3:25 PM
0
Q: Python function handling path objects and in-memory files (buffers) at the same time

buhtzthe code below works as expected. The goal was to have a function (compute_content()) that can handle files (as pathlib.Path) and in-memory files (io.Python function handling path objects and in-memory files (buffers) at the same time. I need this to easier create unittests. Using in-memory files...

 
3:53 PM
Monking
 
4:42 PM
0
Q: Cleaning importrange from a google sheet but keeping the displayed values

SerrotI wrote a script in GAS (i am familiar with JS but this is the first time I use GAS) , this script search and cleans the formula "IMPORTRANGE" from a workbook, leaving only the displayed values. function cleanFormula() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheets = ss.getSheets(...

 
 
3 hours later…
7:17 PM
0
Q: Find the list of combination (with repetition) given rank and number of items. Lexicographic ordering)

ReptorianThe problem involves the fastest possible method to generate a list of combinations which repeats from all the possible combinations with repetition allowed. I know there needs to be a way to calculate n from gamma(n,r)=v given r and v in order to get the fastest possible approach, but it's proba...

 
7:39 PM
This is exactly the kind of thing I was hoping to encourage you to investigate with my comment on your question :) If you need people to try to find a faster way (which might not be possible), you could try asking over on Code Review, but please explain what the data represents, in case there are any optimisations that can come from that. — Andrew Morton 9 secs ago
 
8:22 PM
possible answer invalidation by Cristian on question by Cristian: codereview.stackexchange.com/posts/285398/revisions
possible answer invalidation by Cristian on question by Cristian: codereview.stackexchange.com/posts/285398/revisions
possible answer invalidation by Cristian on question by Cristian: codereview.stackexchange.com/posts/285398/revisions
 
 
3 hours later…
11:10 PM
0
Q: Fast BLAS-like matrix multiplication in Rust

JS4137I have some matrix multiplication code I am writing for a linear algebra library I'm working on. The goal is to emulate BLAS (and achieve BLAS-like performance) without using a BLAS library, as my use-case only needs 2 or 3 BLAS operations and using a BLAS library would be pulling in too many unn...

 
11:58 PM
Welcome to Stack Overflow. This website is not meant for learning. For future reference, you should direct these kinds of questions to Code Review. — Squarish just now
 

« first day (3687 days earlier)      last day (323 days later) »