xcode

How to get first characters from an NSString – iOS

The NSString class provides a lot of useful methods, one of these gives you the capability to extract the first n characters from an NSString This is a preview of How to get first characters from an NSString –... Read more
ruby

Automatic resizing of a set of pictures using Ruby

In the previous post :"How to resize an image using Ruby" I made a program that can be used to resize a single image using the Ruby Language and RMagick.  Now I want to extend this program to resize... Read more
ruby

How to add text to pictures using Ruby

As I have already done with python (in How to add a text to a picture using python) , I'm going to write a simple program which adds a text over an image. This is a preview of How... Read more
ruby

How to resize an image using Ruby

Ruby is a fantastic programming language, it provides a lot of features. It can use the imagemagick to handle and filter pictures. In this short script I'm going to resize a png image and then I'm going to save... Read more
ruby

My minimal installation of Ruby on Ubuntu 12.04

  Wikipedia: <<Ruby was conceived on February 24, 1993 by Yukihiro Matsumoto who wished to create a new language that balanced functional programming with imperative programming. Matsumoto has said, "I wanted a scripting language that was more powerful than... Read more
11788381-php-mysql-development

Connecting to MYSQL database using PHP and OO

A friend of mine (on twitter) sent to me a small piece of code to interface a MySQL database using PHP and Object Oriented Programming I'm very happy to post it. Here you are the code:   <?php  ... Read more
fsck-it1

How to disable the file system check at boot time in linux

Why do you want to do that?   It's not advised to do so. I know it. I know, I know, I know, I know, I know, I know, I know….   but in some cases it can be useful so I want to tell... Read more
Python-Logo

Automatic resizing of a set of pictures using python

  Last week we've seen how to resize a picture using PIL. Take a look to Resize an image using python to get more information on how to do this task. This is a preview of Automatic resizing of a set... Read more
Python-Logo

How to add a text to a picture using python

Python provides a lot of useful tools and libraries to handle images. If you want to modify an image you can use the PIL (Python Image Library) to apply filters, draw a line, draw a rect, draw an oval,... Read more
resize

Resize an image using python

Python provides a lot of useful tools and libraries to handle images.  If you want to resize an image, for example if you want to create a thumbnail, you can use the following few lines of python code:  ... Read more
bash

how to extract columns from a text file using the bash

Extracting columns from a text file is a very common  task for system administrators or for scientific engineers, but, sometimes also other people needs to do this task. Using the bash and awk, this task is a very simple... Read more
word

Shortcut to paste text without formatting in Word

The paste command in Microsoft Word, IMHO, has an annoying behaviour, it pastes the text you have in the clipboard ignoring the destination formatting and instead it uses the source formatting styles. There are two ways to evoid this... Read more
imagemagick

Converting a pdf file to a series of pictures

Sometimes, for strange reasons, you can have the need to convert a pdf file into an image or into a collection of images. I've tried a lot of methods to do this job, I used: inkskape, gimp, libreoffice……. to... Read more
free-unrar

loading a shared library, programmatically

  In a previous article I explained how to create a shared library (in Mac OS X) and how to build an application using this shared library. Instead of linking the application against the library, the developer can choose... Read more
c2

Non blocking read over the serial line

When I'm working on embedded systems (running Linux), one of the most common task is waiting for data on the serial line. Sometimes the read must be a blocking read, more often I need to do a non blocking... Read more
centos

How to add startup applications in CentOS 6.3

With CentOS 6.3 you can add a set of startup applications to run each time you login. There are several ways to do this job, you can edit several configuration files but with CentOS 6.3 and Gnome you can... Read more
centos

How to configure autologin in CentOS 6.3

Auto-login could be considered a severe security issue, despite this, sometimes, it could be useful for specific tasks.     To do this job you have only to change a file. Gain root privilegies. open /etc/gdm/custom.conf with your favourite... Read more
nic

How to configure the TCP offload engine (TOE) in Linux

TCP offload engine or TOE is a technology used in network interface cards (NIC) to offload processing of the entire TCP/IP stack to the network controller. It is primarily used with high-speed network interfaces, such as gigabit Ethernet and... Read more
email

A simple objective C method to validate email addresses

Emails are a must have, everyone has at least one email address. If you are planning to develop an application you should take care of emails. An email address identifies an email box to which email messages are delivered. The... Read more
library

How to create a shared library using the GCC on Linux

Before starting this task I want to say something about "Shared Libraries Pros & Cons" PROS - They give to you the ability to split your code in conceptually separated sections. Each section will be loaded only if it... Read more