Creating a Simple List in Flutter – Dart

Creating a Simple List in Flutter – Dart

Tiempo de lectura: 3 minutos Reading time: 3 minutes To create an example list where we can add an element, update the list, and also remove elements, follow these steps: First, we create the main Widget that we call from main, where we display the .dart class with the designed view. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { … Read more

Fixing error ‘AttributeError: ‘dict’ object has no attribute ‘XXXX” in Python.

Fixing error ‘AttributeError: ‘dict’ object has no attribute ‘XXXX” in Python.

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute Today I’m going to show you how to fix the problem “AttributeError: ‘dict’ object has no attribute ‘XXXX'” in Python. The error being received is due to the variable being a dictionary and not having the attribute XXXX. The XXXX attribute is used in the code as if it were ... Read more

Install Loki Plugin for Docker on ARM64

Install Loki Plugin for Docker on ARM64

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute When we install the Loki plugin for Docker on ARM64, we encounter an error. To solve this, we need to do the following: First, we install the plugin to create the directories: docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions Now, we install GO: Go outside the Docker folder and execute: ... Read more

Access Error When Pulling via Console Using GitLab – Access Token

Access Error When Pulling via Console Using GitLab – Access Token

Tiempo de lectura: 2 minutos Reading time: 2 minutes When trying to perform a GitLab project pull via the console, I’m getting the following error: GitLab – remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. To solve this, … Read more

Uninstall Docker in Ubuntu

Uninstall Docker in Ubuntu

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute To uninstall Docker in Ubuntu, you need to use the following command: dpkg -l grep -i docker A list of installed Docker packages will be displayed: Next, you need to uninstall each package separately. Run the following command: sudo apt-get purge -y docker-compose-plugin Finally, execute this command: sudo apt autoremove ... Read more

Create a Rest API using FAST API (example without database connection)

Create a Rest API using FAST API (example without database connection)

Tiempo de lectura: 2 minutos Reading time: 3 minutes In this tutorial, I will show you how to create a REST API using FastAPI. FastAPI is a modern and fast web framework for building APIs with Python 3.6+ based on the ASGI standard and with the philosophy of “less code, more productivity.” Additionally, FastAPI provides interactive and user-friendly automatic documentation, … Read more

Send email using FAST API with fastapi_mail

Send email using FAST API with fastapi_mail

Tiempo de lectura: 2 minutos Reading time: 2 minutes In this tutorial, I will show you how to send emails using FastAPI and fastapi_mail. FastAPI is a modern and fast web framework for building APIs with Python 3.6+ based on the ASGI standard and with the philosophy of “less code, more productivity.” On the other hand, fastapi_mail is a FastAPI … Read more

Return HTML with FAST API

Return HTML with FAST API

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello, today I’m going to show you how to return an HTML after calling an endpoint in FastAPI, the Python REST API: The first thing is to import this dependency: from fastapi.responses import HTMLResponse Once imported, we’re going to create a “get” function that, when called by the URL in … Read more

Add a Cloudflare DNS to your domain or website.

Add a Cloudflare DNS to your domain or website.

Tiempo de lectura: 2 minutos Reading time: 2 minutes Today I’m going to show you how you can add CloudFlare DNS to your website: 1. You need to register on Cloudflare or log in (https://www.cloudflare.com) 2. Now you need to go to the Websites section: 3. You need to add the domain you want to register, for example devcodelight.com You … Read more

Fixing ‘Call to undefined function imagecreatefromjpeg()’ error in PHP Docker container by importing PHP GD extension

Fixing ‘Call to undefined function imagecreatefromjpeg()’ error in PHP Docker container by importing PHP GD extension

Tiempo de lectura: < 1 minuto Reading time: < 1 minutes If we are using image processing functions in PHP, we need to install and enable PHP GD in the Docker container. To do this, we go to our Dockerfile and add the following: # syntax=docker/dockerfile:1 FROM php:7.2.5-apache RUN docker-php-ext-install mysqli RUN docker-php-ext-install pdo_mysql RUN apt-get update && \ apt-get install ... Read more