Textbooks on economic analysis define a formula to calculate the equivalent future value F of a series of uniform payments A for n periods at interest rate i. It is assumed that the payments occur at the end of each period. Rent, insurance payments or deposits into a savings account occur are beginning-of-period cash flows. What formula should we use in these cases to calculate the equivalent future value? Continue reading
Día a día vemos noticias: En nuestro correo electrónico, en sitios web (blogs, noticiarios) y en plataformas (WhatsApp, Twitter, Facebook). Es muy común que nos envíen solamente una copia del texto o del video de la noticia, sin la referencia a la fuente.
¿Cómo saber quién publicó la noticia, cuándo y dónde? Continue reading
El artículo 167 de la Ley del Seguro Social anterior, publicada en 1973 y abrogada en 1995, indica cómo se calcula el monto de la pensión de vejez o invalidez, en base a un par de porcentajes incluídos en una tabla. ¿Qué pasa si mostramos gráficamente la información de la tabla? Continue reading
GnuCash in Debian unstable fails, how can I get a working GnuCash in Debian testing?
I just found that gnucash is not available in Debian testing! How do I install it then? Continue reading
Creating strings of the form “a, b, c and d” from a list [‘a’, ‘b’, ‘c’, ‘d’] is a task I faced some time ago, as I needed to include such strings in some HTML documents. The “,” and the “and” are included according to the amount of elements. [‘a’, ‘b’] yields “a and b“, [‘a’] yields “a” for example. In a recent review to the code, I changed the method from using string concatenation:
if len(items) > 1:
text = items
for item in items[1:-1]:
text += ', ' + item
text += ' and ' + items[-1]
text = items
to the use of slicing of the items list, addition of the resulting sublists and str.join to include the punctuation:
first = items[:1]
middle = items[1:-1]
last = items[1:][-1:]
first_middle = [', '.join(first + middle)]
text = ' and '.join(first_middle + last)
The old method requires an additonal elif branch to work when items is an empty list; the new method returns an empty string if the items list is empty. I share this tip in case it is useful to someone else.
In order to understand the silent key failure, I went through different steps to get more information. Continue reading
How is keyboard scanning implemented in the CLP810s piano? Continue reading
We purchased a new Clavinova CLP810s digital piano for our home back in December 1999. The piano sound is great and the instrument performed fine initially, unfortunately, a few months after the piano arrived, Continue reading
Using GParted to move up the start of an extended partition and of the enclosed logical partition, resulted in the error: Unable to satisfy all constraints on the partition.
The solution was to disable the alignment requirement for the extended partition. Using an alignment for the logical partition enclosed in the extended partition was fine.
I post this here to remind me of the solution and in case someone else has the same problem. These are the best answers that I found leading to the solution:
Unable to satisfy all constraints on the partition (ubuntuforums.org)
Problem: “Unable to satisfy all constraints on the partition.” (GParted forum)