instruction
stringlengths
71
71.9k
Previous iteration. I think this is about as good as it's gonna get, but just for kicks, let's do one more round of iterations. As before, it's a very simple substitution from Brainfuck to Ruby, with fancy things like joining duplicate lines into one and indentation. Some things that bug me: The regex (/\++|-+|<+|>+|[...
Every once in a while I need to get some random computer thing done; so I write something to do it for me. This is one of those. It needed to be able to send text to, and receive text from, a server - without blocking. I am asking for feedback with the premise of what kind of code this is: A one-use hack. #include <std...
I'm developing a WinForms app to manage some settings and profiles for multiple video games. The list of video games is specified by the user, and I'm trying to figure out how to properly maintain that list/collection throughout the lifetime of my application. I decided on an XML file to manage the games list which loo...
Using PHP and jQuery, I was able to make this countdown timer. I've searched various books and obviously on Google, but couldn't find this type of approach as used by me here. I sincerely feel there is something wrong with it. Can anyone tell me if this is the right approach? <!DOCTYPE html> <html> <h...
I'm trying to create a program that creates a record of how many times letters appear in a given string (ignoring blank spaces) using recursion. s = "Hello there this is the string" new_s = "" for i in s: if i != " ": new_s += i new_s = new_s.lower() com_dict = {} def merge_count(s): global com_dict ...
I'm working on a networked game. In this game, the base entity is called an actor. An actor can either be replicated or local, with each instance having a "replicates" field that represents this. When managing a scene, a collection of actor must be maintained. My problem is finding a suitable solution to this. Right no...
I have a UIScrollView full of vertically stacked subviews which I want the user to rearrange as they desire. I've implemented a UILongPressGestureRecognizer on my UIScrollView to successfully move the items around. The more difficult part is when the user brings their finger to the edges of the scrolling area, the UISc...
The Stocks Problem: Given an array of n integers representing the price of a stock over the course of n days, determine the maximum profit you can make if you can buy and sell exactly 1 stock over these n days. My solution is using the same approach as the merge sort algorithm. It is implemented using Java. I a...
I try to create a private chat with Python but I don't know best practice. It's only for study purpose, I'd like understand the logic behind a simple private chat with socket and the best mode to implement it with no framework. For now, It's not important to check for example if username has > or other, only socket pro...
I wrote a class to return the number of whole weeks between months in the same year. I need suggestions on my code. public int year; public String m1; public String m2; public Solution(int Y, String A, String B) throws ParseException { this.year = Y; this.m1 = A; this.m2 = B; String dateOneInput = y...
I have the following code to extract results of an airline web service. I am wondering if there is any better approach to this. The code is supposed to ignore any flight that has more than 1 transit. All retrieved results from the airline web service are in the AvailabilityRes class. for (int i = 0; i < availabilityRes...
I have a class that creates user accounts and to avoid SQL injection attacks, I am using the following functions to sanitize both the user name and password inputs: $admUsername = filter_var($_POST['admUsername'], FILTER_SANITIZE_STRING); $admPassword = filter_var($_POST['admPassword'], FILTER_SANITIZE_STRING);...
Recently, I got a very interesting task: to realize the hash table that works in multi-process server in common memory, each element of which must have a TTL property. It was suggested to implement the TTL, as an additional process that walks through the table every second and corrects the TTLs of elements. I think thi...
I am new to HTML and programming in general and am currently working on setting up my first website. For this I created a couple of PHP pages with a separate file for each of them and in order to avoid duplicating code I tried to remove as much as possible from the pages header and saved this in a separate header file...
The below Python 3 program scans 4 files a.txt, b.txt, c.txt, d.txt and then outputs the read data into a file output.txt in a formatted way. The first line of each file is guaranteed to have a header and the second line of each file will be blank. I'm required to scan those four files. Program: def main(): with op...
I've been working on a safe inserting method for a while, and I think I've found a pretty secure way to do this. Would you CRitters mind taking a look at it and maybe give me some tips to improve my script? function dbRowInsert($table, $data) { require_once('../config.inc.php'); $buildData = null; $countL...
I have this method: public void AddNLogConfigurationTypeTagret() { var filePath = _loggerModel.file_path_pattern.Replace("\\YYYY\\MM\\DD", ""); var dateTime = DateTime.Now; filePath += "\\" + dateTime.Year + "\\" + dateTime.Month.ToString() + "\\" + dateTime.Day; var filePattern = _loggerModel.file_name...
I have a dialog that houses 6 security questions and 6 security question answers. I want to pass the data the user selects and enters from the view to the controller to save the data in session. Right now, the code works perfectly but it is a mess. I am passing 12 arguments to my controller action! I am validating the...
Prompt: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued...
I am creating a jQuery plugin to be used to stick the headers and footers of tables (or other list data) to the top and bottom of the viewport while scrolling. (i.e. scrolling down the page, the header sticks to the top of the viewport and footer is always visible while table is in view) Example: http://jsfiddle.net/kb...
I'm new to VBA and am trying to write a macro to move data from an exported file to an excel template. The code below works, however I have to add many more ranges of data and am worried it will be hefty to run. Sub MoveData() Dim fileName As String Sheets("Cover").Select ...
This code is my solution to this Reddit challenge: Description: NASA has contracted you to program the AI of a new probe. This new probe must navigate space from a starting location to an end location. The probe will have to deal with Asteroids and Gravity Wells. Hopefully it can find the shortest path. Map and Path: ...
I came through a question on Stack Overflow, which shows this array structure: array (size=4) 0 => array (size=3) 'id' => int 1 'name' => string 'Anniversary' (length=11) 'parent' => int 0 1 => array (size=3) 'id' => int 12 'name' => string 'New arrives' (length=11) 'pa...
I've got a Python script that traverses two file trees, checking all .wav files for duplication. I'm still an undergrad, and have never worked with audio before. I'm not entirely sure this is going to be a valid comparison. I lost the SO answer I was using as a guideline, but the general idea is to split the audio int...
This is my code I made that extracts data from a .csv file stored on the web. My sheet called 'New Data' stores this data for 2 days. I store 2 days worth of data so that when I run it next time, it pulls the data from the web, compares to the data I pulled yesterday, and then places any of the data that doesn't match ...
I was looking for questions that might be asked in a technical interview and I found this one: Write a function that determines if two integers are equal without using any comparative operators. I'm using Java and my solution was to wrap the ints in an Integer object, convert that Integer to a string and return: (fir...
Related to Resx Translation Helper, V.2.0 Remove Files Window First, I implemented the changes suggested in my last question, then I changed my entire code base to support editing 1-N Resx files. So, this question covers the main window. In particular, I wasn't able to remove all the code from the code-behind, and I ...
Related to Resx Translation Helper, V.2.0 This is the code for the Remove Files window. I was able to keep code out of the code-behind here, but I have a feeling I botched something else. IDisplayOpenFiles.cs: public interface IDisplayOpenFiles { object DataContext { set; } event EventHandler Closed; voi...
I am writing a program that needs to retain specific data but that should not be easily readable. I am in no way very skilled in crypto but I wrote this class that takes all of the data in and then returns the AES encrypted strings. Is this an appropriate way to encrypt the data for storage in XML? public class Crypto ...
Following Data Science from Scratch by Joel Grus, I wrote a simple batch gradient descent solver in Python 2.7. I know this isn't the most efficient way to solve this problem, but this code should be running faster. How can I speed it up? My gut is telling me that mse_grad2 is the problem... from __future__ import div...
I was wondering if this code could be optimized in any way? For instance, could I use a for each loop here? Are there other ways I could write this which would make it easier for me, or the person reading it to understand? public static void printFactors(int factorsOf) { for (int i = 1; i < factorsOf; i++) { ...
I'm new to C# (coming from a JavaScript background) and it seems like this code could be greatly improved. This SQL query: SELECT RegionString,SubRegionString,CountryString,COUNT(*) AS size FROM table GROUP BY RegionString,SubRegionString,CountryString Returns: RegionString SubRegionString CountryString Size --------...
I have the following script in Perl that does the following: Prompts user for time in epoch. If user enters '########', the query will look for all reports generated after that date/time. If user does not input time, it will just look for all reports in past day. Connects to a database, runs a query to receive reports...
I have two arrays, each with shape (1, 51, 150, 207) I need to add them such that: newarray[0][0][0][0] = array1[0][0][0][0] + array2[0][0][0][0] newarray[0][0][0][1] = array1[0][0][0][1] + array2[0][0][0][1] for every element in the array. Currently I'm creating a new array using nested while loops but this approach ...
I'm new at groovy, and this is my first time writing a database connection script. It may seem like example code, but it is more like test code. It works as posted, and I'm planning to use this as a model for a larger business application, so I want to make sure I do it right. Are there any groovy features that it coul...
There is a context menu that comes up when a user right-clicks on a node in a TreeView. They are then presented with the choice to either add what is called a "RWB" or an "AQ" node to the tree. Both of these types of nodes have several settings in them, all of which are identical, save for one: AQ nodes have their 'Ana...
I need to write a method to ensure that all of the nodes of a BST (Binary Search Tree) are valid. For a node to be valid, 2 things must hold: The left child must be less than the current node's value The right child must be greater than the current node's value. I decided to write a helper method that checks an indiv...
Google's Guava library has a great RateLimiter, but I also needed a way to limit on an irregular basis, such as if an API I'm using has been throttled. I basically built a wrapper around Guava's RateLimiter, only using the simple acquire() method from it. import java.util.concurrent.ExecutionException; import java.u...
Yesterday I posted a request for a code review. After reviewing the code and the reviews, and after some sleep, I decided I can do better. In fact I logged on with the intent of deleting the question just as the first review was posted; so I was stuck with it. This is pretty much the same program, but it is the result ...
This is a fun piece. I have this block of code here: if (minutes >= 60 && hours < 24) { return hours + " hours ago"; } else if (hours >= 24 && days <= 30) { return days + " days ago"; } else if (minutes <= -60 && hours > -24) { return -hours + " hours from now"; } else if (hours <= -...
I have been working on a mechanism to queue up strings coming into a system via a USART and have implemented it as a singly linked list. I have done my best to profile the code and its memory usage at runtime depending on the amount of data fed to the data structure, but can anyone see anything "wrong" or less than des...
I made some refactorings in my classes. The original code is in this question. In that question I receive the suggestion to create a Factory for the class BallEntity. I myself forgot that BallEntity is just a kind o 'factory' or 'builder' for a "Ball Entity". Just because Entities in an Entity/Component/System framewo...
I created a function which reads CSV file and displays those values in a graphical form using Highcharts. Although it works, I have to read the CSV file twice because first: I need to get all the dates for the date values I need to read it again through a function based on the filtered values Here's the snippet of t...
I recently tried a basic C++ implementation of a Trie, and was looking for some feedback on my code style/choices. In particular I was wondering if I'd made the right choice spitting the program up into header files and using classes instead of structs. Inside the main.cpp there is a very basic string permutation funct...
I've given the Rod-Cutting Problem a go with a non-recursive approach that use a cache instead, with a bottom up approach. For anyone who hasn't heard about the Rod-Cutting problem, it's defined as follows: Serling Enterprises buys long steel rods and cuts them into shorter rods, which it then sells. Each cut is fre...
After optimising my code it still seems pretty brute force and I am looking for ideas to fundamentally improve it. I have tried improving performance by: Avoiding creating substrings as much as possible - using while loop to compare string instead. Intelligently anticipating ends ie. start + shift + max < str.length...
I want to know if this would be considered a proper way to validate a form or if there is an easier way that I'm not aware of. I think I was reading somewhere that you are not supposed to use isNaN with AJAX but this seems to work for me. Can I just leave as is since it works or is there a better structure/system that ...
I have some code that's part of my music-js library, and most of it is very organized, using object-oriented design for my AudioAnalyser and Visualizer classes (this code has been updated since publishing but I haven't pushed the changes for several months). There's one static function though, for generating the HTML a...
What is wrong with this pattern which emulates AsyncTask functionality?: // on the UI thread final CountDownLatch latch = new CountDownLatch(1); onPreexecuteWrapper(); new Thread(new Runnable() { doInBackgroundWrapper(); latch.countDown(); } }).start(); new Thread(new Runnable() { @Override ...
In most of the range query-update questions, we are asked to update some range of the array with some constant_value which can be done using the segment-tree approach. For more optimizations we can use the segment-tree with lazy propagation approach. But in this question, we are asked to update given range with some...
I have have attempted to use generics and constraints to create functions that retrieve and save data from a number of similar objects. Each of these objects describe their own properties. When I use these methods for a particular Type I don't understand why I have to specify new() in the constraint and also create a n...
This is the new version of the dictionary program which I uploaded for reviewing here. I would be grateful if the program could be reviewed for all the points mentioned in the above link. #include<iostream> #include<fstream> #include<sstream> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #includ...
I'm new to Clojure and decided to read the book, "Mazes for Programmers". My first task, without reading any of the book, was to think of how I would create a maze. This is my first result and I'd like good, honest and even scathing critiques: (defrecord Cell [visited? valid-dirs open-dirs]) (defrecord Maze [cells]) (...
I have written the code below for inserting an element at the position specified by the user. I have seen the code in multiple books, and they have always used two pointers in the function that inserts the node at specified position. However, in my code I have used only single pointer. My code works fine, but I want to...
I would like to understand how to get rid of all the loops I am using in this code. I have a dataframe of 20 rows. I am simply counting the number of occurrences that the variables rs and occ appear together. Here is the data: d = structure(list(householdid.x = c("101366", "101366", "102481", ...
Problem I have a stream composed of 2 columns and 1000 lines: Column 1: contains the patterns that I want to find Column 2: contains the values corresponding the the patterns in Column1 I want to search for the patterns in column 1, extract their corresponding values in column 2 and save them in vectors. I actually h...
Are the words isomorphs? (Code-Golf) This is my non-golfed, readable and linear (quasi-linear?) in complexity take of the above problem. For completeness I include the description: Two words are isomorphs if they have the same pattern of letter repetitions. For example, both ESTATE and DUELED have pattern abcdca EST...
The solution was to be assessed, not just on completing the task but also on code quality and design, presence of testing, robustness, maintainability etc. Problem Statement Scenario Basic sales tax is applicable at a rate of 10% on all goods – except books, food and medical products, which are exempt. Import duty i...
I have a view that looks like this: @transaction.commit_on_success def view(request): do_stuff(...) if condition(...): result = do_other_stuff(...) transaction.commit() send_email(result) return HttpResponse(...) Assume everything with (...) can touch the database. There are curre...
Given [1,2,3], I wrote the following to get [[1],[2],[3]]: ghci> map return [1,2,3] :: [[Int]] [[1],[2],[3]] Is this usage of return idiomatic in Haskell? I'm asking since I could've also used pure instead.
I have a big (50k*150k) matrix with co-occurrences of nouns (rows) and adjectives (columns). As most nouns don't co-occurr with most adjectives, this matrix is very sparse, >99.9%, so I'm using the CSR format. For every pair of nouns I need to calculate the Jason-Shannon Divergence to asses how similar the co-occurrenc...
I'm writing a function to reverse a number in Ruby. IE, 314159.reverse should return 951413. Here's what I have, which works: class Numeric def reverse str = self.to_s.reverse if self.is_a?(Float) return str.to_f elsif self.is_a?(Integer) return str.to_i end end end I don't like the en...
I have a legacy system with a class with a lot of data. I am creating a web service that inserts a new claimant into that system for a contractor. I can not refactor the claimant object. I need help on how to refactor my tests. I would never leave this as is but I wanted you to have the raw code to speculate about. Cur...
I've been using Ruby for about a year now, mostly for small scripts with uses ranging from data munging to DevOps tasks. However, I am not intimately familiar with OOP (I appreciate the functional programming approach I'm often able to take with Ruby) and so I think my code is harder to read and debug than it could be....
This PHP class is to allow user to enter a URL of a remote image file and have it download the image to local server. It will be used in a Markdown editor just like Stack Overflow / Stack Exchange uses for their Markdown editor image dialog. To make it more reliable across different server configurations, since my cod...
I've created a JavaScript image slideshow, using only JavaScript (no jQuery). I want to become more familiar with JavaScript, which is why I didn't use jQuery. My four requirements were: It must work if JavaScript is disabled. It must be responsive. It cannot use jQuery. It must work in IE 8. The code works - I'm ju...
Here is the Assignment instructions: Create a Java class named HeadPhone to represent a headphone set. The class contains: Three constants named LOW, MEDIUM and HIGH with values of 1, 2 and 3 to denote the headphone volume. A private int data field named volume that specifies the volume of the headphone. The defaul...
This code will determine if three numbers are consecutive for any order they're supplied to the method (any permutation of [n, n+1, n+2] should be accepted). Is there any way to make this code easier for me to write, or make the code more efficient? Any feedback would be most welcome! I tried testing with 3! combinati...
I'm implementing a plus method that should work this way: 1 plus 2 // 3 "a" plus "b" // "a and b = ab" Here is my implementation: object MyMath { implicit class MyMath(a: Any) { def plus(b: Any) = { (a, b) match { case (s: String, s2: String) => s"$s and $s2" case(i: Int, i2: Int) =...
I'm practicing for technical interviews and I'm looking for ways to improve my answers/code. Please point out the flaws you see and how I can make this better. Task: Find pairs in an integer array whose sum is equal to 10 (bonus: do it in linear time) Pairs.java //Container class that will hold the indices of the pa...
This question was recently asked: Determining if three numbers are consecutive It intrigued me, even though it was broken. I have the following implementation I thought would be interesting, and I am looking for reviews on readability, usability, and for any edge cases it may miss, etc. /** * Determine whether three <...
The function should get some text on input and return a map in a following format: ("word1" -> 1, "word2" -> 2 ...) The keys are words from text and the values are representing the number of times the word appeared in the text. We take into a count only words which at least 4 characters long. Special chars are ignored...
The following code and test data works, but I have had to add delays between writes to MySQL otherwise it acts funny (especially on the target data set which is over 700 rows). The table is simply a number and value (the number is another table's 'foreign key(?)'. I am looking for suggestions on how I might reorganize...
I am completely re-writing the textbox GUI widget. In order to set the position cursor after the last character in the last line of a text, it is good if you know the exact column of it. So I created a small function that calculates this. It is meant to work sonicly. int get_last_line_length (char *string) { const ...
I was translating a script I had that would automate linear cryptanalysis of SP networks from Python to C++. For those who aren't familiar with cryptography, linear cryptanalysis involves finding relationships between certain input and output bits of a \$1 \rightarrow 1\$ array. What I'm doing is looping over all possi...
Either out of boredom, or my odd fascination with LINQ and SQL, this, thing, was created. Essentially, it provides list querying capabilities. At the moment, you can only query lists based on conditions, and sort them. Here's the source. py_listq.py import operator as oper class QueryableListCondition: """ A ...
I'm new to C programming and I recently challenged myself to writing a Tic-Tac-Toe program. I found that my code becomes lengthy very quickly with so many if statements. This code works as is (and I still wish to add more features). I just think there's probably a more neat/efficient way to program this. Any ideas on h...
I was inspired by this question from @AndyRoid to try and come up with some fast and accurate datetime calculations that didn't involve complex if/else statements. My hammer tool of choice was MySQL, because of its simple syntax and very common use on the web. This could easily be adapted to other DBMS, though. So, I...
The below code is working correctly, however, I am not sure if the combination of while, foreach and implode is really necessary here or if the same can be achieved much simpler. What I do here is fetching some data (text) from a db and the only thing I need is the results as a comma separated string. Now even though t...
In this program, the parent process creates a child process, then the child executes ls -l. The parent process waits for the child process to complete and then returns using return 0;. /*child's output redirected to file*/ /*sps, 6262015*/ /*Headers*/ #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<s...
I've been writing a program that accepts an integer as input and displays the number Pi rounded to that number. The only issue I see is the fact that the Math.Round method can only round up to 15 spaces and there's no try-catch for that ArgumentOutOfRange exception. I'm also not sure how safe it is letting your flow of...
I'm new to JS and trying to improve my code with the use of more organised objects. I have the following procedural code which I have converted to an object. It does an ajax load within main. Aside from grouping the methods (functions) for better organisation, what other advantages does this approach have? Is there a...
I want to read a list of elements and pass a maximum of 99 elements to a function for some logical operations. I have tried this with an array as an example and this code was successful in achieving my purpose. I just want someone to review it and help optimize it. /** */ package com.review.code.java; /** * i> Re...
I'm using Winforms and I find this pattern showing up in my code a lot. It works, but I'm unsure if it's best. The goal is to pass an IList of items through a view interface and then bind that list to a DataGridView in the concrete GUI class. I've been accomplishing this by keeping a private BindingList<T> in the contr...
I'd highly appreciate it if you can: Spot flaws, especially bad practices and suggest a possible alternative method. Spot inefficiencies and suggest how to perform that task efficiently. You may review my HTML/CSS as well. var addRecordFormVisibility = false; var addRecordForm = document.getElementById('addRecord')...
The code will ask for a directory and will then read the CSV file and then generate a file in that directory describing a social network for Pajek. Does anyone know a way to load this CSV file to a Pajek file faster in Java? Here's the csv file i want to load to a Pajek file. It contains 72180 lines, and looks like: ...
I wrote this code to check an internet connection and was wondering if this is the best way to do this check. public static boolean isNetworkAvailable(Context context) { boolean status = false; try { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECT...
Working on my SQL project at last. The concept is easy to use and integrate SQL into C++. ThorsSQL::Connection mysql("mysql://host", "username", "password", "databaseName"); ThorsSQL::Statement bigEarnerStat(mysql, "SELECT ID, Name, Salary FROM Employee WHERE S...
I'm using AngularJS and I have a watch task in my controller that needs to be dried up if possible. Basically it watches for state changes in my front end. I have 3 buttons: add, edit, and delete which will toggle these states. I only want one to be active at once. My buttons: <button ng-click="actions.add === false ? ...
Part 2: (Part 1) Working on my SQL project at last. The concept is easy to use and integrate SQL into C++. ThorsSQL::Connection mysql("mysql://host", "username", "password", "databaseName"); ThorsSQL::Statement bigEarnerStat(mysql, "SELECT ID, Name, Salary FROM...
I'm interested in recursive generation of trees in Python. For my eventual application, it's important that the trees be represented as a list of nodes (rather than say a dictionary, or an edge list, or some other format). Also, in my eventual application, each node of the tree will have between 0 and hundreds of chi...
I wrote my first Ruby gem, which is for testing code in the shortest way possible. Here's a usage example: require 'arrow_test' 1 + 1 # -> 3 arrow_test The code (including RDoc documentation): # Performs the logic of the arrow test. # # Example: # >> helper_arrow_test(["", "1+1 #-> 3"]) # => ["ERROR:\n ...
This method randomly increments or decrements (with equal probability) until either -3 or 3 are reached. I'd like to maintain printing the value of pos on each iteration, and printing the largest positive number max reached at the end of the loop. How can I improve this method using the Random() function? I know this s...
file = open("Speeders.txt", "w") import random, string, time Speeders = [] #Array while True: try: Distance = float(input("Enter a known distance.(Metres ONLY)")) break except ValueError: #Allows ONLY numbers to be inputted, anything else is rejected print ("Invalid input (Numbers ONLY)...
I would like to split a string on multiple conditions such as: After each /;/ After each /{/ or /}/ After each /\w+:/ but not after /\w+:\s+\{/ After each /#\w.*$/ I've found that I can keep a pattern and split before it with /(?=pattern)/ or split after it (if the pattern has a fixed width) /(?<=pattern)/ or split...
How can I improve this code for a dynamic and re-sizable array data structure? Array.h #ifndef _ARRAY_H_ #define _ARRAY_H_ class Array { private: int * m_ArrayContainer;//These two variables int m_Size; //work in pairs. private: void SetSize(int size); void AllocateMemoryOfSize(int siz...
This is one of tasks, which I had to do for the recruitment process at some company. Unfortunately they didn't like it so I've decided to share it here for discussion. CircleArea.h #ifndef CIRCLEAREA_H_ #define CIRCLEAREA_H_ //PI Number, with max precision for double (8 bytes) const double PI = 3.141592653589793115997...
I was writing a game in Swift and Sprite Kit and it is very simple. It works perfectly other than the fact that it gets a bit laggy sometimes. I'd like to use this experience as both a learning tool, and to get the 'lagginess' resolved. My code is relatively short, actually: import SpriteKit import UIKit import Foundat...
These are two of tasks, which I had to do for the recruitment process to be started in some company. Unfortunately they didn't like it so I've decided to share it here for discussion. Add up all the even elements of the Fibonacci sequence below 1000. In my solution it is a method fibSumEven. Write a recursive function...
I'm learning Rust, from a Python background, and while I've used languages like C and C++ in the (distant) past, system languages aren't really my specialty. I would just like to know if my code is sane, if I seem to have the principles roughly right, but I'd be happy to hear any improvements at all, particularly with ...