instruction
stringlengths
71
95.1k
I'm trying to increase the speed of my application at the moment. My inserting/updating methods were opening every time a new connection which took too much time. I read that it's better to create a connection object and pass it to different methods. It worked fine but I'm just curious if this is a good practice. This ...
I guess this has been made a couple of times by now, but i wanted to take my chance on creating a simple generic linked list in c#. What do you think ? This is the main class. public class LinkedList<T>: IEnumerator<T> { private Node<T> head; private Node<T> tail; public T Current { get { retu...
I'm wondering if there is any way we can optimize the following code. Scenario is Library's active field should be true if it has any available book. class Book < ApplicationRecord belongs_to :library scope :available, -> { where.not(deleted: true) } after_commit :update_library_active, on: [:update, :create] ...
I am learning to program in Python and as my first project I decided to create a simple Tic Tac Toe game. The game is working properly now and I am wondering if there is anything I could do to improve my code. Notes: In my original code I am using pictures on buttons that allow to choose players, to draw moves and to ...
I have written a piece of code where I have a simple GUI with an Tkinter Canvas. On this canvas I draw an Matplot. The Matplot is updated every second with fake sensor data i simulate in an SQLite DB (just for testing at the moment). I reached most of my Goals for this test case. But a few Things i would like to have r...
This code is to gather a sorted list of IDs (first by ID, then by date) recursively from a directory that submitted a particular type of file (that, as you can tell, includes the word "Magic") and then outputs the IDs paired with the modified date (the closest proxy I have for the submission date) to a CSV. (Where I t...
I'm looking to solve the problem of setting the Owner property on modal dialogs in WPF, while using IoC and MVVM patterns. I've seen (and written) all sorts of hacks. To illustrate the problem, here's a naive example of a window with a viewmodel containing an ICommand which prompts the user. It works by having the view...
Background The following describes the real world problem that my code is intended to solve. It is may help you understand what the code is doing and why. I don't think this is strictly necessary in order to review the code, so feel free to skip to the section headed "Problem" I have an application that creates a seaso...
I am trying to learn Haskell doing some contest problems. I have worked a bit with the language but still have a very long way ahead. Right now I am working with a problem called Ants: An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of t...
Objective Plot the contour of the iso-doppler and iso-delay lines for a transmitter-receiver reflection on a specular plane. Implementation This Doppler shift can be expressed as follows: $$f_{D,0}(\vec{r},t_0) = [\vec{V_t} \cdot \vec{m}(\vec{r},t_0) - \vec{V_r} \cdot \vec{n}(\vec{r},t_0)]/\lambda$$ where for a given t...
I was wondering if I could get some input on how to make my code more concise, since I think in particular with the force simulation sections I have some repetition. And any other input to make my code more readable would be great. I have a mixing of jQuery and D3 but that is just a quick demo for putting some working ...
I started studying JavaScript about a week ago and I would like some opinions and advice on my code. This program just creates a canvas and instantiates 5 planets that orbit around a sun, giving them each a different speed, color, and size. It uses the p5.js library, the code can be run in the p5.js web editor. (You mi...
I am currently developing a Bullet Hell (shoot-em-up) game for my school project. I have implemented Object Pooling for my game to recycle mainly bullets. (Though I could use it to recycle enemies in the future if I do need to.) Currently I have tested this object pooling on bullet and it has worked. I am looking to re...
I'm trying to improve my code and algorithm to find out the longest word from a dictionary occurring as the sub-sequence in the given string. Example : For example, given the input of S = "abppplee" and D = {"able", "ale", "apple", "bale", "kangaroo"} the correct output would be "apple". Currently my algorithm comp...
I have written the following Repository in C#, using NetCore 2.2 and EF Core. I was thinking how to write properly the Search method according to the SOLID principles. This code gives a null reference exception when "Title" or "Genre" property is null. It means I will need to put an if to check for null values, and in ...
In several places I need to compute the next value, given a N: double size = 1.0 / Math.Pow(2, N); Since I won't be computing this value for N > 15 I have thought of the following performance optimization: public static readonly double[] RegionSizes = { 1, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625, 0.0078125...
I would like to get you opinion on this class, which is used to send HTTP requests (at that moment only POST method). It is working ok, but I would like to get response on maintainability, reusability, security, code formatting, etc... Class HttpRequest{ private $POST = 'POST'; private $PUT = 'PUT'; privat...
I have the Repository below, but I have noticed that there is a recurrent pattern try / catch which does not seem to be that clean, is there a better way to achieve or to extract that sort logic elsewhere? public class FlightRepository : IFlightRepository { private readonly FlightManagerDbContext _context; pub...
The original question can be seen here: Stack implementation in C++ using linked list Changes (with the help of Martin): Added copy constructor and assignment operator overload Changed return type of peek() to const T& rather than T (this prevents unnecessary copying of data) Changed return type of pop() to void; it n...
I've written classes Store, Cart, User that manages methods that allow the user to add/remove products from a shopping cart, as well as being able to query different descriptions about the item (id, price, quantity). The User class hasn't fully been utilized yet. I'm wondering if there is any way to make this more comp...
I am experimenting with JavaScript ES6 import and export and wanted to achieve the following: Use the import / export style of including JavaScript files. Import a class file and create an instance Import a class file that extends another class Expose functions to the index.html scope - call from an inline onclick eve...
I'm creating a filter in python/django. I want to make a datetime human-readable. You have multiple options: Plain Datetime ("04. Februar 2018, 18:18") (bools="False,False"), sentence Datetime ("am 04. Februar 2018 um 18:18") (bools="True,False"), onlydate Datetime ("04. Februar 2018") (bools="False,True"), sente...
Below is my code that 1) writes a CSV file with three columns of integer data (plus column names on the first line) and 2) reads the CSV file. I'm new to C++ and would appreciate some code review. Also, I'm bothered by the fact that my technique requires all of the data to be integers. I'd appreciate advice on how I c...
I'm working through the curriculum at The Odin Project. I recently completed the Etch-A-Sketch project and am looking for some help/feedback regarding my code. Specifically, I feel that the functions in my JavaScript contain too much repeat code. But, I'm having trouble understanding how to refactor the functions witho...
New to the C language. Which design mistakes have I made in my first C program? Or what can I improve? Any little detail is appreciated. Note: I have experience in multiple coding languages. (this is the beginning of my C journey) Description of the program: checks if a string/array of characters is a bit string. Exam...
I'm currently developing an application in ASP.NET Core 2.2 with Domain Driven Design. What you see in here is a Unit Creation page. A Unit is composed of competences. A unit must have at least one competence and its name must not be in blank. A Competence must have a descriptor, at least one indicator, and three evi...
The following code is a solution to a textbook (Bryant&O'Hallaron: Computer Systems A programmer's Perspective 2nd Ed) problem in bit-level data manipulation (attempted for the challenge, not a class). The function srl is not written necessarily in a practical manner, but within the constraints required by the problem...
After one year of learning coding by my own I just finished a little mowing robot simulation project. Because I have no one to show my code to (as already mentioned self taught) I'm uploading it here. I would be very happy to get some feedback to improve my skills and write cleaner and better code. I used the MVC ...
Lately, I was working on some experimental java.util.Set extension, IdSet: package idSet; import java.util.Collection; import java.util.Set; public interface IdSet<E extends Identifiable> extends Set<E> { boolean containsId(Object o); E getByElem(E e); E get(Object id); E removeId(Object o); ...
I wrote a header only class (actually there is a second one for data bookkeeping and dumping) to measure the execution time of a C++ scope without worrying too much about boilerplates. The idea being to be able to simply instantiate a class at the begining of the scope you want to measure, and do a single call at the e...
This is SQL Server 2008r2. First, here are some tables and data for test: CREATE TABLE [dbo].[MyOrders] ( [ID] [int] NOT NULL, [ref_type] [nchar](1) NOT NULL, [ref_num] [nvarchar](15) NULL, [req_cert] [nvarchar](255) NULL, CONSTRAINT [PK_MyOrders] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX ...
Test Case: Input- "I'm hungry!" Output- "!yrgnuh m'I" Approach 1: In this approach, I used a empty string and bind it with the input string reversely. public static class ReverseString { public static string Reverse (string input) { //bind the string to an empty string reversly var reversedString = ""; ...
I created a simple modal that when a user scrolls down a blog post, a modal pops up. If the user wants to sign up for newsletter, then a form pops up. The only external library I used was body-scroll-lock that helps mitigate some issues with modals/forms on iOS. I'm curious about the need to remove event listeners and ...
I came across a nice video on 3Blue1Brown's channel that highlights a very indirect way to find the digits in Pi. I'd suggest watching the whole video, but briefly: The setup is as above. A "small" body of unit mass is at rest on the left and a "large" body on the right is moving towards the left (the initial position...
I have implemented the Rosetta Code Rock Paper Scissors game in Red, but I'm sure that there are better ways to do every thing that I did. I would appreciate any feedback on this code, which does work according to spec: Implement the classic children's game Rock-Paper-Scissors, as well as a simple predictive AI (art...
I want to get two distinct sets of schema from a database without having to create multiple Connection/PreparedStatement/ResultSet objects. Currently, I have a helper method that queries the database, gets each individual schema, and then returns them together in one ArrayList - please refer to the code below. private ...
Now, there is a company list in which an element is an employee list in every company. I calculate the salary of employees in every company with a RESTful API one by one,. This is very slow, so I join 1000 elements to one list and post it to the service. import requests def _calculate_employee_salaries(employees): ...
I have to do a Bruteforce script, so mine is working, but is also very very low. My teacher gave me a small Shadow file and from the shadow file I have to find the original password (MD5 used here). I know that my code is working but I'm looking for tips and tricks to improve it. import hashlib import itertools #po...
I'm looking to create a wrapper for an API, mainly for learning purposes at work as "The IT guy". I've been trying to follow the PEP 8 styling guide and make my docstring as detailed as possible. I believe my code looks quite sluggish. I've tried to avoid duplicate code and multiple line sets of logic. Here's my class ...
I have substantially revised my earlier implementation, it now seems to be competitive with the standard C# ZLib implementation, increasing compression while being faster for moderate length inputs, and slightly slower for large inputs ( data dependent ) - see long initial comment below for details. It may also be com...
I'm writing a program that adds all network interfaces with multiple parameters to a list. I have written the following code, which should work out of the box on any Linux system with Python and ethtool installed: import imp import os import subprocess import re from enum import Enum class interface_type(Enum): ...
I am rendering a list from an array of objects. I want to check the correctness of the array before rendering. For that I am using typeof and null. In real situation the list comes from the API. Is it the correct way? and is there any better way to do it? const activeEvents = [{ id: '1', title: 'event 1' }, { ...
I recently wrote a full implementation of a range() operator with floating point values in Python, and I'm not sure if I've followed the standard pythonic patterns. From what I can tell, it works. I've written a few test cases, but they don't cover everything yet. I've also published this in a gist on github as well Th...
I've completed my first Python project. I created a basic guessing game first, with no extra features other than guessing and random number generation. Afterwards, I've watched python courses on Udemy and slowly I began implementing what I've learned. I have a name system, welcome screen, fully functional betting syste...
I've written a method to render a polygon in C# using the SharpDX libraries and would like a review of my code's maintainability and the documentation around it. The method works fine as is, but I feel that perhaps the documentation could be improved, or that there could be simpler and more maintainable method of execu...
I'm trying to parse data into a csv prior to a bulk transaction into Neo4j. I'm using vast amounts of data in the relationships and wondered if anyone could help in speeding up the transactions below. It's genomic data, with 2,000 samples, each with up to 3.5m variants per chromosome probably equating to about 40m va...
I've got an XML file with some info about hosts connected to my home network and I would like to create objects containing that info in a neat way, so that I can make some nice front-end application with that data later on. This is how I do it: Loading the XML Encoding it into JSON Making an array from the JSON Making...
I wrote a (max) heap in Haskell which is balanced after every (public) operation. Not based on any documentation. Focus is on: speed, that is the right time-complexities (not necessarily optimal); easy to understand, so no Maybe's, Monads or symbols a beginner is unfamiliar with. ******* 4 * *****...
An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times. The IsIsogram() method takes a string and returns boolean value. INPUT: anik OUTPUT: true INPUT: A nika OUTPUT: false Approach 01: Using Dictionary<T...
As a 'trying to learn Python' project, I am using ffmpy to stitch together a timelapse from a series of still images. I'd like the script to output a couple of formats for web use. This is what I have: #!/usr/bin/env python3 import datetime import ffmpy import os now = datetime.datetime.now() ydr = now.strftime('%Y')...
I have more than 20 sheets in Excel and one main sheet (all programs with 200 names). Each sheet has a column with names and 24 months (Jan 18 to Dec 18, Jan 19 to Dec 20). Each sheet names is a subset of the main sheet. Main sheet (all programs) has 200 names and 24 months (values to be calculated based on other sheet...
I could not find a compile time counter/accumulator to achieve something like the following: #define DECLARE_VAR(type, varName) \ type varName; \ ADD_TO_ACCUMULATOR(sizeof(type)); DECLARE_VAR(float, var1); DECLARE_VAR(bool, var2); constexpr int total = GET_ACCU_AND_ADD(0); static_assert(total ...
From what I've read, I should use abstract classes when I want to define behavior for a superclass, and I don't want to instantiate the superclass. So, I'm making a Blackjack game in Java, and I want a BlackjackDealer class and a BlackjackPlayer class. Would it be okay to make these children of a BlackjackPerson class...
As if this isn't extremely obvious, I am a new coder. My code works, but is quite far from ideal. I'm also not sure if there are unnecessary bits, since I've been trying to get this to work for a few days on and off, so I've started and stopped multiple times. The goal is to have cleaner code, with a #comment on each ...
This solution surpassed 100% of submissions for efficiency! My method was to recursively check surrounding values and change any contiguous "land" to "water". Is there a better way to write what I wrote? Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water ...
I've been programming for what is a probably a little bit and made a very simple logging system for my personal projects. While it works out fairly well so far, I would like advice on how to make it perform better and stuff I can do to make it more usable in general. Main questions include: Is my code thread safe? If ...
I needed to make a freight calculator and had to solve a bin packing problem. I utilized a github package. Basically with the help of my stack overflow question I made a class Method that Splits an array of packable items into the number of largest boxes that those items can fit into Splits the the item array into tha...
I have been studying Haskell by myself for about a little over a year. And I have been stuck at monad/monad transformers for quite a while until recently some examples I read online enlightened me. So I decided to try on the following problem with writing monadic Haskell code. The problem is to evaluate a string that ...
TLDR Python developer; first project in Go; looking for feedback :) Repo Overview I just started learning Go (need to use it at work). As a fan of project-based learning, I put together a small program to practice writing Go and setting up a project from scratch. As a Python developer, many of Go's elements are new to ...
I just deep dived to Python and I came with this Hackerrank problem: Create two class, Person with firstName, lastName, idNumber as its attributes with method printPerson() simply print last name and first name and id, and the derived class Student. The Student class has additional attributes, its score and an array wi...
I have implemented PropertyInfo GetValue and Expression Cache GetValue by Logic from Reflection vs. compiled expressions vs. delegates - Performance comparison,but I'm sure that there are better ways to do every thing that I did. I would appreciate any feedback on this code, which does work according to spec: MyLogic ...
I've seen tutorials of Unit Testing and I've never seen that IEnumerable<T> used as an argument of method. All authors use Repository pattern and Service layers to interact with data, that is, authors of tutorials get data in Service layer by Repository and there is no need to pass collections between the methods of Se...
I have created a cumulative profiler, meaning it runs a function several times in a row and prints the cumulative profiler results. it's python >= 3.6 specific, but you can remove nonlocal and the type hints for it work on older versions. import cProfile, pstats from typing import Union, List, Callable, Optional, Tuple...
I have a CSV holding a "flat" table of a tree's edges (NOT binary, but a node cannot have two parents), ~1M edges: node_id parent_id 1 0 2 1 3 1 4 2 ... The nodes are sorted in a way that a parent_id must always come before any of its children, so a parent_id will always be lower than node_id. ...
In the code shown below, I have created 3 classes. The first of these are an 'Payment' class and a 'Annuity' class, which allow the user to create objects representing individual or recurring payments respectively. The third of these classes is a 'Cashflow' class, which takes a combination of Payment and Annuity object...
Here is my code for making an Hour Glass pattern with odd or even input using Python. I think I could make it simpler. Here's the output example: And then, here is my code: def evenGlassHour(target): jsp=1 jtop=target jbot=2 jbotspace=int(target/2) eventarget=int(target/2) temp="" for i in range(eventarget): ...
I took a task from Codility to find longest sequence of zeros in binary representation of an integer. For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The n...
I have a thread-safe API for an observable Sensor. The concrete type of the Sensor is chosen in the configure method (strategy pattern). To avoid deadlock when calling the stopmethod, I had to use two mutexes. The first one is to protect the observers list obs_ and the other one is to protect the strategy pointer senso...
I’m using Redux and thunk, I have a list component class List extends Component { render() { //code } return( <Aux> <Button type="button" click={() => this.props.addNew(data)} btnType="add" > Add </Button> <Button type="button" click={() ...
The start of a simple Scrabble solver. What I have so far: Add a word to the trie Return a sorted list with the all possible combinations, based on the letters input Some basic tests Edit Since it hasn't received any answer yet... Added a joker letter, for getting the best possible words Please critique any and al...
I made a simple password vault in Java and I was wondering if anyone had any input on it. The code works fine, I just wanted to know if there are any improvements that could be made. import javax.swing.*; import javax.swing.table.*; import java.awt.event.*; public class PasswordVault implements ActionListener { s...
One of the app is inserting date in UTC format (column CreateDate). When reporting from this table, I used a difference in hours between the inbuilt GetUTCDate() and GetDate() and added the same to the CreateDate column. I was hoping to not worry about the daylight time. Is this approach OK? SELECT GetUTCDate() SELECT ...
To check out the cssv module i wrote a small programm which takes all xlsx files in a folder and converts them into csv files. Let me know what you would improve on this program. xlsx_tp_csv """ All xlsx files in the folder of the script get converted into csv files (One for each sheet). The names are created as excel ...
I've been assigned to use Dijkstra's algorithm in order to find the shortest path on real data, more specifically on Luxembourg's map. The map is an .xml file with the following structure. <nodes> <node id="0" longitude="4963454" latitude="621476"/> <node id="1" longitude="4959493" latitude="614350"/> ...
Please, review the code: const callback = (...args) => { console.count('callback throttled with arguments:', args); } const debounce = (callback, delay) => { let timeoutHandler = null return (...args) => { if (timeoutHandler) { clearTimeout(timeoutHandler) } timeoutHandler = setTimeout(() => { ...
I'm creating multiple Django apps with vote possibilities, so I made an app vote to handle all this votes. In my templates I'm including an ajax-function named vote. To know on which model I'm liking I add app_name and model_name to the vote function (I made some templatetags to get these values). In my views.py I use ...
I am trying to ensure that (once a cache item is populated) even if it's refresh object takes a long time to retrieve, the original cache item can be requested. using System; using System.Runtime.Caching; namespace LongCacheTest { class Program { static void Main(string[] args) { Ca...
I'm following the FreeCodeCamp "Build a Tribute Page" project. I'm sure I forced some flexboxes where they didn't need to be. Tried to apply some accessibility topics that were discussed in earlier lessons. Overall its a very plain static page, but I'm trying to get the basics down in terms of structuring my html page ...
I just recently finished the following problem on Leetcode problem. I know it's not the cleanest or fastest solution. I would appreciate if I can get some feedback on how to optimize the code. The idea is too add all possible prefixes into an array and return the longest possible prefix. I believe this is probably why...
I'm developing a API server in Go. My route handlers are becoming excessively long, especially when the response needs a lot of information. For the following response type: // StateResponse is queried by the client to get the entire initial // database state. type StateResponse struct { StatusCode int ...
This is a programming challenge I set for myself a while back to create an AI that starts with no knowledge of anything whatsoever, and learns as you talk to it. (It can learn stuff like your name, how to say hello, goodbye, etc.) I tried to use the least amount of hard-coded responses as possible. I'm happy that it wo...
I wanted to practice using templates since I have no experience with them, so I implemented these sorting algorithms. Selection Sort: template<typename Container> void selectionSort(Container& numbers) { for (auto iter = std::begin(numbers), iterEnd = std::end(numbers); iter != iterEnd; ++iter) { auto ...
I am trying to find all primes less than 2,000,000 and sum them together. My code currently takes 1'36" to run. Is there a faster way to get my solution? The logic I am following in this code is make a list of all primes I have found. Then check that every odd number less than 2,000,000 is not divisible by any of the p...
I'm trying to make a REST service using Spring Boot and Spring Data. I have written a query using join and have achieved the required o/p but I'm curious to know if that is a right way of doing it or I can do it with a better approach. Here is the query using @Query annotation: @Query("select b.bookId, b.bookName, a.au...
I have been learning data structures and dynamic memory allocation in C. As a learning experience, I have written this linked list implementation. I really appreciate the feedback I've received on the previous code I've posted here and would love to hear any suggestions you all have on improvements I can make to this. ...
I recently began learning C# and I picked up Head First C# as a starting point. One of the first projects they have you build, without the code provided, is a racetrack betting app. The project first gives you the requirements, as well as some suggested implementations. I did not follow the suggestions too closely thou...
I'm working on a simple statistics problem with Pandas and sklearn. I'm aware that my code is ugly, but how can I improve it? import numpy as np import pandas as pd import matplotlib.pyplot as plt from datetime import datetime from sklearn.metrics import mean_squared_error from sklearn.linear_model import LinearRegress...
The question Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array. My java solution boolean almostIncreasingSequence(int[] sequence) { Integer[] arr = new Integer[sequence.length]; for(int ctr ...
I am using .NET Core 2.2, EF Core and C#. I have created a web API project. I was requested to do an Upsert (insert or update). The entities structure is: Movie User Rating: this is used to give a rating to a movie, so a new rating will have the MovieId (from Movie) the UserId (from User) and the Rating value. In th...
Purpose ObservableCollection<T> is not strictly a WPF class, but its intended purpose seems to be for use in WPF. It's the standard implementation of INotifyCollectionChanged, an interface which is special-cased by some WPF widgets to provide efficient UI updates and to maintain state effectively. For example, if a Lis...
In this code I have declared myPushData, myPushDataFilterd and myPushDataFilterd2 variables which are using in code. I am thinking this code could be more easy & short private async void SendPushNotificationHwCreate(string orgId, string classId, string sectionId) { var myPushData = new List<pushTokens>(); var ...
I tried my hand at making a numbered line list. I would like some feedback on my use of CSS and if this approach (using a numbered list) is considered a good solution. body { background: black; } .terminal { background-color: black; padding: 0em; width: 70em; color: #99ffcc; } .terminal li { backgroun...
I have been making C# software to write PDF files. It's intended to be simple to use, compact, efficient and also reasonably simple to understand, maintain and extend as required. The basic functionality supports multi-column layout with word-wrapping and justification, and the standard fonts. Currently, additional c...
I implemented KMP pattern matching algorithm in Scala. My code works but it looks more imperative and a scala translation of C/C++ implementation. I am not able to figure out how to manage multiple indexes and then update them conditionally. Following is the code with some explanation, kindly suggest how to write it in...
I made this code because, I figured that it might be an interesting concept, and that it would be nice to see it work. It enables the toggling of strict mode in any string of code. It even allows you to set a scope to run it through, although it does use eval. Examples: toggleableStrict("var a = 1; console.log(b) 'tog...
I have Python code to copy the Files locally on the Server from one Directory to another using rsync and subprocess module, this is just in continuation of the post from this post where I tried to get various insight but opted to use below code finally. Please advise if this further can be improved or optimized in pyth...
This is a code for an android thread. This is a tcp server and gets data from socket, maps it to an object and sends that object back to the main service. If there is anything I'm doing wrong or if something can be done better, I would really appreciate comments. public class SocketManager extends Thread { Handler...
There is a web app. My first attempt to use NHL API have been reviewed here. I'm interested in any kind of refactoring of this code. But I have some questions that I want to point at specifically. First of all, is this a right approach to have all this dirty work for a 'views' in a 'services.py' file? I started with ju...
The following function receives a vector of positive integers and list of brackets. The function returns a data frame with a logical vector for each bracket indicating whether a given element of a vector falls within that bracket. Background Received arguments Vector x consisting of unique positive integers, usually c...
Inspired by this article. I've been trying to learn more C# and OOP. Here is my take on a genetic algorithm as described in the article. Here are some of the results flower jelly lighthouse beach It takes a picture, and generates 10 images composed of 32 random rectangles. It scores the 10 images based on th...