instruction
stringlengths
71
95.1k
I have solved an assignment (Exercise 33) from the MOOC Object-Oriented programming with Java, part II, but I'm not enrolled in said course. Assignment Summary In this exercise, you implement a dungeon game. In the game, the player is in a dungeon full of vampires. The player has to destroy the vampires before hi...
I am hoping to look at all the possible bots to submit to a noniterated prisoner's dilemma where both bots can reason about each other's behavior. Can I hide unsafeNecessitation within the definition of prove and/or open a fresh context for prove? Can I construct Coops such that fixedpoint2 is true? How can my proofs b...
Consider Crate::addLength() in the following code: class Crate { protected $length, $width, $height; function __construct(float $length, float $width, float $height) { $this->length = $length; $this->width = $width; $this->height = $height; } function addLength(float $lengt...
The challenge (PDF) is to convert a time from 12-hour format (hh:mm:ssAM or hh:mm:ssPM) to 24-hour format. This is my solution, which worked for all test cases. string timeConversion(string s) { int size = s.length(); if(s[size-2]=='A'){ string hh = s.substr(0,2); int h = stoi(hh); if(h=...
I know it could be better, but I’m new to C++, so I don’t know many of the tricks, along with some of the includes that are already obsolete. This program asks for names as input, adds a time for rounds, and then times each player’s turn (i.e. for use in charades). Proven to compile with MinGW cpp. Precompiled version:...
I want to filter search results by multiple filters at once. Is it possible to reduce the number of if statements? My code: public IEnumerable<Article> Search(ArticleFiltersModel filters, ArticleSortOptions? options) { var result = Mapper.Map<IQueryable<Article>>(_unitOfWork.Articles.AsQueryable()); ...
An endpoint that my application interacts with allows you to specify which fields are returned in the JSON result. My application will then map the JSON to a POJO using Jackson. Quite often I add more fields in one place and forget to add it in the other which results in problems. I wrote a unit test to help make the p...
This is the updated version of the script first posted here. Specifically, I first wanted to save the logs to a log file at "$HOME/.logs/ffupgrade.log", but I'm not sure whether that is good practice or whether I should log to syslog. When logging to a file, I would add another variable logfile at the beginning and ada...
I currently am working on a game engine written in C++ with libuv backed for io system calls. I have a FileSystem class that just 'works'. I am allow to read files without blocking but the current design I have is lacking a bit. I am hoping some of you all could comment on my code and help me improve it. Here are some ...
This is just an exercise. I know I should not implement encryption protocol myself. I know I should use Node's TLS package. I know I do not authenticate other side, but merely encrypting traffic. I have decent experience with NodeJS but not with buffers and streams. And that is where I'd like to here from you. I'd like...
I have two threads, one is the producer and other is consumer. My consumer is always late (due to some costly function call, simulated in below code using sleeps) so I have used ring buffer as I can afford to loose some events. I am looking to see if my locking looks alright and general c++ review comments. #include...
I have started studying algorithms using the classic CLRS book and decided to hone my C skills at the same time. I wrote this function implementing insertion sort in C. I have tested it and verified that it works correctly. I would like to know whether it is readable and follows best practices. Some points I'd like to ...
My code compares 2 images of any shape/dimension and ranks them in order of similarity. It starts with reading from a CSV file with columns image1, image2 which contain absolute paths and then outputting to a CSV file which contain columns image1, image2, similarity, time_elapsed I'm more concerned with the formatting ...
Index & Sorting Index • Counting: when the index, or the position, is dependent on the item. Count from one. (Zero-based index is mathematically wrong.) • Grid: when the index, or the position, is independent on the item. (e.g. JavaScript array) Counting arrays are used in bubble sort, merge sort, quick sort, etc. Beca...
I want to compare the performance difference between using byte[] and ByteBuffer in Java, which approach I should use in my production code. I wrote the following Java sandbox code: public native int MD_GetHsmInfo(int hsmIndex, int infoType, byte[] value); public native int MD_TestByteBuffer(int hsmIndex, int infoType,...
I have a fast growing table with logs that I frequently have to delete (the server doesn't have much resources). It grows by at least two million entries every day. The database is a SQL Server 2012. Currently I use this script to delete entries older than 7 days: set nocount on; declare @r int = 1 while @r > 0 begin ...
This is the essence of chapter 3 of "Clojure for the Brave and True". This program is about completing the list asym-hobbit-body-parts by adding a given number of elements called "0-<name>" "1-<name>" and so on for every element in asym-hobbit-body-parts that starts with "left" and subsequently choosing a random body p...
I need simple caching for one of my web-services so I use the Microsoft.Extensions.Caching.Memory package. I wrapped it with SemaphoreSlim to make sure reading and writing are safe. I'm not sure what I'm doing here is entirely correct. What do you think? Is this wrapper OK or can I turn GetOrCreateAsync into an extensi...
I've done this parser to scrape all footwear data, but I don't know if it is good to use OOP in this case. Can you please check this out and give me the strongest feedback? I'm working on improving my coding style and looking for an opportunity to do coding better. How can I make this parser more maintainable for the f...
This is a piece of a chess - engine which accomplishes the generation of all (yet unvalidated) moves given a legal board. However, I have the strong doubt this is well written. The following action are not yet included: Promoting Castling En passant. This code: #include "chess.h" #include "odinutilities.h" #include ...
I was wondering if anyone has any improvement ideas for my code. At the moment it is somewhat sluggish though it does work. This is my first project in VBA; I come from a background in PHP/Python. Option Explicit Private Sub Workbook_Open() ' Set network folder path Const FolderPath As String = "\\JACKSONVI...
I created a simple login program that works how I wanted them to work. I separated the GUI and database codes into two different python files. I named the files as login.py and dbaseManip.py. The login.py consist of Tkinter syntax and all stuff related to GUI. On the other hand, dbaseManip.py holds the database related...
I have written this function to create a URL: function createUrl(urlPath) { const endpoint = url.parse(env.config.get('myEndpoint')); endpoint.pathname = path.posix.join(endpoint.pathname, urlPath); return endpoint; } const basically creates a mutable object whose properties can still be modified. Here, I...
We're working on some code that involves validating certain UNC paths (specifically looking for things that appear to be subdirectories of other things), and we've gone back and forth on how to best do this. One step of that process looks like this: Given a UNC path such as \\localhost\c$\some\great\directory Transfo...
I am solving some programming challenges for learning Javascript. The challenge I chose is: Given the head of a singly linked list, reverse it in-place. Here is my implementation in JS // Given the head of a singly linked list, reverse it in-place. const ReverseLinkedList = { reverseLinkedList: (/** @type{ListNod...
I have developed the following javascript code for creating "widgets" that a third party site can paste onto their page and load content from our web application. Everything is working, and I am in the process of thoroughly testing before we present it for use to our clients (as we don't want any issues to occur that w...
This is a follow-up to this question with bug fixes, question and code improvements from @dfhwze, @PieterWitvoet, @HenrikHansen, @t3chb0t. I am still hoping for an improved approach or algorithm rather than micro-optimizations to the code. .Net provides String.IndexOfAny(string, char[]) but not String.IndexOfAny(string...
I've started working on a small Flask project for no real reason other than fun, and pulled myself back on form validation. I realize that there are existing libraries like WTForms, but wanted to try and write something myself. I tried to make the high-level interaction similar to that of SQLAlchemy, where you define m...
Given an array of non-negative integers, we need to find the sum of concatenation of elements in the array. For example - given [11, 22] the result should be - 6666 i.e., 11 + 11 = 1111 11 + 22 = 1122 22 + 11 = 2211 22 + 22 = 2222 Sum of all those numbers would result in 6666 My code is as below - function concatena...
I am writing trading software, and have written this utility function. Its purpose is to return a list of timeframes relevant to the just-elapsed time period. "Timeframe" here means bar or candle period. E.g if time has just struck UTC 10:30am, the returned list will contain "1m", "3m", "5m", "m15" and "30m" strings, a...
I wrote the following working code, which I just can't stomach: var data = [ { id: 0, isHeading: true, description: "A heading" }, { id: 1, isHeading: false, description: "Blah 1" }, { id: 2, isHeading: false, description: "Blah 2" }, { id: 3, isHeading: true, description: "A heading" }, { id: 4, is...
This is Project Euler #67: Maximum path sum II: By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the maximum total from top to bottom in triangle.txt (right click and '...
I'm an intermediate Java programmer trying to learn the basics of C++. Thus, I decided to write "Conway's game of life" as my second C++ program (I already wrote a Mandelbrot image generator). It was a fun exercise but I struggled a lot with structuring my program and dealing with pointers and references. It's a bit of...
I have a function consisting of one line of code: def trimString(string): """ Remove unnecessary whitespace. """ return re.sub('\s+', ' ', string).strip() But I've been debating with myself whether the following would be better, seeing as explicit > implicit. def trimString(string): """ Remove unnecessary ...
This is the 'details.ts' which define the user's details that I want to recuperate in a JSON (user's role, logintime, duration). import {AuthenticationService} from '../_services'; import { User } from '../_models'; export class Details { authenticationService : AuthenticationService; currentUser = this.authentica...
I'm trying to improve my Game of life program for school in Python, to be able to run it quicker. So if you have some ideas, I will be glad to hear them. My current code: def neighbourhood(m, i, j): num = 0 n_board = len(m) for k in range(i-1,i+2): for l in range(j-1,j+2): if k < 0 or l ...
Users like exploring maps, seeing all that is around. However they tend to go too far. To prevent the map from getting lost to the user it bounces back into the set bounds, as defined by a rectangle. To do this I keep track of two rectangles, the outer rectangle that the user moves around (the map), and an inner rectan...
I have a website that, based on a user's comments, filters comments by "most liked first, most disliked first" etc... I have a custom table for comments scoring system and system working with +1 and -1's. A few days ago I wanted to filter comments by most liked and most disliked as I said and wrote this code: In my fun...
The following code is one of a few similar snippets that generate a graph using CanvasJS, with the datapoints for the graph pushed to an array in PHP during a while loop. The code pulls the the date and the escalation event toals for every weekday for the last 30days, does some math on them, and then pushes the calcual...
SUMMER OF '69: Return the sum of the numbers in the array, except ignore sections of numbers starting with a 6 and extending to the next 9 (every 6 will be followed by at least one 9). Return 0 for no numbers. My solution: def summer_sum(a_list): """ Use a stack to solve the problem. 1. If current ...
The description of the problem is: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Here is my solution: import heapq from math import sqrt def find_max_prime_factor(n: int) -> int: ''' returns the largest prime factor of the non negative intege...
Problem The following statistical functions were created to calculate statistics of experiments: Mean Peak to Peak Standard Deviation Variance Mean Absolute Error (MAE) Mean Square Error (MSE) Root Mean Square Error (RMSE) So there are some statistics that needs an ideal point and some that doesn't. The following ima...
There's this simple coding challenge that feels like a twist on FizzBuzz. Your task is to convert a number to a string, the contents of which depends on the number's factors. If the number has 3 as a factor, output 'Pling'. If the number has 5 as a factor, output 'Plang'. If the number has 7 as a factor, output 'Pl...
Brief: This is a question geared towards optimization and general better coding practices. I'm self-taught in VBA so I'm cautious of bad practices, but they do come up. My Reasoning: I break the links (break_links) because these new files would be sent out and I don't want the external references to cause errors withi...
The task is to create two random teams from a list of players. Given an example of players = ["John", "Mike", "Alice", "Bob"] One example random team would be: team1 = ["Mike", "Alice"]; team2 = ["John", "Bob"]; This is my solution but I'm not sure how efficient it is because random can create same number for a number...
I am doing a join in the axios call. since doing two different api calls. for performance is this the good way. or do I need to use async await and then do join. providing code snippet below export function getSearch(value) { console.log('-- getSearch value', value); return dispatch => { if (value.len...
I find that very very often with matrix questions, the traversal and comparison part of the solution is very verbose and repetitive. For example, this code (written for a coding challenge) to find the number of pawns available for a rook to capture in one move on a chess board (R is a white rook, B is a white bishop, a...
The following code has been tested on the latest chromium, on Opera Mini, on Safari for IOS 7 and finally, on the default web browser on android 2.3.3. As you may already know, the CSS overflow rule isnt supported on android 2.3.3 which makes sidenavs un-scrollable. Well, guess what? I found a workaround. See the follo...
The following classes are a simplification of an auto-generated code of an ORM (targeting Microsoft's Dynamics CRM): public class Entity { public Dictionary<string, object> Fields { get; set;} public virtual T GetFieldValue<T>(string fieldName) { return (T)Fields[fieldName]; } protected vi...
I'm trying to upgrade my javascript to be more functional. I have used function composition and curry successful on less complicated code but i'm now running into a point where i'm not sure on how to approach it. Given the below relational data structures. // Contains all node types and its property definitions. Includ...
This code and updates are available on Github. I've written a small utility to dump the variables that are assigned in a bash script. Please note: This script depends on the shfmt and jq apps. I am not looking to make this script posix compliant, only bash specific. Some possible areas for improvement: Can the jq qu...
import math def generate_primes(limit): """Generates and prints a list of primes up to a given limit""" prime_list = [2, 3] num = 5 increment_2 = True # When True increment by 2. When False increment by 4 while num <= limit: is_prime = True sqr_lim = math.sqrt(num) for x ...
I am just getting into the following design patterns. I have created a class that allows for performing a couple of operations on different remote storage systems: drive, dropbox, .etc (I call these drivers although there might be a better name). The main class accepts the driver whether it be one of the previous, and ...
I wrote a infinite terrain script which works! Saddly everytime the player moves a chunk it lags for a moment. I know my code isn't great but I'm here to learn why and get this working too :D using System.Collections; using System.Collections.Generic; using UnityEngine; public class GEN_InfiniteTerrain : MonoBehav...
I'm trying to create a script that receive command from other script, and based on the command received it will execute a method with a while loop or stop it. I manage to make it works with the code below: import rospy import threading from std_msgs.msg import String class MonitoringInterrupt(Exception): pass def cbC...
I'm getting into Swift iOS development, and decided to create a Cookie Clicker application as a first attempt. Since I am very new with Swift, I would like feedback and criticism on everything possible, to kick bad habits to the curb early. Any and all feedback is welcome, appreciated and considered! Since all of the ...
Here is a program for conversion of an infix expression to a postfix expression using a stack. I would like to know how I could improve my checking for invalid input, make my code more expressive, and also improve the performance if possible. I am using gcc 7.4.0. I can use C++17 if needed. This program compiles with ...
I have very typical problem: Given big text file, containing text. The task is to calculate occurence of each word and print this info from most occured to less. Example input: cat cat cat dog dog mouse Correct answer: cat -> 3 dog -> 2 mouse -> 1 First I solved this using Scanner. But this solutions seems to be slow...
Trying to write fast non dependency IP4 string validator for embedded system, It should counts leading zeros, values over 255 and other corrupted strings. Not sure if I missed something. Сan you guys take a look: // Return 0 on error, store result to segs, if segs != 0. int is_valid_ip4(const char *str, unsigned char* ...
I am learning about survival analysis and I made some implementation in Python using lifelines and plotly. However depending on the number of arguments I would have to almost rewrite my function again because of all these ifs and fors. Could you suggest the way I could make it smarter? Here is my code: def classicLifel...
I tried this problem below and solved it in O(test_cases * string_length * pattern_length) complexity involving three nested loops. I want to know how can I further decrease time. I figured as much: 1: I'm comparing few patterns more than once. 2: Should find a way to not repeat the comparisons which I am unable to do....
I am trying to learn data structures by taking this Udemy Course, Easy to Advanced Data Structures by William Fiset. The course provided an implementation of Dynamic Array in Java. To ensure I fully understood the material, I tried to re-implement it in Python. Have provided the code below. Please let me know if I am d...
I have a file where I keep some initial values for some form fields base on field type. Some of them are primitive values, like '' or 0 or false but some of them are non-primitive reference values, like [] or {}. For example: INITIAL_VALUES.js const INITIAL_VALUES= { SINGLE_CHOICE: '', MULTIPLE_CHOICE: [], OBJECT...
`I made this Tic-Tac-Toe game first, by using user input in the console here: https://pastebin.com/6zLjrWcf , and now new and improved using Tkinter: import tkinter as tk from tkinter import ttk import time def create_button(relx, rely): button = tk.Button(width=10, height=2, command=lambda: callback(button)) ...
I have an Angular 5 project with a method named createForm. It will basically create just a form. However, the form created changes depends on the flight inventory code. If flight inventory code id TAG_ON I will create a form omitting messagePrefixSMSValidator and also form control named message to empty. createForm() ...
I have written a VBA code that copies data from source sheets into destination sheets. The destination sheets are formatted as a table so that formulas can be calculated automatically to update a pivot graph. I need to run the code daily. It works fine but a takes about 2 hours to run, some sheets have about 50,000 row...
A Fenwick Tree, or a Binary Indexed tree, is an interesting data structure that can efficiently update its elements. You can read more about it in this paper. Here is a generic implementation of a Fenwick Tree, which could take any two reversible operations: class FenwickTree<T> { private let count : Int pri...
according to the problem: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. Here is my code: def largest_palindrome_product(n:int) -> int: ''' Returns...
I'm currently working on a PSR-15 middleware for authenticating GitHub webhooks. <?php class Auth implements MiddlewareInterface, LoggerAwareInterface { const LOG_MSG_MISSING_HEADER = 'Authentication failed, X-Hub-Signature missing'; const LOG_MSG_SIGNATURE_NOT_MATCHING = 'Authentication failed, signature did ...
I would like to make a function that checks if something is valid, but if it can't then I want to return an error message that will probably be used to to throw an exception. public function isTodayWithinDateRange(\DateTime $start, \DateTime $end) { $now = new \DateTime(); if($now >= $start && $now <= $end) ret...
I own a parking lot that can hold up to 'n' cars at any given point in time. Each slot is given a number starting at 1 increasing with increasing distance from the entry point in steps of one. I want to create an automated ticketing system that allows my customers to use my parking lot without human intervention. When ...
This is my first serious post on any stackexchange so any criticism is welcome. Github link to the code in this question: https://github.com/yevsev/tagged_tuple Problem statement For a computation pipeline it is quite common to have a sequence of functions where each function transforms the data type to a new type. Exa...
For an iOS app which helps me rolling back vandalism on Stack Exchange, I have a piece of Swift code which downloads a revision page (example) and tries to find the 'spacer' fragment just above a certain revision. It might not be clear what I'm talking about, so here's a picture from Firefox + developer tools: I have ...
I've found a little task to create a block memory pool allocator. This allocator is required to allocate memory in single fixed-sized blocks from the pool in static memory. Sizes of block and pool are fixed at compile-time, but should be tweakable during the build. This allocator should work on various embedded multith...
This is the code for a basic endpoint in my express app routes folder. This firstly renders a page, and then on a continuous loop, renders information about some random "Breaking Bad" character. The idea is to have the page load, and then every two seconds, the page updates automatically with the new character info. T...
I want to make a booking entry. I want to ask whether the code that i wrote below is rightly format or not? I haven't tried it, because there's still more code that needs to be written. I just want to ask this before I continue to write. <?php require 'Connection.php'; //Check Connection if ($conn->connect...
I wrote this code to show that my reddit post is correct. After the first two terms, the signs are determined as follows: If the denominator is a prime of the form 4m − 1, the sign is positive; if the denominator is a prime of the form 4m + 1, the sign is negative; for composite numbers, the sign is equal the product ...
Is it possible to write this using the stream element? I can get the most of it with stream but it is the add adding string to list which is in the map that I am caught on. /** * Given a list of strings, returns a map where the keys are the unique strings lengths found in the list and the values are the strings matchi...
I wrote a code which is creating a Session and write in the Session Arrays diffrent things like: Username and Rank. I wrote then a function which is checking the Visited Profile Name and Rank and the Own Name and Rank to be sure that you have enough power to Promote/Demote. I want to know if there is a smarter version ...
I wrote a little Shoutbox System which is working fine, but I want to know if there is something I can improve about this code. Here is my Shoutbox Overlay: <div class="article_body" id="article_body" name="article_body"> <?php require('./tools/php/connector/connector.php'); $query = "SELECT * FROM `shoutbox` ...
I created my own Approximate Bayesian computation algorithm in Python 3 and I try to find the best hyper-parameters for it but it is really slow. This question is not about the math involved in it. For that, you can read my other question on Cross Validated. The objective of the ABC algorithm is to find the best distri...
I just picked up Rust recently and this is my first program (longer than 10 lines at least) so I'm looking for constructs that are more native and natural to Rust. I come from a c++/ python background. If there are some more compile-time optimizations that would also be nice since I am interested in zero overhead abstr...
A few days ago I began to work on my first project that's bigger than any others that I've attempted before. The purpose of this was to learn how to better code using OOP techniques. The code is all in one Main class (https://github.com/ViceroyFaust/JavaEnigma/): package owl; import java.io.BufferedReader; import java...
In C++, currently we have few possibilities to work with strings: by using plain old C-strings - unfortunately, we have penalty for getting length of string each time, and we should manually control life time of array, which actually contains data... we can use std::string, but again, unfortunately this is not very ef...
R doesn't have classed errors, just (for the most part) error and warning, so determining if the error should be caught or passed is up to the programmer. From the python side, I've always appreciated the ability to catch specific errors and pass the rest on, as in an example from the py3 tutorial on Handling Exception...
The authors of this paper compute support_points of a 900×700 image in 118 ms. I have implemented their algorithm below in Halide. In my algorithm, the nested for loops over length and width iterate over xi and yi, which are points in output_x and output_y. Over each iteration of the nested for loops, a vector top_k is...
This is my solution to LeetCode's "Next Greater Element Ⅰ": You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2. The Next Greater Number of a number x in nums1 is the first ...
How can I improve this hash matching program using either abstraction or search/sort algorithms? We briefly were introduced to searching methods such as bubble sort and merge sort, but I'm not sure how they can be implemented to improve my code. The program takes a command-line hash input, compares it against generated...
The Folder struct definition below is given: type Folder struct { ID int emailCount int childFolderIDs []int } Description of the fields are: Id : folder id emailCount : number of emails in the folder childFolderIDS : if the folder has subfolders, this list contains folder...
Here's my approach to an extensible version of the FizzBuzz challenge in Swift (so one can add more numbers to be checked against other than just 3 and 5). I initially tried using dictionaries but since they don't necessarily preserve the order of elements it could lead to BuzzFizz return values. I personally think tha...
Recently I was reading a book called Code Complete by Steve McConnell and I came across a chapter called The PseudoCode Programming Process(PPP) where the chapter taught me on how to write Pseudo code and gave guidelines on how to convert that pseudo code to real code. That chapter inspired me a lot and I decided to fo...
My goal with this snippet is to create an array of coordinates which in turn is a tuple of 68 elements, area and modified area array for all 10k elements and assign it to the df column. Running the complete code results in 5.3, 4.8, 4.6, 4.5 seconds. #%% arrayc = [] #array for array of coordinates areaAr = [] #area...
I am currently developing a framework to facilitate writing controller programs for scientific instruments. I use attrs extensively in the internal parts of the code. I have some parts of the code which exposes classes to be derived from, but I don't want to call @attr.s in the beginning whenever I derive a class. I...
I am working on a NodeJS port listener code that listens to a particular TCP port on the server. The obtaining the data from the port, the data is split using a delimited (for instance comma ,) and inserts this data into the MySQL database. I have written the code and I was successfully able to insert data into MySQL s...
I have a tableview which shows a list of objects called Requests. It has 3 segments. Namely Accepted, Received and Sent. And the objects for each segment are in 3 arrays. I want to enable deleting rows (in turn the objects) only for Accepted and Sent segments. This is my current implementation. func tableView(_ table...
Here's the problem at hand: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? Here's the code Ive written to solve it: from math import sqrt def prime_factoriza...
I'm making a news aggregator using newsAPI, and have everything working - to begin with. But was wondering if the code I use to filter through an object can be made more efficient - meaning fewer lines of code. So far, it only returns what I need from the raw JSON file, then filters it using a for loop to ignore objec...
I use my own logger adapter that collects data into a dictionary: public class Log : Dictionary<string, object> { } This is really all I have. I then pass it to my NLogRx - this is an IObserver<Log> that translates my Log into NLog's entries. I need this layer for all kinds of freaky stuff I do with that dictionary: a...
I'm starting to study sorting algorithms in Python. Merge Sort has a complexity at best and worst cases \$\mathcal{O}(n\log{}n)\$, I want generation a list where Merge Sort is slow but I would some complication. Could you help me with this problem? This is the code: def mergeSort(l): #print("Splitting ",l) if...
DO NOT REVIEW IT. I PROVIDED BIG CHANGES, SO THIS CODE IS NOT UPDATED I'm developing my bookscraper to improve myself in coding and I think I have solid structure that I want to be reviewed by more experienced people than me. It is app based on SpringBoot which fetches data from 2 different bookstores. For now it has ...