April 2019

5 - Insertar datos y probar base de datos

How to install MySQL (MariaDB) on Android with Termux

Install MySQL on Android

Android mobile devices are not designed to be servers (although some of them are powerful), however it is always interesting to see how technology advances and day by day we can do more things with our phones.

Today we will see how to install the MySQL or MariaDB server on Android, thanks to the Termux application. For that it is enough to execute a few simple commands and voila, we will have a MySQL database server in our Android; fully functional and ready to execute queries.

If we want to put it for production, we can do it as long as we configure security. In short, we will not see more advanced topics; we will only see how to install mysql on Android.

Here we will use MariaDB and MySQL as synonyms; that is, if you see that I say MariaDB do not get confused, I mean MySQL; and vice versa.

I know that there are really more differences especially with the licenses, but that is another topic and you can search it in Google if you wish.

Continue reading…

Cambiar nombre de sesión de Termux

Configure Termux on Android (Linux in our pocket)

Install Termux on Android

Today we will see how to install and configure Termux on Android, as well as a brief introduction to its use.

Termux is an application that will allow us to have a terminal on our device, but apart from that it gives us the possibility of installing very interesting packages; and if we configure them well and install well, we can have a complete and stable server on our mobile.

This application does not require root access, you only need that our Android phone has a recent version (I think it works from Android 6).

Continue reading…

Switch in Python

There is no switch statement in Python, but there are equivalents depending on what you want to achieve. The best-known use of switch is to evaluate a value and avoid nesting multiple if statements.

Today I will explain it: how to make an equivalent switch in Python.

Continue reading…

Python: check if item or value exists in list or array

Introduction

Sometimes we need to know if an element or value is within a list or array in Python.

There may be a need to simply know if it exists, but it is also possible that we need to obtain the position of an element, that is, its index.

Today we will see how to do it in Python, to check if an element exists in array, as well as to obtain the index of a certain value.

Continue reading…