Google Ads

Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

January 31, 2019

Create a stylish button in GTK+ (Custom widget creation)

Often times we want to create our own form of buttons and widgets when using widget libraries such as GTK+. Although, we could achieve this by creating theme files but sometimes it is just easier to implement such widget using drawing routines available. In this tutorial, I am going to show you how to create a stylish button in GTK+ by not using widget provided button but by using drawing routines available for GTK+ library like shown below:




First, we create four png images for the button for hover, normal, pressed states and mask. We are going to use Cairo library for drawing our button state images into its container. All the functions required for creating this button are part of Standard GTK+ 2 package, so no external dependencies! for the button creation.

Second, we load button png images using cairo_image_surface_create_from_png function.

Third, we prepare a mask for the button as the button can have any shape where some parts of the button are transparent. We create a pixmap as button mask using gdk_pixmap_new function and format the mask according to mask png file using Cairo drawing functions. Our style button contain would be a GTK+ drawing widget. Finally, we set the mask using gtk_widget_shape_combine_mask function.

Fourth, we have to be able to update the button look according to its state which is achieved by connecting different signals to button container and updating button state variable in the signals callback functions and finally drawing the button images using Cairo functions. The callbacks functions can also be used for achieving normal button operations.

That's it!

Watch the tutorial:




February 20, 2018

Use Python objects to process and store csv file data

In Python data from csv files can be easily loaded and processed for analysis or automating other jobs. In this tutorial, we will see how data from a csv file can be stored easily in Python objects and spit out the processed data from an object as necessary. For this exercise, we assume we have a csv file containing temperature data for 28 days where the first column contains days records and the second column contains temperatures records. First we will load the csv file's temperatures data into an object and then show the data and temperature average from the object. After that, we find and store the differences in days temperature from the object to another object. Finally, we save the differences in days temperature data from the object to a csv file. A sample of the csv file contents is shown below:

1 27
2 25
3 23
4 30
5 19
6 20
7 13
8 30

Now, in Python first we will have to create an object for holding these data from the csv file. For this, in the Python object we need to have two lists, one for days records and the other one for temperatures records. Now, we define the Python object as below:

# define object for holding a set of temperature data
class TempData():
    def __init__(self):
        self.day = [] # list of days
        self.temp = [] # list of temperature

Now, we create two object instance variables of this type where one will hold temperatures data as in the csv file and the other one will hold temperature differences data.

csv_imported_data = TempData() # create object for holding csv file temperature data
processed_data = TempData() # create object for holding processed data

Now, we can open the csv file and load the csv columns data into the object lists for days and temperatures data.

csv_file = open('data.csv', 'r') # open the csv file for reading
reader = csv.reader(csv_file) # pass the file to csv reader object for extracting data

for row in reader: # get the row data from the csv file
    csv_imported_data.day.append(float(row[0])) # get the first column data
    csv_imported_data.temp.append(float(row[1])) # get the second column data

csv_file.close() # close the csv file

Now, lets show the temperature data from the object:

# print temperature data from the temperature object
for i in range(len(csv_imported_data.day)):
    print(csv_imported_data.day[i], csv_imported_data.temp[i])

Now, lets show the average temperature from the object's temperature data:

# show average temperature from the temperature object
print('Average temperature for', len(csv_imported_data.day), 'days was', sum(csv_imported_data.temp)/len(csv_imported_data.temp))

Now, lets find the temperature difference from the object's temperature data and store difference data into another object of same type:

# find difference between temperatures and store in temperature data object
for i in range(len(csv_imported_data.day)):
    if (i == 0): # no difference for first data
        processed_data.day.append(csv_imported_data.day[i])
        processed_data.temp.append(0)
    else:
        processed_data.day.append(abs(csv_imported_data.day[i] - csv_imported_data.day[i-1]))
        processed_data.temp.append(abs(csv_imported_data.temp[i] - csv_imported_data.temp[i-1]))

Now, we show the temperature difference data from the object:

# print temperature difference data from the temperature object
for i in range(len(processed_data.day)):
    print(processed_data.day[i], processed_data.temp[i])

Finally, we save the temperature difference data from the object to a new csv file so that we can retrieve the temperature difference data without running the Python script again:

csv_file = open('processed_temp_data.csv', 'w', newline='') # create a new csv file for writing
csv_writer = csv.writer(csv_file) # pass the file to csv writer object for writing data

