Tuesday, May 15, 2012

bank codes of srilanka

find pending requests,unfriend in facebook

for mozilla firefox


1.download Greasemonkey (add-on) and install
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/

2.after install restart the firefox

3.install this javascript
http://www.unfriendfinder.com/unfriend_finder.user.js

4.now login to facebook

now you can see a option call unfriend in left hand corner upper.click it.
you can find the pending request and other details from it.

pera engineers: play sound with matlab

pera engineers: play sound with matlab: sound -Convert matrix of signal data to sound Syntax sound(y,Fs) sound(y,Fs,bits) Description sound(y,Fs) sends audio signal y to the speak...

play sound with matlab

sound -Convert matrix of signal data to sound Syntax sound(y,Fs) sound(y,Fs,bits) Description sound(y,Fs) sends audio signal y to the speaker at sample rate Fs. If you do not specify a sample rate, sound plays at 8192 Hz. For single-channel (mono) audio, y is an m-by-1 column vector, where m is the number of audio samples. If your system supports stereo playback, y can be an m-by-2 matrix, where the first column corresponds to the left channel, and the second column corresponds to the right channel. The sound function assumes that y contains floating-point numbers between -1 and 1, and clips values outside that range. sound(y,Fs,bits) specifies the bit depth (that is, the precision) of the sample values. The possible values for bit depth depend on the audio hardware available on your system. Most platforms support depths of 8 bits or 16 bits. If you do not specify bits, the sound function plays at an 8-bit depth. Tips The sound function supports sound devices on all Windows and most UNIX platforms. Most sound cards support sample rates between 5 kHz and 48 kHz. Specifying a sample rate outside this range produces unexpected results. Examples Load the demo file gong.mat, which contains sample data y and rate Fs, and listen to the audio: load gong.mat; sound(y, Fs); Play an excerpt from Handel's "Hallelujah Chorus" at twice the recorded sample rate: load handel.mat; sound(y, 2*Fs);

Monday, May 14, 2012

pera engineers: interview-joke

pera engineers: interview-joke: සම්මුà¶› à¶´à¶»ීà¶š්‍ෂකවරයා: à¶œුවන් යානයක ගඩොà¶½් à¶šැà¶§ 50à¶š් ඇත.ඔබ ඉන් à¶’à¶šà¶š් à¶´ිà¶§à¶­à¶§ à·€ිà·ƒිà¶š් à¶šà·…ොà¶­් à¶šොපමණ à¶´්‍රමාණයක් ඉතුà¶»ු à·€ි à¶­ිà¶¶ේද? අයදුම්à¶šà¶»ු: à¶’à¶š à¶½ේà·ƒි...

pera engineers: generation of GSM

generation of GSM

pera engineers: samsung smart App Challenge

pera engineers: samsung smart App Challenge: samsung smart app challenge 2012 This contest offers $4.08 million in cash prizes and mega marketing support for app promotion to the to...

pera engineers: nokia secret codes

pera engineers: nokia secret codes: http://peracomputer.blogspot.com/p/phone-secret-codes.html

pera engineers: crack matlab 2009

pera engineers: crack matlab 2009: crack matlab 2009 go to this link: http://peracomputer.blogspot.com/p/crack-matlab-2009.html

pera engineers: samsung smart App Challenge

pera engineers: samsung smart App Challenge: samsung smart app challenge 2012 This contest offers $4.08 million in cash prizes and mega marketing support for app promotion to the to...

pera engineers: problem solve using java

pera engineers: problem solve using java: PROBLEM Intersecting Lines When we do A/L and O/L we have learnt the Cartesian coordinates and we all know that a pair of distinct poin...

pera engineers: how to configure dreamweaver cs4 with google code ...

pera engineers: how to configure dreamweaver cs4 with google code ...: 1.make a new site  from Site->new site 2.select advanced tab 3.select local info form category 4.give name to your site and set a root f...

nokia secret codes

crack matlab 2009

Sunday, May 13, 2012

