instruction
stringlengths
71
71.9k
I am new to programming, and think this code could be improved upon. Any suggestions? #include <stdio.h> #define size 10 void main() { int i,j,ii,jj,arr[size]={1,2,4,2,1,1,2,1,1,2}; int count=0, max_count=0, start_index=0, temp_start_index=0; for(i=0;i<size;++i) { for (j=size-1;j>=0;...
I wanted to see if anyone would like to review the existing code I have for a beginner program that simulates a battle. I have learned a heck of a lot while doing it, and I had a few questions regarding some things that I found worked, but I am not sure on the why of them working. Please do note that this is not finish...
In my ongoing attempts to become a better blog writer I have some written some more code that needs reviewing. Full Source: https://github.com/Loki-Astari/Examples/tree/master/Version1 First Article: https://lokiastari.com/posts/SocketProgramminginC This is a Simple Client Server implementation using RAW Sockets. MakeF...
In my ongoing attempts to become a better blog writer I have some written some more code that needs reviewing. Full Source. First Article. This is a simple C++ wrapper for Sockets. Here the bit I am not 100% happy with is needing to introduce a Socket.tpp file to hold getMessageData(). This is because the function is t...
This is the code I use to dynamically build error messages. Utility.h #ifndef THORSANVIL_SOCKET_UTILITY_H #define THORSANVIL_SOCKET_UTILITY_H #include <string> #include <vector> #include <sstream> namespace ThorsAnvil { namespace Socket { template<std::size_t I = 0, typename... Tp> inline typename std::enabl...
Problem CharGrid The CharGrid class encapsulates a 2-d char array with a couple operations. int countPlus() Look for a '+' pattern in the grid made with repetitions of a character. A '+' is made of single character in the middle and four "arms" extending out up, down, left, and right. The arms start with the middle ...
I've started to go through Node tutorials on nodeschool.io, and the second assignment was to write a program that will count the number of newlines in a file and print it out. My solution looks like this var fs = require('fs'); var file = process.argv[2]; var buff = fs.readFileSync(file); var str = buff.toString(); va...
I have created a Like/Unlike system. The user clicks one to indicate a "like", and clicks again to "unlike" it. Currently I do that like this: try { -- like $stm1 = $db_conn->prepare("INSERT into votes (post_id, user_id) VALUES (?, ?)"); $stm1->execute(array($post_id,...
There is a nice algorithm to randomly choose an element from a list in a single pass: Pass through the list keeping the element chosen so far (X) and the number of elements processed (N). When processing element Y, let X:=Y with probability 1/N. When nothing is left, return X. I implemented this using templates: templa...
I recently published a JavaScript module for NPM which is also available on Github by the name of rawiki-parse-csv. The code takes raw CSV data and returns an array. The method has one option to include the first line as a header in which case an object is returned within the array. If the option is not set each line w...
It is a basic calculator where the user inputs two numbers, and an operation and the program makes it into an equation and gets the answer. For example, if the user enters number 2 number 3 and tells it to multiply, it will display the answer as 6. I just want to know how this could be improved. Could I have used loo...
I was learning backtracking algorithms earlier today, and was excited and wrote this code for n-Queens problem. Being my first try at backtracking algorithms, I would appreciate if you guys could chip in some suggestions/flaws in my code. Also, I had a really tough time getting this to work - I struggled mainly in tryi...
I had the task to write a Lotto simulator. My program works as follows: To start, the user can type in 6 numbers. Then the winning numbers are randomly chosen. The program then shows the winning numbers followed by the numbers the user chose at the beginning. Finally, the user has the option if he wants to play again,...
The goal was to create a tool to help manage folders structures, and allow me to create templates of this folders and store them as a JSON template. The following functionalities have been implemented: Make a copy of a directory tree (folders only). Create a JSON template of the directory tree. Create a directory tree...
I've been preparing for interviews and picking up modern C++. A recent prep question I did was to find all combinations (or distinct subsets) of letters from a string. E.g. 'AA2'-> {'A', '2', 'A2', 'AA2'}. Note that the order doesn't matter. I would like feedback both on the approach and on use of C++ style/best pra...
The following code generates Diffusion Limited Aggregates on a two-dimensional square lattice. Some of the code has been omitted (e.g. support for differing lattice types and dimensions) for code-length reasons and due to the fact that the key thing here is optimisation improvement suggestions. The full code is on GitH...
I would like some feedback to the code I wrote for the card game War. While programming it, I wanted to make classes that I could easily use for other card games too (hence why some functions are actually unused). from random import shuffle import time class card: def __init__(self, suit, rank): self.suit ...
As the title says, simple quicksort to help myself get used to C++ templates and iterators. Main concern is whether there's a better way to template so that you can have a simple function (e.g. quicksort) that accepts any container type (specifically should I have some kind of assert or more complicated template to ma...
This question is part of a series solving the Rosalind challenges. For the previous question in this series, see The Genetic Code. The repository with all my up-to-date solutions so far can be found here. Problem: HAMM Given two strings \$s\$ and \$t\$ of equal length, the Hamming distance between \$s\$ and \$t\$, de...
Sita shortlists 4 gifts priced at r1, r2, r3 and r4 respectively. She wants to buy 3 of these gifts such that it doesn't exceed her budget of x. Input and Output Format: Input consists of 5 integers that correspond to r1, r2, r3, r4 and x. Output consists of 2 integers. The first integer corresponds to the min...
In my ongoing attempts to become a better blog writer I have some written some more code that needs reviewing. Full Source: https://github.com/Loki-Astari/Examples/tree/master/Version3 First Article: http://lokiastari.com/posts/SocketProtocols/ This is an extension to my previous work on Sockets and wraps the socket in...
I was wondering if someone could quickly skim over this for me really quickly and tell me if there's anything I could improve code-wise. What I have right now seems pretty big and clustered, and I'm almost positive that there's a way it can be compressed and made more efficient, and maybe even faster. I'm also hopeful ...
I have written a string parser that is designed to split a string by spaces, excluding spaces wrapped in strings. Here is some example inputs and outputs: | Rule | Input | Output | |------|-------------------------------|-----------------------------------| | 1 | 'f...
This question has the tuple_selection_sort<> template that sorts the variadic template of a tuple using a comparator (any template taking two types that has a value data member of type bool). If the following tuple... // sizeof: 1, 4, 1, 8, 1, 4 std::tuple<char, int, char, double, char, float> Is s...
My focus was to have clean, structured code. It has to be efficient. The display doesn't have to look that good. The circles do overlap and sometimes the word doesn't fit inside the circle, but those are problems aren't really my concern right now and I will fix later. circle.py import pygame import random # Define th...
I've written a model for an app that generates math facts kids have to solve by evaluating the operation and the difficulty you pass to it at initialization. I don't like how I am repeating the code that performs the operations. For instance, performAddition() and performMultiplication() both perform the same thing. Ho...
I have made this code as my summers vacation project in Turbo C++ (I know its old and outdated, but that's what they teach us in our school). The code allows users to order different pizzas and even create them using ingredients they like. After that the pricing is displayed based on the amount and serving of the ingre...
In my ongoing attempts to become a better blog writer I have some written some more code that needs reviewing. Full Source: https://github.com/Loki-Astari/Examples/tree/master/Version4 First Article: http://lokiastari.com/posts/SocketProtocols/ This code replaces the hand written socket code with a libcurl wrapper. #in...
I made a bunch of functions and an enumeration, that together allow me to write something like a switch expression. It's not as powerful as Swift switch statements, since it's lacking pattern matching and I don't intend to use this in real code, it was just an experiment. Here is what I got: enum Caze<T: ForwardIndexTy...
Please note: An updated solution is here Let’s imagine that we designed more or less universal firmware for a microcontroller unit to be used across multiple types of devices. So we have something common in the binary data exchange protocol, and something different. The most common way to define incoming command pars...
This is part of a larger working system which I'm now trying to clean up. In the interests of making the system more test-able I'm splitting up the functions which can be split, but this 100-line function is messing me up. Short overview, this takes 5 inputs:- matchedslots - A list of 4 times (nearest-match actual rep...
I needed a better string formatting options like ToUpper and ToLower but I also wanted to be able to use the default formattings so I created a custom formatter. It's main purpose is to support a template engine where the user should be able to use different formattings like upper or lower case. I still however couldn'...
I had to write an algorithm that prints the partitions of a natural number in lexicographic order. Example of I/O: If the algorithm reads from partitiinumar.in.txt n=5 In partitiinumar.out.txt we should have: 1 1 1 1 1 1 1 1 2 1 1 3 1 2 2 1 4 2 3 5 The problem is that I have a time limit for the execution of the al...
When opening a rtc-stream a thread should always grab the newest picture because otherwise there would be a huge buffer with "old" pictures. Also a call from getMatFromStream() should never return the same picture. If there was no new picture it should wait till a new one is available. package apclient.model; import o...
I have a web application where I list files in the UI to many users at the same time. There are many people who monitor the files and process them. However, I don't want multiple users processing the same file. I am using simple memcache dictionary as data structure to interpret if it is locked. If the key "filename" i...
So I implemented a simple vec2 and vec3 classes, I wanted to know what remarks you guys can give me to improve it. I try to work with c++11 and 14 so remarks on that also will be really great. I tried to support move semantics but I don't really know if I did a really good job at it. You can create a simple vector like...
I have designed a C++/CLI wrapper library that allows C++ applications on windows, and other platforms that can load C dlls (e.g. Java via JNA or Python) to make calls to my .Net library. I was wondering if my dll import/export header, which will be used by external developers, complies with the current "best practice...
I have tried to write a more user-friendly AES CTR wrapper with PyCrypto, but I'm not sure if it's safe enough. I mean, by default there is IV=1 for CTR and in documentation it's said that IV is ignored anyway, so I'm not sure if I should use it or not (or if it's even necessary rather than overkill). This code should ...
Based on suggested reviews for Function to lock a file using memcache, I have modified the code to import os import shutil import memcache def addToCart(filename, username): ableToLock = memcache.add(filename, username) if ableToLock: # "ableToLock" can happen if the file is still present # or...
Below is a netstring parser I wrote in Common Lisp. The docstring contains the usage and return. (defun parse-netstring (netstring acc) "recursively parses netstring of the form size1:string1,size2:string2,size3:string3, acc can be any list, or nil returns -> (string3 string2 string1)" (if (equalp netstri...
I made a binary search tree implementation in C++ for my personal use in programming competitions. #include <iostream> using namespace std; struct Node { int key; Node *leftnode; Node *rightnode; string value; }; Node root_node; // Binary search tree string inline query_bst(const int key) { Nod...
Another one for some late night snack. - Knight's tour! Please provide your suggestions/flaws/optimization to this knight's tour backtracking code.. package com.komal.backtracking; import java.util.concurrent.TimeUnit; public class KnightsTour { static int size = 6; static int[][] chessBoard = new int[size][...
I have a function which is used to convert text (a CHANGES file) into HTML for reading. The function is essentially line-based: if the line is of this type, do this thing; if some other type, do that thing; etc. Further logic needs to be added before the fallback b.WriteString("<p>" + line + "</p>\n") but I wanted to ...
I wrote two template functions to take an integer type and output a float in the given range. One function takes signed integers and the other takes unsigned integers. The functions are used to normalize audio PCM data into a range that an encoder is expecting, such as [0.0f, 1.0f]. The source audio data can come in ma...
I'm writing a Caesar Cipher. To deal with characters being shifted to outside of the "normal" printable ASCII range ([32 126]), I'm having them "wrapped" to the max/min in the range. My current solution works, but it has a couple issues: It involves a couple repeated lines. The (- max-code (rem (- max-code char-code) ...
So, I took a stab at the ole C# Card Shuffle. I wanted to create my own genuine solution rather than copy someone else's. Any advice? public class Program { enum Suit { Hearts, Diamonds, Clubs, Spades } class Deck { public List<Card> Cards { get; set; } ...
I'm learning C++ and thought I would try my hand at writing a basic program in modern C++. I'm always looking for ways to reduce my code to STL algorithms and simplifying areas that would require refactoring. I'm also trying to make my code as readable as possible. Limitation I can't modify the precision in std::to_s...
In my company I follow the following workflow. (I think it can be defined a kind of 'Continuous Integration'.) Workflow: We have 3 fixed branches (staging/master/production) Every push to staging or production automatically deploy to staging/production server. We use git in the following way: (suppose I'm working ...
Given a graph \$G = (V,E)\$ with a unique labeling of each vertex, let the transposition \$(i,j)\$ (where \$i,j\$ are the labels on adjacent vertices) represent selecting an edge and swapping the labels \$i\$ and \$j\$. I would like to take a list of edges in a graph (a cube in this code), and determine the number of p...
I am trying to find the similarity between the two movies using Pearson correlation coefficient. The programs is working well for small inputs but for large inputs (like 100000 lines) it takes forever. My professor said it would take few minutes, but my program is executing forever. The input format: user|movie|rating....
The first Python class below is used in one of my current projects and is a totally different approach to how I normally would take things. Before I refactored the class I was not declaring instance-properties/variables. Instead the whole update procedure took place inside the def update(self): method (see: "The 'old s...
Recently I asked a question on Programming SE about public vs private methods fo unit testing, which generated a lot of interesting responses. I only posted a skeleton of the code there, as it was a question about structure and not about the code itself. However, several respondants queried whether my code might be ove...
I was writing the below section of code which adds some user properties to an Active Directory user, and got wondering - surely we can improve the readability of this : var firstname = newUser.FirstName; var lastname = newUser.LastName; var email = firstname + lastname + "@mydomain.com"; var dotname = $"{firstname}.{l...
Building complex applications can sometimes be a pain when extending or editing later on; I read online about the S.O.L.I.D principles of OOD, I want to understand if I am following a good approach that I can follow when developing the rest of the app. I need answers to the following questions Is the code well-documen...
This is a Swift program I wrote to calculate the sum of primes below 2 million, but it is tediously slow. I am curious about what makes it so slow. My theory is that copying the filtered array is the heavy operation. Any other ideas on how to speed it up? func initArray (p:Array<UInt32>) -> Array<UInt32> { var ...
Problem: I have seen a few questions around hangman. Usually this is done in a very hackish way, which usually can not be generalized any further. My thought or question is about the creation of the gown, which is a central part in any hangman game. I want to create the ASCII image below _____ | | O | /|\ | / \...
I have this tiny library for measuring the execution time in milliseconds and returning the duration plus the result: execres.h /****************** * File: execres.h * ******************/ #ifndef EXECRES_H #define EXECRES_H #include <sys/time.h> typedef struct { unsigned long long millis; void* ...
I'm implementing an interface to the Force.com REST API, with very specific ideas about which parts of the API I need. My problem is with testability of consumers of this API abstraction. The first thing I came up with was a Gateway, one method per action: interface SalesforceApiGateway { fun getLastUpdated(type: O...
This is my first attempt at a Model-View-Presenter pattern Winforms application. The model is a class that stores a bunch of primitives, and the view is a Form that provides a ListBox for selecting individual Data items, whose members are then displayed in text boxes. DataModel.cs using System; using System.Collections...
I started to write a library for linear algebra for personal use, but also for revitilization of my C++. Below is the first class of this library, a templated vector class, which is templated over the type of the elements as well as the size. It supports all common operations of vectors as member functions and also as ...
The problem can be found here. The file, poker.txt, contains one-thousand random hands dealt to two players. Each line of the file contains ten cards (separated by a single space): the first five are Player 1's cards and the last five are Player 2's cards. You can assume that all hands are valid (no invalid c...
This is one of the projects on freecodecamp. I would like a review on my code. Thanks in advance. Javascript: var answers; function formatSearchString() { var searchString = document.getElementById("searchBar").value; var words = searchString.split(" "); searchString = words.join("_"); return searchString; }...
I have written this class which sorts the array using bubble sort. Please let me know how can I improve it. (I don't like recurrent code in if/else statement) public class BubbleSort { public static void numbers(int[] array){ numbers(array, '<'); } public static void numbers(int[] array, char direction){ if(d...
I'm looking for feedback on the readability of my code and opinions on the pick_best algorithm. I do this stuff for fun when I have time, and never get a chance to have anyone else look at it. Hopefully, I can use this site to improve my coding. from itertools import permutations from random import randint class TTT...
I have a table that holds a user's weight for specific days. In my weights_controller.rb index action I can show these weights - no problem. What I also want to show on the index is the user's current weight, his weight loss over time as well as the timeframe he achieved this weight loss. Thus I created a weight_calcul...
I am building out a binary expression tree and shown below is an implementation of the tree's node. The node can be either a leaf or non-leaf, with leaves having Integer type values and non-leaves having ExpressionTreeNodeOperands type values. Leaves may have neither left nor right child nodes, and non-leaves must have...
The problem: Making a simple hangman game. This is a continuation of the following question: The right way to hang a man. There I just tried to make the ascii-gallow. Now I have tried to write the rest of the code for the hangman game, using the ideas from the answer. I have tried very hard to produce the following ou...
I have an action method in my Rails controller which filters an ActiveRecord model depending on the submitted GET parameters. Rubocop complains that Assignment Branch Condition Size is too high: 20.62/15. Is there a way to improve the following code? @measurements = Measurement.all @measurements = @measurements.where(s...
Up-to-date Version of this question: Binary protocol variability V3.0 Summary of the problem: Parsing an incoming stream of events from a binary communication protocol, if we have some variations in devices to support and would not like to have one huge switch to include everything. So, we use it this way: static v...
This is the latest edition of my PDF tool, previously mentioned here, here, here, and inspired by my first attempt at a MVP here. Major differences from previous editions: It uses the MVP pattern (as opposed to the god-tier UI that did everything). The background/separate thread is gone. I will consider adding it back...
This script prints the weather (fetching the information from a public API). If anyone could review my code and answer my question about code structure and how should I code in the right way, I really appreciate that very much. Questions: I used many functions to do just one specific things, and return their value to ...
I am able to save my GridView layout by storing a string representation of the items in the ItemsSource. I then load that string representation from the SettingsService and set the index of the items accordingly. The layout is changed by drag/dropping items in the GridView. Here is the code-behind: private void MainGri...
What do you think about this API for loading OpenGL textures asynchronously? My main concern is that the loader class executes code on the client io_service. This takes away some control from the user but should be convenient in most scenarios. I'm also thinking about using a texture on the stack and a shared_ptr that ...
I'm currently creating a utility that is heavily AJAX orientated. I have a page called ajax.php which is handling all POST requests. It switches by the provided command, checks all the arguments exist then passes it off to the relevant class e.g. case 'addperson': $name = $_POST['name'] ?? die('{"result":0, "data":...
I am learning fundamental data structures, and I want to know if this is a valid implementation of a heap. Can any C# features be used to improve or extend the implementation? In addition to heapsort, what are some applications of a heap? class BinaryHeap { /// <summary> /// A binary heap implementation use...
So I made this calculator the other day as a small project. I just wanted to know if I remembered the fundamentals. It works fine from the looks of it, but I know there are always ways to improve. package Main; import java.util.*; public class calc { @SuppressWarnings("resource") private static void circle(...
This code reads text files from some path, tokenizes, removes stop words, lowercases, removes punctuation and numbers, then writes the result to a database. # -*- coding: utf-8 -*- from __future__ import print_function import os, codecs, re, string, mysql import mysql.connector '''Reading files with txt extension''' y...
I have this mergesort implementation that has exactly the same API as qsort: mergesort.h: #ifndef MERGESORT_H #define MERGESORT_H #include <stdlib.h> #ifdef __cplusplus extern "C" { #endif void my_mergesort(void* base, size_t num, size_t size, ...
I'm currently working on a galaxy generator, and I was in need of getting the next that a random would use, for continuing the generation without using a blank generation (re-run previous generation). I made this little PHP class to do that and implemented a float rand() method. Please provide advice on improvements. <...
This C code will run on an embedded machine with a Linux OS. It should create data packets (ASCII) to repeatedly be sent to a UDP server. Just to give an overview about what functions should do: int heartbeat_processopts(struct secs *hbsec) Reads a settings file and fill a data structure with some options/configura...
Project Euler Problem 8 asks: The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product? Is there any better way to make my code more efficient?...
See the next iteration: Bare bones painter app in Java - follow-up. I have this tiny program for drawing: PaintCanvas.java: package net.coderodde.javapaint; import java.awt.Canvas; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.MouseAdapter; import java.awt.event.Mou...
I have an object which stores an app configuration in an associative array, as this: [ 'Database' => [ 'DB_SERVER' => 'localhost' 'DB_NAME' => 'adbname' 'DB_USER' => 'theuser' 'DB_PASS' => 'thepass' ] ] It could have more than two levels. And a function, get(), which receives a varia...
I have written a program that takes a linked list and then converts it to a stack. I would like a code review for my program. Thanks in advance. Stack.java /** * Created by Ninan John J P on 2/8/2016. */ public class Stack { int stackArray[]; int topOfStack=-1; LinkedList source; int stackSize; ...
This is code to merge two sorted linked lists. l1 and l2 are sorted. While calling the merge function via l3, I am passing l3 as an object by reference in that function. The code is running fine, but can someone suggest how I can code better, with regards to dealing with class objects and passing them in a function? #i...
I have the following construct for storing and restoring my applications settings to and from XML. public interface ISettingsProvider : ICustomXmlSerializableObject { void RestoreDefaultSettings(bool force = false); } where I use a wrapper for the XmlSerialization to prevent access from multiple threads at the sa...
This is an "entry" I made for the June 2016 Community Challenge to make a Chutes and Ladders generator. It generates a random number of chutes and ladders with a total delta of -50 and displays their start points, endpoints, and deltas. Some notes: The number of chutes must be at least 2, and the number of ladders at ...
I am trying to create a simple Hangman game. The game has an edit mode for first run in which the user has to supply 6 unique words. The game starts by shuffling words, then for every turn, it selects one word that the user has to figure out. The user has only 6 tries to get it right for every word. How can I improve i...
I'm very new to Erlang and I'm specifically interested in making my Erlang idiomatic (in other words, can you tell I don't know Erlang from this code?) and removing code duplication. I am not as interested in performance or the UI of the "game." This is a simple interactive Rock, Paper, Scissors game and I've been usin...
Edit 13 June: I have made a new and improved version here. Original Question This is a very rudimentary lolcats translator (it only works on the phrase "Can I have a cheeseburger") in Haskell. This is my first ever attempt at Haskell (or any functional programming language). I am sure that my code is absolutely atrocio...
I feel as if my scenario is fairly simple but that I might be overcomplicating it. I am searching through files looking for a special condition, that is where the method .all with arguments exists. In the real world that looks like: ba_mbn_programs = Program.ba_and_managed_bar.all(:conditions => "user_programs.user_...
I am new to Android development and I want to ensure I'm learning decent practices for doing things. Right now this is my database class, which currently allows me to make a new instance of the singleton, as well as create a profiles table, as well as add/retrieve from the profiles table. This is my code so far: publ...
I have the following scenario that I have not come across so far using Ninject. I have the following class structure (simplified for easy of reading :]). First the abstract base class for all IDocuments public abstract class DocumentController : IDocumentController, IDisposable { ... private IMessageBoxService ...
This is the first time I'm dealing with C# as I'm accustomed to Java sockets, so I do want your full review and anything you think I can accomplish better or optimize in the code will be very appreciated. In these few classes what I have tried to accomplish is a login and registration server based on C# .Net working as...
I have been writing PHP for a number of years but in a procedural style. I have always shied away from object oriented PHP because I just didn't understand it. However now I'm back for another go. I have a large web application which is written in procedural style PHP and as a learning exercise I would like to re-write...
Some code that I wrote and broke into 5 separate questions on stack overflow. Some guy wanted to query Google Maps receive some JSON and then for each result found within that JSON do another query. I didn;t quite understand what he wanted at first and so actually there is some superfluous code here but I thought it ...
I am new to Java so go easy on me, here is my code: import java.util.ArrayList; import java.util.Scanner; public class JavaApplication3 { public static Node root; ArrayList<Integer> solutionpath = new ArrayList<>(); public JavaApplication3(){ this.root = null; } public void insert(int id){ Node newNode = new Node(i...
I have a situation where I need to predict the input values for a form used to create a new model. The model is a "class report" that a teacher submits for a student after their class finishes and the values of the report I need to predict include the time the class started and finished. These are to be predicted based...
Summary: Parsing an incoming stream of events from a binary communication protocol, if we have some variations in devices to support and would not like to have one huge switch to include everything. Previous binary protocol variability V2.0. This version is way simpler and shorter. Also I removed all the interfaces and...
Inspired by this blog I went on implementing my own version as a F# learning challenge. It turned out to be quite different than the original (but somewhat faster for large samples). The first code part below defines some test types and function delegates: namespace FSLib open System // Test Type: Indexed Point in pla...