Free knowledge blog: linux, programming, open source, databases, android, frameworks, web and computing in general
fetch function to make HTTP requests.
We will see how to download a file as a blob using AJAX and then ask the user where to save it, suggesting a name.
The good thing about this is that we can send parameters to request the download of the file (for example, we can send a password over a POST request if the server requires it).
In this post I will show you how to use SQLite3 directly in the web browser using the original C library through WebAssembly and OPFS to store the database. In this way we will have original SQLite3 on the web to work in the browser with JS on the client side.
In Svelte we can define functions that are going to be called when an event is triggered. For example, to call
holaMundo on the
click of an element we can indicate it as
Sometimes it is necessary to pass parameters to that function inside a Svelte component, but we cannot indicate it like this:
Since that will execute the function as soon as the component is loaded, and won’t wait for the click.
In this post I will show you how to pass arguments to functions in Svelte without calling them automatically.
Today I am going to show you a software that I just made with Laravel. It is a sales system, point of sale, POS or whatever you call it, which is used to keep track of the products that are sold, the sales, and so on.
It is a totally free and open source system; which means that you can use it at no cost, and modify it to your needs or customize it. Among its features we find:
Now let’s see how I have developed it, where you can download it, and so on.
In this Python programming tutorial you will learn how to create a REST API using Flask, SQLite 3 (for data), and JSON for data communication.
I will show you how to create an API that communicates using JSON and saves the data in SQLite 3. The API will be created with Flask, and we will use the Python programming language to handle all the data.
Although it seems simple to do, it is one of the jobs that has cost me the most and of which I am most proud. It was complex (for me) to understand all the logic for collisions, rotations, row deletion, part movement, limits, etc.
Among the features of the game we find:
Let’s see then the details of this game programmed in JS. Throughout the post I will show you how this game is programmed, I will also leave you a demo and the complete code which is FOSS.
Note: figure, piece and tetromino will be used synonymously in this post.
In this post I will show you how to enable CORS (Cross Origin Resource sharing) so that you can make HTTP requests from a different domain than the one you use for your Flask application written in Python.
We will just add a kind of middleware to modify all the responses and add the headers that allow CORS in Flask.
It is the Connect 4 game but web version with a player versus player option, as well as player versus CPU that uses a small artificial intelligence.
Throughout the post I will show you how the game works, what technologies I have used, styles, etc. I will also show you how to download the source code, as the game is totally free and open source. Finally I will leave you a demo to play connect 4 online.