for row in zip(processed_data.day, processed_data.temp): # create the row data from the the temperature object
    csv_writer.writerow(row)

csv_file.close()

Download the full example code and CSV files:


Cheers!
Imam

December 3, 2017

Yet another HTML cache busting technique

If you are coding your web application or web site from the ground up then you may be already facing problems where changing individual files does not get reflected immediately. This is due to browsers caching some of the files to speed up loading performance and also to save bandwidths. The process of avoiding caching in the browsers is called cache busting.  There are already a ton of solutions out there which can be applied to your HTML code to avoid caching where some are tedious to maintain and others are a breeze. Although not very well known technique here I am presenting how to use hashing technique to do HTML cache busting. This technique can be well applied to both client side or server side scripting languages as well as using any cryptographic hash functions. The method I have selected for my web development is client side PHP scripting language and SHA-1 hash function. Using this method the following HTML code shows how to import external CSS file with cache busting feature:

<link rel="stylesheet" <?php echo "href=\"style1.css?v=" . sha1_file('style1.css') . "\"" ?>>

In the above code, PHP script will inject HREF attribute into the link tag. The ?v=" . sha1_file('style1.css') code fragment will change each time the CSS file is modified as well as add a argument to the CSS file name which will force browsers to load the CSS file. As the SHA-1 hash function is unique each time for a particular CSS file data set the above code works well as intended.

The following code snippet shows that the same technique can be applied to import JavaScript files with cache busting feature:

<script <?php echo "src=\"load.js?v=" . sha1_file('load.js') . "\"" ?>></script>

Cheers!,
Imam

May 30, 2017

Assigning Binary Value to a Variable in C and C++

If you are programming in C and C++ then you may already know that C and C++ do not have native support for binary literal. So you can not simply write the following statement to give a variable a binary value:

int signal = 1110;

However, C and C++'s bitwise operators such as Left Shift operator << and Or operator | can be easily utilised to achieve binary value assignment like shown below:

int signal = 1 << 3 | 1 << 2 | 1 << 1;


The above statement assigns binary value 1110 to the variable signal. The way it works is the very first expression 1 << 3 creates a binary value 1000, and then the expression 1 << 2 creates a binary value 100 and finally the expression 1 << 1 creates a binary value 10. When all these three binary values are combined using the Or operators we get the binary value 1110 like shown below:

Expression            Binary equivalent
1 << 3            =     1000
1 << 2            =     0100
1 << 1            =     0010
                              1110 (after or operations of three expressions)

One advantage about this method of binary assignment is that there is no need for external libraries and such. The example program demonstrating the above method can be downloaded from the following link:

binary_assignment.c

There is also a convenience functions library called imamB which I wrote recently which can be used for getting binary values of variables as a string and vice versa. To use the functions from imamB all you need to do is to include header and source files from imamB package to your project directory. imamB can be download from the following link:

imamB-1.0.zip

Cheers!
Imam

March 19, 2017

Windows Install and use Python without admin rights

Sometimes it is useful to install Python in a preferred directory other than to a default Windows partition directory. The main reasons for doing this are given below:
  1. Have multiple Python versions and run them as per requirements (use Python versions 2.7 and 3 simultaneously on the same system)
  2. Have Python Interpreter on a portable disk (Python on the go)
  3. Tryout experimental and latest Python versions and Python packages/libraries (leave the default system Python Interpreter unaltered)
Installing Python without admin rights:

Step 1: Download Python installer(msi file) from official website https://www.python.org/


Step 2: Open up Windows Command Prompt where msi file is downloaded and execute the following command,

msiexec /a python-2.7.10.msi /qb TARGETDIR=G:\Python27

Here, TARGETDIR specifies the target folder where Python will be installed.

Once setup is finished you should be able to find python.exe (Python Interpreter) and IDLE (Python Integrated Development Environment) in the G:\python27 and G:\Python27\Lib\idlelib folders respectively.

Step 3: Install pip Python utility script for installing Python packages/libraries by downloading get-pip.py file and executing the following command from the G:\Python27 folder,

python.exe get-pip.py

Step 4: Install Python packages/libraries using pip by executing the following commands from G:\Python,

python.exe -m pip install numpy

