Sunday, September 25, 2011

How to Detect Hidden Camera in Trial Room?

How to Detect Hidden Camera in Trial Room?

In fron...t of the trial room take your mobile and make sure that mobile can make calls........
Then enter into the trail room, take your mobile and make a call.....
If u can't make a call......!!!!
There is a hidden camera......
This is due to the interference of fiber optic cable during the signal transfer......

Please forward this to your friends to educate this issue to the
public......To prevent our innocent ladies from HIDDEN CAMERA...........

Pinhole Cameras in Changing Rooms of Big Bazaar, Shoppers Stop?

A few days ago, I received this text message:
Please don't use Trial room of BIG BAZAAR there are pinhole cameras to make MMS of young girls.
So, please forward to all girls. Also forward to all boys who have sisters and girlfriends.

Don't be shy in forwarding this message. Because its about protecting the integrity of all girls & ladies.

HOW TO DETECT A 2-WAY MIRROR?

When we visit toilets, bathrooms, hotel rooms, changing rooms, etc., How many of you know for sure that the seemingly ordinary mirror hanging on the wall is a real mirror, or actually a 2-way mirror I.e., they can see you, but you can't see them. There have been many cases of people installing 2-way mirrors in female changing rooms or bathroom or bedrooms.

It is very difficult to positively identify the surface by just looking at it. So, how do we determine with any amount of certainty what type of Mirror we are looking at?

CONDUCT THIS SIMPLE TEST:

Place the tip of your fingernail against the reflective surface and if there is a GAP between your fingernail and the image of the nail, then it is a GENUINE mirror.

However, if your fingernail DIRECTLY TOUCHES the image of your nail, then BEWARE, IT IS A 2-WAY MIRROR! (There may be someone seeing you from the other side). So remember, every time you see a mirror, do the "fingernail test." It doesn't cost you anything. It is simple to do.

This is a really good thing to do. The reason there is a gap on a real mirror, is because the silver is on the back of the mirror UNDER the glass.

Whereas with a two-way mirror, the silver is on the surface. Keep it in mind! Make sure and check every time you enter in hotel rooms.

Friday, June 10, 2011

Saturday, June 4, 2011

Random Number Generation Based on Time Salt Value

package random;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import javax.swing.JOptionPane;

public class randomnumber
{
    public static int count=0;

    public static void main(String[] args) throws NoSuchAlgorithmException, ParseException
    {
            convert_encrypt_single cenc=new convert_encrypt_single();
                       
            for(count=0;count<1;count++)
            {       
                int encount=0;
             
               
                GMTDateTime d_obj=new GMTDateTime();
               
                String targetname= d_obj.getdatetimegmt();
               
                String[] name = {
                                    null,
                                    targetname,
                                    null
                                };
           
                String encryptstring=cenc.encrypt(cenc.encrypt(name[1]).toString().toUpperCase()).toString().toUpperCase();
for(encount=-1;encount<encryptstring.length()+15469;encount++)
                {
                    encryptstring=cenc.encrypt(encryptstring).toString().toUpperCase();
                }
                System.out.println(encryptstring);
              
               
                StringSeperate seperate_obj=new StringSeperate();
                String randomnumber=seperate_obj.strseperate(encryptstring);
                System.out.println(randomnumber);
               
                JOptionPane output = new JOptionPane();
                JOptionPane.showMessageDialog(output,randomnumber, "     Password     ",JOptionPane.INFORMATION_MESSAGE);
            }                                   
            System.exit(0);        //Runtime.getRuntime().exit(0);            
     }   
}

class convert_encrypt_single {

public StringBuilder encrypt(String plaintext) throws NoSuchAlgorithmException
{
      
        String algorithm = "SHA-512";     //MD5

        byte[] middletext = plaintext.getBytes();

        MessageDigest md = MessageDigest.getInstance(algorithm);

        md.reset();
        md.update(middletext);
        byte[] encodedPassword = md.digest();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < encodedPassword.length; i++) {
          if ((encodedPassword[i] & 0xff) < 0x10) {
            sb.append("0");
          }
          sb.append(Long.toString(encodedPassword[i] & 0xff, 16));
        }
    return sb;
}
}

