instruction
stringlengths
71
71.9k
I've written a small C function to handle the builtin commands of a custom shell that I'm writing in C. Is it better to use a switch instead? int handleBuiltinCommands(char *input, int ret) { int built_in_command = 0; if (strcmp(input, "exit") == 0) { free(input); exit(0); } if (StartsWi...
I have finished the assignment but would love some feedback. Data.json contains news articles data. Requirements for assignment: Fetch the data and render it on the page. Initially the page should show only a list of titles fetched from the source. On clicking the title it should show the relevant image and conten...
Revisions: Revision 1 Revision 2 (you are here) Revision 3 png2jpeg is a simple command-line converter of PNG to JPEG. The source code requires the libpng and libjpeg development libraries to be installed, and can be built with a C99 standard-compliant C compiler. My intent is to ensure that the source code is readab...
I tried to create a secure and efficient PDO class. I would really appreciate your feedback to make it more production-ready. GitHub <?php /** * Class MySQLDatabase * This class is a database class for PHP-MySQL which uses the PDO extension. * @author Khavish Anshudass Bhundoo( https://github.com/khavishbhundoo ) ...
Pretty simple class but just want to make sure I've approached it correctly. public class DynamicArray<T> : IEnumerable<T>, ICollection<T> { private T[] _items; private int _size; private const int _growFactor = 2; public DynamicArray() { _items = new T[4]; ...
I would like to know if I did everything right and if there a way to do it more simple? Task: Task link to html file My main: package zad2; public class Main { public static void main(String[] args) throws InterruptedException { StringTask task = new StringTask("A", 70000); System.out.println("Task " + task...
I'm building a simple quiz app and wanted to make it more scalable by putting my code into an object. The parameters list looks a bit messy to me. Is this a normal way to use an object or is there a better way? Thanks // above here I have a JSON object with questions: var quiz = new question($('#quiz-container'), $('.a...
I have this funny program for playing around with 2D vectors: Vector2D.java: package net.coderodde.robohand; import java.awt.geom.Point2D; import java.util.List; import java.util.ArrayList; import java.util.Objects; /** * This class implements a vector. The tail of another vector can be attached to * the head of th...
I got a pretty large main function that I want to break up in smaller helper functions. Can you help me suggest what to break out into helper functions? The function is part of my own command-line shell and all the code is available on github. I think that a good helper function is for "builtin commands" (e.g. commands...
I have about a million records in Redis which I want to dump into Elasticsearch periodically. I just want to make sure that my script is decent enough in terms of speed and no memory leaks. 'use strict'; const redis = require('redis'); const bluebird = require('bluebird'); const request = require('request'); const ela...
My stack uses char data and is not tested. I use it to save command in a unix pipeline for my own POSIX shell. Maybe you can find a bug or a possible improvement. #define _XOPEN_SOURCE 500 /* * C program to implement stack. Stack is a LIFO data structure. * Stack operations: PUSH(insert operation), POP(Delete ope...
This allows enum values to be outputted as strings. But enum_strings is a type, not a map or a vector, so if the enum value is known during compile time, there will be no look-up time at all. If the enum value is a run-time value, then the look-up time is \$O(\log N)\$ due to a binary search being made through the pa...
This is my very first implementation of a full-fledged ADT, which could potentially be use-ready. Now, I'm still learning, therefore I would like to ask you what I can do to further improve the following code. #ifndef LIST_H #define LIST_H #include <utility> #include <type_traits> #include <stdexcept> #include <assert...
I would like to know if it is safe enough to create via JavaScript control of empty fields. Here is my example in detail: <script language='javascript'> function validate () { if(document.getElementById('title').value=="") { alert("Enter a Title!"); return false; ...
This code is to solve the problem as mentioned here: private void assignNeighbors(Node n){ ArrayList<Node> current = new ArrayList<BinaryTree.Node>(); if(n!=null) current.add(n); while(!current.isEmpty()){ ArrayList<Node> parents = current; current = new ArrayList<BinaryTree.Node>(...
I'm looking for ways to optimize a program in C++ I wrote to count all the duplicates in a string and print the duplicated letters and the number of times my program takes all 256 ASCII inputs and only prints the duplicates once with the max number of duplicates. I had a really hard time writing it and needed to ask fo...
Can anyone review the methods? If there are better ways to write a certain method I would appreciate it if anyone could tell me. public class Node<E> { E data; Node<E> next; public Node(E item) { setData(item); setNext(null); } public Node(E item, Node<E> Ref) { setData(it...
I'm trying to refactor this C# code that uses one true brace style (it's enforced). I'm coming to C# from C++, in the former I could've made x and y to become i and j with reference assignment, but in C# it's not possible. Should I take the (i_IsRow) condition to a method? it will have 5 parameters and 2 of them will b...
I am finally making the move to object oriented PHP. This has been something I have been quite reluctant to do, but I now feel that it could benefit me, and bring me up-to-date with current practices. The main problem I have is how to start, and how to do things right. Now, I understand that with programming, there are...
I've developed a template to modularize JavaScript code I write for client work. The example below is a simple class with 1 attribute and 3 functions. Rationale: Standardized constructor to add or modify settings/ options Functions as variables used later to return only "public" functions, all else are private Using l...
I have created a program to visualize the working of Newton-Raphson method to find the zeroes of a function: newton.m: % Dummy statement to avoid writing function in the first line and making it a 'function file' instead of a 'script file' 1; % The function to find zeroes of. % The function is specifically chosen t...
I'm a beginner working through an exercise on ruby arrays. Given a two-dimensional array with 0's and/or 1's, it should return an array with the non-diagonal surrounding elements of 1 changed to 1 if they are 0. That is a = [[1,0,0,0], [0,0,0,0], [0,0,0,0], [0,0,1,0]] should return [[1,1,0,0], [1,0,0,0...
I read recently that ENIAC originally was capable of 5000 additions per second. Naturally, I had to test my own laptop's capabilities and this became an instructive experiment in F#, which I suck at. So, I am looking for feedback in two areas: What is the most concise way to write this in F#, or at least most closely...
I'm solving the following problem using the Visitor design pattern in Swift: When a quote is requested or an appointment is booked we send out an email to the customer, and build an internal report about the the quote and the appointment. The content of the email and report are dependant on the customer's addres...
I'm trying to fetch records from table PaymentToken if its AccountNumber matched but AccountToken wasn't: select DISTINCT DTR_PT.Id, DTR_PT.AccountNumber, DTR_PT.CardNumber, DTR_PT.ExpirationDate, DTR_PT.CardHolderName, DTR_PT.AccountToken, DTR_PT.CreatedDate, DTR_PT.Active from Dev_NeoGateway_DTR.dbo.PaymentToken as D...
I recently wrote my first XSD Schema: <?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="mediums"> <xs:complexType> <xs:element name="medium" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <...
there is a other way to write in JS the switch statement , This code is working :) _update: function(oHtml, oConfig) { var _this = this; var oParent; if (oConfig.attributes != null) { oConfig.attributes.forEach(function(oAttr) { //debugger; oParent = o...
I'm learning Erlang. It's my first time with a non-imperative programming language. I've written a code and I want some thoughts about it: Is my logic easy to understand? Is my code idiomatic? Is my code well organized? Is my code using Erlang features correctly? My goal here is improve readability and functional-thi...
For responsive images I have come up with a first draft of how I would like to swap image sources depending on media query. This works fine and with the added debouncing function from Paul Irish the window resize event is also taken care of. Now what I am wondering is if I could write this even more concise and most of...
In this question, I asked for feedback on a class that provided my program with periodical signals. I have rewritten that class based on the feedback from the accepted answer. As this again uses a complex library I've never worked with before, I'd really appreciate some feedback! The class runs a function in a separate...
I'm a fan of elegant ways to condense code. I find this ugly. Been staring at it for a while, can't think of a way to write this with less verbosity (ok, short of shorter var names but that's not what I mean). What do you guys think? if angle < 60: red = 1 green = angle / 60 blue = 0 elif angle < 120: r...
I am implementing a very primitive threadpool with C++11 using mutex and conditional variable. The class ThreadPool is the main thread holder and will spawn a number of threads upon construction, and join all threads on destruction. The main thread adds task of type function<void()> into the queue and then wakes up any...
I have been given following problem to solve: If the integer is divisible by 3, return the string "Java". If the integer is divisible by 3 and divisible by 4, return the string "Coffee" If the integer is one of the above and is even, add "Script" to the end of the string. Otherwise, return the string "mocha_missing!"...
I'm writing an embedded application in C, and at one point I need to convert a float into an ASCII representation of that float, so I can send the ASCII over a serial port. The protocol the serial port is listening over doesn't like trailing '0's, so I'm writing a function that will remove all of the unnecessary '0's ...
N.B. The next stage of this project, which covers parsing filenames and checking numbers against the list produced in this question, is covered here. I have a list of company numbers (UK companies registered at Companies House) in an Excel spreadsheet. A CRN is an 8-character unique identifier attached to a specific r...
I'm trying to learn the Repository pattern, and I have some questions regarding my current understanding of it. All the examples I've been able to find of database repositories use ORMs, but for a number of reasons, I can't use an ORM in the project I am learning this for. So, when not using an ORM, where should the S...
I need to remove all occurrences of a digit from a number in a recursive function with this prototype: unsigned rem(unsigned num, unsigned dig); This is my solution: #include <stdio.h> // just returns 10 to the power of n int power(int n) { if (n==0) return 1; int res=1; for (int i=0; i<n; i++) ...
I'm dipping my toes in to RXJava for the first time. The function below works just fine but I can't help thinking it can be improved. For instance I'm sure that I'm unnecessarily creating a new List<Dish> sortedDishes when I could be performing operations on the exiting List<Dish> dishes that is passed in, I just don't...
I wrote a simple implementation of Conway's Game of Life in Java using 2 arrays and for loop and used StdDraw library for plotting generations. It turned out that algorithm works ok for little number of cells (e.g. glider pattern), but becomes terribly slow for big number of cells (e.g. random filling) even with small ...
/** * Returns the value of a nested property of source object if it exists. * Even if the nested property evaluates to false it will be returned. * If the nested property does not exist, undefined will be returned. * @param {Object} source source object * @param {String} path path without first dot e...
Simply, I call the script (brightness.sh) and pass a three character value as an argument. I've got commands to strip individual numbers for math processes, and then the final commands to apply the changes. The rest is just simple if-then stuff. I know I've got a lot of commands calling xrandr data, and that's slowing ...
I'm trying to change how our system generates PDF files. Currently I have a class for each PDF that goes through the model for the PDF and fills in the properties. I want to change that to a self contained class that can be called in the background through Hangfire. To that end I've settled on decorating the properties...
I came across this mathematical puzzle, where one really cool answer was a python script to brute force answers. Here's my take, which is essentially a translation of that to Java: public class TerribleMath { public static void main(String[] args) { findAndPrintSolutions(1, 20); } private static v...
I've made the following implementation of counting sort. I don't think that I understand the algorithm fully but this implementation seems to be working correctly. I've used the Counterdictionary from the collections module. It seems to be the best way to handle the counting part. But I haven't seen anyone using it to...
I just finished writing a program that captures temperature information for a patient. I'm looking for suggestions on how to improve the code that I have. Although what I have compiles and does what I want, I wonder if there is any methodology I'm using inappropriately despite it still working. Some particular areas I ...
I am currently using an iterator because I have to insert record in one table, get its primary key and add it to another table. But since it's a loop, it's very slow when data is very big. OPEN ITERATOR Fetch NEXT FROM ITERATOR INTO @AccountNumber, @CardNumber, @ExpirationDate, @CardHolderName, @CardToken, @CreatedDat...
I have created the following code to calculate Snell's law angles, based on Zoeppritz equations on complex plane. The code works, seems it is returning valid values, but after all the code just looks a complete mess. Maybe there are nicer way to deal with complex values and matrices using numpy. Any hints to make this ...
This is another pretty basic class I wrote for a library as I hate the way the default StringBuilder in .NET works. Essentially, I wanted to have the + operator, as well as implicit conversions to strings. (Rather than needing .ToString() all the time.) It's pretty small and simple, so there may not be a lot to critiqu...
This is the next step in my project to query Companies House records. The first step, retrieving and validating the company numbers to be targeted, was covered here and I will include that code at the end for context. In this stage, GetTargetFilenames, I need to parse the entire series of Corporate Filings (typically ...
I want to perform a filter on a DataGridView using 3 different TextBox. The solution below works, but does not consider very effective and good. Is there a way to improve it? private void textBoxCod_TextChanged(object sender, EventArgs e) { Filter(); } private void textBoxArt_TextChanged(object sender, EventArgs e...
Can you think of a reason the following extension should not be used in production, or a better way of implementing it: public extension Range { @warn_unused_result public func intersect(other: Range) -> Range { let ds = startIndex.distanceTo(other.startIndex) let de = startIndex.distanceTo(ot...
I have read CLRS Introduction to Algorithms book, now I'm on Elementary data structure chapter. I read about queue concept and try to implement in c. I have tested a lot it work fine, but I have a little doubt on its working. Please tell me this implementation is correct or not. #include <stdio.h> #include <stdlib.h> ...
In a programme that I am writing, I need to loop through all the instances of a class, the way I got around this was by appending every class to a list like below: allPeople = [] class Person: def __init__(self, name, age, height): self.name = name self.age = age self.height = height ...
I post the below code as review/answer to a question in codereview. (Custom Dynamic Array) however, seems the answer itself having issues looking at the comments that I received. I would appreciate your valuable review comments: public class DynamicArray<T> : IEnumerable<T>, ICollection<T> { private T[] _items; p...
i'm a beginner and this is the second program that i have written by myself from scratch, i wrote a basic snake game with PYgame but i didn't do it by myself, so anyway, what do you guys think of this? i want honest opinions, no sugar-coating ! does it have any problems? is there any improvements that can be done? impo...
I'm trying to create a simple way for current & future (non VBA literate) employees to accomplish some of the tasks I've struggled with. The first being Parsing cells containing Line Feed Characters. When reports are produced from Workday, sometimes they have to be produced for each item separately, and you end up with...
When I work a lot with objects, that implements IDisposable I am using this pattern, like shown here with a SqlConnection and a SqlCommand. private string _connectionString = ""; public IEnumerable<User> GetUsers() { List<User> users = new List<User>(); string sql = "SELECT * FROM [user]"; ...
I'm a first year uni student. We were asked to come up with code that can represent a simple two players dice throwing game (specifications are given below). I know as a matter of fact that there are many areas upon which my code could be improved. However, rather than asking other people to correct my code, I would mu...
I'm not entirely sure what code other people will need to see, if I miss something off that is important please leave me a comment and I will update it as soon as I possibly can. I have coded an A* algorithm following the pseudo code from Wikipedia. The problem is, from a relatively short route I am getting about 180 l...
In my ASP.NET MVC application, I am loading Discussion Entry records along with User info (who posted the entry), Badges (assigned to the entry), Reactions (made to the entry like Facebook-style reaction). I retrieve these records from an SQL-View (with 23 columns) via a stored procedure (executed within Entity Framew...
I'm reading this very good book, C# Player's Guide, to learn C#. I then plan to make video games with Unity 3D after. In one of the chapters, he asks us to make a (really) simple calculator as a console application using the switch statement: The program that we’ll make is going to be a simple calculator. We’re goin...
Just looking for more experienced programmers opinions on this code. It's a framework for making simple multiple-choice quizzes. I am aware that there is the potential to make the arrays dynamic, but at small sizes this shouldn't matter much. The formatting of the .txt files used to compose quizzes is simple- start a l...
Following up on @Vogel612's friendly advice from the vba-rubberducking chat room, I am posting my working code for open review. Thanks also to @Mat'sMug for the help! This will be my first task that I have completely automated via batch file scheduling, so I have included some spaces to pass error messages to the vbscr...
As I know it is not good idea to have so many pointers in c++ code. But I have written this simple implementation of linked list in c++ and there are many pointers in it, how can I improve that? Also as I tried I can not use functions in algorithm module on this linked list, how can I make this class compatible with th...
I wrote code which is doing query and insert inside while loop. $getall = mysql_query("SELECT `deviceid`,`uid` FROM `users` WHERE FIND_IN_SET(`bgroup`, '".$allbrgou."' ) AND `uid`!='".$from."'"); while($mdata = mysql_fetch_assoc($getall)){ $newto = $mdata['uid']; $result = mysql_query("insert int...
Here's a query I wrote trying to find all movies that three actors have been in together: select distinct Movie from CastMember where Movie in ( select Movie from CastMember where Actor = 1 ) and Movie in ( select Movie from CastMember where Actor =...
The assignment description for this code is this: Each time the user clicks the Circles button, randomly colored circles flow into the display and continuously change their shapes. Here is a screenshot of my program running: This is my first time seriously exploring the aspects of Java 8 development. Therefore, I...
I am a freshman in university. This Pac-Man-ish Game is my final Computer science homework. I know my code is not perfect and has so many to be improved. However, Compared to corrections of this game, I really appreciate to be given the hints or general principles that my code lack, which I could use in the future. Her...
This was my entry for a recent coding challenge for computing the in-degree of a tweet graph (the competition is over). The requirement was to compute the in-degree of a graph made from unique hash tags within a given window of time (rolling). Any hash tag (case insensitive) is a node, and two unique hash tags present ...
Requirement: For the input list of tuples to create single line output showing father of the family|spouse|child1,child2.... Input: input_list = [("David","Polly","Spouse"), ("Roger","Patty","Spouse"), ("David","Lily","Child"), ("Roger","Max","Child"), ("David","Sam","Child")] E...
I'm new to Clojure, and I'm writing some code that processes HTML. I'm parsing the HTML using clj-tagsoup and then trying to pull out the relevant bits with this function: (defn find-nodes [tag-prototype base-node] (letfn [(node-matches [tag-prototype node] (let [[tag attrs] tag-prototype] ...
My program takes 35 sec to run example 2. How can I make my program faster? def sum_keys(K, inputs, count=1): A, B, M, L1, L2, L3, D, R = list(map(int, inputs)) x = ((A*K)+B)%M y = ((A*K+2*B)%M) if K < L1 or count == D: my_list.append(K) elif L1 <= K < L2: sum_keys(x, inputs, count...
I wrote a Tic Tac Toe game from scratch a couple days ago. My AI doesn't always make the best moves, so I'd like some advice on how to improve it. I also hardcoded a move in a very specific situation to prevent it from losing, so I'd like some advice on that. I read about minimax, but I haven't learned algorithms yet,...
What improvements can I make to the following Pig Latin translator? So far, I've been wondering about the FlexibleInstances declaration, but I can't think of how to remove it (since it's required for PigLatin String in instances, which is required for me to use " " in the Monoid instance; I need the extra type argument...
Before posting this, I have spent the past 4 days tirelessly investigating the Internet and the different Stack Exchange websites on how to correctly implement the Unit of Work pattern and Unit Test it using MVC 5 + EF 6.1. So far, the implementation I manage to make it work was this one. Here's the actual problem: I a...
Homework prompt was: You are given two strings, a ‘parent’ string and a ‘query’ string respectively. Your task is to determine how many times the query string – or an anagram of the query string appears in the parent string. NOTE: There are a range of solutions to this problem. With a little thought, you can mass...
I was writing an implementation of Levenshtein distance in Python and I found my code really ugly. Have you any idea how to make it more elegant? import unittest import enum def seq_dist(first, second): Direction = enum.Enum('Direction', 'gap_first gap_second match finish') def find_dist(): dist_table...
A custom stream that is used to perform read and write operations directly into the page cloud blob public sealed class WindowsAzureCloudPageBlobStream : Stream { // 4 MB is the top most limit for page blob write operations public const int MaxPageWriteCapacity = 4 * 1024 * 1024; // Every operation on a pa...
This script checks what the current public IP address is. The plan is for this to run every 5 minutes or so, and then change some host file configuration depending on whether we the IP is identified as that of officeone or officetwo. Each attempt at retrieving the IP address (as well as each success/failure) is logged ...
Actually I needed a function which converts underscore to camel-case. But then I've had the idea: Why not extend the function so, that is works the other way around? Finally I recalled that there is a third case which programmers use: Pascal-Case. So I included that too. The function doesn't work perfect but as long a...
I implemented an OutputWriterService.class to write content in the same file multiple times. The writeToCsvFile method is called round about 50.000 times and includes a list of descrptions which also needs to iterate and write to the file. Is it a good way to instantiate a new Filewriter, BufferedWriter and PrintWrit...
My code right now look like this @contextmanager def smtp_connection(host, user=None, passwd=None, timeout=5): conn = None # smell here try: conn = SMTP(host=host, timeout=timeout) conn.ehlo_or_helo_if_needed() if user and passwd: conn.login(user=user, password=passwd) ...
I've just completed reading the game tutorial of w3schools and wrote a piece of code from scratch. This program basically creates a canvas element with a ball bouncing off the walls of the canvas. The user can also control the ball using arrow keys. I'm planning to make this into a small game by creating some obstacles...
I am learning PHP and have been looking into a suitable way to safely store password data in MySQL. Following advice from here (https://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php), is this an acceptable way to deal with passwords? The code is a very basic example and I haven'...
I was working on programming an 8x8 matrix LED display. In particular, I am trying to make a basic version of Pong, controlled by two switches, one switch for each paddle. A ball is generated and moves to one paddle and is reflected upon collision with a paddle. If the ball fails to collide with a paddle on the left...
Sorry if this question has been asked before, but I am having trouble searching for the answer I am looking for. This question is in regards to efficiency and overall C# standards. I have an integer that I manipulate by 1, either by -- or ++ depending on a user's input. I then use this integer as an index to grab an ob...
During the test process of a device, there is a procedure that sets a device in a state in which it is ready to be tested (typically by writing default measure parameters, 3G connection parameters and any other stuff that is requested to be configurable by the devices R&D team). The code below works but I don't like ho...
I have this program that computes a Levenshtein distance of the two input strings, their edit sequence, and the alignment: LevenshteinEditDistance.java: package net.coderodde.string.levenshtein; import java.awt.Point; import java.util.HashMap; import java.util.Map; /** * This class implements the Levenshtein edit di...
This problem is from HackerEarth: The Monk learned about priority queues recently and asked his teacher for an interesting problem. So his teacher came up with a simple problem. He now has an integer array A. For each index i, he wants to find the product of the largest, second largest and the third largest integer in...
I have started learning Java recently and was looking into some easy algorithms. I found the Binary Search Algorithm here I am trying to get better at writing good code for my solutions. I have used MergeSort for sorting the unsorted array first.Please give me your suggestions. import java.util.Scanner; public...
I wrote my string class. The code works, but could anyone tell if I am doing anything wrong? It is an exercise from the "Accelerated c++" book: Implement the Str class, but choose an implementation strategy that requires that the class manage the storage itself. For example, you might store an array of char and a ...
I'm new to spark and dataframes and I'm looking for feedback on what bad or inefficient processes might be in my code so I can improve and learn. My program reads in a parquet file that contains server log data about requests made to our website. I think it is pretty self-explanatory, the only parts that might not be...
I am creating a controller that will display a form and once the form has been submitted to store the item in the database. After the item has been stored the user will be redirected back to the main page of the site. I am calling this controller with: require_once("../app/controller/AddController.php"); new AddControl...
Haven't put one of these together since college. How does this look overall? public class HashTable<T, TU> { private LinkedList<Tuple<T, TU>>[] _items; private int _fillFactor = 3; private int _size; public HashTable() { _items = new LinkedList<Tuple<T, TU>>[4]; ...
I have a JSON data which can be an object/array of recursively nested object or array. The value of an array can not be null, but an value in a object can be null. I would like to return all combination of these keys and values through depth first search. For example: var data = { "title": { "original": "Hitchhi...
Here's a live demo to what my code does, it works pretty well: http://brainlessdeveloper.com/demos/javascriptdynamicshadow.html It's supposed to do what it does: it follows your mouse and rotates the items in the center depending on the position of your mouse. The following JS calculates at which angle relative to the ...
Here's a sample code that I made up : <?php class RegisterController { public $userRepo; public $blogRepo; public $mailer; public $avatarRepo; public function __construct(UserRepository $userRepo, AvatarRepository $avatarRepo, BlogRepository $blogRepo, Mailer $mailer) { $this->userRepo = $...
This is not meant to solve any insane real world problems. I just want to make sure my Set logic is right and the code looks okay. It feels weird implementing it with a Dictionary of dummy values but it seems that's how most languages do it anyway. What do you think? public class Set : IEnumerable { private...
I made a routing system for PHP inspired by Symfony's router composed of a few classes. First I am using Symfony's HTTP Foundations component. Then, I am emulating the classes in the routing component but with almost completely my own implementation (I did copy few lines). The whole system is not simple so I won't be m...
I wrote this block allocator for exercise and would love to get your reviews. Main features I wanted to have: Detecting buffer overflows with canary terminator. Being able to allocate arbitrary types with template allocator and allow types that may fit more than one blocks (continues chunks). #include <cstdlib> #incl...