This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A simple stack class using templates. | |
| // Version 1 | |
| // By Ben J | |
| #include <iostream> | |
| using namespace std; | |
| template <typename T, int s_size> | |
| class TMyStack{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| char *questions[10][5] = { | |
| { "What is the smallest unit in the computer system.", "Block", "Byte", "Bit", "C" }, | |
| { "What is the most widely used device in the computer..", "Solid state disks", "Mouse", "Hard drive", "C" }, | |
| { "WWW stands for.", "Wan Wide World.", "World Wide Web", "Wide Wan Web", "B" }, | |
| { "What software is used to view web pages.", "Internet", "Web Browser", "Page Browser", "B" }, | |
| { "Which one is a word processor.", "Notepad.", "Excel", "Word Perfect", "C" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| int main(int argc, char **argv) | |
| { | |
| FILE *infile; | |
| FILE *outfile; | |
| char ch = '\0'; | |
| char newch = '\0'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Simple stack Virtual Machine | |
| Version 1.0 | |
| by DreamVB | |
| This is a simple example of how to code a simple VM in C | |
| At the moment this vm only supports a small amount of instruction I hope to add more as I learn more. | |
| This version has some hard coded example that you can test in the vm. Next version I plan to load the examples from files. | |
| If you like this code, or if you have some improvements I can make drop me a message below: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Strong Password Generator | |
| Version 1.0b | |
| by DreamVB | |
| This file may be distributed under the terms of the GNU Public License. | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Recursive Descent Parser | |
| by DreamVB | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MAX_TOKEN 255 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reverse Polish notation demo | |
| # Basic calulator for RPN expression only + / * - is supported. | |
| # Allows ints and floats. | |
| import math | |
| stack = [] | |
| def IsNuber(s): | |
| is_num = True | |
| for n in s: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SRCDIR="files" | |
| #Set to 1 to delete backup files older than 30 days. otherwise set to zero | |
| RemoveOldBackups=1 | |
| #Set a filename based on date and time. | |
| FILENAME=$(date +"%FT%H%M%S").tgz | |
| #Make backup folder | |
| mkdir -p "Backups" | |
| #This is the backed up filename. | |
| BACKUP_FILE="Backups/$FILENAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File : ts.c | |
| // By : Ben a.k.a DreamVB | |
| // Date : 20:50 26/05/2020 | |
| // Info : Little tool to count the Lines, Digts Words, Chars, UpperCase and LowerCase chars in a file. | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #include <string.h> | |
| int m_words = 0; |