« first day (3298 days earlier)      last day (705 days later) » 

12:01 AM
REFRESH! There are 8076 unanswered questions (89.2991 answered)
 
 
2 hours later…
2:26 AM
0
Q: is my variable names are really bad?

sandorAre my variable names really bad? I'm a beginner python "programmer". Trying to do fun, small projects. Didn't wanted to paste all my code here. I hope its okay. def types(cls): months = month_cb["values"] months1 = title_cb["values"] workbook = openpyxl.load_workbook(save_folder) ...

 
 
2 hours later…
4:07 AM
0
Q: Resolver Factory For Lazily Resolved Dependencies

RTDI'm testing some code related to dependency resolution as an IOC pattern which I've integrated into one of my projects. My motivation is basicaly that I'm tired of dealing with dependencies & DI as if stepping through a minefield, and this gave me an idea. Once I have an idea I get locked onto i...

 
 
3 hours later…
7:07 AM
0
Q: Insertion of node at tail in linked list

Divya GuptaIn this why are we using return statement in if condition of function void tail() also why when we use node* head as argument in void tail() istead of node* &head gives us NULL ?? #include<iostream> using namespace std; class node{ public: int data; node*next; node(int val){ ...

 
8:03 AM
If you want to ask about possible improvements of already working code, better post your question at codereview.stackexchange.com . — πάντα ῥεῖ 54 secs ago
 
