instruction
stringlengths
71
95.1k
I'm trying to transform the following string "joe-smith" to "Joe Smith". I have the following code which seems to work okay, but is there a faster, better way? var prettify = function(str){ var temp = str.split('-'), i, pretty; for(i = 0; i < temp.length; i++){ temp[i] = temp[i].charAt(0).toUpperCase() + te...
I'm teaching myself Python and wanted to share this problem as my current solution feels inelegant but I'm not sure of the best way to refactor. If this sort of question isn't appropriate, leave a comment and I'll remove it. I'm writing a generic library to handle web API requests. The aim is to have a generic core tha...
I am just getting into front-end web development and to practice, I made a dropdown selector that allows for more styling than the regular <select> element. Please let me know what I can improve on (examples are appreciated, but not necessarily needed). I am mainly looking at the JavaScript, but if I am structuring th...
I have a query that returns an array or associative arrays of ids and years. It looks like this: [{"id":8,"year":1950},{"id":9,"year":1950},{"id":8,"year":1951},{"id":9,"year":1951},{"id":8,"year":1952}] There is a fixed number of ids, but they each have many years associated. I wrote the following script to turn the ...
The purpose of this program is to write a code that will give a user a list or menu of choices that show colors and their values according to some data and prompt them to enter input to determine the value of a resistor. I have completed my source code for this program and it runs perfectly, but I would like some feedb...
I'm trying to make a market depth chart with data from a exchange and a Google JS chart. The good news is I got it working, but the bad news is the code to prepare the data to be used by google charts is just bad. I know there should be far better ways to do this but I can't come to a proper solution. The original data...
My code is too slow, it does the desired, but not in \$O(\log n)\$ or faster. Explanation of the auction system: For simplicity we will assume that all orders are for a single unit of the traded item. The double action system operates as follows. When a new buy order of $x arrives it is simply stored for future use if ...
I am currently working on Project Euler problem #2 which requires you to print the sum of all even fibonacci numbers below 4 million. I just recently learned about generators and from my understanding they are used to decrease memory consumption by generating values on the fly (and not storing them in a huge list). Doe...
I have multiple (1000+) JSON files each of which contain a JSON array. I want to merge all these files into a single file. I came up with the following, which reads each of those files and creates a new object with all the contents. I then write this new object into a new file. Is this approach efficient? Is there a be...
EDIT: This question was followed up by this question, with improved code. I have a set of pretty large files (>2 GB, over 30m rows) containing intraday data in the following format: TIC, Date, Time, Bid, Offer AAPL, 20090901, 09:45, 145, 145.5 AAPL, 20090902, 09:45, 145, 145.5 AAPL, 20090903, 09:45, 145, 145.5 I al...
I've been struggling with registering a plist into NSUserDefaults and I've finally got it working, though I'm not sure that its written properly. I'm hoping someone here can shine some light on this process. My intention with this code: I want to be able to set all of my values in a plist and essentially use that to "...
public static <T> void heapSort( T[] array, Comparator<? super T> comparator) { int length = array.length; int start = (length - 1) /2; //right-most parent node //build heap while (start > -1) maxHeapify(array, start--, length, comparator); //move max to end, and rebalanc...
I am working on a new MVC web application, so the project is in early stages. I have created 4 projects. Let me explain what they do: Common --> contains all my DTOs, enums helpers, ViewModels etc. Web --> simple MVC application Business --> This contains providers which have an interface and implementation for dep...
This is a problem from Robert Sedgwick's Algorithms book: Write a version of bottom-up mergesort that takes advantage of order in the array by proceeding as follows each time it needs to find two arrays to merge: find a sorted subarray (by incrementing a pointer until finding an entry that is smaller than its prede...
I'm looking to get this cleaned up. using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace BaseHexW...
I am implementing, in my SinglyLinkedList class, an interface where I redefined linked list. I am trying to learn data structures. Please, let me know what I can approve upon in my code. public class SinglyLinkedList<E> implements LinkedList<E> { private class Node<E> { public Node<E> next; ...
I recently wrote some code to handle parsing of URLs, even if those URLs might not be one hundred percent perfectly well-formed. (This constraint made using Java's URL class impossible.) The resulting, relatively short library is presented below. (ns fuzzy-urls.url (:require [clojure.string :as string] [c...
I recently challenged @Hosch520 with writing a query as such: Find first questions with answers posted within 24 hours And he did great. I figured I would have a go at it too. Turns out I learned valuable things about data subsets, so here I am seeking review. I did not specify whether to return only the first answer...
LiveDate has the ability to display the current date either by asynchronously fetching the time from a server or by just using the client system date. It's only as accurate / reliable as the source being used. It's pretty much finished, but before I definitely considered it that I'd like to get a full review of it. Spe...
I have been using Python to learn programming, but I am just recently beginning to utilize classes. I have a basic game below. Please review and let me know what I should improve on. import random class Game: def __init__(self): self.winningNumber = random.randint(0,100) self.humanGuess()...
I'm trying to have a main App view with references of all my views to manage and call transitions between theses views. But, I have circular dependencies. app.js define([ 'jquery', 'underscore', 'backbone', 'views/viewOne' ], function ($, _, Backbone, ViewOne) { 'use strict'; var AppView = Bac...
Inspired by this question and my answer to it I told myself I could try an optimized version for a 4x4 puzzle. There are only \$16!\$ possible states, so the state fits into a single long. However, representing the state as a primitive is ugly and precludes generalizations to bigger puzzles. Before reviewing please not...
It's about two months since I posted this question on CodeReview. I've been working hard to improve the code posted there and came up with the following. #include <stdio.h> #include <stdlib.h> #include <string.h> typedef unsigned long long ull; int main(void) { ull start=1, stop=100,cnt; register int t,len; ...
I'm looking for feedback on a repository I set up based on a blog post I read here. I have just recently got more into .NET within the past year, so any feedback and/or best practices that can be thrown my way would be appreciated. The branch I am working in can be seen here if interested. IGenericRepository: public in...
I hope the extension methods ThrowArgumentNullExceptionIfNullOrEmpty and ThrowNullReferenceExceptionIfNullOrEmpty are straightforward. I have a property in my class called ConnectionString. I can set this property through a method called SetConnectionString. public static void SetConnectionString(string connectionStrin...
The purpose here is to make it easy to use sensitive data that is already in the form of a SecureString (example) without converting it to a String object and risking more leaks than necessary. SecureString isn't about total security, but it is about reducing attack surface. For example, when you call SecureString.Appe...
I've written a script to automate the entry of laboratory instrument data into an Excel spreadsheet using pandas and win32com. I've got the script functioning correctly, but it is painfully slow. In an attempt to profile the code, my acfmp_ToExcel function seems to be the culprit. I've pasted the profiling data for thi...
What follows is an implementation of the java.util.Map interface with weak values. This means that entries should be removed from the map when their values become weakly reachable, in the same way that WeakHashMap removes entries whose keys have become weakly reachable. It is intended to fully implement the contract of...
I have this painting app called JPaint in Java and I'm wondering if it could be improved. The variable declaration seems repetitive and long, and I think it might be able to be improved. public class JPaint3 { private JFrame frame; private JFrame startFrame; private DrawPanel drawPanel; private LineBor...
I am trying to iteratively turn a tree into a list. For example: c1 c11 c12 c111 c112 The tree above should return: [ {'value': 'c1', 'children': [ {'value': 'c12', 'children': []} , {'va...
The following code is complete and works perfectly. What I want to do to is make it more modular in a way where I can use the code again - similar to an api. I also hardly ever code in javascript, and I think my code looks disgusting, I feel like there are cleaner ways to write what I've written but I just don't have ...
I was trying to solve the problem where given a larger string and an array/list of smaller string, we need to make the determination whether the larger string contains each of the smaller strings. I realized one way to do it would be to create a suffix tree for the larger string and then look for each of the smaller st...
I am learning Java through Stanford CS106A and I'm wondering how the code for this early assignment looks. I've worked in a proprietary scripting language before and so I'm trying to get the right programming form down for Java. It works but am I doing anything in the wrong way? Am I declaring and initializing my va...
String.prototype.replaceAll = function(find, replace) { if (typeof find == 'string') return this.split(find).join(replace); var t = this, i, j; while (typeof(i = find.shift()) == 'string' && typeof(j = replace.shift()) == 'string') t = t.replaceAll(i || '', j || ''); return t; }; function html(input, re...
I would like to offer for review a simple tkinter GUI window in Python 3 to be used for data entry into an SQLite database table. As a noob, this is my first attempt at OOP and my first experience with tkinter, therefore, I was hoping for a thoughough review before I got too carried away. The script below builds a s...
I have created a virtual piano that turns the home row (excluding 'g' and 'h') and the top row (excluding 'y' and 'u') of the user's keyboard in a piano's keyboard. The home row is used for white keys and the top row is used for black keys. The keyboard's keys bind to piano's as shown below: a - C w - C# s - D e - D# ...
In my journey to learn Clojure I recently decided that I would like to write a chess engine, which is kind of funny because I don't really know chess either. ;-) My goals are to learn Clojure and chess, and write something that is fairly easy to understand. Currently I'm working on board representation and basic movem...
I am currently reading Eloquent JavaScript and am trying to solve the exercise problems. One of the exercises in Chapter 18 asks to emulate Conway's Game of Life using checkboxes in JavaScript. Before looking at the official solution, I like to solve the exercise on my own and then compare it with the author's solution...
Here is my implementation of the suffix array construction algorithm which follows this paper (specifically, pages 4 and 6). #!/usr/bin/env python3 from math import ceil, log2 def sufar(txt): txt = txt + chr(0) N, tokens = len(txt), sorted(set(t for t in txt)) equivalence = {t: i for i, t in enumerate(...
In an MSSQL database, I have automatically increasing IDs for every entry. Is it safe to acquire the ID of the newly inserted entry like this? I am worried that, if at the exact same time another entry gets inserted, I could end up with the wrong ID. string query = "INSERT INTO subscriptions (polygon,...) VALUES (@pol...
I have wrote the following code in C++ for the n-body problem. This code is sequential as later on I am planning to parallelize it using OpenMP. I want to know whether I have wrote the correct implementation, if there are some errors or bugs, or if this is an invalid approach. #include <iostream> #include <ctime> #incl...
I'm moving on to graphics, picking Pyglet and Cocos2D. This is my first program in Python with GUI. Introducing: Two distinct high definition button sprites Satisfying high quality button pressing clicks Conveniently positioned counter Fully functional exit button Detailed error logging techniques to support software ...
Let us define prefix-function(string)[i] as the length of the largest prefix of string, which is also a suffix of string[1..i], and z-function(string)[i] is the length of the largest prefix of string, which is also a prefix of string[i..]. Unfortunately, there is very little information on them in English, but I found ...
I am using the following technique for simulating mixins (or Traits) using Java and would like to know whether this is reasonable or just confusing to future developers. Also, I believe a good naming scheme is the best documentation, so if it would help to change the nomenclature, please provide suggestions. /** A mix...
I was thinking about splitting a string based on certain categories, for example alphabetic and numerical, lower and upper case, and even the 3 lines of the keyboard. I wrote a generic function for this but it seems unreadable, so I ask you for better modularization and improvements to readability. import doctest def ...
This is router I created for use, however, I wish to refactor this code and make this more robust. I would really appreciate anyone who can: Point out how to make this code more robust, clean and flexible in terms of reusability where the user of this module can easily alter the configuration, etc to his/her needs wit...
I'm new to C++ and SDL, and I've written a Texture manager class whose purpose is to help me manage sprites and other textures. I have a dispose method which unloads all the textures from a map container. It works correctly but I'd like to ask if I am not causing any memory leaks, or other pointer related issues. Textu...
I got my JWT generation working with X509 and wanted to ask if you would recommend any changes in respect to: Signing certificate storing / handling. Publishing for anonymous access public key Background info on service: Generating JWT with refresh token Expiration set in DB Certificate (*.cer) x509 is stored...
I have function that convert binary number to unary number based on a Markov algorithm. In what ways can I improve the code? The algorithm goes as follows: Replace all 0l with 0l "|0" -> "0||" Replace all l0 with 0ll "1" -> "0|" Major Step 3: Remove the 0 "0" -> "" public List BinaryToUnary(List value) ...
Von Neumann extraction is a technique to remove bias from a source of entropy. You extract an unbiased array of bits from a biased one by comparing pairs of consecutive bits in the array and returning the first one when they are different, or nothing when they are the same. The extracted array will be smaller than the ...
I implemented this peak finder for practice. I have tested it. Everything looks pretty good to me. Please let me know if there is any improvement I can make. Peak Finder Let input be an array. input[i] is a peak if input[i] >= input[i + 1] and input[i] >= input[i - 1]. Implement a recursive algorithm of time complexi...
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that only one letter can be changed at a time and each intermediate word must exist in the dictionary. For example, given: start = "hit" end = "cog" dict = ["hot","dot","dog","lot","log"] One...
I wrote a simple neural network simulator (the biophysical kind) from scratch, and was hoping to get some feedback on how I can speed things up, or any C++ / compilation best practices that I can improve on. The code is at this repository. Main Problem: OpenMP doesn't seem to be conferring speedup. The performance-crit...
I've been toying around with some code I wrote a while back, in an attempt to make it "cleaner" based on what I've read. Does anything stand out to you as bad conventions here? What are your thoughts about doing some conditional checks as separate variables at the top of the function? I thought of putting those into th...
I am developing a chat bot with Node.Js. I am trying to find efficient way to parsing sentence. what do you think about humanity -> ba bla bla. what do you think about cats ->I love cats Right now I am using the intersection technique, but I don't think it's efficient: var sentence = sentence.split(",") var inters ...
How can I simplify this? if ((principal == null || principal.getName() == null)) { boolean isValidInputData = true; if ((!reCaptchaBean.isValidCaptcha(recapchaResponse))) { model.addAttribute("captchaError", messageSource.getMessage("СaptchaError", null, LOCALE_RU)); ...
I've written this method to replace an older method that was much simpler, but used the regex split method and couldn't tell if a comma was in quotes/brackets/etc. and didn't read double quotes as single. I was hoping to cover most of the most used possible CSV formats except where a tab is used as a separator rather t...
I have a render function: render: function(playerId) { this.getTotalPoints(playerId); // and some other code after this; } This render function may be executed with or without a playerId. This is the getTotalPoints function: getTotalPoints: function(playerId) { if (playerId) { this.allplayers[pla...
I have implemented simple tree class as follows: public class MoveTreeNode { public MoveTreeNode Parent { get; set; } private List<MoveTreeNode> children = new List<MoveTreeNode>(); public IEnumerable<MoveTreeNode> Children { get { return children; ...
I'm using a levenshtein matching algorithm to match a title to a filename (for anime). I either use the main show title for matching or its alternative titles (flexget_titles). For that I have the following snippet of code. public function matchFilenameToShow($filename) { $shows = $this->shows->getAll(); $short...
This is a relatively simple script (basically it's a dictionary containing information on how to edit the input text), but I'm trying to learn to write stuff properly. The commented bit at the top seems a bit messy, but I'm not quite sure how else to demonstrate all the functions in action. Function names are also not ...
As a follow-up to this blog post and this question, I wanted to post my idea of replacing the IUnitOfWork with a factory pattern. It seems to me that in the case of this blog post the IUnitOfWork seems to be a type of sudo-factory pattern with each repository type and their accessors hardcoded. So my goal was to come u...
Is the following an effective way to implement the Levenshtein Distance with Haskell vectors? import qualified Data.Vector as V levenshtein s1 s2 = levenshteinV (V.fromList s1) (V.fromList s2) levenshteinV p1 p2 = lev V.! l1 V.! l2 where lev = V.map levi (V.enumFromN 0 (l1 + 1)) levi i =...
Where should you store state and how should it be managed in a ClojureScript application? Take the following code for example - it's a "game" where you travel either down or left. (ns cljsfiddle) ; initialise the state (set! (.-x js/window) 0) (set! (.-y js/window) 0) ; state modifiers (defn inc-x! [value] (set! ...
I have the following code which uses EntityFramework to reach out to a DB and retrieve data to populate into a Winform application gridview. I am still quite new to C# and especially abstracting code out of code behind/writing loosely coupled code. Could the following code be reviewed and feedback given on the methods ...
In the Windows operating system, some system events are notified via broadcast window messages. DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE are good examples of this. To receive and process these notifications, one need to have a window with an associated window procedure. Given a non-GUI application, this is a burd...
Here's the first, straightforward version of BF interpreter: def run(step_limit, memo, m_i, code): """ Runs valid BF code. """ if len(code) == 0: return i = 0 for step in range(step_limit): cmd = code[i] # Switch - case if cmd == '+': memo[m_i] += 1 ...
Can you please review this code to determine if it's good or can be improved? #include "stdafx.h" #include <iostream> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int h = 20; int bl = 1; while (h != 0) { for (int i = 0; i != h; i++) { cout << " "; ...
I'm implementing my own time unit class. This class provides a function for fetching a specific time value (milliseconds, seconds etc.). In order to prevent defining several get() functions for each time unit, I tried to implement a single function to serve this purpose. typedef unsigned char u_char; typedef unsigned s...
I have a function that takes two separate wordlists and searches a third list, which is a text formatted as a list of wordlists. The function finds the proximity between words in word_list1 and word_list2 by taking the difference between their indexes; (it takes one over the difference, so that larger numbers will ind...
Purpose: I've on occasion required a method for changing a (or a set of) Display names (formats, order, etc.). The problem was I'd have to push to production just to change something as simple as display name of a column. To fix this, we decided on storing this metadata information into the database (or really anywher...
I have the following snippet of LESS code to generate CSS. I have some different classes which I apply to different elements, and on hover or focus they should change color. .social-icons { color:#bbbbbb; // Material design palette, 500 .blue { &:hover, &:focus { color: #2196F3; } } .red { ...
I need help in improving this script that I have written to parse a URL and check it from an array. This is what I have done till now: (fiddle) This is working fine. Was this done correctly? What exactly I need is to search URLs in a list (ul) (which will be a domain specific), and then match if the URL is found in an ...
In a Java class that belongs in a library, I have a field size that indicates size of image. It must be int, but some values are depending to devices, so other developers can set various types for it: thumbnail (value depends on device) real size (value depends on device) custom (arbitrary integer) I want to restri...
I am building my first OOP program, Tic Tac Toe. I want to conquer it in chunks, but the first part for me is the intialization of the program and the creation of the two players. I want to get some feedback about how I structured this before I move on to build the board and the actual gameplay logic. For instance,...
Recently, I've asked in a code review if my code was causing any pointer related issues. They mentioned that I had problems with my dispose method. Basically, I'm disposing textures from a texture map, by cleaning the texture at the ID given to the method. So I would like to ask you if now, I'm disposing correctly my t...
I'd like to have some feedback as to the performances of the algorithm. class Sumprime attr_accessor :number def initialize(number) self.number = number prime_serie end def is_prime?(num) counter = 2 root_num = Math.sqrt(num).ceil while counter <= root_num ...
Having undergone a little "rediscovery" of C++, I decided to port my Ruby narcotic solitaire simulator program to it. My goal here is efficiency. This program is already about 5 times faster than the Ruby version on my computer; I want to make it even better. #include <algorithm> #include <chrono> #include <iostream> #...
An object (POJO) holds query arguments and has two-binding to a form using some MVC framework. later the object needs to be converted to a query string that will be appended to an HTTP request. function objectToQueryString(obj) { return Object.keys(obj) .filter(key => obj[key] !== '' && obj[key] !==...
Whenever I learn a new (or an old :)) programming language, I implement Hangman in it. This time it's with COBOL. identification division. program-id. hangman. data division. working-storage section. 01 state. 05 word pic A(100). 05 word-length pic 9(3). 05 guess pic A. 05 guesses occurs 256 times pic ...
The sequence of Fibonacci numbers is defined as F1 = 1, Fn = Fn−2 + Fn−1. It has been conjectured that for any Fibonacci number F, F2 + 41 is composite. ... [T]ask is to either prove the conjecture to be true or find a counter-example that demonstrates it is false. (source) Here is my working code for this pro...
I am currently in an intro C++ programming class. We have an assignment where we have to convert a dollar and cents amount, say $192.89, to bills and coins using the least amount of both. Below is the program I have written. #include <iostream> using std::cout; using std::cin; using std::endl; int main() { double...
Below are the instructions for my program and the source code. My program runs and works but I would like second opinions on how to make my program more efficient or if there are any loose ends in my source code. Using functional decomposition, write a C++ program that will use a structure called MovieData to store th...
I have some code which is designed to scan columns F and G for occurrences of words found in an array, the array containing text found in column J. Column J contains free text from a field in SAP. Being free text, it could be "Kerry John Pub Expenses" or "CATS O/H Kerry John", or even "CATS John Kerry O/H". There is no...
Here is the problem statement: Given integers \$a\$ (\$0 \le a \le 20\$) and \$b\$ (\$0 \le b \le 2,147,483,000\$), where \$a\$ and \$b\$ are not both 0, find the last digit of \$a^b\$. Input The first line of input contains an integer \$t\$, the number of test cases (\$t \le 30\$). \$t\$ test cases follow. For ea...
My assignment in school: Read in names to sort until the user types the “enter” key After sorting and displaying the array of strings Do a binary search to find if the string is in the array If the string is in the array, tell the user the index of the string. If the string is not in the array, tell the user that it i...
Based on my question here, I have updated my query to take user input so it can be a generic query: DECLARE @location AS nvarchar(max) = ##location:string##; SELECT u.Id [User Link], u.Reputation, u.Location FROM Users u WHERE lower(u.Location) LIKE lower('%' + @location + '%') ORDER BY 'Reputation' DESC Is there some...
The off-line minimum problem asks us to maintain a dynamic set T of elements from the domain (1..n) under the operation INSERT and EXTRACT-MIN. We are give a sequence S of n INSERT and m EXTRACT-MIN calls, where each key in (1,2..n) is inserted exactly once. We wish to determine which key is returned by each ...
I am using RestTemplate as my HttpClient to execute a URL while the server will return a JSON string as the response. The customer will call this library by passing DataKey object which has userId in it. Earlier I was using AsyncRestTemplate which is part of Spring 4 but in my company they are not supporting Spring 4 i...
As a follow up to my post here. Please refer to the problem statement in that post. I have edited this code to make it time efficient, but doing so the size of the source file has crossed the limit of 700 bytes. How do I reduce the file size? #include <stdio.h> int main() { int t; scanf("%d",&t); while(t--...
I wrote a program that does division and either does or doesn't show repeating groups. After designing it the first time I had to redesign it because although it worked it was unnecessarily complex. And now I am presenting to you my refined division program, for feedback and improvement ideas: import java.util.ArrayLis...
This is my code which works and compiles but I feel it may be non-optimal, especially the tag mapping and use of the if command. It reads two .xml files and finds what has been added or deleted on the new file. For new items it uses a map to link a tag name to a category of data (content tag is a description for examp...
I have 4 tables that I want to check for data. When there are Rows in all the tables, I want to print a message for success. When there aren't any rows in any table I print an error (when 1 or more table is missing data), I want to warn (unless they are all missing data). The following script does exactly what I want b...
I'm building a game with Pygame, a simple turn-based strategy game where on each turn a character can move and/or perform an action. I have a somewhat good structure for the game on the background, and pygame provides the gui for that. Below is the code of the main file. I think the structure of main.py is quite terrib...
I am reading Hacker's guide to Neural Networks. Since I am also learning Clojure, I tried to implement them in Clojure. I would like the feedback about what could be more idiomatic and better in the below code. Also I have some problems which i have asked at the end. Here I have simple gates like Multiply that take inp...
I'm trying to implement pbkdf2 in Python 2.7/3.4 without needing the pbkdf2 module. (I'm also trying to avoid using classes.) Any insight would be appreciated: from binascii import hexlify, unhexlify import hmac, struct, hashlib, sys is_python2 = True if sys.version_info.major == 2 else False def pbkdf_two(passwd, sa...
For an assignment I handed in this code to remove duplicates from a stream. (define (remove-duplicate lst) (cond ((stream-null? lst) '()) ((not (member-stream? (stream-car lst) (stream-cdr lst))) (cons-stream (stream-car lst) (remove-duplicate (stream-cdr lst)))) (else (remove-duplicate (st...
My code needs to open a specific file. Under certain (expected, but rare) conditions, the code will get handed a file path to a file that does not exist -- the path is expected to be otherwise valid though. If I get handed a path to a file that does not exist, this is an explicit failure scenario that could be reported...
This code is meant to take in a command line argument and output a 'tag cloud'. It's more of an exercise in learning F# for me because this is my first non-tutorial code file. How could this code be improved? open System.IO open System [<EntryPoint>] let main args = let directory = args.[0] let fileNames = D...
Problem Statement: Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not case sensitive). You may assume that the remove string is length 1 or more. Remove only non-overlapping instances, so with "xxx" removing "xx" leaves "x". ...