error: ‘__stdcall’ was not declared in this scope.

We can solve this error with this:

After the error your code source have this:

Replace that with:

Posted in Errors. Tagged with .

Working with Web Storage – part 1.

What is Web Storage?

Web Storage is a specification that was a part of HTML5 and it also named DOM Storage.

The developers usually only store user and/or session identifiers in cookies, and then use databases to use the rest of the user data.

The limitations of cookies are:

– our search and browsing history can be tracked and our privacy is a concern.

– they have data capacity limitations.

– the limit of cookies in web browsers is about 4 KB per cookie.

There are two types of Web Storage objects: sessionStorage and localStorage.

sessionStorage – our data is accessible to any page from the same site opened in that window.

localStorage – our data spans multiple windows and lasts beyond the current session.

Where Web Storage is used?

You can storing the data for an online to-do stuff.

Also images can be stored in strings using Base64 encoding.

The output is show in the next image.

web storage

With Google Chrome Browser, you can use three types of storage: Temporary, Persistent, Unlimited.

But, this HTML5 simple feature which is implemented in all the modern browsers local storage.

Using Web Storage is really not more secure than cookies.

Thank you.

Posted in Programming. Tagged with .

How to converts packages.

On the official site we find that:

Alien is a program that converts between the rpm, dpkg, stampede slp, and slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it.

The official website is here.

This tool help us to convert packages using this:

We can download this tool, using git utility

We can use the following commands to install it.

Let’s convert one deb package to rpm.

Posted in Commands, Linux. Tagged with , .

How to defragment NTFS partitions using Linux

If you defragment your Windows or store your files in NTFS partitions, you can defragment the NTFS partitions using Linux OS.

You must run disk management commands as the root user by using root account.

… and give your root password when prompted.

In this case the hda is your NTFS partition.

Also can be hdb, sda or something else.

Posted in Commands, Linux. Tagged with , .

Linux , C and GTK

The best way to start learning a programming language is by writing a program.

How edit and compile the program ?

That depends on the compiler you are using.

First of all you should write a simple program using C language.

This is a simple program:

Now about the compilers:

gcc is the “GNU” C Compiler

g++ is the “GNU C++ compiler

cc is the “Sun” C Compiler

CC is the “Sun” C++ compiler

I will use gcc because is a C program.

When it contains Xlib graphics routines the command is :

( see -l = link and X11 is Xlib).

What is pkg-config ?

This is a helper tool .

It helps you insert the correct compiler options on the command line.

Your application can use something like this :

How it works ?

When a library is installed a .pc file should be included.

This file tells us that libraries can be found in /usr/local/lib and headers in /usr/local/include.

But first of all you must install the libs .

On my example i need this gtk2-devel.i686, so i use :

And i compile with this :

And result is:

gtk tutorial

Posted in Linux, Programming. Tagged with , .