Posts

Showing posts from August, 2022

C++ script - Using map container and different functions: size, max_size, insert, swap and count.

Image
  Note: I would appreciate your support of this blog by going to the link below to "Buy me a pizza" so that I may continue to provide educational scripts, resources and general tech stuff. 🍕 Thank you. https://www.buymeacoffee.com/infosec_coder -------------------------------------------------------------------------------------- I used the following resource to have some fun creating the script below: https://cplusplus.com/reference/map/map/ ------------------------------------------------------------------------------------------ The following script: - Prints the key-value pairs of my_map - Uses the count() function - size() function - max_size() function - swap() function to swap key-value pairs from my_map container with other_map container. This program was created using Visual Studio for the IDE. To view an image below clearly, you may right click > open image in new tab> in the new tab, your cursor will turn into a crosshair symbol > left click > will zoo

C++ script - Maps container, updating key-value pair using the find function, private bool with same name in two different classes, and a for loop to iterate through the map.

Image
   Note: I would appreciate your support of this blog by going to the link below to "Buy me a pizza" so that I may continue to provide educational scripts, resources and general tech stuff. 🍕 Thank you. https://www.buymeacoffee.com/infosec_coder -------------------------------------------------------------------------------------- Working the a map container and: - insert function to add key-value pairs - using a private bool with the same name in two different classes - using the find function to update a value for a key-value pair - using a for loop to iterate through the map container This program was created using Visual Studio for the IDE. To view an image below clearly, you may right click > open image in new tab> in the new tab, your cursor will turn into a crosshair symbol > left click > will zoom in on script. ------------------------------------------------------------------------------------------- OUTPUT -----------------------------------------------

Python script - Calculate grade average for a group of students - Weighted mean and arithmetic mean

Image
  Note: I would appreciate your support of this blog by going to the link below to "Buy me a pizza" so that I may continue to provide educational scripts, resources and general tech stuff. 🍕 Thank you. https://www.buymeacoffee.com/infosec_coder -------------------------------------------------------------------------------------- This was made in Visual Studio Code within a virtual environment. The most important commands in working with your virtual environment are: 1. Create your virtual environment > py -m venv env 2. Activate your virtual environment > env\Scripts\activate 3. Go to View > select Command Palette > Select Python Interpreter > (env:venv) 3. Run your application > py main.py ------------------------------------------------------------------------------------- Screenshot  ------------------------------------------------------------------------------------- Script (Desktop users): To view the sections below clearly > left click on the scri

Bash script - Simple tutorial on echo command

Image
 Note: I would appreciate your support of this blog by going to the link below to "Buy me a pizza" so that I may continue to provide educational scripts, resources and general tech stuff. 🍕 Thank you. https://www.buymeacoffee.com/infosec_coder --------------------------------------------------------------------------------------  Summary of commands used for the tutorial: - $SHELL - echo -e - $USER - whoami Screenshot of the output Script (DESKTOP users only) To view script > left click > right click - open image in new tab > the cursor turns into a plus sign > left click > will offer zoomed in mode. colour_coding.sh

Python - Cipher Program using numpy

Image
 Note: I would appreciate your support of this blog by going to the link below to "Buy me a pizza" so that I may continue to provide educational scripts, resources and general tech stuff. 🍕 Thank you. https://www.buymeacoffee.com/infosec_coder --------------------------------------------------------------------------------------   This was made in Visual Studio Code within a virtual environment. The most important commands in working with your virtual environment are: 1. Create your virtual environment > py -m venv env 2. Activate your virtual environment > env\Scripts\activate 3. Go to View > select Command Palette > Select Python Interpreter > (env:venv) 3. Run your application > py main.py ------------------------------------------------------------------------------------- Screenshot I First screen Screenshot I Second screen ------------------------------------------------------------------------------------- To view the sections below clearly > left

C++ script - Script to learn map library | struct | transform a vector of keys

Image
 Note: I would appreciate your support of this blog by going to the link below to "Buy me a pizza" so that I may continue to provide educational scripts, resources and general tech stuff. 🍕 Thank you. https://www.buymeacoffee.com/infosec_coder --------------------------------------------------------------------------------------  With this script, you will use the following: - Header file - Implementation file - structure (struct) - boolean variable - class - map and vector - which are part of C++'s STL (standard template library) This program was created using Visual Studio for the IDE. To view an image below clearly, you may right click > open image in new tab> in the new tab, your cursor will turn into a crosshair symbol > left click > will zoom in on script. ------------------------------------------------------------------------------------ I. Screenshot of output II. Language.h  III. Language.cpp IV. main.cpp