Here, numpy is Python package/library name which will be download and installed to Python Interpreter directory by the pip utility. If a package/library is not available in the standard Python pip repository then you can download pip install-able (whl files) Python packages/libraries from pythonlibs and install them by executing following command from G:\Python27, assuming whl files are placed in the same folder,

python.exe -m pip install numpy‑1.11.3+mkl‑cp27‑cp27m‑win32.whl

Cheers!

October 5, 2015

Using OpenCV in GTK+ applications

Although OpenCV comes with it's own windowing system for displaying any OpenCV images, for fully functional applications with user interface elements such as buttons, menus, and radio buttons, maybe you would find it useful to use widget libraries such as GTK+ or QT. Drawing OpenCV image surfaces in GTK+ applications is not much of a difficult task than adding a couple of extra lines in your existing GTK+ applications. And again there are plenty of ways to accomplish the same results, but here I will show how I have achieved it. The sample program here is written using GTK+ C++ binding GTKmm, but the technique and functions should be same across all the GTK+ bindings.

As usual we create a GTK+ top level window by creating a MainWindow object. MainWindow, which is itself a GtkWindow widget contains one GtkFrame and one GtkDrawingArea widgets. The class definition of MainWindow is shown below:


class MainWindow : public Gtk::Window
{
    protected:
        Gtk::Frame video_frame;
        VideoArea video_area;
       
    public:
        MainWindow ();
        virtual ~MainWindow();
};


In the above code, VideoArea is the GtkDrawingArea widget object defined as follows:


class VideoArea : public Gtk::DrawingArea
{
    protected:
        cv::VideoCapture cv_cap;
        bool cv_opened;
        virtual bool on_draw (const Cairo::RefPtr<Cairo::Context> &cr);
        bool on_timeout ();
    public:
        VideoArea ();
        virtual ~VideoArea();  
};


We are going to use GtkDrawingArea widget for the purpose of displaying OpenCV image surface. To do that, we have to put OpenCV related functions in the GtkDrawingArea on_draw function. This on_draw function will be called every time draw signal is emitted from GtkDrawingArea widget. As can be seen from the VideoArea object definition, we also have a timer function on_timeout to call on_draw function in a regular manner by invalidating GtkDrawingArea widget. So when a VideoArea object is created in the MainWindow object OpenCV is initialized like shown in the code below:


VideoArea::VideoArea() : cv_opened(false)
{
    cv_cap.open(0);
   
    if (cv_cap.isOpened() == true) {
        cv_opened = true;
        Glib::signal_timeout().connect(sigc::mem_fun(*this, &VideoArea::on_timeout), 50);
    }
   
}


Here, we connect a glib timeout signal, which will call on_timeout function every 50 milliseconds interval. The functions for on_timeout and on_draw are shown below:


bool VideoArea::on_timeout()
{
    Glib::RefPtr<Gdk::Window> win = get_window();
    if (win)
    {
        Gdk::Rectangle r(0, 0, get_allocation().get_width(), get_allocation().get_height());
        win->invalidate_rect(r, false);
    }
    return true;
}

bool VideoArea::on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
{
    if (!cv_opened) return false;
   
    cv::Mat cv_frame, cv_frame1;

    cv_cap.read(cv_frame);
   
    if (cv_frame.empty()) return false;
   
    cv::cvtColor (cv_frame, cv_frame1, CV_BGR2RGB);
       
    Gdk::Cairo::set_source_pixbuf (cr, Gdk::Pixbuf::create_from_data(cv_frame1.data, Gdk::COLORSPACE_RGB, false, 8, cv_frame1.cols, cv_frame1.rows, cv_frame1.step));
   
    cr->paint();
       
    return true;
}


In the on_draw function, we convert OpenCV surface to RGB channel by using cvtColor, since GTK widgets uses RGB format. Finally, we use Gdk::Pixbuf::create_from_data to fill Cairo surface with OpenCV surface pixel buffers.


Download the complete program source code and test it by yourself!


gtkcv.zip


To compile the files in gtkcv.zip, you need to have OpenCV and gtkmm development files installed on your operating system. On Ubuntu just follow the instructions below:


Installing OpenCV:


Downloading OpenCV and creating compile directory,


From http://opencv.org/ 
grab opencv-3.0.0 and extract the opencv-3.0 archive file. Then, create a folder named build inside the opencv-3.0.0 folder. Then, open a terminal into the build folder. Then, in the terminal put the following commands:


