instruction
stringlengths
71
95.1k
This is a polyglot function I've made out of fun. The goal is to grab n arrays (or Javascript Objects) and 'extend' them in order to obtain a single array with all the values. This function runs both in Javascript and PHP. Please, try to ignore some kludges on my code. Here is my 'art': function array_extend() { /...
This is the second assignment for my CS2 course: Write a recursive C++ function writeLine() that writes a character repeatedly to form a line of n characters. For example: writeLine('*', 5) produces the output: ***** Write a recursive [C++] function writeBlock() that uses writeLine to write m lines of n cha...
I have multiple controllers and every controller has this error handler: if (error) { res.render('error', { error: error }); } Sometimes I have more than one: exports.update = function(req, res, next) { MyModel.findById(req.params.id, function(error, event) { if (error) { res.render('e...
I very infrequently use SQL. I need more experience, so I have created a data explorer query to find those users with most of any particular badge (have to edit the query itself right now to alter it). I like following best practices, so please feel free to nit-pick and really do this right (indentation, capitalization...
I need to generate a 64 bit unique integer in Java. I need to make sure that there is very few or no collisions if possible. I came up with the below code which works fine: public class TestUniqueness { private static final AtomicLong TS = new AtomicLong(); public static void main(String[] args) { // ...
I'm working on a project that takes in a video file and does some image processing on each individual frame. The first step in that processing is to take each source frame and generate three monochromatic images based upon the average red, green, and blue values of the image. If that doesn't make sense, I've drawn up a...
I'm trying to implement an alternative to python built-in open(), but safe for use in multi-threaded and multiprocessing environment. I'm using advisory locking, because all file operations in my application are performed using my locked_open() function and no other process is accessing that data. It is only required ...
This is a simple app for taking down a user's home and work address, the days of their commute, and the times they go to work and go home. The times and workweek are entered via TimePicker dialogs with additional buttons. An IntentService runs in the background with setRepeating alarms that call per the user's set time...
I am required to create a bunch of object nodes to an object: this.selectedText = e.text; this.clipNo = e.clipNo; if(!this.clipCollection.hasOwnProperty(this.category)) { this.clipCollection[this.category] = {}; } if(!this.clipCollection.hasOwnProperty("grandClipCount")) { this.clipCollection.grandClipCount =...
My Deck Class: (In case it isn't clear, a Card is just an object with two enums, one for suit and one for value). I'm particularly proud of the readability of this little bit if I do say so myself. public class Deck { private static Random random = new Random(); private List<Card> cards = new ArrayList<Card>(...
I have created this memory writer helper to ease the write into memory process and I want your suggestions regarding it. I am very new to C++ but have 6 years knowledge of .NET languages like VB and C#. #include <wtypes.h> class MemoryWriter { private: USHORT _currentIndex; LPVOID _targetAddress; template<...
I have a list of categories (in this example I used String but in my project I have a model) which must be sorted like this: on top we should have 2 categories which have a fixed position in the list (in this example (C, F)) at the bottom of the list we should have 3 categories which have a fixed position in the list ...
I recently wrote this JavaScript algorithm for removing duplicates from an array as part of a job interview process, but was turned down for the position after submitting the code. I didn't receive any detailed feedback from the company, so I was wondering if a more experienced developer might be able to explain what I...
I am writing a Tetris game while learning Haskell and I'm trying to make the following code more concise and easier to read. How can I improve it? Note that the function is not finished yet (There is no check for complete lines, for instance); I currently want to improve its readability. updateGame :: IORef InputsData ...
I have one button on clicking I need multiple things need to be done, so I went for AJAX and PHP: $('.go_nxt_lsn').live('click',function(e){ e.stopPropagation(); var user_id = $('input[name=user_id]').val(); var course_id = $('input[name=course_id]').val(); var taskName = "SaveActivity"; var subTask...
A student has a book containing 411 pages. She read a certain number of pages on the first day and created a rule to work out how many pages she had to read on each succeeding day. She decided that the number of pages to be read on the next day should be equal to the square of the sum of the digits of the page she...
I am trying to implement a 2D fighting game in Clojure both for fun and learning. Since the characters in a fighter game are essentially state machines, I constructed the following code: (defrecord Frames [frames id]) where "frames" refer to the actual datas (hitboxes texture-names and etc) and "id" will be an atom r...
A long time ago, I've written a method that would allow me to measure the amount of time a method takes to run. I've decided to tweak this method and make use of TPL since measuring a method may take some time. public static class ComparableUtils { public static T Min<T>(this T t1, T t2)where T:IComparable { ...
I am recently making a CMS and I need a secure login system, so this is my code. How is it? First: the HTMLcode for signup and login: <div id="login" style="display: none"> <input type="text" name="email" id="login-email" placeholder=""><br><br> <input type="password" name="password" id="login-password" placeho...
An interview question I got - Given int n, find the smallest number of square numbers that fit inside n. Example: Input: 24 Output: 3 (16 + 4 + 4) Input: 10 Output: 2 (9 + 1) Solution: public class Solution{ public static int solution(int number){ int squareCount = 0; while(number> 0){ ...
I wrote a simple class to cache data on a filesystem. The class also provides an internal cache using a static variable to avoid reading from disk for each request. <?php /** * object caching system */ class cache { /** * The *Singleton* instances * @staticvar cache */ private static $instance...
I thought of this implementation, and I want to get feedback from you.. what design would you use for printing first 100 prime numbers? I used the fact that, if the number is not divisible by any prime less than itself, it will be a new prime. ArrayList<Integer> list = new ArrayList<Integer>(); list.add(2); // ...
I am learning Java right now and am coding some simple programs to practice. Right now, one of my for loops has an inelegant way of ending the loop. I was wondering if there was another way to express what I want the program to do. Problem: Party Invitation Problem Description Number your friends 1,2,....,K and place...
This problem is from HackerRank (not a competition, just for practice) Basically what you do is take in two integers as a range and then finding the maximum XOR from a pair of integers in that interval. Here is my code for doing so (it passed all the test cases): static int maxXor(int l, int r) { int maxXor = l ^ r...
I have a large list of lists, where each list contains words/characters as elements, and each list is of different length and may contain same words/characters more than once, as for example: list_ = [['black', 'window', 'says', 'window'], ['dog', 'great'], ['after', 'end', 'explains', 'income', '.', '?']] I also ha...
The pattern I've come up here is for the AnimalGenerator itself, outside of the (abstract) Factory Pattern used within it. The factory classes themselves are not present in this code because that is not what I'm focussing on here. There are many types of animals, and AnimalGenerator::generateAnimals<Type>(num, int...)...
I'm scraping a title and a link from a website and placing them in a single array. The $i variable seems a bit wrong to me, or is it perfectly fine? $linkQuery = $xpath->query("//div[@class='news-archive']//a/@href"); $titleQuery = $xpath->query("//div[@class='news-archive']//a"); $data = []; foreach ($linkQuery as $...
In an Android project, I have a class whose job is to read lines from a file, and then pump those lines to a message handling thread, looping forever until told to stop. The main operation of this class (file reading + message sending) must be on its own separate thread, to run in parallel with whatever else the applic...
Below is the code I have written to capitalize all the words of a sentence except if The words belong to the littleWords list. The word would be capitalized if it's the first word of the sentence even if it is in the littleWords list. def titleize(sentence) littleWords = ["end", "over", "and", "the"] words =...
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index. The array may contain multiple peaks, in that case return the index to any one of the peaks is fine. You may imagine that num[-1] = num[n] = -∞. For example, in array ...
I'm looking to increase the conciseness of this code. I realize that I can use Joda (or Java 8's new date API), but if I were to keep this to just Java 7, any suggestions? (I care less about whitespace and formatting.) /** * Tests whether the date input represents * a real date in mm/dd/YYYY format that is after th...
I am taking Stanford's Introduction to Databases Self-Paced online course. I have gone through the videos in the SQL mini-course, and I am having trouble completing the exercises. The following is the question from the SQL Movie-Rating Query Exercises, Question 6: For all cases where the same reviewer rated the same ...
I made a few recursive functions for learning purposes which do a variety of tasks. Here is my current and functioning code: def separate(p,l): ''' recursive function when is passed a predicate and a list returns a 2-tuple whose 0 index is a list of all the values in the argument list for which the pre...
I have written the code to shuffle the elements of the array. Please let me know of any loopholes in the written code. package dataStructureInJava; import java.awt.SystemTray; import java.util.Random; import java.util.Scanner; public class ShuffleArr { public static void main(String[] args){ System.out.pr...
I found Python's defaultdict and OrderedDict incredibly useful, hence I attempted an implementation in JavaScript. As JavaScript objects only support string as key, it is not as powerful as the Python version. Can anyone suggest a way of using an object as a key in JS, like some kind of hash function? Also, is there an...
I have another Python issue, creating a frequency distribution out of a text matching a predefined wordlist. In fact, I work with more than 100,000 text files (each consisting of about 15,000 words), which I want to inread and accordingly match against a word/expression list (vocabulary_dict) of about 6,000 entries. Th...
Instead of picking a random pivot I'm shuffling the array beforehand. Does it count as randomization and is it efficient to shuffle or pick a random pivot and is my implementation pythonic? Problem Algorithm from random import shuffle def _partition(arr, lo, hi, pivot): p = arr[pivot] arr[hi - 1], arr[pivot] ...
I have a piece of code that I am not feeling comfortable. I don't want to block the UI Read operation works synchronously (reading may broke 50 ms rule) Save operation supports async (returns Task) I have to await SaveChanges (so operation could be completed before Dispose) public Task AddToMyProject(string director...
I need to count the number of ways to partition an array into two contiguous arrays such that those arrays contain exactly same set of items. Suppose A = [4, 1, 1, 2, 4, 2, 4, 1]. If you pass this array to the function, it needs to return 2. (Those subarrays are [4, 1, 1, 2] & [4, 2, 4, 1] and [4, 1, 1, 2, 4] & [2, 4,...
I have a small function that when passed a str that names a file that contains a program; it returns a 2-tuple with the number of the non-empty lines in that program, and the sum of the lengths of all those lines. Here is my current functioning code: def code_metric(file_name): line_count = char_count = 0 with ...
I've got this code to work, but being really new to PHP, I don't know if this is proper. I've sorted a CPT loop by a custom date. I'm displaying items from most recent (or future date) to oldest if the custom date is in the future I display an additional HTML element that says Coming Soon. I've used strtotime for the ...
As a challenge for my own amusement, I decided to write a SAS macro for sorting datasets, deliberately avoiding all of the built-in methods (e.g. proc sort / proc sql / ordered hash object). Remarks: I've kept as much of the logic as possible in data step code, but inevitably there's still quite a bit of macro logic. ...
Challenge: Find the duplicated entry. Specifications: Your program should accept as its first argument a path to a filename. Each line in this file is one test case. Each line begins with a positive integer(N), the size of the array, then a semicolon followed by a comma separated list of positive numbers whi...
I have been updating my build tools to optionally us autotools (autoconfig/automake/libtool etc.). As part of this change I have written a couple of M4 macros. This not being something I have done before, any input appreciated on style or if things can be done better. AC_DEFUN( [AX_FUNC_THOR_BUILD], [ A...
I have been updating my build tools to optionally use autotools (autoconfig/automake/libtool etc.). As part of this change I have written a couple of M4 macros. This not being something I have done before, any input is appreciated on style or if things can be done better. This macro checks to see if the YAML libraries ...
I have been updating my build tools to optionally use autotools (autoconfig/automake/libtool etc.). As part of this change I have written a couple of M4 macros. This not being something I have done before. Any input is appreciated on style or if things can be done better. A macro for detecting what version of C++ is av...
I'm creating a thing that does things. Part of the things the thing does is querying an API for information about movies and TV shows. The API allows me to query for changes to their data so I will first iterate over every entry they have (IDs are numerically represented), store its information locally and then periodi...
I wrote this class for the project I'm currently working on. It's basically used to change a user's password. I'd like to know your thoughts on the basic structure/design of this class and how it can be improved, or if you'd have written it differently. class Recover_password{ //class by sami private $conn; ...
I saw this question and answer about calculating pi on Stack Overflow, and I decided to write my own program for calculating pi. I used Python and only integers (I didn't want to use floating point numbers), and used the Gauss–Legendre algorithm because it was the simplest to implement (I considered using the Borwein's...
Having started a new software dev role recently I'm in the process of developing my first full web app project using the following stack HTML + CSS + JavaScript + PHP. I'm new in terms of applying these lessons I have learnt in the recent past in each language (as you might see from my basic sounding earlier questions...
I'm studying design patterns and I made this car store implementation. Although I'm confident that the idea is right, I'm not confident that the implementation is good. I would like you to check it out and give me some advice. It doesn't have tests, and I'm using an abstract class with a private method. Car: <?php name...
My assignment in CS was to make a knight's tour application that could solve the problem from any starting position. I had just finished the code so excuse the lack of deeply descriptive comments. My goal was short code length and easy comprehensibility. There is a lot of excess code such as putting the 0 border around...
This code uses a DCG and pairs phrases into near-English sentences. If anyone is familiar with Prolog, I'm wondering how I can use the code as an encryption method by hiding data and replacing it with the DCG produced phrases so it turns the hidden text into pseudo-random data. The phrase production code is: l:senten...
I coded the following program to solve the n-puzzle problem with n = 3. Are there any suggestions regarding readability and variable names? import heapq from random import shuffle import math n=3 fBoard = [1,2,3, 4,5,6, 7,8,0] board = [i for i in range(9)] shuffle(board) print(board) aStar() c...
I have written the code to concatenate two arrays . Please let me know of any loopholes in the written code. import java.util.Random; import java.util.Scanner; public class ConcatArr { static Random rand = new Random(); static Scanner in = new Scanner(System.in); public static void main(String[] args){ ...
I have been implementing Salsa20 by studying the design and specification. I have made sure to unit test every function along the way and match the outputs against the test vectors in the spec. I am aiming for readability/auditability of the code as a whole rather than raw speed, so I have not followed the C reference ...
I have Set of character delimiters (DELIMITERS), eg . , etc. Using this I want to split text and get words with their position in text. String.split() works fine if you want only words. The same with StringTokenizer. Wrote some simple method to deal with this, but maybe there is a better way to achieve this result? p...
I have a form that reads a JSON file for default wrong answers to be applied to a 'summary div' at the end of the form. I wondered if I could make these two functions one somehow? It is a bootstrap modal, that I am using data-attributes to get the right answers which populate the text in the modal body, then when I cl...
Are the catch statements ok or must I put in a println()? In general, is the code good-looking enough? public void music(String song) { try { File soundFile = new File(song); AudioInputStream sound = AudioSystem.getAudioInputStream(soundFile); // load the sound into memory (a Clip) ...
I've been reading about loops this morning, to try to improve this snippet of code: $deliveryoutcode1 = array(); $deliveryoutcode1 = explode(",",$rows['deliveryoutcode1']); $deliveryoutcode2 = array(); $deliveryoutcode2 = explode(",",$rows['deliveryoutcode2']); $deliveryoutcode3 = array(); $deliveryoutcode3 = explode("...
Description need to find out the paragraph number which is containing all the words in the file. input file java.txt What is a JVM? What is the most important feature of Java? Are JVM's platform independent? What do you mean by platform independence? What is the most important feature of Java? What is a JVM? Are JVM...
I'm getting into CSS/HTML by myself. I'm already familiar with many programming languages (C, Java, etc.), but I don't know much about web development, especially about good programming practices when it comes to CSS/HTML. Could you guys please give me some tips and point out what I did wrong? I did kind of a small por...
I have a makefile like the one below and I am trying to simplify it. I know I should be assigning variables to cut down on repeated things but I am still confused as to how to properly simplify this as small as possible. # # Linux makefile # Use with make # .SUFFIXES: .SUFFIXES: .o .asm .cpp .c AS=nasm ASFLAGS= ...
I'm trying to teach myself some Cython. To do so, I use Project Euler #10: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. 2 Find the sum of all the primes below two million. My Cython code is: from libcpp.vector cimport vector from libcpp cimport bool SOLL = 142913828922 def run(unsigned long top = 20000...
I redirect all my requests to index.php via htaccess and the code below is in my index.php. I want to ask if my code is properly set for a custom 503 page for an unsuccessful MySQLi connection trial. Is it also proper to use these metatags? <meta name="robots" content="noindex,nofollow,noarchive"> <?php $mysqli = new...
Multiple threads write data to a file. When maxLines is reached, the file is closed and a new file is created: public synchronized void writeLine(String data) throws IOException { writer.write(data + "\n"); lineCounter++; if(maxLines != 0 && lineCounter == maxLines) { close(); lineCounter = 0; fileC...
Here is my implementation of the k-means algorithm in python. I would love to get any feedback on how it could be improved or any logical errors that you may see. I've left off a lot of the boilerplate code like the command line argument parsing, error handling for data read in from CSV file, etc. and just added the me...
I've built a small single threaded TCP server using NIO. This server is used by small client devices to report things like temperature, when the device has been switched on, when it switches off, and various other parameters. The server then saves those parameters to a database. We've implemented a very simple protoc...
Looking for code-review, optimizations and best practices. This question is attributed to geeksforgeeks. NOTE: Please help me verify space complexity, as I am creating TreeData objects in recursion. I believe it is \$\mathcal{O}(1)\$. Ignore the space-complexity of stack frames. Looking only for space occupied by TreeD...
I have the following method: public static HashSet<PathDetails> GetDeletedPaths(HashSet<PathDetails> old, HashSet<PathDetails> current) { var deleted = new HashSet<PathDetails>(old); deleted.RemoveWhere(x => current.Any(y => y.Path == x.Path)); return deleted; } PathDetails is a struct that, among other th...
I'm switching my code to promises - mostly as delivered by Mongoose. I use Hapi though I think something similar would apply to Express. In my models/services I perform queries such as: var sampleMethod = function(id, status) { return Model.findById(id).exec().then(function(item) { if(!item) return Boom.notFound...
I have looked at many different approaches to this game online, but as someone who isn't very experienced with Python, I may not be aware of what others are doing right. import random def RPS(): print("You are playing Rock Paper Scisscors") comp_possible = 1,2,3 score = [0,0] flag = 0 while True: ...
A function that prints out the values of each of the bytes of a variable, which value is given from stdin. Consists of size detector and a loop. #include <stdio.h> #include <math.h> int main(void) { unsigned char uint_8; unsigned short uint_16; unsigned long uint_32; unsigned long long uint_64, n = 0; ...
I have an application where I use Task to run an operation. During the operation, there can be a problem which will need some user interaction (continue or not). I need to bubble up a messagebox and get the user result back to the operation thread. This is how I got it working: public interface IPlugin { void Conne...
In five minutes I made a pretty ugly looking function. Can you help before I have to commit the code into history? Requirements: I would like a function that takes an array of numbers, and returns an array of ranges. Ideally remove the duplicate line. Sample Input: Array(1,2,3,4,5,6,10,11,12,13,20,24) Output: Array...
This is my app.js: 'use strict'; global.config = require('./config/environment/config'); global.i18n = require('./config/locales/config'); var express = require('express'); var app = express(); app.locals = global.config; var passport = require('passport'); var session = require('express-session'); var load = requir...
I wrote the following code to read constants from annotations: public class ContentUtils { static { String[] videoFormats = null; String[] imageFormats = null; try { Field multipartFileField = MultipartFileWrapper.class.getField("multipartFile"); Extensions annotation...
In short I have a bunch of articles (~100k) which shall be ranked ("mixed", hence "newsmix") based on their newsValue (how important they are, between 1 and 10) and newsLifetime (how long they stay important, between 1 and 4), how long ago since published, and the users' preference for each category. It also groups the...
I've been trying to optimize this while making it readable. Thoughts? The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... Let us list the factors of...
I have this very simple code which is used to parse values: public class Connections { public List<Integer> getConnections() throws IOException { byte[] fileBytes; File myFile = new File("/proc/net/sockstat"); if (myFile.exists()) { try { f...
I've made the following DataSetReader, DS Attribute, and DataSetManager. My main concerns are the following: This is my first time using a Singleton. Should I? And have I done it well? My aim is to make this class reusable in other projects. Is there anything I should improve to allow for this further? I pulled the lo...
Based off the coding puzzle: Who is this chatbot? The code's purpose is to create an AI that the user can communicate with. Due to there being no hard-coded strings, the AI learns from what the user has said. In my version of this AI, all messages said by the user are stored in an array and when it comes time for the c...
I was given an assignment to ensure that a list was symmetric. I built it in a way that worked and it passed the tests. But I wanted to see if it could've been written more efficiently and still readable. Original question A list is symmetric if the first row is the same as the first column, the second row is the s...
So, this is my refactored VM: public partial class MainPageVM : INotifyPropertyChanged { private IThemeProvider _ThemeProvider; private IStartupVersionProvider _StartupVersionProvider; private IFontSizeProvider _FontSizeProvider; public ObservableCollection<MenuItem> Back { get; set; } public Obser...
I am taking Stanford's Introduction to Databases Self-Paced online course. I have gone through the videos in the SQL mini-course, and I am having trouble completing the exercises. The following is the question from the SQL Social-Networking Query Exercises, Question 5: For every situation where student A likes studen...
I'm just getting started with F# and was writing some unit tests for some functionality I had written. In the interest of brevity, I decided to create some lists of the different test cases and just run through them all in one test instead of creating separate test methods for each one (I'm not focusing on that design ...
I was just messing around with python making wav files; when I came up with this (what I think is) pretty neat script. It takes each character and represents it with a tone. import wave import struct from math import sin import os RATE = 44100 maxVol = 2 ** 15 - 1.0 # maximum amplitude noise_output = wave.open('nois...
I'm writing a simple script which will search a source directory for certain types of files and move them to a destination directory. I'm using it as an opportunity to practice writing some "defensive" code which nicely reports errors to the user, rather than spitting out a stack trace. As a start, the program should r...
Follow up to Duplicate like a weapon, arrays like heaven. @rolfl suggested in chat that I try to complete this challenge again in a Java 8 friendly way. I took the opportunity to also employ the algorithm suggested in this brilliant answer. I'm not familiar with Java 8 features, but am definitely interested in using i...
We are trying to use NodeJS for analytics. The following code gets the parameter from a URL and dumps it into a flat file. Is there any way to optimize it to get better response time? var http = require("http"); var url = require("url"); var cluster = require('cluster'); var fs = require('fs'); var numCPUs = require('o...
I was trying to refactor the following code for Caesar cipher, but it feels overly complicated at the end of the refactoring. Could someone else take a look at it and let me know if I am just overdoing/making it complicated for someone trying to read the code? My highest priority is to write readable code, so any point...
Is this kind of vectorized operations the most efficient way to do this in matlab? Any critics about my code? Am I doing something wrong (i tested several times, I think it works). Notice that I use J to store the history of the cost function so I can see how well it is converging (by plotting a graph for instance). ma...
I have recently started working on angular.js and I like it. I have decided to use a single controller per view. I use the json data from the backend. As my work is progressing, my codes are getting more verbose and I would like your suggestions on how I can (as a newbie) improve my code. I use the default $http servic...
I'm fairly new to JavaScript and I wonder if there is a way to write this function shorter and better? function checkFile(file){ var cbEnab= true; if (file !== undefined && file !== null) { cbEnab = (!jQuery.endsWith(file, "Com.js")); } return cbEnab; }
I've just finished Project Euler Problem 8, which ask for the greatest product of any sequence of 13 consecutive digits in a given string. I wonder if there's something that could be improved. function EulerProblem8() { var amountOfDigits = 13; var sequence = "731671765313306249192251196744265747423553491949349698...
I have the following method: Float getPriceEqualsCategoryName(BrowseNode node, Float productPrice) { String name = node.getName(); for (Entry<String, List<RangeValue>> entry : categoryToFee.entrySet()) { if (name.equals(entry.getKey())) { List<RangeValue> values = entry.getValue(); ...
I've made a simple bash script to check if a web server responds, and to send emails to a list of addresses if the website is down. Any suggestions as to how to improve it/ edge cases that I missed/ better styling/ etc? I'm not very familiar with idiomatic bash. #!/bin/sh output=$(wget http://lon3213:8111 2>&1) patter...
I tried looking up some good example init scripts, but all that I found were excessively complicated. So I wrote my own simple init script targeting CentOS 6. I tried to follow LSB where I understood what it says. CentOS uses chkconfig instead of the LSB comment block. This is my first serious shell script ever. What d...
Below is some powershell to write to the event log; if the -Force parameter is specified this saves you the effort of writing additional code to first check whether the log exists. I had to make use of Remove-Variable to allow some parameters to flow through; I'd not used that feature before / been aware of that nuance...
This is my very first program in JavaScript. I am trying to teach myself from JavaScript: The Definitive Guide, 6th Edition. The code is also available on my bitbucket. I decided to remake the classical game Xonix as an exercise. I took some concepts from this video. I would like to ask you for advice in: Style: I r...