8:56 AM
This is basically spam. If you want other people to take a look at working code, you should post over on codereview (but only if it fits the site's rules!) — Chris G 46 secs ago
 
 
1 hour later…
10:04 AM
0
Q: Table driven tests in Python using pytest

bluprince13I'd like to have a standard test template to copy from when solving coding puzzles. Typically, I would need to write multiple test functions to check if my function is working as expected. However, it's easier to write table-driven tests. In this case, all I would need to do to add a new test cas...

0
Q: Creation of a mapstruct for TypeScript

Ugo EvolaI have created a TS version of the famous JAVA mapstruct. the result looks like this : export class UserMapper { /*-------------------*\ UserDto -> User \*-------------------*/ @Mappings( { target: 'fullName', expression: 'getConcatProperties(fname, lname)' }, { target: 'cn',...

 
10:37 AM
Where's the comment saying this should be in the codereview stack exchange instead? — Ben Stephens 45 secs ago
 
 
1 hour later…
11:46 AM
0
Q: Looping over Vec rust

DejelI going over a code in rust and see the following: let raw_signatures: Vec<[u8; 32 + 64]> .. fill in values .. for (pubkey, signature) in raw_signatures .iter() .map(|signature| signature.split_at(32)) { println!("{:?}", pubkey); println!("{:?}", signature); } I am not sure ...

 
12:11 PM
0
Q: Transferring values from a json-string into an object-instance in nim

Philipp DoernerWhile writing a web application I've stumbled upon the following problem: I have a relational database. For each table with n columns I have an object-type (called model-object, think ORM) with identically named n fields. Any records queried from a table are converted into such object types. If t...

 
12:22 PM
Welcome! Such questions are off-topic here. You may want to check out codereview.stackexchange.com - maybe consider posting there, but just make sure you read their guidelines first, to see what's required, and what's on- and off-topic. — David Makogon 46 secs ago
 
1:20 PM
I’m voting to close this question because it is asking to improve working code. Ask on Code ReviewDaniel A. White 34 secs ago
 
1:52 PM
0
Q: Formatting a table using unicode symbols in python

SaphereyeThe goal of the project is to take in input for a data, perhaps in the future as a csv, then print it out using UNICODE box-drawing characters. The main function declares the necessary data and Table class contains all methods and data. Code from typing import List import random class Table: ...

 
2:06 PM
Monking
 
 
2 hours later…
3:55 PM
> Visited 1791 days, 800 consecutive
More than 2 years without an interruption.
Voted over 10000 times.
 
I feel like this question would be more suited for codereview.stackexchange.comBARNOWL 8 secs ago
 
Just a suggestion, we people to go through questions with answers and upvote worthy answers.
 
What's your question exactly? For improving working code, it'd probably be better to ask on Code Review instead, but first please read their How to Ask page since they work a bit differently. If you specifically want to ask here, we'd need more details like what exactly you think could be improved. And please fix the IndentationError: unexpected indent in your code. — wjandrea 55 secs ago
 
I've just upvoted 10 answers that were decent.
Taking a short break from homework, still need to get a timer working properly on an AVR board.
 
0
Q: Resolver Factory Pattern for IoC in an Asp.Net 6 Web Server

RTDI'm currently testing an experimental IoC pattern enabled by a factory implementation, currently implemented for use in an Asp.Net 6 web server. The pattern is intended to support lazy resolution of dependencies in a safe, and hopefully acceptable manner, for the purpose of resolving known issue...

 
4:06 PM
On second thought, don't ask on Code Review, cause they only deal with already-working code, and your code isn't quite working. — wjandrea 34 secs ago
 
5:03 PM
I think a question like this should be in codereview.stackexchange.com ? — vee 1 min ago
 
5:16 PM
Monking
 
0
Q: How does React handle side effects when passing dispatch using context?

MxcpanelI noticed that the official documentation recommends passing state and dispatch to different Contexts, like: <StateContext value={state}> <DispatchContext value={dispatch}> {children} </DispatchContext> </StateContext> Usually, I can write a refetch function like this: const refetch = us...

0
Q: LaTeX: tikz and chemfig combination

user3713179Yes, I know, I did an (ab) use of the nodes. Is there a better way to make this image with TeX/LaTeX? Using MiKTeX with Texmaker \documentclass{article} \usepackage[margin=1.5cm,top=1cm,headheight=16pt,headsep=0.1in,heightrounded]{geometry} \usepackage{chemfig} \usetikzlibrary{arrows.meta,shapes,...

 
5:51 PM
@pacmaninbw You writing in C or assembly?
 
@Reinderien C, but examining the assembly and finding places where the optimizer is messing me up
 
Nice. Which AVR are you using?
I'm curious to see how well it maps to reinderien.github.io/timers
 
ATxmega256A3BU
 
TC0?
 
When I get it finished, if I remember I will let you know.
TCC0
According to the family manual/
Currently the LEDs aren't flashing, just lit.
Only 486 pages of documentation in the datasheet. :)
Due tonight at midnight.
 
6:05 PM
Oof.
Do you want to split off a separate chat?
 
Not at the moment, too busy. I've read about half of what I need to for this assignment. Wish I had a JTAG debugger.
Gotta go.
 
@pacmaninbw Something like this is vaguely reflective of your device - imgur.com/a/0MTTc7n. Anyway, good luck
 
6:48 PM
If your code works, but you just want to write "better" code that does the same thing, this should probably be asked on codereview.stackexchange.com . There you will find lots of very helpful folks with lots of good advice. — Stef 43 secs ago
 
7:01 PM
0
Q: I Need help refactoring my pthon script for the freecodecamp python course

XanikI tried my hand at the freecodecamp python algorithm and I came up with a solution for the first question but need help refactoring it. Here is the arithmetic arranger question click here to access the question The solution can be found below: import operator ops = {"+": operator.add, "-": operat...

 
7:24 PM
There is an explicit site for code review codereview.stackexchange.com BUT note the code has to work first. So if you can test your code with unit tests and it works as expected, you can get it reviewed there. — Martin York 50 secs ago
 
0
Q: (Python) CLI Math Game

gZeeI'm a self-taught programmer starting out with Python and my latest project is this game: It runs in the console, displays an equation, takes the user's answer, and increases your score if it's correct. Every level has 5 questions, and the operands get bigger each level. At the end of each level....

 
8:17 PM
0
Q: Show values of lollipop-chart

WillienIm new to visualizing data and im trying to make a lollipop-chart just as this one: data visualization - What is the name of this plot that has rows with two connected dots? - Cross Validated But im failing with the Annotate: # Annotate for row in df.itertuples(): ax.text(row.Index, y2_new+.5...

 
8:41 PM
does your script work? If so, then please use Code Review to get a review and improvement recommendation which would be off-topic for SO. — tacoshy 56 secs ago
 
9:33 PM
0
Q: Writing in multiple selected text inputs simultaneously

H3AR7B3A7I am mostly looking for improvements in readability / performance. I also noticed keyCode on KeyboardEvent is deprecated, but couldn't really find a decent alternative to work with. component.ts: const CTRL = 17; @Component({ selector: 'my-app', templateUrl: './app.component.html', styleUr...

 
9:58 PM
0
Q: JavaScript Linter in Java

dbrokampI wrote a simple Linter that checks for matching opening and closing braces for one line of JavaScript. It utilizes a stack to store opening braces found in the line, then compares the first closing brace found to pop(). I wrote this in Java based on a Ruby version in "A Common-Sense Guide to Dat...

 
10:24 PM
0
Q: Calculate maximum value of expression for potential associations

TomasI have an algorithm that calculates the maximum value of an expression that is made from numbers and * or + by adding parentheses. It has 3 nested loops, so the time complexity should be N^3 static void printMinAndMaxValueOfExp(string exp) { List<int> num = new List<int>...

 

« first day (3298 days earlier)      last day (705 days later) »