LinkedInTwitterFacebook

Bash: Changing extension to multiple files

To change file extension from *.txt file to *.text file use this command into your shell:

Share

JavaScript – geolocation.

This is a simple java script to take the geolocation and show it on webpage.
The example start with a default HTML 5 page and the part from tags scripts get the geolocation and using innerHTML is show on webpage.
To see the location then is need to use this: navigator.geolocation.getCurrentPosition.

Share

Useful commands for linux – part 001.

Today I will come with some useful commands for your linux. Some commands need to be install into your linux, like ImageMagick.
With ImageMagick software you can generate an animated GIF:

This command of ImageMagick will resize to 50% all your png files from your folder:

Use this command to put top command output into log file and read the firefox process with a number of rows after that:

See the first files eating out your space:

Store the output into value of command who:

Store the output of command file into value and then show the result:

Share

Assembly language x64: The System V ABI – part 001.

The System V Application Binary Interface named ABI defines a system interface for compiled application programs.
This System V Application Binary Interface is a set of specifications that detail calling conventions, object file formats, executable file formats, dynamic linking semantics, and much more.
The ABI defines a binary interface for application programs that are compiled for System V implementations on many different hardware architectures.
Also the System V ABI is a family of specifications composed of two basic parts:
– a generic part of the specification ( describes those parts of the interface that remain constant across all hardware implementations of System V;
– a processor-specific part ( the specification describes the parts of the specification that are specific to a particular processor architecture ).
Example:
Virtual addresses and file offsets for the 64-bit PowerPC processor family segments are congruent modulo 64
Kbytes (0x10000) or larger powers of 2. Although 4096 bytes is currently the 64-bit PowerPC page size, this
allows files to be suitable for paging even if implementations appear with larger page sizes. The value of the
p_align member of each program header in a shared object file must be 0x10000.
You need to put segments with different characteristics in separate 256 Mbyte portions of the address space, to give the operating system full paging flexibility in the 64-bit address space.
One example of an executable file (the program linked with a base address of 0x10000000):

The possible corresponding program header segments:

The memory image of virtual adress for the program above is shown here, assuming 4096 (0x1000) byte pages.

Documents about: System V ABI
TODO:Ensure whether these are the latest official links.

Share

Peles C the IDE for C programming language.

Pelles C is “a complete development kit for Windows and Pocket PC” centered around an optimizing C compiler based on lcc (not lcc-win32/64). Both Win32 and Win64 versions are available and are being actively maintained.
Pelles C IDE, Compiler, Linker, Librarys, Helpfiles, Examples, Registryeditor for 64-bit Windows
Support for 32- and 64-bit projects
Languages: English, Swedish, German, French, Greek
This version of Pelles C supports Windows Vista/7/8.
Please uninstall any older version of Pelles C before installing.
You can use by add SDK with examples and help, 32 and 64-bit.

You can get this IDE from here.
I don’t come with one tutorial because this IDE come with examples and is easy to build source code.

Share