Objective-C - Design pattern - Model-View-Controller - MVC

The MVC pattern is certainly the most famous one.
It allows to dispatch the work in 3 concepts: The Model, the View and the Controller.
This concept exists in all programming languages.
So it's easy, when you understood it, to apply your knowledge with all others languages.

C - General Programming - Return value of a if statement without any condition

To test a condition in a if statement without any condition, the result has to be other than 0 to test a true condition.

Let's see an example of a if statement without any condition:

UNIX & GNU/Linux - User commands - Using wc

The user command wc is a GNU/Linux tool written by Paul Rubin and David MacKenzie.

It helps us to display the number of lines, words and bytes counted in one or several files.

Let's see an example of the user command wc by executing this command in our favourite terminal:

C - Bitwise operation - Bit shift in decimal

Let's try to transform a binary into a decimal with a simple loop.

Let's see this example of a bit shit into a decimal display:

C - Character manipulation - Displaying a char

Today I will show you how to transform a decimal number, an hexadecimal number and a binary number into the same character.

And you will see that this transformation is made by the terminal, the shell and Linux (or UNIX ;).

Let's see an example, with 3 files and after with printf():

UNIX & GNU/Linux - User commands - Using grep

Maybe you sometimes asked yourself how to find a part of a code inside all your files.
But how to find this part of code?
We can use the grep user command to display this part of a code.

We can moreover display this code in color.

Let's see an example of the grep user command.

Assembly - GNU/Linux - Hello World!

In this tutorial, we are going to see how to create an executable from an assembly file.

The following example uses a 32-bit version of Ubuntu.
Notice that the version is important when you compiling your assembly file.
It is the same for the linkage operation.

Let's see it in detail.

UNIX & GNU/Linux - User commands - Using fs

To set ACL correctly, you can use the fs user command.

Let's take an example to set the ACL:

UNIX & GNU/Linux - System calls - Using execve()

The execve() system call function is used to execute a binary executable or a script.
The function returns nothing on success and -1 on error.

Assembly - objdump - -p command

To see the header of a binary, in our example "ls", we have to use the -p command of the objdump tool.

Let's try it:

$ objdump -p /bin/ls



Subscribe to BadproG.com RSS