instruction
stringlengths
71
95.1k
I need to be able to access a number of different payment methods in a common list. They can be different methods - credit card, cheque, direct debit etc. The only common attributes are the payment method id and PaymentMethodEnum. I would then be casting the payment method to it's appropriate type to get the extended p...
I'm trying to optimize a function in a process which is going to be run millions of times. The function is supposed to partition the vertices of a graph, which will be used to make a quotient graph. Theoretically, the process is: Input a graph, G For each vertex, v in G, we choose a random edge of v (the same edge can...
I am not a JS/TS Guru, so i wanted to ask if one could write this better. I needed a very primitive Full-Text-Search of some properties of an Object. What do you think? export const search = <T, K extends keyof T>(term: string, objects: T[], keys: K[]): T[] => { const foundObjects = objects.filter(x => { for (con...
I have two cases here: the person who ordered a ticket clicks on "Permission" and the OrderConsentUpdate View updates the database. is the attendee him- or herself gives consent for one specific ticket. In that case, AttendeeConsentUpdate is called. You can see both classes are very similar, but not still differ in e...
We currently have two legacy systems: the Consumer and the Worker. These systems are massively complex in ways that are not important to this review, but it is enough to say that a large-scale re-development of these systems is not currently possible. The Consumer communicates with the Worker via http request/response...
I am trying to extract the ip address of my machine when connected to multiple wireless networks. The motivation here is then I can make a socket connection on that ip when I have two networks that have the same default gateway. I am hoping that there is either a way to greatly improve the code or replace it with some ...
Python 3.7.0 from sys import argv class Version: def __init__(self, ver_str): if type(ver_str) != 'string': ver_list = ver_str.split('.') self.Major = int(ver_list[0]) self.Minor = int(ver_list[1]) self.Patch = int(ver_list[2]) self.Build = int(ver...
This is what I've come up with for a class that handles parsing AWS Textract output. So far it only gets the AWS Textract output into a .txt file. import json import logging as log import os import sys import subprocess import time log.basicConfig( format='%(asctime)s [%(levelname)s]: %(message)s', datefmt='%Y-%m-...
I am implementing a method to find the median of an unsorted array using a counting sort. I would happily go for a median of medians or selection algorithm for better performance but they are essentially sorting the array (or partially sorting the array if I choose to go for minHeap) which I am not in favor of. int get...
I have the following DAOParent class that I use to put connect/disconnect code in one place. Each DAO class in the application is an EJB that extends DAOParent (note that I don't use JPA): public class DAOParent { private InitialContext context = null; private DataSource ds = null; private Connection conn ...
I have answered a Question in Stackoverflow link. a) Create a function called resize that can be used to increase the size of integer arrays dynamically. The function takes three parameters. The first parameter is the original array, the second parameter is the size of this array, and the third parameter is the ...
My TableView consists of four cells (for blacklisting categories) with a boolean property (indicated with a checkmark) and another cell with a UISwitch embedded in it. My current controller is as follows: class TableViewController: UITableViewController { var blacklisted = Set<Category>() var flags = Set<String...
I'm a beginner when it comes to path finding, so I decided to write an as simple as possible (to me) A* algorithm to learn. I looked up on internet the general idea and found some pseudo-code that I translated in Python. What I'm most interested in is if I'm missing some edge case or not (I wrote tests for the situatio...
I've stumbled across some UI (React.js) code that I've worked out to have a time complexity of O(n^4) (I hope that's right, if not please do correct me). I was interested in how one might go about optimising something like this. I know that for() loops do perform slightly better than array.forEach() and I'd assume cons...
I have this counting sort for byte values running in linear time with respect to array length: Arrays.java package net.coderodde.util; import java.util.Random; /** * This class contains static methods for sorting {@code byte} arrays. * * @author Rodion "rodde" Efremov * @version 1.6 (Apr 24, 2019) */ public fin...
I have a login dialog working in vue js with typescript. I want to trigger the open via a button on page, but also by toggling a value in the vuex store. It is working by 2 watchers: Watching the local visible state persists the state to the store on every change Watching the store state then toggles the local visible...
I tried to search and read for 10-12 hours on how to have a secure session, and this is the (simplified version of the) code that I came up with. (found no good book or article with complete guide about PHP Sessions, each had something and missed something else) Could you kindly please check if I have taken the necessa...
I am Learning Javascript, after doing Java development for 2 years. I am doing a module on udemy which had a coding challenge which I completed and it works but wanted to get it reviewed to find out best practices and how the code can be improved and optimised. Here is the Challenge: CODING CHALLENGE Suppose that you'...
I've created a heavily problematic code that works. Summary: It looks through a folder structure, for png files and tries to replicate this structure in Photoshop. Files are mapped layers and Folders to Groups. I am using comtypes to access Photoshop and create the groups and layers. The issue I faced with, is that you...
I have 3 types of coins: Gold, Silver, Copper. 1 silver = 100 copper. 1 gold = 100 silver. My input is always in coppers, and I want to be able to make it a bit more readable. So far my code is: def api_wallet_translate_gold(value): """Translate a value into string of money""" if value >= 10000: # Gold ...
I just want to confirm that I am versioning my "versionable" fields correctly, and that there isn't another, better way to do this. I have a table event, a record of an event in time. It has some fields that I want to be invariant, like it's ID and event series it is associated with. It also has some fields that I want...
I have solved the jug problem with 3 jugs: For jugs size A, B and C find the minimum number of steps to reach D, where D < max (A,B,C) My Python 3 code is below. I am wondering if there are other ways, faster ways or more efficiency ways to compute the answer. """ Solving the "how many moves to get solution d for jug...
I have worked on a SFML Game/Game-Engine Project for 2 months now and am looking for some feedback in terms of... Is this a valid approach for a Game class? Are there any glaring C++ coding practice mistakes? The following code is from my Game class which is the main organizational unit of the Game/Engine. I use a Sc...
I am making a project just for fun that employs the 3DES algorithm in Java. I was wondering if my algorithm looks secure. Is there any advice or feedback you could give me? Do I need to include an IV? Am I transferring the salt successfully? My code can encrypt a file using the Triple DES algorithm. // author @Alex Mat...
I've made a little implementation of an undirected graph, using FIFO lists, for one of my homeworks. Never really knew how to write a proper FIFO data structure, so I would be glad to see some opinion of yours. #include <iostream> #include <fstream> using namespace std; class Graph { class Node { stru...
Problem 1 - Matrix powers in R R does not have a built-in command for taking matrix powers. Write a function matrixpower() with two arguments mat and k that will take integer powers k of a matrix mat. My attempted solution. matrixMul <- function(mat1, mat2) { rows <- nrow(mat1) cols <- ncol(mat2) if(...
Trying to set up express server that will authenticate a user's Google email before proceeding. The code below works, but is there any way to make it more elegant? The whole new Promise thing feels clunky. Still wrapping my head around async functions. All the googleapis functions are async, so I feel there's a better ...
Description: I am working on a classifier which categorizes the text based on some criteria, at present, it is a map of category and list of words if any of the words appear in the text, a category is assigned to it. The text can have multiple categories. The number of categories can be more than 100. Problem: There is...
What I'm trying to do: implement the Vigenère cipher in Ruby. I already have a working version, but I want to make sure it is efficient and well-designed. module Crypto # Vigenère cipher encryption and decryption abstraction module Vigenere LETTERS = ('a'..'z').to_a.freeze private_constant :LETTERS mod...
I was reading Introduction to Computation and Programming using Python and there in an exercise, we had to write a function which would tell us if a given word is a palindrome or not, recursively. This is the code which I wrote: word = input() def isPalindrome(x): if len(x) > 1: if x[0] == x[-1] and isPal...
I am trying to implement a function groupWeeks(dates) using reduce that allows me to group an array of objects { date: '2019-03-11', count: 8 } by weeks. The following code works fine. Is there a way to refactor it? It seems to me that my solution is unnecessarily complex. Please ignore Date.prototype.getWeekNumber and...
I am building a simple login page which will check for username before navigating to another screen and here is how I am doing the binding now. I would like to know if I am doing it right and if I am not, what is the recommended way of doing the binding. Moreover, I creating the UI programmatically. ViewModel.swift // ...
I am self-learning js and came across this problem(#3) from the Euler Project The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Logic: Have an array primes to store all the prime numbers less than number Loop through the odd numbers only below number to che...
I implemented a recursive depth-first traversal, with all three traversal modes in this function. Is this the most succinct way to write the code? /** * Node */ public class Node { private int value; Node left; Node right; public Node(int value) { this.setValue(value); left = null; right = null; ...
I've wroted this function because I was getting trouble using toLocaleString() in google-apps-script, and after some refactorings I got to a working code: function neat(numToFormat,prefThousands, prefDecimals) { var thousandSep = prefThousands == undefined ? "." : prefThousands; var decimalSep = prefDecimal...
I have a scenario in which I call many APIs throughout my application lifecycle. In case the server sends me a 503 response code, it will also send a lockdown object which has a timestamp associated in one of the fields. The reason of this being that I have to block further calls to the server till the timestamp expir...
I am trying to find out quantiles for each column on the table for various firms using spark 1.6 I have around 5000 entries in firm_list and 300 entries in attr_lst. Number of records in table is around 200000. I am using 10 executors each with 16gb memory. Currently it is taking around 1 second for each quantile calcu...
Today, I decided to implement std::any using the cppreference page. I've never actually used std::any before and after seeing the implementation first hand... I don't think I'll start now! I'm not entirely sure what this class is actually meant for. I'm not even sure why I implemented this in the first place... Anyway,...
I'm learning how to write code in Python. This code makes an .ini that saves different cycles adding one new operation to the previous cycle. It starts at 1;1, saves that it has run 1 cycle and will start cycle 2 next time. So, next is 1;2 followed by 2;2. Next cycle is 3, so it will go up to three: 1;3, 2;3, 3;3, etc...
I have a power shell script that when run will prompt the user to: Select a folder location select a file name enter credentials This then exports those credentials in a xml file. Although this requires 3 prompts to the user before is complete. Looking to find if there is a better way to approach this. For example, h...
A list of objects needs to be grouped. The list is iterated and checked with other objects in the same list except itself. The method People.isAttributeEqual() checks if two objects can be grouped. The list returns a list of two unique objects with the same attributes. I am trying to optimize the method People.groupSi...
I've got a class that is like a facade, like an engine for my application which is responsible for fetching data from url and summing it. I have got problem with proper names for my methods. executeNBPParserEngine is like method that connects everything to one. It gots if and else statement. If statement checks if th...
For learning purposes, I've written an iterative version of a recursive algorithm for generating the set of permutations for a given set of unique integers. Can I make any improvements to increase readability and performance? I've also read in various sources that when transforming a recursive algorithm into an itera...
I'm a newcomer to Java (I primarily do C# ) and I have to say that they have made I/O handling much more difficult than it should have been. I am accustomed to the scenario where when I need keyboard input in a class of my application I simply call Console.Readline() and does the job. In Java, I must create a Scanner o...
I'm creating a debug-view for my expression-trees. They record each operation automatically in a tree that I am transforming into string so that I can see the exact evaluation of expressions. Tree(Node) This tree is represented by the TreeNode. It stores the Value of the current node and its children. [PublicAPI] [Deb...
First of all, I know there is huge amount of information about KMP on the internet but many examples are just the code without any explanation. So I've decided to implement it on my own. Secondly, I am going to use this algorithm to search for a pattern in a numerical string. I wrapped all the stuff in class KMP. CODE...
Just implemented this Kalman Filter in Python + Numpy keeping the Wikipedia notation It's a pretty straightforward implementation of the original algorithm, the goals were develop skills related to implementing a scientific paper keep it readable (so I have used private methods for intermediate results) It include...
I came up with this code after implementing the feedback given by @200_success. The previous one (A faster way to compute the largest prime factor) tested my patience, but still failed to give the answer on time. This one is an improvement as it gives the answer without much delay. The question (Euler project problem #...
I'm working through Paul Graham's "ANSI Common Lisp". In Chapter 6 (p105), he introduces the idea of utility functions. He points out these are core to bottom-up programming and reusability. He observes that for such utility functions in lisp and fp "it's easier to abstract out the general when you can pass the specifi...
We gave an option for user to Upload the image Image is uploading fine, but its not adding any img src tag for that uploaded image.... Is this is acceptable to upload image without using any img tag ? will it lead to any problems in future ? $(document).ready(function() { // dont have a webserver so im using base64st...
I have the following kotlin function that takes in a string "value", then attempts to parse "value" as both a LocalDateTime and an Int. It returns a Pair of the parsed value of "value" and an enum that specifies which of the three types it was determined to be. enum class RangeValueType{ Int, Date, String }...
My goal is to calculate the length of each strongly connected component (SCC) I have an input that looks like this: [['1', '2'], ['1', '2'], ['1', '5'], ['1', '6'], ['1', '7'], ['1', '3'], ['1', '8'], ['1', '4'], ['2', '47646'], ['2', '47647'], ['2', '13019']... where lists inside big list means edge and ele...
I wrote this Javascript snippet for a Polymer fronted, it works without issues. The only thing that it accomplishes is changing an icon's orientation whenever a user is clicking on any expandable-item (expandable-item is a specific Tag name). Imagine a classic Operating System's folder tree display and the + or - icon ...
I'm trying to identify which cells in Column C in a spreadsheet of data are dates and if they are, then check if that date is older than 2 years old. If the second condition is met then the below code should copy the entire row from sheet "DUP_ALL" to a new sheet (Archive) and then delete the copied row from the "DUP_A...
My macro is cobbled together using some code from Ron DeBruin and various other sources and it currently works but I am sure it is not as efficient or bulletproof as possible. Currently it updates the Weekly or Monthly Dashboard tabs and saves them as a PDF then emails them to the correct subcontractor as well as their...
I am working on a coding challenge from the Hackerrank site. Given two equal-length arrays of integers, with values from 2 to 109, find the maximum number of times we can remove a pair (Ai, Bj) where Ai and Bj are not co-prime. The programming language of my choice is Python2. Hackerrank has timeout of 10 secs for th...
I need to write an OCaml program that return all possible zip of two lists together while preserving the order of the element in each list. For example, if we zip the lists [1;2] and [3;4], we get [[1;2;3;4];[1;3;4;2];[3;1;2;4];[1;3;2;4];[3;1;4;2];[3;4;1;2]]. My naïve approach is to append each element in the first lis...
The task Given a linked list and a positive integer k, rotate the list to the right by k places. For example, given the linked list 7 -> 7 -> 3 -> 5 and k = 2, it should become 3 -> 5 -> 7 -> 7. Given the linked list 1 -> 2 -> 3 -> 4 -> 5 and k = 3, it should become 3 -> 4 -> 5 -> 1 -> 2. My solution class Link...
My questions are: How can I improve my implementation of the FSM model? Should Finite State Machines have functionality for Adding and Removing states from table? (Since I can only be in one state at a time I feel like there's no need for me to store the states when I can just call SetState(state)). Am I doing the tra...
I have an import macro, which creates ID by concatenating cells, then I compare using VLOOKUP with another sheet if any duplicate found. It's running very slowly, so I want to know better ways to optimize this code, because once finished, I will need to add another "for" for to handle duplicates found and compare dates...
Edit: New version at Python 3 Tkinter Calculator - follow-up New status: I´ve refactored the code trying to follow the recommendations from the guys who answered this question. The new version is on the link above. I'm a beginner developer and I chose Python as my initial language to learn. This is my very first proje...
I wrote a macro that is taking 20+ minutes to run on other computers, but when I run it on mine it only takes 5 mins. It is a larger macro and I am new to the VBA coding world. I was wondering if I could condense it down so that it can run faster not only for my computer but other computers too. The purpose of my macr...
What the code does: Takes a Python list of integers as input and searches for a 'symmetrical' inner-portion of the list. Example: symmetrical_sum([10,8,7,5,9,8,15]) == ([8, 7, 5, 9, 8], 37) Note: Symmetry occurs if the value of the ith element from the start of the list is equal to the value of the ith element from t...
I'm developing a new Look and Feel that is based on animation , so I've decided to make animated text caret too ! The caret works as expected every thing is fine except that am worried about how I defined my animation rules in making the babySteps method and repaint in the movementTimer not the caret one but the compon...
The Goldbach conjecture says: any even number greater than two can be represented by the sum of two prime numbers. G(n) = { (p1, p2) | p1 + p2 = n, p1 and p2 are prime numbers with p1 < p2 } For example: G(6) = {(3, 3)} G(12) = {(5, 7)} G(26) = {(3, 23),(7, 19),(13, 13)} So I have to do an algorithm that determines...
This a working function as part of a drag and drop task manager im playing around with. The function is working fine, but it just looks messy and long to me. I haven't added all the code as I'm looking just to tidy up the function itself. I have added the state though as guidance. function onDrop = () => { let peopl...
I've recently learned BEM & SASS, and I'd like to know if my BEM syntax is correct. I'm trying to create just the header of this page: https://blackrockdigital.github.io/startbootstrap-agency/ Are there any differences you would make to my class names? I get very confused about how to deal with elements when they are n...
A program that I work on constantly updates and modifies program state containing an arbitrarily deep and wide tree. The data looks something like this. (defonce state (r/atom {:some "program" :state "here" :tree [{:topic "Books" :expanded tru...
I put together this code as part of a practice problem. The instructions for the program are to accept JSON messages, transform the messages and then dispatch them to the right queue according to a series of rules. The message service must accept messages when the following method is called: enqueue(msg). It must prov...
This is my second attempt with unit-tests. Like my previous attempt, I would prefer a focus on the unit-tests, however I am always happy to improve my code in any way reviewers can help. Once again it is just a single class along with supporting unit-tests. The class is named UpgradeButton and represents upgrades that ...
I made this hex dump after being dissatisfied with the free hexdumps out there. The biggest dissatisfaction is that the encodings for the char bytes were not color encoded, just like the hexyl hexdump program. If you are interested in reading the full background story, you may click on the Medium link: https://medium.c...
Similar questions have been asked here before and my solution is pretty much in line with some of the answers. I wanted to work on this a bit. Scenario Basic sales tax is applicable at a rate of 10% on all goods – except books, food and medical products, which are exempt. Import duty is an additional sales tax ap...
Given input array of UINT8 (unsigned char) with numElements how could one efficiently convert it into array of Float32 (float)? For instance, here is a vanilla code for it (Pay attention there is a scaling operation): void ConvertFromUint8(float* mO, unsigned char* mI, int numElements, float scalingFctr) { int ii; ...
I'm developing an internal API using Flask, although due to limitations with our platform the endpoints will be accessible over the public internet. It will only have a very small number of users and it's not likely that this will increase much in the future. They will query the service programatically from a backend. ...
I have this method, which first basically shows a Welcome screen to user only once per day. The code I have so far is this private func showGreetingScreen (tabbar: UITabBarController) { let defaults = UserDefaults.standard if defaults.object(forKey: "greetingDate") == nil { defaults.set(Date(), forKey: ...
I have a function that checks user level and limits the data before saving it to mongoDB database (pre 'save' middleware for mongoose). It have been getting complexity warnings and tried to rewrite it, and came up with the second version. I think now it's really not human readable! Anyone has any suggestions? Before: p...
I am writing a C# program wherein I need to populate an array based on a lookup table and set of string arrays with metadata. My lookup table looks like this (Table with key: transmitter, value: Array of receiver): { LED1: ["px1","px2","px3"], LED2: ["px4","px5","px6"] } and my meta arrays looks like this (it ...
Given input array of Float32 (float) with numElements how could one efficiently convert it into array of UINT8 (unsigned char)? The tricky part here is to apply Unsigned Saturation in the conversion For instance, here is a vanilla code for it (Pay attention there is a scaling operation): void ConvertToUint8(unsigned ch...
The actual data types here are probably not relevant to post an answer. I use Qt types here, but the question should apply for other structured types as well. I receive a data frame via can bus using the QtSerialBus module in Qt. I want to look for each received frame, if it matches a QCanBusDevice::Filter that I maint...
i want to know can this be hacked/injected? $stmt = $mysqli->prepare("SELECT * FROM myTable WHERE name = ?"); $stmt->bind_param("s", $_POST['name']); $stmt->execute(); $result = $stmt->get_result(); if($result->num_rows === 0) exit('No rows'); while($row = $result->fetch_assoc()) { //do some stuff } var_export($ages)...
I have some JSON where each key stores an array, and I need to combine all those arrays into a single array. My current solution doesn't seem the most friendly to review, but without forEach not able to return a value i'm struggling for a succinct solution. config = {"levels": {"first": ["a", "b", "c"], "second": ["d"...
Just a very simplified and stright-forward way of serialize/deserialize to/from JSON using standard .NET 4+ libs. I was trying to avoid "complexity", so get rid of 3rd part libs and heavy-infrastructured standard libs. #region JSON API public static string ObjectToJson(object o, Type t, Type[] pTypes = null) ...
I wrote a query that searches people based on search parameters from 3 other tables (phones, emails, addresses). I'm pretty sure this is not the most efficient way to do this, any performance tips are greatly appreciated :) Note that the user may choose to search by less than all the possible criteria, for example sear...
I have a long roster where I'd like to categorize the rates by time/day of service. Most shifts ends the same date but there are some special cases where the shift ends on a different date. I have to prorate those shifts. My solutions seems to have used a lot of for loops. I would appreciate any help improving my codin...
I'm trying to make my code more readable. I created a function toString - It returns a string in the following format: Name: <Name>. IdNumber: <Number>. Age: <Number>. Colors: <Color1, Color2, ..., ColorN>. Please notice that the colors should be sorted alphabetically. The function I wrote for now: public String toStr...
This is an algorithm to return a list of consecutive integer ranges from a list of integers. The practical use of such an algorithm is to filter lists more efficiently, i.e. rather than check e.g. 1000 items (1..1000; x==1 || x==2 || ... || x==1000), it might be possible to check only 2 items (x >= 1 && x <= 1000). Doe...
I've written a piece of code that determines if a piece toast with butter lands on the butter-side or not, depending on its initial velocity and the table height. The code is written in Mathematica and to be honest, it was my first time writing a piece of code in this language (which wasn't a simple calculation of an ...
I wrote a program in haskell that aims to let the user encrypt, decrypt and crack/cryptanalyse pre-electromechanical era ciphers in Haskell. I want to know your opinion on it since this is my first Haskell project and so my approach to it is slightly different from the approach I would make on other languages. It curr...
Apart from PEP8 issues which I will eventually get my head around, what do you think of my update to the 3 jugs jug problem (which now works for n number of jugs) For jugs size A, B and C find the minimum number of steps to reach D, where D < max (A,B,C) Original code: Jug problem - 3 jugs from math import factorial ...
I have written a small program in C# to plot ROC, PR (equal to AP) and PRI (equal to API) curves using the plot_curve() method. (The program also calculates the approximate AUC of the curves using the area_under_curve_trapz() method, but that isn't the main point. The main point and purpose is to plot the curves.) Pl...
This is a TensorFlow regressor that tells me that if you get x score, you will have x% to win a game in x game(game is not important). Doing this as a project to learn tensorflow. from __future__ import print_function import math from IPython import display from matplotlib import cm from matplotlib import gridspec fr...
People here often ask to share as much code as possible. My app is just a sandbox, a typical freshly created AspNetCore + Angular template without much code. So please don't blame me - I provide ALL OF the code related to dates & timezones. I'm playing with dates in .NET and started learning Moment.js in detail. I thi...
I have the following: public class Person{ public string FirstName {get; set;} = ""; public string MiddleName {get; set;} = ""; public string LastName {get; set;} = ""; public string Title {get; set;} = ""; } public class Program { public static void Main() { var person = new Person {Fi...
I am currently working on a game, and I get the configuration in an .ini file, and I get information with this library https://github.com/benhoyt/inih I would like to improve the readability / performance of this code, as I do not know much about good practices. include "project.h" // typedef struct s_server_conf { //...
I've always used fgets to read a file. However, I want to read a file that may have embedded \0. I thought of using ftell to query the size, but it doesn't seem to work on all files. I've got a test file, 31 32 33 00 34 35 36 0A E2 82 AC 0D 0A 61 Here is my fgets. #include <stdlib.h> /* EXIT */ #include <stdio.h> /* ...
I have an initial pool of subjects, then I need to apply a set of general criteria to retain a smaller subset (SS1) of subjects. Then I need to divide this smaller subset (SS1) into yet finer subsets (SS1-A, SS1-B and the rest). A specific set of criteria will be applied to SS1 to obtain the SS1-A, while another set of...
I saw this question (javascript - rotate linked list to the right by k places) the other day and I tried implementing it in Ruby in a totally different way. Here's the code (I also created a REPL if you want to test it - https://repl.it/repls/PrimeSomeBlock): node.rb class Node attr_accessor :value, :next_node def...
I made a simple python script using the BeautifulSoup and Selenium to automatically download adult comics from 8muses. I've used selenium for the reason that the website uses javascript to load the images. Enter the the gallery url and download location to start downloading. Sample gallery urls: https://www.8muses....
With the new additions in c++11 and c++17 I wanted to create a simple implementation of thread pool. I would like your opinion on: Thread safety API performace and general code quality I also would like to know if it good idea to have wait_until_empty method. Without id I probably could have avoided using a mutex....
I've made an Android app that converts between cooking measurements, taking into account the type of product you use (that way it can convert between mass and volume by using the density). What are your thoughts on Android- and Kotlin-specific idioms I might be missing? For brevity's sake, I've included the main types ...