Posts

Star trail pictures are created by merging multiple images together into one image.
The principle behind creating star trail pictures is very simple, but can also be very complex. We are not getting into the complex one in this post, which makes guesses and predictions to feel the gaps between stars, to keep the background static, etc...
In this post we're taking a look at the simplest way of creating star trails, which is by keeping the most intensive pixel colors from a list of images.
Each pixel has a RGB value, which can range from black (0,0,0) to white (255,255,255). The first column is for red, the second column is for green and the last one is for blue, and hence the RGB acronym.
The intensity of a pixel color can be calculated with the following formula: (R+G+B)/3.
But there are some other formulas for calculating the brightness of a pixel, which also work for creating star trails:HSL Lightness: 0.5*max(R,G,B)+0.5*min(R,G,B)Relative luminance: 0.2126*R+0.7152*G+0.0722*BLu…

In this post we're going to take a look at code analysis. It's an old problem and a very hard one. The task is to determine the code quality and how good was the programmer that wrote that code (his knowledge about the language features).

One solution would be to try to simplify the code so much that it will look like it was written by a newbie. For example, if there are special quotes which enclose the strings, simplify them to just one type of quotes, or put/remove parentheses even where they are unnecessary, transform hexadecimal and binary literals into decimal numbers, etc...

We're going to implement such a program in Perl which will analyze other Perl programs, but we're going to cheat here. Perl already has a deparser which simplifies the things for us. All we need, is a clever solution to compare those transformations. But we want this solution to be fast and reliable.

Here is the main picture of the algorithm:Read codeDeparse codeTokenize the original and depa…

Popular posts from this blog

# GTK YouTube Viewer
This application came to life in 12 September 2010 as my first GTK2/Glade learning project.

Its scope is to search and play YouTube videos in a native player. It comes with various search options; it can search for videos, playlists and/or channels. The videos are streamed directly in a selected video player at the best resolution (customizable) and with closed-captions (if available).

By default, the application comes with support for three video players: MPV (recommended), MPlayer and VLC, and it allows the addition of more players inside the configuration file.

For a better experience, the application also comes with built-in authentication support, using the OAuth 2.0 mechanism. After inserting the authentication token, a new tab will appear, named "My panel", which has the following buttons:SubscriptionsFavorited videosLiked videosDisliked videosUploadsLog outFor more details (+screenshots), see also:http://www.webupd8.org/2015/02/youtube-viewer-comp…

obmenu-generator is a simple, lightweight, easily configurable Perl script that generates a full Openbox XML-menu based upon the information present in *.desktop application files (related to fbmenugen and menutray).

It has full support for icons (respecting the current icon theme) and can generate either a static or a dynamic menu.

In a dynamic menu, the entries are updated automatically when a new application is installed or when the current icon theme is changed by the user.

Starting with version 0.61, obmenu-generator introduced a new smart-cache system which will store all the required data from the *.destkop files in a new cache.db file, which is also updated automatically when a new application is (re)installed or when the config.pl or schema.pl are changed. With the new cache-system in place, a full menu with icons is generated in ~8ms (compared to ~60ms before).

alsi is a system information tool, designed for Arch Linux, related to archey and screenfetch, but more configurable.

All the configuration files are in: ~/.config/alsi

For example, to configure it for Gentoo, get the gentoo logo and put it in alsi.logo file, change something in alsi.output and alsi.conf files (if necessary) and then execute: alsi -f -l -c1=blue -c2=purple

It generates a valid Fluxbox menu file with the applications from the /usr/share/applications directory, ordered on categories. It also provides a configuration file that allows the user to customize the menu.

Prime factorization of composite integers has many applications in number theory, especially in computing some important arithmetic functions for large inputs.

One such function is the Euler's totient function `φ(n)`, which it's practically impossible to compute for very large composite values of `n`, if the prime factorization of `n` is not known.

This led to the creation of public-key cryptography systems (such as the RSA algorithm), which are systems responsible for secure communication online and rely on the assumption that it's very hard to factorize a large integer `n` that is the product of two large random prime numbers.

The publication of the RSA algorithm led to an increasing interest in factoring large integers, which also resulted in the creation of several new factorization algorithms, none of which, however, is able to efficiently factorize an RSA modulo of more than `1024` bits.

A very simple command line tool which displays a status bar with the used space for each partition.
It uses the `df` command to get the information needed and automatically adjusts itself to the terminal width.

The Fibonacci sequence is, without doubt, one of the most popular sequences in mathematics and in popular culture, named after Italian mathematician Leonardo of Pisa (also known as Fibonacci, Leonardo Bonacci, Leonardo of Pisa, Leonardo Pisano Bigollo, or Leonardo Fibonacci), who first introduced the numbers in Western European with his book Liber Abaci, in 1202.