If you have this problem, you should check 4 things. Encoding of tables Open PhpMyAdmin and check whether the database is encoded with utf8mb4_unicode_ci and also all the columns have the same encodign or not Encoding of MySQL If you are on Linux, go to /etc/mysql/my.cnf and add or edit the following: Then restart mysql:…
Category: Programming
Constant size of a widget across multiple devices and screen resolutions in Flutter
I was developing a feature in my app, in particular a map with some icon markers using this package. During my programming session I used an Icon widget and I set the icon size at 100. Good, everything run smoothly, but when I launched the app on different screens I found the following situation here…
Export HTML to PDF with Python and Flask
Here is a very quick guide to generated a PDF from HTML and download it using Flask. First of all add these two dependencies in you requirements.txt file and install them using pip Then install the pdf engine running: In your code, import pdfkit and render an HTML template. Then put the output into pdfkit…
How to save PHP object into SESSION variable
If you try to save an object into the $_SESSION variable, you will probably notice this error: __PHP_Incomplete_Class Object This error occurs when an object cannot be serialized and deserialized properly. For this reason, before assigning an object to a session variable, you must serialize it using the function To deserialize it you just have…
[SOLVED] XMLHttpRequest error in Flutter web is a CORS error
This is the error from http package in Flutter: This error is a Javascript error and it can be inspected from AndroidStudio terminal or from the browser console. If you run into this problem it means that the requests to the API server are failing due to a CORS error. When executing these types of…
[SOLVED] flutter_osm_plugin not working (Expecting an argument)
If you are here it means that you cannot use the OSM plugin for Flutter. And if you are reading this post I hope you’re going to fix it. This is the error: If you are facing the same error, you can try to fix in this way: invalidate cache and restart upgrade Flutter upgrade…
How to install a venv in Python without network connection
In some cases you have to replicate a Python project on a computer without internet connection. In these cases you must not simply copy the venv folder. Requirements for this process: the project, a memory mass storage, another computer with internet connection. First of all, you have to to install Python on the offline machine….
How to open a page in Facebook app in Android with Flutter (deep link)
Maybe, if you are here, it means that you already tried to launch the Facebook URL of a page failing because the browser is launched instead of the native app. Well, to open the Facebook app on a specific page it’s quite simple if you know the correct way. First of all you can use…
How to read multipart form data with Flask
This is a simple snippet in Python that allows to read a multipart form data with Flask.
[SOLVED] Overlap images in HTML
If you spent hours trying to find a good solution to overlap images in HTML, this is your final solution. This doesn’t require CSS or Javascript. Only HTML. This is a tricky way to overlap images without using that annoying absolute CSS property misused. In fact if you use the position:absolute property, you will not…