QRCode Generator In PHP

This post will guide you to create your own QR code Generator. Basically we will use Google’s API to generate the QR code. QR code is a machine-readable code consisting of an array of black and white squares, typically used for storing URLs or other information for reading by the camera on a smartphone. Screenshots[Demo] Home page of the script showing which takes the Input. Generated QR code of the input Given The Code <div style=”text-align:center;”><form class=”email” name=”qrc” method=”post” action=”<?php $_PHP_SELF ?>” id=’12’><p align=”center”><font color=#99742e><span style=”font-size:12pt;”><b>Link</b></span></font></p><input type=”text” name=”qrlink” autocomplete=”off” placeholder=”Enter…

Read More

Bubble Sort In Python

This is a simple program which demonstrates the implementation of the bubble sort algorithm in python. The complexity of the program is O(n2) . The Input is taken from the console and then appended to a list, which is further processed . Output Screen: Program : print ‘Enter the list of elements followed by space:’x=raw_input();x=map(int,x.split())for i in range(0, len(x)-1): for j in range(0,len(x)-i-1): if(x[j]>x[j+1]): swp=x[j] x[j]=x[j+1] x[j+1]=swpprint x Found suggestions, Please comment them here !

Read More

Create An Android Screaming App [SMS HotWord]

In this post you will learn how to create an android app which will scream aloud no mater if the mobile is in silent or in general mode. This will work even if the app isnt in the open state. The screaming gets triggered when someone sends “scream” to your mobile as SMS. That is basically the hot word for triggering the screaming sound. Screenshots[Demo] The Code:The SMSReciever Broadcast Class: public class RecieveSMS extends BroadcastReceiver { public static final String SMS_BUNDLE = “pdus”; MediaPlayer mp; @Override public void onReceive(Context context,…

Read More

Binary Search using Java

It is a technique to search an element in sorted array. In this type of search half of the array is ignored just after one comparison. Each time required element is compared with middle element of the array and range is decided . Best Case Performance :  O(1)Average Case Performance : O(log n)Worst Case Performance : O(log n)Demo Output: The Program import java.util.Scanner; public class BinarySearch1 { public static void main(String args[]) { int i, first=0, last, mid, no, element; Scanner s = new Scanner(System.in); System.out.println(“n How many elements:”); no=…

Read More

User Defined Exceptions in Java

In this post you will learn to create your own, user defined exceptions. This program will handle unchecked exceptions, i.e those exceptions which cannot be checked by the compiler, or the run time exceptions. In this program there is a simple class AgeMargin in which when the age is less then 18 or greater then 24 generates an AgeException. Screenshots[Demo] The Code: import java.util.Scanner;class AgeException extends Exception{  public String toString()  {    return “AgeException Caught!”;  }}public class AgeMargin {  public static void main(String []args)  {    int age;    Scanner…

Read More