Fix: Error en el servidor: sql: no rows in result set when using thermal printer plugin

In this post I will show you how to fix an error that appears in my thermal printer plugin that says: Error en el servidor: sql: no rows in result set. This error says that there are no rows in the database, and you may be wondering what printing has to do with a database, so that is exactly what I will discuss in this post. ...

November 16, 2021 · 3 min · 459 words · Parzibyte

Silent PDF Print with JavaScript and plugin

Today I am going to present you a plugin that I have just created. It is a plugin to print a PDF file silently, that is, without asking the user for confirmation. This plugin exposes a REST API so that a PDF can be printed without confirmation using JavaScript. Just make an HTTP GET request to the plugin path sending the name of the PDF and the name of the printer. The best thing about this is that you can use the virtual printers that Windows offers, in this way you can do your tests in an ecological way. Throughout this post I will show you the documentation of the plugin and all the details of it, including how you can get it. ...

March 21, 2021 · 13 min · 2581 words · Parzibyte

Start program at Windows Startup

In this post I will show you how to make an executable open when Windows starts, adding its shortcut to a special directory called Startup folder. Thanks to this, as soon as the computer starts, the executable will be opened, regardless of its origin. ...

March 21, 2021 · 3 min · 436 words · Parzibyte

Windows - Print PDF from CMD with PDFtoPrinter

In this post I will show you how to print a PDF document from the Windows command line, terminal or CMD using the executable PDFtoPrinter.exe. As you know, printing a PDF from the Windows terminal is not possible using the print command (since it only prints text files), since a translator is required to read the content of the PDF and send it to the printer. It is precisely what this utility called PDFtoPrinter.exe does, and in this post I’ll show you how to use it. ...

March 21, 2021 · 3 min · 480 words · Parzibyte

Laravel POS System - Free and open source

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: It Uses Laravel in its latest version (as of this writing) Bootstrap is used for styles FontAwesome Icons Fully responsive system, that is, it works on mobiles, tablets and computers Inventory control with sale price, purchase price, profit, stock, etc. Option to make sale, adding products Checking inventory stock when selling Subtraction of stock when selling Printing of sales tickets on thermal printer Sales report User login and registration User management Customer registration Ticket that includes the customer’s name Now let’s see how I have developed it, where you can download it, and so on. ...

March 17, 2021 · 13 min · 2761 words · Parzibyte

Pure PHP Point of sale system with MySQL

A few days ago I did an exercise on a sales system in PHP. It is written in pure PHP, no Javascript. Mind you, for the styles I used a Bootstrap variant. The files don’t have a structure, but like I said, it’s an example. I also write this because it either serves someone else or it serves myself for some references. For data persistence it uses MySQL. This POS Save products and sales. It does not handle user permissions. We store the shopping cart in the session, and well, I better explain it in parts in this post. Obviously this POS software is free and open source. ...

March 17, 2021 · 14 min · 2893 words · Parzibyte

API REST with Go and MySQL

In this article about programming in the Go language (also known as Golang) we will see how to create a REST API that communicates through JSON, saving and displaying data from a MySQL / MariaDB database. In the end we will have a REST API with Go using the 4 methods: POST, PUT, DELETE and GET using the Mux router. We are also going to implement the 4 operations of a database: insert, update, delete and select. I will leave the full open source code at the end of the post. ...

November 12, 2020 · 10 min · 1938 words · Parzibyte

Creating an API REST with Python, Flask and SQLite3

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. In the end you will have an API that you can consume from any client that could be an Android application, a browser with JavaScript or even another server language. 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. ...

November 12, 2020 · 7 min · 1392 words · Parzibyte

Tetris game in JavaScript - Open source

In this post I will show you the Tetris game programmed in pure JavaScript, totally free and open source. This block game is programmed with JavaScript and uses canvas to paint the game. I also use Bootstrap for the layout of the buttons and the page in general, with a bit of SweetAlert for the alerts. 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: Sounds: background music, sound when the piece cannot be rotated, when a complete row is made and when the tetromino touches the ground Colors: each piece has a random color chosen at runtime Rotations: pieces can be rotated to accommodate them and accumulate points Mobile compatible: because it is web, I have added some buttons to be able to play it on mobile phones and tablets, but it can also be played with the keyboard Open source: you can modify the game, the board, the length, speed, pieces, rotations, etc. Tetris port: behaves like any normal tetris game Game pause: the game can be paused or resumed at any time 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. ...

November 12, 2020 · 17 min · 3536 words · Parzibyte

Enable CORS in Flask app

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. ...

November 10, 2020 · 1 min · 193 words · Parzibyte