Entradas

How to improve space exploration / Como mejorar la exploración espacial

Imagen
****English The space industry has been stagnant for many years, in 1964 according to NASA and ESA it was possible to send a device to Mars that sent some photos of the planet, the last mission arrived at Mars on 11/26/2018. In this year 2020, 3 new missions were sent , one from the United Arab Emirates, one from China and one from the USA. The 3 estimated to reach Mars in February 2021 . None of these mission has a different proposal that could send strong results, always a vehicle that goes, takes photos and then sends them to Earth, along with measurements that have not been of greater relevance, speaking from my point of view as a world citizen. Today we have interesting technology that could improve all this, but for some strange reason no scientist attached to the exploration agencies occurs to use it. To put it in simple terms, there are many robots that have demonstrated exceptional capabilities and that can be controlled remotely, such devices could already be mass produced an...

Codeigniter Sending Email Message: strpos(): Empty needle

Imagen
When sending an email you get this error, regarding Email.php library: A PHP Error was encountered Severity: Warning Message: strpos(): Empty needle Filename: libraries/Email.php Line Number: 937 This is due you need to define the config['charset'] in the email.php file in the config directory of the app. $config['charset']          = null; //original $config['charset']          = 'UTF-8';   //or whatever is good for your app. ***** Este error de strpos(): Empty needle en la librería Email.php significa que no se ha definido una variable llamada charset en el email.php del directorio config de su app.

VirtualBox not working after Mojave update. Kext error.

Imagen
VirtualBox not working after Mojave update. Kext error. If you updated to the most recent macOS Mojave and your VirtualBox is not working anymore just go to https://www.virtualbox.org/wiki/Downloads and download the most recent version. The problem is solved. ****** Si actualizaste al nuevo macOS Mojave y tu máquina de VirtualBox dejó de funcionar, la solución es simple, descarga la más reciente versión.

PHPWord in hosting with no terminal no composer / PHPWord en servidor sin terminal sin composer

If you need to use PHPWord in a hosting environment in which you can't install via composer, you must install it locally on your development machine, then just copy the directory to your hosting provider (normally copy the vendor directory to your root application directory). The only change I needed to do is to have a writable directory where to store the created files. In my case I created "./public/docs" then in the method save: $objWriter->save('./public/docs/my_wordfile.docx'); ********** Si necesita usar PHPWord en un servidor de hosting en el cual no puede instalar usando el composer, lo que debe hacer es instalar en su máquina local, luego solo basta con copiar el directorio a su proveedor de hosting (normalmente copie el directorio vendor al directorio root de su aplicación). El único cambio que necesité hacer is tener un directorio escribible donde dejar los archivos creados. En mi caso yo creé "./public/docs" entonces en el método ...

PHP Fecha actual / PHP current date

Para que PHP devuelva la fecha actual es muy simple: $data["fechahoy"]=Date('Y-m-d'); Esto se hace en el controlador y cuando se llama a la vista en esta se recibe la variable y se le asigna al input type date como $fechahoy ***************************************** Tell to PHP returns current date is very simple: $data["todaydate"]=Date('Y-m-d'); This must be done in the controller then in the view receive the var to assign to the input type date as $todaydate

Solución Apague y Reinicie / Shutdown and restart solution

Imagen
This is a very common solution and normally expressed as a joke to recognize the "Support Engineer" 's main activity: when someone needs to fix something in the computer and calls for support and the supporter says: "please restart your computer." This is not a nonsense solution, in fact if there are some smart question from the supporter and finally decides to tell the user please restart is because of this. Example of questions for a program that is not working on the computer: 1. Have you applied a recent update on the app? R/No 2. Someone else applied an update on your computer? R/No 3. When was the last time your app was working fine? R/A few minutes ago 4. Ok, if your computer is the same in configuration and it fails a few moments ago, it must be something about the operating system exahusted, I think you must restart your computer. R/I already did it, I restarted the computer. 5. Oh, ok, so you are now opening the program and it's still fail...

PHP first day and last day of current month / día inicial y final del mes actual

To get the first day and last day of current month in PHP: Para obtener el primero y último día del mes actual en PHP:       $dfechaini=date("Y-m-d", mktime(0, 0, 0, date("m"), 1));       $dfechafin=date("Y-m-t", mktime(0, 0, 0, date("m"), 1)); The trick is the first parameter in date "Y-m-d" first day "Y-m-t" last day plus mktime El truco es el primer parámetro en date "Y-m-d" primer día "Y-m-t" último día más mktime