instruction
stringlengths
71
95.1k
I recently wrote a python code for matrix exponentiation. Here's the code: from typing import List Matrix = List[List[int]] MOD = 10 ** 9 + 7 def identity(n: int) -> Matrix: matrix = [[0] * n for _ in range(n)] for i in range(n): matrix[i][i] = 1 return matrix def multiply(mat1: Matrix, mat2:...
I want to map functions from my functions library (Map called as chain) to input string str. Also that functions (Twitter.removeRT, ...) are regex which replace substrings in input str. I think it is better to save that regex-functions in Map like in my example. So, the code: Tail recursion variant def filterTwitter2...
I've written up some code that represents the Mandelbrot set in an, admittedly, quite inefficient way. It probably looks awful due to the fact that I did this completely solo, without any external sources aside from the wiki page. What I was wondering is, how can I, without rewriting it completely, fix my code so that ...
I wrote the below code today: class Hosts(object): def __init__(self): super(Hosts, self).__init__() engine, connection = _core.get_engine() self._engine = engine self._connection = connection self._lan_table = self.get_table() def _get_selected_field_value(self, table,...
I managed to find a way to rotate a slice in-place (previous question on SO). The slice is linear, but represents a 2d square of elements. Is this approach efficient? Please check the previous question linked above if anything is unclear about the algorithm. Code enum Rotation { Clockwise, Counterclockwise, } ...
I was looking to replace my use of axios with just fetch, but I didn't like how verbose fetch was with regard to handling JSON output (having to have a separate then call just to return the json). Unfortunately calling text() first to see if it's a JSON response and then only calling json() if so seems wasteful because...
Based on this question Thought it was a nice puzzle Main idea: How to randomly assign shifts to employees based on these restrictions: As per the O.P.: Randomly write to cells "1" or "0" Employees' total shifts in a month can't be more than 7 and less than 4 According to a few criteria like "Vacation" or "Definite sh...
In the following code, there are some repeated commands. How can I reduce it and make the code more concise and automate it more? In the following code, I am trying to read different folder files. The folders have a fixed kind of structure for all different set of data. I want to access those folders in easier way su...
I'm learning OS development and have written a single stage bootloader that loads the kernel, enters to protected mode and finally jumps to the kernel. I'll very appreciate any feedback and suggestion about the code. I'll be definitely glad to see any suggestions on my build system (Makefile and the linker scripts) an...
My today's idea was to create a POSIX shell function to dump all given arguments, typical use would be to call it from a fucntion, where you already know some arguments are not well set (empty; not integer) and this way you can inspect all given arguments in one go. It reminds me of a PHP var_dump function. :) Would an...
I am a beginner android developer. I am working on one of my applications. For this application, I wrote an algorithm that is needed to obtain data that is used to build a diagram. I have a list of objects (value, date). For these objects, it is necessary to build a diagram either in the last month / two weeks / year. ...
I'm trying to write something that can take a description and a date range and return all the dates that satisfy that description. Descriptions can be anything from the following... parsed_tests_dict = [ {"Saturday": [5]}, {"Sunday": [6]}, {"Weekend": [5, 6]}, {"Weekday": [0, 1, 2, 3, 4]}, {"Monda...
import itertools import os import re from typing import List class Command: """Base command class which all commands inherit from. Command class implements all common functions and utilities between commands, like file and directories handling, and specific commands like arbitrary, text, or picture co...
I am working in a system that does not have room for an STL (think something like an Arduino), however I do like the comfort of std::function. For now I am only using this to wrap lambdas, but some sort of std::bind replacement is also on the roadmap. Important to know is that exception handling is not advised on said ...
I am learning Rust. I have written a web crawler that would scrape all the pages from my own blog (which is running on Ghost) and would generate a static version of it. Because of this, I'm not interested in handling robots.txt or having rate limiting. extern crate select; use std::io::Read; use select::document::Docu...
I'm writing a translate extension for firefox just similar like google translate extension. I achieve that the listening mauseup and mousedown events to get selection text and popup a div that you can click. Due to i am new at javacript, i would like some feedback for above code. Can i do any improvement? var bubble...
After lot of research and couple of questions in https://stackoverflow.com/ i managed to create Favorite System in PDO mysql as database. Am not a developer so there may be security issue or better method with my below code. config.php try { //create PDO connection $conn = new PDO("mysql:host=" . DBHOST . ";po...
I've started learning C++ using Microsoft Visual Studio. I'm decided to create a simple GUI program that creates a "snowflake" wherever the user clicks on the screen. Seeing as how this is my first C++ program, I would greatly appreciate feedback on any aspect of my code. snowflakes.cpp // Includes // #include <SFML/Gr...
I have implemented Dijkstra's algorithm in C++, but it seems a bit complicated since I really tried to follow the process of the algorithm as much as I could. If there's any simplification you would suggest, I would really appreciate, because this task was only for me to get familiarized with this method before the A* ...
This is a popular question in machine coding rounds. The requirements are to build a URL shortener. There are certain registered users who have the capability to define a URL and an optional time to live. The system generates a shortened URL. The unregistered users can also generate a shortened URL with a predefined TT...
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve ...
Someone asked about this question on the main StackOverflow. The full question is: Given a value N, find p such that all of [p, p + 4, p + 6, p + 10, p + 12, p + 16] are prime. The sum of [p, p + 4, p + 6, p + 10, p + 12, p + 16] should be at least N. My thinking is: Sieve all primes under N Ignore primes below (...
I wrote an OCaml program that displays a scrolling marquee in the terminal: Code: (* Displays moving text in the terminal. * Uses VT100 escape sequences. * Usage: * ocaml <this-file> * *) #load "unix.cma" let rec loop max_col curr_col = print_string "\x1B[2J"; (* Clear screen. *) print_string ("\x1B[...
I have written this code to use TcpClient both from a client program and a server program. Can you review this source code? Kindly, take a close look at Disposable pattern at the bottom of the source code. . using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Net.Socke...
I'm struggling with some code that should be a very simple computation of a duration. The purpose of the code is to generate a random delay, constrained by an upper and lower limit. The reason I'm looking for advise here is that what should be a simple task, has turned into a behemoth of type conversions: package main ...
I have written a vimscript for learning purposes. The script displays the content of registers in a side bar by polling all registers periodically and redrawing the side bar when any changes happens. I want to get a review. My Vim version is 8.0. I know about the latest version and some features, which can be useful ...
I am pretty new to competitive programming. It took me almost 3 hours to make this, initially I started with 4 for loops and then to make it scalable for sizes bigger than 4, I decided to turn this into a recursion which is when it took most of my time, even though I am proud of it, I am still worried that it took me a...
This is the draft contents of a function intended to be run after a system crash in order to quickly review all of the recent vim swap files. They will be loaded up into and displayed in a vim instance, and then presumably if desired they will be saved using vim commands into actual files. Following this, rm will be ru...
if I have a string AYUKB17053UI903TBC. I want a function to return ABKUY01357IU039BCT. So every alphabetical part of the string is sorted, as well as the numerical part. But they retain their original orders in the string... We can assume that the input only contains number and English letters I came up with a solutio...
I've came up with the following implementation of a very simple cache: use std::cmp::Eq; use std::collections::HashMap; use std::hash::Hash; pub struct Cache<I, R, F> where I: Copy + Eq + Hash, F: Fn(I) -> R { calculation: F, values: HashMap<I, R>, } impl<I, R, F> Cache<I, R, F> where I: Copy + Eq + Hash,...
So I am new to Databases.Recently I was asked this question in an interview where they expected me to come with a schema for storing and retrieving categories for an E-commerce website in an RDBMS. Each category could have many sub-categories. But each sub-category could have just one parent category. So this is the id...
I am creating an API in .net core and I just could not figure out how to put the following Linq expression into a single call: public async Task<ActionResult<IEnumerable<MyClass>>> GetByReference(string reference) { var myClassPkColumn = _context.MyClass .Where(myClass => myClass.Pk...
I'm completed the Reddit challenge #380 (source). Here is an abbreviated description: Normally [in Morse code], you would indicate where one letter ends and the next begins, for instance with a space between the letters' codes, but for this challenge, just smoosh all the coded letters together into a single string con...
I am looping through pdf files, using regex search and findall to append list type data into a dataframe. I export to excel for end user to easily search info. Below is method breakdown of this script: Find pdf files in folder and delete duplicate files Define regex compile objects outside of loop. Growinglist() gener...
I made the following regular expression for parsing ngnix log log_1 = "1.169.137.128 - - [29/jun/2017:07:10:50 +0300] "GET /api/v2/banner/1717161 http/1.1" 200 2116 "-" "Slotovod" "-" "1498709450-2118016444-4709-10027411" "712e90144abee9" 0.199" My test cases (https://regex101.com/r/Eyhxod/1) lineformat = re.compile(...
In order to learn about multithreading programming in C++, I am implementing a basic multithreaded logger. I use a std::deque to store messages inside a FileLogger class. Each time a thread logs a message, that message is pushed to the back of the deque. In a separate thread the FileLogger checks if there are any messa...
I have an array of values. (cols) I want to find out which index of cols contains the value closest to the mean of cols. Can I combine these functions so that I'm not repeating loops? let mean = cols.reduce((prev, curr) => prev + curr) / cols.length; let closest = cols.reduce((prev, curr) => (curr - mean) < (prev - mea...
This is a continuation of my earlier question, now updated to use a basic GUI. This is my first time using tkinter so I suspect there are a fair few things I'm missing! I've also added the ability to generate a single barcode without having to first save it in a CSV. I'm specifically interested in feedback on how I hav...
in my jurney to learn Go, I decided to write a simple router which I called it Gouter, which I think it has most of the features in gorilla/mux but in my opinion it's easier to use. Anyway, it consists of two file, router.go and route.go. There are some concerns I have about this. First about the performance and the se...
Code explained I wrote a few identical functions for each table to filter them based on the user input typed in the input fields using jQuery. After filtering it counts the rows that are left visible. My code is a bit flawed because I have one function for each selector or class, which is messy and can definitely be im...
So, after this functional(?) approach and thanks to the great improvement of @CDP1802, I've decided to try an OOP approach to filtering an two-dimensional array. In my opinion, the result is way more elegant and has also performance improvements. Now the user is able to choose the order of the filters (the more exclusi...
I have the following code: It works completely as expected, but I feel there is a better way to refactor it out. The flow is as follows: Call the end point with 1 page Get the total number of results. If total count of items more than itemsPerPage. Call the API more times till results from all pages are returned...
I'm learning object-oriented programming in Python. I've created a class RepositoryMaker that contains all methods required to create a Git repository. The idea is to be able to create a single instance of this class with a constructor that only requires pertinent info to create a new repo. My code looks like this: cla...
A follow-up to this question is Chunking strings to binary block-based output I have code which takes a text file as input and creates a special binary output form of the input. Specifically, the test input I'm using is the plain text of Samuel Coleridge's poem "Kubla Khan". Here are the first few lines, shown here ...
Problem Statement I'm reading each line from a .csv file and parsing each comma-delimited value and casting it to the appropriate type: string[] words = filelines[i].Split(delimiter); // "i" is the 0-based line number // Remove double quotes encasing the timestamp DateTime tmStamp = Convert.ToDateTime(words[0].Trim('...
I am implementing recursive backtracking algorithm for sudoku. Below is the code to create board with random filling. I wonder if I can make it better in any terms of readable coding especially validation methods. in Board class. public class Board { private int[][] board; public final static int SIZE = 9; public Boa...
I wanted to make a library thing which provides specific extensions for collections/collection-like containers in kotlin: fun <T> Collection<T>.extendEntries(length: Int) = this.flatMap { x -> List(length) { x } } fun String.extendEntries(length: Int) = this.toList().extendEntries(length) fun <T> Array<T>.extendEntrie...
I have a table in Hadoop that looks like this (with up to hundreds of columns and millions of rows): +--------+-----------+--------+-----+ | field0 | field1 | field2 | ... | +--------+-----------+--------+-----+ | 0.66 | 0.4364153 | 0.31 | | | 0.28 | 0.281724 | -1 | | | 0.48 | 0.4210872 | 0.58 ...
I am using Java 8. I haven't found another question that fits mine exactly, and I've come across some conflicting information on best practices with what I'm trying to do. I'm creating a POJO which is essentially a business object - to be returned by my API - that will have its fields initialized from another object. I...
My goal is to scrape the no. 1 suggestion of the suggestion list on https://finance.yahoo.com for any entry. If there is no suggestion the code should write f"nan_{what_ever_the_entry_was}". As basis I used the solution from https://stackoverflow.com/questions/50355120/how-to-scrape-the-yahoo-finance-search-auto-sugges...
After the feedback I got on my previous question, I decided to try one more program to see if I understand O.O.P. The idea for this is also based off the project I am working on im my class for this semester which is to make an interactive school tour. This program just has you make a bunch of teacher instances and th...
I needed a special graph structure for my code and thought I'd write a generic one for later reuse. At first I wanted to use pointers instead of indices as map keys but I quickly forfeited that idea once I realized, that changing the vertex vector might invalidate them. I'm especially interested if there are problems w...
NOTE: I am beginner in Python I learnt the Heap sort today and tried my own implementation using Python. Can i get feedback for my code and areas of improvement. I have tried to add comments inline, but if still something is unclear, then i will add more comments. def max_heap(listmax): i = 1 # if there is on...
void selectionSortC() { //Not wasting time inputting arrary int arr[6] = { 2,4,-22,4,2,1 }; size_t minIdx = 0; int len = sizeof(arr) / sizeof(int); for (int i = 0; i < len; i++) { for (int j = i + 1; j < len; j++) { if (arr[i] > arr[j]) { ...
Configs.java package main; /** * @author Daniel * * A load of configs for the application. */ public class Configs { public static final String APPLICATION_NAME = "Sorting Algorithm Animation"; public static final int APPLICATION_WIDTH = 1280; public static final int APPLICATION_HEIGHT = 720; p...
I'm currently learning about Dynamic Programming and solving a "coding question" related to the topic. Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reac...
I am trying to write a graph implementation in Java. I would appreciate it if someone can please review the code for me and give constructive feedback. import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; public class Graph { private int V; // Number of vertices private int E; // ...
I'm practicing recursive functions and I would be glad to receive some feedback for the following Python code I wrote. I did several tests and the function yielded correct results but I wonder if it can be written more concise or if it can be criticised in some way. Your feedback would help me become better. The functi...
So there is an existing codebase which calculates the total time worked per month. What the code is doing: iterates through all the working days entries retreives the value of net work time which is in format: HH:mm calculates the minutes out of the net work time string formats the net work time to the report day row ...
TLDR I created a curry/partial binding "lib. My request for "code review" is, what possible improvements I need to achieve "release quality", if I wanted to release this as a lib? You can see the end result here. https://godbolt.org/z/SnFnFt Complete story and analyzing the code This weekend I caught myself testing so...
I am new to programming, and I wanted to ask, is my code inefficient / poorly written? Here is my code below for an exercise I just did. The point is for the user to guess the number 0, but it also: Calculates the average number Calculates the number of attempts Gives the sum of attempts Are there ways of improving ...
Introduction By default, input streams (e.g., std::cin or a std::istringstream) split words at space when using the >> operator. If we want to split at other characters (e.g., \n), we need to use std::getline: std::vector<std::string> lines; for (std::string line; std::getline(std::cin, line);) { lines.push_back(s...
I've been working on re-writing comfortablydrei's answer to this PPCG Question regarding creating a illusion animation in pure Excel VBA. So far, I've been able to rewrite the code to function in VBA, and to get the cycle time for the animation down substantially, but have run into an issue where I am GPU-limited on my...
This program is made, so it graphs a spiral with N steps. What else could I add to this program? Can this code be improved? import matplotlib.pyplot as plt N = 100 arr = [(0, 0)] x = [] y = [] for u in range(1, N): for i in range(1, 5): if i % 4 == 1: # first corner arr....
Hi I'm fairly new to coding and would appreciate some feedback on the code. This is for a site that has a dynamic login page and infinite scrolling. I wanted to use scrapy not necessarily because it needs the framework, but because I hadn't done infinite scrolling and dynamic content with scrapy. I'm aware that it's ...
I have a spinner that it has a custom layout with 5 imageviews and 1 textview. I would like to load it up with 80 rows, so it will display around 300 images (all images are within the app). Is this a really bad idea? All the images are loaded this way: class CustomAdapter : BaseAdapter { private Context Context...
I have implemented a custom merge of 2 pandas DataFrames, but only mutates the first. The new columns will be the union of the original columns and the new keys will be union of original keys. Additionally, the second DataFrame values will overwrite the first DataFrame if the keys match. def merge_dataframes(df1, df2):...
This is my code to solve the challenge in 100 Days of SwiftUI by Paul Hudson. This is the first challenge in the series and I chose to convert the temperature units from C° -> F°, F° -> C°, C° -> K° and K°-> C° I need to ask, is this code readable by you and if anything needs to be changed/modified in order to make mor...
This is my first attempt at writing a C program, it a generic stack that can grow accordingly. It appears to work correctly, however I am worried that is just a fluke and I could be doing something very wrong. I would greatly appreciate any feedback/criticism. I am aware I should split this out into a .h and .c file bu...
I am trying to implement a thread-safe deque in C++. ThreadSafeDeque will be used by a FileLogger class. When threads call the log() function of FileLogger the messages will be push_back()ed to ThreadSafeDeque and return almost immediately. In a separate thread the FileLogger will pop_front() messages and write them to...
I have a code that does a loop through a worksheets, if there is a value 2 inside a cell in column S, then I want to insert a row with a specific layout. I have the code, but it takes ages to complete. I've tried replacing .select function, but because I need a specific layout, I don't know how to avoid this. LastRowM...
This is my lex code to convert possibly nested for and do while loops into while loops. (Other control flows like if or switch are not supported.) The input program must be in a file called input.c and the output will be saved in a file called out.c. Please review the code and give suggestions regarding improving it...
I have created a Master Mind BoardSolver. To apply the BoardSolver I have created an app (MasterMind) in which I create a Board with ColorPins and CheckPins. ColorPins and CheckPins are associated within a PinRow. A Board represents a given PinRow (code) and a List of PinRows as attempts. Please can you review this co...
I am currently trying to replicate the STL std::list interface with my own list implementation (doubly linked list with sentinel) to learn about all the advanced topics (like iterators, allocators, ...). Before I add the methods from the "operations" section in the documentation, I'd love to hear your thoughts and fee...
I've been recently fooling around with Go(lang) and ended up doing a (very) simple pig Latin parser. I'm pretty sure this is not the best solution out there (no punctuation and only lowercase letters) but it does its job. However, I'd be delighted to learn how this could be improved, as I'm still pretty new to Go. Here...
Project Euler 11 — Largest product in a grid: In the \$20 × 20\$ grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 ...
I'm very new to Entity Framework Core, so I'm concerned about whether I've done this query in the most efficient way possible. The database I'm querying looks like this: Basically, UserRoles is a a "linking table" between the User and the Roles in order to create a one-to-many relationship. If a user exists at all, th...
This piece of code is supposed to walk through a TLV string and print out its contents. For this particular example, tag field length is 2, size field length is 3. As a mostly C programmer, this is what I came up with. I know I can parametrize the tag and length field sizes, but I don't care about that right now. Just ...
Following on from my previous question: C pointer based growable stack I have made some improvements (hopefully!) based on the very helpful comments and suggestions. I have checked that the stack can push and pop doubles now, so hopefully it will also be OK with structs. I have a could of questions regarding the change...
I'm new to Java8 and I must find an elegant solution to a problem. The problem goes I have a List of letters (of any size) that could contain any letter such as "A", "B", "C", "D", etc. I must check if I have an pair of "A" and "B". So, if I have something like ["A", "A", "C", "Z"], since I don't have both "A" and "B" ...
Tried this leetcode question Hands of Straights. https://leetcode.com/problems/hand-of-straights/ Description is Alice has a hand of cards, given as an array of integers. Now she wants to rearrange the cards into groups so that each group is size W, and consists of W consecutive cards. Return true if and only if she c...
I'm trying to write a class that simplifies the most common operations with arrays and then I want to distribute... Maybe it can help someone... But I'm facing some problems in make the object simple to use and intuitive. Here a summary of the public methods: Array to range Array to string Array to text file Array Fi...
I've written the code below to compare the two columns of choice of two different excel files (new data and a reference file). If a value in the new data file is present in the reference file, "yes" is added in a new column behind the value in the new data file and "no" if not. The columns to compare can be anything yo...
I'm new to development (I'm self Taught I got a job recently as an"app Developer") and this is my first real big project. In essence, it's an e-commerce store that uses a very awkward API. My Checkout process is taking 6 seconds per item and you can imagine if I let a user checkout 50+ items, they will think something'...
Qutebrowser uses search engines similar to DuckDuckGo's Bangs to facilitate searching. The config.py file for the browser contains a search engine Python dictionary. Each key is a search engine, and the corresponding value is a template string. When a search engine is used, every {} in its template is replaced by the s...
I have a function called postprocess that applies while loop condition to find for - and alphabets to each dataframe row. postprocess looks like this: def postprocess(description, start_index, end_index): if (start_index > 0) & (start_index < len(description)): while bool(re.match(r"\w|\'|-", description[...
A Brief Context I recently gave an interview in a company where I was asked this particular question. After the interview was over, the HR gave the feedback that my solution (is correct programmatically) but is monolithic and not scalable. The interview was for frontend developer 2. Question Suppose there is a company...
This is for an API and I want to optimize this because it has 2 for loops followed by another 2 for loops and it is taking 4 hours for 40000 rows in the database. The object obtained after the request to the API is a nested dictionary. Is there a faster way to go through a nested dictionary with lists and more dictiona...
This code should toggle the state (open/closed) of a submenu when the associated top-level trigger is clicked. The menu should toggle for mouse clicks, keyboard events and touch events - since detecting these is not possible each case is supported separately. The toggle functionality should also be a11y friendly. It up...
I've been asigned to a project no dev has touched in a long time. It's an ASP.NET MVC 4 application. It appeared to be well coded, but had no testing and the database migration folder is not present. For further development I'm given time for minimal testing to ensure that my changes won't break the code. When writing...
I'm very new to Javascript... Below is my code to convert Array to key/value JSON. Would like to know if there is a better way to achieve this or if I use any know bad practices. An input: [10, [20.1, 20.2], 1] The output: {"channel_id":10, "payload":[20.1,20.2], "sequence":1} My working code to generate the output: ...
I wrote a small C++ program to monitor activity (messages sent) on a network and display the current status of the machines. The assumptions are as follows: There exist sessions on a network. A session is made up of one master machine and several slave machines sending messages. On a startup masters and slaves both bro...
I'm still learning Python and especially Object Oriented Programming. The latter, though, seems to confuse me a lot: defining class object attributes vs instance attributes, passing arguments, using outside-of-the-class functions vs class methods, etc. I understand it's a rather ambiguous question I'm asking, but based...
For a research analysis, I'm writing a small bash script that serves as a frontend to Singularity. The reason is that I want to save in this script which options are needed for singularity. For example, I want the working directory to appear at a fixed path in the container, regardless of the actual working directory p...
I am trying to solve a maze problem. The input data is a matrix, where the individual element represents the height of the mountain in that particular area, I have to start from position (0,0) and go to the position (n-1, n-1); where n is the size of the maze, my goal is to return the minimum number of possible climb r...
I'm trying to implement a really basic queue (as an array) in my computer science class and want some feedback on my logic/methodology. the queue is not circular, it just includes the basic functions of enqueue/dequeue (along with the other obvious ones.) Please criticize and give feedback so I can educate myself on t...
I am new to Python programing language. I have created the codes, based on this solution. I prepared two simple programs: import simplekml List2 = [ [ 'Placemark','old file', 51.500152, -0.126236 ] ] # description, lat, lon List3 = [ [ 'New placemark','new file', 51.600152, -0.136236 ] ] kml = simplekml.Kml() for row...
I have this string that I am sometimes double encoding it because it is coming from two different fields. I have build this method that will do a string StringComparison. It seems complicated wanted to know if there is a better way to do something like this. class Program { static void Main(string[] args) ...
I want to document every exception handled in my code and some states of the code when it works properly. What I've done is two functions, one that creates an 'error report' (function: error) and one that creates a 'state report'(function: state), and they work by being called in functions where there's stuff I'd like ...
This was born out of a need to create database users on a new server to allow views to be created correctly when restoring databases. This is designed to be run from a command line NOT via a web server. It works with MySQL and MariaDB. It creates 2 files, one that contains the grants to create the users and a second th...