gnuplot revisited

Here is a more sophisticated example of using gnuplot: set terminal png size 1920, 1080 enhanced font ‘Verdana,15’ # Different log scales set logscale x 2 set logscale y 10 # %L is the exponent of the current log scale set format y “%g” set format x “2e%L” # Move the legend to the top

Cmake basics

We already know make, a powerful tool to automate all kinds of building sequences. But if you are using it to compile large C++ projects, you will quickly find that it’s tedious to maintain, and that you’re often repeating the same commands over and over again. This, of course, opens up the door to mistakes

A simple gnuplot example

gnuplot is a very easy-to-use tool allowing us to quickly plot data we generated with, for instance, a C++ program. Here is a sample gnuplot script – see a brief explanation of the commands below: set terminal png size 900,675 enhanced font ‘Verdana,9’; set output ‘error_plot.png’; set logscale xy; show logscale; set format xy “%g”;

Compiling C++ libraries

If you use C++, you’ve almost certainly already used a library of some kind. Even the classic “Hello world” program requires one: #include <iostream> // include the iostream library int main() { std::cout << “Hello world!”; return 0; } But what if we wanted to write our own? This has several advantages. First off, if

Automating builds with Make

make is a very useful tool when working on large projects with many dependencies. A C++ project with many header includes, for instance, can quickly get tedious to compile, when at each compilation you must run several commands: g++ -c main.cpp -o lib/main.o g++ -c myfile.cpp -o lib/myfile.o g++ lib/main.o lib/myfile.o -o main What make

Git cheat sheet

Here are the git commands I most frequently use, along with a brief description of what they are used for. Setting up git init: create a new repository of the current directory. Creating commits git status: show the current status of the git repository, along with staged and untracked files. git add <filename>: add <filename>

Enabling “reading mode” on your website

Many modern browsers nowadays have a sort of “reading mode”, which, when activated, will attempt to automatically extract content from a page and present it to the user in a more reader-friendly environment. In Firefox, this is called “Reader View”, and can be found as a little book icon in the URL bar or under

Creating a 2D multiplayer game in Python

I have begun work on the creation of a simple 2D LAN-based multiplayer game with Python. I decided to log my progress as I go in a series of articles, partly for my own future reference, and partly for anyone else who is taking on a similar endeavour for the first time and is looking

Matura Project: Elliptic Curves

In this document I explore the mathematical peculiarities of modular arithmetic and Elliptic Curves, and then move on to their representation with the programming language Python. Elliptic Curves are a class of mathematical curves with a very peculiar property: any non-vertical line that intersects an Elliptic Curve in one point, also has two other intersection