instruction
stringlengths
71
71.9k
I have a code here that counts the number of fruits from Column B to Column AF (31 days). I used a switch with cases from 1 to 31. I'd like my code to be simpler. 31 case statements is just too long. private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Excel.Application Office...
I just started learning Go, and I wanted to created a project to learn more about concurrency in go. I heard about Go's lightweight threads, so I wanted to give them a try. This program uses backtracking to brute-force a list of passwords loaded from a file. It tries from password of length 2 and go ahead until all pas...
Today I've implemented a database helper in Go. I'm new in Go world so I just wanted someone with more experience to take a look and tell me what is good and especially, what is bad (and why, if possible). package clinic import ( "fmt" "github.com/astaxie/beego/orm" _ "github.com/go-sql-driver/mysql" ) fu...
Following my java class is required to be reviewed and couple of clarifications about class variable loading is required. Following is my class. import java.util.regex.Matcher; import java.util.regex.Pattern; public class ValidateUtil{ private static Pattern pattern; private static final String REFFERE...
Though this program tells the truth (unless you change the source code), it does tell Fibonacci numbers, depending on the user's input. Keeping in mind of all (or most) of the feedback given from previous questions, I wrote this program to see how well I have progressed. def get_fibonacci_sequence(max): ''' Ret...
I have the same functionality in two controllers and I want to refactor to place it in a shared method that both controllers can access. I was thinking on creating a separate service called "Camera" and inject that service as a dependecy into both controllers as I'm currently doing with "Login". Is this a good approach...
I'm new in cordova / angularJS and I wonder how much responsibility a controller can have. This particular one validates users entry data, display messaging, takes pictures calling the camera API, serialize them and finally calls a service to upload them to the cloud. I want to refactor functionality and move it to a s...
My MainWindow popups a SettingsDialog. The setting dialog need to hide certain fields if the connected device is certain type. void MainWindow::on_actionSettings_triggered() { SettingsDialog * settings = new SettingsDialog(this); settings->exec(); } Now in SettingsDialog: SettingsDialog::SettingsDialog(QWidge...
I have a time-critical calculation running on an ARM Cortex-M0. This is the fastest 32x32 bit -> 64 bit multiplication that I can come up with. The following C compiles almost 1-1 to assembly instructions: //consider each arg as two 16-bit parts. //r0 is Aa is A<<16+a. r1 is Bb is B<<16+b //then Aa * Bb = (A*B)<<32 + (...
This command line program applies defined labels along with Monday's date to a directory of images. The script has to handle not being run on a Monday. Others are asking for the script so I cleaned it up as much as I could. I want to make it as friendly and as cross-platform as possible. Labels should be applied just a...
I developed a PHP function to get a not formatted address and split it in a street name and number. Following are some patterns of received addresses StreetName Number SrtreetName, Number Number StreetName Number-Number StreetName StreetName, Number, Complement StreetName Number/Number StreetName Number - ZipCode (Zip...
I need to complete a sequence of braces and brackets like [ ], ( ), { }, or reject the input. I can add braces/brackets only at the beginning or at the end. Example: input: '))[[([{([])}' output: '(())[[([{([])}])]]' input: '[)[((({}[]' output: 'rejected' My implementation is based on using a stack (self-implement...
What this code does it explained in detail in the top portion of the query. I have left out part of the list of language tags as I felt it was just noise. You can see the full collection here. You can run this query on SEDE and play with it as you wish. Note that I left plenty of wiggle room for others to modify and ...
I wanted a convenient class to easy access the parameters inside. I am using a lot of math in my game; that's why a wanted to access them through x, y and z (for readability). And this is my outcome. It is a class which lies on top of numpy array. It basically means that I can control a numpy array trough my class. And...
As I said in my last post Multi-dimensional ascending and descending sort array function, I'm back with the final version of the code. Added features: Filter array function by following parameters: GraterThan, LessThan, Equals, NotEquals, Contains, DoesNotContain, ContainRegex, DoesNotContainRegex, BeginsWith, EndsWit...
Would this todo list benefit from breaking it down into more components? What would be the advantages? Am I breaking any best practices from what is seen here? var TodoList = React.createClass({ getInitialState: function(){ return { todos:data, text:"" }; }, handleC...
I'm using some rather old C code (circa 1996, written in K&R style) to do robust geometric computations, available here, for a library I'm trying to write. In order to work properly, this code has to execute an initializer function before calling any of the included routines: void exactinit() { REAL half; REAL che...
What's the fastest way of doing this? int hextoint(char number) { if (number == '0') { return 0; } if (number == '1') { return 1; } if (number == '2') { return 2; } /* * 3 through 8 */ if (number == '9') { return 9; } if (number == 'a') ...
I'm having an issue where when the recyclerview has a big amount of items (say 2000) the scrolling is really laggy. Here's the Fragment code: package jahirfiquitiva.apps.iconshowcase.fragments; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.widget.GridLayoutManager; import ...
I don't know C++ at all, but for the heck of it I tossed this together because I was talking with someone about C++ and was given the impression there is absolutely nothing quite like the windows APIs ManualReset and AutoReset EventWaitHandles, so I figured I'd see if I could create one. I think this might work - it co...
I've created a UDF some time ago and used it pretty often till now in different ways (but mainly to compare a "history" of data like having different filters at the same time). While there is no need to change anything at this state, I'd like get some suggestions of how to improve it without the loss of any functionali...
On almost every page in the Stack Exchange Network, there lives a list of some the current "hot" questions across the network (sometimes abbreviated HNQs). Some of these posts have very exotic titles (especially the ones from Arqade) and some have very simple titles. Either way, I've always found it fun to try and gues...
This is my first attempt at making a singly linked-list class. Would this sort of implementation be sufficient for interviewing quality? class Node(object): def __init__(self, data, next_node = None): self.data = data self.next = next_node def __repr__(self): return str(self.data) cl...
I've just started learning Erlang. Since my editor of choice doesn't have a syntax checker for Erlang, I decided to use the parser/linter in the standard library to make a standalone script. It works now, but I'd like my code to look cleaner, possibly handle edge cases better, be more ... what's the Erlang equivalent o...
i make template for checkers game. while there is the functionality for only one player. but it worked. Checkers can already move Board = function(){ var self = this; self.fillBoard = function(){ for (var x = 0; x < self.x; x++){ self.board[x] = []; for (var y = 0; y < self.y;...
I would appreciate any feedback on syntax, naming convention, possible shortcuts, clarity of code and any other constructive feedback. This code was based off of the Priority Queue chapter in The Algorithm Design Manual. CODE 'use strict'; function getRandomInt(min, max) { return Math.floor(Math.random() * (max - mi...
I was trying to solve a problem concerning the difference of the diagonal sums of a matrix (using C99): #include<stdio.h> int main(){ /*n: is the size of the matrix (squared matrix) and it is Entered by the user*/ int n,line,row,sum_one=0,sum_two=0,dif; scanf("%i",&n); int array[n+1][n+1]; for(lin...
I started a hobby project to find the books that I read (paperbacks) so that I can keep track of them (reading start date, finish date, number of pages, etc..) The first challenge was to find the book on the net, and I realized there were different sources which you can search from, like google books (provides a JSON A...
After reading about design patterns in general, I decided to try and incorporate them in an actual program. I chose a State machine for my first exercise, or, more concretely, an MP3 player. The player itself does not play any audio files, it just models the behavior of one. The MP3Player behavior is as follows: If t...
Please suggest a way to optimize the below code. I want to reduce the execution time. This is a program to multiply using the shift operator. import java.util.Scanner; public class Test2 { public static void main(String args[] ) throws Exception { Scanner in = new Scanner(System.in); int N = in....
When now increasingly making code unit testable, I notice that code gets bloated, only to get dependencies out. A simple file operation, like saving a file, and, if a file with the name already exists, append a numeric index, can become greatly bloated by this. I understand that writing real files in a unit test is not...
A “perfect number” is defined as a number equal to the sum of all its factors less than itself. For example, the first perfect number is 6, because its factors are 1, 2, 3, and 6, and 1+2+3=6. The second perfect number is 28, because 1+2+4+7+14=28. What is the third perfect number? Write a procedure (next-perf n) that...
I have implemented a binary heap as a exercise in data structures. I realize that I'm missing some useful functions (increase/decrease key for example) but I don't consider them interesting for the exercise. I'm interested in learning if there is anything that I could do to improve performance of the pop operation whic...
Here is my database: Here is my viewModel: public class groupsFoldersViewModel { private DAL.educationSocialNetworkEntities DB = new DAL.educationSocialNetworkEntities(); public List<DAL.sharedFolders_table> sharedFolders { get; set; } public groupsFoldersViewModel(int gid , int uid) { ...
Along with the Introduce Field refactoring, I wrote an Introduce Parameter refactoring. I actually wrote this refactoring first, but due to a bug in the parser/resolver, I was unable to fully test it until afterward. Much of this codebase is shared, and I am going to write a helper class to support these, and other, r...
This is an object exposed to the view and is being used on directives within the same view. The directives need to track changes on the ctrl.filters.applied object. It's a simple part of a project at my work and I'd like to know if I'm doing it right. Other properties and methods are just being used on the view itself....
I would like some advice on how I could make it less repetitive and use more functions and classes. #include <iostream> #include <string> using namespace std; class date { public: date() = default; date(istream &is) { is >> year >> month >> day; } bool organizeInfo(); bool organize(); ostream &ou...
A date is un-ambiguous when each number may be decided to be day or month or year given the range limitation of these numbers. For example \$14\$ cannot be a month number \$2008\$ cannot be a day number @param un_ambiguous_date: an un-ambiguous scrambled date, of the format X/Y/Z where X, Y, Z correspond ...
As part of a past assignment, I've expanded on this implementation of ls to have more options available, including non-standard ones. It currently supports these (described on this page): -a -d -h -i -l -p -Q -R -S -t -U Other than that, it doesn't list a total field nor does it have coloring. It also doesn't have t...
I am working on an special version of Secret Santa with internal sub-groups. Typical Secret Santa (SS) requirements: Cannot be assigned to themselves Should be random Every participant should be assigned to someone Every participant should have someone assigned to Special requirements; there are subgroups that should...
For MAX value of 1000000000 (\$10^9\$), it takes about 45 seconds to reach the line where it prints "done". How can I speed this up? Is printing to screen always going to take so much time? I know it's hardware. On increasing the size of MAX beyond \$10^9\$ gives me an exception on the line memset(a, true, MAX);. Is th...
UPDATE: Added concise problem summary and sample output log. I tried coding a sample Java program to solve a problem statement: Java Banking Demo Problem statement Complete code for Java Banking Demo Concise Problem summary: Design and Implement an Engine that processes the SMS messages which are sent from a users...
I'm currently working with the LLVM JIT framework. There is some graph I had to implement for internal cost bench-marking. It has cyclic node dependencies, so I have to use std::weak_ptr pointers for nodes' children instead of their std::shared_ptr counterparts. When it came to implementing child iterators for the grap...
I am new to Sails.js, Node.js, and web application development in general. My current understanding is that well-written controllers should be "skinny" meaning they should be as simple as possible, easily readable, and abstracted by using helper functions to reduce the amount of code in the controller itself. I want my...
This is a c++11 implementation of Huffman-encoding that I wrote as a hobby. My main goal in writing it was to get more accustomed to c++11 and STL in general, as well as stuff like bit-manipulation. Here are the classes bifstream and bofstream (binary ifstream/ofstream). I wrote these so that I could read in/write out ...
I recently wrote a Fibonacci program in Python, and one of the answers mentioned an Infinite Sequence. I decided to implement an infinite sequence in Java, as I am not that experienced in Python. import java.math.BigInteger; import java.util.LinkedList; import java.util.List; public class InfiniteFibonacci { /** ...
This is the main.c file for Khronos, a personal project of mine. This is basically where the whole program is setup, run and then quit. I'll post the short summery of what this file does from the README.md: How Khronos Works The process starts off by recording a .flac file with the help of LibSndFile and PortAudio...
I decided to write a pathfinding algorithm in order to expose myself to the world of pathfinding and for me to further understand more advanced algorithms such as A*. I chose C# due to its flexibility compared to other languages such as Java. I will start with the basic objects and work up to the more complex ones. vec...
This morning I've seen this on Twitter: http://mynewtechworld.tumblr.com/post/135545896048 I case that somebody can't see the image: I 01101100 01101111 01110110 01100101 you. Just for fun I wrote this binary to ascii-converter in JavaScript: var chars = [ 'I ', 0b01101100, 0b01101111, 0b01110110,...
I was trying to achieve a simple problem : If the user is an employee of the store, he gets a 30% discount If the user is an affiliate of the store, he gets a 10% discount I came up with the following : The abstract super class : abstract class Customer { String cid; String customer_name; double fare; Custo...
While fiddling around, I've made a very simple and naive function to retrieve any repeated sub-string within a certain string. function getRepetitions(str, length){ if(isNaN(length)) { throw new TypeError('length must be a number'); } if(length < 1 || length > 2147483647) { throw ne...
Preliminaries Given two matrices $$ A = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1q} \\ a_{21} & a_{22} & \dots & a_{2q} \\ \vdots & \vdots & \ddots & \vdots \\ a_{p1} & a_{p2} & \dots & a_{pq} \\ \end{pmatrix} \text{ and } B = \begin{pmatrix} b_{11} & b_{12} & \dots & b_{1r} \\ b_{21} & b_{22} & \dots & b_{2r} \\ ...
I know I should use mvvm, but just starting with WPF, here is my code: MainWindow.xaml <Window x:Class="EasyUpdater.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008...
Assignment: Develop a Java application that will input the number of miles driven and gallons used (both as integers) for each trip. The program should calculate and display the miles per gallon obtained for each trip and print the combined miles per gallon obtained for all trips up to this point. All averaging calcula...
I'm not sure what the best way is when dealing with users calling start() multiple times or stop() before calling start(), I decided to silently return. I lean towards not using exceptions for these situations. Is there a good argument to be made for exceptions? Is there a different or better mechanism? Looking for: S...
This is a script that must send an email at each new article published on a specific website. Any suggestions or improvements to do? SENDER_EMAIL="sender@example.com" TO_EMAIL="myemail@example.com" RSS_SITE="example.com/feed.xml" CHECK_INTERVAL=10 while [ 1 ]; do LINK_ARTICLE=$(rsstail -i 1 -u $RSS_SITE -l -n 0 -...
On Wikipedia, if you click the first non-italicised internal link in the main text of an article that's not within parentheses, and then repeat the process, you usually end up on the "Philosophy" article (see this Wikipedia essay). To test this idea, I made a simple Python module that does the "clicking" programmatica...
I have this code which generates and shows list of selectable items that user can post to controller in order to save into database. Model looks like this: public class DeliveryAddressSelectionModel() { public List<DeliveryAddress> DeliveryAddresses { get; set; } public List<int> SelectedAddressIDs { get; set; } } ...
I've created a console/terminal command handling module that allows the programmer to bind functions to a command name and later execute them from std::string. What's new is that it handles most stuff automatically and allows for usage such as: void func1_ptr(const std::string& name) { std::cout << "Hello " << name...
I'm trying to build a game where a client gets to play against a server in a game of Tic Tac Toe. I've built the game and followed a somehow structured design of how the game is supposed to happen, with the client and the server exchanging messages, but they seem to lose synchronisation at the beginning of the game. T...
I am very new to this. Hope someone could help me suggest how to improve the code. I have two tables where I need to get the SQL data and output it into XML format. I am using LINQ method. Below how the code looks like. #region Database XML Methods private static void CreateDatabaseXml(string path) { tbchrData...
I have created a JavaScript based game, which is based on the card game War. I think I am reusing a lot of my code, but I am not entirely sure what I can really improve. I have a lot of functions, which could probably be improved. Please take a look and give me a review of it. I think I nailed it, but let me know what ...
I've been given a homework assignment to make a function to check whether 2 given arrays with the same given size have exactly the same set of elements. My function seems to be working but I feel like I don't use the principles of recursion properly in my function. I'm not allowed to use dictionary like data structures...
I am facing the following problem: I have a special data structure that is a dictionary whose keys are integers (dimensions). The values are also dictionaries whose keys are strings (geometric types) and whose values are numpy arrays (connectivities). Something like this: custom = {1: {'a': np.zeros(10), 'b': np.zeros(...
code from suggestions in comments here. I will still write it like the first time, so you do not need to read the old question. I've created a UDF some time ago and used it pretty often till now in different ways (but mainly to compare a "history" of data like having different filters at the same time). While there is ...
Despite the fact that this code works, I would like to know if there's any situation I did not anticipated, and/or if what I am trying to do is some what wrong. -std=C++11 flag needed #include <iostream> #include <string> #include <map> #include <typeinfo> #include <functional> class object { public: virtual ...
For my CS class, we were tasked with writing a program that calculates all the possible results from rolling two n-sided dice. For example, the input of 4 would print [2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8]. Or, if the input was 3, it would print [2, 3, 3, 4, 4, 4, 5, 5, 6]. I was given enough test cases ...
I've created a UserScript for adding follow-up reminders to any post (question or answer) here on the Stack Exchange network. I did this in response to a stackoverflow meta post feature request which sparked my interest. It adds a calendar icon into the vote cell which displays a datepicker where you can select a remin...
This code was made to find all the perfect numbers between 1 and 1000. A perfect number, is a number where all of it's divisors add up to that number. For example: 6 is divisible by 3,2, and 1 and3+2+1 = 6. Therefore 6 is a perfect number. public class Perfect { public static void main(String[] args) { fina...
I'm programming a basic command line calculator in java that can parse expressions and evaluate them, does not handle brackets yet. For example an expression: \$9+9/2^2*5-1\$. At this point I can give my program an expression that contains exponents, and It will evaluate them one by one until there are none left. For e...
I made this little code to see what brute forcing is like. I made this with a complete guess on how it works. This code works fine but it seems to take much much longer than it really should. I have the Scanner there so I can tell the program what password it is searching for. I have the timeMillis also just for person...
I am just looking for code review and overall critique. I want to know what I can do better and how can I do things more efficiently in Java. I need particular feedback on the use of my ArrayList in my colsToRows method and then how I converted it back to regular arrays in Java. What better step could I have taken ther...
I've built a web crawler using the BeautifulSoup library that pulls stock ticker data from CSV files on Yahoo finance, and charts the data using matplotlib. I'm wondering if there are any ways to improve the code I've written, because there are some parts that I think could be a lot better. import urllib.request from ...
I'm using a factory for my $http get requests. When I pull single json objects from the $http, it works pretty quickly I now have items coming through as an array. It is very inefficient, & slow. Images 'pop' in. Ideally it would just load one list (of say 10 images) then know to load the next list, say after 4 swipes...
I am programming a language interpreter in C# and have recently created a set of functions that receive either a string or a string[] and split it by a received string. For example, with a string: "Hey:123:hello:456" ":" It will return this array: {"hey","123","hello","456"} And with a string[]: {"a:b","c","d:e:f"} "...
I'm just a Clojure noob (started learning yesterday). Here is my helloworld program. It factorizes number into primes. Do you have any comments? How could I make this code cleaner and shorter? Maybe I can deduplicate some things? (defn lazy-primes ([] (cons 2 (lazy-seq (lazy-primes 3 [ 2 ])))) ([current calculate...
I need to develop an API. The functions of the API are requests that call the services exposed by a server. Initially the API worked like this: import sys reload(sys) sys.setdefaultencoding('utf-8') import logging import suds import json import string import socket import signal import traceback from suds.client impor...
Since reading Robert Martin's book "Clean Code" I have been inspired to revisit and refactor some of my code to break it down into succinct methods and small specialised classes. Given the need to retrieve the NameAttribute off the Name2 property of the TestObject class below... public class TestObject { ...
I have the following code to generate an URL based on alias and args provided /** * Get the url by alias. * * @param string $alias * @param array $args * * @return mixed */ public function url($alias, array $args = []) { if (empty($this->map[$alias])) { return null; } $segments = explode('/'...
Follow up form Extending Sieve of Eratosthenes beyond a billion Taking suggestions from the comments on the previous post: Updated Code: This takes about 22 seconds for MAX as \$10^9\$ to reach "done". This is a significant improvement. void sieve_of_eratosthenes(){ bool* a; a = (bool*)malloc(MAX * sizeof(bool)...
I've Implemented a Serialization Utility which Serializes/DeSerializes a class, along with writing JUnit Test Cases for the same. Please Review the code and Suggest me how to improve it. Particularly in generics as I've not written much code with Generics in java. SerializableEmployee.java - Class to be Serialized pu...
From my previous question, I got great feedback which helped improve my code which I submitted. I went back and built upon that and came back to see if my code is an improvement. try: from tkinter import * except ImportError: from Tkinter import * import time import random with open("NAME_FILE.txt") as f...
I would like to know if this fullscreen page with image and overlay is written clearly. I'm afraid that those two empty divs (topOverlay, and topImage) are not correct. Someone told me that I shouldn't use empty divs when there's another way to do it, but I couldn't find an alternative way in this case. Is there a diff...
This project utilises the external-workbook-retrieval methods found here for the second workbook. This is the beginning of a project. The code here covers: Initial setup (define workbooks, unmerge any cells in data input) Then, for the 3 worksheets across 2 workbooks: Find the table ranges (this workbook only), Create ...
This feels wrong: private decimal ConvertStringToDecimal(string decimalString, decimal defaultReturnValue) { var returnDecimal = defaultReturnValue; try { returnDecimal = decimal.Parse(decimalString.Trim()); } catch (Exception) { // naughty } return returnDecimal; } but I thin...
I created a plot on which the y value is visible with the marker. What's your opinion ? I wonder if I could have done something simpler. (code should run in a Jupyter notebook) %matplotlib inline fig = plt.figure() axes = fig.add_axes((1,1,1,1)) X = np.array([3,3.2,3.5,3.8,3.9,5,5.5,5.8,5.9,5]) y = np.array([1,1,1...
This generic function invokes a property of a given object by name: Private Shared Function GetPropertyValueByName(Of TObject, TProperty)( ByVal T As TObject, ByVal PropertyName As String) As TProperty Dim result = GetType(TObject).GetProperties() _ .Where( Functio...
I have a custom dictionary where the values are numpy arrays. I would like to have a convenience function that creates a copy of its content except that the values are changed. If no value is passed, then the default None is assigned to the keys, else a value is set. The function can also work with a callable function,...
So I have the below (which is working correctly and all my unit tests are passing) but it's ugly and is violating SOLID, I will have to change the class every time I want to be able to map a different type (The multiple if statements). Code /// <summary> /// Maps the matching properties from one type to the other by na...
I have a 2D array class that is actually mapped to a 1D vector. For example, to obtain an element at a particular position, the code is as follows: template <typename T> T mat <T>::at(const size_t &row, const size_t &col) const { return m_values[row*ncol() + col]; } Here's the relevant section of the class in-contex...
I think the following is good but wondering if it can be simplified or improved. My condition for code execution is the following: It is a Monday AND It is not the Monday following the last Saturday in the month. This is the current sql: DECLARE @now DATETIME = DATEADD(dd,DATEDIFF(dd,'19000101',SYSDATETIME()),'19000101...
I created a key in Windows registry to have an option on every folder which allows me to simply right click, choose the right option and have a PDF made, either from JPGS, or PNGs, or TIFs. My registry key is as follows: '"C:\strawberry\perl\bin\perl.exe" "C:\Users\michal\Documents\createpdf\790024.pl" "%1"'. The cod...
I need to redo a migration occasionally. The workflow is usually something like this: find or ls | grep the migration using some keyword copy the timestamp paste the timestamp in bundle exec rake db:migrate:redo VERSION=123 As I hate repetitive work, I wrote a small bash script that allows running a migration using o...
I haven't made a game in Excel yet, so I decided to Make Conway's Game of Life. If you wish to play along, I've uploaded the workbook here. Right now it's very rudimentary (No user interface, no buttons/controls, no automatic tick-increment), but I would like to, in the future, add all of the above. Perhaps even make i...
I'm reducing a large array of objects to a simple object with 8 properties. I'm currently using Array.prototype.reduce to loop through the array of objects to create a new object. In order to assign a correct key to the value in the array I'm using a switch statement. My code currently works, but I'm looking to refine ...
The latest new refactoring for our friend Rubberduck is Encapsulate Field: This image, for the sake of brevity, shows the result of the refactoring and the UI together. The three properties below the field are what is inserted by it. All together, I am pretty satisfied with the code, so I need you to inspect it and he...
Here is the updated code. The original question can be found here. I would love it if you posted more ways I can improve this code. I am still fairly new to Java so I am not entirely sure how to make it any better. package hexTox; import java.util.Scanner; import java.util.concurrent.TimeUnit; public class Main { ...
I want to learn OOP and I am creating a little CMS for practice and to use it as a base for other projects in the future. This is the complete code: GitHub My major concerns are code structure, security and re-usability, but any feedback is welcome. About code structure, I am using classes and it all works well but the...
My team and I have a very poor understanding of best practices in relation to telnet. We have Task.Delay and Task.Wait in the code, including async voids and from what I understand those are potential areas that can cause deadlocks and other issues. I'm trying to understand async in relation to running a telnet client....
I am seeking a review of a previous project I completed in my first term at university. The submission was graded 18/20 however the feedback was minimal and gave no suggestions regarding further improvements. The specification prohibited the use of any non-primitive data types. Concise problem specification: Studen...