Categories
Go MongoDB

Connect your Go applications to MongoDB

Installing the MongoDB Go Driver

Resources

https://docs.mongodb.com/drivers/go/current/

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/

https://www.digitalocean.com/community/tutorials/how-to-use-go-with-mongodb-using-the-mongodb-go-driver

Categories
Data Science

Data Science at Command Line (Docker)

Free Data Science Book by Oreilly Publication

https://datascienceatthecommandline.com/2e/chapter-2-getting-started.html

Categories
C++ Programming Languages

Install Mingw-64 (GCC C/C++) compiler on Windows 10

Download

https://www.mingw-w64.org/downloads/#mingw-builds

Mingw-W64-builds
Mingw-builds

https://sourceforge.net/projects/mingw-w64/

Install (Default setting)

mingw-64-install.exe

C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64

System Environment Variable (Path)

Append the C++ bin folder to System Environment Variable (Path)

Test the C compiler (CMD – Windows Terminal)

gcc –version

Test the Compiler (CMD – Windows Terminal)

g++ –version

Categories
C Programming Languages

Install raylib and Setup Visual Studio Code for Windows

Assumed that MinGW-64 (C/C++ compiler) have been installed and system environment variable (Path) setup.

Download the raylib from GitHub and extract it

https://github.com/raysan5/raylib

Build raylib using make

Using MinGW make a tool, just navigate from the command line to raylib/src/ folder and type:

mingw32-make PLATFORM=PLATFORM_DESKTOP
librarylib.a created mean build has been successful

Project folder structure

Example (main.cpp)

#include "raylib.h"

int main(void)
{
    InitWindow(800, 450, "raylib [core] example - basic window");

    while (!WindowShouldClose())
    {
        BeginDrawing();
            ClearBackground(RAYWHITE);
            DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
        EndDrawing();
    }

    CloseWindow();

    return 0;
}

Makefile

default:   

g++ ../main.cpp -o test.exe -O2 -Wall -Wno-missing-braces -I ../include/ -L ../lib/ -lraylib -lopengl32 -lgdi32 -lwinmm

Run

mingw32-make

Binary (/build)

test.exe

Categories
C Programming Languages

C/C++ Extension for Visual Studio Code Setup

C/C++ Extension

Code Runner Extension

Setup Code Runner (Run in Terminal is Checked)

Program Testing

A simple printf(“Hello to C Programming”); code and to run the code press CTRL + ALT + N

Result: Hello to C Programming

Categories
Internet Of Things LUA

Analog Read with Lua code for WeMos D1 Mini (R2) NodeMCU firmware module

Lua Code

print(adc.read(0))

NodeMCU Flasher

esptool.py –port COMx

Resources

Documentation

https://nodemcu.readthedocs.io/en/release/

ADC Module

https://nodemcu.readthedocs.io/en/release/modules/adc/

Categories
Love2D and Lua Programming Languages

Installing Lua (64bit) on Window 10

Download site

http://luabinaries.sourceforge.net/download.html

Extract (unzip) the lua-5.x._win64_bin.zip

Unzip (files)

Create a new folder

D:\Program Files\LUA

Copy all the unzip files into this folder

Rename the lua54.exe to lua.exe

Append a new path for lua.exe to the Windows 10 System environment variable path

Launch the Lua 5.x interpreter from command prompt (terminal)

If everything has been done correctly then you see the Lua 5.x.x Copyright (C) otherwise check the system variable environment path again. Note the semcolon ( ; ) entries before and after the path value.

Categories
Ai-Thinkers Internet Of Things Microcontrollers

ESP-12F Module by Ai-Thinker

https://github.com/nodemcu/nodemcu-devkit-v1.0

Categories
Ai-Thinkers Internet Of Things Microcontrollers

Ai-Thinkers Modules based on Espressif ESP8266

https://docs.ai-thinker.com/en/esp8266

Categories
Internet Of Things Microcontrollers

Getting Started Node-Red

https://nodered.org/docs/getting-started/