instruction
stringlengths
71
39k
I'm reading a book called JavaScript Web Applications. In first chapter, it introduces an implementation of class library. Here's an intermediate version: var Class = function () { var klass = function () { this.init.apply(this, arguments); } klass.prototype.init = function (args) {}; // Adding...
I'd like to ask if this PHP/HTML code has any flaws which can be exploited by the potential aggressor: <form method='post' action='<?php echo $_SERVER['PHP_SELF']; ?>'> <input type='text' name='foo' value='<?php echo htmlspecialchars($_POST['foo']); ?>' /> <input type='submit' value='bar' /> </form> I'm aware that it...
The (real life) problem Following my question on SO, I found out that printing a Java Date() in a custom format is quite tedious: final Date date = new Date(); final String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS zzz"; final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT); final TimeZone utc = TimeZone.getTimeZ...
I've been writing some smaller jQuery plugins lately, and I've been thinking of writing up some boilerplate that I can use when writing new ones. I have code that works (for now), but I want to share it and get feedback on things I may be missing as I move to larger plugins. /** * jQuery Plugin Boilerplate * - find a...
This code is intended to take input as a string, do a SHA-256 hash on the string, and return the result. It works correctly for the standard test vectors (test code included at the bottom). I'm particularly interested in your thoughts about whether it would be a good idea for it to accept input in forms other than a st...
Here is my attempt at a PHP class to be used as a base class for typed collections. My goals with this are: to be able to access collection members with foreach to be able to access collection members using indices (array-like) to ensure that all collection members are objects of the same type I have implemented the ...
I have the following code that converts a couple of bash commands into Windows cmd commands, as well as adding some commands. This is only my second day programming in C++, so any and all suggestions would be helpful. #include "stdafx.h" #include <iostream> #include <string> #include <regex> #include <fstream> #include...
I wrote this script to collect evidence of the number of days worked for the purpose of claiming some government tax credits. I'm looking for some ways to clean it up. I'm especially wondering if there is a cleaner way to uniqueify a list than list(set(my_list) and maybe a better way to do: d = dict(zip(commiters, [0 ...
I am using wordpress to allow a client to enter a curriculum vitae and have it output the correct and consistent html formatting: So I have a plain text box custom field and am having them enter in the content in the following way: [section "Solo Exhibitions"] [year 2011] Inner Space January 11 Peter Pan February 11...
Linq already has a set of GroupBy methods for enumerable, which returns IEnumerable<IGrouping<TKey, TSource>>. I dislike this return type because it means I have to do a where query everytime I want to find a group. I try to make something that returns a dictionary instead, as below: public static class GroupByExtensi...
I am a newbie programmer learning some C++. One of the exercises in my book asked me to write a basic console calculator that takes 2 numbers and an operation as input. I have done so and the program compiles (both with clang++ and g++) and runs fine. I would like to know if: I am making mistakes in my code that the c...
public static function find_user_tracks($id) { global $mySQL; $sql = "SELECT * FROM `tracks` WHERE account_id = {$id}"; $result_set = $mySQL->query($sql); $ret = array(); while($row = $result_set->fetch_assoc()) { $ret[] = $row; } return $ret; } The above code contains the re...
What is the common practice to implement attributes that have side effects in Python? I wrote the following class which supposed to save singletons when a variable is going to get a certain value. The background is that my program had sparse data, meaning that there were a lot of objects having empty sets in their attr...
The common lisp function copy-tree is often implemented in a recursive way, and thus is prone to stack overflow. Here is my attempt at writing an iterative version, one-pass, no stack, no unnecessary consing, version of copy-tree in common-lisp, working with nested, perhaps dotted, lists. (defun my-copy-tree (tree) ...
I have a couple of jQuery animations running in a sequence after certain resources are loaded: $(".loading").delay(2600).fadeOut({ useTranslate3d: true, }); $(".zip").delay(1900).slideDown({ useTranslate3d: true, }); $("#zip").delay(2800).slideDown({ useTranslate3d: true, }); Is there a better way to com...
I develop an android native application using phonegap and jquery mobile. I've made a function to create a listview style dynamically using looping for... When I run the function for the first time, it works, the listview style is working, and match with the content. but when I press back button and run the function ag...
I have constructed a function that checks whether an element has a scrollbar or not, and can also check individual axes. I don't know if this works in all major browsers and am unsure about the performance. Is there any way to improve upon the code, did I miss anything? How would a javascript equivalent look like? Not...
Below is the class which I am using to fill multiple DropDowns on ASP.NET Page Load event: public sealed class getBlocks { public getBlocks(DropDownList dropDownName, string districtId) { returnBlocks(dropDownName, districtId); } public void returnBlocks(DropDownList DropDownName, string Distri...
What I've been working on is some kind of function that can take basically any well constructed multi-dimensional array and remove any and all duplicates within matching key sets. The particular function I've designed provides convenience and functionality but it is far from pretty and seemingly slow compared to a poss...
I'm creating a Backbone App, and although everything seems to work i'm afraid i might need to refactor very soon if I keep adding functionalities and views with this approach. I'm using Parse in the backend, meaning that the object Parse is equivalent to the Backbone.Model. I can't control my models since they've been ...
This libray was written quite some time ago, and it has so far been used in all sorts of small-ish projects. I'm about to base a more complex, security (Access Control) related, open-source project on this library, so I thought it would be a good moment to ask for a code review. Source: DbHandler <?php /** * @package ...
I knocked this up quickly to allow delayed Invoke on the dispatcher. Along with canceling the existing invocation and replacing with a new one, this allows throttling an action. public static class DispatcherExtensions { private static Dictionary<string, DispatcherTimer> timers = new Dictionary<string, DispatcherTi...
I came up with the idea of a small utility class that will poll some delegate until the response received meets some condition, upon which it will notify the main thread which can take the appropriate action. This is the first time I've ever done something like this, and I know that in general, polling is a bad idea, s...
I live in a country where an electricity blackout happens after every hour, which corrupts the Minecraft save files, so I came up with this auto backup utility which backs up the %appData%.minecraft\saves folder constantly after a specified time. It works fine but I'm still not satisfied with it. Tell me what more I c...
I need to create a class with two properties: LogOutput ExceptionOutput These properties (of type Action) send a message or a exception depending on the target function. This target function is set via properties. Currently, I have the following code: public class Output { private Action<string> logOutput; pr...
I need a NumPy matrix with comparisons among all elements in a sequence: from numpy import matrix seq = [0, 1, 2, 3] matrix([[cmp(a, b) for a in seq] for b in seq]) I'd like to know if there is a better way to do this.
I've been using this syntax alot recently to keep my class in scope of nested functions. It seems to work well in small to moderately sized class but I'm starting to wonder how efficient it actually is and if there is a better way to handle this. Any suggestions would be really useful. myClass.prototype.myMethod = func...
I am putting together an animated drawer from scratch for use but also as a learning experience as I am not very strong with jQuery and would really like to get better. I am hoping that someone here might take a moment to look over my JSFiddle and give me some direction/tips to help me continue to progress? For example...
I want to call an Action every X cycles (in my case, to a transaction commit every 100 records), so I do: public class CyclicActionCaller { private int _counter; private int _cycleValue; private Action _methodToCall; public CyclicActionCaller() { _counter = 0; } public ...
I was working on the challenge Save Humanity from Interviewstreet for a while then gave up, solved a few other challenges, and have come back to it again. The code below generates the correct answers but the time complexity O(text * pattern) is not sufficient for the auto-grader. Could anyone perhaps give me a hint o...
The question was, which is the biggest product you can make from the digits of 1 to 9 (which is 9642*87531, BTW). It is pretty clear that one number starts with 9 and the other with 8, and that you need to append the remaining digits in descending order to one or the other number. buildList x y [] acc = (x,y):acc buil...
I need some help improving my code and wondering if I there is a better way to do the following: StringBuilder buf = new StringBuilder(node.length() + 8); for (int i=0, n=node.length(); i<n; i++) { char c = node.charAt(i); String hexadecimal = ""; switch (c) { ...
This is a followup to this where I was initially using a single thread and Thread.Sleep() to poll a delegate. I was recommended to use a timer and the ThreadPool to minimize resources and improve the responsiveness of StopMonitoring(). This is the first time I've used the ThreadPool and timers in this way. I am worried...
I'm updating and old project from jQuery 1.4 to jQuery 1.7. Can this be simplified, thus reducing the amount of code, and perhaps in such reduction, have it improved? Having the following code: var cartItemDel = '<td class="del"><img src="components/themes/default/img/icons/cross-small.png" width="16" height="16" alt...
I want to display a table similar to this: This table is generated from three tables depending on the student ID: I don't want the table to depend on fixed values. For example, I should be able to add a subject or exam in the database and see the changes reflected in the table without touching the code. Any sugge...
I have the following tables set up: t_users table: |----------------------------------| |uid | name | email | |----------------------------------| |1 | Maria | maria@example.com | |2 | George | george@example.com | |----------------------------------| t_settings table: |---------------------------...
I'm trying to optimize this bit of code and I thought I'd throw it out here to see if anyone has any ideas. I've been testing the performance using Benchmark.measure {...} and wrapping the entire function. Yes, the item has a date that is a Ruby Date puts Benchmark.measure { grouped_items } def grouped_items...
This is the algorithm for calculating sun rise/set time at various places on Earth. I took it as an example of multiple functions inside of one top function. This is Ver 0.3: fromDegree deg = deg * pi / 180 toDegree rad = rad * 180 / pi deg2rad = pi/180; -- deg2rad rad2deg = 180 / pi -- rad2deg --nn :: RealFra...
I'm studying Common Lisp on my own. Coming from C++, Common Lisp feels kind of strange sometimes. I'd like to get some feedback on what I understood so far. For learning purposes, I wrote this simple vector class package. The only requirements apart from correctness are non-destructiveness and performance. I want it to...
I have an abstract class Entity in my code, which requires a reference to an instance of EntityData to operate. (EntityData provides basic information about the type of the entity). In the design of my program, every type of entity would have its own class that extends Entity, and thus would have to provide EntityData ...
As sort of a follow up to my previous question from a year ago, what are some suggestions you can think of that will improve this code, whether is directly programming related or algorithm related? I know there are better algorithms for multiplication and division, but I don't understand many of them (yet). I have impr...
I am using an Xbox controller to send data to my computer, and am using the SendInput method to handle keys. I was wondering if there was any other, better way to do this. INPUT Input = { 26 }; Input.type = INPUT_KEYBOARD; Input.ki.dwFlags = VK_UP; SendInput(1, &Input, sizeof(INPUT)); std::cout << "Up";
GitHub project repo I've been working on this little function to convert an HTML form into a JSON Object having the same structure of the form. Basically it is intended to be useful in those situations where you let your user dynamically alter the structure of your form, for examle: <form name="myForm" data-detect=...
I feel like this structure could be better, but I can't realize how. internal AuthenticationResult ProcessOpenIdResponse(IAuthenticationResponse response) { switch (response.Status) { case AuthenticationStatus.Authenticated: { string openId = response.Clai...
I want to get opinions on the code I have put together for a centralized DataContext via a DataHelper class that I have created to be re-used on projects. NOTE - there is a ton of code here, sorry about that, but I really wanted to layout out the complete approach and uses for my ideas. I'm an not saying this is the r...
I am fairly new to Entity Framework and I am not sure I am really using it to it's max potential. I have this query, that IMHO seems to take a little longer than I feel it should. I have tried various combinations to retrieve all the data I need making as few connections as possible and so far this query yeilds the b...
I'm completing exercises in Compilers: Principles, Techniques, and Tools (2nd Edition) in Python. The following code converts: { int x; char y; { bool y; x; y; } x; y; } to: { { x:int; y:bool; } x:int; y:char; } I had the following concerns about my code: Is it acceptable to do list(tokenize(...)) instead of using i...
I've been doing MVC for a few months now using the CodeIgniter framework in PHP but I still don't know if I'm really doing things right. What I currently do is: Model - this is where I put database queries (select, insert, update, delete). Here's a sample from one of the models that I have: function register_user($user...
I've written a short piece of code to get myself familiar with backbone.js. I'm filtering 100 results from the Twitter API. Once those are in, I use a time picker and a hash tag selector to filter my results. I want the filter to work in the following manner: Pick a time range, get a filtered collection and a filtered ...
There is a handful of LinkedIn clients written in C# on the NuGet package library, but as far as I can tell, most only do authentication via LinkedIn. I found a couple which offer a LinkedIn REST API interface. Of those two, one looks like it has gone inactive (the nuget pack even warns that it is elementary). The othe...
I have a grid that lists products. The grid is three columns wide, but it could grow to be four or five columns wide. I've written my script to count the columns. The markup is something like this: <ul> <li class="item first">...</li> <li class="item">...</li> <li class="item">...</li> <li class="item f...
I have written some code to establish a client and server. I have managed to get a one way communication from client to server. I have added the code below. Can someone please have a look and see it is the right way to do it? If this is good enough, how can I get two communication to work now? Client: #include <stdio....
Does this piece of code make sense? The idea is to throw any exceptions that may occur but always run the finally block to close the streams. private void streamToFile(HttpResponse transferResponse) throws Exception { OutputStream output = null; InputStream input = null; try { input = new BufferedI...
The following works as intended, however is there a more concise way to write this script without changing it too much? It's a simple menu with sub-levels which have a plus/minus icon when each li opens/closes. jQuery: $(document).ready(function() { $li = $('#main > li.expand'); $li.click(function(){ $u...
This is my very very very first attempt to write anything meaningful in node. The client side is a simple form that has login, workspace, and simply saves them onto the database. It would have been a 5-liner in PHP! My question really is: does this code look sane/good? I am trying to avoid using async.js for now, just ...
I've got a class which describes and calculates centrifugal pump impeller properties (dimensions, flow speed etc. ). At the beginning i have created it in this way (since my class is quite large and calculations are complex i will simplify it using cylinder as example): class Cylinder { double height; double ra...
I am learning scheme to get something new from a programming language and this code below is the solution to Project Euler question 21 but the code runs 10x slower than the listed Python code when I use Chibi-Scheme. Can any Scheme craftsman refactor the code into the Scheme idiom for efficiency. Scheme Code: (define (...
I'm writing something that basically takes a bunch of files and renames them into a nice format, such as pic_000.jpeg, pic_001.jpeg, etc. One of the options is to write the incrementation as letters, e.g. pic_aaa.jpeg, pic_aab.jpeg, etc. Also, is they are converting a set of pic_000s into a set of pic_aaas, then ther...
Question: I'm attemping to modify a Javascript snippet to more efficiently get the user's current Zipcode. One problem that I am facing however is the lack of understanding around public functions. I am wondering if they are requried, and if they are not, then what would make the code cleaner and more efficient in ter...
This is my second "first" attempt at starting Java. My first was cut short when I had to go back to a PHP project that required my immediate attention. But perhaps that was a good thing. I learned quite a bit more about OOP, better coding practices, and some other topics. So, after this hiatus, I noticed quite a bit wr...
I have to store some properties in a database properties table which looks like this: CREATE TABLE `property` ( `id` int(11) NOT NULL AUTO_INCREMENT, `computer_name` varchar(64) NOT NULL, `name` varchar(64) NOT NULL, `value` varchar(1024) NOT NULL, PRIMARY KEY (`id`) ); Sample data: +----+---------------+---...
I have implemented the "[ ]" operator in a class that I have created to return values associated with a key (the same concept of a dictionary, except that it's possible to have the same key more than one time). However, looking at my code I don't think it is as efficient as it could be. public class MyClass { publi...
I've got a SQL database that keeps track of which services a client has. I need to create an image using SVG that only displays the services that the client has. The database stores the services in the format 1,2,3,6,7,9. Here's what I have: <?php header("Content-type: image/svg+xml"); $db = new PDO(**[reda...
I have a function called FormatCurrency() which I would like to call on each of the following elements: TextBoxA TextBoxB TextBoxC ... TextBoxN My current function performs the following operation function formatALL() { //get the value into var v. call FormatCurrency(v) and store it back var v = doc...
All, I have written some code to get the latest files from a directory, the files I am looking for contain the string sProcScript = "sProcScript" and in the selected directory I might have several versions: sProcScriptBigGuns1001.sql sProcScriptBigGuns1007.sql sProcScriptEdAggVal1006.sql sProcScriptEdAggVal1007.sql ......
I have a number of jQuery animation effects applied to certain elements on the page: jQuery("#bgd_balance").animate({ backgroundPositionY: "0px", backgroundPositionX: "0px", 'background-size':'100%' },800,"swing"); jQuery(".balance_left_box").delay(2000).slideDown(200,"easeInCirc"); jQuery("....
I have created a very simple script that will create two columns which are populated by an array. It works, but I am certain that the way that I have gone about it is not the best way. I have been searching for simple, sample scripts which would aide me in understanding how to best approach this, but all of them have b...
I've been advised that when checking the password hash for a user I should use a string comparison function that always takes the same amount of time, to avoid timing attacks. So I wrote this: //this is a constant time string compare, //it does not exit early even if the strings don't match //it is case sensitve //the ...
I have an object array that contains various types of objects (primitives, strings, other object arrays) at arbitrary levels of nesting. I need to pull all objects of type System.Web.UI.Pair from this array and am having a heck of a time writing the method. This is especially difficult because the Pair class itself c...
I'm doing a sort of exercise where I'm given a question, and I have to answer it by writing an SQL query using a database that I was given. This is the question: What is the cheapest fare for a one way flight from Boston to Baltimore? Here's what I came up with: SELECT DISTINCT fare.one_direction_cost, fare.f...
Below are two implementations of the problem "find the characters in common between two strings" - in Clojure without using collections / set operations. Are these approaches sufficiently idiomatic and could the be more concise? (aside from using collections functions). Also, is there a Clojure library that wraps or pr...
This is code of a rails app. The code has the logic used in a search form. It queries a MySQL database. Any thoughts on something that would make this unsafe or violated a rails principle? /app/models/query.rb class Query < ActiveRecord::Base attr_accessible :customer_email, :customer_first_name, :customer_last_name,...
I have a FileAsset class. I have a set of 'filters' with which I determine if a FileAsset should be written to my database. Below is a telescoped version of how the filters work now. My big question is this: Is there a better way? Any advice would be awesome! (By the way, the Attribute key in the filters allows me ...
I have a MySQL result set in a PHP multidimensional array. I want to iterate through it and output it sanitized. Considering the two alternatives below, are there any performance differences? filter_var_array on the whole result set before iterating: $sql_rows = filter_var_array($sql_rows, FILTER_SANITIZE_FULL_SPECIAL_...
I have few controls on my page which I want to show/hide and/or enable/disable on some condition. Images to help illustrate the requirements: Following is the code to show/hide, enable/disable the controls. Please review it and tell me how I can extract common code. Any other suggestion are also more than welcome. /...
I was having a problem with the TCP/IP socket communications in a web app where the server that the app was talking to would occasionally send bursts of data that would overflow the low level stream buffer, resulting in lost data. The solution I came up with is basically an unthreaded form of the StreamGobbler and I ha...
Which of these 3 python snippets is more pythonic? This 1 liner list comprehensions which is a little overcomplex users_to_sent = [(my_database.get_user_by_id(x), group['num_sent'][x]) for x in user_ids] or this multi liner which is 'too many lines of code' users_to_sent = [] for id in user_ids: t1 = my_database.g...
I have some C# I/O code that can take one or two input files. I would like to wrap the Stream objects in a using block, but cannot find a way to succinctly express this in code. Currently, I have two large files (>1GB), that contain concatenated TIFF files and PDF files respectively that need to be extracted into indi...
Any suggestions how I could simplify this LINQ query? from type in assembly.GetTypes() where type.IsPublic && !type.IsSealed && type.IsClass where (from method in type.GetMethods() from typeEvent in type.GetEvents() where method.Name.EndsWith("Async") where typeEvent.Name.EndsWith("Completed") ...
I wrote this code (except the getting text from clipboard part) a while back, and I'm wondering if it could be written better? Can anyone help me improve this code? This code basically takes HTML from the clipboard, and then attempts to fix the indentation and writes it to a new file. public static class Clipboard { ...
Here is the current code for the BitArray class needing optimization (implemented on big integers): import itertools ################################################################################ class BitArray: def __init__(self, values=[], max_size=128): self.__data = [] self.__size = 0 ...
If I'm working in a 2D environment and have hundreds of objects, brute force collision-checking would be out of the question, but would my method below work? For example, let's say I have a std::vector<GameObj*> objectsVector to hold all objects and a std::multimap<Point2D, GameObj*> objectsMap (basically a map which...
This is the pattern I've been using for "if the variable is empty, set a default value", and for variables like $muffin, it has all seemed well and good. But in the following real example, this pattern gives me a super long line which smells a bit to me. Is there a cleaner way to do this? $newsItems[0]['image_url']= ...
I have got a an object that has values true and false for certain keys.I need to find which keys has got a boolean value and convert them to 1 and 0 respectively.Please find the code below.I wanted to check for keys in an object that has got boolean values and then convert them to numbers.Im a noob in Javascript and i...
I have an array of points: Point[] line; // { Point(1,1), Point(2,3), Point(1,1) } Assuming Point has the relevant operators, what's the most linq-y way of computing the length of this line? My best effort so far is: float length = Enumerable.Range(0, line.Length-2) .Select(pointIndex => (line[pointIndex+1] - lin...
I am trying to hide and show tooltips depending on what element is hovered over. This works as expected and I could continue to rinse and repeat. However, I am wondering if there is a good way to simplify this or make it more compact. Also I was assuming I could use .hover(), but that didn't seem to work for me. So in...
Right now in my weather app, I have one section of code in my View Controllers to set up the condition image and the background image. It has about 400 lines of if-else statement at the end. The app's performance is fine, but is it bad to have this? Would it be something that, say, Apple would consider rejecting? The c...
This is my feed parser method using feedzirra. It works, but I feel dirty because I can't figure out how to improve this code. Any suggestions? class Feed < ActiveRecord::Base attr_accessible :name, :summary, :url, :published_at, :guid def self.update_from_feed feed_urls = ["url1", "url2", "ulr3", "url4"] ...
I want to insert parameters dynamically to statements at sqlite. I now write as follows: tx.executeSql('SELECT Data from Table Where something = "'+ anyvariable+ '"',[],successFn, errorCB); But I guess there is a better (cleaner) method to do it.. Any ideas?
I've written a simple scraper that parses HTML using BeautifulSoup and collects the data (schedule of sports events), then clubs them together in a list of dicts. The code works just fine, but the way I process the data is pretty horrible IMO. I use an if...else to parse the data selectively, because the output of the ...
I'm quite new to JavaScript and wrote this clone method to be able to clone any kind of object. It works quite well for the cases I've tested until now, but for JSON objects it seemed kind of slow to me. I'm sure there is some additional speed to to squeeze out and a lot of overall improvement to make. But I don't know...
I have multiple drop down lists (select & option) that are populated by data from the server. They all have the same options, but I need the use to be able to select every option only once - it can appear as selected only on one list. This is the HTML of a single list - simple select & options list: <div class="social-...
Can this be improved? static int find(string term, string text) { int found = -1; int termIndex = 0; for (int textIndex = 0; textIndex < text.Length; textIndex++) { if (term[termIndex] == text[textIndex]) { if (termIndex == term.Length-1) ...
I'm new to LINQ, but I have some background in T-SQL. I know there are probably 100 different ways to design a T-SQL statement that would run this much more efficiently, but I'm not sure how I would do it in LINQ and I would like to stick with LINQ. This works perfectly well, I just hate the way it looks and am unsure...
I have written a templated singleton class in C++ but I am afraid that it is not properly destroyed. Can you advise me on that ? my singleton.h #ifndef SINGLETON_H #define SINGLETON_H template <typename T> class Singleton { public: static T& Instance(); protected: virtual ~Singleton(); inline explicit Si...
I'm new in PHP, MySQL and OOP, so I tried to write a small project to learn things better. The Pponebook should contains contacts which can be edited, deleted, added, sorted and it has pagination, too. Search is also available. This is my first project in PHP and I am using OOP for the first time, so I am sure that my ...
I'm hoping that you kind people could cast an eye over my code and let me know what you think... Have I missed something obvious? Are there any possible race conditions? Is there an entirely different and/or better way to do this? Good and bad, everything is appreciated! So, I have to produce and consume lots of someth...
I've decided to do this by writing a simple word counter. The app gets all the params and outputs all the unique words, each one with a counter: "Hello world Hello" would return "Hello: 2", "world: 1" (not taking in consideration the actual output structure) This program is the Python equivalent of: import sys from co...
I have my own PHP MVC framework that I'm iteratively developing (i.e. adding a feature when I have the time). I'm trying to keep it to the best practices I can, while still adding the most in terms of functionality. The latest addition I've implemented is lazy loading for my model properties. I've gone, you could say, ...
The below code is real and in use, but I've modified it to simplify the process/make it easier to explain. The purpose of this code is to combine data from multiple data sources. All sources are .xls files, but the names will vary based on the date of creation, and the formatting can vary based on the user. Because t...