« first day (3870 days earlier)      last day (130 days later) » 

12:13 AM
REFRESH! There are 6713 unanswered questions (91.3119 answered)
 
 
3 hours later…
3:37 AM
0
Q: Python Runtime Config

farhanhubbleI am implementing runtime configuration for a python package. I am doing this in mypkg.config.__init__.py. The idea is to load the configuration from a JSON file into a Pydantic class variable and make the variable visible throughout the package (as a module-level variable). A module function let...

 
 
2 hours later…
5:52 AM
Monking
 
 
2 hours later…
8:03 AM
Since there is not a specific problem to ask about, this feels like it would be better suited to CodeReview. — JaMiT 6 secs ago
 
 
1 hour later…
9:19 AM
0
Q: Advent of Code 2023 day 1: Trebuchet in JS, part 2

konijnThe task involves analyzing a bunch of lines containing lines of text. Each line represents a calibration value that needs to be recovered by extracting the first and last digits and combining them into a two-digit number. The goal is to find the sum of all these calibration values. Note: sometim...

 
 
1 hour later…
10:27 AM
1
Q: Advent of Code Day 8

francescoIs there a more idiomatic (and concise) approach for the count_steps method? i.e. without using a while loop and incrementing a variable data = File.open('input') .read # path is a string containing an alternating sequence of 'L' and 'R' characters # e.g 'LRRLRLRLLRLLRLRLR' path, node...

0
Q: Summing Duplicates Across Sublists in a Nested List

XM01 - stands with PalestineI hope my message finds you well. I am seeking your expertise and feedback on a specific issue I have encountered in the repeat_sum function within the codebase. The function is designed to compute the sum of integers that are present in two or more sublists within the input list Here is the curr...

1
Q: Nodejs Websocket pulling new data from InfluxDB

KunLunI have a nodejs server with websocket which is pulling the new data from InfluxDB and send it to client. The piece of code is this: const ws = require("ws"); const { QueryAPI, Bucket } = require('../db/dao'); //insert data from rowObject to intoData //return the time of current series function i...

 
If you have working code, and don't have a specific question other than a generic "is my code OK?" or "Could my code be better?", then this may be better suited for Code Review. You should however post the actual code you have used (create table definitions etc) and preferably sample data, rather than just a written description of your code — GarethD 1 min ago
 
 
1 hour later…
11:41 AM
If this is otherwise working code then you may be looking for Code Review. — David 7 secs ago
Welcome to Stack Overflow! @David, the question needs work before it's suited to Code Review. You could have pointed the asker at A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. we need a good description of the purpose of the code to give context, and question titles should simply say what the code is for (the question is always, "How can I improve this?"). It's important that the code works correctly; include the unit tests if possible. — Toby Speight 44 secs ago
 
 
1 hour later…
1:06 PM
0
Q: Im new to Programming and my code doesnt work

 soraThis program should output the smallest array index of the most common letter in the string and it works for some inputs but for example "zzz" and "AAA" outputs 1 instead of 0 :( #include <stdlib.h> #include <stdio.h> int most_frequent_letter(const char *text) { long unsigned result = 0; ...

 
@CaptainObvious I voted to close it
 
 
1 hour later…
2:15 PM
0
Q: Python optimization search pythagorean triplets

MarvinLeRougeI have an optimization problem. Be it about code, algorithm or maths, that, i don't know. My goal is to find pythagorean triplets satisfying a = b + 1 or a = b - 1. m and n are the triplets generators. The following code produces the desired output, but it's not fast enough from about the 11th or...

 
2:37 PM
0
Q: Calculating the Sum of Duplicate Elements within Sublists of a Nested List

XM01 - stands with Palestinerepeat_sum is designed to compute the sum of integers that are present in two or more sublists within the input list. I'd greatly appreciate your insights and expertise through a code review. I'm interested in all feedback, suggestions, or any potential optimizations. def repeat_sum(arr): arr...

 
2:56 PM
@CaptainObvious ffs, write an answer and see the user is being deceptive. Deleted the old post and posted the exact same code in a new question.
 
 
2 hours later…
4:57 PM
Monking
 
5:42 PM
The initialization code looks fine, the above comments are just nitpicks. When you have code that works and you want style help, Code Review is the place to ask. — Barmar 25 secs ago
 
6:02 PM
0
Q: How to reduce the build time of Docker image layer in GitHub Actions?

shaik moeedI have a Dockerfile with ubuntu:22.04 as a base image and a manual Python installation(specific version i.e., 3.11.1) layer which takes a long time. Approach 1: Build a custom_image with ubuntu:22.04 as a base image and a manual Python installation layer. Create another Dockerfile with custom_im...

 
6:25 PM
1
Q: Advent of Code 2023 day 1: Trebuchet (Part 1 and 2)

HarithPart 1: The task involves analyzing a calibration document containing lines of text. Each line represents a calibration value that needs to be recovered by extracting the first and last digits and combining them into a two-digit number. The goal is to find the sum of all these calibration values....

0
Q: Looping without looping statement

user278619An alternative to loop statements handy when the domain specific language (DSL) prevails the programming language technicalities, is implemented with two instances calling each other while running code supplied beforehand. public class Twirl implements Runnable { public static final Twirl em...

 
 
2 hours later…
8:19 PM
0
Q: Advent of code 2023 day 8: Path finding in the desert - in pure Bash

janosPart 1 In today's task, a network of paths is defined like this: LLR AAA = (BBB, BBB) BBB = (AAA, ZZZ) ZZZ = (ZZZ, ZZZ) The first line LLR is instructions to follow to change position. When the current instruction is L, change position to the left value of the pair. For example at position ...

 
8:42 PM
Monking
 
9:05 PM
0
Q: Advent of Code 2023, Day 8 Part 1 - Beginner Rust Solution

F McAContext I'm doing Advent of Code as a way of learning Rust, and have a working solution to Day 8, Part 1. This involves moving between nodes, starting at AAA and looking for ZZZ, where the next node is determined by the L/R instruction chain in the first line. We loop over the L/R instruction set...

 
@katniss that works actually. Although it's one of the most unusual pieces of code I've ever seen. I don't think I can get that past code review honestly. But thanks for sharing the knowledge anyway. — TKharaishvili 22 secs ago
 
9:24 PM
If you have working code and just want to know if it can be improved, consider checking our sister sites Code Review or in this case Game Development to see if your question can be asked there. Stack Overflow doesn't allow undefined/opinion-based requests for 'improvement'; only specific, objectively-answerable questions are allowed here. — TylerH 15 secs ago
 
 
1 hour later…
10:36 PM
0
Q: Hashtable implementation in C

AKEO I start to implement the function hashtable insert : The function must be inserted by adding the node to the correct linked list if the key does not exist, or by replacing the value of the correct node if the key exists. The latest element is the head of the linked list. struct obj_and_free { v...

 
10:54 PM
I think your question belongs to codereview.stackexchange.com - ask it there and get a detailed review! — Yulia V 15 secs ago
 
11:44 PM
0
Q: Are there other means to apply place holders to an array in a loop for pdo statements for search functions with unknown numbers of keywords in php

Luke LenacioI'm a newbie to php and other programming for that matter. I'm doing this simply to learn. Figured the code could be used to search through a police database or something. The statements are Microsoft SQL Server. I'm running rocky linux 9 with the unixODBC drivers in order to accomplish the task....

 

« first day (3870 days earlier)      last day (130 days later) »