Author image

English Greek Dictionary C++ Program - Serialization


C++ console implementation of an English - Greek Dictionary.

Depends on Boost serialization module which is included.

There is no Gui - everything is done in the console, for the time being.

Incomplete. There's a bug currently I've yet to correct.

The tricky aspect of this program is proper support of UTF-8 and Unicode, which is a pain beyond imagination in Windows. Despite that, I've managed to succeed (check this SO post -made by me- for this issue ), but I'm also victim of another obscure serialization error which I haven't had much time to dedicate in fixing it.

This is what it looks like. I provide a demo with some sample words.

Author image

Function Reference


My implementation of a functionRef/functionView variant. Why? I desperately wanted to know just how std::function<> works. So I scoured the tutorials, books what have you, in order to find more information and ended up creating a sort of lightweight variant of it.

The skills you need to have under your belt before attempting this tutorial are:

  1. Type erasure.
  2. callable objects
  3. std::invoke
  4. higher order functions
  5. lambda calculus - just a smattering knowledge

Based on std::function, functionRef is a non-owning wrapper for an arbitrary callable object.

Implementation notes:

  • A primary template is used to match the complete type of a callable, say void( int, int ) or int. The primary template remains an empty struct.
  • We want to differentiate the function type...

Author image

The Game of Life


Here we've designed and implemented Conway's Game of Life, game algorithm; invented by John Conway in 1970. The rules of this 0-player game (a video game playing without user input) are:

  1. Any live cell with fewer than two live neighbors dies, as if by under-population.
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.

The motivation for this project was to become familiar with parallel computing primarily on the CPU, but also on the GPU which utilizes the stream processing paradigm.

Usage

There are 6 different implementations:

  1. Serial
  2. Serial with OpenMP
  3. MPI
  4. MPI with OpenMP (aka Hybrid)
  5. NVidia CUDA...

Author image

Process Hacking (COD4) Tutorial


Generic Windows process hacking application. This time the victim being Call of Duty 4 (the original - 2007).

What do we mean by hacking? Hacking is gaining access to a system in a manner that was not intended by its developer.

Here we do something really very simple and easy. We will change some on screen visual values in our program.

A. We find the process' HANDLE. There are 2 ways to do this.

I. By getting the window Handle (HWND)

  1. HWND windowHandle = FindWindowW( nullptr, processName ) to get the window handle
  2. GetWindowThreadProcessId( windowHandle, &pid ) to get the pid
  3. and finally OpenProcess( PROCESS_ALL_ACCESS, false, *pid ); to get the process Handle

This is the method I use in this example.

II. By taking a...

Author image

Hibernate Object Relational Mapping (ORM) Demo


Hibernate is a Java open source, lightweight & performant ORM framework that simplifies the development of Java server applications when interacting with a database. ORM stands for object relational mapping. It maps between an Object oriented language (Java here) and a Relational language (SQL) in order to execute database queries in an OOP way rather than using SQL.

This demo provides all you need to get setup in Java with your database queries. The main pieces of code are 4 .java files in src\main\java\ directory. The queries are database independent though and they can work no matter the database backend. I've tested this with MySQL and SQLAlchemy. This is accomplished by HQL (Hibernate Query Language) the object-oriented version of SQL which Hibernate converts to SQL under the hood.

Author image

Hooking Tutorial


Here you will learn about this ancient miracle cure called Hooking. Our ancestors used hooking to catch fish! No just kidding, lets get to it.. But before we dive in, I'll provide a little introduction to the Portable Executable (PE). Don't skip it; its understanding is crucial to get to the meat and potatoes of this tutorial.

The Portable Executable (PE) format is a file format for executables, object code, DLLs, FON Font files, and others used in 32-bit and 64-bit versions of Windows operating systems. It is a data structure format that encapsulates information regarding dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data.

The Extensible Firmware Interface (EFI) specification states that PE is the standard executable format in EFI environments. On NT family of operating systems, the PE format is used for EXE, DLL, SYS (device...

Author image

Install Python Packages script


Merely a handy run-and-forget script that installs all python packages specified in a text file “packages.txt”. I've used it countless times. Press a button and let the console ASCII text flow.

You will more than likely need to run the script (or Visual Studio if you're using that to run it) with administrator privileges, or you'll be denied permission.

Requirements:

  • Python 3.x version installed (only tested with 3.5 and 3.6.6)
  • Latest pip version for the specified python version installed

I've used Windows Visual Studio IDE with Python tools and Python 3.6.6 interpreter.

Github

Github repository link.

Author image

Mail Spam Filter


A mail spam filtering solution implemented in Matlab.

PDF is in Greek only. If I get enough requests I may be persuaded to translate it in English.

Github

Github repository link.

Author image

Math Handbook


A handbook for logic, set theory, algebra, geometry, video game math concepts, graph theory, Calculus, discrete math, probability, statistics, number theory, numerical analysis, vector algebra, physics, chemistry and more goodies I've worked on and off throughout my educational years.

I compiled this several years ago and it's been left dormant among the circuits of my computer..

I provide the source files, which you can open yourself with TexMaker.

The built pdf file is called “Math Handbook.pdf”.

As a disclaimer, this compilation could be of use to some, to others it could be another pile jumbled up notes.

I release it in the hope that it might prove useful to at least one person.

I used Windows LATEX with TexMaker.

Github

Github repository link.

Author image

Maze Solving


A maze is a programming puzzle involving a collection of paths. What we seek to do here is construct an algorithm that will traverse a path starting from a specified location and ending to a destination location.

A Maze is typically given as an N*N array, eg. maze[N][N]. Imagine you're a rat trapped in the maze and you have to traverse the blocks to go from the Start to the Destination block. Reaching the destination blocks allows you to escape the maze and go free! The rat only possesses elementary movement abilities, either left/right or up/down. It's a 2d world for the rat and it suits us nicely.

In this example, we want to be able to construct a maze dynamically based on however many amount of rows and columns it consists of; for this reason we opted to use a vector of vectors - 2d vector called "maze".

You can provide whatever maze you want as input to this program. Use a file, place it somewhere inside the project and run the program by...

1 2 3 4 5 6