instruction
stringlengths
71
95.1k
I built a Brainfuck interpreter. It seems to be working. I ran the game of life and this tic-tac-toe and other programs on it. They worked fine. I'd appreciate any comments on correctness, readability and performance improvements: #include <algorithm> #include <cassert> #include <cstdlib> #include <deque> #include <fst...
This is a Python program that takes data from Quandl Databases and formats it for my Neural Network to Train. The code works but I'm not so confident in my code styling conventions. If you would like to review this code with any styling suggestions on how to reformat the code (with respect to PEP8), feel free to review...
I'm not experienced with testing, therefore I'd like you to look at my code proposal of unit test. My solution has following projects Tests\Application.Tests Application Domain Infrastructure Web And I am not sure with Application Service Test. The tested class is DeliveryDateService namespace Application.Services {...
Simple Console Application for checking if one of the hosts is available. The implementation should be for around 5 hosts to check with different response times and the method should return fast when one Host can be pinged. Is the asynchronous implementation O.K.? using System; using System.Net.NetworkInformation; usi...
I started to learn React, and I wrote simple Blackjack game. I just need code review because I don't know anyone who know React well. Whole state and logic of my game I have in Game.js component: import React, { Component } from 'react'; import Hand from './Hand'; import DealersHand from './DealersHand'; import Bet fro...
Goals learn Python improve problem-solving skills improve my coding style Hardware This code runs on a Raspberry Pi 3 Model B (Raspbian OS) in combination with the Sense HAT. The 8x8 LED-Matrix on the Sense HAT is used for displaying the game-graphics and the included joystick is used for steering the snake. While de...
I've completed the following coderbyte question and would like feedback as to whether it follows Python best practices, is efficient and so forth. The coderbyte problem: Have the function calcpath(str) read the str parameter being passed, which will represent the movements made in a 5x5 grid of cells starting from the ...
I've made this GUI program for my workplace that checks whether measured coordinates on machined components are within spec. It takes in specified coordinates, tolerance and measured coordinates and uses Pythagoras to check whether the tolerance has been exceeded. It then plots the measured point relative to the 'true ...
This is a simple guessing game I have made, an improvised one. I will do a GUI version of this shortly. I'm looking for comments and interesting code ideas. import random sec_no = random.randint(0, 10) ncount = 0 att = 5 while True: sec_no = random.randint(0, 10) ncount = 0 att = 4 minp = input('''...
I have a block of Jinja2 (used in Sceptre/CloudFormation). It is not readable in my opinion, but I can't find any way to clean it up to improve it. {% set args = "--kubelet-extra-args '--node-labels=nodegroup=" + sceptre_user_data.node_group_name %} {% if sceptre_user_data.node_labels != "None" %} {% set args = arg...
I created a Rock/Paper/Scissors game in C# that asks the player the number of rounds he wants to play, and then calculates the points and determines the winner. Is there a way I can fix my code? Is it appropriate to use switch and if/else together? Console.Write("How many rounds do you want to play ? : "); int numberOf...
I'm developing a Python library to consume the Zendesk search API. Problem is, Zendesk limits search results to 1000 items. Thus in order to get all the results if they are greater than 1000 I need to call the endpoint several times with a recursive function storing the latest created datetime for a ticket once the 100...
Description: This would make a first part of a currency exchange simulator The first phase includes downloading currency historical data from histdata.com api, plotting given period and given time frames using different plot types and adding some forex technical indicators to the data. I will be posting follow ups when...
I have a simple application which requires the user to input details about students and their grades. I have two different classes Student and Database. The Student class contains info about students, such as, their names and grades: Student.h file: #pragma once #ifndef STUDENT_H #define STUDENT_H #include <string> cl...
[I made a little web-scraper that downloads the source html files as well. Now for the sake of saving storage space i wrote a small function to delete quite a bit of stuff in the html file (specific id's, classes and meta information as well as footers, headers, and links). The function takes the html tree as input an...
I am doing a practice project to create a calculator with OOP principles. Below is my CalculatorApp that communicates with Calculator(to calc integers) and StringParser(to tokenize input). For CalculatorApp to work, strict rules need to follow. For example, the input must use "add" not "plus" and "(" not any other kind...
I am trying to solve this question: https://open.kattis.com/problems/fenwick A Fenwick Tree (also known as a Binary Indexed Tree) is a data structure on an array which enables fast ((log)) updates and prefix sum queries on the underlying data. For this problem, implement a Fenwick Tree to support operations of t...
I had to write a code (as an exercise) that receives a 2D row wise and col wise sorted array and an element, and return true is the element exists in the array. The first thing that came to mind when i heard "sorted" is binary search, but than i realized that the last element in each row isn't necessarily smaller than ...
I have implemented exponentiation with integer base and non-negative integer exponent for practicing purposes. Of course there is some upper limit what numbers can be exponentiated within the int datatype, but I wasn't concerned about this at this point. But any suggestions how to handle it are welcome. There are four ...
I have a function where I am trying to assign book ids to certain students on registration of a new student. FOR book_id IN SELECT a.bookid FROM books a WHERE a.isdelete = false and published = true LOOP IF NOT EXISTS (select 1 from studentbooks where bookid = book_id and studentid = id) THEN INSERT ...
So, I tried to solve this question and my code did not execute within time-limits. https://www.hackerrank.com/challenges/acm-icpc-team Here's my code, from itertools import combinations nm =input().split() n = int(nm[0]) m = int(nm[1]) mat=[] z=[] for i in range(n): mat.append(input()) a=combinations(range(1,n+1)...
I have a List of Objects containing following structure public class DaySpan{ private LocalDate date; private Integer numberOfDays; .. .. //getters & setters } Lets say the list contains 3 instances of above classes with data (date is in dd/mm/yyyy) 04/02/2020 3 03/02/2020 5 01/02/2020 1 Then I need ouput for coun...
I am working on a Units library for a personal project that is a physics-heavy C#/Unity3D game, and I am looking to improve it in a few areas: Is there a way to reduce the code duplication? Is performance going to be a problem? Is there anything I can do to improve performance? Can I hide the value member variable s...
I have wanna learn more of ways to improve my code and also, make it look different. I want to see different approach but have the same result. def text(): print('What message(s) are you trying to encrypt?') return input() def shift(): key = 0; while True: print('Enter the key number (1-%s)' % ...
I need to write a VBA code routine with an efficient way to replace blank cells with values from another cell. For example, my worksheet has some blank cells on random rows in column D. I want to replace these with the value on the same row in column A. In other words, go down all the rows and if column D is blank, rep...
I have been tormented by the question of how to handle parameter errors by consumers of my modules, and also in classes which are extended from base classes. The particular sort of concern I have is around map keys in various utility classes. What if the consumer provides a key that doesn't exist in the collection, or...
I'm a junior developer. And I want to learn the good way to code. The code I will show you is working, but I feel like its all messy and longer that it should be. It is simply a .js, a .html and some css that render a list of informations about scans. The list come from Firebase (Google Analytics). Here is the code I s...
I am attempting to create a batch file that will execute multiple msi files in a particular location on our network. My intention is not to have any user interactions until they are prompted to do a reboot. We have an automated tool that I will use to rolls this out, just need some help with the batch file itself. Keep...
I am using the following code to format an address retrieved using the Google Places API. According to Googles docs they recommend looping through the response based on what you list in the componentForm array. Is there a way to optimize this code and simplify it without having to specify the individual if statements? ...
I've decided to do a simple linked list question to brush up my Java & CS. This is the solution for Given a reference to the head of a doubly-linked list and an integer, \$data\$ , create a new DoublyLinkedListNode object having data value \$data\$ and insert it into a sorted linked list while maintaining the s...
I am self-taught when it comes to coding. I want to improve, so please give me advice if I have some bad habits or if there is in general a better way of doing this. The idea of this code is to look up Excel files on a file server, check if they are flagged as "finalized" and if so, to create new records in a database ...
I am working towards a CSC degree right now and wanted to try and practice writing good code that could be easily maintained and read in industry. I wrote the following program in Java that takes a multi-dimensional array representing an Sudoku and uses recursive backtracking to find a solution. If you were an industr...
I have developed this script to find the counts of attachment records stored in a table in PostgreSQL for different other tables. I check if the res_id field of ir_attachment table is existed in it's corresponding table (res_model) and if it's not existed, I increase the counter. This script works fine and I get the de...
I'm doing questions on HackerRank to brush up on Java & CS. Problem This problem is called Sparse Arrays in HackerRank. There is a collection of input strings and a collection of query strings. For each query string, determine how many times it occurs in the list of input strings. For example, given input strings...
I am currently completing "The Odin Project" and one of the first projects was to create a google homepage. I was wondering if some people could tell me all the long winded and unnecessary code I added and also tell me how I can better go about sticking the footer to the bottom of the page. https://github.com/LHUF/goog...
I am using Java 7 Problem: I need to retrieve records from a database table based on a condition, orig_setting = 1. This query could return ~1000 records. Parameters from 1-7 of the Params object are set with this query. In the next query, I need to retrieve records from the same table based on another condition, curr...
Background I'm trying to check equality between cells in an irregular, non-continuous range of cells. For this purpose I would like to know if all cells are equal to the first Cell in the Range. The Range can be anything, but let's say it could be the following (don't mind the implicit reference for now): Range("A1:C1,...
I wrote a program that is supposed to be a breadth-first search algorithm, but I'm very new to search algorithm so I don't know if my method is very effective or if there is a simpler way to do this. So I'm asking if there is a way to improve my code. In this case, I have made the program search for the closest 1 in a ...
I wrote a Singleton template, with examples, google tests and README https://github.com/erez-strauss/init_singleton/blob/master/singleton.h The usage can be as simple as: #include <singleton.h> int main() { es::init::singleton<int>::instance() = 4; // a singleton of a type int, initialized before main() s...
I have a customized function to accomplish the business requirement I mentioned, but this one takes a very long time to run. I was wondering if there was any way to shorten that time? import json import numpy as np import pandas as pd import os assert os.path.isfile("train-v1.1.json"),"Non-existent file" from tensorflo...
This is a console version of the famous Rock Paper Scissors game part of The Odin Project curriculum. Please review this code and provide suggestions. Please comment whether the code is DRY and if it is simplified. function computerPlay() { let choices = ['rock', 'paper', 'scissors']; return choices[Math.floo...
Before the interview for the Junior (i hope:)) position of Java developer, I was asked to do a test task. Kindly ask you to review my code. Riht now program arguments are hardcoded and not from args[], tomorrow I will add arguments processing. You can see my code on GitHub also. I would appreciate any feedback. Thanks!...
For learning purposes, I wanted to create a header-only C++ wrapper library around HTTP CURL functionality. At the moment the library only implements GET and POST, but I will add other HTTP methods later. Additionally, right now it only supports calling get() or post() with a fully constructed RequestConfig object. I p...
So I'm starting out and doing some code challenges in between book and tutorial learning and was hoping to get some general feedback on code readability and use of comments. I know it's sometimes hard to understand your own code after you wrote it so my question is - how easy is it to understand this one based on comme...
The function removes rows from a pandas df if that row doesn't have the value of important_1 inside of important_2. For example if important_1 is "blue" and important_2 is "M" then that row would be removed, but if important_2 were "redbluegreen" then the row would be kept. On my ~125mb files this code runs really slow...
fun readLines(path: String): Stream<String> = try { Files.lines(Paths.get(path)).use { it } } catch (ex: Exception) { ex.printStackTrace() Stream.empty<String>() } I added .use { it } to tack on try-with-resources like behaviour for autoclosing the file handle (?) in case of excepti...
I would like Autofac to instantiate components based on connection strings in the form of the URI: autofac://assembly-name/full-class-name?param1=arg1&param2=arg2 So the following test will work: [TestClass] public class Locator_Should { [TestMethod] public void Resolve() { var builder = new Conta...
I am a Java + Angular developer. My new job is as a Senior Python developer ... but I've never written a Python program in my life. In order to teach myself the language, I've started writing some simple projects. This is a console-based Hangman game in Python 3.7. The game picks a 'secret word' from a list, and then ...
Wondering if I can get a review of the following script. I used to be a Python dev back when 2.7 was the norm and haven't really touched Python3, so interested to see where some new features might tidy things up. And obviously any improvements / direction on general style. The script consumes an API that provides data ...
I am new to Reactive Extensions, I have the requirement to consume PairCollection<IPointCloud> which are fed into a service which performs a very expensive multi-threaded process but has limited concurrency (which I base on the number of machine cores). The process of getting the PairCollection<IPointCloud> objects is ...
This is a an implementation of Binary Indexed Tree. This passes all the test cases listed below and works as intended. I'm using Java 11. What I need reviewed: Can this be simplified with any new feature in Java versions 8-11? Any other improvements? Binary Indexed Tree A Fenwick tree or binary indexed tree is a da...
I am new to Python and am trying to optimize the following code: import sys import numpy as np def LSMPut(T, r, sigma, K, S0, TimeSteps, Paths, k): dt = T/TimeSteps t = np.arange(0, T+dt, dt).tolist() z=[np.random.standard_normal() for _ in range(Paths)] w = (r-sigma**2/2)*T + sigma*np.sqrt(T)*np.arra...
I am working on a little Python project to track how much time I am spending coding and doing things outdoors. Coding subtracts and outdoors stuff adds. My code is looking pretty bad. Any suggestions on how to make it better? import tkinter as tk import time import json import atexit from flask import Flask root = Non...
I've built a small utility in Python which is going to supposedly send an SMS (using Twilio) each time an earthquake with the magnitude > 4 is to be happening. NOTE: This simple script was mainly done for testing purposes and learning activities. DO NOT take the information for granted as there might be big delays...
I am dipping my fingers in external apis that a user would login and retrieve a code to exchange for a token. In my case, it is for the SpotifyAPI. All the web app does it return the users top tracks of x amount of time. Please note I havent done much cleaning up as im not entire sure whether my flow is secure and the...
I wrote this program for a Sudoku solver in Python. It utilizes tkinter GUI. I've uploaded the project to my GitHub. Please can you have a look and let me know of any ideas or improvements you think I should make? from tkinter import Frame,Entry,Button,messagebox class app(Frame): def __init__(self): #Initiali...
I created a script supposed to use python to autocomplete Python commands. The full code is available here, however, I can give you an example. For instance, let's consider: command, the command I want to give completion to (it does not have to actually exist). script.py, the auto completion script. import os, shlex ...
I am trying to solve this question https://leetcode.com/problems/count-of-smaller-numbers-after-self/ You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. My code: import bisect ...
The following is the entire function for implementing a doubly linked list. Can anyone show me if there is a better way to write these functions, especially the delete_at function please? #include<stdio.h> #include<stdlib.h> typedef struct linked_list { int point; struct linked_list *p_node; struct linked_l...
I have written a small program to convert numeric cardinal numbers (i.e, 4, 35) into Spanish. Currently, it only supports numbers 1-99, however I would like to increase it to support numbers of any length. Before I do this, I am seeking some feedback on my code structure. I feel that I have too many if statements and ...
I have custom code where I check request params for existing and make query to database with model public function search(Request $request) { $position = $request->get("position") ?? null; $location = $request->get("location") ?? null; $employment = $request->get("employment") ?? null; $jobsBy = null; ...
I'm working on an AWS lambda function that take data from two mongodb databases, find the matching records between two collections by 'id' and calculate each record commission by fixed rate. Then export data to a xls file and upload it to s3. connect.js const MongoClient = require('mongodb').MongoClient; const getAllD...
Objective: Manage what happens when users interact with Excel Tables (ListObjects) Possible interactions: Update an existing Excel table Add rows/columns to the table Update a cell or a range of cells Delete rows/columns to the table Add a new Excel table Delete an Excel table Add a new Excel table Specification...
Please review this program because I wrote something in Python for the first time. This code is to be used for device authorization in oauth2 device flow. import requests import webbrowser import time API_ENDPOINT = "<url>" RESPONSE_TYPE = "device_code" GRANT_TYPE = "device" CLIENT_ID = "<client_id>" data = {'respo...
The Sieve of Eratosthenes is one of the oldest known algorithms and yet it is still the best method for sieving prime numbers in bulk in many situations. It is brutally simple, but to make it brutally fast requires adding a quite few complications. A lot of information about these complications is availabe here on Cod...
Hey everyone I have a very simple go REST API that is running CRUD operations on an in-memory object. I would love some feedback on how I can refactor this code, and how/if I should break this up into more than one file (main.go). I am extremely new to Go and want to learn the best way to write something like this. Som...
I was recently tasked to write an implementation of the Berlekamp–Massey algorithm (for GF2) from a given inductional proof and decided to fresh up on my Haskell, since converting a proof by induction into a recursive algorithm should be quite straight-forward. The variable names have been taken from the given proof (a...
There is a table in Oracle database with the following data +----+-----+-------+---------+---------+---------+ | Id | Key | Value | Is_Orig | Is_Prev | Is_Curr | +----+-----+-------+---------+---------+---------+ | 1 | 10 | 1000 | 1 | 0 | 0 | | 2 | 10 | 2000 | 0 | 0 | 0 | | 3...
I've made this GUI program for my workplace that checks whether measured coordinates on machined components are within spec. It takes in specified coordinates, tolerance and measured coordinates and uses Pythagoras to check whether the tolerance has been exceeded. It then plots the measured point relative to the 'true ...
I wrote a code that retrieves categories from DB and act as dynamic category search. I kindly ask you to review my code and tell me if the code can be optimized/improved. Thank you for your help. This is the html code. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
I have the following function in Django to download the Fasta sequences (protein) through the selected categories as a file. This works well. I would like to improve the following script. import textwrap from io import StringIO from django.shortcuts import render from django.http import HttpResponse from database.model...
Sometimes we have this code blocks that is repeated in the same controller again and again, I reviewed the Repository Pattern but I didn't understand how to deal with some kind of these duplication. Here is a sample of what I got here: $orders = ( new OrderList() ) ->where( 'order_state_id', '!=', null ) ...
For school, I made a pathfinder for a weighted grid, but anything beyond a 7x7 grid takes a significant portion of time. I was wondering if I can improve my code at all, or if there is a way to reduce the time complexity. I would appreciate any pointers for improving my code whether it's readability or efficiency. impo...
def combine_in_place(first, second): combined = [] maxLength = max(len(first), len(second)) for i in range(maxLength): if len(first) < i+1: combined.append(second[i]) elif len(second) < i+1: combined.append(first[i]) else: if not first[i]: ...
I'm coding a simple hangman for the MIT Online Course Ps. Here's what I wrote so far: from string import ascii_lowercase import random def hint(word_so_far): pass def is_word_guessed(secret_word, c_letters): for char in secret_word: if char not in c_letters: return False return True d...
I am currently working on implementing some data structures as a way to learn C++. I'm coming mostly from a Java background so I was hoping to get some feedback regarding this implementation of a singly linked list in C++ using templates. This singly linked list will only support insertions at the head and tail positio...
Attached below is my code for generating the confidence maps for the joint locations, it is in the same vein as the maps generated for the paper Convolutional Pose Machines and OpenPose. I am wondering if anyone has input on how to speed up the process, as when I try to train my own variant of OpenPose or Convolutional...
I have two worksheets in my workbook. The first worksheet ("home"), the user will enter information in cells B7-B14, not all of the fields are required in order for the macro to proceed. I need each of the aforementioned fields to be copied over (in addition to B18-B28 & B31-B34) onto the second worksheet ("tracking")...
I'm going to simulate diffraction patterns of a normal incident gaussian profile beam from a 2D array of point scatterers with a distribution in heights. The 2D array of scatterer positions X, Y and Z each have size N x N and these are summed-over in each call to E_ab(a, b, positions, w_beam). This is done M x M times...
I'm new to the Developers world and I have project that I've been working on. It's to calculate the Bowling Game Score (similar to the Hdcp Score done by this tool: https://bowlinggenius.com/ ) I'm looking for a feedback to my code, from: - Readability; - the OOP SOLID principles and best-practice point of views (Encap...
Hello I have a NodeJS which act like an interface it connects the client(mobile app) to the actual server My node JS API receives data from the client to verify it and send it to the server. I want to know does this code looks good? Is that how API should be written in NodeJS? Does this code violate any of the SOLID ...
I've been learning a ton of c++ lately on Codecademy and I'm soon done with the course of c++. (Still need to learn classes, object-oriented programming and harder projects.) But I wanted to get a review of my recent program. And I also wanted to know if its possible to make an Unique ID, that only fits me, kinda like ...
I'm just starting my adventure with python and I wanted to share my first project with you and ask for feedback and advice. This is a script for my friend to automate all calculations and database operations. What my code does: Merge together the csv files in the specified folder forming two sets. Calculate the differ...
I have made this BST using templates Node.h #ifndef NODE_H_INCLUDED #define NODE_H_INCLUDED template<typename T> class Node { public: Node<T> *pLeft; Node<T> *pRight; T val; Node<T>(T val) { this->val = val; pLeft = pRight = nullptr; } // Node<T>(const Node<T>& src); -> to...
I'm trying to solve a problem from Project Euler: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? and here is my attempt: def getPrimeNumbers(testNumber): ''' For a given number it returns a list of all prime numbers from 2 to given number. ...
I am going to have multiple APIs in routes folder should I put them in in the same file API or separate them? ├── app.js ├── src/ │ ├── contants/ │ ├── helpers/ │ ├── models/ │ ├── routes/ | | |___index.js |___api.js │ └── libs/ │ ├── backbone/ │ ├── underscore/ │ └──...
I've wrote a calculator in Java with a GUI using swing. Here are the classes: Control.java: public class Control { public static void main(String[] args) { Calculator calculator = new Calculator(); Gui gui = new Gui(calculator); gui.setVisible(true); boolean exit = false; whi...
I have a VSTO Excel Add-In which is used to retrieve data from another application and insert it into an Excel worksheet. Due to the potential for lots of pieces of data to be inserted into a spreadsheet, performance is a concern. Potentially thousands of rows could be inserted. Here is the method which inserts data i...
I am an absolute newcomer in R. For my bachelor thesis I worked with spatial data. I did many plots with the normal "points"-function. I already have my results, but would like to improve my code. This is the first example: (leg and colours were defined previously. WLPoi is a SpatialPointsDataFrame, german_reich_polyl...
I have created a visualisation of sorting algorithms using tkinter and matplotlib. Please let me know what you think and if you have any suggestions or find errors. The aim of this code is to create a GUI in which the user can enter a length for a random array of number, then select a sorting algorithm from a button, ...
Please see the file here, reproduced below in separate sections. My question is basically Which way is better? Which is easier to understand? Which is easier to modify? What should be the priority? Modification or Understanding? NEW WAY, using variables & loops, trying to deduplicate as much as possible. Ideally ...
I have a userform with around 20 controls in that can be inputted. Some are textboxes some are comboboxes etc. The user fills in these controls and then hits save. When save is pressed, the code finds the relevant row number (based on the task number generated in userform e.g. 1.04 will find 1.03 and add row below.) H...
In some (perhaps not well-designed) competitive programming problems, the runtime and score is dependent on how fast your program can process input. Therefore I've written a small C99 library with optimized functions for reading from stdin and writing to stdout: fastio.h: #ifndef FASTIO_H #define FASTIO_H #include <st...
I have a library with a lot of duplicate code to accommodate different collection types, and its starting to get a bit tedious, is there a better way to do this to reduce the amount of duplication going on ? Its only going to get worse the more functions i add... This is my current library script: using System.Collecti...
I have written a program in Java 8 using BlueJ. There is just one function of type byte that accepts two String values and return 1 if the first word comes before the second in alphabetical order, and return -1 if the first word comes after the second in alphabetical order, and 0 if both are equivalent strings. I woul...
I've recently been trying to learn more rust and I have just finished chapter 3 of the Rust book, which has a list of projects to do to practice. I have tried to write a program that prints the 12 Days of Christmas and I would like to know if it is idiomatic or if any major improvementsc could be made. Thanks in advanc...
This is part of this topic. Problem: I need to read a file with BigIntegers and make some analysis "on-the-fly" with each read number (get prime numbers count, get armstrong numbers count). Right now I have this code, but it works very slow: package ee.raintree.test.numbers; import java.io.File; import java.io.FileInp...
let's say I want to create a 'utils' package with several functions working on files and folders. I want to do it once properly so I can use them in all my personal projects without feeling to re invent the wheel each time. I also want to learn 2 items by the way: exception handling, already read a lot about EAFP vs L...
It's been about a day since I've started writing some Rust, and I'm looking for some code review on a simple spell checker I've written up use generator::{Gn, Generator, Scope, done}; use std::collections::{HashMap, HashSet}; use std::ops::Add; use std::io::{BufRead, BufReader}; use std::fs::File; #[derive(Debug)] s...
I have a Web API application in .NET Core 3.1. In a controller I have a GET action that must return a JSON object with a name and a description. In order to retrieve the correct description I need to call an external API (not implemented by myself and outside of my control). This is the code in the controller: public a...