instruction
stringlengths
71
95.1k
I'm a beginner currently learning Python. I made a simple program, a random number guessing game, to apply in practice what I have already learned (not much) and hopefully be able to get a better understanding of the basics. Are there any more things or suggestions on how I could improve my code? I would be glad to hea...
I have a solution for a circular array. How can I improve this? package oopdesign.CircularArrayNes; import java.util.Iterator; import java.util.Spliterator; import java.util.function.Consumer; public class ArrayIterator<T> implements Iterable<T> { @Override public Iterator<T> iterator() { return null...
Since std::latch is not in many standard C++ libraries, I tried implementing my own, is it OK from memory ordering perspective or yielding? class Latch { std::atomic<unsigned> count; public: explicit Latch(unsigned cnt) : count(cnt) { } void arrive_and_wait() { assert(count > 0...
I have this code that I am using to update OriginalId using the Id value. I there a better way to do this then using all the loops? Controller TemplatesDataService.UpdateRegimenCodeId(template.Regimens); Interface void UpdateDosageInstructionsCodeId(IEnumerable<Regimen> Regimens); DataService public void UpdateDosa...
I'm doing some work with optimal design of experiments, related to the Federov Coordinate Exchange algorithm. This considers a candidate set of points and chooses from them to identify the best combination of points. The problem is, there are scenarios where there are 5^18 (nearly 4 trillion) candidates - there's no wa...
I am new in Application Design. I have use-case as below As per the above story I have implemented code as below without any Modularity, Extensible and Maintainable. Could someone share the thoughts how to design below bad code to production grade application ? Based on this story context, there could be other storie...
I wrote a simple map structure in C: map.c #include <assert.h> #include "map.h" void map_init(Map *m, int item_len) { assert(item_len > 0); m->item_len = item_len; m->cap = 0; m->cnt = 0; m->buf = NULL; m->cmpfunc = NULL; } int map_setcap(Map *m, int cap) { if (cap < m->cap) retur...
I am looking for a way to improve the following method or to find out if this is the best way to do it. I have a superclass called Product and then I have Yoghurt, Crisp, etc. extending it. My Lists are declared as private static ArrayList inside of the class where this method is being executed, my main client class. I...
The code below correctly shifts v256f_stats by one and puts the results into v256f_x3. This is then used to get the delta between n[1..7] and n[0..6]. The undefined element in the output is not an issue. Is there a more efficient way of doing this? // create a shift-by-1 copy v256f_x1 = _mm256_permute2f128_ps(v256f_sta...
So, I have an ASP.NET Core 3.1 web site that makes occasional calls to a vendor's RESTful API. I use the HttpClient class to perform these calls. Currently, the web site is relatively low traffic (probably a couple of users per day). The current primary use case will result in 3 calls to the API for the complete workfl...
I've been working with JavaScript and AJAX a lot in the past, and now I'm moving towards the backend and working with databases more. I want to update my game data in as close to real-time as possible in JavaScript. Here is what I have been doing to update the data as frequently as possible (I simplified it): function ...
I implemented GNU shuf(1) in C using POSIX system calls and some BSD extensions. You must compile it with -lbsd. shuf(1) shuffles the lines of the files given as arguments or the standard input (if no argument was provided) and print it. If the -n NUM option were given, prints NUM random lines from the files. It first...
I came up with this recursive pure-Python implementation of De Casteljau's algorithm for computing points on a Bézier curve: def bezier_curve(control_points, number_of_curve_points): return [ bezier_point(control_points, t) for t in ( i / (number_of_curve_points - 1) for i in range(numbe...
In my continued venture to teach myself C# I came across an exercise using Dictionary. I created a class that has a method. In that method it creates a dictionary with keys/values. A string is passed into that method. If any matching character in that string correlates with a key we increment the value of that key,...
In my Ruby on Rails 6 app: I have a User class built with Devise, and I scaffolded a List class where each List should belong_to a User. I want Lists created through my app to be automatically assigned to the logged-in user. This should happen on the back end, after the rest of the new List fields have been posted to ...
I'm new to programming and started with some tutorials about C++ on YouTube. Now I was wondering how I should continue solving below. It does work but already it has been like a lot of code to write. And I have more linetypes to define. So hope someone can point out a better way std::string filepath = "path/to/file.ext...
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters is done just like they are arranged on a telephone keypad. Looking for ways of making the code more consise and easily readable. Want to learn the C# tricks to make...
I'm writing a bot, it turns out pretty big (1000 lines). In code, I often use the "show profile" function. I noticed that I greatly complicate it by adding functionality with kwargs. I am a newbie, I don’t know if I should create a class instead of a function, break it into different functions or continue in the same m...
main.cs using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Mail; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace ConsoleApplicat...
I had a project with repetitive HTML, JS code blocks in which should be ten fields (A, B, C...) with certain functionality. Three fields are already implemented, but I don't want to copy and paste code blocks. I was able to solve some of the repetitions, but majority of that code I wasn't able to fix. I am not sure wha...
This is the K&R Exercise 1-14 of C. The exercise ask you to print a histogram of the frequencies of different characters in input. How can I improve my code? The main doubt is the part when I have to increase letters in the array. #include <stdio.h> #include <ctype.h> int main() { int ch, nwhite, ...
I made a code to initialize char vectors with random numbers representing very large numbers with more than 20.000 digits. The additions and multiplications are correct but my code is too slow (1 minute). I know that I can change char by 64 int to make operations with 19 numbers at a time, instead of 1 digit at a time,...
I need to create a method to debias biased bytes from the method get_raw_bytes(length) using von Neumann debiasing method. Von Neumann method takes two bits at a time. If the input is 01 it will output 0, if the input is 10, it will output 1, if the input is 00 or 11, it won't output anything. Example: Raw : [1101...
In order to implement an efficient AST visitor preserving the principle of locality, I implemented some reference counting mechanism in C++ with the following set of features: All the newly allocated memory shall be stored in a contiguous allocation memory, so to preserve the principle of locality (minimize the page f...
Programming to an interface is a design principle that enhances the flexibility of software by hiding implementation details. Consider an object tree that only exposes an interface, but you want to add additional behaviour that operates on implementation details. A compositional object structure like that exposes an in...
I'm implementing a std::function like class that uses type erasure. So far it can be used with function objects (functions/function pointers, functors, lamdas) and pointer to member function. But to support pointer to member function I used a C++17 feature, namely constexpr if, to choose at compile time which implement...
I am new and trying to learn programming and have been working on a battle simulator that I hope to eventually develop into a RPG game with characters, areas to explore, etc. I have been working on the battle between you and an enemy and have most of the base mechanics done however I would like to clean up and improve ...
I'm a JavaScript beginner trying to learn by doing. Here I have a table with different values: I have used two for loops. Is there an easier way to achieve this? For example having just one for loop, or instead of it use something else? Even better would be if you could give suggestions to improve the code to be more r...
I'm struggling to find the best way to prevent users from cancelling a routine halfway through (by pressing ESC, break, etc) without making sure the sheet is being locked again. On top of that, I also want to manage potential other errors that this routine could generate. My code is : Private Sub Worksheet_Activate() ...
I created a project using VLCJ and a probability function to create a media player that plays your favorite media more often than the others, because I wanted to hear my favorite music and videos more than my least favorite. This involved a lot of event listeners that were all at the bottom of my main class file where ...
This is supposed to be a depth first search. I just took the idea of what it does and made my own version of it. The bot works it's way through the maze, when it finds a dead end, it moves back to original spot, and continues in a different direction than it's already gone until it reaches E the end. import java.util.S...
Please see the following code. I am using it to calculate the double integration. Please help me to improve the code. import numpy as np from scipy import integrate from scipy.special import j1 from scipy.special import j0 from numpy import sin from numpy import cos from numpy import pi import time import numba as nb ...
Is there any way I can make this code more efficient? I'm new to C, any suggestion is welcome! #include <stdio.h> #include <string.h> #include <math.h> #define LIMIT 1024 unsigned long htoi(char s[], int len); int main(void){ char line[LIMIT+1]; int i=0; for(int c=0; i<LIMIT-1 && (c = getchar()) != '\n'...
I built a very basic blackjack program a couple of weeks ago, but I've learned a lot since then, and would like some input on a couple of basic functions for card games: a build_deck function and a draw_hand function. It seems pretty efficient use of code (at least compared to my previous attempt) but I'm sure there ar...
Well, I'm not going to use it everywhere, as jQuery exists, but still was interested in experience of creating own library. Here are first steps: ;(function() { window["_o"] = function(selector) { if (!selector) { throw new Error("Cannot create Object from " + selector); } var elems; if (sel...
We all know that the famous twitch log site OverRustleLogs is getting shut down. So I decided to do some web scraping to download my favourite streamer's logs using BeautifulSoup. How can make this code run more efficient? import requests import os import shutil from bs4 import BeautifulSoup URL = 'https://overrustle...
I tried to implement printf family functions in C89, after I've read K&R book. The goals are three: Do not use dynamic memory allocation (like malloc); Write a modularized code; Write portable code without use machine dependent behaviour; Avoid undefined behaviour. Performance is not a goal, I used naive algorithm wi...
I am gaining a lot of interest in Game development. I created Chrome Dinosaur game in C++. I have not paid much attention to UI/UX, just trying to see if i can apply some OOPs in game programming. As I'm a beginner, I'm not sure whether I'm using good code design and logic. I could use some code review and tips. Before...
I've some functions targeted to simplify working with strings in some of my other projects. I'd like feedback on this code and whether or not the implementation is efficient and memory safe. I work with both normal strings (char*) and string arrays (char**) in this code. Here's stringfuncs.c #include<stdio.h> #include<...
I have implemented a utility class to perform various random number related task. I am looking for any feedback on design / implementation. I plan to expand the class, and so would like to correct any "bad habits" and or improve the basics before I proceed. Random.hpp #pragma once #include <gsl/gsl> // gsl::narrow (f...
I wrote this code for a PowerShell function that allows you to specify rate limits and makes a script block follow those limits. The script block return value is for specifying if it should be counted, i.e., when a server has rate limits and the request to the server doesn't happen due to a client-side error, the scrip...
I decided to dive into the world of functional programming since my programming so far has been mostly in C/C++, Java, and Python. I've gone through a couple Haskell tutorials and played around in GHCi so I decided to try my first real program. I decided to try one of the easier problems on Kattis.com, Transit Woes. Yo...
Python script that can downloads public and private profiles images and videos, like Gallery with photos or videos. It saves the data in the folder. How it works: Log in in instragram using selenium and navigate to the profile Checking the availability of Instagram profile if it's private or existing Creates a folder ...
I made a statistics calculator based on raw data for my Edexcel IAL Statistics 1 course which I'm going to use in my calculator's MicroPython. I would like some suggestions for ways to further improve my code and become better at Python. Note: MicroPython only supports a subset of the standard library. import math d...
I created the famous Minesweeper-game in Java, for which I used java-swing to create the GUI. Here's the code: Control.java: This class contains the main-method, which just opens the GUI. import javax.swing.SwingUtilities; public class Control { //Just to start GUI public static void main(String args[]) { ...
I have an app that has only one activity and 5 fragments. I removed the navigation component because it was buggy and restored the old navigation, which is simply a BottomNavigationView with OnClickListener. The problem is, that I don't want to recreate the fragment views, because it takes up to a second for 2 of them ...
Recently I posted an answer on a question about Bézier curve calculations. As a micro-synopsis: there are three implementations of De Casteljau's algorithm here, including the original poster's, AJ Neufeld's, and my own. I've also added some non-recursive implementations based on a couple of different forms of the Bézi...
I'm trying to understand an SO answer for this question Golang select statement with channels and waitgroup. The author of the now accepted answer goes on to say that OP's code is almost similar to this, when the function is replaced with the actual code package main import ( "errors" "fmt" ) func main() { ...
Code Review I've recently (within the last month) started learning Python and am now building a few basic apps. One of the apps I've created is a sort of desktop monitoring tool, that attempts to build a list of all applications used within a specified time period. Process - Check whether the current time falls betwee...
Adding Dynamic Slides to a slider used by a client shifts its index, need to account for that so i wrote this simple code, but i think it's pretty lame, is there any way to improve it and accomplish the same output? var slides = { 1: { content: "", group: 1 }, 2: { group: 1 }, 3: { content: ...
I have implemented the Harry Potter Kata and I need your feedbacks. The rules are: A book costs 8 euros. There are 5 different volumes. To get a discount, you must buy books of different volumes: Buying 1 book doesn't give you a discount Buying 2 books applies a 5% discount Buying 3 books applies a 10% discount Buying...
I have code in C that multiplies each element of an array by a number (0-9), resulting in a series of base 10 digits. I compile with gcc -xc -Ofast -msse2 -flax-vector-conversions -ffast-math -funroll-all-loops --param max-unroll-times=50 -ftree-vectorize -fopt-info-vec-missed My processor is core i7 950. My problem i...
Main purpose of this code, Take some information for animal features Clasification of user input print those input into txt file My problem is that, I think coding of animal features takes too much lines. Is there any way to do that in a simple way. Something like putting all the features(nutrition etc) into animal, ...
Following up on my previous Column work: Column File Format Stream It is now available in github: https://github.com/Loki-Astari/ThorsStorage I have incorporated the comment by @L.F. but have done a lot more work since then. Unfortunately the main code is now at 798 lines so too much for a single review. I will break i...
I gave a shot to infamous finding dependency problem. I highly encourage to give it a go yourself before seeing the solution I came up with. Here is the problem statement: Given a list of projects that need to be built and the dependencies for each, determine a valid order in which to build the packages. Here is what...
I made an RPS Game with python with the Crypto and socket modules. I would like you to look at the code and tell me if anything can be improved, and if there are mistakes, etc. The game is working like this, the server is setting up the socket connection, and then listening for 2 clients at least, when there are 2 clie...
I started the CS50 and am at pset4. I completed both the less and more parts for the filter app that takes an image and applies a filter to it. In this pset we need to write the filters code only(greyscale, sepia, reflect, blur and edges). The edges function should apply the Sobel operator to an image so that it detect...
I have 25 branches but I'm only allowed to have 12 branches maximum. The objective of this task was to cancel out unnecessary punctuation, find the common elements that exist in the sentence and dictionary and then to translate the result into English into the other language or the other language to English, depending ...
I currently have two entities, Adress and Company. They both have DTOs to perform CRUD operations. AddressCreateDto: @Getter @Setter public class AddressCreateDto { @NotNull private String address1; private String address2; @NotNull private String city; @NotNull private String state; ...
I'm playing around with making random items and decided to implement the following structure. #include <stdlib.h> //uints #include <limits> #include <random> #include <iostream> class RandomItem { private: struct _physical_properties { uint16_t length; uint16_t width; uint16_t sqew; uint16_t weight; }; struct...
I have a need to use a shared variable among different threads in c/C++. So putting my knowledge of threads and mutexes I have written the below sample code. Can anyone please review the code and provide me review comments so that I can improvise it in a more better way. Also I know about atomic variables but somehow I...
In a method I made this @Override public boolean canEditHq(User user, LocalEvent localEvent) { if (!HQ.equals(user.getUserHierarchy())) { return false; } if (!SECOND_APPROVAL.equals(localEvent.getStatus())) { return false; } final boolean hqCanApprove = this.parameterValueService.f...
This is my second Python program, and I wonder if this code is readable to most people or if it only applies to me. Should I make more distinct functions or use more appropriate names? Are there other ways that lessen the lines of codes and do lesser lines mean more readability? Any suggestions would genuinely be appr...
Problem Statement: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. This is a leetcode problem. I am looking for feed...
As part of a Stack Overflow answer, I whipped up a quick example implementation of a function to set a nested property of an object using a dot notation string. The goal was to show how that could work in a small amount of clean code: function set (object, property, value) { if (typeof property === 'string') property...
I'm learning C at the moment and chose implementing quicksort as an exercise. My code is sorting correctly, but afterwards I looked at some tutorials online about quicksort. And they implement it differently. I don't know, if I misunderstood quicksort, or if I simply implemented it differently. How I understood quickso...
I'm making a code that, starting from an xml file: stores the index of child elements of a tag and the child elements as key, values in a dictionary; deletes keys whose values contain a certain string; joins the dict values and extracts their text; replaces certain values with ""; counts the occurrences of specific re...
Is there a way to make my code more compact or efficient? Testcase example 1 : rabcdeefgyYhFjkIoomnpOeorteeeeet output: ee Ioo Oeo eeeee Testcase example 2 : baabooteen output: aa oo ee import re def find_two_or_more_vowels(string: str): match_obj = list(re.finditer(r'(?<=[qwrtypsdfghjklzxcvbnm])([aeiou]{2,})(?=[qw...
I was trying to write a memory pool interface which: Grants memory of fixed size chunks in linked list style fashion. On returning the memory there is no risk of memory fragmentation. //mem_struct.h #ifndef MEM_STRUCT_H #define MEM_STRUCT_H struct mem_struct { char arr[4]; struct mem_struct *next; }; #endif ...
I have a XML file (test.xml) that can be sum up as follow (I filtered it so it will be more readable): <coverage complexity="0" line-rate="0.66" lines-covered="66" lines-valid="100"> <packages> <package complexity="0" line-rate="0.66" name="."> <classes> <class complexity="0" nam...
I am working on a game engine using CMake, this being the first CMake project I worked on I am looking for some feedback. The project has the following structure: root |--CMakeLists.txt |--Cheetah | |--CmakeLists.txt | |--includes | |--dependencies | |--src | |--out | |--build | |--x64-Debug | |--Cheet...
I am new to Python, so I am interested in knowing if I am efficiently using python for this project. This program is meant to simulate the Central Limit Theorem. It uses sliders to adjust the number of measurements and the number of trials. Central Limit Theorem: Given any distribution, begin sampling by making a serie...
I've looked through a lot of solutions on this topic, but I have been unable to adapt my case to a performant one. Suppose I have a list of dictionaries stored as: db_data = [ { "start_time": "2020-04-20T17:55:54.000-00:00", "results": { "key_1": ["a","b","c","d"], "key_2": ["a","b","c","d"], ...
How do I refactor this mess of if/else conditions so that it's more readable? ( Reverse_Path = [[]] -> Child = [c(New_Score,G1,Pos),P] ; otherwise -> Child = [c(New_Score,G1,Pos),P|Reverse_Path] ), ( memberchk(Child,NewAgenda) -> addChildren(Others,Reverse_Path,Current,NewAgenda,Target,Result) ;...
This code accepts input from the user on a game of Texas Hold Em Poker. It then reports back the odds of winning against a single opponent at each betting stage. The calculation needs to process (50 choose 5) * (45 choose 2) for the pre-flop calculation. The way I know this can be done fast is to randomly sample these ...
I've been listening to some programmers and they use terms like good and bad code. I am not really sure what they mean by that. I mean I went on r/badcode and saw some stuff I knew was definitely bad code. But I don't really understand if bad code is repeatedly typing the same code instead of looping or just bad layout...
I created state change detection for multiple buttons, which is intended to run on my Arduino for a touchpad project. In a nutshell, the code makes sure that the Arduino only reacts to button presses and not to holding in the buttons. My code: unsigned int buttonStates[] = {0, 0, 0}; unsigned int previousButtonStates[]...
I am working with a large dataset expanding > 50 years. Each year has ~10 million lines of records with multiple variables/columns. I need to perform groupby operations by location and time. My code runs extremely slow - it takes 2-5 hours to process 1 year's data depending on the number of stations in the year. I look...
I am writing a generic CacheProvider factory which contains a concurrent dictionary to keep the "Named" cache objects (a custom implementation of memory cache based on concurrent dictionary) to be shared among different state machines/pipelines. I found this article and came up with below implementation public class C...
I wrote a function that merges two linked lists but I seem to have some code duplication I'm not sure what to do with: //merges two sorted linked lists into *merged_out, returns suitable error/success codes ErrorCode mergeSortedLists(Node list1, Node list2, Node *merged_out) { if(!merged_out){ return NULL_A...
I feel like my code is too messy-Im looking for possible way to make it more readable/shorter. Goals: 1)Get three strings from user input. They have to be the same length. a)First must contain only lowercase letters. b)Second must contain only uppercase letters. c)Third must have an even length and the same number of ...
I have the following code that aims to filter those pid (1 and 4) that have at least before_threshold (2) rows with a value of before in the day_type column and at least after_threshold (2) rows with a value of after in the same day_type column. Is there a more succinct way of doing this using the tidyverse packages? ...
I'm making a chess game. On the board the columns go from a-h and rows from 8-1. I made this simple function so when someone inputs 'a' for the row it will give me the right row on an array same goes for columns, 7a would be [1][0]. Is there an easier way someone could point out for me? Thanks in advance. update:added...
Turned in a project a few days ago, and I needed a way to filter and format values off a file. I decided to go for a bash script since it seemed like a good option, and I came up with the following: #!/bin/bash amount=100 awk '{ if($i == "data: 1"){ getline; getline; print $2}}' sensordata...
I'm trying to interact with a bash shell on a router to automate some CLI commands using SSH.NET. I'm not sure if the approach I'm taking is the best one and would like to get some recommendations on how to improve my methology. Although this code does indeed work correctly and does produced consistent results, the tim...
On StackOverflow I got a great answer to a question I had about creating a Date object from an ISO 8601 string with the ability to reposition into local time. From there I wanted to see if I could make it any faster. We process a ton of dates in batches of 10,000 or more sometimes on slow phones. This is the best I cou...
I am trying to write a function to determine whether an array contains consecutive numbers for at least N numbers. For example, the input is [1,5,3,4] and 3, it turns true because the array has 3 consecutive numbers, which is [3,4,5] Here this function requires sorting beforehand and it is not the most eloquent solutio...
I have written a program on Pig Latin converter which I've attached herewith Pastebin. I am still a beginner, and I know that the code works perfectly, but can we make some improvements in this code cause I don't like using break statements too much. Also, is there any way to make this code smaller. Looking for your ki...
I am trying to solve a problem on GeekTrust, called Tame of Thrones (here) Shan, the gorilla king of the Space kingdom wants to rule all Six Kingdoms in the universe of Southeros. There is no ruler today and pandemonium reigns. Shan is sending secret messages to all kingdoms to ask for their allegiance. Your codin...
I implemented a class for relationships with the user (deletion, name change, check for existence), I created this class to remove extra logic from the activity class. Could you talk about how my code can be improved? class UserActionManager @Inject constructor(private val repository : BaseAppRepository, ...
This is my solution for the Credit problem on CS50's (Introduction to CS course) Pset1. It involves using Luhn's Algorithm to test the validity of the Credit Card Number entered and based on a few conditions attempts to identify the Credit Card Company. check_length attempts to find the length of the number entered. ch...
I have designed this by using the stack data structure (similar to balanced parentheses problem) checking if the previous element is decreasing the number or not. package test; import main.algorithms.RomanConversion; import org.junit.Assert; import org.junit.Before; import org.junit.Test; public class RomanConversion...
As I added more features to my chess game, such as an endgame screen. I eventually ended up having a lot of duplicate code, and complex logic with lots of nested if statements in loops. The usual advice is to add more functions, but I cannot think of ways to reorganise this code such that each part has a highly specifi...
Details: I have a code, which does the following: Get data from CSV and insert it into MySQL table Get data from SQL Server and insert it into MySQL table Run this code every 240 seconds - to refresh the data, in order to have up to date infromation. I'd like to know whether the code below, I am about to provide, can...
My goal: to make the already easy task of filling out an excel sheet 1% easier by putting in hours and hours of effort. On a more serious note, I'm currently developing a system to manage inventory at my work. The following is my attempt to smooth out the process of receiving inventory when it arrives. To help visualiz...
I'm trying to remove email names from transcripts because it removes unnecessary info that is not needed in the transcript. The regex below removes email names from a spoken transcript. Examples below are completely made up. You'll note above that "dot" and "at" are the only common terms. Format: token1 tokenN at ...
I'm still learning c#, and I need my code to only run less than 2 seconds to be accepted. I have a look and say sequence and after the last number is found, the code sums it all up, and it takes so long if the element in the sequence is big. Example: Input: 2 Output: takes less than a second Input: 50 Output: takes 4 o...
awhile ago I asked about a thread pool implementation I had made. I took the advice down and modified it a lot over time to fit my needs. It has been serving me extremely well in all of my projects but I was wondering if there was anything else I could improve on? Here is the class: class ThreadPool{ public: /* Co...
I am implementing a functionality in Scala to Copy files from one FileSystem to another FileSystem. And this is what I have implemented. CopyFile.scala Methods are empty. However, they will just call external library and will do error handling. object CopyFiles { def localToHDFS(src: String, dest: String): Unit =...
Related to my code I just put out for review. I wrote some small helper functions for dealing with interactions with the file system. This is not meant to by any type of "File System" wrapper. I just wanted to put my code into named functions to make the code Column formatting code easy to read and the functions did no...