# setup compile environment for OpenCV

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr -D WITH_OPENMP=ON -D WITH_CUDA=OFF .. 

# compile sources in 4 threads

make -j 4 

# install OpenCV


sudo make install


Installing gtkmm:



sudo apt-get install libgtkmm-3.0-dev

that's it!, now extract the gtkcv.zip file and open a terminal in the gtkcv folder and execute the following command:

g++ -o gtkcv main.cpp MainWindow.cpp VideoArea.cpp `pkg-config --cflags --libs gtkmm-3.0 opencv`

this will produce gtkcv executable file.

July 11, 2015

imamLL linked list library store struct elements

As imamLL (imamLL-1.3.tar.gz) is very versatile in storing any type of data into a list, you can store an struct as an element like shown in the following code example:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "imamll.h"

struct Person {
    char name[24];
    double age;
    double weight;
    double height;
};

struct imamLL *People_list = NULL;          /* Pointer to hold list */
struct imamLL_element *person = NULL;       /* Pointer to hold individual element */
unsigned long c;

int main (int argc, char* argv[])
{
    printf ("Allocating memory for list\n");
   
    People_list = imamLL_list_create();

    if (People_list == NULL) {
        printf ("Can not create the list\n");
        exit (1);
    }
   
    if ((person = imamLL_element_add (People_list, sizeof(struct Person), AT_END)) == NULL) {
        printf ("Can not add element");
        printf ("Freed list, returned %d\n", imamLL_list_destroy (People_list));
        exit (1);
    }
    strcpy (((struct Person *)person->data)->name, "Md Imam Hossain");
    ((struct Person *)person->data)->age = 27.0;
    ((struct Person *)person->data)->height = 180.0;
    ((struct Person *)person->data)->weight = 67.0;

    printf ("Allocated: %lu Bytes\n", People_list->size);
   
    if ((person = imamLL_element_add (People_list, sizeof(struct Person), AT_END)) == NULL) {
        printf ("Can not add element");
        printf ("Freed list, returned %d\n", imamLL_list_destroy (People_list));
        exit (1);
    }
    strcpy (((struct Person *)person->data)->name, "Md Salim Hossain");
    ((struct Person *)person->data)->age = 22.0;
    ((struct Person *)person->data)->height = 182.0;
    ((struct Person *)person->data)->weight = 75.0;

    printf ("Allocated: %lu Bytes\n", People_list->size);
   
    while (1) {
        person = imamLL_element_get_next (People_list);
        if (person == NULL) break;
        printf ("*Person*\n");
        printf ("Name: %s\n", ((struct Person *)person->data)->name);
        printf ("Age: %lf\n", ((struct Person *)person->data)->age);
        printf ("Height: %lf\n", ((struct Person *)person->data)->height);
        printf ("Weight: %lf\n", ((struct Person *)person->data)->weight);
    }
   
    printf ("Freed: %d elements\n", imamLL_list_free (People_list));
    printf ("Freed list, returned %d\n", imamLL_list_destroy (People_list));
   
    return (EXIT_SUCCESS);
}


July 5, 2015

imamLL a simple C linked list library

C programming language does not have a linked list implementation like other programming languages such as java. Since C program gives more control to it's users, it is up to users how they implement their own linked list for their programs. imamLL is a linked list implementation library for C designed to be efficient and flexible. Some of the features of imamLL library are
  • Dynamically allocate data at any given point in the program runtime 
  • Add elements of arbitrary sizes into the lists 
  • Navigate through the elements in both forward and backward 
  • Add, remove, modify and get elements from the lists
In this tutorial, we are going to build a simple program using imamLL library.

First, we download imamLL library from the following link:


imamLL-1.3.tar.gz


After extracting the file we run ./build.sh in the terminal to install the library into the system.

Now, we create a blank text file and name it num_list.c

The content of the file is shown below:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <imamll.h>        /*header for imamLL */

struct imamLL *num_list = NULL;
struct imamLL_element *element = NULL;

