Skip to content

Instantly share code, notes, and snippets.

View DreamVB's full-sized avatar
🏠
Working from home

Ben DreamVB

🏠
Working from home
View GitHub Profile
@DreamVB
DreamVB / rndpws.cs
Created August 17, 2018 20:35
Random password class in C#
/* Random Password Class
* This example shows how to create a list of random passwords.
* By DreamVB on 21:28 17/08/2018
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PasswordGenerator;
// A simple stack class using templates.
// Version 1
// By Ben J
#include <iostream>
using namespace std;
template <typename T, int s_size>
class TMyStack{
//A small simple file crypting tool in C++
//By Ben Jones Hope you like it.
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
FILE *fin = NULL;
char *pws;
@DreamVB
DreamVB / rpn.cpp
Last active April 22, 2021 22:40
C++ Reverse Polish Notation calulator version 3.0
// Reverse Polish notation demo
// Basic calulator for RPN expressions.
// Allows calulation of doubles
// includes many math functions
// Allows simple variables using single letters A-Z
// Allows easy printing of results using print and cr for newlines
// By Ben a.k.a DreamVB (dreamvb@outlook.com) 22:23 18/04/2021
#define MAX_STACK 2048
#define PI 3.14159265359
@DreamVB
DreamVB / main.cpp
Created September 16, 2016 22:35
Backup Files and Folders
/*
bBackup folder copy
Version 4
By Ben a.k.a DreamVB
*/
#include <iostream>
#include <Windows.h>
#include <string>
#include <algorithm>
@DreamVB
DreamVB / main.cpp
Created September 4, 2016 17:49
Check if a word is Palindrome the word should read the same as backwaords or forwards.
// Check if a word is Palindrome
// The word sould read the same as backwaords or forwards.
// I used used code to lowercase string as to avoid captital letters.
//By DreamVB
#include <iostream>
#include <Windows.h>
using namespace std;
using std::cout;
@DreamVB
DreamVB / main.cpp
Created August 22, 2016 20:50
Bubble sort algorithm to sort a array of words into acsending / desending order.
// Sort words assending or desending order.
// By DreamVB
#include <iostream>
using namespace std;
using std::cout;
using std::endl;
template <typename T>void BSortNames(T *item, int size, bool asending){
@DreamVB
DreamVB / main.cpp
Created August 21, 2016 20:12
Get special folder locations
#include <iostream>
#include <ShlObj.h>
//Get Special Folders ~By DreammVB~
//Example of returning special folder locations.
using namespace std;
using std::cout;
using std::endl;
@DreamVB
DreamVB / fcompare.cpp
Created August 11, 2016 21:28
Simple tool to compare the contents of two files.
/*
fCompare By DreamVB
Version 1.0
Tool to compare the contents of two files.
Please feel free to to use as you like.
Please let me know if you found this code usfull e. dreamvb@outlook.com
*/
#include <stdio.h>
@DreamVB
DreamVB / unix2dos.cpp
Created August 5, 2016 21:18
Convert unix line breaks to DOS line breaks
/*
unix2dos By DreamVB
Version 1.0
Convert unix line breaks \r to dos \r\n
Please feel free to to use as you like.
Please let me know if you found this code usfull e. dreamvb@outlook.com
*/
#include <stdio.h>