Simple script to restart services automatically when stopped in Fedora/Redhat

fedora_logoWhen occasionally the services like Apache or MySQL or other rc.d script crashes and stops working, then instead of restarting them manually, it may be more desirable to restart them automatically. A friend of mine asked about such an issue and here is the quick fix bash script fix.

Continue reading “Simple script to restart services automatically when stopped in Fedora/Redhat”

Running Skype for Fedora x86 in Fedora x86_64

fedora_logoAfter I installed Fedora 16 x86_64, i needed to install manually Skype for linux, which is available from This link, as it is not in Fedora repositories. After clicking the Skype icon from the kickstart menu, the Skype icon kept bouncing. Skype for linux is not available for 64 bit fedora (till now), and therefore requires 32 bit libraries to run. Problems …

Continue reading “Running Skype for Fedora x86 in Fedora x86_64”

Installing the applications from older version in a new fresh installation of fedora

fedora_logoI was using Fedora 15 32 bit for a long time but i felt the need to install a 64 bit edition for some memory limitations in the system. Therefore I downloaded the Fedora 16 x86_64 iso file from https://fedoraproject.org/ . The main concern was to install the new system with minimum mess and reconfiguration. I have separate root and /home partitions so there is no problem in the home directory restoration.

The main problem was to install the packages which i had manually installed with yum after i installed the distro. This is a common problem when upgrading to another distro, and it is worse in Microsoft Windows, as all the applications needs to be downloaded from the corresponding third party sites, and to restore either you need to surf through those sites, or keep the installations in your disk.
Checkout more

Accessing private data members directly outside from its class in C++

Private members in C++ cannot be accessed from outside the class directly. In this post I will tell an interesting fact, that in C++ however there are means with which you can access/modify the values of the private members of a class from outside of the class, when the structure of the class is known.

Continue reading “Accessing private data members directly outside from its class in C++”

Bash Script: Reading ID3v1 Tags

mp3 files contain track name, artist name, etc meta data about the music file itself. The meta data format used in mp3 files are called the ID3 tags. There are different versions of ID3 tags available. The objective is to read this meta data information from an mp3 file having an ID3v1 tag.

A detailed overview of the ID3v1 (as well as ID3v2 tags) are done here in this post: What are ID3 Tags all about?. A small ID3v1 library is also implemented (reading and writing tags) in C language here: An ID3v1 Tag Parsing Library. TagLib is available to read and write ID3v1 and ID3v2 tags and is free to use.
Continue reading “Bash Script: Reading ID3v1 Tags”

Reviewing the GNUSim8085 (v1.3.7)

This article reviews the GNUSim8085 (v1.3.7) a graphical simulator, assembler and debugger for the Intel 8085 microprocessor.

The Intel 8085 is an 8-bit microprocessor that was launched by Intel in 1977 and hence is something that we have never seen around. So why do we need to learn about the programming model and instruction set of this old microprocessor? The microprocessors we use are all for general-purpose computing but there are other applications of computers such as making automatic solar tracking-panels, automatic power-controls, or security control systems. For such applications, general-purpose CPUs are unnecessary-a waste of resources; a low powered CPU is what we need. The Intel 8085 is one of the candidates. To program this piece of hardware, we first need to know the programming model-the logical structure of the programmable registers, flags, and the instruction set.

Continue reading “Reviewing the GNUSim8085 (v1.3.7)”

Input Strings with Blankspaces

In CLI programs getting input from the standard input is very important. Often we need to input strings from the user. Strings are delimited by newline, blankspace character and other characters as per the user interpretation. I am discussing on some ways here with which we can take input strings with blankspaces in it safely.
Continue reading “Input Strings with Blankspaces”

Configure Samsung ML-1666 in Fedora

fedora_logoI recently had a problem with my Samsung ML-1666 Monochrome laser printer: I could not configure it in Fedora. Simply downloading the driver from Samsung website and installing seemed easy, but actually did nothing.

Googling for hours did not solve the problem, but I kept trying and finally got it working. So I thought I should write down what I did, it may help you.

Continue reading “Configure Samsung ML-1666 in Fedora”

Allocating multidimentional array at runtime in C

Arrays in C language are static in nature, and cannot be resized at runtime. The effect of runtime allocation of an array could be achieved by hierarchically allocating blocks of memory at runtime. Below we discuss the mechanism to allocate multidimensional arrays.
Continue reading “Allocating multidimentional array at runtime in C”