instruction
stringlengths
71
95.1k
I am learning graphs and most of the implementations that I see are meant for int. So, I decided to code an example that can take other data types such as char or float. I did see this prior to posting my example (but not prior to coding my example). The example in the link is similar to creating a Tree where a separat...
I inhereted an implementation of a singleton template. Althoug I read that singletons are bad, my program uses singletons throughout and I can not get rid of them at the moment. This is the implementation I started with: template <typename T> class Singleton { public: static T* ms_singleton; Singleton() ...
I was watching a C++ Talk and he showed some code for a basic for_each_adjacent. I took the base concept and improved it a little bit, I am wondering if i could have any feedback. It automatically deduces the amount of parameters. My main concern is the remainder. I am not sure to pass in a epilogue function for the r...
The goal is pretty straightforward. There’s a list of dotfiles from my home directory. It loops through them and rsyncs all file to a Dropbox folder for backup purposes. A cron job runs this nightly. Code has worked well so far. #!/usr/bin/python import os from os.path import expanduser import sys import subprocess d...
I’m a designer learning to code and I’ve built a simple form calculator for ordering cakes. I would love it if you could show me how to make the code more idiomatic. How can it be more consistent, concise and simplified? How can I align it with best practices? What’s the right way to group and order it? In what other w...
Prerequisites: A RGB-LED is attached and wired to the Arduino Uno-board. Process description: In the beginning the LED is turned off. A loop starts and an output-signal is put on the red-part of the LED. With every iteration the output-signal becomes increased in the following way: 0, 1, 2, 3, ... The loop stops after...
I have written a Sudoku solver which can solve arbitrary NxN grids via backtracking. Since I'm relativly new to C any feedback is welcome. Code: #include <assert.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef unsigned int uint; typedef struct Cell { uint candidates; ...
This question is a follow up to this. I am learning Graph data structure and have implemented DFS and BFS in a way that it can handle data types other than int. These function try to search an end or goal node from a start node. How can I design DFS better? As of now, I need to reset visited nodes and flag every time...
Can you please review my code for reusability, clarity, readability and any bad stuff or bad practices? Brief Description:- Its a card memory-game, when you click two cards, it sees if they are same symbols and if yes, it matches them and keeps them open, if cards does not match it closes them and player tries to match...
When I read other people's code, it's sometimes difficult to understand the import structure. I thought making a graph of the import structure of a given python program would be a fun programming task, and maybe would result in a cool visualization. Currently the program included only works for modules with a .__file_ ...
This program tests whether a string is a palindrome or not. Can there be any improvements or shortcuts that can be used in the program. You can give any type of string as input. The program finds does it work. #include <stdio.h> #include <string.h> /* A palindrome is a string that is same in both forward and backward...
This code is meant to compute the reverse complement for a given sequence of bases. The code is tested versus some test cases and seems to work so far. The primary goal is that it should be as fast as possible (e.g. recovery from "file not found" or format errors in the input file is not required). The code is pretty f...
I wanted to understand the HMAC algorithm. So, I implemented it as a Jupyter Notebook with all intermediate steps being output to console. My objective now is to improve it so it may serve as a reference to anyone trying to implement or understand it. The Jupyter Notebook on github is easier to read and I would like fe...
I wrote this recently, I thought I'd check if it was the best way to keep my url as an https at all times, any advice would be appreciated if($_SERVER["HTTPS"] != "on") { header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); exit(); }
Created a max heap using a Python list as the base storage. The heap starts at index 1. Here is the heap: class Heap: def __init__(self): # storage starts with an unused 0 to make # integer division simpler later on self.storage = [0] self.size = 0 def insert(self, value): self.storage.append(...
So far this is what I have completed. Still working on these two methods boolean isIdentityMatrix(DenseMatrix matrix); boolean isInvertible(DenseMatrix matrix); Suggestions are appreciated. Thanks. //Dense Matrix package matrix.denseMatrix; import java.util.Arrays; public class DenseMatrix { private int[][] ele...
I wrote a procedural version of Hangman (very basic) and would appreciate some feedback on the following points: Is the basic logic OK? Any obvious improvements? Any details or matters of style I need to address? Var vs Const vs Let - I'm probably all over the place with this. My basic approach was "If it needs to be ...
Is this correctly written test? Tested class is responsible for converting from dto to entity class and i wanted to test it. Are these tests useful and well designed? I have a problem understanding how should look such classes. Tested class: @Service public class ConverterRegisterUserDto extends Converter<RegisterUse...
As a beginner in C programming, I decided to write a function words that, given an unsigned integer n, puts the English representation in words of n into the character array dest. This code is quite difficult to follow due to its complexity. If I hadn't written this code, it would take me a good while to understand it ...
I am writing the solution of Dijkstra's algorithm in JS. This is what has happened so far. I need to make it so that the choice of nodes is by recursion. Tell me how to do this better. const size = 6; сonst maxInt = 999999; const graph = [ [null, maxInt, 50, 20, maxInt, 30], [null, maxInt, maxInt, maxInt, 10, maxIn...
This is a drill from the Programming Principles and Practice Using C++. I managed to get it to work but somehow it doesn't feel right to me. I 'd appreciate any pointers on how to simplify/improve the solution. Especially when it comes to best check if '|' was entered. I feel that creating two extra string variables an...
I'm in the process of creating a simple SDL2 wrapper for a breakout clone. The real learning objectives for this project are: Learn how to manage resources properly via wrappers Learn more about SDL2 I'm building these wrapper as I step through Lazy Foo's tutorial and wanted to get some feedback on how I'm doing, and w...
I try to split URLs into segments. These segments got two information, their name and their own URL. The last segment in the segments list should not have the URL property because it's the current URL from the browser. There is no need for it. I created this code which works really fine const directoryPath = 'rootFol...
Presently my program is working properly, but how do i implement this program without using nested while loop(one while loop within another while loop).This is a kids way of programming and my office colleague doesn't want me to write code like this.So is there a different way for implementing this program or a proper ...
I'm trying to make something like Python's argparse in C. I created this Argument struct and functions; is my code good so far? Argument.h: #ifndef ARGUMENT_H #define ARGUMENT_H #include <ctype.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> struct Argument{ char **names; ch...
I have written a VBA code in excel (basically through combining various codes from others -_-") to list out the path, file name, file size & extension of all files under a folder and the sub-folders there-under. Is it possible to improve the efficiency for collecting the same info? Sub MainList() Set folder = Appli...
I wrote a small type-rich MKS Unit system for the consistent and safe calculation of physical units in everyday use. I realized some operators' implementations via the Barton-Nackman trick while defining types via an unique template parameter fixed upon object construction. This prevents e.g. the addition of inconsist...
I have programmed Tic Tac Toe in C. How can I improve the code? I have been told that system("cls") is not secure, but I don't know any other way of clearing the screen. main.c: #include <stdio.h> #include <stdlib.h> #define BOOL short int #define TRUE 1 #define FALSE 0 #define NUMBER_OF_ROWS 3 #define NUMBER_OF_COLU...
As a beginner, I'd like to see if anyone can suggest any better way of coding the below, as I'm duplicating code and nesting identical if statements as part of the following problem. I'm grabbing data from a REST API, which is returned in JSON format. However, the query may fail. One cause of failure is that the author...
Below is an example on how to scroll two canvasses in two separate frames simultaneously. The trick is on how to pass on *args from the bindings to function onscroll for scrolling and onresize for changing the dimensions of the rectangle using lambda in the commands: Scrollbar(frame3, orient='vertical', command=lambda ...
I wrote this code to count the dinucletide fractions that appear in a genome (this is a sequence of two nucleotides, 'A','G','C','T', together). My code also calculates the j2 index (this is a very simple index showing the fraction of groups of dinucleotides based on an equation at a glance*). It has currently taken 3 ...
I am looking for some suggestions on how to make my code cleaner and simpler. Or put another way: more elegant and idiomatic. Any other comments on quality or anything would be appreciated. class App extends Component { constructor(props){ super(props); this.state = { colIds : ["winni...
The task is to find the median of two Arrays. I have an O(n) solution. Can it be written in a better time complexity? def findMedianSortedArrays(self, A, B): combined = [] while len(A) > 0 and len(B) > 0: if (A[0] < B[0]): combined.append(A.pop(0)) else: combined.append(B...
This is the continuation of the questions raised in this thread I did include the improvements that were mentioned but still feel like, I do more copies than I need to. Also I am unsure about the number of copies being made when invoking certain operations on lavlues and rvalues respectively. Is this in general a code ...
I´m a programing rookie with minor javascript skills. So I ask you for a code review since I'm not sure whether my code is ok. Short explanation of my program: I work for the heating industry. Radiators have a different heat output. The standard heat output is calculated with: heat flow = 75°C heat return = 65°C hea...
Code performs well for small matrices, but gives memory error for large matrices of size 63000x93000, even when I am using server with memory of 64GB, space 100GB, swap 40GB. # -*- coding: utf-8 -*- from numpy import array, argmax, concatenate import csv def uread(Filename): UFILE = open(Filename, 'r') with UF...
Is the following in poor taste? This would be contained within a groupme module. Does it make sense to re-define a RequestException class within this module? If I didn't, wouldn't consumers of the module need to be aware of the underlying requests.exceptions.RequestException being thrown: ... class Bot(object): A...
I implemented a Double linked list in c++ to practice. I reviewed the code myself and I would like others perspective about the improvements that could be made. I have also noticed that I don't take fully advantage of many c++ features nor use them in my code. Any comments about significant performance improvements are...
I am trying to improve the quality of my code as well as trying to study the Heap data structure. I have implemented a minHeap (Heap in which minimum value nodes have higher priority). Ref: link1, link2, link3. This is the commented code: #include <iostream> #include <vector> #include <limits> // Class for throwing `o...
In my ongoing quest to demonstrate how VBA code can absolutely be object-oriented, I've started implementing a game of Battleship in pure VBA. This is a rather large project, so I'll split the reviewing across multiple posts. This first one covers the coordinate/grid system. Each module in the project is annotated with...
I am working on a photo editor, which displays a preview to the user on a canvas. At various points in the app, the user may use sliders to adjust properties of the photo, such as scaling, rotation, etc. The preview needs to be updated in real time, as the user drags the slider. As I understand, pointer events are fire...
I want to determine a path (x and y coordinates) by using curvature data (radius, with constant distance (length_of_arc) travelled between data points. I want to repeat this calculation every 0.010 seconds and visualize the points in pyhon kivy (at the moment a raw calculation takes 0.006 - 0.014 seconds). Assume samp...
A BASH script that ask users simple questions and greps the syslog archive files (plain-text and gzipped). The script is fully working; I am looking for advices on: Coding style Possible optimisations Any potential pitfalls / hidden bugs User interaction Best practices and idiomatic ways to do things in BASH #!/bin/...
I am new at programming and I'm really confused about how should I do this, because at first I thought I should ask user which path to export. However I have been told that I should check if it exists the directory and if doesn't I should create it. How can I even create a directory path or ask user if it can be create...
I have server side log files written to various directories throughout the course of a week. I have the need to optionally compress, and archive these files to AWS. The script I have come up with takes a config file defining the include glob to look for matches, and offers optional removal of the source files once the ...
Let us assume that we need to develop an application which can select best 11 players to score maximum points. The application will select the best players after completion of a match. The rules are mentioned below. a. Each cricket team will have 5 players (2 batsmen, 2 bowlers and 1 wicket keeper) only. (For two te...
Sub SearchSlicer() Dim oSc As SlicerCache Dim oSi As SlicerItem Dim searchword As Variant searchword = InputBox("Enter a searchword") Set oSc = ThisWorkbook.SlicerCaches("Slicer_SEARCH_WORDS") For Each oSi In oSc.SlicerItems If oSi.Name Like "*" & UCase(searchword) & "*" Then oSi.Selected = True ...
Given three positive numbers A, B, and C. Find the number of positive integers less than D that are divisible by either of A, B or C. Input format The 1st argument given is an Integer A. The 2nd argument given is an Integer B. The 3rd argument given is an Integer C. The 4th argument given is an Integer D. Output...
This is basically my first real venture into JS coding ... I think what I have put together here is quite long-winded and could be streamlined but I'm not quite sure how. I have a table with Columns "Region", "Country", and "Display". CREATE TABLE [dbo].[DATABASE]( [Region] [varchar](20) NOT NULL, [Country] [varcha...
I am trying to calculate a customized concordance index for survival analysis. Below is my code. It runs well for small input dataframe but extremely slow on a dataframe with one million rows (>30min). import pandas as pd def c_index1(y_pred, events, times): df = pd.DataFrame(data={'proba':y_pred, 'event':events, ...
I'm trying to train my neural network and for the most part it's going well. However, I'd like it if it could train faster and was wondering if anyone could give some advice. I'm trying mostly to understand the concept and didn't want to use any libraries like Tensorflow or Keras to make my network with, so I expected...
I am trying to model information around football teams and fixtures. I am using the Premier League fantasy football API for my data. The fixtures API is here, and the team data (along with a lot of extra data) is here - see the "teams" element. I want to be able to do things like report on all of Arsenal's fixtures/res...
I use the code below to calculate the required information from other tables. I used joins to display names instead of IDs and to get required sums from other tables. I used COALESCE to convert null to zero. I had to used it again if I need to sum already COALESCED values. The code below is hard to understand and it's ...
I created this class to handle some dropdowns that I'd been creating using a squirrelly combination of HTML, jQuery, and AJAX. This works much better in the one script that I've deployed it in: namespace appwpclass; class PopulateDropdown { public $skillArray; public $grpArray; public $facArray; /** ...
On the fly, I just implemented this iterator supporting vector class to understand how range-based for loop works. It's really basic but let me know what can be improved. Vector.h #ifndef VECTOR_H #define VECTOR_H #include <stdexcept> template <typename T> class Vector { public: /* The iterator */ class Itera...
I have written the beginning of a map engine which runs off PIL and some JavaScript client side. Ignoring the rest of the code that is in the same file as this function, can you suggest any improvements to this code here? def convert_colour(region_number, incolour, outcolour): #print(region_list.regions_d[region_nu...
Let's say I have this pattern and a large array: String [] pattern = new String[]{"i","am","a", "pattern"}; String [] large_array = new String[]{"not","i","am","a", "pattern","pattern","i","am","a", "pattern", "whatever", "x", "y", i","am","a", "pattern",................, i","am","a", "pattern" ....}; As you can see ...
I needed an environment values loader for a random node project, and instead of just using dotenv, decided to just make one myself and see how it'll turn out. To make this meaningful, here's a rough description of the task requirements: // make an .env file loader // each line has the format key=value // # starts a com...
Can the performance of the iterative approach be improved? I find that this approach lags behind many recursive options. no recursive answers, please. Baseline recursive approach: takes 52 steps for this sized tree O(N) for every nested input each object is only touched once. function diameterOfBinaryTree(root) { ...
I wrote a function, read_fox_rcu() for getting an element from RCU-protected list in a linux device driver. read_fox_rcu() reads the first element, converts it to string , stores it to tmp and stores the first pointer to ppfox. I wonder that I used locks (rcu_read_lock(), synchronize_rcu(), etc), in an appropriate way....
I did an initial technical phone screening with this company which went ok, they then sent me a programming exercise to complete and send back to them. The goal of the exercise: -take input as a command line arguments (2017-06-03 USD 100 CAD) -use the input to make a call to an API (https://api.exchangeratesapi.io to ...
I recently solved the problem below from leetcode: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical). Find the maximum area of an island in the given 2D array. This is how I normally write python code. I am thinking this...
The data file is here. Here are my codes: > ftable=read.table(file.choose()) > start.time=Sys.time() > 1-length(which(ftable==1))/sum(ftable) [1] 0.12 > end.time=Sys.time() > end.time-start.time Time difference of 0.004880905 secs I understand that 0.00488 secs are not a lot. But I have to repeatedly do this calculati...
Problem statement Construct a binary expression using infix expression. The infix expression uses extra parenthesis to enforce the priority of operators. For example, infix expression ((1+2)+3) can be expressed in a binary expression tree in the following:       +     /  \    +   3   / \ 1   ...
I'm making a full-blown OOP Battleship game in VBA (previous post: Battleship Grid), and I want this code to be as good as it gets - and better, if I can. I've refactored a few things, introduced a ShipType enum, removed all globals, and finished implementing my second AI.. time for another post! I hadn't presented the...
In Dice Poker (or Yacht), a player rolls 5 standard dice (sides 1 - 6) and the resulting roll is given a score based on combinations: Two matching dice only - pair Three matching dice only - three Four matching dice only - four Five matching dice - yacht two pairs, full house, small straight, large straight, you get t...
For Job shop scheduling, I built a fitness function: def makespan_timeCalculation(lot_size, RHS, setup_time, processing_time, sequence, mc_op): machine_assigne_time =[[0 for i in range(mc_op[k])] for k in range(len(mc_op))] max_c = [0 for i in range(len(lot_size))] # Equal number of job completion_time...
I come more from a frontend background and have been reading up on more backend approaches and algorithms while solving a TicTacToe grid to see if there are any wins normally, I'd probably use something like this for (let i = 0; i < rows; i++) { if (arr[i][0] === arr[i][1] && arr[i][0] === arr[i][2]) { but with wh...
Kademlia is a DHT (distributed hash table) which uses a specific type of routing table, dependent on the Hamming distance between the "addresses" of two peers on the network. I'm attempting to implement a modified version of it in Java. To find which "bucket" in the routing table a peer should go into, I xor the peer's...
Here's the flow, Load XML file Deserialize to list in c# Map xml object to c# list Merge orders but increment order's product count public Order[] Load(string path) { var element = XElement.Load(path); var orders = new List<XElement>(); orders = element.Elements(); var _orders = new List<Order>(); ...
The number fizz buzz is composed of two numbers that are fizz and buzz. fizz represents the numbers that are divisible by 3 and buzz are the numbers that are divisible by 5. combining both fizz buzz are the numbers that are divisible by both 3 and 5 both. So how can we get all the fizz buzz numbers sum in a given range...
on a change of first select, second select options are being dynamically changed. How can I shorten it (jQuery or vanilla JS)? It is 3 way street - therefore class toggle is not an option? $(function () { $("#selectBox").on("change", function () { if ($("#selectBox").val() === "widget") { $("#...
I am beginner in programming and recently I wrote an editor, inspired by the Notepad program, with all basic features any editor should have, like finding, undoing, copying, etc. The problem is I do not "feel" OOP completely yet. I wrote the whole program in a single class with few inner classes for actions, a frame f...
In the last months I have written an application that, among other things, parses financial documents. This application has grown quite organically and I am not happy with that. I split the application into several libraries by functionality and intended to use simple DTOs. These DTOs will be created in the library res...
#loop to get input that is not blank, strips input of whitespace def ckin(a): while a=='': a=input().strip() return a #creates list with includes user admin user_names = ['admin'] #Ask for 5 names to store as usernames print('Please enter 5 user names: ') #if username is valid, add to list...
The question is taken for a coding interview I had, it is also in geeks for geeks, https://www.geeksforgeeks.org/zigzag-tree-traversal/ you are given a binary tree and you need to print it in a ZigZag/Snake order for level one from left to right and the next level from right to left and so on. I was asked only to come...
I am learning Python 3. One thing I am doing to get some repetition is going through checkio. It is a website with coding exercises. One of the exercises gives an input string as follows: str_to_nbrs("(2,2),(6,2),(2,6)") str_to_nbrs("(3,7),(6,10),(9,7)") I need the output of this code to produce a list of sub lists w...
I'm trying to quickly and efficiently find every recurring position of small byte arrays (4 bytes) in large binary files (several GBs). My current method is as follows: Stream stream = File.OpenRead(filepath); List<long> searchResults = new List<long>(); //The results as offsets within the file int searchPosition = 0;...
Although having very little C++ experience, I was tasked to implement several statistics objects that are safe to be asynchronous accessed by different threads, that collect data in relatively small memory caches and do the math when asked. Many of those I need to write are based on averaging, so help me by inspecting ...
I'm not an experienced Linux user and I wanted an easy way to run shell scripts as root from a PHP script, I came up with this: #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> #include <strings.h> int main(int argc, char *argv[]) { if (acc...
I wanted to write a custom session to act as proxy for a Dapper connection that could support transactions without having to expose any other DB related entities. At first, I thought of opening a connection upon creation of the session and keeping it open for the whole life of the instance. As I researched about the su...
So I am trying to delete a list having n number of objects and thereby I divided the list in 4 parts and let it to be deleted in parallel. The intention here is to do it in parallel so as to make it fast rather than sequential. deleteObject(x) can be assumed as an API which finally deletes an object has the code to tak...
I would like to ask for code review for my LRU Cache implementation from leetcode. Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwis...
The program takes in a set of coordinates that defines the polygon. It then takes in a set of points. The idea is to find out how many of these points lie strictly inside the convex polygon (not on the edge or outside). First the program checks if the first set of points form a convex polygon or not. If yes, the progra...
When G cell divides, it is divided into two G + 1 cells. In order for the G cell to divide, energy as much as G is required. What is the minimum energy required to make the total number of cells x? Input Example (G for each of 2 cells, total number of cells) 1 3 4 Output Example (minimum energy) 3 Input Description As...
Here is the problem description: https://www.hackerrank.com/challenges/ctci-array-left-rotation A left rotation operation on an array of size \$n\$ shifts each of the array's elements 1 unit to the left. For example, if 2 left rotations are performed on array \$[1,2,3,4,5]\$, then the array would become \$[3,4,5,1,2]\...
So I have two lists which have the same size. One is called roadS and the second one is called simTime. My aim is to calculate the difference between two indexes which lie next to each other and divide them with the difference of the other list. On the picture above you see what I mean. This is my current function: p...
We have to calculate a lot of different fixed factors with user input values. Every single calculation has a different min value. This block of code result.Calculation_VK = input.km_past_year * 0.040m; if (result.Calculation_VK <= 300) result.Calculation_VK = 300; result.Calculation_VK *= Constant.MWST; Is repeate...
I implemented a binary expression tree, I've used my previous shunting-yard parser to provide it the post-fix expression. I have a few specific questions outside of just comments about making it more pythonic: Should I check the type when assigning left and right nodes? I read that type checking is usually discourage...
We have an MVC application, which performs actions on a referral. We are added the business logic, to ensure that we can't perform invalid actions on the referral due to it not being in the correct state. We have something that works, but it looks pretty smelly, however we are unsure how to improve it. I feel like ...
I have create one class and interface for finding SuburbName based on Location or LatLong coordinates. My interface public interface IGeoCodeService { string GetSuburbName(double latitude, double longitude); string GetSuburbName(string location); string GetGoogleStaticMapImageUrl(string location); } My Cla...
Introduction This simple data structure combines ArrayList with LinkedList. In other words, it is a linked list of arrays: Code package net.coderodde.util.experimental; /** * This class implements an experimental linked list data structure that * combines linked list with array-based list. * * @author Rodion "r...
I recently posted a code review and received some very useful feedback. I have spent some time implementing the suggested improvements/fixes, and wish to post a follow up review, with the new and improved version of the program. Changes Made: Comments Section(s): I have added an additional ‘Register Use’ section to ...
I have the following front-end code for a responsive navigation menu which I thought using in my WordPress website. Clicking the .burger element should cause adjacent .menu element to appear or disappear, in dropdown or dropup respectively, but without a breakpoint conflict such as this, which I suffer from: We open a...
I have a data structure that looks like this: interface Node { originalWeight: number; currentWeight: number; } where both properties are floats between 0 and 1. To check if a node has been modified, I wrote a simple isNodeModified function: isNodeModified(node: Node): boolean { return Math.abs(node.originalWeig...
The following code is used to show/hide components in an AngularJS app: var vm = this; var hideComponents = function() { vm.showRegions = false; vm.showAccounts = false; vm.showOrders = false; vm.showInvoices = false; vm.showWarehouses = false; } vm.showComponent = function(componentName) { hideComp...
Project Euler #5: Smallest multiple 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?" And I'm wondering if my code to solve this problem is good and if there are ...
In my current game I have the need for values ranging from 0 to 1, or from -1 to 1. The values should never exceed this threshold, so instead of constantly validating the values I made a custom data type which essentially clamps a float to that threshold. I have been researching various ways of making it better, and I ...
I have a pre-planning file for year-end review that does a lot of index/match formulas and IF statement formulas based on certain parameters when referencing increases in various types of pay/incentive pay. Sub Update() 'File Paths Dim Preplan As String: Preplan = "M:\PrePlanning_Template.xlsm" Dim PS_Export As Strin...
I decided to improve my OOP design knowledge and learn python at the same time so I started to write a simple program which will be a fight "simulator". For now, there are only 2 character types : Orc and Human. The CharacterFactory class is created so that I'll be able to handle Orc and Human classes in a more abstrac...