instruction
stringlengths
71
71.9k
I implemented merge sort with my own linked list for a school project. I was not allowed to use anything but the methods you see in the list. It seems to work properly, however, when running the provided testbed, I am told that the implementation is likely \$O(n^2)\$. I've looked for a long time trying to find where my...
I am creating a small backend library that uses a persistent queue, where the queue is just lines in a text file. The purpose is simply to allow multiple processes to read from the text file, so that work can be coordinated across processes. The constructor for the queue is asynchronous, because we use async i/o to ens...
This is my first attempt at building a linked-list-based stack and queue. It is the result of ~90 minutes of trying to implement some of what we're being taught in Algorithms class. I would like feedback on possible optimisation and oversights. I did try to segment and comment the code the best I could. This was writ...
I'm beginner at programming (I guess it's quite obvious) and this is my small "app" I tried to make, that takes username and password from the user. Could you give me some advice on how can I improve it? using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace...
I tried my level best to get it done. But I would like to have a better solution in all terms. Given 2 huge numbers as seperate digits, store them in array and process them and calculate the sum of 2 numbers and store the result in an array and print the sum. Input: Number of digits:12 9 2 8 1 3 5 6 7 3 1 1 6 Num...
I wrote the following code: def find_storms_dst(d_f, max, min): i = 0 storms = [] while i < len(d_f.index): dst = d_f['Dst'][i] if dst < max: if dst < min: print 'out of range' s = Storm(i, d_f.index[i], dst) while i < len(d_f.index)-1: ...
I'm guessing this has quadratic time complexity, \$O(n^2)\$, and \$O(2n)\$ for memory complexity. I wonder if I can do something within the list comprehension to just .pop(n) something out of the list instead of relying on a second list. Thoughts? listx = ['cat', 'dog','rabbit'] listLettersAlreadyFound = [] [[listLette...
This is the "Popes" problem from UVa Online Judge: On the occasion of Pope John Paul II's death, the American weekly magazine Time observed that the largest number of Popes to be selected in a 100-year period was 28, from 867 (Adrian II) to 965 (John XIII). This is a very interesting piece of trivia, but it would be m...
I am trying to compute a spherically symmetric function on a 2D grid. The simple solution that I came up with is the following: Grid_side = 10 N_pix = 100 function = lambda r : 1.0 / r**2.0 grid_x = np.linspace(-Grid_side, Grid_side, N_pix) grid_y = np.linspace(-Grid_side, Grid_side, N_pix) SphericallySymmetric_func...
Here is my Go code to interact with a Redis server package redisclient import ( "time" "gopkg.in/redis.v5" ) type RedisClient struct { client *redis.Client } func New() (rc * RedisClient) { return &RedisClient{ client: redis.NewClient(&redis.Options{ Addr: "localhost:6379", ...
Here's my first Rust program that I could actually use for something: use std::io; use std::process; fn main() { let mut sum = 0; loop { let mut number_str = String::new(); match io::stdin().read_line(&mut number_str) { Ok(n) => { if n == 0 {break} }, Err(e) => { println...
When coding I noticed I started to get into a habit of not using if-else statements when the else block only has one line of code. For example, if I have code that can be solved like this: public Person(int initialAge) { if(initialAge < 0){ System.out.println("Age is not valid, setting age to 0."); ...
C is naturally clumsy at polymorphism but I wanted to avoid duplication so I wrote this function. But I'm sure there are ways left to improve it. Please not that for brevity's sake not all data types have been included. void print_int(const void *number) { int result = *((int*) number); printf("%d ", result); }...
I've seen code that basically does the same thing, but i'd like some input on this. Basically what i did wrong or not good enough heh :). #include <stdio.h> #include <String.h> #include <stdlib.h> #include <ctype.h> char *getName() { char name[100]; int length; char *holder; printf("Tell me your name!\n...
I made a tic-tac-toe game that is a player vs. player version (no AI). I have tried not to utilize objects because I haven't really gotten there yet. A previous version (see here) utilized global variables, but now I've gotten around that! The code: #Objective: Create a tic-tac-toe game within the command-line #Version...
I have attempted to a zebra puzzle in prolog and I was seeking some feedback as to the way I went about solving the puzzle. Here is the puzzle: Two weeks ago, four enthusiasts made sightings of objects in the sky in their neighborhood. Each of the four reported his or her sightings on a different day. The FBI c...
Please find how I would model a system that had teachers, students, classes and parents. Instead of creating a model for each user type, I created only two models, User and Profile. Each user can have multiple profiles and each profile can have a unique profile_type. I would love to get some feedback on my proposed arc...
This function returns the largest product of all elements of a list between the leftmost and rightmost min and max elements. Is there more readable and maybe compact way to rewrite the elif chain in this code: from operator import mul from functools import reduce prod = lambda iterable: reduce(mul, iterable, 1) def p...
Arrays of double can be zero-initialized with the { 0 } initializer, which works even on systems that have a binary representation of 0.0 that is not all bits zero. While the IEEE 754 representation of floating point zero is all bits zero, the C Standard makes no guarantees about the representation of floating point nu...
I just wanted to get some constructive feedback on my solution for this problem taken from the HackerRank Cracking the Coding Interview series. CTCI Arrays Left Rotation Problem Statement #include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #...
I have a function that is designed to parse an utterance (or typed in string) and identify the intent as a yes or no answer. There are many ways of saying "yes" to something, and similarly for "no" or "unsure"; however, some of these phrases may include sub-phrases that have alternative meanings. For example: certainly...
I have an Activity called AuthActivity and I would like all of my authentication Fragments to be in this Activity. I will have 4 Fragments: LoginFragment, RegisterFragment, ForgotPasswordFragment and RememberedLoginFragment. I currently only have the LoginFragment and I would like some feedback before I continue making...
I have a very simple webpage that contains 4 color images. When I hover over any of the images the original (xxxx1.jpg) is replaced by a black and white version (xxxxx2.jpg) of the same image, and then it reverts back to the original image after hover. I'm declaring the same variable for both handlerIn and handlerOut: ...
Although it's a well-known algorithm, I thought to implement it from the perspective of a coding interview. I want to know if I can improve my code somehow. So, given the time constraint, is this a good enough solution to impress the interviewer? class MyQueue { private Stack<Integer> s1; private Stack<Integer>...
In my previous question I asked how could the Redis client be improved. Here I will ask how can the Game data Client can be improved. Game Data client sits on top of Redis Client and uses datatypes from datape package Here is the code: package gamedatamanager import ( "log" "reflect" "encoding/json" "...
Example input : A) 1, 2 B) 2, 8 C) 7, 8 Required Result : 8, 10 The output from the program with this input should be A + C. Few notes : We can only combine 2 sets. There must always be exactly one pair (or a single set) which sums up to the specified result. Input will always be in this format x,y. Set internal cl...
I'm the current maintainer of Showdownjs, a markdown parser off which PageDown (stackexchange's markdown parser) is based on. Showdown uses the following regex to parse horizontal rules: /^( ?(-|\*|_) ?){3,}[ \t]*$/gm This works fine for most cases. However, the following input: - - - - - - - - - - - - - - - - - - - -...
The code finds marked attributes and parses them according to the attribute type. Is it possible to simplify this logic? Is there generic way to do it? Please suggest some way to optimise this code. All the data type of Product class will be string. I'm getting product input as XML directly converting serialized data t...
I am simulating a simple bus network (as shown in the picture) using event simulation. There are two buses running (starting at 1 and 4) and the travel time between nodes is 10 units. For now, I used the switch-cases to manage the event. However, if I need to expand the network, it might be very confusing to manage al...
I'm working on a website and am trying to implement a parallax effect on an image and title (possibly other elements too). I'm trigering the effect with .scroll() and updating the transform property with .css("transform","translate3d(0,x,0)"). It works fine but on some pages with a lot of elements the frame rate drops ...
For learning purposes, I'm trying to implement a Markov Chain from scratch in Python. The goal is, provided a file with a list of words, and some sequence, to predict the next letter according the the probability computed from the list of words. My questions are not related to the Python syntax (for instance I know tha...
I wrote this script template at work to save typing repetitive commands and to improve my Bash-fu. I'd like to know of any moderate-to-severe quoting, robustness, security or usability issue. All code provided in answers should work in Bash 4. .sedevrc: #!/bin/bash se_projects=() se_cvs_dir="${USER}@172.0.0.1/export/h...
A message can contain an user name or group name, the user name has to be 2 character long and should contain uppercase ASCII characters only, similarly group name can be 3-10 characters long. There can be any number of these entities with the optional comment at the end. The message would have the following format: am...
I wrote a smooth function that returns a list of all smooth numbers below a certain limit from a list of prime: repeatMul init limit = takeWhile (<=limit) . scanl (*) init . repeat smooth limit = (`inner` 1) where inner [] init = [init] inner (x:xs) init = repeatMul init limit x >>= inner xs For instanc...
I have a login screen on my iOS app. When I click login button I want to make sure that user should be displayed a loading image in center of the screen. I found lots of different methods online but I am after a simplest method. I found a way to display activity Indicator with minimum code: First of all, import your UI...
I've created a simple logging system that I'm planning to use and I've tried out some modern C++ features to make it generic. First I've made a log class that represents a single log message: struct log : std::stringstream { private: template <typename Level, size_t I = 0, typename... Stamps> static inline type...
This simulator visualizes Conway's Game of Life and other lifelike cellular automata rule-sets. Features: You can choose from any of the preselected birth/survival thresholds or specify custom thresholds ad hoc. You can click on cells to toggle them from alive to dead and vice versa. You can manually step through t...
I needed to make a point class for a term project that involved arbitrary dimensional points. I came up with this, and I know that it works fine, but I'm looking to improve it so I can reuse it in the future. Any criticisms or suggestions are very much appreciated. #ifndef POINT_HPP #define POINT_HPP #include <array...
I have written code to get all the MAC addresses in from systems having multiple MAC addresses and I think there's something which needs to be corrected albeit the code runs fine. Note: I have just tested it on Android. import re def getMacs(): macs = [] file = os.popen("getmac").read() file = file.split("...
A friend of mine told me he had the following exercises at his interview : You need to determine when a task will be completed if you are given : A date when the task is started The duration of the task in hours (how much hours it should take in total) The starting time and end time of a working day Weekends are not...
This is my code for the implementation of a singly linked list in Python: class SList: def __init__(self): self.root = None self.size = 0 def insert(self, item): try: if not item: raise ValueError self.size += 1 if self.root is None: ...
Recently I have been using more macros in my C++ code. I wrote a class with a private static const float because it is useful to prevent making mistakes. Then I thought, why use a private static const if a macro could solve the same problem, without taking up 4 bytes of memory? #pragma once #include "VehicleType.h" #...
Here's my implementation of doubly linked list in Python: class DList: def __init__(self): self.head = None self.size = 0 def insert(self, data): self.size += 1 if self.head is None: self.head = Node(data) else: p = Node(data) p.next...
I am scraping the names of the directors from a website using Python / ScraPy. I am very new to coding (under a year and after work) - any views would be appreciated. The reason I have a for loop with count from 0 to 100 is that not all the names on the website have a date of birth, and hence where there are blanks I ...
I made this simple event system: template<typename Func, typename Args> class Event { public: static void dispatch(Args args) noexcept { for (auto listener : listeners) listener.second(args); } static void attach(const std::string& id, Func func) noexcept { listeners.ins...
I wrote this interpreter for a code challenge. Can this be written any cleaner/smaller? Could I reduce the amount of nested conditional/loops? def brain_luck(code, input) output = '' cp = 0 # code pointer dp = 0 # data pointer ip = 0 # input pointer data = Array.new(10, 0) while cp < code.length case co...
I would be really thankful for review of this homework. I'm trying to write better code in terms of readability and design patterns. This program solves the classic 15 slider puzzle with A* search. The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle th...
I'm trying to find out why my web-scraping code with BeautifulSoup (BS) is slower than my code without BS. I would think that BS code would be faster than the other code - so, maybe I'm doing something wrong? With BS from bs4 import BeautifulSoup import requests import pandas as pd import time # start timer start = ti...
The locker problem for 100 lockers is simple: A school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first student, denoted S1, opens every locker. Then the second student, S2, begins with the second locker, denoted L2, and closes every other locker. St...
This is a jQuery time update events for a video player with multiple ids. I feel the code is too long and I need to add more ids to fire events. $(document).ready(function() { var i = 0; var a = 0; var b = 0; var c = 0; var j = 0; $("#r-news-week1,...
Recently, I got challenged to code with following bullet points: Extensible code to support different annual leave rules for HR departments Maintainable code to add/change the existing rules without any impact on the other clients Customizable and configurable code for different clients Exception handling and logg...
I'm trying to write a program that has a for loop, inside of which I have lambda expression to get a certain value. The loop has about 20,000 iterations. Including this lambda expression increases the execution time significantly. If I include it, it takes about 20 mins for the loop to finish; without it, it takes just...
I have a list of segment lengths and I want to convert it into array slices: segment_lens = [2, 5, 5] last_end = 0 start = 0 end = 0 for s_i in range(len(segment_lens)): start = last_end end += segment_lens[s_i] print("Slice: [%s,%s]" %(start, end,)) last_end = end Here is the intended output, which ...
Below is my try. //DAL //This is my interface namespace iPublisher.DAL.Interfaces { public interface IReportHandler { IEnumerable<DocumentMapper> FetchDocuments(int clientId, int pager); } } //my concrete class public class ReportHandler : IReportHandler { public IEnumerable<DocumentMapper> ...
I've got a long-running process. Once it finishes I need the output. But the user should be informed while it's running. With the logging module I get timestamps and whatnot preceding. So let's combine all 3: Prelude: import os import logging import subprocess from io import IOBase from sys import stdout from select i...
I am trying to get acquainted with C++11/14, so please tell me if the code below could be written in a more "modern" way. Or, of course, if it could be improved in any way. The function buildInput reads the content of a file and builds a matrix with it. std::vector<std::vector<int>> buildInput(std::string fileName) { ...
I would like to get some helpful thoughts on this and if there is a way to break it. Is there any point to not use fgets in that form? #include <stdio.h> #include <string.h> #include <stdlib.h> #define GETNAME_SIZE 100 char *getPhrase() { int size; char phrase[GETNAME_SIZE]; char *phraseHolder; print...
I'm currently having a bit of code, which I just know can be improved a lot. I am just blind to it. All of my code looks quite neat to me, except these parts... The login + authentication process is taken just way too long because too many calls are being made to the database. Code is written in Kotlin but syntax is al...
I'm looking for a way to have an logarithmic incremental counter. The counter goal is related to a numeric value than goes from 1 to Infinity. The counter maximum value should be 1000. The sequence looks like this: number is below 10, increment by 1: 1,2,3...7,8,9,10 number is above 10, increment by ^10 when the numb...
Is the class optimized enough to accept 1 million items in the stack? class Stack attr_accessor :stacks def initialize() @stacks = [] end def max () #first we could Think by #sort the stack #then take the last element #but I think it is not efficent if @stacks.size == 0 return pu...
I have a program that has one job: to determine how many unique numbers there are in a text file. The text file contains a string of numbers created by this other program named Randomizer.py: # Import random module import random # Variables for holding and transporting data values = [] val_str = "" def randomize(): ...
This is a follow-up to my question about epidemic simulation. The accepted answer works, but also mentions that I should look at modifying the external_function_call. Here's the complete working code, but it still takes quite a long time to run - in fact, it's slower than what I originally posted. Here are the first fe...
I've made the Game of Fifteen in Unity this is how it looks : The code is rather short there's one class for the pieces and one for the game logic : MovablePiece : MonoBehaviour public class MovablePiece : MonoBehaviour { public PuzzleGrid.SlotPosition CurrentSlotPosition { get; set; } private void Start() ...
The question is this one on UVa, and it basically gives us n, the number of dominoes and (a,b) relations such that pushing a will cause b to fall down too. First t, the test cases is inputted and then number of vertices and edges, and the (a,b) relations. My approach My approach was I first run a dfs on the graph (til...
I'm new in JS and my daily job is PHP, so I decided to do simple MUD Telnet game to practice my JS skills. The idea was to use async/await to do Telnet server code that seems synchronous at first glance. I run this code with "babel-node app.js". 'use strict'; let Promise = require('bluebird'); let net = Promise.promis...
I have created a bootstrap toolbar(navbar) which is working. my question is, since this is my first time on this topic if there is a place for improvement ? we are using some mock to enter some dummy data and its working HTML <!DOCTYPE html> <html> <head> <title>toolbar</title> <meta charset="utf-8"> <meta name="...
The goal is to print the highest version and second highest version of the list of files. The version is based on the first three digit places of the version. For example, version 2.3.0.1 version is just 2.3.0 (ignoring the last digit). Once it can print the highest version and the second highest version of the list, i...
I'm new to Clojure, and would appreciate feedback on this short program. The problem I set out to solve was selected at random from Project Euler, and is described in the comments. The part that I'm least happy about is the repeated series for the product, which I think could be replaced with a reduce call somehow. ; ...
I called my template OrderedList, but I don't like the name. Is there a better one? It stores a vector of values of type T, and a map from each value to its index in the vector. Just for information, the code should be pure C++03, so please don't suggest how it could be improved with C++11/14/17 extensions, or with Boo...
I want to create a generic log file which I can easily reuse in multiple files. Also, I want to be able to use the versatile std::cout so I can easily write formatted text (as oppose to create my own write function which may write only strings and which can probably never be that versatile). Definition #include <fstrea...
I am doing interview studying and would like to have another look at my implementation of Floyd's cycle detection algorithm. I've implemented a simple linked list which can be fluently configured and works generally for any type on stack. The cycle detection method serves: to find if there are any cycles in list or r...
After importing some products from a csv strange characters have shown up on the page and it would be too much work to manually go to each product and remove them so I made this script to deploy on that product page and remove them. $(function() { var p_desc = $(".rte").html(); var re = /\?ÕÌ_|Š|š|Ž|ž|À|Á|Â|Ã|Ä...
I have tried to solve the following problem in C# with LINQ: Given an integer array, find the most frequent number and it's count in the array. If multiple numbers have the same highest frequency return the smallest number. One requirement here is also to make the code execute in O(1) space complexity. public struct ...
I am writing a program that computes $$n-n \cdot \left(\prod_{i=1}^n (1-\frac{1}{p_i})\right)$$ which is rewritten in my code as: $$\left(1-\left(\prod_{i=1}^n(1-\frac{1}{p_i})\right)\right) \cdot n$$ There are lots of primes involved here especially as \$n\$ gets larger and larger. I do not want to use Atkin's method ...
I am an astrophysicist working on large simulations as part of the APOSTLE project. The output of the simulations I use are large (TBs) and are stored in tables spread across multiple hdf5 files. Often, I'm interested in studying a particular simulated galaxy, which is represented by a collection of particles of differ...
I have implemented the snake game using sdl2 and c. The arrow keys are used for the movement of the snake and if the snake hits the boundary of the window, the game ends. I have not implemented score yet. How can I improve this? Also what should I use for better graphics, instead of using SDL_RenderDraw and SDL_RenderF...
Here is the Stack abstraction: /********* stack.h *********/ #include"../list/list.h" typedef struct Stack Stack; Stack *createStack(); void push(Stack *, void *item); void*pop(Stack *); /*********** stackImpl.c *******/ #include"../list/list.h" typedef struct Stack{ List *stack; }Stack; Stack* createStack(){...
I am currently working on a Foobar challenge, the Ion Flux Relabelling. I came up with a java solution but Google returns an OutOfMemoryError. The prompt is, quoting the original question: Oh no! Commander Lambda's latest experiment to improve the efficiency of her LAMBCHOP doomsday device has backfired spectacularly....
I'm building a tool that takes in web requests and deserializes JSON requests into a C# class. Each page calls a different controller URL that is looking for a specific request. Once the request is received, I pipe the request into a method that iterates over each property in the class using reflection looking for the ...
I've written a Pong game in Java using the Swing library, and while the code works, the ball seems to lag across the screen. Perhaps my code is inefficient. I've included only the Board class because the majority of the code is within it and I reckon its what really needs optimizations. If more code is needed, please l...
Description: Huffman coding assigns variable length codewords to fixed length input characters based on their frequencies. More frequent characters are assigned shorter codewords and less frequent characters are assigned longer codewords. A Huffman tree is made for the input string and characters are decoded b...
Here is my code for this problem. Any bugs, performance in terms of algorithm time complexity, code style advice are appreciated. The areas which I want to improve, but do not know how to improve are: I sort the strings by length and I'm not sure if it's a smarter idea not using sorting at all. I used a few set operat...
I have two consumers and each consumer has their own validation logic entirely different from one other so I am using two validator class for that, one for each other. ConsumerA, for this consumer, I am using ValidatorA. ConsumerA, for this consumer, I am using ValidatorB. ConsumerA class public class ConsumerA exten...
The question is to find the sum of Digit XOR till \$N\$. For eg:- Digit XOR of a number 112 112 => 1 xor 1 xor 2 = 2 So we need to find int digit_xor_sum=0 for(i=1;i<=N;i++){ digit_xor_sum+= digit_xor(i); } return digit_xor_sum My Solution Approach was as follows, int digit_xor(int n){ if(n<=9){ ret...
This is an experiment to investigate how to wire up binding and inheritance in a composable, custom control complex. Custom Control Structure There is a custom parent (TestParent) with multiple custom child controls plugged into a ObservableCollection, DP on the parent. The Parent derives from Label and the children f...
Can my code from this question be improved? I am thiking of validating inputs, portability issues, etc Please note that we must declare our strings at compile time. We code embedded systems and are not allowed to malloc(). [Update] I forgot to state that our enums are non-contiguous and have a wide range, which can ma...
I have this code I use to connect to the database and get a thing from it secure, How can I make more secure?? class db { // The database connection protected static $connection; /** * Connect to the database * * @return bool false on failure / mysqli MySQLi object instance on success ...
This is my project on inheritance and polymorphism. I have the main file from my teacher and built the project base on it. My base class is Shape. Polygon and Circle inherit from Shape. Triangle and Rectangle inherit from Polygon. All of the class use the class Point. The project is running and working I am not sure t...
I'm building this menu builder with JS. So far I have a simple version 1 implementation that does what I want but it needs improving. Couple of things that I'd like to improve: Prevent unwanted input Control input when there is margin for error, ie for the target field I'd like to have either a drop down or a checkbox...
As a part of a study-group I did a very simple little JavaScript calculator. It's not made to look pretty. Any ideas on how I can make the code prettier? /* * This is a simple JS calculator * Made by Gemtastic 2016-05-08 */ // Gather and set up DOM elements var numberScreen = 'screen'; var numBtns = document.getE...
Here's my implementation of Generic Factory using Function library. It was created using Function library because I understand that the newInstance method is costly (as it uses reflections in the background[not sure about it]) and mostly because our teacher have decided :-). I wonder about how can it be more generic ...
My textbook (David Liang's Introduction to Java Programming) asks me to write a program which prompts a user to specify the number of rows and columns in a matrix prompts the user to enter each element of the matrix as it would appear in a table checks that matrix to see if there are any four elements in a row (horizo...
I've been rewriting parts of my own framework and eventually came back to where it all began, making traits more useful and implementing auto initializing traits and I am wondering if someone has a bright idea on how to implement it a bit cleaner. The idea of this is simple, let traits have constructors that are called...
I'm creating 2048 to practice React/Redux. I've got a game board that appropriately shifts, and follows the game rules (it works). I'm more concerned with my understanding of handling Redux reducers (that seems to be a problematic area for myself, like when I misunderstood reducer purity by adding randomness). Initiall...
This is a code review for a set of loggers following this question. The project is a universal windows application targeting Windows Phone. There are concerns over the tight coupling between the loggers and App. There is way too much code in the main program that is responsible for setting up the logger just right. The...
I have a dataframe: Name_ID | URL | Count | Rating ------------------------------------------------ ABC | www.example.com/ABC | 10 | 5 123 | www.example.com/123 | 9 | 4 XYZ | www.example.com/XYZ | 5 | 2 ABC111 | www.example.com/ABC111 | 5 | 2 ABC121 | www.example...
I have some code that searches for duplicate files and then removes those files from a csv. To make the set of files I am searching over much smaller, I first group the files by size; if a file has a size that it is unique, it is safe to assume that it is unique and does not need to be included in the set of files I am...
I'm working on HackerRank to try to improve my Haskell skills along side with reading Haskell Programming from first principles. I wrote a program that works, but it seems to time out on large input sets. The purpose of the program is Given a list of n integers a = [a1, a2, ..., an], you have to find those integers w...
I've written this class that downloads an images, the URLs for which are read from a local .txt file. I'm keen to make sure my code is safe and efficient. #include <iostream> #include <fstream> #include <string> #include <vector> #include<cassert> #include <algorithm> #include <numeric> #include <functional> #include <...
I have this, and I think it's working? It's been running nearly all day and still isn't finished, so I'm hoping there is a better way to code it. Right now I have a series of loops that iterate through all my data, but it's taking entirely too long. In short, I have three large worksheets, one master with one identifie...