Declaring variables and using them in JavaScript

Javascript VariableJavaScript variables are containers for storing data values.JavaScript variables can hold numbers like 100, and text values like “John”. The Assignment OperatorHere, the equal sign (=) is an “assignment” operator, not an “equal to” operator.An example which Create a variable, assign a value to it, and display it:- <html><body><script><!–Using Variables–>var carName = “Swift”;alert(carName);</script></body></html> Result: Alert Showing the value of the variable carName Description:The Above program stores the string swift  in a variable carName  which later is displayed on a web browser through an alert

Read More

Create a simple app which reads out what you write

In this post you will be guided to create a simple android application which reads out loud the text you write. This application uses Text To Speech (TTS) class. This is a basic application which has 1 EditText field and a single button. The EditText field is basically takes input and once you tap that button, it will read the entered text. This program uses your default TTS output voice. Demo: When tapped on Speak, It reads loudly “Hello I’m Sid”. Implementing TTS Class: public class MainActivity extends Activity implements…

Read More

An Introduction to JavaScript , Hello World

JavaScript is the most popular scripting language in the world. This is a simple Hello world code snippet which displays hello world in the page. Basically there are four different ways of displaying message in a page using JavaScript window.alert(). document.write(). innerHTML. console.log() Simple Hello World Code Snippet: <html><body><script> window.alert(“Hello World”);</script></body></html> DescriptionThe output is just a Alert window showing Hello World in it.

Read More

Palindrome checker which accepts both string and numbers

This is a simple program in Python which accepts both string and integer and checks if it is palindrome. Basically this program coverts any input to a string and then performs a reverse string operation. There are two Functions used in this program, firstly rev_str(), which reverse the string passed to it and secondly palstr() which checks whether the string is palindrome. Here is the code Snippet def rev_str(x): return x[::-1]def palstr(x): if ( x == rev_str(x)): print “Palindrome”; else: print “Not palindrome”;str=raw_input();palstr(str); Output: Well found bugs, feel free to report them…

Read More

Build a Simple Contact Application With Calling Feature

This post will help you to create your own Simple contact application which fetches all the contacts from the database and display it in a ListView. This actually accesses the contact database of the phone by a cursor adapter. Then it stores The name and the phone number associated in a listview using base adapter class. The basic function of this app is to call that number when clicked on a specific contact. Demo:   (a) The MainActivity, showing the List Of Contacts.              (b)…

Read More

Create a simple user profile system

This post guides you to create you own simple user profile system. Using this system, your users can register and sign in. The complete system is based of PHP and MYSQL. This system contains mainly 3 files, firstly the config.php, secondly the index.php and lastly the profile.php.  After uploading the files to your web server, first edit the details of the config.php file, namely the database user,name and password. The run in on the web browser, just like www.xyz.com/config.php/ now you are just good to go. Your users can access the…

Read More

Create a simple password authentication for HTML page

In this post, you can create a simple password authentication system using php using which you can protect you sensitive information. Basically the complete authentication system is based on a single php file. In this file, you need to store the username and the password, which you need to enter in order to login to view you secured data. The complete page is overlayed by a div which when entered the correct credentials, disappears so that you can see the secured content. Demo The Layout When The Page Is Opened.…

Read More

Number of squares present between two numbers

The following program takes two integers as input and prints number of perfect squares present between those two numbers.Ex:Let two numbers be 5 and 16In this case 2 will be printed as two perfect squares, 9 and 16 are present in between 5 and 16. #include<stdio.h>#include<math.h>int main(){ int x,y,r;  printf(“Enter two numbers :”); scanf(“%d %d”,&x,&y); x=sqrt(x-1); y=sqrt(y); printf(“The number of squares present : %d”,(y-x)); return 0;} Description: In the above program let the two elements be A and B. x is the square root of A and y is the…

Read More

Build Simple Calculator with basic operations

This is a Simple calculator android app which performs basic add, sub, mul and div operations. This app displays the result as well as stores the history which can be erased when desired. The digits of the calculator are basically buttons as well as the operators. The zip includes the source code of this application The MainActivity Of The Application Storing The Calculations in the History Finding the answer of the expression in the History You can download the whole project here. Found Bugs? Comment Them, we shall be glad to…

Read More

Build Simple Music Player With AlbumArt Support

This is a sample music player app which has play, pause and seek features. This is just a basic music player with a little customization. This type of app is suitable for mini projects. This basic music player also displays the default album art of the selected song. The app basically scans your whole External SD card recursively and add the songs to a Listview using a BaseAdapter class. Main Activity showing the list of Songs present in the SD Card.  M2Activity, Playing the song clicked on the Main Activity.…

Read More