int main (int argc, char** argv)
{
    num_list = imamLL_list_create();
   
    if ( num_list == NULL) {
        printf ("Can not create the list\n");
        exit (EXIT_FAILURE);
    }
   
    element = imamLL_element_add (num_list, sizeof (int), 0);

    if (element == NULL) printf ("Error allocating memory for an integer element\n");
    else *((int *)element->data) = 10;
   
    element = imamLL_element_add (num_list, sizeof (int), 0);

    if (element == NULL) printf ("Error allocating memory for an integer element\n");
    else *((int *)element->data) = 20;

    element = imamLL_element_add (num_list, sizeof (int), 0);

    if (element == NULL) printf ("Error allocating memory for an integer element\n");
    else *((int *)element->data) = 30;
   
    imamLL_list_rewind (num_list);

    while ((element = imamLL_element_get_next(num_list)) != NULL) {
        printf ("%d\n", *((int *)element->data));
    }
   
    imamLL_list_destroy (num_list);

    return 0;
}


Now to compile the num_list.c, in the terminal:

gcc -Wall -o num_list num_list.c -limamll

The program above program can be easily understood by reading the Intro.html file found in the imamLL directory. There are also few more example programs located in the examples directory of imamLL.

June 29, 2015

Linux C/C++ fork () Example

If you ever wanted to do multiple tasks at the same time in your C/C++ program then Linux fork () system call function is for you. When your C/C++ compiled binary program begins execution, it creates a main process in which all the program instructions are executed. In Linux every program you run will create one or more processes. Inside each process the program instructions will be executed sequentially. Which means inside one process without completing one task the program will not be able to do another task and that is where fork () function comes in handy. The fork () function will let you create a new process which is a exact copy of the main process but completely independent and run alongside the main process. For example, if you are copying a file in the main process then the new process created by fork () can be used to update the user interface for the copy operation. 

Things to remember about processes are:

  • Processes are one of the building blocks for multitasking in Linux
  • Each process has it's own unique id provided by the Linux kernel by which the process can be tracked for different purposes
  • Processes can run independently to each other, therefore closing or terminating one process does not effect the other processes
  • Any process will have their own memory space, therefore variables from stack and heap from one process are not accessible by other processes
Now, lets build a simple C program to see how fork () can be utilized

In the program we call the main process as parent process    , and the new process created from inside main process as child process. This naming convention for processes is very typical, since one process can create another new process by using fork().

We build a simple program where, parent process counts to 10 while at the same time child process counts to 20. After finishing counting the parent process waits for the child process to end.

Code:


#include <stdio.h>
#include <stdlib.h>

#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

int main (int argc, char *argv[])
{
    pid_t child_id;
   
    child_id = fork ();
   
    if (child_id == -1) {
        printf ("Creating new process by fork() failed!\n");
        return 1;
    }
    else if (child_id == 0) {
        /* code block for child process */
        int count;
        for (count = 1; count < 10; count++) {
            printf ("Child counting: %d\n", count);
            sleep (1);
        }
        _exit (0);
    }
    else {
        /* code block for parent process */
        int child_exit_status;
        int count;
        printf ("Child process id: %d\n", child_id);
        for (count = 1; count < 5; count++) {
            printf ("Parent counting: %d\n", count);
            sleep (1);
        }
        printf ("Waiting for child to end\n");
        wait (&child_exit_status);
        printf ("Child exited with %d\n", child_exit_status);
    }

    return EXIT_SUCCESS;
}
The above code should print the following output in the terminal:


Child process id: 7225
Child counting: 1
Parent counting: 1
Parent counting: 2
Child counting: 2
Child counting: 3
Parent counting: 3
Child counting: 4
Parent counting: 4
Child counting: 5
Waiting for child to end
Child counting: 6
Child counting: 7
Child counting: 8
Child counting: 9
Child exited with 0


Now, let's go through the most important elements in the code:

We need to include unistd.h for the fork function. The other two header files types.h and wait.h are required by the wait () function. First, we create a variable of type pid_t for storing child process id which will be returned by the fork () function. The fork function returns -1 if the function can not create a new process and if successful fork() returns 0 to the child process and the process id of created process (child) to the parent process (main process). Therefore, inside the child process the value for child_id would be 0 and it would be child process id inside parent (main) process. Inside the child process block the _exit function is used to terminate the child process. The sleep function inside the for loop blocks will suspend the respective execution for specified amount of seconds given in the parameters, in our case it is one second. And finally the wait function will suspend the parent (main) process until state of one of the child processes changes, in our case when the child process exits. And finally, the exit status of the child process is retrieved by using the wait function which is stored in the child_exit_status variable.

Hopefully, this tutorial helped you learn basic about processes.
 