class GMTDateTime {


    public String getdatetimegmt()  throws ParseException {
       
        SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
        dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT"));
     
       
        SimpleDateFormat dateFormatLocal = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");        
        System.out.println(dateFormatLocal.parse(dateFormatGmt.format(new Date())));
        System.out.println(dateFormatGmt.format(new Date()));
               
        Calendar aGMTCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
        System.out.println(aGMTCalendar.getTime());
        System.out.println(aGMTCalendar.getTimeInMillis());
               
        //return aGMTCalendar.getTime().toString()+aGMTCalendar.getTimeInMillis() ;
        return dateFormatLocal.parse( dateFormatGmt.format(new Date()))+dateFormatGmt.format(new Date()).toString()+aGMTCalendar.getTime().toString()+aGMTCalendar.getTimeInMillis() ;

    }
   
}

class StringSeperate{
    public String strseperate(String source)  throws ParseException {
        Integer SeperateInterval=8;
        String destination ="";
        String mergeinterval="";
         Integer strlength=source.length();
        Integer counterseperator=0;
         for(int interval=0;interval
            mergeinterval=mergeinterval+source.substring(interval, interval+SeperateInterval)+'-';
           
         destination=mergeinterval.substring(0,strlength+counterseperator-1);
        return destination;
         }
        }

Saturday, May 28, 2011

Sunday, May 15, 2011

Saturday, May 14, 2011

TablePackageStoredProcedureCreation

package TablePkgSPCreation;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import javax.swing.JOptionPane;


import configConnection.JdbcConnectionSettings;

public class TablePackageStoredProcedureCreation {
    private static Connection con = null;
    public static void main(String[] args) throws Exception {   
        TablePackageStoredProcedureCreation sp_creation_obj=new TablePackageStoredProcedureCreation();       
        sp_creation_obj.ProcedureCreation();
        sp_creation_obj.PkgProcedureCreation();
        sp_creation_obj.TableCreation();
    }

    private void connectionEstblished() throws SQLException, Exception {       
        JdbcConnectionSettings conn_db_obj = new JdbcConnectionSettings();
        con = conn_db_obj.connection_setting();
    }
   
