As you all know a disadvantage of SQL is the lack of the universal quantifier construct; so when you need to write a complex SQL query there are two ways to proceed:
There are tons of articles about the topic but I’ve not been able to find a mathematical explanation of why the avalanche method is the best, if you find it please let me know.
Anyway here’s what I have learned:
A small function for accessing a cell in a quad-tree matrix.
The quad-tree is a tree data structure with (guess what) 4 children. They are used for various applications (Wikipedia-page), like for example storing an image. The picture is decomposed in a series of squares of size 2ⁿx2ⁿ which are…
This article will show the steps to obtain the formula for the mortgage/loan with fixed rate.
Here a fancy image to scare people off.
This is a basic tutorial on how to create a docker container for each project, with the purpose of keep the libraries installed on your PC under control.
The goal is to set a container with all the needed libraries, for every project; and sharing the source folder with the…
For setting a DNS server on a device with BalenaOS there are 2 things to consider: the google DNS are the default one and that the OS uses NetworkManager and DNSmasq. (OS overview).
The 2 steps to make are: disable google DNS and configure the NetworkManager that has to feed…
We all know how the process to convert a integer number in binary, but in a functional language it’s possible to do it without iteration.
I wrote the code in Haskell. It will take a while to understand why it works.
This is the conversion with the least significant bit…
Given a graph G=(V,E), the Wiener index has two equivalent definitions:
Where d(i,j) is the shortest path between the two nodes.
Note: The summation series are used in the calculation.
For this graph is easier to use the second formula that require an ordering of the nodes…
I often encounter reasonings that use the sum of inequalities and this property is intuitive but I was wondering what’s the proof of this operation.
This is what I call sum of inequalities:
This is the other version, where it’s enough to have a single strict inequality to obtain a…