instruction
stringlengths
71
71.9k
I'm building a web app that pulls data from a ticketing system via REST API. I'm currently able to pull all of the data I need just fine but the loading process is really slow. I'd love any feedback regarding the optimization of my code. <?php include 'schedule.php'; $curl = curl_init(); foreach ($onsites as $value){...
August 2016 challenge The Rainfall Challenge Problem description is copied verbatim from the linked Code Review question: Problem Statement A group of farmers has some elevation data, and we're going to help them understand how rainfall flows over their farmland. We'll represent the land as a two-dimensional ar...
Basically, you just run main and it allows the client to "log in", and extract their number from a map, increment their own number, and log out. It all compiles and works fine, but how can I decouple this code, and make it more composable? I'm finding it's difficult to separate concerns, ex between the logic, and the ...
I want to convert my website into a single page app. This function does the trick: $(document).ready(function(){ $("body").delegate("a", "click", function(){ var href = $(this).attr("href"); $.get(href,function(data){ var newDoc = document.open("text/html", "replace"); ...
So I have some code here: First a simple random # generator and a array-choosing function: function Rand(min,max) { return parseFloat(Math.floor(Math.random()* max-min+1)))+parseFloat(min); } function Choose(arr) { //Returns an element from an array at random. return arr[Math.floor(Math.random()*arr.length)...
Created this drawing app with JS / canvas. JSHint is throwing errors but the app works just fine. Need help with code clean up / refactoring as I'm fairly new to JavaScript. JSHint in Atom is fine but using codekit to compile and minify the JSHint freaks out - 31 errors: changeColor is defined but never used (and many...
Problem Implement a relatively naive acronym generation. I was trying to implement a solution without using regex. Portable Network Graphics => PNG. Ruby on Rails => ROR. HyperText Markup Language => HTML. Complementary metal-oxide semiconductor => CMOS. Origin is from code exercise site, exercism.io. Implementation ...
Here is my Python code for finding the permutation index of a given digits and a target number. And by permutation index I mean, for example, given digits [1, 2, 3, 4]. find the index of 3124, meaning the position of 3124 in all permutations. This code finds that. However I have suspicions about it efficiency and imple...
I have seen this question asked around a bit, such as this Code Review question in Java: Write an optimal program that would determine the total number of stops a elevator has taken to serve X number of people. There is a elevator in a building with M floors. This elevator can take a max of X people at a time or...
The intro is a bit long. If you're not interested, then please read the update, and have a look at the specific parts I'm highlighting. I'm very interested in any improvements, but you can assume that all calls starting with psspy. are correct and can't be changed. Also, the calls to psspy that are inside a loop have ...
I have to handle an Action (Modify) about my web application. The app working with SMTP Email, ActiveDirectory, External System (Biztalk, CRM, FTP, others WCF Services) and Internal System (WebServices and Databases SqlServer-Oracle). The main action checks several conditions in several entities. There are duplicate c...
I made a function that would automatically generate official receipt for POS. it is able to accept format such as xxx, xxx-xxx, xx-xx. But my code is really messy and horrible and it needs review. I would really appreciate for corrections, recommendations and critiques to improve this. The flow would be: Get the last...
One of the questions that is presented in Chapter 3 for Cracking the Coding Interview is this: Describe how you could use a single array to implement 3 stacks I've implemented a solution to this problem in C++. My assumption is that the array is a static array that is not growable (unlike a dynamic array). I would lik...
In an attempt to learn Java and SHA-2 I created a very simple String-to-SHA512 generator. Here is the code: package main; import java.util.Scanner; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class SHA512_String_Hash { public static void ma...
TLDR: Rendering is too slow when having lots of custom fields and rules. So I need help to improve this javascript code. #9606: Trac ticket about issue I have a trac 1.0.8 installed on a ubuntu machine with DynamicFields 1.2.6 installed (compiled from latest revisions 0.11 folder). I have more than 100 custom fields ...
Wikipedia has an example of a decorator pattern here: https://en.wikipedia.org/wiki/Decorator_pattern#Second_example_.28coffee_making_scenario.29 I was trying to solve this using functional style using Java 8 just to compare the Oop style and functional style of solving the same problem. The solution I came up: 1.Coffe...
I'm a bioinformatician and mainly use python, but I'm trying to learn Haskell. So far I like this language because it's beautiful and fun, but my Haskell scripts usually end up being much slower than my Python equivalent. Here is my latest attempt: -- Define type synonyms for fields in a fastq record. type Name = Strin...
This series is similar to Fibonacci Series defined as : a[0] = a[1] = 0 and For n > 1, a[n] = a[n - 1] + f(n), where f(n) is smallest prime factor of n. for N in (1 < N < 10^7). Spoj Link for this problem . I have solved this problem in c & Python. But due to long range, I am getting Time Limit Exceeded in Python. Fo...
I'm learning Unity with C# programming and am trying to learn game design. I know the that the best way to learn games programming is to recreate some existing games, and this is my code to create Tic Tac Toe. It's not 100% complete yet but it will be eventually. However, my question is regarding writing decoupled code...
TreeNode* firstCommonAncestor(TreeNode* root, TreeNode* q, TreeNode* p){ if(root == p || root == q){ return p; } if(root == NULL){ return NULL; } TreeNode* temp = firstCommonAncestor(root->left,q,p); TreeNode* temp1 = firstCommonAncestor(root->right,q,p); if(temp1 != NULL && temp1 != p){ return temp1; } ...
I am implementing a binary search to retrieve all matches of a specified value. Instead of a regular binary search that would just return the first match, I want to get that first match AND all matches above and below it in the set of objects. For example, I have an array of objects that are sorted by the name property...
Here I have implemented a queue. Is this a correct, efficient queue implementation? what issues are there if any and what can be done to make it better? import java.util.*; public class Queue2{ private int amountInQueue; private int[] queue; private int rearIndex; private int frontIndex; public Qu...
I have a dataset with 16 million rows and may increase upwards of 30 million. I am using the parLapply to run across three cores in R. But it's taking two days to run to completion. When I try smaller datasets of about 60,000 it takes less than 5 minutes to run, what may be cause of this disparity. Desktop Specs : Core...
We have a class which acts as a time interval, containing a LocalDate and two counts of minutes since midnight. One of the methods on this class converts these values into two DateTimes. Since DateTime has time zone information built-in this conversion might fail if the time is in the daylight savings time "gap", i.e. ...
I wrote a small program in Python that finds primes (how original) up to some limit. I tried to produce very clean code, so I'd be vary grateful if you could point out any improvement I could do to make it more pythonic and more readable. I'm also interested in knowing whether or not it can be sped up (with the same me...
def Ana_exc(): global global_dic, missing_key_w, out_put_defult, ffd_ana_exception_path_w, ana_exc_input_path, ana_5min_input_path, min_flag count_path1 = 0 count_path2 = 0 meow2 = '' ana_exc_time = '' ana_ffm_track = [] ana_exc_missing = [] time_track = [] ana_exc_ffm_header ...
This is my solution to the Equal Stacks problem on HackerRank. I thinks it's really messy and slow. could you give me some thoughts about how to optimize given code and algorithm(i'm pretty sure problem can be solved way effectively) import java.io.*; import java.util.*; import java.util.stream.*; import java.text.*; ...
I created a small ruby script at work to recreate a text file I use for a test in the Java application we are supporting. I'm still really new to the ruby paradigm and wanted to know if that small script respect most of the spirit of it. The content of the file doesn't need to make sense since the only requirement I ha...
I'm learning kotlin and java. As a code-kata I wrote the roman to decimal converter. I'd be very grateful for code review. I was trying to keep things simple and funcional. I'd especially appreciate any comments on the functional style (e.g. the non-purity of some mappings). Converter tests: package roman import ...
I learned HTML, CSS, JS, and Bootstrap then I grabbed a PSD and tried to code it from scratch (to get experience and something for my currently-non-existent portfolio). Here's the result. I need someone to look at my code and tell me if there's something wrong with it. You know, did something the wrong way or used too ...
So having used the SE API multiple times, I like how all responses are in a Wrapper object, and for my own API design I figured it was a good method to follow. Of course, I also wanted to abstract everything out so that common actions could be handled in a simple manner, so that I wouldn't need to write the same boiler...
I am looking to make the following code more efficient since it it rather lengthy. However I need to include in the code constructor classes that include accessor methods for the container number, height, radius 1, radius 2, and a method that computes the liquid that the container can hold. So I am looking to leave the...
In my textbook there is no mention of keybindings and it encourages the use of keylistener so there isn't any example code using keybindings for its problems. I was wondering if this is sorta close to how I'm supposed to use them. I tried to let one Action object handle all the keybinds and use the event info to determ...
I have built a random machine generator website. It fetches the quotes from forismatic and has a button to get a new quote. When it gets a new quote, the website color changes. It also features a button to tweet the quote and a button to copy to clipboard (using clipboard.js). //Needs JQuery function getNewQuote(){ /...
Just mucking around with Elixir and bitstrings and wondering if there is a better way to implement the following ( or improve ). :- defmodule Crypto do def hexdigit( digit ) do case digit do d when d >= ?0 and d <= ?9 -> d - ?0 c when c >= ?a and c <= ?f -> c - ?a + 10 ...
In order to learn C++ I have written a solution to this Kattis "Hitting the Targets" problem Basically the program is to accept some shapes (circles and rectangles) on std in and a set of points and output the number of shapes that include each point. Seeing as it is my first C++ program I'm sure I have made significan...
I've been researching ways to reduce response size on requests in my rest API without adding lots of calls to get back just the ID and single properties. What I've ended up attempting is creating the ability for the API consumer to specify the fields they want back from a default response model and have the response b...
I've been working in C++ for awhile now, but always like for others to look over my code as much as I can get them to. My main concerns are if I've made something overly complicated or if I've broken any general conventions in my code. Anyways, thank you for reviewing and I hope you enjoy playing the game if you choose...
I had a test on sorting using quick sort algorithm, which I have implemented. It's working fine. But my examiner is not satisfied. They say that the solution which I provided is not a proper quicksort, my code partially deviates from the actual quicksort algorithm, and the code is a mess in certain places. I took the ...
I'm working on optimizing a class for decompressing Mass Effect 3's .sfar files. .sfar files are archives, and this function decompresses a file from inside an .sfar and writes it to the provided Stream. Sometimes the file isn't compressed, and so just gets copied to the output stream. Most of the time though, the fi...
While implementing Android Activity component using MVP pattern a discussion arose - who should be responsible of creating list adapter - view or presenter? If presenter creates adapter, apparently View needs to provide Context for Presenter to be able to instantiate adapter: public interface MyView { void setAdapter(...
I have made a search script in OO PHP that searches for products based on the inserted criteria, selects them and checks whether a sale is on, if it's in stock and other features. I am new to OOP so I would like to get your feedback on it and whether I am doing it correctly. The whole script works but I need to know if...
Below is the code I implemented to solve the binary gap problem: Find longest sequence of zeros, bounded by ones, in binary representation of an integer. However, it seems to be different from the answers out there. Is it because this is a bad approach in terms of performance? I wanted to get some ideas. function bi...
I have a Database worksheet (SoapUI - CollisionsSingle) that have around 1500 records and 38 columns of data per record. I have a VBA script that copies the records into a algorithm worksheet (COL_STpremcalc) and then copies the results back to the database worksheet. However it takes around 1-2 minutes to perform 1 re...
I have two tables, looking like this: Table 1 id | name | date ---+------+--------------------- 1 | zaak | 2016-08-03 11:37:40 -- top 1 dates, name #5 2 | aap | 2016-08-01 11:40:35 3 | corn | 2016-08-02 11:42:16 -- top 3 dates, name #3 4 | quar | 2016-08-02 11:42:28 -- top 2 dates, name #4 5 | a...
I just finished the Pluralsight courses about Inversion of Control and Mirco-ORMs, and I am struggling with the implementation aspect of some of the concepts. This is my (simplified) repository implementation using Dapper: public class AppRepository : IAppRepository { public string TableName { get; } = "apps"; ...
An entry for the August 2016 Community Challenge I slightly modified the input and output to suit the snippet tool, and also because I really like the mapped output with the basins. I have been golfing a lot recently, which always impacts my coding style. You will find a number of possibly too smart one-liners. I am lo...
Explanation This software is currently designed to: Spawn a daemon which controls and monitors multiple threads Create threads based on a 'list' of functions Monitor threads for operation Restart threads if not running Cleanly stop threads and exit upon SIGTERM It runs on a single embedded system, operating Debian 8 ...
I wrote a simple chatbot in Python a while ago, and I'd like to know how it could be improved. Here's the code: import random import pickle class Bot: current = "" botText = "BOT> " def __init__(self, data, saveFile): self.data = data self.saveFile = saveFile def say(self, text): ...
C++ doesn't supply a std::hash<std::tuple<...>>, so I decided to implement one. However, I was viewing this as more of a hash library than extensions to std, so I placed it all under the namespace utils. This was my first time seriously using template meta-progamming. I tried to make my code work no matter the cv-ness ...
This is a fairly simple Ruby solution to the August 2016 community challenge. Ok, the title is way too dramatic. But tributary is a nice word, and the alliteration was too good to pass up. Besides, konijn started it! I didn't bother to output a 2D "map" of the basins, I just print their sizes as the challenge requires....
Let's say we're writing a user script which interacts with a 3rd party site we don't control. We want to open a menu, so we trigger a click on the button and then wait 10ms before accessing the menu (which is appended to the document after the click), like this: $button = $('#button'); $button.trigger('click'); setTime...
I have a program where I need to implement asynchronous tasks (writing a directory to a file following any change to the directory). There is existing documentation within my organization for implementing tasks, which includes actions and actors. Most of it deals with distributed activity across multiple servers, which...
I have a collection inside MongoDB with thousands of documents. A document should be processing depending on some logic. To make the point simple, I suppose here there is a field requiresProcessing indicating whether or not the document must be processed. To do the processing I created a stream of objects from MongoDB ...
I have been building an app in React Native and have decided that since my Login and Signup components share much of the same code, it would be best to create an AuthState component and pass login={true} or login={false} as props to trigger renderLogin() or renderSignup() in AuthState. However, in doing so, I think I h...
I'm writing a little text based adventure game, and wanted to know if there's anything I can do better thus far. It is not completed to don't get mad when it ends. I'm just curious as to better ways to write the syntax, or different ways to do things. from random import randint BACKPACK = {} # What you will bring wi...
My solution for the Rainfall Challenge (August 2016 Community Challenge). Error handling was intentionally ignored. Cell.cs public class Cell { private readonly int myRowIndex; private readonly int myColIndex; private readonly int myValue; public Cell(int value, int rowIndex, int colIndex) { ...
This code is meant to run through a column of values, bin the values based on specified ranges, then output the average value of each bin. The problem is the code is running quite slowly (approximately 30 min for around 100000 values). I am definitely a beginner at coding and was hoping there was some way to speed th...
I have made a shopping basket script that allows the user to add and remove items from the basket, and edit quantity of items that are in the basket. I am new to OOP, and I would like to get your feedback on it about whether I am doing it well. The whole script works but I need to know if it could be improved or it is ...
I'm pretty new to programming (haven't written much code myself, only read code for my computer science studies etc) and I keep getting confused by how to best structure my code. Let me get a bit more specific by including the code of a Chess game I started to program today (want it to fully function text based, GUI ma...
I am currently writing a program to sync files (music, photos, etc) from my PC to an Android device. In order to do this, I have 2 application: one that is running on my PC, and one that shall be running on the Android device. When the Android app will open, it will try to connect to a specified IP:port on the PC appli...
That is a programmatic solution to a puzzler from Car Talk, its summary is: "I noticed that the last 4 digits were palindromic. I drove a mile, and the last 5 were palindromic. I drove another mile and the middle 4 were palindromic, and the ends were not involved. And then one mile later, all 6 digits were palin...
Rubberduck works well enough when the VBE is of the VBA variety, but it currently only works when the Rubberduck is configured to load at VBA start-up, and it has a tendency to crash the host application or fail to shutdown when exiting. There's a number of outstanding issues around being able to load Rubberduck after ...
I have product results with some filter, and the one is category. I'll get the category list from product results. the model category and products is one to many relationship. This is the search query: $results = Product::where('available','=', 1)->whereRaw('stock_available > min_quantity'); $results = $results->where(...
Problem Implement a base N to base 10 (decimal) converter, where N is between 2 and 36 inclusive. Implementation Am I over-complicating things in calculateDecimalCharacterValue? public class BaseToDecimalConverter { public static int convertToDecimal(int base, String input) { if (base < 2) { throw new...
I'm taking my first ever CS class and I have an assignment due Friday. I just wanted someone to check my code. Instructions: Write a program that: gets the name of a text file of numbers from the user. Each number in the file is on its own line. reads in those numbers one at a time writes the even numbers to a file n...
I wanted to create a short, informational and colourful prompt. My prompt includes: Exit status of last command (if not 0) Distinctive changes when root rsync-style user@host:pathname for copy-paste goodness Git branch, index, modified, untracked and upstream information Pretty colours Example: Is there a way to ac...
Requirements: To store strings into variables, check if they are valid for the field. To be able to easily unit test the validity checks with different parameters. To throw exception when a check fails To scale appropiately for dozens of field types To have a good API for users. To be expandable. I have the following...
I have an EF-driven Repository pattern implementation. Roughly looks like this: public class DataRepository : IDataRepository { public IDbSet<Contacts> Contacts { get; set; } } I would like to implement a Contact import functionality, which has some custom logic for manipulating the entity which is being imported (i...
I am fetching around more than 300000 items through a query: @items = current_company.item_masters.user_hierarchies_filter(current_user).accessible_by(current_ability).paginate(:conditions => condition.compile, :include=> includable_tables, :order => (sort_column + " " + sort_direction), :page=> new_par...
I have been trying to write a sample code block to read file contents into a buffer. I am assuming that: Code must be platform independent Should work in all cases(or report proper error) It should be readable and maintainable It shouldn't be over-complex and shouldn't have errors Do you think the return of fseek sho...
I want to convert a large PDF file into individual text files with PDFBox using Python. This code takes lot of time to convert a PDF containing 1000 pages. Is there anything I can do to improve it? I cannot use any other library. My other code (Python - parsing of obtained text) works best with output of PDFBox. import...
I have the following poller class that can be used to "poll the required action": public class Poller { private readonly string name; private readonly Action action; private readonly int pollingInterval; private readonly Thread pollingThread; private readonly AutoResetEvent stopEvent; private r...
I have been working with multi threading and would like some feedback on the code, i generally suck at class design/OO which i am trying to improve. Im sure there is a better way of making it neater and maximizing readability. using System; using System.Collections.Generic; using System.IO; using System.Linq; using Sys...
I have two functions now with very similar functionality, and would like to merge them into one more generic function. The only difference between those two functions is that one handles json input file and the other xml input file. I could use if statements to achieve this, but I find it cumbersome, other suggestions ...
Is there any better way than doing: if ((newState & InputState.DEFAULT) == InputState.DEFAULT) ? My InputState.class defines static int variables to the power of 2 that are being ORed with an int to make it possible to determine more than one input state. However, checking the existence of a set bit like this looks ju...
First time working with html 5 so far. Am I using my markup correctly thus far? Semantically correct that is? <!doctype html> <html lang="en"> <head> <title>Salon Sociel | Hair-Nails-Unisex</title> <meta charset="utf-8"> <link rel="stylesheet" href="style/main.css"> </head> <body> <header> ...
1. Introduction This code is my attempt at solving the August 2016 Community Challenge. Coming from a city where it rains cats and dogs on a daily basis this challenge was right up my alley =) 2. Algorithm I used the solution 200_success ♦ outlined in his answer here: Each Cell keeps track of which Basin it belongs ...
Here is a programming challenge from codility A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 ≤ P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices, i.e. A[0] + A[1] + ... + A[P−1] = A[P+1] + ....
Problem Statement : Given a string of lowercase alphabets, count all possible substrings (not necessarily distinct) that has exactly k distinct characters. Example: Input: abc, k = 2 Output: 2 Possible substrings are {"ab", "bc"} I have written the solution with a two pointer approach. I am not sure how to calculate th...
This is my attempt to solve the August 2016 Community Challenge in Swift. I tried to implement the algorithm described by @200_success: Each Cell keeps track of which Basin it belongs to; each Cell is initially assume to be in its own Basin. Each Basin has a sink, or lowest Cell, which acts as a "representative el...
I am working on a replacement for a program called pdftk. The program needs to be able to take pdf's, and generate fdf files for them, fill a pdf from an fdf, output info about the forms, and output data about the pdf. I'm sorry for horrible formatting (I'm new to Java). Right now the program works, but is quite slow. ...
This is a direct follow up to Parsing cells containing Line Feed Characters. Link to sanitized xls on dropbox if test data is needed Essentially the reports I work with aren't bad - The issue is the way it exports to excel - With the problem being that these cells are filled with LF characters breaking apart the dat...
Is there a better way than using 2 for loops and 2 if statements deep? jsfiddle: https://jsfiddle.net/bobbyrne01/bmnk9bLz/ Code: var documentsInDatabase = [{ id: '1', revision: '1' }, { id: '2', revision: '1' }, { id: '3', revision: '1' }]; // incorrect revision of document with id of 1, and non-existent d...
I have written a script which is supposed to call the function at the bottom for each unique combination of values in the parameter vectors. That function is a simulation which I intend to run over all the unique combinations of those parameters. The simulation is run on a cluster, and the sim_ind for each of these job...
This code wraps the user endpoint and media endpoint of Instagram API. Any best practices/ styles or glaring bugs you can see? I wrote some unit tests for each class but did not include for readability Base class: import unirest from oauth2 import OAuth2API class Client(OAuth2API): host = "http://api.instagram...
I have created a function that adds "shadow" to the content of a canvas. The algorithm for adding shadow follows these rules: If the either x or y is 0, ignore. If the pixel on the current pixel's top left corner is not completely transparent, set current pixel's alpha value to 0.1. This algorithm runs from top to bo...
I've written the code below to display a list of tasks from a Flask API. The form and associated .ajax method post to the API, immediately appending the data to the list of tasks. The code is working, but I'm fairly new to jquery and am curious if my code could be improved. <html> <head> <title>Home</title> <script src...
In what ways could I improve this? Does it look good? Any security concerns? I am using Jersey, Jackson and JPA. What about the architecture? I basically have CustomerResource communicating with CustomerService and CustomerService Communicates with the Entity. The updateCustomer method is in CustomerResource. I am abso...
I have written a simple wrapper for docker build and docker run that allows me to build and run my image without having to use the docker command directly. Here's the layout of my code: esp8266 ├── scripts │ ├── config.sh <- configuration │ └── util.sh <- utility functions ├── docker <- docker image roo...
Recently while developing our demo project I had to a write a lot of repetitive code for executing the database queries (insert, update, delete). So, I have put all the repetitive code into a class library, imported and used the library for db related actions i.e. open, close, execute insert, update, and delete queries...
I've been learning Go for a few months and this is one of my first projects with it. It's an analytics beacon for my low-volume blog; it emits a tracking pixel and logs parameters from the browser to a database. I'm hoping to use it in addition to Google Analytics, so it isn't mission critical or anything. I'd apprecia...
I solve this problem in Swift. However, some cases I got terminated due to timeout because the solution isn't efficient enough. I did check the solutions and they are correct. Any tips on making it more efficient and code review? import Foundation func readInteger() -> Int { guard let line = readLine() else { fat...
Is there any better way to do this? import json product_data = [x for x in open('product_strings.txt', 'r', encoding='utf-8').read().split(',')] json_data = json.load(open('tedata.json', 'r', encoding='utf-8')) for product_no in json_data: for product in product_data: if product.lower() in json_data[prod...
In my app I'm using JSON Web Tokens for authentication purposes, using the pyjwt library. Instead of using static keys and/or worrying about key distribution, the server generates a public/private key pair upon startup itself and just keeps it in memory. The keys will be reset and thereby all existing tokens invalidate...
I want to use an existing C++ library in a C# app. The C++ library will have async callbacks for things like OnConnect and user updates so I want to reflect this in the eventual C# code. I would appreciate thoughts on the following implementation particularly in the area of memory leaks in the CLI part. To begin, I hav...
I wrote a Python module to learn about memoization, and I have some questions on what I did. How pythonic is this? Does it make a difference if I used a class attribute instead of a function attribute for my lookup_table? How can I modify multi_run_chrono to use it like Python's decorators (with @)? Should I keep the ...
The following code will generate a sequence of N mac addresses based on the input from user. The input must be atleast one octet to generate the sequence , ie : input : A0 , 5 output : A0:00:00:00:00:01 - A0:00:00:00:00:05 My actual code is working fine and I wanted to make it optimized if it could be : public static...
I am very new to Python and trying to refactor my code which is ripe for error. Currently, I manually name a bunch of arrays: open_cost_mat_train = np.array([]) closed_cost_mat_train = np.array([]) open_cost_mat_train_1 = np.array([]) closed_cost_mat_train_1 = np.array([]) open_cost_mat_train_2 = np.array([]) closed_co...
I am currently in the process of learning C++. As such, I am making small programs to get more comfortable with the language. One of these programs is a small mergesort function with a basic wrapper for human-readable output and a few utility functions. I have posted this program here to get feedback on it. I am most i...