instruction
stringlengths
71
95.1k
The Problem After his brush with the Justice Department over fundraising with Buddhist monks, the Vice President devised a plan to ensure that such activities are carried out in a more discrete manner and are kept less noticeable. Realizing the Democratic National Committee’s need for more and more money in the c...
I'm having some trouble improving the Connect 4 game that is made in Python. I was wondering if I could get rid of the global statements and pass the variables between parameters and return its values. Also to put all of this in a class. I was wondering if this is possible. And any more improvements that I could use wo...
Take an integer representing a day of the year and translate it to a string consisting of the month followed by day of the month. For example, Day 32 would be February 1. I've already submitted my first attempt, but after looking at ctime library, I came up with this method. So, the function just takes a single paramet...
this program seems to be working well so far, but I know it can be cleaner and more efficients with certain functions/methods. As I'm still beginning to code any feedback would be very welcome. # Creating class named contacts with methods for editing and adding new # contacts. Also there are static methods for showin...
I wrote a simple Snake game in Pygame, with GUI. It`s my first Pygame game and one of my first projects in Python. My goal with this implementation is to make it bug-free with fluid UI and as fast/minimal as possible. This game is meant for both HUMAN and AI players, the first one receives user input and play and the ...
Im new to javascript programming and i am required to make a web app. Node.js will be used as the js runtime environment. In order to minimize the amount of time needed for debugging as the app develops I would like to implement a robust error handling scheme. However, due to my limited background I am not sure if what...
Intro I'm going through the K&R book (2nd edition, ANSI C ver.) and want to get the most from it: learn (outdated) C and practice problem-solving at the same time. I believe that the author's intention was to give the reader a good exercise, to make him think hard about what he can do with the tools introduced, so I'm ...
So, I've been reading about monads and I wanted to see if I could implement a system for asynchronous computation in a monadic way. I came up with two solutions: The first one spawns a thread for each function bound, and this thread waits for the previous thread to finish. Should this bother me? These threads aren't do...
Problem Statement 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, otherwise return -1. put(key, value) - Set or insert the value if the key...
I like to unlist my old NuGet packages to keep my catalog clean. However, after a couple of uploads it's always a pain to remove each single package manually so I thought I write a utility for it in python. It works like that: query the service index for the search url find my packages by author extract package id and...
My goal in this code review is to see if i can figure out how to optimize the Validate function takes up fewer lines of code. i know there must be a way to cut it down so that it doesnt span 300 lines of code. The Validate function is designed to allow me to check all of the controls in an access form that have their t...
Inspired by exercise on HackerRank where I'm expected to implement binary heap with additional method that allows to remove any value from heap I decided to clean up and expand my code a little. Expansion is an ability to pass custom comparator to the heap, and method to remove first element from heap (which for some r...
I'm relatively new to JavaScript and wonder whether my code is 'acceptable' for a practice exercise. Essentially, the function (successfully) returns true or false if the provided string has a letter 'b' 3 characters after a letter 'a' - e.g.: Input:"after badly" - Output:"false" Input:"Laura sobs" - Output:"true" Coul...
Inspired this guide: https://developer.android.com/jetpack/docs/guide I try to build some app with similar architecture. App interact with remote API via http protocol (json responses from server). For example, GET /bonuses/:id return {status: true, bonus: {id: 1, name: "test bonus"}} POST /login can return {status: t...
For a hobby project, I am using openpyxl to export Excel workbooks as JSON. Part of this involves identifying the formatting applied to cells, and serializing this information (provided the format is not the default - no need to export that). To minimize the output JSON filesize, it is sensible to report the cells that...
Is there something terribly wrong with this implementation? template <class T> constexpr inline std::size_t hash_combine(T const& v, std::size_t const seed = {}) noexcept { return seed ^ (std::hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); } template <typename T> struct hash; template <typename ...T> str...
Purpose The point of this mini project is to quickly gather data from a website's API and combine the collected DataFrames into a "master" DataFrame with all of the stocks I am interested in looking at. I do this using the iexfinance module. If needed, here is the code behind iexfinance. Improvements? While this module...
Usually people recommend to never implement cryptographic algorithms yourself unless you are an expert in the field. This of course makes a lot of sense mainly because there are numerous things that can go wrong, resulting in a vulnerable implementation. However, for learning purposes I decided to write an implementati...
This is my first matrix class which I updated after already asking here already. The updated code is below. Are there any suggestions regarding member function parameters? Is there a convenient way to get a single function that allows to set/get with a single function? I considered returning a reference to the v...
I made this to-do list since I never seriously used jQuery (in particular way AJAX) and I need this kind of script for a project that I'm working on. Principal features: Use of a database to manage to-do list values (using PDO). Possibility to add/delete to-do list values. Possibility to edit to-do list value dblclick...
I am working on an interview question where I need to return the k most frequent elements given a non-empty array of integers. Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Here is my code: public static void main(String[] args) { System.out.println(topKFrequent(new int[] {1, 1, 1, 2, 2, 3, 3}, 1)); } pri...
I was trying to wrap a Logback logger in order to provide some handy methods and already defined default keys of the logged json output and I came up with something like this. Do you spot any problem with it, or do you have any suggestion? public class Log { private Logger logger = LoggerFactory.getLogger("jsonL...
This simple Python code I wrote for a problem asked during an interview. The problem statement is: Given a tuple (a, b), transform this into (c, d) by applying any of the two below operations multiple time in any order you like: (a, b) -> (a+b, b) (a, b) -> (a, a+b) The program should take in a, b, c, and d. And tel...
Task is reshape 3d array from [row, col, slice] to [slice,row,col]. I tried implement base::aperm analog with Rcpp. // [[Rcpp::export]] Rcpp::NumericVector array_perm(const Rcpp::NumericVector& x) { if (Rf_isNull(x.attr("dim"))) { throw std::runtime_error("'x' does not have 'dim' attibute."); } Rcpp...
I have created a program that prints the Nth term of the Fibonacci sequence. The fib function needs to use tail recursion. If what I have coded isn't tail recursion, I would like to know how to change the fib function so it does. #include <iostream> #include <sstream> int fib(int n, int i = 0, int a = 0, int b = 1) { ...
I am trying to accept JavaScript array literals in an HTML text input. The problem is that HTML text inputs are captured as strings, such that an input of ['name', 'who', 1] becomes "['name', 'who', 1]". My intention is for the following samples to yield the corresponding outputs. "['river',"spring"]" // ["r...
Background information: Given two different strings of equal length, the spacing between them is the number of other strings you would need to connect them on a word ladder. Alternately, this is 1 less than the number of letters that differ between the two strings. The challenge: Given an input list of unique words an...
I am given an array that represents a k-ary tree (I am also given the branching factor "k") that is stored in level order. My task was to print the tree in level order. For example a trinary tree stored as {0,1,2,3,null,null,null,7,8,9,10,11,12} (It doesn't have to be full or complete) would print out as: 0 1 2 3 null...
I'm trying to sketch out a stripped down generic form validation example. I started by creating Plain Old PHP Objects (referred as POPOs) for form input with some classes such as a validator and html renderer class, that I then reduced to explicit functions. The POPOs are useful in as much as you can comment and glanc...
TableContainer.js does the common task of fetching data and passing it to a lower component, Table.js, which is a stateless functional component. currentPage is stored in redux, I did this just to practice redux. Question 1 Is this all reasonable? Question 2 I noticed that the component will re-render when it receives ...
Here is my code: package com.app; public class Solution { public String toBinaryString(int n) { char[] buffer = new char[32]; for (int i = 0; i < buffer.length; i++) { buffer[i] = '0'; } int i = buffer.length - 1; while (n != 0) { if (n % 2 != 0) { ...
Here is my code: package com.app; public class Solution { // Suppose the operation ~ doesn't exist public int invertBinaryNumber(int n) { int singleOne = 1; int singleZero = 0xfffffffe; while (singleOne != 0) { if ((n & singleOne) == 0) { n |= singleOne; ...
This library management program can do following functions: Add a book to the library Display all available books Lend books to students Return books to the library Display students who have yet to return a book Question: How do you refactor this code so that it follows OOP, reads better, is manageable and is...
There's a mission-critical ring buffer in production on which I'm curious to test some optimizations. Specifically, I'm wondering how much of a performance difference struct size will make on issues like false sharing. The queue itself is single-producer, many-consumer, and the current structs that get thrown around in...
So, this has been done quite a few times on here, but each of the linked implementations has some significant issues. Since I needed a MinHeap anyway, I figured I would throw my version into the ring. In my case, I'm working on a toy game prototype where the simulation runs a clock that keeps track of the time in-game,...
I'm learning Swift and I have a following problem: I create a dictionary containing some data, one of which is stored as an array. I want make an operation on this array to add some info. Currently I have managed to achieve this by writing this code: var myDictionary = [String: Any]() myDictionary = [ "name": "Wik...
My question is about an easy FileLogger. I want the FileLoggers to store new logs in a collection, and write them in a file only if: - There are 100 logs if the collection - It's been more than 1 second that no new log has been reported - The logger is being destroyed Here is my Log class: public sealed class Log { ...
Used to use Laravel's easy to use form validation class, decided to mimic it in JS. I've been learning JS for 4 days now and decided to write my first piece of real code. I'm pretty sure its full of bad practices, and a lot of it can be improved. I'm looking for some constructive criticism on what I can do better next...
I'm a data scientist attempting to build stronger CS fundamentals, particularly in Data Structures & Algorithms. Below is my attempt at implementing a Singly Linked List. Looking for advice regarding: Code style Can space/time complexity of methods be improved? Debugging in case I missed any edge cases Checking for p...
I got a 2D grid (n x n matrix). The user selects his player in this 2D grid and after that selects another node in this grid to mark his destination position. The player is allowed to move horizontally, vertically or if the player is standing in one of the 4 corners of this grid also diagonally. Also the player can onl...
I am using following code to delete color and hide rows that include several criteria before exporting sheets to pdf's. Is there any way to speed up this process as it is taking quite a lot of time to process. Especially in situations when I have several sheets in one workbook and to apply this on each sheet = "printed...
This code to solve Problem 23 in Project Euler gives the correct answer. But, running the last expression takes around 40 seconds. I welcome advice on how to improve performance here. (defn sum-div [num] (->> (range 2 (+ 1 (int (Math/ceil (Math/sqrt num))))) (filter #(= (mod num %) 0)) (map (fn [x] ...
Given a Balanced Parenthesis problem. "Balanced Parenthesis Create a program that checks if in a given string expression all the parenthesis are balanced. For Example: (test) - valid (no() - invalid ()(()) - valid (123(456)(7))( - invalid (val()id) - valid Also, take into account the "\" escape sequences: (nope\) - in...
What I'm trying to achieve is Given a predicate function and an action which returns the object to check, check predicate, retry and fail after numTries .. or success . Purpose of this function is : During constant data collection from network resources ( web, apis, .. ) return of network operations not successful...
This is a quick and dirty QBE method that covers about 60% of my use cases in my DAO. I just wanted to see if someone would take a quick look at it to see if there are any issues. public List<Order> orderQuery(Order order) { StringBuilder sql = new StringBuilder(); sql.append("select * from orders "); Lis...
I'm trying to learn Ajax better, and I'm developing an application in CodeIgniter. The following code is working, there are no errors. But for every function and call I think I'm repeating callbacks too often. <script type="text/javascript"> $(document).ready(function(){ show_costumer(); funct...
I've create a program that finds mixed duo within a string. It removes characters from a string that do not form the first mixed duo. It does not rearrange the order of the string, it ony remove characters to reveal the mixed duo...... aka "abababab", "chchchchc", "!s!s!s!". Tell me what do you think of this code? Is ...
I've been learning Rust for the past few days and I just passed the "Smart Pointers" chapter. To check what I've learned I've decided to implement a doubly linked list. My question is, is this appropriate way to implement one and what can be improved? Which is better - using Rc<T> or Box<T> for the node values? lib.rs ...
I've create a program that finds mixed duo within a string. It removes characters from a string that do not form the first mixed duo. It does not rearrange the order of the string, it ony remove characters to reveal the mixed duo...... aka "abababab", "chchchchc", "!s!s!s!". What is a mixed duo? It is the combination o...
I have written an implementation of malloc() and free() for Linux using the sbrk() system call. When memory is requested, it checks if there is a large enough chunk available already, if there is then that gets returned to the user, otherwise a new block of memory will be requested from the kernel. When memory is free'...
I have the following assignment that I succeeded in solving, but the code is very inefficient. I would appreciate if someone could show me a more efficient way, perhaps with substring. Note that I am not allowed to use imports or regexes or add more functions. /** * Separates a given string into tokens, which are the...
I am new to building with design patterns. I have been working on implementing the builder design pattern in PHP. I just want to make sure I am doing it correctly. I have been following along with this tutorial on jakowicz: https://www.jakowicz.com/builder-pattern-in-php/ I have made a few minor changes to the way I'm...
I am writing a piece of software that aims at streaming the modified lines of an external file located at given uri (and retrieved as a QueryString parameter). I am trying to minimize the impact of big files so that I can maximize the use of asynchronous calls (i.e. async / await). I am using AsyncEnumerable (https://g...
I am trying to find a way to optimize the code runtime. Improvements I have implemented include using dictionaries, removing redundancies and using str.translate. from collections import namedtuple import string import jellyfish as jf import Levenshtein as l #conda install -c conda-forge python-levenshtein #instantit...
first time using Code Review, although I have been active on StackOverflow, hope I'm in the right place. I am putting together Excel VBA code that using information from various columns on a worksheet to search for a document on a company intranet site, and save the document as a PDF, then move on to the next line and ...
I've needed a couple of very special comparers recenty and didn't want to implement each one of them every time so I created a builder and a couple of supporting classes that do that for me. Example I'll start with an example. Given a collection of Products: var products = new[] { new Product {Name = "Car", Price ...
I wrote a simple tic tac toe game in python. (I wrote the game logic and implementation separately) (in this case, it's a command line interface, I may do a Tkinter version) Can you review the code and give me tips for the future ? logic.py from itertools import product TIC = 0 TAC = 1 BLANK = -1 WINNERS = ( ((0, ...
The Problem Sam Morose served for many years as communications officer aboard the U.S.S. Dahdit, a U.S. Coast Guard frigate deployed in the South Pacific. Sam never quite got over the 1995 decision to abandon Morse code as the primary ship-to shore communication scheme, and was forced to retire soon after becaus...
I'm afraid just about everybody who read this question has misunderstood it. I'm not trying to find the best way of printing a vector. I'm trying to find the best way of excluding part of an operation from the last iteration in a loop. I'm seeking advice about a pattern that is repeated is many different contexts. For ...
In my opinion, Vectorization operation with numpy should be much faster than use for in pure python. I write two function to get and process data in a csv file, one in numpy and another in pure python, but numpy one takes nearly four times time of the other. Why? Is this the "wrong" way to numpy? Any suggestion would ...
The AI I'm making is really simple, however it might be a bit too inefficient for what it is doing. The chart below shows speed differences between various arithmetic and math operations. sin, cos and especially atan are really inefficient. It's tested in C++ but should still hold true to JavaScript. Is it possible to ...
-> Already Asked at StackOverFlow, but was adviced to post question here! <- I want to compare two lists, which both can be null, both can contain 0 or more entries. If the amount matches, there should be some handling for that. If not, it should be checked if the difference of the amount is covered by the tolerance g...
I have written code to count the continuous ones in an array or you can use binary string for convenience. Any solution using the binary string is acceptable. My Solution is: #include<bits/stdc++.h> using namespace std; #define MAX 100000 int main() { int n,q,k,count; string str; cin>>n>>q>>k; bitset<MAX>s,c; ...
I completed a coding challenge recently in which my function was to be given two parameters: N, the number of counters to be used (numbered 1 through N) - and A, an array of integers. Iterating through the array A, when the index of a counter occurs, that counter is incremented by 1. When an index of N+1 occurs, all of...
I'm reading range/distance sensor data from one Serial Port, decoding it and then transmitting it to a secondary device in ASCII format. The sensor uses a 2-byte header with each byte containing the following hex values: 0x59 0x59. Additional data from the sensor is also sent in a 7-byte message, subsequent to the head...
When sections are ignored and no writing capability is needed, an INI reader becomes quite simple to implement. Here is my attempt at reading a sectionless INI file without any non-std dependencies. The general idea is to store all key-value pairs in a <string, string> map, and use getters to convert the value string t...
I have this code with nested foreach loops that is getting out of hand. Is there a better and/or cleaner way of doing this? Basically, what it's doing, is take the results from an API call, and then looping through each layer. I check to make sure that each layers Results.Length is greater than zero before I start the ...
In this small bit of JavaScript, a date is passed in as YYYY-MM-DD. It's formatted like this to be passed to the backend system. On the front end, we need to display it as MM/DD/YYYY. I split the string, and put the each array index in the correct position. However, I feel like there could be a a better way to do this...
I have a CSV file that I would like to split up by row, do some whitespace processing on the string data in each row of the document column, and then output the processed data into separate TXT files in a new directory. The whitespace processing is to standardize the documents by removing newlines, carriage returns, an...
This is how I configure the utility SSMTP that allows me to send mail via smtp protocol through a Google-Gmail proxy instead I'll have to manually configure an "heavier" Postfix bi-directional email server on my environment. I configure it in my own server environment that only I uses. #!/bin/bash myHostName="$HOSTNAM...
This code is for a ROS (http://www.ros.org/) node that controls a pair of servo motors (referred to in the code as grippers) that can be controlled individually or together. When they are controlled together they move in opposite directions to create a gripping motion. Running this code requires both ROS and the Dynami...
Updated, below is a more current and simple version of this. Also, if you track the progress of TC39's "ECMAScript Cancellation" proposal, this thread might be worth checking out. I'm playing with Promise Extensions for JavaScript (prex) library and I like it a lot. Amongst other things, this library appears to be a p...
I'm new to programming and I sort of understand the concept of methods but, I am little overwhelmed by this program and want to shorten it using methods to make it easier to read and understand. import java.util.Scanner; public class NewCalculator { public static void main(String[] args) { String usrInput...
I'm new to writing PowerShell scripts, and this would be my first relatively large undertaking in the language. Any feedback regarding style and readability would be greatly appreciated. Particularly, I was unsure of the best way of iterating through the various strings, and was wondering if there was a more elegant wa...
I have a generic pipeline in SnapLogic that logs the start time of the executions of a group of incremental jobs. Suppose, the log table is as follows. CREATE TABLE sl_control.interface_parameters_values ( interface_id varchar NOT NULL, parameter_name varchar NOT NULL, parameter_value varchar NULL ); A few...
I have some really wide data in R that I want to transform into the "tidy data" format. Unfortunately, I cannot change the process that generates this data, so it must be done within R. My raw data looks like this (but with more records): +---------+-----------+-------+------+------+----------+-----------+---------+---...
I implemented a function to check a MS Word document is contain a given word or not. The function will return true if filePath is contain word. Otherwise it will return false. This is my solution based on Aspose framework. Is there any better solution? public class FindContentOfWordDoc { public bool FindContent(str...
Please review my design and code implementation and suggest if any optimisation is possible in terms of performance (time complexity / space complexity ) or any better way of design or implementation. You are welcome to provide your review comments so that I learn to code and design better. Git hub link : https://gith...
I have implemented a simple example for inter thread communication which have 2 threads to print even and odd numbers in sequence. I am looking for a feedback and points for improving the example. My code looks like: public class InterThreadCommunicationEvenOddExample { public static void main(String[] args) ...
Following this idea for pretty printing of numpy ndarrays, I have developed a very primitive prototype: def ndtotext(A, w=None, h=None): if A.ndim==1: if w == None : return str(A) else: s ='['+' '*(max(w[-1],len(str(A[0])))-len(str(A[0]))) +str(A[0]) for i,AA in e...
This is the first time I've ever tried to write unit tests before, so I wanted to post here to see if I'm doing it "right". I read a couple of articles on the subject, but I work alone so I want to ensure that I fully understand the standard ideas before continuing. Could you please take a look at this and let me know ...
My purpose is to add two __m512i variables (c = a + b) as efficiently as possible. To do so, I'd like to use the _addcarryx_u64 function which takes uint64_t as inputs. unsigned char _addcarryx_u64 (unsigned char c_in, unsigned __int64 a, unsigned __int64 b,...
I know that sort in R uses radix sort, and I played around in implementing it (mainly to be sure I understood the algorithm properly). However, my implementation is an order of magnitude slower than the native implementation in R. I'm curious: is there a way to implement radix sort in R so that it wouldn't be so slow?...
I have been developing a little, private Blog Site to make notes/ stories of pen and paper RPG games available for my players and me. This is my first project. As I am new to coding in PHP and MySQL I'd very much appreciate your opinions on the code I have written. I am interested in any feedback you can give me - but...
We need to calculate the number of sub-sequences of an array having its median lying in the sub-sequence itself. My code is - #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define fori0n for(int i=0;i<n;i++) #define inputLoop for(int j=0;j<t;j++) // FAST SCANNING .. template<typename T> ...
Intro I'm going through the K&R book (2nd edition, ANSI C ver.) and want to get the most from it: learn (outdated) C and practice problem-solving at the same time. I believe that the author's intention was to give the reader a good exercise, to make him think hard about what he can do with the tools introduced, so I'm ...
A simple binary expression tree in Haskell without operator precedence and without parentheses. Any comments would be much appreciated. data Tree a= Const a | X | Plus (Tree a) (Tree a) | Mult (Tree a) (Tree a) | Minus (Tree a) (Tree a) | Div (Tree a) (Tree a) | Power (Tree...
I have been writing R scripts for about a week. I have been writing code for 20 years. I have a series of yes-no questions that I hope to predict yes-no outcomes so I know the R-squared will be terrible but as long as the variable is significant I am fine. Since I am creating a number with my yes-no questions the order...
I was inspired after this thread on Stack Overflow to create a random 8 character alphanumeric password generator. Sadly, it is closed, so I cannot provide an answer there. Anyway, here is the code. Let me know if there are any bugs/bias going on. using System.Collections.Generic; using System.Security.Cryptography; p...
This is my first Machine Learning algorithm using Python and SkLearn. The code works, which is pretty awesome. I'm getting about 65-70% of accuracy after training it with about 4k rows of data. Although it works, it seems like is less than optimal. I'm guessing it would be better to organize it with functions and etc -...
Background I wrote a function update_list_v2(). And this function "maintains" a sorted list, g_list. g_list is declared globally like below. static vector<element> g_list; update_list_v2() do below works. 1) remove every element of g_list, if the element exists in v 2) add a element to g_list, if a element exists in v...
I'm a data scientist attempting to build stronger CS fundamentals, particularly in Data Structures & Algorithms. Below is my attempt at implementing a Singly Linked List. Looking for advice regarding: Code style Can space/time complexity of methods be improved? Debugging in case I missed any edge cases Checking for p...
So as the title states, I am trying to add a specific Items to an ArrayList if they not already exist. So here is how the Array starts. [a, b, c, d, e, f] I have this items inside the ArrayList and I'm gonna add some items after the item d if it doesn't exist already in a pattern. [a, b, c, d, x, y, z, e, f] I had a ...
I've read various posts about how letting users to upload files can create vulnerabilities to your website such as a user injecting PHP code in an image. So I've created a small test project where you can upload (outside of web root) and see uploaded images keeping it as simple as I could having in mind security but I...
We implemented a small dependency injection mechanism which we use in our project. Now after 2 years of developing our project we need our classes to know who instantiated them via dependency injection. Therefore we pass to the constructor of every class which is "injectable" a property called creator. To achieve this ...
I am pretty new to powershell and I'm not great at coding, but I have managed to cobble together code from around the net to help save time when removing old students accounts in AD. Code currently does the following; Takes leavers from .csv file Moves the leavers to leavers OU, Disables Account, and removes from all ...
I had to calculate the total number of days from overlapping date ranges (coming from MySQL in my case) excluding weekends and here is a working version of what I did. I am looking for a cleaner solution in terms of code quality and readability, ideally native Carbon solution. Any ideas how to improve this or maybe an ...
I want to learn how/when/why to use the GoF Design Patterns. These last days are dedicated to the Bridge Pattern, which means: Decouple an abstraction from its implementation so that the two can vary independently. Everyone has a different understanding of this vague description, but if I well-understood the globa...
I wanted to create a function which accepts a string & a delimiter. Finds the small blocks of string separated by the delimiters and replace the block based on some logic. I have created a simple example below to represent the logic I am trying to write. I also tried to make sure that I handle all cases where the user ...
First of all, project Euler has been a great help for me to learn Clojure. I tried for months trying to get web projects going but ended up frustrated with and struggling with tooling and libraries more than anything else. The code below gives the solution to Problem 49 in Project Euler: The arithmetic sequence, 1487,...