instruction
stringlengths
71
71.9k
Progress class was written using TDD. Interface of this class (pseudo-code): class Progress constructor(title, progressLength) getTitle() : String getLength() : int getCompletedSteps() : List<Integer> getCompleted() : int getUncompleted() : int Please criticize from the following perspectives: ...
Needed a quick stream to get JSON objects. #ifndef THORSANVIL_SIMPLE_STREAM_THOR_STREAM_H #define THORSANVIL_SIMPLE_STREAM_THOR_STREAM_H #include <istream> #include <mutex> #include <condition_variable> #include <vector> #include <curl/curl.h> #include <string.h> namespace ThorsAnvil { namespace Stream { ext...
Project Euler problem 82 asks: Here's my solution: def main(): matrix = [ [131, 673, 234, 103, 18], [201, 96, 342, 965, 150], [630, 803, 746, 422, 111], [537, 699, 497, 121, 956], [805, 732, 524, 37, 331] ] size = len(matrix) best = [matrix[row][0] for ro...
I consider myself a beginner at writing in Java. I have never had a programming class, nor had my code reviewed. I have come to Code Review for some pointers. (Tips that is, not data references.). I have written a simple server/client set, where the server behaves as a textual message relay, receiving and forwarding te...
I wonder if my script is all right. Please review my code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Menu</title> <style> ul {list-style-type:none; margin:0; padding:0;} li {display:inline;} a.active {background:red;} </style> </head> <body> <ul> <li><a href="http://www.example.com/home">Home</a></li>...
I am still fairly green when it comes to SQL joins. The below code works but I want to check that I am doing it the best way before I copy and paste errors into other work in the future. The idea of the below code is to get the PropertyID and Name of a property from the first Table and using the PropertyID join them. I...
I've created this code which can call functions/ajax requests or pieces of code sequentially, using jQuery. The code not only can call functions/ajax requests or pieces of code sequentially but it also tracks when those calls fail or succeed and when the code fails it stops and doesn't exectue the rest of the queue. (B...
Today, I will require your help to improve an iterator adapter. The goal of the adapter (I called it get_iterator) is to adapt std::map iterators for example: map iterators return std::pair instances, a get_iterator<0, std::map<...>::iterator> will provide an iterator which iterates through the keys while a get_iterato...
I wrote the following piece of Python as a part of a larger system. Profiling reveals that a large amount of time is spent in DocumentFeature.from_string. So far I've tried compiling the unmodified code with Cython and got a 33% improvement in running time. Any suggestions as to how this code can be improved further ar...
The following code is to enlarge pictures using bilinear interpolation. What can be modified in the function of slow_rescale to make it more efficient? I expect to modify it from the view of Principles of Computer Organization. unsigned char *slow_rescale(unsigned char *src, int src_x, int src_y, int dest_x, int dest...
I'm developing a site, which has an image upload section, and members and like the image, but a member can like it only once. I have a table, named uploads which has columns id, ...{more columns}..., like. I identify members by a token(a 16 digit number) Now, when a user likes an image, the code executed is: public fun...
I've just started writing my own little templating library in JavaScript, because as I went through others, there is always this voice in head, which says: "Oh, this is a lot of code and functionality. Is that really necessary or would it slow down the performance?" If you are able to follow conventions, you would prob...
Here is a python function I wrote to implement the Newton method for optimization for the case where you are trying to optimize a function that takes a vector input and gives a scalar output. I use numdifftools to approximate the hessian and the gradient of the given function then perform the newton method iteration. ...
In a current javascript project, I'm working with the browsers localStorage, and it will pretty consistently be full. To overcome this, I wrote a wrapper to surround the localStorage object that would keep track of when an object was added. The hard(er) part, was coming up with the algorithm to make room for any new da...
I have some code that I wrote almost a year ago exactly (1/9/2013) and I would like to know if I wrote it well or if it can be improved. I don't have any fun input or output, as these are not set results coming out of this column in the table. -- ============================================= -- Author: Malachi (Name C...
The aim of the code below is to see if selected fields are empty so data can be saved in that field. Since I'm making a library system, I wanted to record the basic info on one record (all the books they have taken out so the ID's of them as well as author and title) but this proves to be quite tricky and quite long to...
I would especially like to find out how this project should be constructed to be "fully MVVM". I did some reading about MVVM and I started to implement some ideas, but I don't fully understand it yet. The game works, but I would like to get some advice regarding what could be done better/differently. Does it make sens...
This is only my third Python script. Be brutal with me. Any tips, tricks, best practices, or better usages would be great! import socket from concurrent.futures import ThreadPoolExecutor THREADS = 512 CONNECTION_TIMEOUT = 1 def ping(host, port, results = None): try: socket.socket().connect((host, port))...
I'm not familiar with Java at all, so I'd like to get some feedback on this piece of code. I made it by looking at a few Hello World-esque Java server examples, so it may have drawbacks I'm not aware of. My task was turning an existing Java console app into a single-threaded server listening on some port. Each connec...
This is the domain class called WordType which has Id as its unique DB generated value and Name and Description as other values. I was going through the Effective Java resource by Joshua Bloch and having a tough time assimilating the entire contents the first time. So I am looking at the implementation in my code by so...
The review I asked for yesterday was for a header only library. Stream that opens an HTTP GET and then acts like a normal C++ istream This has some limitations as it downloads all the data as part of the constructor. This can lead to delays during start up if the file is large (usually during REST communications the si...
I've built a framework that primarily provides automated Ajax and a way to emulate classes. I've pasted the framework below and I hope it is well-commented. klass() and machine() are the interesting methods. I've also posted some application code so you have some idea of how it used. I'm looking for general feedback o...
I have never really had to use Json.net until now, so I'm very rusty at it. For that reason, I would appreciate it if someone could have a look over my code and let me know if the way I have done it is correct. It works as I want it; I just need a more professional eye. For the class TravelAdvice, I've used http://jso...
I have designed a PySide interface for the 3D rendering software package Maya whose purpose is to take a file with animation on a single stream and break it up and export each range of animation. I'm pretty new to PySide and would like just a general overview (or harsh critique) of what I could do to improve the qualit...
In the Java world while writing the data access layer (for CRUD) and the model layer, I have done something like this: public abstract class AbstractDao<N extends AbstractModel>{ protected Class<N> persistentClass; public N findById(String id){ return (N)mongoOperation.findById(id, pers...
Introduction I am designing a website as a hobby. As you can probably tell from the code below, I am an absolute beginner. The first thing I'd like to do is to create a nice webpage template that I can use for every page. This is what I have so far (I've added background-colors to the divs just for visability): HTML...
I'm working on a simple game in which I need to track the cardinal direction of an object. I experimented with using the enum's ordinal value, as well as using switches for the rotation, but both seemed wrong. This is what I ended up with. Is the following an adequate solution? // Defines cardinal direction public enum...
This is a simple brute force algorithm that I have programmed in C. All the program does is print out every possible combination of the given alphabet for the given length. I would prefer suggestions on how to improve the algorithm, or decrease run-time. Any other suggestions are acceptable though. #include <stdio.h>...
I have a string util method for finding potential "wrapping points" in a string. For example, if " " and "-" are considered wrapping chars, then for input string "Antoni Gil-Bao" the method would return the sorted set [6, 10]. private static final String WRAPPING_CHARS = " -"; private static final CharMatcher WRAP_CHAR...
I'm attempting to write a Progress Dialog that I can instantiate, show and then pass a task to complete to. I'm pretty new to Task Based Patterns, so please bear with me. Ideally my goal is to be able to show the progress of a task in a popup window, similar to the VS "Background Operation in Progress" dialog that you ...
I am working on an ASP.NET MVC 5 project, using the code-first approach for database design. I have a question about my code design. I have an Entity in my database schema called Student: public partial class Student { public int Id { get; set; } public string RollNumber { get; set; } public string Name { get; se...
I have written a method for removing a link from a linked list for a phonebook project I'm currently working on and it works perfectly. However, I want to know whether or not my code is acceptable from a programmer's perspective. I tried to systematically structure it in a way such that it's understandable, but by doin...
I am currently in a challenge with my buddy to see who can code a simple paint program in the least lines. The only requirement, is that the program must include an eraser. How can I possibly shorten this code, while still using proper, beautiful syntax? import sys, pygame from pygame.locals import * pygame.init() #Sta...
After reading this article about Neural Networks I was inspired to write my own implementation that allows for more than one hidden layer. I am interested in how to make this code more idiomatic - for example I read somewhere that in Clojure you should rarely need to use the for macro (not sure if this is true or not)...
About a year ago when I was applying to jobs for the first time, I had an interview at a company and they posed the following problem to me, which I preceded to bomb. A year later I actually came up with a solution to the problem, and I couldn't be happier. However, I would love for some critiques as to the design of ...
I just created a sample project using Spring 3.x, Jetty 9.x, GWT 2.5.1 and Gradle here. It's a slightly modified version of the 'Greeting' GWT application from Google, the only change being that RPC calls are handled by a spring controller. It would be really great if someone can review it, I am particularly apprehens...
Say you have a Python class for something that has an optional gender field. You'd like a helper property/method to get the appropriate pronoun for an instance. You'd also like to be able to get the possessive version of the pronoun. The use for these helpers will be in creating human-readable emails and other such mes...
I'm learning JS/jQuery at the moment and have built the following standalone script but I feel that it can probably be improved in some ways? For example - is there a better way of switching the selected text on the .dropdown-menu li a click event rather than needing to replace the entire HTML? Constructive advice welc...
Moved to Code Review as per comments received on https://stackoverflow.com/questions/20907502/can-this-while-loop-be-made-cleaner Is there a way to make the following while loop a little more optimized? What bugs me in particular is the fact that I have to repeat code (closing buffers and returning a value) both inside...
How will this example affect the using implementation in GetSite? public abstract class SPSiteBase { protected abstract string Url { get; set; } public abstract SPSite GetSite(string url = null); } public class SPSiteFactory : SPSiteBase { protected override sealed string Url { get; set; } public ove...
I have a Dictionary<string, object> (named tableDict) that has been parsed from JSON. The string describes the intended construction of a class T which is defined within the housing class of this code. The object is the numerical probability value that pairs up with the generated reference of T. The string can be in ei...
I'm attempting to create a final array with data pulled from 3 functions. The first two functions have all the data but then the 3rd function needs to run looping through one of the fields from function 2 in order to have the complete array at the end. I'm looking for some advice and examples on how to fix this and or ...
I am not really having any problems with this. I'm just wondering if anybody has any ideas for a path for me to look down for bettering this little FF turn-based style of game in my free time. I know somebody is going to complain about my global variables and the fact that I am not using object-oriented programming, b...
I am working on a website and I've created four text/image news blocks. I am not sure if it's the right / most efficient way to do this. See my code here at jsfiddle HTML: <div id="wrapper"> <div id="header"> <div id="logo"> <a href="index.html"><img src="img/logo.png" alt="logo"></a> <...
I was reading about opaque pointers and decided to try it with queues. Please review my code and let me know if there are any errors and how to improve code quality and performance. It uses lines to enqueue and dequeue. All lines have fixed sizes and dequeue/enqueue never share a line. New lines are added only when all...
I have an application that essentially "pings" all of the servers on my network. I have about 100 servers, and this ping will happen every 10 seconds. public class HealthChecker { private static List<InetSocketAddress> servers = new ArrayList<InetSocketAddress>(); public static void main(String[] args){ // not...
I was hoping to get some general feedback and thoughts about my implementation of a generic priority queue. Please feel free to be as critical as you want or see fit. Generic priority queue implementation (please note that the PriorityConvention can be None, HighestPriorityInFront, LowestPriorityInFront): using System...
I asked this question yesterday, and now I have come up with this code: stock.h #ifndef stock_stock_h #define stock_stock_h #include <iostream> class stock { public: stock() { itemName = " "; unitPrice = " "; quantityPurchased = " "; day = " "; month = " "; year =...
I just submitted this pull request to statsmodels (a Python toolkit for statistical and econometric modeling). It adds support for exponential smoothing of time series. I have only been programming for a few months. I am not very good with Numpy, and just learning classes and decorators, so any help would be appreciate...
I am implementing a library in C/C++11 and I have chosen to follow Google C++ Style Guide as I also use this style guide in my code. As such all classes and types (including typedefs and using) start with a capital letter. However I have reached a conflict when implementing some traits. For instance I have a RemoveOpti...
I'm doing a CodingBat exercise and would like to learn to write code in the most efficient way. On this exercise, I was just wondering if there's a shorter way to write this code. monkeyTrouble(true, true) → true monkeyTrouble(false, false) → true monkeyTrouble(true, false) → false public boolean monkeyTrouble(boolean...
I have JSON files of size data_large(150.1mb). The content inside the file is of type [{"score": 68},{"score": 78}]. I need to find the list of unique scores from each file. This is what I'm doing: import ijson # since JSON file is large, hence making use of ijson f = open ('data_large') content = ijson.items(f, 'it...
I'm pretty new to C++. I'm trying to design a EntityManager system, and so far this is what I have: #ifndef ENTITY_MANAGER #define ENTITY_MANAGER #include "Entity.h" #include "Airplane.h" #include "Runway.h" #include "Customer.h" #include <unordered_map> class EntityManager { private: typedef std::unordered_map<...
I wrote a function to calculate the gamma coefficient of a clustering. The bottleneck is the comparison of values from dist_withing to dist_between. To speed this up, I tried to adapt and compile it using Cython (I dealt with C only few times). But I don't know, how to rapidly iterate over numpy arrays or if its possib...
Is there any way I can cut down on code? I'm new to this. Sub addtest() Dim decision As Char Dim fullline As String = " " Dim word(9), def(9), minorerror1(49), minorerror2(49), minorerror3(49), minorerror4(49), minorerror5(49) As String Console.Clear() Console.WriteLine("Please select the year o...
I wrote a helper to limit Q promise concurrency. If I have a promise-returning function promiseSomething, writing promiseSomething = PromiseScheduler.limitConcurrency(promiseSomething, 5); ensures no more than 5 promises are pending at the same time. I'm coming to JS from .NET world, and I welcome critique of this cod...
This is a game I made in Python. While it is not my first, I am not happy with the result. I would like suggestions on ways I can make it better, more user-friendly, and more enjoyable. Also, if you have suggestions on how to get the same effect, but with cleaner, more organized code, please make them. Please feel f...
For my junior high, IT final project, I decided to make a C++ program which functions as a simple library manager. The functions of the manager are to check your own library, view the store's library and buy from it, and check your transaction history. I made separate arrays for each of the three above, and use it as ...
I'm designing in my spare time a game engine (for fun, not so much for profit, haha). I wanted to design the 'core pipeline' as efficiently as possible. Having a quad-core CPU, I decided to take advantage of parallel processing. I wanted to implement a lock-free algorithm (or at least, low-locking) to make the pipeline...
I wrote this code to handle a fixed number of priority levels. I believe performance will depend on the number of priority levels. Considering only a few levels (3 to 5), is there a more efficient way of doing this? I would also like to know how to improve code quality. I'm just storing the elements in separate queues ...
I have the following scenario: class Product < ActiveRecord::Base belongs_to :categories end class Category < ActiveRecord::Base has_many :products end Categories table has 2 level nesting, for example. Main category is 'Men', sub-category is 'Accessories' and sub-sub-category is '...
I'm creating a custom MembershipProvider for an ASP.NET MVC5 application and am wanting to know if this code is acceptable for creating hashed and salted passwords. Is there anything I can do to improve it? EncodePassword is passed the plaintext password from the override functions. I picked 38 hash iterations arbitr...
I am working on a website, and due to some reasons, they want my code to be as short as possible. I have, from my side, tried everything to shorten this code. So if possible, can you all also help me in making this code shorter? I know that there are vulnerabilities, and I will solve them later. For now, just help me ...
This JavaScript converts degrees to a compass point, e.g. convert.toCompass(140) gets 140° -> SE. I can't help but think: is there a more concise way to do this? var convert = { toCompass: function(degrees) { if(degrees >= 0 && degrees <= 11.25) { return 'N'; } else ...
A few years ago I required a lightweight in-app-in-memory cache. Requirements: Time complexity O(1) for individual element read/write access Space complexity O(n) (for n elements) Safe for concurrent read/write access Cache size limited by fixed number of entries or max age of entries Before you ask: The code was wr...
I am doing a web app for an event company whereby customer can access the website for a self-help instant quotation. Customer will choose the type of event, fill a form and expect an instant quotation. Can anyone give me some tips how can I improve my design? Below are my current design thoughts. Quotation class: publi...
Tom Sawyer has many friends who paints his fence. Each friend painted contiguous part of the fence. Some planks could stay unpainted, some could be painted several times. Program must output the number of painted planks. Input format: First line: N smaller than 100000 - number of Tom Sawyer's friends. N lines (f...
Is the below code efficient for parsing the file, or do I face performance issues? If the latter, please offer suggestions. #include <iostream> #include <fstream> #include <map> using namespace std; ofstream outfile; void writedata(string data, string file) { outfile.open(file.c_str(), ios::app); outfile << d...
I am still a beginner in C++ and I am always curious about good/best coding methods. Let's say I have a program which allows a users to edit the salary of a employee. The system will prompt the user which to key in a employee's name first. The system will then check whether or not the username exist. If the username e...
I have written a Tic-Tac-Toe game. I have a class called GameEndAnalyzer that will check if the game has already ended or not. Would it violate the Single Responsibility Principle if I will add more responsibilities to this class to not only decide if someone has won the game, but who has won (X or O)? What is the be...
Some time ago I wrote a little property class for a then abandoned project. I just stumbled over it again and I would like to know if the design is using good, efficient C++. #pragma once #ifndef NO_THREAD_SAFETY #include <atomic> #endif template<typename T1> class Property { public: #ifndef NO_THREAD_SAFETY typ...
I'm trying to learning JS good practices. With jQuery, everything was easier and organized. With JS, I really don't know if I doing this right. I must repeat the element I am manipulating all the time? For example: elementHere.className = ""; elementHere.classList.add(test); elementHere.addEventListener(etc, function()...
I've built a small library that I use to boot or start a web application. The library code has been posted below, as well an example of application code. I'm looking for ways to make the code more concise or "tighter". If there's anything I can do to make the comments better, let me know. Library Code /**************...
I have written my first jQuery plugin for a website. It is, essentially, a Fancybox style popup that uses AJAX to load content from other pages. It's kind of a frankenstein build from multiple tutorials and best guess uses of the jQuery API. It works, but I am looking to refine it further. As this is my first major ste...
I have some data in a .csv file, which looks roughly like this: [fragment1, peptide1, gene1, replicate1, replicate2, replicate3] [fragment1, peptide2, gene1, replicate1, replicate2, replicate3] [fragment2, peptide1, gene2, replicate1, replicate2, replicate3] [fragment2, peptide2, gene2, replicate1, replicate2, replicat...
Is my below merge sort implementation in O(n log n)? I am trying to implement a solution to find k-th largest element in a given integer list with duplicates with O(N*log(N)) average time complexity in Big-O notation, where N is the number of elements in the list. public class FindLargest { public static void ...
Both Cities and Positions are associated to Jobs through a has_many :through relationship. On the Jobs#Index page, I have a form, which when submitted allows a user to filter jobs based on a combination of city and positions. I got this to work, but know the code can be a lot better. This is my Jobs#Index controller: ...
I'm trying to learn basic algorithms which are typically taught in an introduction to CS course, which is usually taught in a compiled language like Java. However, I want to focus on JavaScript, so I wrote the algorithms in JavaScript and encapsulated them into a library. I'm looking for feedback on the efficiency of ...
Another try at this problem in LISP. This time rather than generating every possible row combination for the melody I tried to calculate the best combination directly. Unfortunately there's a problem - the output is a messy list full of vectors and single values. Is there a good way to concatenate vectors together with...
I'm writing a small library to do some image-processing on GPU for WinRT, however, I'm not sure if such design breaks SRP. One class loads and saves image, renders and maintains filters - isn't it too much? Code public class FilteredImageProvider : IDisposable { public event Action ImageSourceChangedEvent; GPUI...
I develop a small game using C# and need A* in it. For that, I need a PriorityQueue, which .NET does not have. I wanted to make my own one for practice. Here is it, please comment on performance and usability: public class PriorityQueue<T> : IEnumerable { List<T> items; List<int> priorities; public Priorit...
As a learning exercise I wrote a short C program that changes the instructions of a function at runtime in order to execute a shell. It's obviously dependent on x86_64 architecture and Linux (for the syscall number). Indeed, it does start a shell when I run it. I was told to post it here by someone on StackOverflow so ...
I wrote a program that finds empty folders and subfolders in a directory. It's the first program I've ever written in Java, and I'd like some critique. I feel like I'm not utilizing classes in a very coherent manner. Also, I think I'm naming variables poorly, because as I write my program I find myself constantly havin...
My question is regarding a rather inelegant solution to a problem that I came up with a while ago. I was making a Winform Application to access active directory among other things and needed to thread my application to stop my UI from freezing. Although I have little knowledge of actual threading (I kept hitting cross...
I am using the following function to check if a MySQL connection is in an invalid state or if it has reached a predefined maximum operation count: /// <summary> /// Holds the amount of operations for the currently mysql-connection open /// </summary> private int connectionUsageCount = 0; /// <summary> /// The ma...
I have some Scala code that uses Internet to authorize a user. Therefore, it can throw Exceptions like IOException in the method. The original code was written in Java. So, yes, it uses variables, not val. Also it "returns early" many times if some condition is not satisfied. The following is an example. (The actual co...
By outer-package, I mean outside of this package - this can be the DOM or other packages. This package has a basic event system and a basic registry. It also has a debugger which allows you to fiddle with the DOM by removing and adding entire sets of tags. Later it might have things which allow it to Debug / Config...
Compare to underscorejs if it pleases you. Once again, I hope this is well commented. Please let me know what comments/improvements I can add. Please review all aspects of this code. /*************************************************************************************************** **UTILITY - additional coverage f...
Can this be improved? foreach (Gift gift in usedGifts) { foreach (GiftTransaction GiftTransaction in gift.GiftTransactions) { if (!string.IsNullOrEmpty(giftTransaction.GiftId) && !orderList.Where(b => b.GiftId == giftTransaction.GiftId).Any()) { Order order = OrderHelper....
I recently had the need of "reflecting" multiple enum class constructs in order to get their elements' names as std::string objects or their element count. I came up with a C++11 variadic macro solution: namespace ssvu { namespace Internal { inline std::vector<std::string> getSplittedEnumVarArgs(const s...
I have been trying to solve Project Euler problem number 35. The problem is to find: How many circular primes are there below one million? A circular prime is a prime where all the rotations of its digits are primes too. E.g. 197 is a circular prime as 197, 971, and 719 are all primes too. Initially I was "brute-forc...
For a few reasons I had to use EJS on a specific page in my Express project. This was previously like 13 lines of code with MustacheJS and a small JSON file. But now that it is hard-coded, it is a monstrous 289 lines of code (not counting lines in the includes). What can I do here? <!doctype html> <html class="no-js"...
I've written this ActionResult to model an Order that goes through. I couldn't think of another way to write this without using context Db<Sets>. It runs kinda slow, taking around 4 seconds to complete. Is there way to optimize the code or is this kinda has to happen since I'm doing so many inserts? public ActionResult...
I've just completed the 3rd task of the 1st assignment offered by Stanford's programming methodologies (see the full resources for it here too). I just need some helpful feedback on how my code can be better (decomposition-wise) and whether or not my code is comprehensible and readable. I'm also unsure about the pre-co...
I am modifying Volley for Android a bit and Findbugs complains about the data flow and I am a bit lost. First the code: String userAgent; try { String packageName = getPackageName(); PackageInfo info = getPackageManager().getPackageInfo(packageName, 0); userAgent = packageName + "/" + info.versionCode; // D...
What could be a better implementation, following the Scala way of doing it? class Node(itemValue: Object, nextItem:Node){ val value = itemValue val next = nextItem } class MyList() { var start: Node =null def add(value:Object){ val cache = start this.start = new Node(value,cache) } def print:Unit...
I want to import in python some ascii file ( from tecplot, software for cfd post processing). Rules for those files are (at least, for those that I need to import): -The file is divided in several section -Each section has two lines as header like: VARIABLES = "x" "y" "z" "ro" "rovx" "rovy" "rovz" "roE" "M" "p" "Pi" "...
I made Conway's Game of Life in JavaScript and was hoping someone could give me some pointers regarding my logic of checking adjacent cells. I know there must be a better way, but at the same time, it works. JS: var board = [["","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""], ...
I have created a small 'game' which basically asks the user for the row number and column number and then picks a random number and if that number is above 11, out of 15, the user wins. When the user wins that position in the array is replaced with a X or O to indicate a win or loss. The program works fine. As it is m...
I have a year or so of experience in developing in Java. I submitted the solution for this task, but never got the feedback that was promised. Since I still would like to get a feedback on my solution, I figured that here I will find skilled developers who wish to help me and others who may have similar questions. Com...