List/Grid Computer and Programming Subscribe RSS feed of category Computer and Programming
How to enable/disable Bluetooth programmatically in Android
In this tutorial, I will show you a simple but very useful example to switch on/off the bluetooth of your Android phone programmatically. You can do this by either calling the system intent for the same or directly from your application. In this application, I will cover only the second part. The application will be having a TextView to show the current status of Bluetooth and a ToggleButton to toggle…
How to Perform Linear Search using C Language
Consider you have an array of 10 numbers and you want to find out position of a particular number. Linear Search can help you with that and it is one of the best criteria to search when you have un-ordered list of number. Linear Search is a method for finding a particular in an array or list, which consists of checking every element of that array, one at a time…
How to install Wine in Ubuntu
Wine is free and open source application for Unix / Linux based Operating Systems which allows us to run applications written for Microsoft Windows. WINE is an acronym for WINdows Emulator. WINE also provides a software library, Winelib, which developers can use to compile Windows applications to port them to Unix / Linux based systems. In this tutorial, I will show you how to install Wine in Ubuntu using both…
How to install Eclipse in Linux
Eclipse is a an IDE i.e Integrated Development Environment tool mostly used by developers for JAVA development. This tool support development in a number of languages like C, C++, COBOL, Java, Perl, PHP, Python, Ruby, etc. and also supports plugins which can let you develop projects in a number of other languages as well. Eclipse SDK is free and open source software released under the terms of the Eclipse Public License….
How to install or update Firefox in Linux using Terminal
In this tutorial, I will show you how can you install or update latest version of Firefox in Linux using Terminal commands. Method explained is tested on Ubuntu 11.10 to install Firefox 10.0 and it probably work on all the Linux based Operating Systems. If you already have older version of Firefox installed in your system, then it should not be running while getting this update. If you are not…
How to create a Terminal Clock using Shell Script
date command displays current date and time to the Terminal and we can use this command to recursively display time every second on Terminal which will look like a Terminal Clock. In this tutorial, I will show you how to create a Shell Script which will make the terminal to show system time every second like a clock. Default output of date command prints result in the format shown in…
How to check whether a number is Armstrong Number in C
Armstrong Numbers are those numbers which are equal to the sum of its own digits each raised to the power of the number of digits in the number. Consider number 153, it has three digits, so length is 3. Now each digits raised to the power of the number of digits in the number : 13 = 1, 53 = 125, 33 = 27. Sum of these values : 1…
How to find Nth Perfect Number in C language
Perfect Numbers are those numbers which is equal to the sum of its proper positive divisors (excluding itself). Consider number 6, it has only four proper positive divisors 1, 2, 3 and 6. If we exclude 6, proper divisors left are 1, 2 and 3 and their sum is 6 which is equal to the number itself. So, 6 is a Perfect Number. You can learn more about Perfect Numbers…
How to find Nth Prime Number in C language
Prime numbers are the numbers greater than 1 which are divisible only by 1 and itself, like 3 is divisible by 1 and 3 only. So, if a natural number n is a Prime Number, then it is divisible by only 1 and n and not divisible by any number from the sequence 2, 3, 4, . . . . , (n – 1). You can find more information about…