instruction
stringlengths
71
95.1k
I am trying to parse a s-exp based langage and I am trying to prototype it using Common-Lisp, however, the reader has quite a few reader macros already defined that are getting in my way. I have this macro, which basically does seem to work and do what I want, that is temporarily disabling some reader macros and enable...
Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Define normal use case patterns: The next part of this mocking exercise was to simplify the usage. So here I wanted to define objects that had the standard call ...
I'm implementing Reiner Knizia's card game 'Schotten Totten' in Python. It's a card game for two players, where you compete to claim boundary stones between you and your opponent by forming poker-like combinations of three cards on each side of the stone. My goal is to make the implementation easily moddable, so that u...
A while back I made an octree system that stores 15-bit voxel in a 32x32x32 voxel octree: 32x32x32 units octree, that supports 15-bit data units I have since improved upon this system. The new octree structure is largely the same except for a key difference, being that that index nodes are now relative to the branch (r...
I've been learning C for some quite time now and wanted to test my skills by implementing the game of life in C. Please give me a general review, and include the style. Is code like that of function fetch_pop good or should I be more clear? Should I put more comments? If so, can you give me some examples? Can I improve...
Are the formulas used in getTemperature() and setTemperature() correct? #ifndef LJ_HPP #define LJ_HPP #include <vector> #include "common.hpp" #include "vec3.hpp" class LennardJones { public: real kB; real epsilon; real sigma; public: LennardJones() { kB = 0; epsilon = 0; ...
Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Description: In part 3 I described how I expect the Unit Test to be constructed. This article I am jumping to the other end. This is the object that will act as ...
Let's consider a matrix of integers m: [[1,2,3] [4,5,6] [7,8,9]] Which represents a graph: (1) / \ (4) (2) / \ / \ (7) (5) (3) \ / \ / (8) (6) \ / (9) There are two implementations of traversals bfs and dfs. BFS uses queue, DFS uses stack, since there is no stack data structure in python bot...
First things first, I'd thank Mr. G. Sliepen and Mr. Davislor regarding their help in the previous questions (C++ System data transfer design) (C++ System data transfer design - Following 1), given the resultant code can be found here*. * The code includes some added functionalities beyond the point :) Now I'm taking t...
I built a simple trivia with React from Vite that reads from an external JS file. Here is the main code for the game: import { useState } from "react"; import "./App.css"; import { questions } from "./assets/newquestions"; const App = () => { const [answer, setAnswer] = useState(""); const [count, setCount] = useS...
Took a shot at implementing a subset of std::optional functionality. A lot of core features are there but some things like converting constructors, etc are missing as I just wanted to focus on the basic ideas. The implementation: #include <compare> #include <typeinfo> #include <utility> struct BadOptionalAccess : std:...
I wrote code to aggregate transactions in slips. I'm concerned with the performance of my code because it uses 3 loops that are nested so the time complexity will be cubic. This code won't scale well because if the number of slips or transactions are very large then it will take a long time to run. How can I improve my...
Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Overview So brief overview: Part3 was the wrappers for the user of the mocks (long chains of simple objects that collapsed after use) but recorded expected usage...
Intro I have this repository. Given this command java -jar TriangleWavePlotter-1.6.jar --amplitude=2 --period=4 --shift=-1 --xRangeStart=-12 --xRangeEnd=12 --yRangeStart=-3 --yRangeEnd=3 %USERPROFILE%/OneDrive/Desktop/TriangleWave.png the program will produce Code com.github.coderodde.gnuplot.trianglewave.TriangleWav...
I'm looking to create a library for dealing with probability in C#. My current system takes an ordered array of probabilities as an input then generates a random double. It then accumulates each double in the array until the accumulated values are greater than the randomly selected one. Like this (Samples is the array ...
I built a banking system in C++ (still a lot of features to do but (I decided to post it here to see what can I change so I wont make those mistakes in the future). User header and c++ files Header #pragma once #include <string> class User { private: int id; std::string username; std::string password; ...
Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Side Note: I will say the processes of splitting my code up and putting it up here has been beneficial just as part of this processes. I have found 1 small bug, I...
I have created a two-file tic-tac-toe game, with board.py containing most of the internal workings of the playing board. I intended to have board.py work as general infrastructure for playing the game and testing who won. game.py is the file to be run if you want to play the game, and it just handles the errors board.p...
I have recently developed a Java program for a simple Tic-Tac-Toe game and would like to request a code review to improve its quality and learn from experienced developers. Below is the code for my game: Board.java import java.util.Scanner; public class Board { private char [] [] board; private final int SIZE;...
On day 1, one person discovers a secret. You are given an integer delay, which means that each person will share the secret with a new person every day, starting from delay days after discovering the secret. You are also given an integer forget, which means that each person will forget the secret forget days after dis...
import numpy as np import cv2 import matplotlib.pyplot as plt class animated_simulated_tsp : """ Implements Simulated Annealing to solve the Travelling Salesman Problem \n Animates the tour as the algorithm progress """ def __init__( self, height = 800 , width = 800 , num_cities = 20 , alpha = ...
I've finally finished these 2 scripts and would like to get some feedback. Seeking feedback on a modernized ULID (Universally Unique Lexicographically Sortable Identifier) generator in Javascript. Reduced size compared to examples on GitHub. Code includes functions for encoding BigInt as Base32, decoding timestamps, a...
Custom Keras Tuner with Time Series Cross-Validation I have written my own subclass of the default Keras tuner Tune class. Objective: I needed a way to incorporate time series cross-validation into the hyperparameter tuning process, which wasn't directly supported by the default Keras tuner. Functionality: My TimeSer...
I got this question on my test and I did the only logical thing I could think of, which is run 3 nested loops and count each triplet. I obviously wouldn't pass test cases for large arrays... How can I make this code more efficient? public static int CountTriplets(int d, List<int> a) { int count = 0; int n = a.C...
I'm trying to learn C#, I made this calculator with my current knowledge. It works as I intended, but I'd appreciate some input on my code. using System; namespace Calculator { class Program { static void Main(string[] args) { double input1; string input2; do...
I have developed an audio recording and playback base device in Free Pascal. This device is built on Free Pascal's TThread class and utilizes the low-level audio API provided by SDL2, distinct from the higher-level mixer API. Audio Components (recording and playback) should be within external classes, facilitating comp...
I need to calculate the sum of all k-sized sub-arrays in an array using sliding window algorithm. Is that a valid sliding window algorithm? If not, why? var sumOfSubArrays = function(arr, k) { let currentSubArray = 0; for(let i=0; i<k; i++) { currentSubArray += arr[i]; } let sum = currentSubArr...
The following implements a mix of hard-code (manual pick and choose) and abstracted solution for creating and placing some squares on screen using different matrix patterns for positioning. Each position is just an "easy" name for each matrix cell. Before giving names, first you need to choose the size of your main mat...
Below snippet is part of a game application's logic and the Update function is called every frame (about 60 times a second). void Update() { handleInputEvents(); if (bShow == true) { if (bOnce) { button.show(true); bOnce = false; } } else ...
I am still new to rust, so any comment about what is the rust way of doing things is welcome. this is a hand-rolled implementation of fibers or user-land context-switching. #![feature(allocator_api)] #![feature(lazy_cell)] use std::{ alloc::{Allocator, Global, Layout}, arch::global_asm, sync::{LazyLock, Mutex}, ...
I plan to use a raycast for interacting with all things in my games but Im afraid itll be too laggy how can I shorten this code up? using System.Collections; using System.Collections.Generic; using UnityEngine; public class StoreClerkOpen : MonoBehaviour { // Start is called before the first frame update publi...
Q1: considering the code below: Is there something wrong with this approach where the protocol object is shared between peers, and each peer runs the object's run method and keep it running? Q2: Regarding the protocol list type, it's of type Arc, and the protocol inside the list is also of type Arc. Will this cause any...
this is the second version of my BankingSystem in C++ for the first one go here: Banking System console app in C++ I did quite a lot of changes since the last version mainly spliting the User class into Account, Customer and Transaction classes as suggested by @SimonLehman so lets get into the code. Customer header fil...
For a given string say dbac the possible substrings are [d,db,dba,dbac,b,ba,bac,a,ac,c]. Sort them and concatenate to a string: aacbbabaccddbdbadbac. Find the character at index m=2, so the answer is c. Here is my code: public char solve(String s, int m) { int n = s.length(); List<String> list = new ArrayList<>...
I'm writing firmware for my Arduino project, and I'm struggling with a clean, scalable hardware mapping structure. Initially, I had the following namespace: namespace Motherboard { extern DRV8825 xAxisMotor; extern MP6500 yAxisMotor; extern DRV8876 zAxisMotor; extern ClickEncoder encoder; extern SSD1331 display; exter...
I have a Python command line application that needs to ask the user for confirmation at some point. I want to add a --assume-yes/--assume-no command line flag to skip the confirmation. I have several ideas how to handle this flag and am not sure which is good/best/terrible. Initial code # main.py, this file is simplifi...
I am not sure of the correct way to do this. I want to separate my Entity database model from the model I use throughout my application, as it will have fields in it that I may not want added to the database. This means, after any Entity call I am doing mapping. I have come up with this solution rather than use automap...
The requirements are: evict any expired items find the items with the lowest priority and evict the least recently used one Any feedback would be appreciated. from collections import OrderedDict class LRUCache: def __init__(self, capacity): self.capacity = capacity self.cache = OrderedDict() ...
I'm building a program that allows the user to monitor files on their local system. To display the files, I created a TreeView using System.Windows.Controls from the WPF framework. The files are added recursively. What suggestions would you give to improve this code for cleanliness, structure, or efficiency? Could I ...
I recently made this tic-tac-toe program using tkinter, but I am quite new to tkinter, so I would be grateful for tips on how to improve the program. (Note that the actual tic-tac-toe logic is being done by the python-tictactoe library.) This is my code: import tkinter as tk from tictactoe import Board from tictactoe ...
I was curious whether boxing impacts performance in a long chain of IObservable<T> operators where T is a value type, and whether performance can be improved by changing T to Box<T> from CommunityToolkit.HighPerformance. I tested this in the form of some unit tests. I also included a test without the long chain of oper...
The following code compresses a 60-byte BCrypt MCF into 40 bytes. Does anyone see room for performance or other optimizations? For example, I should replace Guava's ArrayBasedUnicodeEscaper with a more efficient algorithm that deals only with chars. import com.google.common.escape.ArrayBasedUnicodeEscaper; import com.g...
I'm currently learning rust and need a rocket file upload enpoint for a project. This is what i currently have: It needs to get the file, convert it and add a entry with the file name and timestamp to a database. #[post("/upload?<auth>", data = "<file>")] pub async fn upload( config: &State<Config>, ...
From all the files in a directory, the method shiftFilenamesOffset is to increment the numeric part (int) of the alphanumeric filename by offset each time, and rename the files. A negative offset is also allowed. Example: offset: -2 Old filename: New filename: Textdokument (neu) 3.txt -> Textdokumen...
I am currently building a REST webapi. Right now I am wondering if this design is in the right direction. Firstly, I am using entity framework. I like to call the items in the database DbItems. The items returned by the api are called DtoItems. Just to keep them apart in this example. Mapping I use mappers that are add...
I have a use case of template design pattern with generics as mentioned below. I have AbstractVerificationHandler that provides template for verification business logic which is used by different domain verification handlers e.g UserVerifier depending on the db type and file type POJOs. Can the below code be simplified...
C++ shared_ptr implemented as a coding practice and learning purposes. It uses std::shared_ptr interface. Basic tests are included (using single header Catch 2) Some methods are omitted to keep the code shorter and readable. For simplicity it expects C++ 20. See comments for more details. Is this implementation correc...
I have a use case where a verification batch job (non-generic) verifies domains based on its input e.g domain_type, batch_pointer etc. The verification handles it based on the domain type which uses generics. class VerificationJob { public void execute() { String domainType = "user"; long batchPointer = 12...
I am trying to build minitalk project from 42 school using Rust instead of C. This is a communication program between a client and a server. Both are process. To achieve this I am only allowed to use UNIX Signals SIGUSR1 and SIGUSR2. While I got help to achieve this, I would appreciate an external point of view for the...
Review context can be found here: 32x32x32 Units Octree With 15-Bit Voxels: Second Edition The above question and the self answer include information such as the definition of the Octree and Node8 data structures, MAX_LEVEL, DATA_MASK, and FLAG_MASK macros, and an overall description of this system. They only include a...
Consider the following two tables in a PostgreSQL database: create table if not exists public.users ( id text primary key, is_staff boolean ); create table if not exists public.issues ( id int primary key, issue_owner text not null references public.users on delete restrict ); alter table public.issues enable...
I am working on the task to get all possible combinations (pairs) of ID's (companies) which participated in one bid and create a new data frame with ID_1, ID_2, matching parameter (tender ID). I have prepared the following two functions which provide me with the required result however the execution time exceeds severa...
I want to add an error reporting feature to my WPF app. I have the view for it created; I just need to know when to call it. I am used to web development and this is my first WPF app. public static void Get<T>(Func<T> func, Action<BaseResult<T>> callback, bool report = false){ BaseResult<T> result; try { ...
I have been given a task to create a thread-safe RobotCluster class. The idea is that there's a set of robots operating on multiple threads and they each submit the coordinates of a player each time they see the player in the game. I need to implement the following methods void enterCoordinate(String e, Pair<Float,Flo...
I've written code to deserialize a JSON into an ExpandoObject. The only problem with the ExpandoObject is that if you try to access a member which doesn't exist, it throws an exception. So I've written a wrapper for the ExpandoObject called SafeExpandoObject which basically implements a DynamicObject that encapsulates ...
I am writing an app generator. I intend to use all of the best practices for everything. However, I have recently moved ro vue/tanstack and I am still working out what the best practices are -- this is especially hard with Vue, since everything has changed in the last year and a half. Anyhow, this is a file generated b...
I made this program to properly format a North American phone number. If its a 10-digit phone number (9999999999) it adds a 1 in the beginning and adds in dashes (1-999-999-9999). If its 11 digits (with a 1 at the beginning, 19999999999) we add in dashes (1-999-999-9999). Otherwise, its not a valid North American phone...
I have a black & white video as a tensor with the shape [Time, Width, Height] with popcorn noise and I would like to reduce the noise by naively convolving along the time dimension. Using a Pytorch forum post as a starting point, I wrote the following function: import torch from torch import nn # dummy input tensor in...
I decided to write a few related examples of code, and honestly I don't know if I am overthinking, or just trying to find what is that right way to write functions and how to use them, so that codebase can be as clean as possible and function names are easy to understand and suitable for reuse. Here's is what I have to...
This is a small python API to be able to display a busy spinner using emojis for a textual bot that run lengthy async jobs without access to a percentage of completion and need to provide feedback so the user knows the bot isn't stuck. I'm looking for any remarks (general, code quality, ease of use, ease of use of the...
The test: https://rosalind.info/problems/ini2/ Problem Given: Two positive integers a and b, each less than 1000. Return: The integer corresponding to the square of the hypotenuse of the right triangle whose legs have lengths a and b. Sample Dataset 3 5 Sample Output 34 My script: #!/bin/env python3 import argparse...
The code defines a Python script for converting time between 12-hour and 24-hour formats. Review Goals: Is the code idiomatic? (Am I using any outdated practices or functions?) Is there a simpler way to achieve the same thing? Are the tests well thought of? Does any part of my code require a comment? How can I improve...
Context I was proud of this code for a little while, but the repetition wounds me. I know that the function name sucks, but the name and interface to this function are not under my control. Performance is not a concern. Fixing the repetition is my only concern. How can I reduce it? Note the usage of the functional-prog...
I am looking for feedback on how to make my code more performant (take less time) - specifically with a top-down approach. My specific asks are: How can I make this code faster? It currently takes around 170+ ms, but I see some solutions that are in the range of 10 ms. I want to use a more functional approach to this ...
I'm playing around with an app that will need to read Hierarchy trees quickly but will seldom modify them once created. I've chosen to use HierarchyIds with Entity Framework to model the hierarchy. I know it's not required, but the perfectionist in me would like to keep all HierarchyIds sequential and integers. This is...
The following is my React code to create a simple app containing a table which can be edited by multiple people at the same time. Each client connects to a WebSocket via a custom hook. The WebSocket server simply sends the newest data to the client when a connection is opened, and broadcasts any updates it receives. I ...
I want to have 2 separate pages at the root URL for logged-in users and logged-out users. (at "/"). After advice on this sub, this is what I've come up with, using parallel routes. But is that OK, or can be done better: /layout.tsx: import './globals.css' import type { Metadata } from 'next' import { Inter } from '...
A counter gets incremented by a custom value. Each increment value gets stored with its refcount that tracks how many times it occurred. An ordered list shows all increment values entered so far by number of occurrences. Higher rank means more occurrence. Before venturing futher, a disclaimer: I can't make prettier w...
I'm trying to find the best way to initialize some PageModel, avoiding repetition and preventing nullable reference types warnings. Please see the below example. Is this the ideal way to initialize a PageModel's data while sharing that data between the OnGetAsync and OnPostAsync methods? I still have issues with the Ra...
Task description: Implement an extension for Array, which sorts the elements using the Bubble Sort-algorithm. My implementation: extension Array where Element: Comparable { mutating func bubbleSort() -> Array { var i = 0 var j = 0 while i < self.count - 1 { while j < sel...
I, an amateur coder, have been trying to code a chess engine with python as part of a larger research project. I started by following this tutorial (turns out creator of said tutorial has a github of the project) for the GUI and move handling, but I am trying to code the AI/evaluator myself. I have discovered that the ...
I have written a C# .NET code that utilizes NamedPipeServerStream to send and receive data. My goal is to ensure that when a client disconnects, the server waits and then establishes a new connection when the client reconnects. The code seems to work in my initial tests, but since I'm new to this, I'm unsure if I've im...
This is a interview practice question from BFE.dev. Currying is a useful technique used in JavaScript applications. Please implement a curry() function, which accepts a function and return a curried one. The solution is pretty simple, but when implementing it with TypeScript the compiler will throw a warning about my...
I have a script - generator that accepts a file name or file object and a list of search words as input. The generator searches through the lines of the file and returns only those lines (the whole line) where at least one of the search words is found. from io import TextIOBase from typing import TextIO import mimetype...
I have attempted the below question, however my solution is too slow (i.e. It does not fit the 2 second time constrain for java). How can the solution be optimised? While at IOI 2020 in Singapore, you decide to go outside one night and look up at the stars. At exactly midnight you observe a bright planet directly abov...
i learn python and i am at beginner level in python TL`DR i did NOT read the other questions concerning this topic since i try to learn python and therefore need to do the same stoopid errors others have done to improve my knowlegde. And since i know other things than the other OPs is my code somehow different class F...
Context I was proud of this code for a little while, but the repetition wounds me. I know that the function name sucks, but the name and interface to this function are not under my control. Performance is not a concern. Note that this must be an inline table-valued function. Fixing the repetition is my only concern. Ho...
I'm looking for a best practices and security analysis of some code I've written to generate registration codes and avoid duplicates. The class assigns numeric values to the letters A-Z and 0-9 and then uses that mapping to generate 16 character codes that must conform to the following parameters: Codes must sum to 25...
I wrote this code to indicate duplicated values. It actually works but I hope to know if there's another possible solution to optimize this process. Thanks. import tkinter as tk from tkinter import filedialog import pandas as pd import numpy as np // load excel file def load_excel(): global df file_path = filed...
NOTICE: I refactored the code and made a new question like was advised. I'm making an input validator function that is inspired by @JDługosz from the following post so that other new C++ programmers can just plug it into their code for easy input validation. I have made it with a little deviation regarding the predicat...
I have a working metronome app with a GUI, built using Python. I use an Android app called Pro Metronome which I like, and I wanted to build a simplified version of it as a project. My goal was to have accurate timing (including actively correcting for drift due to integer truncation), and to have nice behaviour when c...
I've created an OCaml function which generates an ASCII grid with a specified cell size and number of cells per row. A grid with a cell size of 2 (chars) and a number of 3 cells per row looks as following: +--+--+--+ | | | | | | | | +--+--+--+ | | | | | | | | +--+--+--+ | | | | | | | | +--+--+--+ Her...
Introduction I have written a Python class which uses the module ftplib. In this class I have created a private method called __connect(). Its goal is try to connect to a FTP Server. Trying the connection could be raised many type of Exception. I have emulated some of these kind of errors: a time out error a Connecti...
This is not your typical mastermind question, I am not trying to find the right answer. Merely to check the answer and provide a result as fast as possible. The function signature cannot be changed, however the contents are just my best guess. Here's what I've come up with : typedef int Code[100]; /* Arbitrary size */ ...
I have developed a Java application as per a specific assignment, which includes features for adding, searching, and removing fruit and vegetable products. I would like a review of my code in terms of best practices and any possible improvements. I also have some specific questions: How can I enhance error handling and...
I recently completed the Multi-Step Form Challenge on Frontend Mentor using React, and I'm eager to receive constructive feedback on my code. I've put in a lot of effort to make the form functional, responsive, and user-friendly, but I believe there's always room for improvement. Your insights and suggestions would be ...
here is the problem statement You are given an array a of length n consisting of non-negative integers. You have to calculate the value of \$\sum_{l=1}^n \sum_{r=l}^n f(l,r)\cdot (r - l + 1)\$ where \$f(l, r)\$ is \$a_l \oplus a_{l+1} \oplus ... \oplus a_{r-1} \oplus a_r\$ (the character \$\oplus\$ denotes bitwise XOR...
Whilst developing a bigger project, I was in need of having basic error handling inside the context of a C interface. I came up with the following solution. // include/interface/error.h #ifndef SDK_INTERFACE_ERROR_H #define SDK_INTERFACE_ERROR_H #ifdef __cplusplus extern "C" { #endif //__cplusplus struct Error; typed...
I'm looking for feedback on a WordPress plugin I developed for automatically converting images to WebP and AVIF formats. The goal is to optimize image loading performance. The plugin has the following key features: Automatically converts images on upload to WebP and AVIF formats using predefined quality settings. Uses...
I am doing a program in Java your text using java.io that shows the content of a text file and every three lines the program stop reading, waiting to press Enter. I dont know so much about programming, so i want to improve my code an my way to program reading your coments, this is the code: package ficheros_ejercicio4;...
Is there a way to avoid the first loop in the method shrink? (if and while...) The utility method shrink should reduce the elements of a double array by picking up elements from the original array "with a regular step respectively offset size"... but the first element should always be included, and the last element too...
After so many searches and back-and-forth attempts, I have developed an TCP Server to listen to the network stream and it is working fine. So kindly review the code, and please let me know if this will work for around 50 clients simultaneously in an efficient way or if there is something else I can try out. public stat...
I'm writing an application to compare and sync folders on a disks. Scanning the contents of folders is performed in separate threads. I wrote a class to manage scan threads. The main application class inherits from this class. The application is built and at first glance works without errors. But I'm new to writing mul...
I've implemented a small single-header library over the C++20 coroutines. This library only works on a single thread and it is limited to Linux because it is also based on epoll. The library does not implement C++ exceptions in any way. A feature of the library is that you can add "modifiers" to coroutines. If present,...
I'm working on a personal OpenGL project. I want my project to not rely on any libraries including CRT. I have absolutely no experience in shipping software and I want to prepare my code for release. The code below sets up an OpenGL Core Profile context. I want to know if the current code is "production quality" and if...
I have a small Linked list program which I created for just brushing up the concepts. Following is my Node class public class Node { private int element; public int Element { get { return element; } set { element = value; } ...
Here's the Makefile I've built up over the last two years which I use as a template (most often verbatim apart from target name(s)). It's meant to be used for C exclusively. I've sort of cobbled it together, so it's very well possible I made a bone-headed mistake somewhere, hence why I'd like some more experienced eyes...
I'm new to Go from another language and I'm most interested to know if this implementation has anything that's not idiomatic Go, but any feedback is welcome and you're not going to hurt my feelings by being direct. The API that I wrote the client for has a pagination header whose key is "Link" and whose value is one lo...
I'm running Debian 12 and Docker compose containers. Once a day, crontab should start the script, but the script should also be called manually. Could you rate my upgrade script file or recommend an alternative approach? Requirements for the script: Debian 12 should be (fully) upgraded Docker compose container should ...
As a continuation of this question, I would like a second review from you. Here is the updated sh script: #!/bin/sh set -e spath="/home/<user>/<dir>/" sname="<scriptname>.sh" if [ $# -eq 0 ] then sh "${spath}${sname}" "logging" 2>&1 | tee -a "${spath}log_$(date +%F_%T_%N).txt" exit fi cd $spath # This three com...