instruction
stringlengths
71
95.1k
Ever wanted a strictly conformant echo(1) implementation on your system? Wait no more: I've built it! What is it? My first large-ish body of C code in a while. The code provides implementations of all of the following echo(1) descriptions from the Open Group POSIX specification. In summary: The echo utility writes its...
This function is used to modify values in list List<GoogleUsageMapping> and prepare them for entering into billing system. I'm hoping this function can be more simplified and prettified, logic works. Function needs to keep track of maxValue and if the maxValue is of type LOGICAL_SIZE. Would love to eliminate one of the...
The purpose of below code is to stop/start a couple of windows services if they are running/not running, this will be called from a windows command line. The services could be either on a windows stand alone server or could be a bundled into a Windows Failover cluster Role on a clustered server. I believe I handled al...
I created a simple calculator with multiplication, division, addition, and subtraction. Is there a way to write it shorter? I am a beginner so I do not know much about programming other than if...else statements and different data types. Console.WriteLine("Welcome to the simple calculator! The four operators of...
I wanted a data structure that allowed me to set the chances of randomly returning each of it's elements. For example, suppose I have a Human class. Every Human has an attribute called eyeColor. I don't know what the actual percentages are, but let's say 60% of people have brown eyes, 30% have blue eyes, and 10% have ...
This question is the second version of the code here. I'm writing a general tree class. Specifically, each node should have oen parent, some number of children, and hold a value. I'm looking for general advice on how to make this code more idiomatic. I'm also looking for thoughts on the traverse function, any functions...
I have rewritten my tokenizer according to most of the suggestions from the previous question here. API It now reads all chars as long as they match the pattern. I use three types of attributes to achieve this. Regex - reads by regular expressions; this one requires a single group that is the value of the token; it ...
The following code implements the Hungarian algorithm. The algorithm is used to find minimum cost perfect matching on a bipartite graph. Looking for comments on correctness, efficiency, clarity and idiomatic C++ usages. It passes all tests on LeetCode. class Solution { public: int assignBikes(vector<vector<int>>& w...
I was going to post this in code golf, but I think it may be better suited here. I'm not really interested in scoring it beyond accepting the best answer. I'm wanting to minimize this series of IFS, if possible or necessary. I'm brand new to javascript/coding, but it just seems like there may be some redundancy here....
This is the simple back-end, albeit crude, that I made for a React Native mobile app project as a proof of concept. It's a basic CRUD for tracking supply inventory. The "shopping list" is items with a Buy qty > 0. selectData() is a wrapper for a SELECT query using prepared statements: Signature: selectData($columns, $...
Problem Statement: Given an unsorted array of positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles. Input: The first line of the input contains T denoting the number of testcases. First line of test case is the length of arr...
This is the first project I have coded using Python. Therefore, I am looking for someone to give me some comments to further improve my code. Purpose of the application This application help the staff in my organization to import the spreadsheet and store it into the database. Flow User would need to provide the docum...
The original idea behind the problem is that the API I'm working with returns one type of a response for GET, and requires another type to do POST / PUT. The object I'm receiving from the GET has a format like this: const rawObject = { data1: { id: 1, value: 444 }, data2: null } In order to be able to ...
The actual code layout of a text adventure. This text adventure is a much-improved sequel to the first code. It is three times as long but three times more efficient. The setting is based on the setting of Telltale's TWD: A New Frontier. The storylines can be found here. I suggest running the code with the storylines b...
I'm new with Kotlin, and this is my first attempt of a two dimensional array. // private var roomGrid = arrayOfNulls<arrayOfNulls<Room>>(4) private var roomGrid = Array(roomCountX) {arrayOfNulls<Room>(roomCountY)} init { for (gridY in 0 until roomCountY) { for (gridX in 0 until roomCountX) { ...
I'm relatively new to Python. Here is a Tic Tac Toe game I've created in Python: def is_valid_move(x,y,board): return ((0 <= x <= 2) and (0 <= y <= 2)) and (board[x][y] == '_') def check_win(board): if board[0][0] == board[0][1] == board[0][2] != '_': return True if board[1][0] == board[1][1] == bo...
I have the following code which I am running through fortify. Why it gets marked for poor error handling, throw inside finally? private String getResourceContent(String fileName) throws IOException { try (InputStream resource = ErrorResource.classLoader.getResourceAsStream(fileName)) { return new String(r...
I've created a battle screen transition effect similar to Final Fantasy games, you can see it in action here: https://gilles-leblanc.github.io/ff8-transition/ I'm interested in code quality, performance, optimizations and general JavaScript usage. One thing in particular is I declared the color function inside the colo...
Recently, a company has asked me to make an implementation of a doubly linked list with unity tests to test my skills. In the task description they specified that the solution should be as academic as possible. After seeing the test, they said it was not passed, so, since they have not specified what could be improved ...
I wrote this console rock-paper-scissors game. I'm new to C++. I'd appreciate any suggestions to improve the code below. Thanks. RPSCore.h #ifndef RPS_CORE_H #define RPS_CORE_H class RPSCore { public: static int rpsWinner(char& playerChoice, char& computerChoice); static char getComputerChoice(); }; #endif /...
I am trying to make a very simple error handler that would catch and handle all kinds of errors in both development and production environments. The idea is to keep it as simple as possible yet useful in the production environment. In order to do so I am converting all errors into exceptions. Then I will need just a si...
I feel quite slow in the understanding of graph representations. So, please, I'd like you to verify that I did understand, at least, the Adjacency List correctly. So here I'm trying to implement unweighted graph, that supports parallel edges. Whether graph is directed or not, I don't understand how that might affect an...
I am creating a web application using Angular 8. This application is all about talking to the stock markets server and getting the Live updates every second. I have one query here. Below is my code: setInterval(()=> { this.GETDATA_NSE_EQ_LIVE();}, 1000); GETDATA_NSE_EQ_LIVE():void{ this._NSELiveFeedComponent.ge...
I am implementing a Queue class in C# using a Node/LinkedList class that I also implemented, and I wonder if there is a way to implement the enqueue and the dequeue methods, both in algorithmic efficiency of \$O(1)\$. In the Queue class I have a field of the tail and the head, and I managed to implement the enqueue met...
VB.NET has a Like operator with a paradigm similar to the standard SQL LIKE expression (SQL Server, SQLite, MySQL), but with a different syntax: Dim result As Boolean = "abcd" Like "a*" It supports: multiple-character matches -- "abcd" Like "a*" single-character matches -- "abcd" Like "a??d" digit matches -- "ab12cd"...
I have a specs file: Name: program Version: 2.3.3 Release: 0 ... I want to update the version number every time it's built. I perform the build from a bash script so I'm calling sed to update the SPECS file and a "version" file which holds the version number. I am using the following sed script...
I am coming from PHP OOP background so just want to find out if what I do with Go is common/acceptable practise or not (I am newbie in Go). It is to do with Dependency Injection. In OOP it is ideal to Dependency Inject object X into object Y rather than directly instantiating object X in object Y. I won't list the reas...
I'm following a tutorial on merging two bubble-sorted Single Linked Lists in Python. merge1 creates a new list and does the merging. Other than naming conventions which are not the best and I'm just following the tutorial, any feedback would be appreciated. OOP, practical time-complexity, algorithms, and others. ...
I'm following a tutorial on merging two bubble-sorted Single Linked Lists in Python. merge1 does the merging by creating a new list with maybe \$O(N+M)\$ memory complexity that I'm guessing, and has been also reviewed here. merge2 does an in-place merging with \$O(1)\$ constant space complexity that I'm guessing. ...
One function of a program I'm working with benefits from using all available openMP threads. The rest of the program has issues with the env variable OMP_NUM_THREADS being unequal to 1. I'm currently using the following solution to that, and was wondering whether there were any caveats or room for improvement here. I h...
I'm new to Python and want to develop good habits at the beginning. This class takes a string, and then counts the number of vowels and consonants in the word(s). Any advice on how to improve? class CntVowels: def __init__(self,string): self.string = string self.vowels = [ "a", "e", "i", "o", "u"...
I've been trying to make a work-around for global usage; however, I can't seem to find an alternative. I'd like to create a C++ suffix function which converts pixels to millimeters. A custom gui library I've been developing separates OS calls and the actual widget system in two separate headers (IoC); therefore, I do n...
I need to select "random" elements from a collection. Random is quoted because I must assign a weight to each element; elements with higher weights have a greater chance of being selected. To achieve this, I wrote the classes described below. I'd like to have my code reviewed in order to feel more secure that it is wor...
Until today, in the few cases where I needed something like this, it had been in simple programs which only I used, and where I didn't care about security, so I used the simple atoi(). However, today I needed to do that for a some more serious program, and I researched about the many different forms that are out there ...
Is there a better way to do this? Assuming very long lists, is this slow and wasteful? flavors = ['chocolate', 'vanilla', 'caramel', 'strawberry', 'coffee'] for flavor in flavors: print(flavor, end = ', ' if (flavors.index(flavor) != len(flavors) -1) else '.') Output: chocolate, vanilla, caramel, strawberry, coff...
For a long time I've been using Angular "Layout" components so their role is basically to define layout, like padding, margin, fonts and so on. For instance, page header component: <my-header>My super page</my-header> So now this component will have SCSS: :host { width: 100%; display: block; padding:10px }...
I'm writing a ctrl+f function so to speak in React that allows a user to search for a term in a list of words, and if the term matches any of the words in the list then it highlights it. To do this, I'm currently using document.querySelectorAll to retrieve all of the words in the list and manipulate them (highlight) if...
I've been searching the internet and cannot find a proper answer as when one should user "Parent" and "Child". I see these two used all over, I have not used them myself in my programs, and now I'm wondering if I have missed something in creating my software. I am wondering why and when should they be used. I've only g...
I solved this problem from a challenge.The problem is as below:- Problem Statement: Given N activities with their start and finish times. Select the maximum number of activities that can be performed by a single person, assuming that a person can only work on a single activity at a time. Note : The start time and end t...
I have written the code for credit card number validation and it works correctly but I feel that the code could be reduce to fewer lines. #include <stdio.h> int main() { long long int no; do { printf("Card number: "); scanf("%lld", &no); } while(no<10); int d_1,d_2,d_3,d_4...
To better learn templates, I have dabbled with a simple linked list implementing the class with a private member compare function (cmp) that is used when adding nodes in sort-order, or when sorting an unsorted list. Here I have simply bitten the bullet and put the entire class implementation in the header file, rather ...
I need a fully asynchronous single-threaded server written using .Net Core. Searched for options and, surprisingly, did't find any. So I decided to write a simple prototype. Borrowed idea from python's selectors module. Idea is simple. We have SocketSelector class to whom we register sockets for desired events (Read, W...
Not please with this outcome, function works as is, but would love to simplify and prettify it. Use of one for-loop would be great and limit the use of the conditional operator. private void checkForOverage(List<GoogleUsageMapping> records) { Long sumOfAllocatedSize = 0L; Long sumOfLogicalSize = 0L; for (Go...
Prerequisites The unsigned long type has a size of 64 bits. The following macros are defined. /* all 3^n for n < 41 fits into 64-bit unsigned long */ #define LUT_SIZE 41 /* any reasonably high number */ #define LUT_SIZEMPZ 512 The following array is defined and properly initialized with corresponding values. /* lut[n]...
Objective I have following array and would like to group by each child and get its smallest Id:- var list = new[] { new { Id = 1, Childs = new [] { 'a', 'b' } }, new { Id = 2, Childs = new [] { 'a' } }, new { Id = 3, Childs = new [] { 'a', 'c' } }, new { Id = 4, Childs = new [] { 'b' } }, new { Id =...
Recently, I started reading image processing via opencv library in python. I create a minio object storage and upload some photos into it. After that, I wrote a program which reads every image in each bucket in minio and watermark it with a simple logo. I read each image with imread and finally (after inserting a water...
We have a macro that updates all dates/years in all our pivottables (around 100 of them pulling out data from our OLAP cube) based off of a "Master Date" at the top of our sheet (which is being updated monthly). The problem is, that the way we're doing it, takes up a lot of space, and we've been forced to split the ma...
The problem I'm solving is: given a length of an arithmetic progression, and a limit to the terms (see below), find all progressions that work. All terms of the progressions must be of the form a²+b², and 0 ≤ a²+b² ≤ limit. I have the following code: from math import ceil with open('ariprog.in') as fin: ariLen = ...
Converting words to morse code and vice versa using dictionaries and that's it. morse_code = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': ...
Building on previous reviews Whilst not an iterative review I have tried to follow the advice provided to some of my older questions: KISS, in some of my previous questions I've over complicated the design. Even though I'm doing quite a lot I've tried to keep everything as simple as possible. I think I achieved this i...
I've been working on writing data structures and methods from scratch (with minimal reference) and I'm looking for assistance on my coding style/if there's any way to optimize the methods I've included. Below is my singular linked list code, all of its methods, and the output of my tests from main. This is also my firs...
I'm trying to a write super simple task runner with asyncio. Basically, my goal is to run 100 requests to google as tasks, whilst also being be able to handle tasks being added at a later time. from abc import ABC, abstractmethod import asyncio import socket import time import aiohttp import requests class MySchedul...
I am using Angular 8.x. I have a table with two columns that can be sorted. You can only sort one column at a time. I have conditions that display an up and down sort icon if neither column is being sorted, or a up or down sort icon depending on the sort direction. Is there a better way to write this condition? html ...
I have implemented Python-style generators within Java. I might be reinventing the wheel here, but I feel that the ability to define a Generator with an anonymous class is the most flexible approach. Here's the relevant code: generator/Generator.java public abstract class Generator<T> implements Iterable<T>, Iterator...
The definition of ABtest Goal: For input data, each pair row is a group such as 0 and 1, 2 and 3. I want to test whether each group is significant using chi-square. If result is significant and any value in group is more than or equals 5 , it returns p-value, else it returns 'not significant'. If any value in group i...
The app grabs 10 questions from an API, displays them one by one with 4 multiple choice answers. These answers are clickable buttons that alert to whether the answer is correct or not. Finally the last screen shows the amount write and wrong (via wrongCount) and the percentage score as well as a retry that wipes it as ...
I want to add/remove a class on the html and body tags in the dom when my nav menu is opened or closed. Is this the most optimal way of writing this logic? $( '#navbarNav' ).on( 'show.bs.collapse', function() { $( 'html, body' ).addClass( 'noscroll' ); }); $( '#navbarNav' ).on( 'hide.bs.collapse', function() { ...
Project description We have different types of devices like sov, motor, analog, digital, control valves etc. Each type of device has 100 items. Now our software continuously monitors with the PLC to read some property of each type according to which we need to write some property. As an example, if motor on command is ...
I've created a extension method to count every available descendant starting from a single, given key. The data is a flat list, there's is no hierarchical structure. (Well, not entirely true. There is an hierarchy in the data-model, but not in the list itself) self-reference parent-reference some other members ...
Input A long string of numbers, A list of numbers in string Output Minimum space needed in long string to match maximum numbers from list Example minSpaces('3141592653589793238462643383279',['314','49','15926535897','14','9323','8462643383279','4','793']) will return 3 I am using below code to solve it, but I am not...
I'm trying to reshape my input arrays in a way that's described below to be able to fit a curve on the data points, plot it, etc. It works fine, but I'm afraid it's not the most efficient way of doing it, and also it's hard to understand and read. It's part of a bigger function, but I only post here the critical part ...
Method Frequently input for problems is given as a 1D or 2D array in a text file. Have knocked out a method to do so, but believe something shorter, clearer and cheaper can be written: def read_array_from_txt(path, dim, typ, sep): ''' @time: O(n) @space: O(n) ''' txt_file_object = open(path,"r") ...
I have a list of variables which I need to convert to LIKE statements in SQL. The final query should look like the following: ... WHERE ([TraceableItem].[IdentificationNo] LIKE N'%015558' OR [TraceableItem].[IdentificationNo] LIKE N'%123456' OR [TraceableItem].[IdentificationNo] LIKE N'%654321') ... Be...
I would appreciate som feedback on my fictional product landing page. I am doing the freeCodeCamp curriculum and Product Landing Page is one of the Responsive Web Design Projects using only HTML/CSS. I am especially interested in feedback regarding best practice, naming conventions and efficient code. The code is also...
I have some XML that I want to flatten based on its XPath. The task is to acquire certain nodes that are passed as input. That said, I have to get to parent nodes and look for nodes that might be part of the configuration. I am avoiding lists in a given iteration. This is my code: from lxml import etree tree = etree.p...
I have to develop a small security management application that relies on a Web API. Based on that API, I have generated the REST client classes (Open API generator), but I still have to code on top to provide things like retrials and token management (avoid getting a token for each call). Code ///<inheritdoc/> public c...
I'm trying to solve this problem from codewars. Problem Given a certain number, how many multiples of three could you obtain with its digits? Suppose that you have the number 362. The numbers that can be generated from it are: 3, 6, 2, 36, 63, 62, 26, 32, 23, 236, 263, 326, 362, 623, 632 and among those 3, 6, 36, 63 a...
The following code is a solution to an exercise I've made: This exercise idea is based on a story from my current work place: My boss'es Ubuntu had a bug that made his printer, when asked to print N copies of something, instead print N² copies. So for our Thursday status meeting, he'd hope that the number of people wh...
I implemented a Python script that generates git commits for the last year making one's Contribution Graph look full of changes. It was my first Python program (I work mostly with Java). Although the program is quite useless I want to use it as a learning playground to build my Python competences. That is why I would a...
Objective: The objective of the program is to create a JIRA ticket using a REST API. It's working perfectly fine without any issue. However I am not sure if it's up to good Scala standards. I would be delighted if someone could let me know what I can do to improve it. import org.apache.http.HttpResponse import org.a...
I wrote a small rust library available on github that can encrypt/decrypt a 16 bytes block using either 128, 192 or 256 bit passwords. This implementation is tested with the test data provided in the standard description. Since I'm pretty new to rust and this was mainly an exercise to learn to use this language I would...
I am attempting to translate some of my Perl code to Ruby, from http://rosettacode.org/wiki/Welch%27s_t-test I am a very very beginner with Ruby, but I have verified that this is producing the correct answers. Is this "idiomatic" Ruby code? how is this with regard to best practices? def calculate_Pvalue (array1, array...
I'm doing a larger PyQt5 project which includes loading in large amount of data into a QTableWidget. However filling the table up with the loaded data is extremely slow due to nested for loops. I put there a minimal working example. The loaded .txt files usually look like this: ... 3.137856026645493124e+00,-1.018072816...
Here is my solution for CodeWars - Highest Scoring Game Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc. You need to return the highest scoring word as a string. If two words score the same, retur...
I'm writing a chart.js port for c# blazor (you can find it here) using C# 8.0 with .NET Core 3 (latest preview). In chart.js there is this thing called indexable options. It let's you use either a single value or an array and handles it accordingly. Because I want the port to be as type-safe as possible, I implemented ...
I have been working on this code, which is the part of an economy system that handles the work command. This lets the user pick a role and if they have enough level then they will get it by updating a db. I know it's inefficient and I am unsure how to reduce the if count and keeping a cyclomatic complexity below 15. I ...
I'm following a tutorial on Single Linked List (SLL). There are so many methods in the code, if you had time please feel free to review any part of it and I can work on it and repost it. I'm especially interested in object-oriented, algorithms, design, logic, exception handling, and other programming side of it. Othe...
I was presented with a task to come up with a script that generates a CSV with POSTAL codes via bruteforce (I'm in Brazil, so that means CEP to us). Points to note: I'm using an external library, but basically consuming a SOAP service provided by the Postal agency; I have a list of cities I have to get the results for...
I am generating SQL statements (of MySQL format) and writing into a file to create 10,000 tables. Each table contains 5 columns with 1.5 million rows of data in each column. I generated these data by using regex and faker module. So, I have a loop of 10,000 (one for each create table statement) and within this loop, I ...
What i am trying to do I have an image of a polygon exemple: what i am tring to do is getting all border points, that do not have at least one neighbour with the same color, and ordering them in a way that later i can draw lines The Code private Vector2F[] ReorderBorder(Vector2F[] Data) { List<Vector2F> Borde...
This is the piece of code I'd like to refactor. Basically, when the credit card option is selected, then do I want the credit card number, zip code, and Cvv inputs to be validated. validateForm=(e)=> { Array.from(inputElements).forEach(element=> { let value=element.value; let input=element; if (input===n...
In my project I have a header file which contains only functions which are put into a namespace, the purpose of these functions is to be used from another class of the framework I'm working on, or from client code. Does this code follow best practices? How can I efficiently just keep such data? #pragma once #include ...
I was wondering about the possibility to create an implementation of IList<T> that is faster than List<T> using C#, or at least faster at adding elements. I thought to try to write out one using a technique similar to the binary tree that just came up to my mind. Basically, each item is a pointer to a block of memory (...
I'm wondering what I could do to improve the function that handles initializing the UI. I think it looks disgusting. Any ideas on what I could do besides splitting the code up into multiple functions to make it look better? def init_ui(window, root_dir): window.title('ACFA Save Editor') tk.Label(window, text='P...
I am writing a function to decode a string, which means performing a string transformation like 3e4f2e --> eeeffffee. I have two versions of codes which are very similar but slightly different. In version1, def decoding(s): res = [] curr = 0 curr_val = 0 while curr < len(s): if not s[curr].isdig...
I am fairly new to C++ and have been trying to make a doubly-linked-list class that imitates std::list (though not all of it). I'd appreciate if someone can look at my code and let me know if I have missed anything important, and if everything seems to be implemented correctly. Note:the end node is implemented as one p...
This code yet is not really optimize and I know that . But for now this is all I have. What this code does is that it computes the expiration date of an account. By the way I need to do the swapping workaround because the date that the server gives to me are inverted so I need to do a lil workaround about that. /...
I have a requirement which I posted in SO. However, I have already written code and works fine. I request your review to know whether it is fool proof/elegant and efficient. Please find the details here in SO post Question in SO my code df['time_1']= pd.to_datetime(df['time_1']) s=pd.to_timedelta(24,unit='h')-(df.time...
I've just written some code in an online compiler, and since I'm very new to C#, I wanted to ask what could be improved about the code. The task of the program is simply to add up the numbers the user entered before and then calculate the average. public static void Main() { int input; int sum = 0; bool er...
I have written a Python programme that takes data from Excel sheets and adds this data to new .DAT files. I use win32com.client because the Excel sheets will already be opened and other modules need to open a file before they can process it. As the win32com.client outputs the range as a Component Object Model, it chang...
I'm making a small program to benchmark Rust's performance compared to some other languages. The idea I came up with, was to take a file (with the numbers 1 to 10000000 written to it in separate lines) as a command line argument: 1 2 3 ... 9999999 10000000 read the file, and then multiple every line in that file by tw...
This isn't meant to be a fully-featured anything, isn't meant to involve any sort of api interactions. It's just meant to be a proof-of-concept of how I could implement nested reddit-style comments. Every comment is either a top level comment or a reply to another comment. Each level of nesting is indented and is color...
I am calling a rest API as follows. I wonder if there are ways to improve/optimize the code. Should I add time-out or cancellation token? Any help would be appreciated. public static async Task<HttpResponseMessage> CallTestRazer(GameRequest gameRequest, string url) { //FormUrlEncodedContent content = null; Htt...
So I have a system that uses multiple threads to process data. These data could be processed individually but it would be better to process them in batches. Lets assume we have a class Data, a class OtherData and a class Processor which implements Function<List<Data>, List<OtherData>>. To process objects of type Data f...
I have situation where user has got options to select, and after selected any option will appear next options. For example : 1 - Add car 2 - Add motorcycle. 3 - Print cars 4 - Print motorcycles And after selected for example "1" console will show options like : 1 - Add passenger car, 2 - Add light commercial car. At ...
Below is my solution to LC #494: Target Sum (given a list of numbers and a target integer, find out how many different ways the numbers can be subtracted from the total sum to result in the target sum). There's one very common pattern in Python here that I question, and it's the use of for num in nums[1:]:. Iterating o...
Below is the database design that I created for a basic image sharing social website. When a user signup his username, email, password save in users When the user setup his profile his information will be saved in profile against username When the user create a post it will be saved in posts against username When a co...
I am trying to split and assign the url's to the variable, I am getting the desired result but I know there is a way where I can improvise the current code. JSON FILE { "Result": [ "Url::Link::Url1", "Url::Link::Url2", "Url::Link::Url3", "Url::Link::Url4", "Url::Link::Url5", "Url::Link::Url6", "Url::Link::Url7" ], "...
Lets say I have the following interfaces interface IRealm { Tile GetTile(int x, int y); bool SetTile(int x, int y, Tile tile); } interface IRealmSize { int TilesWide { get; } int TilesHigh { get; } } The intefaces are separate as I have both infinite realms with no size and bounded realms with a fixed...
I wrote a little bash script that displays the transaction info in json: #!/usr/bin/env bash set -e set -o errexit function process_block() { date --rfc-3339=ns bhash=${1:-$(bitcoin-cli getbestblockhash)} block=$(bitcoin-cli getblock $bhash) pbhash=$(echo "$block" | jq -r .previousblockhash) height=$(echo "$...