Download the fork() example source file and test it by yourself:

fork.c

April 22, 2015

Setup Objective-C programming environment on Ubuntu Distributions

Objective-C is a programming language which expands C programming language by including Smalltalk object orientated programming language. It has robustness like C programming language as well as it is feature rich like C++ and Java. It fully supports object oriented programming including Encapsulation, Data hiding, Inheritance and Polymorphism. It is the main programming language for OS X and iOS application development.

GNU Compiler Collection (GCC) provides compiling support for Objective-C source files through GNUstep framework. It is very easy to setup Objective-C development environment on Ubuntu based distributions. We just have to install few packages on to our Ubuntu System.


From your favourite package manager just install the following packages:


gobjc

gnustep
gnustep-make
gnustep-common
gnustep-core-devel
gnustep-devel

Or in the terminal put the following command:


sudo apt-get install gobjc gnustep gnustep-make gnustep-common gnustep-core-devel gnustep-devel


Once all the packages are installed properly, you should be able to compile any Objective-C source file by entering the following command in the terminal:


gcc source.m `gnustep-config --objc-flags` -lobjc -lgnustep-base


This should produce a.out binary in the current directory.


For Example, put the following codes into a text editor and save it as Hello.m


#import <Foundation/Foundation.h>

int main(int argc, char *argv[])

{
    NSLog(@"Hello, World!\n");
   
   return 0;
}

Now, compile the source file Hello.m using following command in the terminal:


gcc Hello.m `gnustep-config --objc-flags` -lobjc -lgnustep-base


Now, run the executable file by putting following command in the terminal:


./a.out


You should see something like below in the terminal,


2015-04-22 19:24:26.483 a.out[31686] Hello, World!


April 12, 2015

Do Programming on Ubuntu/Kubuntu Linux

Programming on Linux
 
Linux in general is great development platform where the operating system's kernel itself is free and Open Source. So there is virtually no limit of what you want to do with your Linux computer. Kubuntu, Ubuntu and Gnome Ubuntu are all great Linux Desktop distributions with bleeding edge desktops and touch pad user interfaces. You pick your Linux distribution flavor and start working on your projects in no time. All Ubuntu variant distributions have common package names for development and application support.

Programming Language support


Ubuntu Linux by default comes with GNU Compiler Collection and you will find almost all of the software build for the system uses GNU Compiler Collection (GCC). With GCC you can program for C, C++, Objective-C, Objective-C++, Fortran, Java, Ada, Go and many other programming languages. One good thing about GCC is that it is available for many different operating systems for example Microsoft Windows, Apple Mac OS. Furthermore, GCC is supported on all major CPU architectures.


Programming in C and C++ languages


GCC will give you gcc compiler and g++ compiler for C and C++ source files respectively. Both gcc and g++ compiler support almost all existing C standards for example ANSI C, ISO C, C99 and C11.


Installation of required packages


To get minimal development environment with C and C++ compilers, install the following packages under Ubuntu distributions:


build-essential

autoconf
automake
flex
bison
libtool
gcc-multilib
g++-multilib

in the terminal:


sudo apt-get install build-essential autoconf automake flex bison libtool gcc-multilib g++-multilib


Then, install manual pages which will help you understand function definitions.


in the terminal:


sudo apt-get install manpages-dev manpages-posix


Now, you can start writing your programs in the text editor of your choice  and compile your source files easily from the terminal by putting the following command:


For C program:


gcc source_file.c


For C++ program


g++ source_file.cpp


This will produce executable file named a.out in the current directory.


If you want to read manual of a function just type the following in the terminal:


man name_of_the_function


For example:


man printf


to exit from manual press q keyboard key. Use Up and Down arrow key to navigate through the manual.


If you prefer Integrated Development Environment (IDE) then check out the following IDEs. Here I put my experiences with different IDEs:


Netbeans

Build on Java, solid user interface, recommended for all kind of developments
https://netbeans.org/

Code::Blocks

Uses native user interface, simple and good for experimentation and start-up projects
http://www.codeblocks.org/

Eclipse

Build on Java, Extensible in nature
https://eclipse.org/

KDevelop

Native KDE development environment, good for C++ and QT projects
https://www.kdevelop.org/

Geany

Lightweight native IDE, good for simple projects
http://www.geany.org/

Finally, if you ask me which IDE I would prefer, I would definitely say Netbeans :)