Categories

## Can’t delete folder with desktop.ini folder inside it

I have a D:/folder folder and I can’t delete it. The folder is apparently empty. However, when I try to delete it from Windows 10, nothing happens, no error, but folder doesn’t disappear. From the command line, I use the dir /a command and I can see that there is a desktop.ini folder (not file) […]

Categories

## Get missing weeks by country

I’ve got one table called "Units_Sold" which has these fields: year, month, week, country, units and another table called "Dates" which has these other fields: year, week, month The dates table has 1 entry per week/month/year The Units Sold Table has more than 1 record per week, month, year as it is multiple units sales […]

Categories

## On a characterization of twin primes in terms of the sum of divisors function and the Euler’s totient function, and related conjectures

In this post we use the definition of a twin prime as the primes $p$ such that $p+2$ is also prime. Thus this definition is the same one than the set of twin primes in the sequence A00135 Lesser of twin primes from the On-Line Encyclopedia of Integer Sequences. Thus as definition of twin prime […]

Categories

## What are all the binary matrices leading to a given Gramian matrix of non-negative integers as elements?

A real matrix $\mathbf{G}$ such that for some real matrix $\mathbf{B}$, $\mathbf{G} = \mathbf{B}\mathbf{B}^T$, is called a Gramian matrix. We are interested in a special type of $m \times m$ Gramian matrices $\mathbf{G}$, coming from what we will call a $m \times n$ “basis matrix” $\mathbf{B}$. This special Gramian matrix $\mathbf{G}$ has the following properties: […]

Categories

## What are all the binary matrices leading to a given Gramian matrix of non-negative integers as elements?

A real matrix $\mathbf{G}$ such that for some real matrix $\mathbf{B}$, $\mathbf{G} = \mathbf{B}\mathbf{B}^T$, is called a Gramian matrix. We are interested in a special type of $m \times m$ Gramian matrices $\mathbf{G}$, coming from what we will call a $m \times n$ “basis matrix” $\mathbf{B}$. This special Gramian matrix has the following properties: All […]

Categories

## What are all the binary matrices leading to a given Gramian matrix of non-negative integers as elements?

A real matrix $\mathbf{G}$ such that for some real matrix $\mathbf{B}$, $\mathbf{G} = \mathbf{B}\mathbf{B}^T$, is called a Gramian matrix. We are interested in a special type of $m \times m$ Gramian matrices $\mathbf{G}$, coming from what we will call a $m \times n$ “basis matrix” $\mathbf{B}$. This special Gramian matrix has the following properties: All […]

Categories

## Last day of year: code valid for any timezone

I need to get the last day of a year in ISO format, this is, the string 2020-31-12. This is not as easy as one could imagine, as, the result depends in which time zone is executed. This is the code I have. One thing must be sayed though. The commands new Date() and date.toISOString(date) […]

Categories

## Relying on default field initialisation – is bad programming style?

I was given a link to the official oracle documentation: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html where it is said: Default Values It’s not always necessary to assign a value when a field is declared. Fields that are declared but not initialized will be set to a reasonable default by the compiler. Generally speaking, this default will be zero or […]