    private void ProcedureCreation() throws Exception
    {
        TablePackageStoredProcedureCreation connection_obj=new TablePackageStoredProcedureCreation();
        connection_obj.connectionEstblished();
       
        JOptionPane pane_procedure_creation_obj=new JOptionPane("Jdbc_Procedure_Creation");
       
        try{          
          
             Statement stmt_user_select = con.createStatement();
             String procedure_user_select = "CREATE OR REPLACE PROCEDURE sp_myempinfo_user_select(input_aid IN VARCHAR2,output_name OUT VARCHAR2,output_salary OUT NUMBER) AS \n"
                + "BEGIN \n"
                + "SELECT name,salary INTO output_name,output_salary FROM myempinfo WHERE aid = input_aid ; \n"
                +"EXCEPTION \n"
                +"    WHEN OTHERS THEN \n"
                +"RAISE_APPLICATION_ERROR (-20004,input_aid || ':$:' || SQLERRM, TRUE) ; \n"
                + "END sp_myempinfo_user_select;";
              stmt_user_select.executeUpdate(procedure_user_select);
              stmt_user_select.close();
           
          
              Statement stmt_cursor_select = con.createStatement();
              String procedure_cursor_select = "CREATE OR REPLACE PROCEDURE sp_myempinfo_cursor_select(IO_CURSOR OUT SYS_REFCURSOR) AS \n"
                    + "BEGIN \n"
                    + "OPEN IO_CURSOR FOR SELECT * FROM myempinfo ; \n"               
                    + "END sp_myempinfo_cursor_select;";
              stmt_cursor_select.executeUpdate(procedure_cursor_select);
              stmt_cursor_select.close();
                           
             
              Statement stmt_insert = con.createStatement();
              String procedure_insert = "CREATE OR REPLACE PROCEDURE sp_myempinfo_insert(input_aid IN VARCHAR2,input_name IN VARCHAR2,input_salary IN NUMBER) AS \n"
                        + "BEGIN \n"
                        + "INSERT INTO myempinfo VALUES(input_aid,input_name,input_salary); \n"               
                        +"EXCEPTION \n"
                        +"WHEN OTHERS THEN \n"
                        +"RAISE_APPLICATION_ERROR (-20008,input_aid || ':$:' || SQLERRM, TRUE) ; \n"
                        +"RAISE_APPLICATION_ERROR (-200012,input_name|| ':$:' || SQLERRM, TRUE) ; \n"
                        +"RAISE_APPLICATION_ERROR (-200016,input_salary|| ':$:' || SQLERRM, TRUE); \n"
                        + "END sp_myempinfo_insert;";
                stmt_insert.executeUpdate(procedure_insert);
                stmt_insert.close();
                 
                 
                Statement stmt_update = con.createStatement();
                String procedure_update = "CREATE OR REPLACE PROCEDURE sp_myempinfo_update(input_aid IN VARCHAR2,input_name IN VARCHAR2,input_salary IN NUMBER) AS \n"
                            + "BEGIN \n"
                            + "UPDATE myempinfo SET salary=input_salary WHERE aid=input_aid AND name=input_name; \n"               
                            +"EXCEPTION \n"
                            +"    WHEN OTHERS THEN \n"
                            +"RAISE_APPLICATION_ERROR (-20008,input_aid || ':$:' || SQLERRM, TRUE) ; \n"
                            +"RAISE_APPLICATION_ERROR (-200012,input_name|| ':$:' || SQLERRM, TRUE) ; \n"
                            +"RAISE_APPLICATION_ERROR (-200016,input_salary|| ':$:' || SQLERRM, TRUE); \n"
                            + "END sp_myempinfo_update;";
                 stmt_update.executeUpdate(procedure_update);
                 stmt_update.close();
             
               
                 Statement stmt_delete = con.createStatement();
                 String procedure_delete = "CREATE OR REPLACE PROCEDURE sp_myempinfo_delete(input_aid IN VARCHAR2) AS \n"
                                + "BEGIN \n"
                                + "DELETE FROM myempinfo WHERE aid=input_aid ; \n"   
                                +"EXCEPTION \n"
                                +"    WHEN OTHERS THEN \n"
                                +"RAISE_APPLICATION_ERROR (-20008,input_aid || ':$:' || SQLERRM, TRUE) ; \n"
                                + "END sp_myempinfo_delete;";
                 stmt_delete.executeUpdate(procedure_delete);
                 stmt_delete.close();
             
        }
                 catch(Exception e)
                    {                                      
                         System.out.println(e.getMessage());
                         JOptionPane pane_jdbc_pane_procedure_creation_exception_obj=new JOptionPane("Jdbc_Exception");
                         JOptionPane.showMessageDialog(pane_jdbc_pane_procedure_creation_exception_obj, e.getMessage(),"Jdbc Insert Operation Failed" ,JOptionPane.ERROR_MESSAGE);
                         System.exit(1);
                    }
                    finally
                    {    
                        con.close();
                        System.out.println("Jdbc Stored Procedure Creation Succeed");
                        JOptionPane.showMessageDialog(pane_procedure_creation_obj,"Jdbc Stored Procedure Creation Succeed" , con.toString(),JOptionPane.INFORMATION_MESSAGE);           
                    }
    }
   
   
    private void PkgProcedureCreation() throws Exception
    {
        TablePackageStoredProcedureCreation connection_obj=new TablePackageStoredProcedureCreation();
        connection_obj.connectionEstblished();
       
        JOptionPane pane_package_procedure_creation_obj=new JOptionPane("Jdbc_Package_Procedure_Creation");
       
        try{
           
              Statement stmt_pkg_declaration_select = con.createStatement();
              String pkg_declaration_procedure_select = "CREATE OR REPLACE PACKAGE pkgmyempinfo IS \n"
                    + "PROCEDURE sp_myempinfo_pkg_user_select(input_aid IN VARCHAR2,output_name OUT VARCHAR2,output_salary OUT NUMBER);\n"
                    + "PROCEDURE sp_myempinfo_pkg_cursor_select(IO_CURSOR OUT SYS_REFCURSOR);\n"       
                    + "END pkgmyempinfo;";
              stmt_pkg_declaration_select.executeUpdate(pkg_declaration_procedure_select);
              stmt_pkg_declaration_select.close();
           
           
               Statement stmt_pkg_body_select = con.createStatement();
                String pkg_body_procedure_select = "CREATE OR REPLACE PACKAGE BODY pkgmyempinfo IS \n"
                    + "PROCEDURE sp_myempinfo_pkg_user_select(input_aid IN VARCHAR2,output_name OUT VARCHAR2,output_salary OUT NUMBER) AS \n"
                    + "BEGIN \n"   
                    + "SELECT name,salary INTO output_name,output_salary FROM myempinfo WHERE aid = input_aid ;\n"
                    + "EXCEPTION \n"
                     + "WHEN OTHERS THEN \n"
                     + "RAISE_APPLICATION_ERROR (-20004,input_aid || ':$:' || SQLERRM, TRUE) ; \n"
                       + "END sp_myempinfo_pkg_user_select;\n"
                       + "PROCEDURE sp_myempinfo_pkg_cursor_select(IO_CURSOR OUT SYS_REFCURSOR) IS\n"
                       + "BEGIN \n"
                    + "OPEN IO_CURSOR FOR SELECT * FROM myempinfo ;\n"
                    + "END sp_myempinfo_pkg_cursor_select;\n"            
                    + "END pkgmyempinfo;";
                  stmt_pkg_body_select.executeUpdate(pkg_body_procedure_select);
                  stmt_pkg_body_select.close();
                 
        }
                 catch(Exception e)
                    {                                      
                         System.out.println(e.getMessage());
                         JOptionPane pane_jdbc_pane_package_procedure_creation_exception_obj=new JOptionPane("Jdbc_Exception");
                         JOptionPane.showMessageDialog(pane_jdbc_pane_package_procedure_creation_exception_obj, e.getMessage(),"Jdbc Insert Operation Failed" ,JOptionPane.ERROR_MESSAGE);
                         System.exit(1);
                    }
                    finally
                    {
                        con.close();
                        System.out.println("Jdbc Package Stored Procedure Creation Succeed");
                        JOptionPane.showMessageDialog(pane_package_procedure_creation_obj,"Jdbc Package Stored Procedure Creation Succeed" , con.toString(),JOptionPane.INFORMATION_MESSAGE);           
                    }
    }
   
