instruction
stringlengths
71
71.9k
I am learning the concepts of pattern matching in Scala. Following is an exercise for the same. The task is to define a show function that outputs an expression as a String. Following are the definitions involved: object Test { trait Expr case class Number(n: Int) extends Expr case class Sum(e1: Expr, e2: Expr) e...
I'm kind of new to Java but I am writing an Android app. Right now I'm working on an async task to calculate Pi but when I run it the memory usage increases alarmingly (+5MB per second). This one piece of code may need to run thousands of times so it is important that it be very optimized. protected BigDecimal doInBack...
I wrote a guessing game and I want it to be reduced because there are a lot of if statements basically handling the same task with a minor difference. Is there an efficient way to handle all these tasks with less coding? public class master { public static void main(String[] args) { int turn = 9; System.out...
My goal is to pick 10 unique words randomly from a List containing 20 unique words. I would remove the duplicate word from the List whenever a duplicate word is added and decrement the for loop counter by 1. List<String> words = new ArrayList<String>(); /* code to add 20 words */ List<String> word10 = new ArrayList<St...
I am doing some iteration over an array which have another set of array (the nested array). I need to .map() the outer array in such a way that it should filter out the nested array based on some criteria. Following is the example: JSON [{ "id": "CAM000001", "type": 128, "name": "abc", "fieldSets": [ { ...
I wrote some code to determine the additions and deletions that happened to a sorted slice after each (sorted) update. Git repository (includes some tests) Godoc // Package slicediff is a utility to determine the additions and deletions that happened to a sorted slice after each update. // // All the slices are assumed...
(I created a GitHub repository; there are few improvements as suggested by other users in the comments) As we know, C99 has no garbage collector. To address the problem of manually deallocate objects I wrote a little framework for reference counting. I would like to have comments about the style and clarity of the code...
I have following Java code, which is to print PDF, but in a busy location this code is taking about 20 to 30 second delay before submitting to the hardware. get the PDF file via the network download and save locally then submit local file, to the print job to printer printer hardware warm up printer hardware prints ...
The following excerpt is part of a method for recursively patching the properties of an ORM model and related models using a dictionary: try: anhaenge = d['anhaenge'] except KeyError: self.logger.debug('anhaenge unchanged') else: try: anhang = anhaenge['anhang'] except KeyError: self.log...
Let's forget about Spring Singleton Beans and about other frameworks in Java. We have one or more simple HttpServlets. And we should make database connection. (doesn't matter what is it, hibernate session factory or JDBC connection). Always I write the following pattern: class DatabaseService { private static Dat...
The code below is meant to build an array with certain properties neccesairy to create column for a table in a database. Would there be any more effcient way of doing this? Public fieldName As String Public fieldType As ADOX.DataTypeEnum Public fieldProperties As String Public fieldPropertiesValue Public fieldIndex As ...
I was practicing my C++ routine and decided to code up this simple linked list data structure. Furthermore, I made an attempt to make the list iterator "safe" in the sense that it throws an exception instead of tampering a memory region it should not.. safelist.h #ifndef SAFE_LIST_H #define SAFE_LIST_H #include <stdex...
I've finished optimization of Wilson algorithm (maze generation) from "silly and slow" algorithm of choosing unvisited cells: function aux.wilson() local unvisited_cells = aux.width * aux.height local y, x = math.random(aux.sy, aux.height), math.random(aux.sx, aux.width) aux.grid[y][x].visited = true unvisited_cells ...
I have this algorithm which aggregates a list of cidrs up to a provided limit based on the distance between them. It finds the closest ones and calculates the subnet to join them. The loop repeats until the limit is reached. I think there's room to improve it but I'm stuck at the moment. Any advice? Input limit: 9 cid...
My algorithm scrapes an infinite-scroll page but it takes too long. It scrolls three times but I'm wondering if there is a way to do a ScrollBottom() so no need of repeated code. Regarding the site from the example: Scroll is done by jQuery ScrollExtend goo.gl/Sq4vVx triggered when the users scroll beyond a particular ...
After reading the books "Clean Code" from Robert C. Martin and the "Head First Design Patterns" book from Elisabeth Robson I decided to make a mp3 tag application. I tried to do it in the MVVM style and appy as much clean code principles as possible in the code. One thing I didn't figure out is how to apply the single ...
I've made two functions for image processing: First one is for rotating an image Second one is to set all pixels of one color to another color Rotate Image: private static void roateImage(BufferedImage pic1) throws IOException { int width = pic1.getWidth(null); int height = pic1.getHeight(null); double a...
We have a few servlets like the one below, taking JSON request and produce JSON response. And the requirement is to log all API call traffic. import org.slf4j.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class CommentServlet { priva...
I'm a newbie in C++ (6 hours) and I have implemented this problem in C++ . I know this is a simple example but how can this be improved? Syntax wise or shortened code wise? Here is the question from Hackerrank Create three classes Person, Professor and Student. The class Person should have data members name and age...
The setPixelColor function below changes the color of pixels. I need some suggestions to optimize this function. Example: public static void main(String[] args) throws IOException { BufferedImage pic1 = ImageIO.read(new File("Images/Input-1.bmp")); setPixelColor(pic1, 34, 177, 76, 127, 127, 127); } This change...
Based on my previous review, I'm posting another Hackerrank Class solution. Problem Statement We can store details related to a student in a class consisting of his age (int), first_name (string), last_name (string) and standard (int). You have to create a class, named Student, representing the student's details,...
This is my first time using classes objects and functions. What can I improve on? #include <iostream> #include <conio.h> using namespace std; class functions{ public: void Body(){ cout << " :: Welcome to Taylor's CALCULATOR! ::" << endl; } int Addition(int x, int y){ int a...
Followup to Repository searching code duplication My goal currently is to make the current implementation of my repository's IQueryable filtering less duplicative. First, I looked into passing expressions around to target properties generically so that I can create reusable methods in a new extensions class I created: ...
I'm writing my first small programs in Haskell and still getting a feel for the syntax and idioms. I've written this Mad Libs implementation using recursive IO. I've used IO actions throughout and I'm sure there must be a better way of splitting up this code to separate pure functions from IO actions. Also, I'm not hap...
In order to grow potatoes I'm implementing the retry pattern. If I fail to grow them, I'd like to try it again later. The first part I've implemented is a collection of delay generators. Their base type is the DelaySequence: public abstract class DelaySequence : IEnumerable<TimeSpan> { protected DelaySequence(int c...
I use Scala's loan pattern in order to ensure and automate the resource aquisition and release after its use. When multiple resources have to be acquired at once, however, the function calls must be nested, impairing readability. Scala ARM supports for-comprehension to avoid the nesting. However, in order to have Scala...
I have a script which get data from MongoDB in the form of array and show the result. The array has a number of records in the thousands. A sample array is as follows: array(2) { ["mac"]=> string(17) "2c:33:7a:10:f8:39" int(1478199995) ["duration"]=> int(5) } array(2) { ["mac"]=> string(17) "38:0b:40:ad:03:53" int...
I just completed this challenge at CodeEval. You are given a positive integer number. This represents the sales made that day in your department store. The payables department however, needs this printed out in english. NOTE: The correct spelling of 40 is Forty. (NOT Fourty) My solution works, and it works pretty wel...
I have the following PHP logout script and I would like to know the loopholes present in it. How can I improve it? <?php require_once 'config.php'; if(session_id() != "") { session_destroy(); } if(isset($_COOKIE[session_name()])) { // Delete the session cookie setcookie(session_name(), "", time() - 1); }...
I have a function I've been using for years that retrieves the index of an HTML element within its parent element, or, if a second argument is passed to it, the index of an HTML element within the collection of elements of the same name in that parent: var childindex=function(node){ var index=0; while(node.prev...
I have implemented service which working with db context. I am using entity framework and I do not need repositories because logic is quite simple. I want to keep simple logic but clean approach. One problem I have is when I want to call service method 2 times in same service instance. I will get context dispose except...
I need to find a set of hours, starting from now, every 6 hours. So if now is midnight, I want [ 0, 6, 12, 18 ]. If now is 15h (3pm), I want [ 15, 21, 3, 9 ] For now I have brute-forced it: var now = new Date(); var hours = []; var h = now.getHours(); // add current hour (tomorrow) hours.push(h); // to add 6 hours var...
I have a struct OPTS which contains a few chars and char[]s. I also have a file opts.cnf which can be edited in a text editor like vim. I want to read the opts.cnf and assign the values from that file to my struct. opts.h typedef struct OPTS { char opt1; char opt2[6]; char opt3; } opts.cnf OPT1=Y OPT2=1234 OPT3=...
The problem: Some types, like cstdint aliases or, at least purely theoretically, even std::size_t, may be (but don’t have to be) bound to char, signed char or unsigned char. In practice, std::int_least8_t seems to be often bound to signed char and std::uint_least8_t – to unsigned char. This seems odd, since semantical...
I have a small project to help me analyze query latency from PostgreSQL statement logging. It's my first time writing anything real in Rust and I think it could be improved in several ways. My question here is about this code from scanner.rs: use std::hash::{Hash, SipHasher, Hasher}; use regex::Regex; use std::collecti...
While trying to become better in javascript I've written the following simple box with tabs: Javascript: (entire code (HTML/CSS) is in the snippet) var Test = {}; Test.Tabs = function (element) { this.tabBox = element; this.init = function() { var tabs = this.tabBox.querySelectorAll('nav ul li a'); ...
I went about this the way I have because Selenium is slow and inconvenient (opens browser) and I was unable to find the href attribute in the link element using BeautifulSoup. Html included below. On the downside, this appears to only ever find 25 images. #! python3 # Saves photos to file from flickr.com using specifi...
I have a function which needs to detect part of the day depending on whether it's the weekend or not (the weekend affects the lunch time indication). The method is quite long and I'd like to know how it can be better. double PartOfDayRule::ExtractFeature(dto::ActionableItem & item) { double morning, fir...
Here is the code I would like reviewed: int lines = 4; //Example string input = "81111111822222228333333384444444" //Example //Use a StringBuilder to make it easier when producing the formatted code var stringBuilder = new StringBuilder(); //Loop through the ASM Hex code and extract every 8 character and put them in ...
I took my basic Word jumble game and added some additional features to learn new stuff. My plan was not to have any pre-defined words coded in my python script but rather different group of words in a text file that are being imported into the game. In my case these were: sad_words.txt, amazement_words.txt. I made int...
I solved this problem. Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 To this 4 / \ 7 2 / \ / \ 9 6 3 1 This problem looked a lot harder at first and then I was able to come up with a recursive solution to this. /** * Definition for a binary tree node. * struct Tre...
The idea is simple, most people have some one directory containing all their projects as subdirectories. When you are in the top directory and you run this script like so for-each-git.sh git status it will run the command git status in each of the folders. I have another script called git-ffwd that fetches all remotes ...
I recently put together an assembler for a CPU I designed. I'm looking for feedback on my program structure, formatting, or anything else. I'm self taught on all of this so I don't have opportunities for it to be reviewed. I'm also new to python programming so if anything else doesn't look right please set me on the ri...
I'm taking my first C++ class right now that started back in September. At the beginning of the semester we were given the option to work on an extra credit final project which I decided to try and tackle. The program produces a seating chart for a theater. The user is to be given the option of picking a specific seat ...
The delay sequence has been fixed so I can move to the next step which are the Retry and Breaker. (Just ignore the console output here and there. There is no logging yet so it helps me to see what's going on in LINQPad). Both are derived from a common type Try: public abstract class Try { public abstract bool Execu...
I would like to present to you my code vision of Ajax form validation in Zend Framework 3. I am a beginner in Zend Framework and jQuery too, so I don't know that my solution is good and acceptable. My module has simple work to do. A guest fills the contact form, presses submit button and form is processing. If a guest...
I decided to solve the Box It! challenge in Hackerrank to improve my C++ knowledge as I'm still new to the language. Design a class named Box whose dimensions are integers and private to the class. The dimensions are labeled: length \$l\$ , breadth \$b\$ , and height \$h\$. The default constructor of the class sho...
I can see that there are a lot of java calculators on here, so I hope it hasn't gotten too old. This is a basic 4-function calculator in java using the swing interface. I am positive that it is inefficient, so don't hold back or anything. Here's the code, leaving out the code auto-generated by Netbeans for the swing in...
I have a directory of PDF files I want to merge into a single PDF. The number of files in the directory could be 10s, 100s, or even 1000s, so I'm trying to make sure my process is streaming as much as possible. MergePDFDocuments is passed an output Stream and I'm hoping the process below never has more than 1 PDF file...
I'm back at it again with an Hackerrank challenge-Inherited Code . I just learnt exception and I thought it will be a great idea to get a second opinion on my implemented BadLengthException struct . You inherited a piece of code that performs username validation for your company's website. The existing function wor...
rule 1: length must be between 8 and 50 chars. rule 2: at least 3 of the 4 following rules: --------2a: at least one upper case --------2b: at least one lower case --------2c: at least one numeral --------2d: at least one non-alphanumeric. I have a function which will take in two Strings (the password and the confirm...
I have addressed all your comments in my previous post. C++ implementation of a linked list Can you please comment on, How efficient the code is? Am i using too much extra variables to implement each functionalities? How can i improve error handling,return codes? class LinkedList{ public: LinkedList(): hea...
I recently had a bug where extracting a decimal from a string failed due to locale settings. That is, some locales use a , as a decimal point, rather than a .. An important goal is that the conversion function is deterministic. I have usually used boost::lexical_cast for such tasks, but my understanding is that this is...
For some reason I always have a negative feeling towards having many if statements in my JavaScript functions. But I've got some code that is processing an object that defines rules of an event. I need to determine one or many things to do based on the "rules" outlined in each object. (Particularly four if statements d...
I just finished the pig latin translator for The Odin Project and I would appreciate some honest feedback for my code. The code is intended to be "test-driven learning", and therefore emulates test driven development. Here is the prompt: Pig Latin is a made-up children's language that's intended to be confusing. It o...
I have implemented swipe functionality using UIPanGestureRecognizer in a project. What I have done is added PanGesture to UIView: self.panGesture = UIPanGestureRecognizer(target: self, action: #selector(self.panThisCell)) self.view.addGestureRecognizer(panGesture) And its selector is as: func panThisCell(recognizer:UI...
I have recently implemented Karatsuba's multiplication algorithm in C++ for my Algorithms course. It is a very sloppy implementation because I ran out of time, yet criticism would be appreciated. I probably could have implemented it using bit manipulation but I decided to instead use strings, and I could have also prob...
My server performs a query to get all country data with Eloquent relationships: $country = Countries::with([ 'description', 'provinces.Districts', 'provinces.Districts.communes', 'provinces.Districts.communes.villages']) ->where('status', 1)->get()->toArray(); Using the JavaScript below, I'm filtering the villages bas...
I have created these builders to help creating fluent acceptance tests for my api. I would really like suggestions for improvements because this is supposed to be a "how to" project on creating acceptance tests. Questions: Could this be improved? Should asJson be catching the exceptions to avoid polluting it's users? S...
Is there any way I can make this code more efficient/ more compact? It is a troubleshooting system for a phone that asks for the users input; and gives a solution based on keywords. The solutions are read of a text file. I need to make my program efficient and as compact as possible to get good marks. Any ideas? #This ...
I am following this article. /** * The group name should contain a minimum of 3 and a maximum of 12 capital letters. * No space, number, or special characters are allowed */ console.clear(); class Group { constructor(name) { this.name = name; } getName() { return this.name; } getLength() { ...
I am building a console application which will be scheduled in Task Scheduler of Windows to run my code every day at a set hour. Summing up, this application will read and write through serial port. When I send something to the Arduino, I need to receive something from it to finish up what I've sent and execute the com...
I have this function and not quite sure how to optimize it? function _onReadBtnClick(ctx) { var data = ctx.props.data; // Module Window -- Form Input Values $(".modal-title").text("Intranet Module"); $("#cBalModel").modal(); $("#mBalDate").val(data.BalanceingDate); $("#mStoreCode").val(data....
This python code is for a homemade RC plane radio using the Raspberry Pi and a USB joystick. It sends values over serial to DSM2/X module for RC planes and other RC vehicles. This Python code is modified from codeforge's video "CustomRC with raspberry and joystick usb" with many improvements by me. feedback on the pyth...
I have an array of hashes in a YAML file. When I run the code below it is VERY slow. My YAML pwsarr.count is about 2000. I am somewhat new to Ruby so I don't know if my code is not efficient or if I am doing something wrong. I know it loops my array before it's in the method and it loops in the method, but I wouldn't t...
I want to open an AlertDialog on the click of either a Button or TextView but I am not sure what would work best. When a selection is made in the AlertDialog, I want the bottom text to be updated with the selection. Here are the two options I have: TextViews only. Here, the LinearLayout will have listener and will open...
When people migrate from Python to C++, they're often bothered by the fact that C++ strings don't support multiplication like Python's strings do. std::string does have a constructor that supports creating a string with one character repeated a specified number of times. But, if the pattern to be repeated is more than ...
I have a method that's called thousands of times during one process. Before optimization, it called the database on every execution. After optimization, it only calls the database when required. However, this optimization came at the expense of readability. Method before optimization: private function addHandleToOrg( $...
I have a generic Get function that returns a list of objects based on the name of the desired type of object. This has let to an enormous case/switch statement that delegates out to the specific Get functions for the given type. I'd like use reflection or something similar to avoid this huge case/switch. I can't direct...
I've written a function which takes input such as this: lines: [ { id: 1, name: "1" }, { id: 2, name: "2" }, { id: 9, superIds: [1, 2], name: "Shared…" }, { id: 3, superIds: [2], name: "2.1" }, { id: 4, superIds: [2], name: "2.2" }, { id: 5, superIds: [3], name: "2.1.1" }, { id: 6, superIds:...
I wrote an implementation of a directed graph using the adjacency list representation. My goal was to meet the big O requirements which I'd found here. Please let me know about any drawbacks of the implementation. package sample; import java.util.ArrayDeque; import java.util.HashMap; import java.util.HashSet; import j...
I am studying the techniques of data mining and data processing. I'm doing this through data I've collected and stored in a csv file. The problem is that this filed was very large, to the point of having as astonishing 40 thousand lines of text. Some of the algorithms in the rendering part are fast and agile, but the p...
Context I'm trying to write a function that drops a list of tables from a database (e.g., tables A, B and C). This function has the following type, it returns a list of booleans indicating whether each table was successfully dropped: dropTables :: (IConnection conn) => conn -> [String] -> IO [Bool] Now, imagine table ...
I'm new to both PHP and OOP and would like some constructive feedback on a class I made. I have a "main account" login system already setup and working; when the user logs in they're presented with a list of games. This code logs said user into a specific game. I have a separate database for each game, plus one for the...
The program below correctly calculates factorials, until the limit for an unsigned long long integer is exceeded. My question has to do with loops and exiting loops. The program uses one infinite while loop and the break statement to exit 2 while loops. Do working, professional programmers handle loops this way? If not...
I am learning about Tasks and also writing PowerShell cmdlets in C#. I found that connecting to remote machines was very slow, so I wrote this bit of code to speed it up using Tasks. I am hoping to get some feedback regarding the parallel processing and any other pointers in general. The code is committed to a Github r...
protected static String[] applyInterleave(String interleave, int lengthOfSequence, int numOfPermutations){ String[] interleavedPatterns = new String[numOfPermutations]; char[] pattern = interleave.toCharArray(); StringBuilder interleavedPattern = new StringBuilder(""); for(int i = 0; i < numOfPermutati...
So I'm working on a patch for the python interpreter where you go through the list and look at the types of the elements and try to use optimized special-case comparison functions that are much cheaper than the default comparison function. This is the code that goes through and checks the list elements and then assigns...
While implementing the Retry & Breaker patterns I decided that the Breaker does more then it should so I extracted two responsibilities into their own classes. Here they are. I stripped out the Threshold to be only data: public class Threshold { public Threshold(int count, TimeSpan interval, TimeSpan timeout) {...
I just finished the book title class exercise for The Odin Project and I would appreciate some honest feedback for my code. The code is intended to be "test-driven learning", and therefore emulates test driven development Here is the test spec: require 'book' describe Book do before do @book = Book.new end ...
I try to solve this hackerrank using Haskell but not sure if I use Data.Map corretly. Problem in brief: given 2 strings, magazine and note check if you can make note from words in magazine Here is my code, which passes all the tests. import Control.Applicative import qualified Data.Map as M readInts = map read . wo...
I've been working in C++ for the better part of this year and am looking to improve my style and efficiency as much as possible. One thing I've been told is to work on commenting code to make it clearer, so if you have any suggestions about where I could use a comment to clarify what is going on I would be very glad to...
This function returns a list of all the beginning indices of a substring in a string. After finding the index of a substring, the search for the next one begins just after this index. def find_substring(substring, string): """ Returns list of indices where substring begins in string >>> find_substring('me...
I am implementing a game in python, which will give the user a sample encryption, and explain each step from plaintext to cipher. The task for the player is to decrypt a word by undoing each step shown above on the new word. For this, I have created an abstract algorithm which requires an encrypt function, and a curren...
I've implemented a simple scoped lock like this: public class ScopedLock : IDisposable { private ManualResetEventSlim mres; /// <summary> /// Constructor. Expects a ManualResetEventSlim with /// state to signaled (i.e. true), so that the first /// thread to enter a critical section can execute ...
The last question about sequence generators Growing potatoes in delayed sequences was only about potatoes. I thougt why not make it work with apples and oranges too so I made it generic. The base class got a new name and a generic argument and now looks like this: public abstract class GeneratedSequence<T> : IEnumerab...
I am building a small program for input handling so I can conveniently parse lines and tokenize strings. The token handling works right now but I have to malloc a lot in the main() to make it work. Sadly I can not malloc everything at once because then the strings inside will have NULL pointers. Maybe someone more expe...
Please help me improve my coding style. /* Author: Muhammad Awais Blog: http://uetianblogger.blogspot.com/ Description: Divide and Conquer Rule. Binary Search like algorithm to find local peak.It may or may not find global peak of the array. Parameters: A[]= Array of elements i=starting point j=ending point Algorith...
I am very new to Perl and decided to work on a simple script that could solve a problem I encounter in my day to day work. The purpose of the code that follows is to search over a body of text and extract English case law publication references. There are quite a few flavours of reference style, so I have several expre...
I'd appreciate your advice. data file: https://drive.google.com/open?id=0B_UEM0TEmA_yeHJBZ0dzbV9Ca2c /* CNG213 Data Structures / Programming Assignment 1 - Sinan ULUSOY "A-Eye: Analysing Eye tracking Data" l1 is used for main list record l2 is used for sub list record */ #include<stdio.h> #include<stdlib.h> #inc...
From an unsorted vector of integers, I would like to keep only elements that are present an odd number of times and have them sorted. Below is an example of a working code. #include<vector> #include <iostream> using namespace std; int main() { vector<int> input = { 11, 3, 7, 3, 9, 3, 8, 11, 9, 3, 2, 9 }; ...
This is still my first week of learning C++, I solved the lower bound STL challenge in HackerRank Lower Bound STL but I'm having time exceeded issue for long input. I'm open to constructive criticism, ways to improve in terms of syntax, style and performance. You are given \$N\$ integers in the sorted order. Then you ...
This C++ Boggle board solver is intended to take in many boards one after another and score them. I would like comments on code style, whether there are C++ standard library features that I could use to streamline the code, appropriate division between public and private, etc. Download code Download dictionary file Bo...
To help myself learn macros, I made a custom version of the threading macro that lets you choose which argument the "thread" gets put into. My main concern is simplifying it, and making it more idiomatic, but anything notable is welcome. If anyone knows of a better implementation for insert-at, I'd love to know that as...
I just attempted the Maximum Element Challenge on Hackerrank. This question has been posted before in swift Swift Hackerrank Maximum Element in a Stack but it has attracted low views/no answers. Moving forward, based on the requirements of finding the maximum element, I used a vector<int> as my underlying data structur...
Project Euler 14 asks: Which starting number, under one million, produces the longest Collatz sequence? I've been trying to optimize this solution to execute in less then 1s. Agenda for first 50 eulers. Currently it executes in 1,2s for me, so I guess that I want it to be 20% faster. Any tips or other methods? from tim...
I am trying to write a constructor method that takes dd, hh, mm and ss as parameters and change it as a normal type of Time struct (e.g you enter 25 hours as the hh parameter, it changes it to 1 day and 1 hour). struct Time { public Time(int dd, int hh, int mm, int ss) { seconds= ss % 60; ...
Given a dimension \$D\$. We generate a \$D\times D\$ matrix with elements that start from \$0\$. For example, if we're given a dimension \$4\$ this is what our matrix looks like: $$ \begin{bmatrix} 0 & 1 & 2 & 3 \\ 4 & 5 & 6 & 7 \\ 8 & 9 & 10& 11\\ 12& 13& 14& 15\\ \end{bmatrix} $$ Now compu...
on my initial attempt of creating a duplicate files finder(see Duplicate files finder in C++ @ this code review site) I have finally came across the successful and optimized implementation of this code. The idea is same like the but I have made changes according to the advice of some professional here and also have fix...
As I will be deploying this script on multiple machines with the very same system Linux Mint 18 with rather same configuration, I would like to be semi-sure I won't screw things up much. This little script will run every day from crontab and will be logged into syslog. Conditions were: Code Readability Output Readabil...