Install Quanta on Ubuntu 11.10

By | May 10, 2020

I upgraded my ubuntu few hours back from 11.04 to 11.10 ; it all went fine. After the upgrade I noticed that Quanta – my favorite php development tool had vanished. Doing few searches on google lead to the information that its now deprecated and not maintained in the repos anymore. So I got it… Read More »

Get time difference in microtime in C

By | March 9, 2012

The function gettimeofday can be used to retrieve the total number of seconds and balance microseconds elapsed since EPOCH. Structure timeval looks like this : struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* microseconds */ }; On Linux it can be done like this : /** * Get time difference in microseconds… Read More »

How to Get IP Whois Data in C with Sockets on Linux – Code Example

By | August 7, 2020

Theory The whois information of an ip address provides various details like its network, range, isp etc. This information is maintained by various regional registry servers. Read the wikipedia article on regional internet registries for more information. There are a total of 5 regional registries spanning various geographical regions of the world. For example if… Read More »

Compile wxwebconnect on Ubuntu 11.04 64 bit

By | February 2, 2012

wxwebconnect is a control for wxwidgets that allows to embed a gecko browser in a wxwidgets application. So lets try to install it on Ubuntu 11.04 wxWidgets can be installed from synaptic. Look for packages called libwxgtk2.8-* 1. Download wxwebconnect source from http://www.kirix.com/labs/wxwebconnect/downloads.html Extract them in home directory. Inside the webconnect directory you would see… Read More »

Winsock tutorial – Socket programming in C on windows

By | July 25, 2020

Socket programming with winsock This is a quick guide/tutorial to learning socket programming in C language on Windows. “Windows” because the code snippets shown over here will work only on Windows. The windows api to socket programming is called winsock. Sockets are the fundamental “things” behind any kind of network communications done by your computer…. Read More »

str_replace for C

By | December 22, 2011

Php has a useful function called str_replace which can search and replace a certain string in another big string. However there is no such function in C. So I wrote up one for myself. Here is the code. /* * Search and replace a string with another string , in a string * */ char… Read More »

Easy to use C/C++ IDE for Ubuntu Linux

By | October 19, 2012

Here are some IDEs that work very well on Ubuntu ( and other Linuxes ) and can be used as an alternative to the terminal gcc or g++ thing. Geany Url : http://www.geany.org/ Install with sudo apt-get install geany Open any C/C++/PHP/Html/Python/Perl file and start coding. Compile with F8 , Build with F9 and execute… Read More »

Traceroute command not working on Ubuntu

By | August 4, 2012

The traceroute utility can be installed from synaptic : $ sudo apt-get install traceroute Some Information : $ traceroute -V Modern traceroute for Linux, version 2.0.15, Oct 17 2010 Copyright (c) 2008 Dmitry Butskoy, License: GPL v2 or any later Doing some test runs $ traceroute www.google.com traceroute to www.google.com (74.125.235.20), 30 hops max, 60… Read More »

Get ip address from hostname in C with Linux sockets

By | July 31, 2020

Socket applications often need to convert hostnames like google.com to their corresponding ip address. This is done through dns requests. The socket api in linux provides functions like gethostbyname and getaddrinfo that can be used to perform the dns requests and get the ip address. 1. gethostbyname The first method uses the traditional gethostbyname function… Read More »

Run Apache as a specific user with mpm itk on Ubuntu Linux

By | December 8, 2011

Install mpm itk On ubuntu mpm itk can be installed from synaptic. Look for the package called apache2-mpm-itk sudo apt-get install apache2-mpm-itk Configure Configuration for mpm itk can be done in the file sites-enabled/000-default $ gksudo gedit /etc/apache2/sites-enabled/000-default In the VirtualHost *:80 section add this just before the end of the VirtualHost tag [xml] <IfModule… Read More »