« first day (3865 days earlier)      last day (89 days later) » 

12:14 AM
0
Q: Advent of Code Day 2 in Python

code writer 3000import re def part_1(): max_red = 12 max_green = 13 max_blue = 14 passed_game_sum = 0 def process_game(rs): for r in rs: for c in r.strip().split(','): pick = re.findall(r'^([0-9]+) ([a-z]+)', c.strip()) if pick[0][1] ==...

 
12:37 AM
0
Q: Make a script to call pager duty's API and update on call

Alex OrbitI made this script it works, I'm just looking for ways to make it better/reading to get better. #!/usr/bin/python3 import requests, logging, json, subprocess, re, smtplib from datetime import datetime, date # logger things log_file = '/var/log/pagerduty.log' ## logging things logging.basicConfig...

 
1:12 AM
REFRESH! There are 6714 unanswered questions (91.3074 answered)
 
 
2 hours later…
3:42 AM
0
Q: SQL; Inserting Rows within a CTE - Is this correct?

antonoyaro8I am working with Netezza SQL. I have the following table (called "table_a") about elephants and the year that they escaped from the circus: elephant elephant_status year year_escaped 1 performing 2015 2018 1 performing 2016 2018 1 perf...

 
 
3 hours later…
7:03 AM
I’m voting to close this question because it belongs on Code Review. — user16217248 20 secs ago
 
-1
Q: Best Practices For A Newbie

FloorSignI am quite fresh to c# and creating programs. I wrote a very basic program which allows you to go through menu selections via arrowkeys and select your selection along with sending you to a sub menu and back. It doesn't do anything at the moment because it's not done, but the purpose of this ques...

 
7:40 AM
If this is working code that you think could be improved see Code Review, and note all sites in the network have guidance on How to Ask. — jonrsharpe 44 secs ago
 
 
1 hour later…
8:43 AM
0
Q: A recursive_minmax Template Function Implementation in C++

JimmyHuThis is a follow-up question for A Maximum Function For Various Type Arbitrary Nested Iterable Implementation in C++. Besides the function for finding maximum, I am trying to implement recursive_minmax template function which returns both minimum and maximum values. The experimental implementatio...

 
 
3 hours later…
11:48 AM
Hi! This question would fit better on codereview.stackexchange.com. StackOverflow is better suited for specific questions about problems you had while writing the code. — Sam 38 secs ago
 
12:05 PM
Just like on Stack Overflow, all the relevant code need to be inside of the question on Code Review as well. In its current state, the question would be off-topic there as well. — Ivar just now
 
12:34 PM
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 12 secs ago
 
 
2 hours later…
2:35 PM
Monking
 
2:52 PM
0
Q: By creating an architecture, it is better to have many classes that handles different scenarios, or a single one that handles all?

Paul Marcelin BejanDuring my limited professional experience, I have been involved in microservices projects with a common structure: The Controller takes a request and validates it using the jakarta.validation.Valid annotation. After validation, it passes the request to the service. Inside the service lay...

 
 
3 hours later…
5:45 PM
It seems that you look for a code review rather than a solution for a problem. Please have a look at the community Code Review for this. — cyberbrain 26 secs ago
 
6:02 PM
Monking
 
6:19 PM
Monking
 
7:06 PM
0
Q: PHP And Reflection For Showing Available Formatters On A Report Column

Bigbob556677I'm using reflection in PHP to load a list of available Formatter classes that all have methods that do formatting of a value in a specific CSV column. e.g. for Phone numbers input=5554443333 output=(555) 444-3333 Here are three formatters as well as the base class with a static method to find al...

 
7:54 PM
0
Q: Advent of Code 2023 Day 2 in C#

NatecatTo paraphrase the puzzle, Santa takes a walk with an Elf, and they play a game involving a bag of colorful cubes. In each game, there is an unknown number of each colored cubes in the bag, and the Elf pulls out a number of cubes, for example: Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green...

 
8:17 PM
0
Q: Redouble each occurrence of char recursively, and add n

Tobias GrotheIn following of this question, I would like to have a second review. My code is working correctly now (I hope), but how to replace the "pre-"calculated map from line 7 to 25 with a simple formula/term? Thanks in advance. import java.util.HashMap; public class Redouble { public static String ...

 
 
1 hour later…
9:26 PM
0
Q: Python integer optimization with PuLP that I think can be faster

Matt SamuelI have a problem where we are given multivariate polynomials in variables like y_i and z_j and the goal is to express them as sums of products of terms of the form y_i-z_j with nonnegative integer coefficients. For example, you might be given (y_1 - z_1)*(y_3 - z_2) + (y_1 + y_2 - z_1 - z_2)*(y_1...

0
Q: Advent of code 2023 day 3 in pure Bash

janosYes I'll keep doing this until I cannot be bothered to do it in Bash ;-) (Well today is probably the last one ;-)) Part 1 To paraphrase the puzzle, given some input ("engine schematic") like this: 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...$.*.... ...

 
 
1 hour later…
10:30 PM
Code Review (make sure to read that site’s asking guide) — Ry- ♦ 39 secs ago
 
10:53 PM
@Shawn, that's my experience too. Another developer is working on it, so if he can shrink the scope down maybe we can ask a codereview or compiler bug question. — KJ7LNW 27 secs ago
 

« first day (3865 days earlier)      last day (89 days later) »