instruction
stringlengths
71
95.1k
I am making a 2d graphics engine. I am somewhat new to JavaScript and have been winging this project. So far it creates a background (a tilemap made of smaller images in a grid) and sprites ( a small image with a higher z index). I ommited my test code, as I didn't care for that to be reviewed, but if it needs to be i...
I have created a bash script to generate a HTML file, which will have the duration of the audio/video files in the current folder. The script uses ffprobe to fetch the duration in the quiet mode and file to get the mime-type. Although, the script works as intended, it feels a bit slow. I was wondering if it is possible...
I have the following code which works fine but the execution time is more which I want to reduce. I guess this happens since each file is opened and then the operation is performed. Is there a way to open the file once, perform all operations, and then close it, which may improve the processing speed? At a high level, ...
Below program find a minimum positive number that is greater than 0, it doesn't occur in the array. My solution actually works fulfil performance-wise. However, Codelity has given 55% only, I m trying to understand what is the potential issues with below code? For example, given A = [1, 3, 6, 4, 1, 2], the function sh...
I recently played around with a script that got some data from the Google API. As I didn't want to spam requests at the service (and potentially get blocked), I made this decorator, which caches the result of a function for a specified amount of time. Any call after the time-to-live (TTL) will call the function again. ...
I'm learning C++ and did some reading here and elsewhere on trie structures. I've written a simple class that performs insert and match using a sorted vector as the underlying container. I used unique_ptr, but I get nervous using the .get() method to access the raw pointer. Is there a better way? Also, I had to o...
I'm writing an app with NativeScript 6.4.1 and Angular version 8. There are a series of UI events in iOS that you can watch to see what the keyboard is doing: https://developer.apple.com/documentation/uikit/uikeyboarddidhidenotification?language=objc I wrote a service to watch and subscribe to these changes. Do you see...
I have a function written in Groovy which needs to save a record and also return response from the server. Function is working fine, but I am not happy with the design because I have a problem with multiple nesting. This is the function: Map scanAccessRecord(GrailsParameterMap params){ Map response Date curren...
all. This component is meant to take in an array of available options and provide the user an easy way to choose multiple options. Each time the selected options are changed/updated, those options are console logged. I'm hoping that someone could provide any criticism on my current code. I want to make sure that the co...
Ahoy friends. Right now i'm selling a huge amount of HDDs and usually i used DBAN or nwipe to perform this actions. Unfortunately the PRNG Mersenne Twister is quite slow, so i get a throughput of around 100MB/s for 16 HDDs, which takes a really long time. I'm majoring electric engineering, but i had some C programming ...
When writing image processing/computer vision algorithms, I usually use double in computations and then I have to remap the values back into std::uint8_t range, because that is what PNG supports. The main problem is that the image is represented as multi channel entries in a matrix, and remapping should be done for eac...
The question is as follows: Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ] Here is my backtracking solution for the problem, where I added the num_calls variable to keep track of the number ...
I wrote a simple prime sieve in Python. But it ended up looking... ugly. I included a few of the most basic optimizations. When posting this question SE suggested a bunch of questions on the same topic, which lead me to some improvements. But few were in generator form. It's the optimizations' fault. Unfortunately I ca...
Straight insertion sort When inserting an element into its proper location to the left, one can achieve that by \$n\$ adjacent swaps which totals to \$3n\$ assignments. Straight insertion sort, instead, stores the element and than performs \$n\$ chain shifts to the right. Binary insertion sort Just like conventional in...
I have written a C program to sort files (on Windows) into dynamically created subfolders based on information found in their data headers. I am a newb at C, especially memory management. The code works. I have tested it on a small sample of 6 files. The next step is to put it into "production" and have it sort a giant...
A program that generates questions to train your number base conversion skills. This program is made to ask questions about octet, binary and hexadecimal. No other bases. It first asks a series of questions to the user such as "amount of questions", "question type" and "base". Then, it starts generating questions based...
Any improvements? import datetime import json class CustomEncoder(json.JSONEncoder): def default(self, obj): """ This method will only be called if an object is passed to the parent JSON encoder in the case it doesn't know how to deal with. In case the object passed to the encode...
Kosaraju algorithm is mainly phrased as two recursive subroutines running postorder DFS twice to mark SCCs with linear time complexity O(V+E) below, For each vertex \$u\$ of the graph, mark \$u\$ as unvisited. Let \$L\$ be empty. For each vertex \$u\$ of the graph do Visit(\$u\$), where Visit(\$u\$) is the recursive...
I am trying to implement the Jagged Diagonal Storage code in Cuda for Sparse Matrix - Vector multiplication. The code I wrote is as follows but I'm not sure about it: __global__ jds_kernel(JDSMatrix jds, float * invector, float * outvector){ int i = blockIdx.x * blockDime.x + threadIdx.x; int row = jds.rows[i]; ...
I have some code that boots up a minecraft server, more complicated then most. I'm looking for some positive criticism on how to improve my code (and coding practice!). File: ::Copyright notice ::RandomWords.py ::By Dylan Prins :: ::This work is licensed under CC BY 4.0. ::To view a copy of this license, visit ::https:...
I'm currently in a programming competition where time is key, therefore I'm trying to optimize my solution as much as possible. I am trying to implement a BFS Flood Fill solution on a map size of 30x30 (900 operations) where the time limit is 1 second. I'm falling a bit short on time (a little bit above 1 second). I ch...
I have been learning about refactoring and I have this method that I'm wondering if I should split into two for code cleanness. First, the method as one, next the method split in two: Method not split: public static ArrayList<String> getFilePathOrName(String pathOrName) { ArrayList<String> files = new ArrayList<>()...
I did the Divisible Sum Pairs problem on HackerRank input: n is length of array ar, k is an integer value. a pair is define only if ar[i]+ar[j] is dividable by k where i < j. Problem: find and return pairs in array. def divisibleSumPairs(n, k, ar): i=0 #pointer 1 j=1 #pointer 2 is faster tha...
I'm writing a small game and I use Kotlin for that. I want to model my buildings with the following class: class Building ( val name: String, val inputs: Array<Resource>, val outputs: Array<Resource> ) {} I want to create multiple instances of this class for the map but I don't want to fill the constructor...
I'm simply using Slim PHP MVC framework in my API project. PDO::FETCH_ASSOC is used in the database calls. So no data objects. The router handles requests and pass to the controller. controller calls the necessary model to do database operations and response is delivered. This is the scenario that I want to handle diff...
LeetCode Problems 3. Longest substring without repeating characters Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", length 3. Given "bbbbb", the answer is "b", length 1. Given "pwwkew", the answer is "wke", length 3. Note that ...
I have following code but wonder if I can loop it instead of copy-pasting. calculator.ts data: function() { return { calcInput: 'user types some value in input with v-model' } }, template: ` <span class="calc-button-control" @click="evaluate()" @keyup.enter="evaluate()" >calc</span> <span ...
I am a C++ beginner and am working on a bit of code which calculates the pairwise cosine similarities between vectors. The vectors are TF-IDF vectors and the similarities are used to determine similarity between texts (documents). My code and approach outlined below work as expected, but runs into performance issues wh...
I needed a way to get URL parameters and put them and their values into a query set's .filter() if they exist. After a day of piecing together information from the Interwebs, I have a working solution to my problem. However, is it the best way to do this? I feel it can be improved or streamlined, but my tiny brain is f...
This is pretty straightforward, it takes requests from the frontend, checking if it is present on the request, if it does, an action is taken for that if statement. I wonder if there is a way to remove some if statements or make it less complicated. private function applyFiltering($query, $request) { if ($request->...
I made a system monitor on Linux which gives you all this information: The full project can be found in my repo: https://github.com/sandro4912/System-Monitor In short it works as following: I read the data from various folders in the Linux file system This Data gathering is organized in the classes: Memory -> reads M...
So I've attempted this project from hyperskills where you're asked to make a calculator script that can calculate annuity and differentiated payments given that 3 of 4 values are known. I think i went with a real hardcoding way of doing this, as such I would like some advice on making my code more compact and efficient...
I have an outer div with... Width Number of slots the outer div represents The intent is to add a child div, but position the child div based on the start and end slot in the parent div. To achieve this behavior, I am calculating the width per slot and the width of child div, plus the margin left of child div. impor...
I made some code to get RTTI information of a polymorphic object, it works both if you pass it directly or a pointer to it(the pointer will get dereferenced until null or the object is found), it's going to be used only for debugging log, can this solution be improved in some way? #include <cstdint> #include <string> #...
extern crate serde; use serde::{Deserialize, Serialize}; use serde_json::json; use std::error::Error; use std::fs::File; use std::io::prelude::*; use std::io::{BufReader}; use std::time::Duration; const NER_SERVER: &'static str = "http://127.0.0.1:5000/parse"; #[derive(Serialize, Deserialize)] struct Article { ...
Can someone please review the code and suggest any improvements / changes? Note that this method works but wanted to see if there is a better way to reset the currentYearMeetingCount to -1. I just want to print the data if there is data for that year and for the past 3 years. class Program { static void Ma...
So, I am trying to create a PNG compression library, and to do that I need to use the DEFLATE algorithm; DEFLATE consists of two parts, the LZ77 compression, and the Huffman Compression. Currently, my LZ77 algorithm has a pretty good compression rate, although I think it could be better, the problem is that is really s...
Hi I am creating a website for my chiropractor and I am creating the API for data access. I am creating a HttpPatch Method and want to know if this is the right approach so would be grateful if you could look over my code and let me know if I am doing it right, or if I need to change some things. Patient Controller [...
I've recently started teaching myself basic C++ and decided to implement a simple stack with pointers. #include <iostream> using namespace std; struct StackElement { char value; StackElement* next; StackElement(char value, StackElement* next) : value(value), next(next) {} }; struct Stack { StackElem...
Doing this Rustlings I find I'm unhappy with the code I wrote, let person: Person = args.next() .unwrap_or_default() .parse::<usize>() .map_or_else( |age| Person{ age, name }, || Person::default() ); What I want is something like let person: Person = args.next() .unwrap_or_default() .parse::<usize>() .unwr...
The Cantor Pairing function is a mathematical function which takes two integers and combines them into a single integer that is unique to that pair. This single integer can later be "unpaired" back into the two original, separate integers. Further information on this function can be found here and here. The Cantor pair...
TA.ServiceProxy.RoleManagement.GetSubPrivilagesResponses subPrivilagesResponses = GetSubPrivilagesFromPrivilageCodeStatic("Authoring01"); if (subPrivilagesResponses != null && subPrivilagesResponses.SubprivilagesList != null) { for (int j = 0; j < subPrivilagesResponses.SubprivilagesList.Length; j++) { i...
Here is a Java Spring web application built as an educational project that fetches and displays data returned from NASA's Mars Weather Service API. The project is essentially an attempt to reverse engineer this page: https://mars.nasa.gov/insight/weather/. GitHub repository: https://github.com/jkey774/mars-insight-weat...
I have the following code, made in C language, which reproduces the functionality of the mv (move) command from linux. The problem is that the code is very inefficient. How I can optimize or make the code more efficient without changing the structure too much? #include <limits.h> #include <fcntl.h> #include "o...
I have the following code that creates a directory in C. I tested it multiple times, reviewed it a few times and it looks fine at the moment. What I really wanna know is what bugs does it have and how can I fix them ? (comparing it with the mkdir command from linux) #include "ourhdr.h" #include <sys/stat.h> #include <l...
I've written a function to get the smallest date from an date[ ] and check for null. If null == infinity /** * @param DateTimeInterface|null ...$dates * @return DateTime|null */ public static function minDateTime(?DateTimeInterface ...$dates) { $dateList = []; $dates = array_f...
I am experimenting with the ServiceLocator pattern. I'd like to support lazy loading of items. protocol Resolver { func resolve<T> () -> T } protocol Register { func register<T>(instance: T) func register<T>(reference: @escaping () -> T) } final class LazyServiceLocator { enum ObjectRegistry { case insta...
I was reading about private variables and functions in Python and I managed to get almost everything except one thing. Is it recommended to write underscore before variables defined inside a function? Here is the code so it can be more clear: Version 1: class House(): def __init__(self): self.color = "RED...
I started to learn C++ after programming for some years in Java, and this is my first (header-only) library. When switching from another language, it is always difficult not to project the old habits into the new medium, and thus I wonder how idiomatic my C++ code is, so it would be awesome if someone reviewed this pie...
Because C# .NET does not come with a MultiDictionary, I implemented one based on this StackOverflow answer. The MultiDictionary should be able to hold multiple values for one key and remove the key, if no value is assigned to the key anymore. I wanted to implement nearly all methods, which the standard Dictionary provi...
I'm new to Rust and would like to know if my code is using the language well, if there are big improvements and if the code in general is rust-like. At the moment it feels very C. I haven't yet developed good feeling on how to incorporate the match function or how to check in a range of chars. The flushing and input pa...
I was working on Leet code design a Linked List problem. My solution with a @tail pointer, althought it added complexity it made adding to tail O(1), also having a variable size @size made it easier to counter edge cases. Here are some of the stats: Success Details Runtime: 100 ms, faster than 84.62% of Ruby online ...
I recently (Yesterday) started working with python and my goal is to not use any tutorials etc where I have to follow along and make a small project. My first project I was recommended to do was a simple game of Rock, Paper, Scissors. I made it in about thirty minutes and it works fine. It goes up to 3 points for each ...
Context The original idea is to create an efficient grid structure for a Sudoku like board but this can be applied to many such grid structures (like wavelet transform on images, JPEG2000 etc). This particular one is basically a 9x9 Board which is made up of 3x3 Blocks where each Block is made up of 3 x Axis a a a type...
I am learning the xlib library and I made a xmenu utility in order to practice it. It receives as input a menu specification where each line is a menu entry. Each line can be indented with tabs to represent nested menus. Each line is made of a label and a command separated by tab. When you select an entry in the menu, ...
I am new to this community; I have tried my best to respect the policy of the community. I have written the Monte Carlo metropolis algorithm for the ising model. I want to optimize the code. I have tried my best. I want to optimize it further. The following is the code: (I have used tricks like finding exponential only...
I have a Bash script that resides on Remote Server A and transfers files from Remote Server 1 to Remote Server 2. Remote Server 2 is a Dropbox folder so in this script, I call another script (that's not mine) to interface with the Dropbox API. This is one of my 1st forays into the Bash-scripting world (I'm mostly a des...
My CS teacher sent me the following code for implementing the stack. I've been programming for a few years in higher-level languages, but have rather weak experience with C++. I mean, this code just doesn't seem right to me. What is done in a bad way here and what would you improve? #include <iostream> using namespace...
I'm writing driver code for the SPI peripheral (as part of a tutorial) on a Nucleo64 (STM32F446RE). The instructor recommends writing this code: // General macros #define EnableStatus uint8_t #define DISABLE 0 #define ENABLE !DISABLE void SPI_EnablePeripheralClock(SPI_RegDef_t *pSPIx, EnableStatus status) {...
So, I've implemented Huffman Encoding in JavaScript, you can see it live here. Here is the code: var letters,maxX,maxY,minX,maximumDepth,inputString; if (typeof Math.log2=="undefined") //Internet Explorer 11 Math.log2=function(x){ return Math.log(x)/Math.log(2); } function onButtonClick() { inputStr...
The method list_all() is the code I am starting with. It just lists all files in "c:\windows". I want to adjust it to list only the first 10 files (if there are as many files as that there). I can see that Directory.GetFiles(sDir) returns an array of string. The original method list_all(), takes all of them. I want m...
The following method works. I am looking for advice to make it more readable. To see if I could avoid any unneccesary checks / casting and the instance of check. Also not a fan of having to recreate the initial String with every loop but not sure if there is a way around it. Things to note. I am using Java 8 and S...
I wanted to get some thread support on windows with very simple headers for a library that I'm working on but it had to work on both Windows and Linux. Since C11 threads are not widely supported, this was a great opportunity to learn more about the Windows API and POSIX threads. I decided to post this here because I'm ...
I just started learning to code during quarantine and whilst learning python, I created this program for a binary search. This is really basic so I assume that there is a way easier method. If anyone knows how I can make this way simpler, your help would be appreciated. list = [1,15,37,53,29,22,31,90,14,6,37,40] finis...
I'm a computer-science hobbyist and found an NP-complete problem that is similar to both subset-product and Exact Cover by 3-sets. Here is a Reduction of Exact-Cover into my problem. I am multiplying all integers in sets of C. Input prior to reduction s: [1, 2, 3, 4, 5, 6] c: [[5, 2, 1], [6, 4, 3]] Output after reduc...
$scope.selectAllProctoringUser = function(checked) { try { for (var k = 0; k < $scope.scheduleUsers.lstOnlineProctoring.length; k++) { $scope.scheduleUsers.lstOnlineProctoring[k].selected = checked; if (checked) { let flag = 0; if($scope.selectedUserLi...
Here is my code, however, I am unsure whether it is the fastest way to achieve this objective. import random add_to = int(input("2 numbers must add to: ")) multiply_to = int(input("2 numbers must multiyply to: ")) solved = False while solved == False: nums = random.sample(range(-100, 150), 2) if (nums[0] + n...
I haven't done C in a while. This looks like a simple problem to start. Leetcode problem 415 Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. … Note: [1. … 2. … 3. … ] 4. You must not use any built-in BigInteger library or convert the inputs to integer directl...
I have a task wrapper which stores tasks, their CancellationTokens and of course their names (botName). botName is important, because when I want to stop a bot/cancel task, I will have to find it in the collection. I wonder if there is a better collection to do that, because it looks ugly, especially the CancellationTo...
Ive written this code over the course of the last days and it seems to work. However I'm not an experienced Coder so I don't know if my code is efficient enough. Any advice for improvements or nez approaches to this challenge would be very welcome. def lex(task): def isOperator(c): return c in "+-*/^" ...
This is my naive approach on implementing a Sudoku solver, which is okay for simple Sudokus like this: puzzle = [[5,3,0,0,7,0,0,0,0], [6,0,0,1,9,5,0,0,0], [0,9,8,0,0,0,0,6,0], [8,0,0,0,6,0,0,0,3], [4,0,0,8,0,3,0,0,1], [7,0,0,0,2,0,0,0,6], [0,6,0,0,0,0,2,8,0], [0,0...
I am trying to solve the Challenging Palindromes problem from HackerRank. The code that I have got so far fails only for large inputs due to timeout, every other test it passes successfully. The problem in a nutshell is that a function is to be written, which will take two string arguments, and return the largest palin...
I'm starting with Kotlin recently and am hoping to improve. I wrote a small app to parse the list of free Springer books and download the books into your chosen local folder. Comments around obvious mistakes, unidiomatic Kotlin, any other points of improvements will be greatly appreciated. Thank you. Gradle dependencie...
I am adding below code for review as i am bit new to boto3. This Script adds tags (key and value) to All Volumes of EC2 listed in Excel. Is there any more effective way i could have written this? Also I am using AWS temporary credentials by editing ~/aws/config and making profiles. Is there any other way i can use w.r....
I currently have a singleton that holds the translation objects in my app. View controllers can subscribe to its delegate so they can update their views if new translation objects have been added. This is what the class looks like class TranslationItems { var delegate: TranslationItemsDelegate? static let shar...
I want to upload files from my Javascript client to my WebAPI. With this I want to have a progress bar. My Idea was to cut the files up in chunks and then stream them via SingalR since we are using SingalR anyway. This is my code: API: public async Task UploadStream(IAsyncEnumerable<string> stream) { string buffe...
This component is meant to take in an array of available options and provide the user an easy way to choose multiple options and filter on the available options. Each time the selected options are changed/updated, those options are console logged. I'm hoping that someone could provide any criticism on my current code. ...
I'm writing an assistant for the tabletop RPG Pathfinder in Java. I intend to use the MVVM pattern using JavaFX, possibly through mvvmFX. Before I go into the V-VM phase, I have built a first iteration of the model, and would like some comments on it. The full code is on GitHub, I only include in this question the rele...
I designed a simple timeout thrower for a bluetooth protocol I am writing. If the packet is not received in a certain amount of time, then timeout is thrown. I made it to be as plug and play as possible. timeout.hpp: #ifndef __timeout_h__ #define __timeout_h__ #include <thread> struct Timeoutthread{ private: ...
I've created my first gem in Profitwell API wrapper https://github.com/eebasadre20/profitwell. I love to get some feedback, comment, or suggestion on the code structure, method implementations, and so on. I am more concerned in my code structure like how I structured to handle the module and class, the request-response...
My mentor says to reproduce the system() function of Linux exactly as given in the man pages. I have written the below code. Could someone review this code and provide me any suggestions for improvising. I am a beginner. Thanks :). #include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<sys/wait.h> #includ...
Here's my attempt at trying to understand synchronized() blocks using an Object lock, using wait() and notify(): import java.util.Scanner; public class SyncTest { private Scanner scanner; private Object lock; private volatile String string; public SyncTest() { scanner = new Scanner(System.in...
This code is meant to retry the db operation when a DB connection breaks: OperationalError. A transaction can fail for example when a db is being restarted and a commit fails. Or when a network error causes error in the DB transaction. (Variables-Names have been adjusted for demo). My current method forcefully closes t...
More than once I claimed that using binary search doesn't improve performance of the insertion sort. For example, see answer here and comments here). Now I have time to substantiate my claim. The only practical application of the insertion sort, where we actually do care about performance, is sorting almost sorted data...
package labodeva; import java.util.Scanner; public class odev5dene { static int[] quick(int kucuk,int buyuk,int[] arr,int pivot) { int bos[] = new int[100]; int t=0; while(kucuk<=buyuk) { // buyuk is big kucuk is small if(arr[kucuk]<=arr[pivot]) { kucuk++; } else if(arr[buyuk...
Goal: apply fn to every element of an arbitrarily nested iterable (tuple, list, dict, np.ndarray), including to iterables. Ex: def fn1(x, key): # ignore `key` for now return str(x) if not isinstance(x, Iterable) else x def fn2(x, key): return x ** 2 if isinstance(x, (int, float, np.generic)) else x arr = np.r...
Doubts in logic to generate the output file according to the example I need that even if he reaches the total_min <720 condition he continues to travel the lines. 720 is the total number of minutes before lunch, when reached, it should separate the activities that should be performed after lunch (lunch must be inserted...
The powers of 2 are trivial to factor because all powers of 2 have one 1-bit and the rest 0-bits. Just iterate minus one 0-bit as follows: 10000,1000,100,10,1. And then convert the binary strings into base-10 and you got the factors for powers of 2. Example import operator from operator import mul from functools import...
I am creating a 2D text-based Drawing Application which can draw basic shapes like Line, Rectangle, Triangle, Circle, Oval. The Line can be drawn in eight directions on a 2D plane and can be moved by a user in Left, Right, Up and Down directions. The Lines(or any other Shape) are contained within a Boundary. Lines(or ...
I first thought of the idea when looking at c style multidimensional arrays and realized that there is not really a modern c++ version of that.other than having an std::array of std::array which is not very convenient, so I decided to essentially make a copy of std::array and modify it so would act like a multidimensio...
Motivation In the standard Python library enum, a subclass of Enum would create all its members upon class creation. This can be a huge waste of time and memory, especially if the class contains lots of members but only a fraction of them would ever get called. As a practice project on metaclasses, I decided to impleme...
I wrote a simple Makefile to build .expected files and compare them. It works as expected and I was wondering it would be great if I could get some feedback. More specifically if I followed all conventions and if it can be improved upon. This is my first Makefile. # Relative path RELATIVE_PATH=.. APSSCHED=$(RELATIVE_PA...
I am developing applications for android. In my application, the user can add information about his weight and watch the progress of weight change. I decided to add filtering of the elements according to the following criteria: the presence of a comment, the absence of a comment, weight gain, weight reduction. For this...
Currently, I'm working on a legacy application written in .NET that does not contain any unit tests. This application, when executed produces a very large directory tree with roughly 20.000 files in total in different folders. The application is currently being used heavily in production thus any mistakes during the re...
I trying to convert this C code for calculating distance from RSSI to Swift code. I try to do it by myself, but considering I'm beginner, I need help in how to do it. Here is C code: #define QUEUE_SIZE 16 #define INCREASE_INDEX(x) ({x++; if(x >= QUEUE_SIZE) x = 0;}) int rssi_array[QUEUE_SIZE] = {0}; int sort_rssi[QUEUE...
Motivation I have been trying to work on my first bigger scale Python project, however I am struggling to create pythonic solutions. Instead some of the functions (and especially the naming) I've done so far seems like more of a hacky solution, than a best coding practice. Hope someone can clear up some confusions and ...
I'm a newbie PABX tech with a hobby for programming so when I learnt most of the telephone system programming can be completed with scripts I got curious. With a bit of trial and error to work out the seemingly undocumented syntax of the script I decided once I'd cracked it, to create a spreadsheet where the user ente...
I have been working on a beginner project, learning React and Typescript. The project is an expense manager application and I have tried splitting most of my applications into simple short components. For the EditExpensePage component I have connected it to the Redux store for the app, in order to be able to access th...
I am new to programming and "programming thinking" as well. I have created a simple program that calculates future earnings from investing. It seems to be working correctly, but I want to be sure and ask some smarter guy out here, whether the program is really working as it should or whether it could be written in a be...
I have over 2500 files in a directory tree- some of them are numbered, some of them aren't. eg. 1. That night it rained.epub The sparrow returns at dawn.epub 001. Tomorrow is a new day.epub 000.1. We are the children.epub I created my C# code to iterate through all the directories and rename the numbered files to loo...