instruction
stringlengths
71
71.9k
I recently applied for a job as a Python coder but was rejected. This was the problem: Write a python code to check if an array has a sequence (1,3,4) Assuming they were looking for expert Python programmers, what could I have done better? # Tested with Python 2.7 import unittest # Runtime: O(n) def doesSeqAppear(i...
I am trying to code a thin wrapper around the OpenGL so I can use it more convenient. This class is not 100% done yet, but I don't want to do all typing for nothing. And I think the design is clear. I would hope some review anything they see with my C++ code or with the way I use OpenGL. .hpp file #pragma once #includ...
The algorithm should be checking if the block fits perfectly when it falls. The block is always the same shape: .##.... ..##.... Keep in mind I wrote this in 1 hour - all the time we had for the task. How can I make it more optimized? #include <stdio.h> #include <stdlib.h> int check(char *k, int r, int s){ in...
Can someone please go through this? #include <iostream> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #include <list> #include <set> #include <cmath> #include <cstring> #include <stdio.h> #include <string.h> #include <sstream> #include <stdlib.h> #include <vecto...
def check_rule(token, training_data, mode): if mode == "frag": children = training_data["words"] remove = list.remove def in_child(x): for i in token: if i not in x: return False remove(x, i) return True for...
The following method is used to keep a DataContext open if it is closed or broken and is called before most calls to access the database. It runs in a service that needs constant access to the database, constantly opening and closing the connection would be too costly. So we only reconnect if the connection has been cl...
So I have this array of objects, which respectively contain other objects: const template_columns = [ { "id": 38, "name": "Ideas", "position": 0, "template_id": 4, "column_type": "Column", "workflow": [ { "action": "Next", "move_to": "Backlog", "assign_to": "none"...
I am trying to create a simple Blackjack game. I am using GIST because the code sample takes forever to use. Current code: from random import randint def card_deck(): #sets the card types and values card_value = ['Ace','2','3','4','5','6','7','8','9','10','J','Q','K'] card_type = ['Hearts','Spades','Clubs',...
I made code to shuffle an array in a semi-random way. That is, it has to be random based on a string, but for the same string, it should return the same order. Is there a better way of doing it? function djbHash(s) { let hash = 5381; for (let c of s) { hash = hash * 33 + c.charCodeAt(0); } retu...
I have a little code that draws a triangle wave: package work3; import javafx.application.Application; import java.util.Scanner; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.Color; import java.awt.Graphics; import java.lang.Math; impor...
This is how I convert e.g. RGB(255, 0, 0) (where red is stored in the least significant byte of a Long) to a 6-digit hex string FF0000: Function RgbToHex(l As Long) As String Dim r As Long Dim g As Long Dim b As Long r = l And ColorConstants.vbRed g = (l And ColorConstants.vbGreen) / (2 ^ 8) b = (l And Colo...
This is part of my kynnaugh-cc TeamSpeak 3 plugin implementing speech recognition for deaf/hearing-impaired users. One of the self-contained classes in my code has the job of converting incoming PCM samples from TeamSpeak into FLAC format for transmission to the Google Cloud Speech API. The Cloud Speech API only accept...
The code is working perfectly. I'm little bit sure this is a packet what I am sending from client to server in streams. Is this packet? Am I sending in a right way? Another thing is that I am sending ACK from server to client. Is this right way to send ACK and NACK? Moreover, I am parsing on client side the ACK and che...
I'm working on a function that reduces pairs of elements if they meet some criteria. For example, given an array: ["1", "2", "a", "b", "3", "4"] I want to transform it so that strings that represent numbers are combined with addition, and strings that represent letters are concatenated so the output would be: ["3" "ab"...
I have the following assignment: A program that takes four (4) inputs then using a conditional statement does the following: Display the values that are below or equal to 25. Multiply the values that are below 20 with each other. Add the values that are above 25 with each other. I've successfully solved all of th...
I'm new at this and I'm almost done with learning basic Java. I made this just to see if I could do it. I just want to know if there's anything I can do to make it better. import javax.swing.*; import java.awt.*; import java.awt.event.*; import static java.lang.Double.*; class Calculator { private JFrame frame = n...
I have been learning about the rule of five and I tried to implement an example myself. It all works exactly as I'd expect, but I was wondering if I've missed any obvious issues or easier/faster ways of implementing the constructors and operators. class string { public: string() : data(nullptr) { std::cout ...
I was working on a CodeChef challenge: Our Base is Under Attack. I have a working solution but it is not fast enough. Could you recommend anything to make it faster? import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; class BaseAt...
I have this method in Java: private static int ConvertToTimestamp(Date value) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S", Locale.US); String text = "1970-01-01 00:00:00.0"; LocalDateTime localDateTime = LocalDateTime.parse(text, formatter); // getTime() returns ...
I wrote this switch function for Python, as there isn't a built-in one and most of the Googlable ones doesn't execute code, but only return something (I admit I haven't looked much further than a single Stack Oveflow page to see what people use, but a lot of the solutions are unnecessarily complex): def switch(variable...
This is a very simple task, but I'm curious if there is a better, more 'Pythonic' way to solve this. """The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 552 = 3025 Hence the difference between the...
I have this method which calculates the average, median and percentile information given a long array of numbers. Is there any better and efficient way to do the same? public static double median(long[] numbers) { Arrays.sort(numbers, 0, numbers.length); int middle = numbers.length / 2; if (numbers.length...
This assignment requires obtaining the deviation and variance of \$n\$ numbers stored in one single array. Is there any way to make this code more efficient? #include <iostream> #include <cmath> using namespace std; int main() { const int arrSize = 14; double average , sum = 0 , dev = 0; double deviation[...
I knew a little Java, and thought what the hell, I'll help my school and design this program that'll help checkout phone chargers and calculators and things to students. So I got in way over my head, but I got the program working. I wrote it in C#, and while the whole thing needs review, I really feel my checkout funct...
I'm trying to show data in UITablleView after getting it from an HTTP request. I heard that the best and professional way to do it is configure the cell and do the call request in model class then send it to the view controller. Here is what I tried to do, but I think it's not going well. I know this is a wrong way but...
I have a basic JSON API written in PHP. I want to validate incoming JSON data. I know there are PHP JSON validators out there, here is a quick one I just rolled up. <?php $json_payload = json_decode('{ "data": { "a_string": "short", "a_number": 7 } }'); validateJSONPayload( '{ "data": { "a_st...
I worked on implementing a simple moving average function in Rust, that works on a collection of year/revenue tuples: fn compute_moving_average(window: &Box<&[(u32, u32)]>) -> (u32, f32) { let window_size = window.len(); let current_year = window .iter() .nth((window_size as f32/ 2.0).floor() a...
Working on below find first bad version problem, post my code in Python 2.7, any smarter ideas for better time complexity, any code bug or code style advice are highly appreciated. My major idea is divide and conquer like a binary search. Problem, You are a product manager and currently leading a team to develop a new ...
I'm working on implementing a queue using a circular buffer problem. Any smarter ideas for better time complexity, any code bug or code style advice are highly appreciated. class QueueOnCirciularBuffer: def __init__(self, max_size): self.buffer = [0]*max_size self.index = 0 # element to write ...
I have a c# application which displays the names of assessments and the zone which they are performed upon, separated by a comma and a space. For instance: assessment1, Firewall mom's assessment, LAN When the user selects on of these assessments, I need to separate the assessment name from the zone name. I also need ...
The problem statement (Codeforces# 385C) is this: We are given a sequence of \$n\$ numbers, i.e. \$x_i\$ and \$m\$ queries to find how many of these are divisble by primes between two given numbers (not necessarily prime) \$l_i\$ and \$r_i\$ (inclusive). Constraints are: \$1\le n\le 10^6, 2\le x_i \le 10^7, 2\le m \l...
while doing a code clash on codingames, in which we had to replace a character in a string one by one to transform it into a target string, printing out every itteration of the new string, resulting in something like this: "Turtle Ham" "Hurtle Ham" "Hartle Ham" "Hamtle Ham" "Ham le Ham" "Ham Me Ham" "Ham Ma Ham" "Ham M...
I have a list of objects, which contains field rawData (eg rawData="KLAX 141353Z 06003KT 6SM BR FEW002 FEW008 BKN280 12/12 A3007 RMK AO2 SLP182 T01170117 $"). In my case rawData is METAR report from which i want to extract the most severe weather condition (clouds, fog, rain, snow). Currently I am applying parseWeather...
Here is my class to read a csv file and I was wondering if there is any improvements that I should do. I feel there are some performance improvements or in exception handling because I just took IO exceptions. package com.mypackage.utils; import com.opencsv.CSVParserBuilder; import com.opencsv.CSVReader; import com.op...
I am getting familiar with decorators, and after a couple of tutorials i came up with a decorator that might is useful for me. Is this the proper way to use decorators? Any suggestion about the code? def timeit_decorator(original_function): import time import colorama def wrapper(*args, **kwargs): ...
This Rust code plays the Silver Dollar Game. I've put some effort into trying to utilize the appropriate parts of std. This is the first program in the first real programming book I ever received. Practical Programs for the BBC Computer and Acorn ATOM I have not factored any code out to structs or traits. Listing of Ca...
I was working on a program that creates an array, then gives statistical information about that array such as std dev, median, mode average etc. I have written a method for each statistical value, however I am not too sure that they are efficient, particularly the getMode() method. I would be really happy if you helpe...
The program I've made is a template matching program which finds an image within an image - where's Wally/Waldo! I've complete the program and all works fine despite being very slow (around a minute). I would appreciate some advice on how I could improve the following code. I'm happy to share the rest of the source cod...
I have a WPF application where I have a function for generating an overlaying info grid. I have written some code for queueing the messages(IpopupMessage) so that each displays a certain amount of time public interface IPopupMessage { string Description { get; set; } TimeSpan Duration { get; set; } SolidCo...
I know, this sounds really difficult, but it is really easy. I needed to convert a single Portuguese word in the plural into singular. I know there's a right name for that, but it is escaping me. The rules are simple, and will compile them from http://www.easyportuguese.com/portuguese-lessons/plural/ (but applying in r...
I was going through Real World OCaml and wanted to make the program in "A Complete Program" use Async. It works now, but I'm wondering how idiomatic it is, and if I'm doing anything weird? open Core.Std open Async.Std let read_and_accumulate () = Reader.lines (Lazy.force Reader.stdin) |> Pipe.filter ~f:(Fn.non Str...
I have an input for users to enter a Twitter account in any different way and I want to extract the user account. For example: twitters = [ "www.twitter.com/twitteruser1", "@twitteruser2", "twitteruser3", "https://twitter.com/twitteruser4", "https://www.twitter.com/twitteruser5", "www.twitter.co...
Here is my exchange rate calculator, i took xml file from here: xml_rates I would like a review if I am doing everything right, and what I could do better. I am not sure if I should make another class for all of these methods? Shall I also create class for loading xml file? Thank you guys for looking at it. public s...
The idea here is that my executable can be started normally (in which case it runs my business logic), or it can be wrapped in a nanny process (which starts a child process to run the business logic, and if the child process dies restarts it indefinitely). Here are some more specific requirements: As invisible to the...
Syntax is ./bf-interpreter <program.bf>. #include <stdio.h> #include <stdlib.h> #define MEM_CELL_SIZE 30000 #define MAX_INSTRUCTIONS 5000 unsigned int progressUntilNext(char* source, unsigned int i_pointer, size_t newLen) { int open_brackets = 0; for(int i = i_pointer; i < newLen; i++) { switch (so...
I have made a small Vue app which fulfills the following user stories: Given I make a search for an existing GitHub user, then: The user's username is shown The user's avatar is shown The user's most commonly used language, if available, in their repositories is shown as a 'favourite language' The user's followers, if...
I have been trying to learn to program in a more object oriented manner and I am at the moment working on a Tic Tac Toe game. I have tried to split my classes so that it would make sense, OOP wise. I am just concerned whether I have split it up correctly and if I am really following the standards of OOP programming. I ...
I have Ubuntu 16.04 with standard apache web server installed. Nothing special about it. No open ports but 80. Instead of the default index page I put this one: <?php $path = "."; $dh = opendir($path); $i=1; while (($file = readdir($dh)) !== false) { if($file != "." && $file != ".." && $file != "index.php" && $file...
I'm implementing (for an article) two custom infix operators: ¿% - to calculate percent of total %? - to calculate the percent that represents a segment of total After debugging some errors and looking for information I finally found a way to get my code working: protocol NumericType { static func *(lhs: Self, r...
I'm writing an interpreter, and I'm designing the abstract syntax tree currently. Right now, I'm trying to figure out a way to add (or do other operations with) two Numbers, without casting to double or using a long switch statement I've currently implemented addition with a switch statement, but I don't want to copy t...
I was working on one of the Hackerrank programs, Bigger is Greater, and it basically deals with finding the next largest lexicocraphic permutation of a string. I've implemented my solution, following an algorithm described here. I then store all the permutations in a vector, loop through it, and search for the next per...
I am a C#/.Net developer and have decided it is time to branch out and really learn Python. I started with a simple implementation of a Mastermind-esque game. Any comments about the code would be greatly appreciated. I already know the gameplay isn't perfect, but it was just a quick attempt. I also am aware that there ...
I had to build a 2-player Tic Tac Toe app in C# w/ WinForms for a pre-interview screen. I got past that stage successfully and the app works flawlessly, but I would like to get some feedback. Although I've been programming C# for a while, I don't have too much experience with certain architectural paradigms such as Mod...
The purpose of this code is to simulate epidemics across a population. There are 625 (pop) individuals at random locations. The epidemic parameters are infectious period (inf_period), trans (transmissibility of the disease - essentially virulence), susc (the susceptibility of each individual to the disease), and eps (e...
I am developing an application that has different configurable versions - "a1" and "a2". The version name is initially being set from the database as "a1" in the $rootScope. I reference the version name in every templateProvider in UI-Router, which ends up being over 30 times: .state('app.auto.public.inventory.list', {...
This is a solution to Advent of Code 2016, Day 8. The tricky part of this problem is that you have to be able to rotate both the rows and columns of a two-dimensional array. Rotating a row is easy using std::rotate, but rotating a column seems much harder. My basic approach was to write a "getter function" such that ge...
I am new to Jquery plugins, I was searching a lot about widgets and plugins, however I am still not sure if this code is okay. Should I use widgets for stateful plugins? Or is this plugin correct? Does this code have any downsides? I was trying to make a container here, where you can add/remove elements. (function($...
I am using 5 Hotels APIs and trying to combine and pick min price hotel with unique hotels from all APIs. I am following these STEPS Call All 5 APIsand wait for response. get all static data from database or if avail my server caching(all 5 APIs like hotels name, images, desc, etc) Combine into one custom class get GI...
After reading many posts about how to handle sequences in EF 6 (see below) I found a way that was working for me. I'm using Code First and want to include the sequence from scratch, so without using migrations (tell me if I'm getting this wrong). Task was to get an unique and gapless incrementing extra ID for my entity...
I have to show price of an item. If the price is only in dollars, it should look like an integer. But if it contains cents, it should look like double value and always have two symbols after decimal separator: 2 550$ 2 550,55$ 2 550,50$ I decided to use Decimal format for this task, but I don't know how to proper...
I am trying to implement HMAC-SHA256 authentication into my Python RESTful API project. I am using Python Eve (built on top of Flask), started with an simplified HMAC-SHA1 example. My application is very simple: ## # application.py ## from eve import Eve from hmac import HMACAuth SETTINGS = { 'DEBUG': True, 'M...
Usually, parser combinators in Haskell based on the parser type like newtype Parser t r = Parser ([t] -> [(r,[t])]) This allows back tracking and multiple results. However I think it would be good to have it in "push" style, means the parser will have a set of result when no more input given, and have a transition fun...
I've just asked What's the idiomatic way to get the sort order of data, without actually applying it? (or see the original it was found to be a dupe on). So, I want to implement properly what seems to be the only suggested option - generating an array of indices and sorting it by the original data's relative order. Her...
Here is the code that I write for my work on Excel-vba. I use that code to know shifts' and operators' performances. Main purpose is to divide machines' work to orders and shifts. Sub Ucshift() On Error Resume Next 'Cleaning before start Sheets("Data").Range("A1:R568").AutoFilter Sheets("Data").Range("A:A,F:...
I have written this generic method to check whether a object has a dependent items or not: public void ItemDependant<TEntity>(Guid id, Expression<Func<TEntity, bool>> condition, Expression<Func<TEntity, string>> select) where TEntity : BaseModel { var foundItems = _dbContext.Set<TEntity>().Where(x => x.IsD...
I was reviewing today some code which gets as input a list of payments (paymentList) and a list of installments (installmentList) has to populate two other lists, respectively depositList and balanceList. Basically it calculates the sum of all payments from paymentList and fills depositList with the amount enough to le...
I am doing some exercises in this book. I've been trying to avoid Regex so far in my mission to teach myself computer science, as it makes my head hurt. That said - one of the exercises is to find all words without the letter 'e'. I have: /\b([^e ]+)\b/ There must be a better way using Regex to find all words that don...
I do not want to call this a wrapper, but no other name comes to mind right now, so I'll use it incorrectly for the rest of the question - It's just a class that adds C++ functions to dirent.h but it's very specific to my use case. All of the code works well, but I've never worked with the dirent.h library and jumping ...
A flexible, fast and lightweight rate limiter that allows rate limiting of any action on a website. Doesn't work across a scaled deployment by design, but could easily be modified to work in this way if required. By design chose to keep it to this model. Example usage If an IP address requests more than 100 page views...
I've been working on Python for the past few weeks trying to get my head around it's syntax/naming conventions/style/etc. I decided to make a monty hall sim to see how it looks in python. For those who don't know what the Monty Hall problem is, check the second paragraph here. I've verified the code is fully functional...
The basic UI for my checkers app is complete, so the next step is to come here for review. I have not built my Facade over my F# game library, so some of the type usages are a little strange; this will be done as soon as I get the library in a slightly more stable state. MainPage.xaml This is the opening view (and on...
I'm creating an app where the login page doesn't have the header/footer bars that the pages, after being logged in, would have. I've created an example that works, but I'm unsure if I am using the prop/component inheritance or patterns correctly. I feel like there is a lot of nesting going on here, but I'm unsure if t...
This is my first ever Python program so I would really like to know if it's any good (I mean if it is well writen), and if not then how to make it better. I would also like to know if there is a way to get all the veriables in one line without a space between them. This calculator is basicly this calculator which I wro...
I am in the process of translating an implementation of dflop_en_clr from VHDL to Haskell: if (reset = '1') then out_1 <= '0'; elsif rising_edge(clk) then if (clear_n = '0') then out_1 <= '0'; elsif (enable = '1') then out_1 <= in_1; end if; end if; Types to know: data PIn = PIn { _in_1 ...
I wrote this prime factors program as a programming exercise. Any comments or constructive criticisms are welcome. One question: prime[] is an array which stores the number's prime factors and associated exponents. How many elements, at most, does this array require? That is, what is the greatest number of prime factor...
I had to write a string search function that would search for barcodes, and be forgiving of minor formatting differences. For example, the barcode may be entered as YF 1942-AB in the customer's database, but a barcode scanner may read the barcode as YF1942AB. The goal is to get the correct substring indices (range) for...
I've made a simple clicking game where you spam a button in order to get coins which you can use to buy upgrades to get even more coins. I've only 2 classes one that is responsible for the game logic - MainGame and one for the items available in the shop - Item. MainGame public partial class MainGame : Form { priva...
I'm creating a plugin for the game Minecraft, and with it I'm using HikariCP and MySQL to store data between server restarts. I've created working code but I'm wanting to improve it. While the code works fine, I feel there's a simpler way to structure it. I appreciate any suggestions. HikariFacade.java public class Hik...
I developed the following Python functions when solving a few Project Euler problems, and since I'm not that familiar with Python, I'm curious at how I could improve them. The code consists of a data holder class, and a few functions. Option class: This object stores data for a combination option. It has two data membe...
Time Machine is a useful backup service for Mac, but deleting multiple backups is cumbersome. This script allows mass deletion of unwanted backups while allowing specified "important" backups to remain. I recently ran out of space on an external drive I was using as a Time Machine backup location, and though there were...
Recently, just for fun, I've created a clone of the widely popular game Tetris using C++. Since I am still a novice when it comes to C++, I would really appreciate all the feedback I can get from those with more experience. The code below is also on GitHub. Main.cpp #include "Game.h" #include <ncurses.h> #include <cloc...
I started learning about React and redux recently and I created a dummy project based on drf-redux project and react-redux-quiz-game This application uses Django rest framework for API and React with Redux for front end. A user sees options to add/edit/delete questions and answers in admin mode. In student mode user c...
I made a variation on the program that moves the character to the next character. This version moves the characters n steps forward and takes care of white spaces in between. It works but wonder if there is a better way of coding this. It only works with lowercase alphabet characters. import java.util.Scanner; public c...
I am trying to make file read and update operations thread safe and prevent race conditions in Python. Am I missing out something, or would this work in production? import os import time from contextlib import contextmanager import errno current_milli_time = lambda: int(round(time.time() * 1000)) lock_retry_wait = 0.0...
I made a class that will be used to get an image properties like width, height, and MIME type. <?php namespace Resizer; class ImageResizer { protected $imageOrig = null; protected $width = null; protected $height = null; protected $mime = null; public function loadImage($path = null) { ...
It is supposed to take an arbitrary number of arguments, turn those arguments into buttons, and arrange those buttons in a way to give each individual button the largest area possible. Is there a better way to do this? Be as thorough as you like. import sys import tkinter as tk import os from tkinter import * ###funct...
I have a 7x7 board and I want to select some elements from it. The elements I want to select are marked o, the other ones are marked x. Here is the board: xoxoxox ooooooo xooooox ooooooo xooooox ooooooo xoxoxox I use indexing starting from 1. The point (1,1) is the top left. The current list comprehension I have to se...
I have two JSON and each JSON I am loading in a Map. First JSON { "abc": "2", "plmtq": "hello+world", "lndp": "def+ooo", "yyt": "opi" } I am loading this JSON in a map as key:value pair. Here abc is the key and 2 is the value. Let's call this mapA. This is a String to String map. Second JSON { "abc":...
I have a List of Results. My goal is to extract the Result property Method from all elements of List<Result>, make extracted elements unique and prepare a string for SQL statements like WHERE method IN ('A','B','C'). Here is the Result class and a List<Result> example. The solution is in the ListTransformation() method...
All Spanish nouns have a gender (masculine [el] or feminine [la]; e.g. la casa, el perro). I'm using some javascript and jquery to display a random word from a list of nouns (2D array), as well as buttons corresponding to the two Spanish articles ("el" or "la"). If the user clicks on the correct article for the word, a...
As an avid user of esoteric programming languages, I'm currently designing one, interpreted in Python. The language will be stack-based and scripts will be a mix of symbols, letters, and digits, like so: ab123c-43=f54g6!6 This will be read from the file and passed to a new Script object, to tokenize. It needs to be to...
there is a knows problem stated as "Cyclic string": A string S has been recorded many times, and then from the resulting line took a substring, and give to you.Your task is to determine the minimum possible length of a string S. Input In the first and only line of the input file contains a string that contains only le...
I have a consumer which is listening to Kafka and from which I am getting avro GenericRecord. Now basis on GenericRecord payload, I am extracting lot of other things. clientId, deviceId, payId, crossId, appPayload. And on all those things I have to do sanity check to make sure they are null/empty or not. And if they ...
I created a small working autoloader based on some of the answers and ideas found on Stack Exchange (I lost the reference). However, I don't know much about PHP (I mainly know C, a bit C++ and Java). I'm trying to create a small MVC website for school project using my own templates and JavaScript as well. I mainly crea...
Brief introduction for CSR: The compressed sparse row (CSR) or compressed row storage (CRS) format represents a matrix M by three (one-dimensional) arrays, that respectively contain nonzero values, the extents of rows, and column indices. It is similar to COO, but compresses the row indices, hence the name. Th...
This is new code based on some new ideas to reduce calls to is_bad_version. Refer to the previous version of the code discussion from here. Any smarter ideas for better time complexity, any code bug or code style advice are highly appreciated. My major idea is divide and conquer like a binary search/quick select. Probl...
I have two Kafka consumer ConsumerA and ConsumerB. I want to run these two kafka consumers independent of each other on the same machine. There is no relation between them at all. These two kafka consumer will work on different topics on the same machine. Each consumer should have a different Properties object. Each c...
I'm learning LISP and am starting with Project Euler. I would love some initial feedback on my LISP code for this simple task. I know it spits out the correct answer, but what I'm not sure about is if I'm using LISP the way it is intended (and the way to strive for in the future in order to achieve success with LISP). ...
I'm looking to use LISP as best I can, not just get the right answer. This is very early on in my LISP career so feedback is welcome and exciting! Recently asked about Project Euler #1, got some feedback and incorporated into this answer for #2, but I know there's a LOT left to be learned! Description of Problem #2 Ea...
I have this Enum from which I am calling the appropriate execute method based on what type of enum (eventType) is passed. public enum EventType { EventA { @Override public Map<String, Map<String, String>> execute(Map<String, String> eventMapHolder) { if (eventMapHolder.isEmpty()) { return Immut...