Postări

5Inch HDMI LCD for RPI 800x480

In order for the LCD to work ... my version Go clone from git the following git repository  LCD-show      After this, edit with your favorite text editor from console /boot/config.txt (sudo mcedit /boot/config.txt) my favorite is mc (sudo apt install mc -y) and of course, at the end of the file copy the settings from below make sure to have penirq=22 instead of penirq=25 if the touchscreen does not work   Finally for calibration if necessary do: sudo apt install -y xinput-calibrator and calibrate the screen: DISPLAY=:0.0 xinput_calibrator

.NET Core Dependency Injection with Func as constructor parameter

This post will be short and sweet, albeit one that caused me a bit of a headache. I recently worked on an ASP.NET Core project and I wanted to take advantage of the built-in Dependency Injection service to inject various services to the controllers. However, one of the services required a parameter in the constructor; to be more exact I was asked to create a unit of work for all the different zones that we have but the connection has to change for each region so this is the solution I came up with: The important magick is here:

rSync folders from one side to another

rsync -a --include='*/' --exclude='*' source/ destination/

Building Cross-Platform Desktop Apps with Electron.NET

This article provides a walk-through for developing and deploying an application with Electron.NET. Create an ASP. NET Core Web Application For this exercise, I'm using Visual Studio Code. First, open a terminal window and run the following commands to create a new project called ElectronMvcDemo . mkdir ElectronMvcDemo   cd ElectronMvcDemo   dotnet new webapp   code .   When prompted by Visual Studio Code, say Yes to load the required assets for the project. Press F5 to build and run the application, opening a browser on the default ASP. NET Core welcome page, hosted on localhost:5001. Close the page, return to VS Code and stop debugging. Electronize It! Now let's turn our boilerplate ASP. NET Core project into an Electron application. First, open the file ElectronMvcDemo.csproj and insert a package reference for the Electron.NET: <ItemGroup>     < PackageReference Include= "ElectronNET.API" Version= "9.31.2" />   </ ItemGroup >     S

NodeJS - Npm - set global node_modules

Ever had the problem of 'XXXXX'( 'yarn' )  is not recognized as an internal or external command ?! The solution is as follows: mkdir % PROGRAMDATA % \npm setx PATH "%PROGRAMDATA%\npm;%PATH%" / M npm config set prefix % PROGRAMDATA % \npm Explanation: Create a folder in a sensible location to hold the globals (Microsoft is adamant that you shouldn't write to ProgramFiles, so %PROGRAMDATA% seems like the next logical place. The directory needs to be on the path, so use  setx .. /M  to set the system path (under HKEY_LOCAL_MACHINE). This is what requires you to run this in a shell with administrator permissions. Tell  npm  to use this new path. (Note: folder isn't visible in %PATH% in this shell, so you must open a new window). npm config ls - l | grep prefix -> This is to list all node_modules configured ... 

Raspberry PI - Rotate screen

The defaults are as follows: display_rotate=0 #Normal display_rotate=1 #90 degrees display_rotate=2 #180 degrees NOTE: You can rotate both the image and touch interface 180º by entering lcd_rotate=2 instead display_rotate=3 #270 degrees display_rotate=0x10000 #horizontal flip display_rotate=0x20000 #vertical flip