windows8 metro app challenge

Develop a Windows 8 Metro Style App and stand a chance to win some awesome prizes

http://metro.dotnetforum.lk/

samsung smart App Challenge


samsung smart app challenge 2012

This contest offers $4.08 million in cash prizes and mega marketing support for app promotion to the top 80 apps including 60 Samsung Apps Super Apps and 20 Best S Pen Apps featuring the most creative GALAXY Note Stylus Pen (S Pen) functions.


more info:
http://www.smartappchallenge.com/eng/main.do

how to configure dreamweaver cs4 with google code repository

1.make a new site  from Site->new site
2.select advanced tab
3.select local info form category
4.give name to your site and set a root folder for store the site
5.select testing server under category
6.select server model as php mysql
7.set access as localhost if you are working in localhost
8.step 3 to 8 not affected to repository settings.actual repository settings is under version control in category
9.set access as sub version
10. set protocol as https
11.set server address as (your project name)..googlecode.com
          ex: perauop..googlecode.com

12.set repository path as /svn
13. set server port as default if you are not use proxy server
14.set your username and password which are provided by google code for you
15. click on test button
16.if all the settings are ok, it give a message "project and server are accessible"

congratulation! you configure adobe dream weaver cs4 for google code successfully.

Friday, May 11, 2012

Aces coders 2012

Aces coders 2012
@ department of computer engineering,
faculty of engineering,
university of peradeniya

21/04/2012





Description


This is 12 hour nonstop coding competition such as IEEE coding competition.This is organized by Association of Computer Engineering Students (ACES), University of Peradeniya.


There were 37 groups who took part in this competition and they were undergraduates from the faculty of engineering and faculty of science of the same university as well as the Uva Wellassa University. The competition started at 0900 and finished at 2100. Award ceremony was held thereafter and winners were awarded with the cash prizes and certificates.


some of posts under name "Problem solve using java" posted in to my blog are related to the problems which we solved in their.


Our team name is "unique".we are the 6th place.


our team members are


madura wickramasinghe (me)
isuru madhushankha
senura yasaswin


more details:

http://www.dailynews.lk/2012/05/08/fea22.asp

problem solve using java

PROBLEM

Intersecting Lines

When we do A/L and O/L we have learnt the Cartesian coordinates and we all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways (http://en.wikipedia.org/wiki/Cartesian_coordinate_system):

1) No intersection because they are parallel,2) Intersect in a line because they are on top of one another (i.e. they are the same line),3) Intersect in a point.  In this problem you will use your algebraic knowledge to create a program that determines how and where two lines intersect.

Problem Statement: Your program will read in four points that define two lines in the x-y plane and determine how and where the lines intersect.  All numbers required by this problem will be reasonable, say between -1000 and 1000.


Input The line will contain eight integers.  These integers represent the coordinates of four points on the plane in the order x1 y1 x2 y2 x3 y3 x4 y4.  Thus each of these input lines represents two lines on the plane: the line through (x1, y1) and (x2, y2) and the line through (x3, y3) and (x4, y4).  The point (x1, y1) is always distinct from (x2, y2), likewise with (x3, y3) and (x4, y4).


Output There will then be one line of output, describing how the lines intersect: none, line, or point.  If the intersection is a point then your program should output the x and y coordinates of the point, correct to two decimal places.


Sample Inputs                                          
  Output 

0 0 4 4 0 4 4 0                                           
POINT 2.00 2.00 

5 0 7 6 1 0 2 3                                          
 NONE 

5 0 7 6 3 -6 4 -3                                        
 LINE 



ANSWER



import java.util.Scanner;


public class AcesCoders1 {

   
    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        String inp = sc.nextLine();

        String[] spl = inp.split(" ");


        float x1 = Integer.parseInt(spl[0]);
        float y1 = Integer.parseInt(spl[1]);
        float x2 = Integer.parseInt(spl[2]);
        float y2 = Integer.parseInt(spl[3]);
        float x3 = Integer.parseInt(spl[4]);
        float y3 = Integer.parseInt(spl[5]);
        float x4 = Integer.parseInt(spl[6]);
        float y4 = Integer.parseInt(spl[7]);

