instruction
stringlengths
71
95.1k
I have been trying to figure out what is the best performance wise and also best practice to get data from a dict using Python. I currently have a data that looks like this: data = { "cart": { "id": 123456, "currency": "GBP", "name": None, "rows": [ { "id"...
I have the following code: def start_threads(self): thread_pool = [] for obj in self._objs_list: thread = threading.Thread(target=self._do_task, args=(obj,)) thread_pool.append(thread) thread.start() for thread in thread_pool: thread.join() self._do_final_task() _do_tas...
Description I am trying to implement a robust, multi-threaded producer-consumer model with a single producer in the main thread and several consumers in other threads. The generator thread loops over data, recognizes through some condition which sort of data it is dealing with, and proceeds to delegate the sample to th...
I am reading data out of some large (~2GB each) binary files; these have a well defined structure: - Header (info about the next chunk of data) - Chunk of data (any type) - Repeat I am using the following function to extract data from the files: template<class T> std::vector<T> getFromBin(std::ifstream& ifs, int num);...
I'm using React Native to implement Conway's Game of Life as a mobile phone app. So far I've implemented the game logic and a main screen with an embedded GLView component where the game board is rendered, as well as buttons for moving the camera. The touch screen system to allow users to set the initial board state ...
I've seen something similar and have been trying to refactor the JS. I have two columns of content, which when scrolled move in opposite directions. This should also loop continuously. The fundamentals of this are working but I'm not sure if it's massively over engineered? Or if the JS could be better so ensure a smoot...
Recently started to learn Java. I have created a few little things in Java already, but before I will start doing anything more serious I would like to know your opinion about my style. Any conventions I don't follow? (trying to follow all of them, but I don't know everything yet). Anything that doesn't look right? I...
How can I improve this so that it follows all the best practices? #include <iostream> int main() { std::string userInput{ " " }; std::cin >> userInput; if( int( userInput[ 0 ] ) > 96 && int( userInput[ 0 ] ) < 123 ) { userInput[ 0 ] = char( int( userInput[ 0 ] ) - 32 ); } std::cout << userInput << "...
I'm a beginner and came up with this simple project in C++. Any feedback would be very much appreciated. GitHub Repo Note: I'm using a file called "db.txt" as a database. main.cpp #include "Library.h" #include <iostream> #include <vector> #include <algorithm> #include <fstream> int main() { Library::init(); //init...
This program tests all links (URLs) in all pages of a website. Testing a link (URL) means that the link (URL) is downloaded. If the download is successful then a success message is printed for that link (URL) starting with "Success: ". If the download fails (server returns error, etc.) then a failure message is printed...
In my asp.net web API 2, I am reading values from web.config from the controller into my DTO as a response to the client. It is working as expected, I wonder if there are any improvements to make it better. Should I read it from a database or elsewhere? So I would be glad if you can share your comments. Here is the con...
I am writing a small micro-service in typescript with NestJS. This microservice is responsible of giving a user access to one of our company's systems trial access. At first I used hubspot integration to add new contacts and send emails, but then I ended up using SendGrid. Both of these services can do almost the same ...
I'll put my complete code below so that anyone who can help won't have any difficulty running, just copy it and it's 100% functional, just very very slow. To register the data I need, I make several requests on different API links, a tangle of calls. This makes it very slow and takes forever to parse each of the ID's. ...
I started scripting a 2 weeks ago and wrote a script which checks every sub directory until a certain level for the largest files. My question would be if I'm using the getopts correctly and/or if I could improve the script in general I'm using a getopt function for the specify options like: c = part of the start dire...
I've written a script to aid in creating new watchfaces for the awesome AsteroidOS project. A watchface there typically consists of directory structure like this: digital-shifted/ └── usr └── share ├── asteroid-launcher │   ├── watchface-img │   │   ├── asteroid-logo.svg │   │   ├──...
A very simple stopwatch. Intended to be used for simple benchmarking when you want to do a task several times, but exclude some setup code from the benchmarking. Some things I have already considered: Using the restrict keyword. I think it's overkill for this simple project. Adding error checking in case you start a ...
I am trying to assign a 0 or 1 with some stochasticity based on another column in a data frame (outcome). If outcome == 1, the new column exposure should equal 1 about 90% of the time. Conversely if outcome == 0 it should equal 1 about 20% of the time. I am currently doing this with a for loop but wondering if there ar...
I have this controller method to add a course and it works fine but I really don't like this code because I think it's too large and a little bit ugly I was trying to do it cleaner and a little bit shorter, But don't have knowledge to do that so can anyone please help me with this code? public function storeCourse(R...
Inspired by a blog I read, I made a LazyList class that can wrap an iterable (list, generator etc.) and turn it into a MutableSequence (like list). This is great for when you both need to generate results lazily and cache them once generated. In my use case, a library I'm using expects input as a list/mutable sequence...
The following code solves day 10 in the advent of code challenge. The goal for this time around is evaluating whether a line of brackets is complete, has a syntax error or is missing some closing brackets. Examples of valid pair of brackets () [] ([]) {()()()} <([{}])> [<>({}){}[([])<>]] (((((((((()))))))))) Example ...
so I've made a simple program meant to increase and decrease numbers, then save those numbers, basically a rubbish stock taking app, I want to make one I can use and well it's usable I'd say the code isn't refined enough to take it from this little program to a bigger better one. I want to make one because I want to pr...
I've written this code in Haskell to convert a number into its written form. It feels ok but at the same time I feel like it can probably be improved on a lot. I would appreciate help in improving it. nums :: Int -> String nums x = case x of 0 -> "zero" 1 -> "one" 2 -> "two" 3 -> "three" 4 -> "four"...
I have written code for a budget calculate program. Here is the problem : Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompts the user to enter each of his or her expenses for the month and keep a running total. When the loop finishes, the program ...
I've been learning how to design responsive webpages. I got done the basics and can create code that closely resembles the design, but I was wondering what are the best practices in web development when it comes to the following points: What units in CSS are considered best practices when developing webpages ? I try t...
I've got the following classes: BaseWidget, ActiveWidget, and DetachedWidget. Both derived classes use resources provided by BaseWidget: vector and int. The current so-called "state" (represented by each derived class) is stored in Context as a unique ptr to base class. Imagine that Context is like an entry point for t...
I am pretty new to Javascript and trying to make a really simple tabs element which is just hiding and showing sections depending on which button is clicked. I know that this is a terrible way of writing this, as there is so much repetition, how do I make this code cleaner? (It has to be either Vanilla JS or JQuery as ...
I've made a little library where I add some functionalities from time to time that I miss in the Java standard library. I am sad that the Java library for example has no stop watch class that allows me to measure time without the need to deal with details of a time library. When I write library functionalities, I have ...
I wrote the following Rust code for euler project problem 11. It works and a small test is included, but I am not very happy about the code. At first I wanted to chain together iterators for all the lines that need to be checked, but I could not make that work: // FIXME: this doesn't work, so learn more Rust to DRY // ...
I have written a program in C++ that processes financial bond mathematics, making extensive use of the valarray class, so that mathematical functions and operations can be applied vectorially on whole arrays in just one expression, instead of having to resort to a loop over all elements. This is similar to how numeric ...
I am working with this assignment of optimizing a radix sort code in C++ and I need to reduce the execution time. My code is working and it looks like this: void RadixSort::RadixSortNaive(std::vector<long> &Arr) { long Max_Value = findMax(Arr); int Max_Radix = 1; while (1) { if (Max_Radix >= Max_Value) break; ...
I'm trying to reduce the boilerplate of a lot of header-only classes I'm using. Each of these classes must go through a registration step. I want this step to be defined in the same file as the class definition. I came to the following solution (-std=c++17 required): #include <iostream> #include <typeinfo> template<ty...
I wrote a little program in C based on some requirements: Ping every IP from a file and check the result Show, by network adapter, ONLY the IP, subnet, default gateway and DNS Check the speed between two pings. #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_LEN 256 void readAndPing(char* pat...
method name: public static boolean ascendingNum(int n) method need to be done by recursion and return if the given number is in ascending order from right to left public static boolean ascendingNum(int n) { ///123456 true // 987654 true // 123455 false if(n > 9 && n < 100) if(n / 10 < n % 10) return true; else ...
I'm a self taught hobbyist programmer, for what it's worth. My latest project is a JavaScript based choose your own adventure game using Twine (Tweego) as the framework. If you're not familiar with Twine, I don't believe it will hinder your understanding. I'll outline the issue in relation to they framework. As requir...
there's a function in one of the scripts I've been working on that I really want to improve. Disclaimer: Being honest, I'm not really very good at programming but I've been learning day to day and it's slowly working in the direction of improvements. Also, the code will assume you ran import sys import warnings warning...
This question is the aftermath of this other in which I'm asking for recommendations improving the space of combinations generated from a set of parameters, bounds, and conditions (calculations involving time-expensive math). In this case, assuming the latter is improved, I want to make this other part of the code more...
React beginner here. I'm practicing state and hooks, and I wanted to create a small app that every two seconds fetches an image URL from a service (that returns random images) and shows the returned image. The idea is to make it simple and readable. Do you have any suggestions? import React, { useState, useEffect } fro...
I need to check if a variable is not: '', [], null, false But check must pass if variable is 0, 0.0, '0', [0], ['0'] At this time, I came up with this: function is_empty($item){ if(!isset($item)) return true; // null if(is_string($item)){ $s = trim($item); if($s != '0' && empty($s)) return true; // empty s...
This is a follow-up post to the topic discussed here. Description I am trying to implement a robust, multi-threaded producer-consumer model with a single producer in the main thread and several consumers in other threads. After researching the topic, I also added a copy constructor and an assignment operator (or better...
I am a new coder and have seen people on Stack discuss why eval use is not recommended. In the following code, we have been given a set of dictionaries with the marks of the students, we take the student name as an input and provide the output as per the formula given (the formula for the calculation of marks). # 1. J...
You can read about the algorithm here. An exponential backoff algorithm retries requests exponentially, increasing the waiting time between retries up to a maximum backoff time. An example is: Make a request to Cloud Storage. If the request fails, wait 1 + random_number_milliseconds seconds and retry the request. If ...
I'm still a beginner in python and made this simple program to practice OOP, I've ended up using the self keyword a lot and I'm not sure if this is normal or if I just misunderstood something. Any criticism on the program itself or good practices in python are also greatly appreciated. (Text File 'Words' is just 3000+ ...
i'm learning python but i'm used to java development. this might have influenced my programming style. feel free to give any feedback on the code maze_learning.py: import maze def main(): my_maze = maze.Maze(64, 64) my_maze.back_tracker() my_maze.print_maze() if __name__ == "__main__": main() maze....
I am not used to work with OOP so I decided to make a simple console "walk" game to focus on the OOP and the general game design process. I tried to make it as robust as possible but I feel like I could have build the hierarchy of the classes and functions in a more systematic way. Please think of this as a much larger...
This code implements a simple wrapper, intended to be used with range-for to manipulate items of a container as overlapping pairs, ie. 3 items will give 2 pairs. Code review focus: Is pair_range good modern C++? Any easily avoidable performance issues, like unnecessary copies? #include <iostream> #include <typeinfo> #...
I made a function in Rust to add two floating point numbers (f32s) together using only their bit representation and integer operations. I have tested it for a quite a few different cases but I'm not sure how I can efficiently test it for all floating point numbers without it taking ages. fn add_f32(mut a: f32, mut b: f...
What I have Header file: int randomInt(int start, int end); Implementation file: int randomInt(int start, int end) { static std::random_device rd; // Obtain a random number from hardware static std::mt19937 eng(rd());// Seed the generator std::uniform_int_distribution<> dist(start, end); return dist(en...
Hey i have some legacy code i'm working on (It is open source so no problem in me sharing it!). I wanted to refactor some parts in the extractResult method since it got pretty repetitive. The *.*.* are extracted from XML, so there is not much to do. I realized that the creation of the Saldos and Values is pretty simila...
I've made a working Four-in-a-Row game with grid lists and winning system. Both vertically and diagonally, is there some clear improvements to be made or common mistakes which could perhaps shorten it down? Is there any bad code or stupid logic which needs improving? I haven't gotten to making the diagonal victory but ...
I ran across an issue that proved to be more complicated than I thought: Changing an arbitrary argument of a function purely based upon its name in Python - possibly via a decorator. I tried to implement a generic solution, taking into account Python's positional arguments, keyword arguments and argument defaults. Firs...
As .Net has no Deque class (Double-Ended Queue) in the Frameworks and I couldn't find an example implementation that I was happy with, I have written the following with the intent that I may post it as a canonical implementation. First the interface definition: /// <summary> /// Standard interface for a Double-Ende...
Update Due to the fact that the client's version of excel does not support VBA, I have moved on to a C# excel interop solution which has been reviewed. The test data has been added at the bottom. The test file including the macros can be found at https://github.com/pacmaninbw/Anza-Tenant-Roster/RentRosterActions.xlsm. ...
I wanted to make an algorithm that is a counter-example of Cantor's diagonalization argument. Given an integer, this Python code will produce a unique rational number. Fed the sequence of positive and negative integers as inputs, it will eventually produce all the floats. Given infinitely long integers, I speculate tha...
This is a follow up after revisions made from this question. I've separated the program into 2 classes. The HangManData class is used to store game data such as the word, letters guessed(separating the ones actually in the word from those that arent), remaining number of guesses and the phase of the image. The second c...
I wrote a function that accepts 2 integers start and length as input and returns the bitwise XOR of certain numbers as described below: if start = 0 and length = 4, the process would look like: 0 1 2 3 / 4 5 6 / 7 8 9 / 10 11 12 / 13 14 15 16 which produces the checksum 0^1^2^3^4^5^6^8^9^12 == 10 My code works well en...
I live in hostile environments (GCC and Clang) which remove calls to isnan which prevents me to perform validation of my input before running computations. Here is a potential replacement: is this a correct implementation of isnan (no matter whether the NaN is quiet or signaling - I am reading random data from untruste...
I wanna learn how to make my code more Pythonic, I'm still a newb. Advises on classes and functions I could've used are welcomed. import random as r n = 7 #This number defines the size of the square matrix def print_mat(mat): """ This function will be used to display the matrix """ for row in range(len(...
I fully admit that the code below is long and ugly. What's happening is that in the validation section of this machine learning model (used for text recognition), I would like to obtain the character error rate (obtained using the editdistance function) and the sentence accuracy (ignoring whitespace) across these 4 ty...
I have designed an Algorithm for sorting numbers. This algorithm works by sorting an array of any length with random, non-repeating whole numbers in a linear manner by ascending order. Under the inspiration of Binary Search Algorithm, although inefficient the algorithm is able to sort the given array correctly. What ...
As always - the context ! Preliminaries Recently I needed a way to transport data from one environment to another. Though the proper way (probably) to do this would be to use databases (which I don't know how to work with) I chose writing the data to a simple text file which in turn is being read and parsed when neede...
I had lost a lot of cards of my UNO deck, and was frustrated, and that's when this idea struck my mind. I chose C++, knowing it would be hard, just to improve my understanding of the language. Proudly, I was able to make a basic functioning UNO game in C++!! UNO is a multiplayer card game, and the objective is to f...
I'm trying to bin multicolumn Pandas Dataframe, and use the upper limit of the interval for further analysis. This is my approach: # Creating a dummy dataframe: df=pd.DataFrame({'A':np.random.randint(10, size=5),'B':np.random.randint(20, size=5)}). # Binning dataframe for all columns, and use the upper interval value a...
I'm coding this starry background for a website using p5.js, and it has 3 elements: There is a background that slowly intervals between black and white. This is done by drawing many white circles with varying levels of brightness over a black background There are many small white stars that decrease in alpha values, ...
While creating a game engine using c++, when defining a component, I was tired of writing down essential but repeated elements such as 'GameObject* parent' every time I define a new component constructor. So I thought of a shortcut. It's debatable, and I feel it can be improved. When I need to create many different co...
(See the next iteration/follow-up here.) I have this short function is_permutation_palindrome, which returns true only if the input string may be rearranged to form a palindrome: #include <iostream> #include <string> #include <unordered_map> bool is_permutation_palindrome(const std::string& text) { std::unordered_...
I created priority queue which stores messages sent from asp net core controller and then processes them in BackgroundService The thread which loops through items is blocked when collection is empty. It might look like reinventing the wheel as there is already BlockingCollectionOfT but I am clueless how to extend that ...
I need to fill missing business days (i.e. any days except saturday and sunday) in a series. So let's say I have this array: const arr = [ "Date,Value", "2020-12-31,1", "2021-01-01,-3", "2021-01-04,-38", "2021-01-05,-14", "2021-01-07,27", "2021-01-08,55", ] "2021-01-06" is a wednesday, but...
I'm working on an asynchronous TCP server which is supposed to be used for a chat. I want to get a review for the TCP server part because I'm struggling to find a good design to fulfill the following technical requirements. Technical Requirements Start() Stop() Dispose() - disconnect all connected clients. StartRecei...
I am trying to solve the CSES Number spiral problem https://cses.fi/problemset/task/1071/ However, I get the TLE problem. How can make my code more efficient? import java.io.*; public class cses7 { static long valPerm = 1; static long powresult = 1; public static void main(String[] args) throws IOExce...
Is the following implementation of recursive function correct? How about the time complexity of the code; is it good in terms of performance? def binary_search(arr, num): # find the middle index # compare the middle index to the number # if the number is greater than the middle index, # search the rig...
I have started to practice programming by doing exercises and I want to get feed back to improve my self in nice clean coding and I found this website. The program I wrote now is a word transformation map. It has a text file contains a pair of words in each line (transferor.txt), and an input text file(input.txt). tra...
I am new to programming. I use Python 3.9.5 and VSCode on Windows 10. In video 14 titled "Exercise", chapter 3 titled "Control Flow" of Mosh Hamedani's "Complete Python Mastery" course, this assignment was provided: Write a program that displays the even numbers between 1 to 10. The output is supposed to be: 2 4 6 8 ...
This is a 15 puzzle implemented in pygame. The tiles can be moved with the arrow keys or by clicking and dragging the mouse. Parts of the code that require extra like icons and sound effects files have been commented out. puzzle.py import pygame from random import choice from math import sqrt class Direction: def...
Edited with a bit more unit tests. Preface Following my second version: 2d Grid - Iterating by Rows / Cells - Take #2 I believe that I am now satisfied with this new version below. There is still one area which I question whether it is a code smell or not. A code review would also be much appreciated. The solved proble...
I was playing with JavaScript in order to practice and wanted to make a list of people, which when clicked showed the person's details in another part of the screen. Here's the code I used to achieve it, but I'd like to have your feedback; how would you do it? Here's a working snippet: const divRoot = document.quer...
This is a follow-up question for Manhattan distance calculation between two images in C++ and Dictionary based non-local mean implementation in Matlab. For learning C++20 and researching purposes, I am attempting to implement function create_dictionary and dictionaryBasedNonlocalMean which purpose are similar to the li...
The worker processes spawned by concurrent.futures.ProcessPoolExecutor, docs, tend to have the same priority as their main/parent process - to be expected. I was looking for "clean" options to start them with lower (lowest) possible priority for certain jobs without interfering with the main/parent process. So far, I a...
I made this code to search for words and put it in a variable: nfo_labels = 'some phrase Horror' if "Apocalyptic" in nfo_labels: nfo_genre_1 = 'Apocalyptic,' else: nfo_genre_1 = '' if "Horror" in nfo_labels: nfo_genre_2 = 'Horror,' else: nfo_genre_2 = '' if "Mystery" in nfo_labels: nfo_genre_3 = 'My...
I am trying to build a website that shows events. And I use the following controller. Please note that the urls ($view and $course) etc. are renamed and are not the ones used on the real website! Controller: <?php namespace App\Http\Controllers; use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\F...
I'm trying to recreate minesweeper in python with PyQT5. I have this function that updates the GUI by using nested for loops (one for column, and one for row) to check each cell in a 19x19 area to determine what type of tile said cell is. The function works as intended, but runs very slow and takes around 4 seconds t...
Idea is to have an AutoBind decorator which you could append in front of any method to have it preserve its own this, instead of manually binding it when called. function AutoBind(_: any, _2: string | symbol, descriptor: PropertyDescriptor) { const originalMethod: Function = descriptor.value; const adjDescripto...
I want to count user registrations by month, currently the code I have works, but I want some feedback or some ideas on how to do it in a better way because I think mine looks a bit messy. Using a Unit of Work Implementation with the Repository pattern: var repository = _unitOfWork.GetBaseRepository<Customer>(); Use L...
I have a table which i want to sort the rows visually according to a column while the rows remain intact in the DOM structure. So nodes aren't moving in the DOM or getting replaced with eachother at all. Table rows can be sorted by clicking at the column's header as of now, which is the simplest case. In future i hope ...
I have 3 tables: regional with Regional Model (id,kode) status_kontrak with StatusKontrak Model (id,status,user_id,...,...) users with User Model (id, regional_id). My purpose is to get a collection or array from StatusKontrak to count how many StatusKontrak with status of active, expired, and null of each user respe...
I want your criticism of the following ANTLR4 grammar intended for use in templating engine of sorts. Its task is to look through (presumably rather short) potentially multiline piece of plaintext, find all the tags of the form <tagname> and substitute their values from a data source. These are requirements that I can ...
I need to find minimal date (year, month, day, hours, minutes, seconds). My code is working, but it looks terrible and it's very long. What can I do to avoid this ladder and make my code readable? (I want to use only <stdio.h>) #include <stdio.h> typedef struct DateTime_s { int year , month , day ; int hours , ...
I found this code for Java to find if graph has cycles and I edited it to print out path of cycle. I use adjacency list. As it is directed weighted graph I will need to implement compensations of cycles (if we have (1)--(2500)--> (2)--(2000)--> (3)--(1000)-->(1) then (1)--(1500)--> (2)--(1000)--> (3)--(0)-->(1)). Neve...
I created a function for creating a new user in AD, assigning an o360 license and enabling mailbox, however, my code is very chaotic and I do not have a much experience with PowerShell. Could you please advise on any improvements, code optimization or generally what could be done better? Function CreateUser{ #$GroupsAv...
I have tried to make my own implementation for a BST task I was given for a complex type (Transaction), that should be able to store duplicate values as well. However, I am not sure if I have gone about it the right, way and if there is anything I could do to make my code cleaner / more to c++ best practices? I was tol...
So I've decided to dabble a bit into C, and while it's trippy as heck I've finished an implementation of a linked list for practice. I've pretty sure there's some type of obscure bug or memory leak in here some where since I really don't have a solid understanding of this language yet, so yeah, please review my code an...
I was looking to receive some feedback on the function I wrote to generate a random ip address. The code is pretty messy and just wanted some feedback regarding optimizations, memory leaks and best practices. I am aware that there are ip ranges that this could generate that don't actually exist but for my project it's ...
I wrote this code I am making for an open source game. I just would like some feedback to know if my code is good. One thing I have to question is my use of private functions okay? I use a lot of them in my CustomGravity.cs class, and just in general. https://github.com/BlakeTnr/Perception/tree/main/Assets/Scripts My b...
Object Property Sanitization I'm learning to code servers using JavaScript, Node, and Express. While writing controllers that create new entries in the database, the need to sanitize the user input arised. Take this post controller as an example. const Model = require('./Model') const post = (req, res, nxt) => Mode...
I've built a small OTP code verification component and I need reviews and suggestion to improve its performance and maybe the logic behind it. The purpose is to publish my first 'react component' to npm in order to be reusable by the open source community. Feel free to share the best practices. import { createRef, useE...
I'm trying to implement an observable pattern on variables, so that I can hook up UI components, etc. to change displayed values or other actions when their value changes. I wanted three features that the built-in Delegate system doesn't satisfy: (optional) try/catch calls so that some not important UI element doesn't...
I wonder if my code for bootstrapping in Python is correctly coded or if there are logical flaws in it. It uses a 95% confidence interval. The code basically does the following for two datasets that contain 23 numerical values, respectively: It takes 23 random values out of the dataset list that contains 23 values, re...
UPDATED - 25-12-2021 Summary: Renamed start.py --> bot.py Modified a lot of code in bot.py Modified code in sitemap.py Created init.py Check the update code in the bottom of this question. I have just started to learn Python and have developed a small bot for Telegram. This goal is to download a sitemap.xml file (s...
I have this public repository. Since it's the first repository I have created, I'm looking for tips on what should I improve (mainly in the GH project structure), although tips in the code would be greatly appreciated as well. ideally, I would like to be able to import this package via the pip install command. pip inst...
I do have large database and my query takes about 2s to complete on production environment which is kinda slow and would like to ask is there a space for improvement? My initial inputs are instance_id with category_ids and would like to get all apps grouped by category with status i.e Active or Disabled and see how man...
I'm very new in C#, and the best way to learn, is to do exercises. As I tried to find a challenging exercise, I created this little game called MasterMind. The rules are very simple, and are explained on numerous places (i.e. here). You can find below my version in C# of this game, but written only for the console appl...