    private void TableCreation() throws Exception
    {
        TablePackageStoredProcedureCreation connection_obj=new TablePackageStoredProcedureCreation();
        connection_obj.connectionEstblished();
        JOptionPane pane_table_creation_obj=new JOptionPane("Jdbc_Table_Creation");
       
       
        try{       
             Statement stmt_table_create = con.createStatement();       
             String table_create = "CREATE TABLE myempinfo(aid VARCHAR2(20) PRIMARY KEY,name VARCHAR2(20),salary NUMBER(12,2))";              
             stmt_table_create.executeUpdate(table_create);
             stmt_table_create.close();
        }
         catch(Exception e)
            {                                      
                 System.out.println(e.getMessage());
                 JOptionPane pane_jdbc_pane_table_creation_exception_obj=new JOptionPane("Jdbc_Exception");
                 JOptionPane.showMessageDialog(pane_jdbc_pane_table_creation_exception_obj, e.getMessage(),"Jdbc Table Creation Failed" ,JOptionPane.ERROR_MESSAGE);
                 System.exit(1);
            }
            finally
            {                    
                con.close();
                System.out.println("Jdbc Table Creation Succeed");
                JOptionPane.showMessageDialog(pane_table_creation_obj,"Jdbc Table Creation Succeed" , con.toString(),JOptionPane.INFORMATION_MESSAGE);           
            }
    }
}