        String out;


        float m1 = -10000f;
        if (x2 != x1) {
           
            m1 = (y2 - y1) / (x2 - x1);
        }
        float m2 = -10000f;
        if (x3 != x4) {
            m2 = (y4 - y3) / (x4 - x3);
        }

        float c1 = -10000;
        if (m1 != -10000) {
            c1 = y1 - (m1 * x1);
        }
        float c2 = -10000;
        if (m2 != -10000) {
            c2 = y3 - (m2 * x3);
        }

        
     
        
        if (m1 == m2 && c1 == c2) {
            out = "LINE";
        } else if (m1 == m2 && c1 != c2) {
            out = "NONE";
        } else {
            float x5=0;
            float y5=0;
            if(m1==-10000){
                y5=m2*x2+c2;
                x5=x2;
            }
            else if(m2==-10000){
                y5=m1*x3+c1;
                x5=x3;
            }
            else{
             x5= (c2 - c1) / (m1 - m2);
            y5 = m1 * x5 + c1;
            }
            x5=Math.round(x5*100.0f)/100.0f;
            y5=Math.round(y5*100.0f)/100.0f;
            out = "POINT " + x5 + " " + y5;
        }
        System.out.print(out);
    }
}


configure repository using dreamweaver cs4

this link is help to configure adobe dreamweaver cs4 for repository

http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WS80FE60AC-15F8-45a2-842E-52D29F540FED.html

free download twilight movie collection

you can download all twilight movies here

http://www.movie2k.to/movie.php?id=108727&part=2


if you want to sinhala subtitles, visit
http://www.baiscopelk.com/

ACES get together


ACES GET TOGETHER


Association of Computer Engineering Students(ACES), University of Peradeniya get together will be held on tomorrow (12-05-2012) @ university ground.


There will be a cricket match to 9 a.m. - 2 p.m. staff members and all the students in every batches will participate to this.


problem solve using java


Longest common sub sequence

Description


Write a program to find the longest common subsequence of two strings. The common subsequence need not be contiguous. The two stings are given in one line in a file. Ignore empty lines.

Input sample

Two strings per line in following format. Assume there is only one unique subsequence per test case.
YAHOOMAIL;FACEBOOK

Output sample

The longest common subsequence.
AOO

Test cases

Input                                                                  Output

HBLMQSRATNVA;HXMHRIOTLA               HMRTA

PQABHCDES;AMPCBEDS                             ACES

AHPICDONIYMN;EHRSCTNJN                    HCNN



ANSWER





import java.util.Scanner;



public class QQ2{
 
 
    public static void main(String[]args){
         Scanner sc=new Scanner(System.in);
        String input=sc.nextLine();
     
        String spl[]=input.split(";");
     
        String str1;
        String str2;
        if(spl[0].length()>spl[1].length()){
        str1=spl[1];
        str2=spl[0];
    }
        else{
            str1=spl[0];
        str2=spl[1];
        }
     
     
     String out=lcs(str1,str2);
        System.out.print(out);
    }
 
 public static String lcs(String a, String b){
    int aLen = a.length();
    int bLen = b.length();
    if(aLen == 0 || bLen == 0){
        return "";
    }else if(a.charAt(aLen-1) == b.charAt(bLen-1)){
        return lcs(a.substring(0,aLen-1),b.substring(0,bLen-1))
            + a.charAt(aLen-1);
    }else{
        String x = lcs(a, b.substring(0,bLen-1));
        String y = lcs(a.substring(0,aLen-1), b);
        return (x.length() > y.length()) ? x : y;
    }
}
}








problem solve using java


Perfect Numbers


According to mathematics "If a, b, c are integers such that a = bc, a is called a multiple of b or of c, and b or c is called a divisor or factor of a. If c is not +- 1, b is called a proper divisor of a. Even integers, which include 0, are multiples of 2, for example, -4, 0, 2, 10; an odd integer is an integer that is not even, for example, -5, 1, 3, 9. A perfect number is a positive integer that is equal to the sum of all its positive, proper divisors; for example, 6, which equal 1 + 2 + 3, and 28, which equals 1 + 2 + 4 + 7 + 14, are perfect numbers.

Even perfect numbers (except 6) give remainder 1 when divided by 9.A positive number that is not perfect is imperfect and is deficient or abundant according to whether the sum of its positive, proper divisors is smaller or larger than the number itself. Thus, 9, with proper divisors 1, 3, is deficient; 12, with proper divisors 1, 2, 3, 4, 6, is abundant." Problem Statement:  Given a number, determine if it is perfect, abundant, or deficient.

First four perfect numbers were the only ones known to early Greek mathematics, and the mathematician Nicomachus had noted 8,128 as early as 100 AD. Then, in 1456, an unknown mathematician recorded the earliest reference to a fifth perfect number, with 33,550,336 being correctly identified for the first time. In 1588, the Italian mathematician Pietro Cataldi identified the sixth (8,589,869,056) and the seventh (137,438,691,328) perfect numbers.



Input

A positive integer N ; 1 <= N <= 60000.

Output

Output should list input integer whether it is perfect, deficient, or abundant, as shown in the examples below.



Sample Input                                    Output

15                                                   DEFICIENT

28                                                   PERFECT

56                                                   ABUNDANT


ANSWER



import java.util.Scanner;
public class QG {
    public static void main(String[]args){
        int perfect[]={6,28,496,8128};
        Scanner sc=new Scanner(System.in);
        String input=sc.nextLine();
        int inp=Integer.parseInt(input);
        String out=null;
        for (int i = 0; i < perfect.length; i++) {
            if(inp==perfect[i]){
                out="PERFECT";
                break;
            }
        }
     
        if(out==null){
         
            int sum=0;
            for (int i = 1; i < inp; i++) {
                int x=inp%i;
             
                if(x==0){
                    sum+=i;
                }
            }
            if(sum<inp)
                out="DEFICIENT";
            else
                out="ABUNDANT";
         
         
        }
        out=out.trim();
     
        System.out.print(out);
    }
}



Problem solve using java


Digital Roots

Department of Mathematics, University of Peradeniya needs a computer program to compute Digital roots. Digital roots are defined as a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process is repeated. This is continued as long as necessary to obtain a single digit. More information can be found here
 (http://en.wikipedia.org/wiki/Digital_root).

For example, consider the positive integer 24. Adding the 2 and the 4 yields a value of 6. Since 6 is a single digit, 6 is the digital root of 24. Now consider the positive integer 39. Adding the 3 and the 9 yields 12. Since 12 is not a single digit, the process must be repeated. Adding the 1 and the 2 yields 3, a single digit and also the digital root of
39.

Input


The input n (1<=n<=9999999999999999999999999999999999999999999999999999999999999999999999999999999) contains a positive integer for which the digital root must be calculated.

Output
Output the digital root of the input.

Sample Input                                   Output

24                                                       6

3                                                         3

39                                                       3




ANSWER



import java.math.BigInteger;
import java.util.Scanner;

public class Qc {
    public static void main(String []args){
        Scanner sc = new Scanner(System.in);
        String in = sc.nextLine();
        BigInteger input2 = new BigInteger(in);
         BigInteger stat = new BigInteger("10");
     
        int mod=0;
     
        while(input2.compareTo(stat)==1 || input2.compareTo(stat)==0
            ){
            mod+=input2.remainder(stat).intValue();
            input2=input2.divide(stat);
         
           if(input2.longValue()<=10){
               BigInteger temp=input2;
                input2=new BigInteger(Integer.toString(mod));
                input2=input2.add(temp);
           
                mod=0;
            }
        }
        System.out.print(input2);
     
     
     
    }
}