Unable to view graphics on Dashboards,answers Urgent help required..

I am new to OBIEE and am not able to view graphics in answers,dashboards reports OBIEE on remote client system but are able to view graphics at remote server system and work on it.Please help us as it is very urgent.
Thanks in advance.

Hi
Ensure that you have adobe flash player plugin installed and you Java Host service which comes when you install OBIEE is up and running. Thhis is the service mainly for rendering charts and graphical things in obiee. Hope ths helps
Regards

Similar Messages

  • Urgent Help Required for Connect Four Game

    Hi all,
    I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the internet which helped me little bit. But there are lot of problems I am facing developing the whole game. I have drawn the Board and the two players can play. The players numbers can fill the board, but I have problem implementing the winner for the game. I need to implement the hasWon() method for Horizontal win, Vertical win and Diagonal win. I also found some code examples on the net but I was unable to make it working. I have 5 classes and one interface which I m implementing. The main problem is how to implement the hasWon() method in the PlayGame class below with Horizontal, vertical and diagonal moves.
    Sorry there is so much code.
    This the interface I must implement, but now I am only implementing the int move() of this interface. I will implement the rest later after solving the winner problem with your help.
    Interface code..............
    interface Player {
    void init (Boolean color);
    String name ();
    int move ();
    void inform (int i);
    Player1 class......................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player1 implements Player
    public Player1()
    public int move()
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player1;
    System.out.println ("What is your Number, player 1?");
    player1 = scan.nextInt();
    System.out.println ("Hey number"+player1+" are you prepared to CONNECT FOUR");
    System.out.println();
    return player1;
    //Player.move();
    //return player1;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "Koonda";
    }//end player1 class
    Player2 class...........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player2 implements Player
    public int move()
    //int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    // cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
    //int num1, num2;
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player2;
    System.out.println ("What is your Number, player 2?");
    player2 = scan.nextInt();
    System.out.println ("Hey "+player2+" are you prepared to CONNECT FOUR");
    System.out.println();
    //return player1;
    return player2;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "malook";
    }//end player1 class
    PlayGame class which contains all the functionality.........................................................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class PlayGame
    //Player player1;
    //Player player2;
    int [][]ConnectFourArray;
    boolean status;
    int winner;
         int player1;
         int player2;
         public PlayGame()
              //this.player1 = player1;
              //this.player2 = player2;
         public void StartGame()
         try{
         // int X = 0, Y = 0;
         //int value;
         int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
         int[][] ConnectFourArray = new int[6][7];
         int num1, num2;
         for(int limit=21;limit!=0;limit--)
    BufferedReader selecter = new BufferedReader (new InputStreamReader(System.in));
    String column1;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=1;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=1;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=1;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=1;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=1;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=1;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=1;
    cup6=cup6-1;
    System.out.println();
    BufferedReader selecter2 = new BufferedReader (new InputStreamReader(System.in));
    String column2;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=2;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=2;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=2;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=2;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=2;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=2;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=2;
    cup6=cup6-1;
    System.out.println();
    System.out.println();
    catch (Exception E){
    System.out.println("Error with input");
    System.out.println("Would you like to play again");
    try{
    String value;
    BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
    // Scanner scan = new Scanner(System.in);
    System.out.println("Enter yes to play or no to quit");
    // value = scan.nextLine();
    // String value2;
    value = reader.readLine();
    //value2 = reader.readLine();
    if (value.equals("yes"))
    System.out.println("Start again");
    StartGame(); // calling the StartGame method to play a game once more
    else if (value.equals("no"))
    System.out.println("No more games to play");
    // System.exit(0);
    else
    System.exit(0);
    System.out.println();
    catch (Exception e){
    System.out.println("Error with input");
    finally
    System.out.println(" playing done");
    //StartGame();
    //check for horizontal win
    public int hasWon()
    int status = 0;
    for (int row=0; row<6; row++)
    for (int col=0; col<4; col++)
    if (ConnectFourArray[col][row] != 0 &&
    ConnectFourArray[col][row] == ConnectFourArray[col+1][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+2][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+3][row])
    //status = true;//int winner;
    if(status == player1)
    System.out.println("Player 1 is the winner");
    else if(status == player2)
    System.out.println("Player 2 is the winner" );
    }//end inner for loop
    }// end outer for loop
    } // end method Winner
    return status;
    }//end class
    ClassConnectFour which designs the board........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class ClassConnectFour
         //Player player1;
         //Player player2;
         public ClassConnectFour()
              //this.player1 = player1;
    public void DrawBoard()
    int[][] ConnectFourArray = new int[6][7] ;
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    }//end class
    TestConnetFour class which uses most of the above class..................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class TestConnectFour
    public static void main(String[] args)
    ClassConnectFour cf = new ClassConnectFour();
    cf.DrawBoard();
    Player1 player1 = new Player1();
    Player2 player2 = new Player2();
    player1.move();
    player2.move();
    System.out.println("Number 1 belongs to player " + player1.name());
    System.out.println("Number 2 belongs to player " + player2.name());
    PlayGame pg = new PlayGame();
    pg.StartGame();
    pg.hasWon();
    //pg.Play();
    //System.out.println(player.name());
    //System.out.println(player2.name());
    }// end main
    }//end class
    I am sorry for all this junk code but I only understand it this way. Your urgent help is required. Looking forward to your reply.
    Thanks in advance.
    Koonda
    //

    Hi,
    Thanks for your help but I really don't understand the table lookup algorithm. Could you please send me some code to implement that.
    I will send you the formatted code as well
    Thanks for your help.
    looking forward to your reply.
    Koonda
    Hi all,
    I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the internet which helped me little bit. But there are lot of problems I am facing developing the whole game. I have drawn the Board and the two players can play. The players numbers can fill the board, but I have problem implementing the winner for the game. I need to implement the hasWon() method for Horizontal win, Vertical win and Diagonal win. I also found some code examples on the net but I was unable to make it working. I have 5 classes and one interface which I m implementing. The main problem is how to implement the hasWon() method in the PlayGame class below with Horizontal, vertical and diagonal moves.
    Sorry there is so much code.
    This the interface I must implement, but now I am only implementing the int move() of this interface. I will implement the rest later after solving the winner problem with your help.
    Interface code..............
    interface Player {
    void init (Boolean color);
    String name ();
    int move ();
    void inform (int i);
    Player1 class......................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player1 implements Player
    public Player1()
    public int move()
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player1;
    System.out.println ("What is your Number, player 1?");
    player1 = scan.nextInt();
    System.out.println ("Hey number"+player1+" are you prepared to CONNECT FOUR");
    System.out.println();
    return player1;
    //Player.move();
    //return player1;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "Koonda";
    }//end player1 class
    Player2 class...........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player2 implements Player
    public int move()
    //int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    // cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
    //int num1, num2;
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player2;
    System.out.println ("What is your Number, player 2?");
    player2 = scan.nextInt();
    System.out.println ("Hey "+player2+" are you prepared to CONNECT FOUR");
    System.out.println();
    //return player1;
    return player2;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "malook";
    }//end player1 class
    PlayGame class which contains all the functionality.........................................................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class PlayGame
    //Player player1;
    //Player player2;
    int [][]ConnectFourArray;
    boolean status;
    int winner;
    int player1;
    int player2;
    public PlayGame()
    //this.player1 = player1;
    //this.player2 = player2;
    public void StartGame()
    try{
    // int X = 0, Y = 0;
    //int value;
    int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
    int[][] ConnectFourArray = new int[6][7];
    int num1, num2;
    for(int limit=21;limit!=0;limit--)
    BufferedReader selecter = new BufferedReader (new InputStreamReader(System.in));
    String column1;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=1;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=1;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=1;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=1;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=1;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=1;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=1;
    cup6=cup6-1;
    System.out.println();
    BufferedReader selecter2 = new BufferedReader (new InputStreamReader(System.in));
    String column2;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=2;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=2;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=2;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=2;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=2;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=2;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=2;
    cup6=cup6-1;
    System.out.println();
    System.out.println();
    catch (Exception E){
    System.out.println("Error with input");
    System.out.println("Would you like to play again");
    try{
    String value;
    BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
    // Scanner scan = new Scanner(System.in);
    System.out.println("Enter yes to play or no to quit");
    // value = scan.nextLine();
    // String value2;
    value = reader.readLine();
    //value2 = reader.readLine();
    if (value.equals("yes"))
    System.out.println("Start again");
    StartGame(); // calling the StartGame method to play a game once more
    else if (value.equals("no"))
    System.out.println("No more games to play");
    // System.exit(0);
    else
    System.exit(0);
    System.out.println();
    catch (Exception e){
    System.out.println("Error with input");
    finally
    System.out.println(" playing done");
    //StartGame();
    //check for horizontal win
    public int hasWon()
    int status = 0;
    for (int row=0; row<6; row++)
    for (int col=0; col<4; col++)
    if (ConnectFourArray[col][row] != 0 &&
    ConnectFourArray[col][row] == ConnectFourArray[col+1][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+2][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+3][row])
    //status = true;//int winner;
    if(status == player1)
    System.out.println("Player 1 is the winner");
    else if(status == player2)
    System.out.println("Player 2 is the winner" );
    }//end inner for loop
    }// end outer for loop
    } // end method Winner
    return status;
    }//end class
    ClassConnectFour which designs the board........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class ClassConnectFour
    //Player player1;
    //Player player2;
    public ClassConnectFour()
    //this.player1 = player1;
    public void DrawBoard()
    int[][] ConnectFourArray = new int[6][7] ;
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    }//end class
    TestConnetFour class which uses most of the above class..................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class TestConnectFour
    public static void main(String[] args)
    ClassConnectFour cf = new ClassConnectFour();
    cf.DrawBoard();
    Player1 player1 = new Player1();
    Player2 player2 = new Player2();
    player1.move();
    player2.move();
    System.out.println("Number 1 belongs to player " + player1.name());
    System.out.println("Number 2 belongs to player " + player2.name());
    PlayGame pg = new PlayGame();
    pg.StartGame();
    pg.hasWon();
    //pg.Play();
    //System.out.println(player.name());
    //System.out.println(player2.name());
    }// end main
    }//end classI am sorry for all this junk code but I only understand it this way. Your urgent help is required. Looking forward to your reply.
    Thanks in advance.
    Koonda

  • URGENT HELP REQUIRED!

    I am having problems implementing a username validaion bean for my login system. Every time I click my login icon on my main JSP page the login JSP page does not appear except one of the error JSP pages.
    How can I correct this problem?
    Does the code below look correct?
    Below is the codes for the Username Validation Bean :
    LOGIN.JSP
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="com.mysql.jdbc.*"%>
    <%@ page errorPage="badLogin.jsp"%>
    <%@ page import="gcd.UserNameValidationBean"%>
    <%
    Class.forName("com.mysql.jdbc.Driver");
    java.sql.Connection connection=java.sql.DriverManager.getConnection("jdbc:mysql://localhost/gcdBB_db");
    java.sql.Statement statement = connection.createStatement();
    Enumeration parameters = request.getParameterNames();
    if(parameters.hasMoreElements())
    String usernameValue = request.getParameter("username");
    String passwordValue = request.getParameter("password");
    statement.executeUpdate("INSERT INTO users (username,password) VALUES ('"+usernameValue+"','"+passwordValue+"')");
    %>
    GOODLOGIN.JSP
    <%@ page errorPage="badLogin.jsp"%>
    <%@ page import="gcd.UserNameValidationBean"%>
    <% UserNameValidationBean validationBean = new UserNameValidationBean();
    if(request.getParameter("username")!=null)
    validationBean.validateUserNameBean(request.getParameter("username"));
    %>
    <%=request.getParameter("username")%>
    USERNAMEVALIDATIONBEAN.JAVA
    package gcd;
    public class UserNameValidationBean
    public UserNameValidationBean(){}
    public boolean validateUserName(String userName) throws InvalidUserNameException
    if(userName.length() < 32)
    throw new InvalidUserNameException("User Name Invalid: " + userName);
    return true;
    INVALIDUSERNAMEEXCEPTION.JAVA
    package gcd;
    public class InvalidUserNameException extends Exception
    public InvalidUserNameException(String message)
    super(message);
    I need urgent help to get this working!

    Here is code for badLogin.jsp and badLoginWithExceptonObject:
    BADLOGIN.JSP
    <HTML><HEAD><TITLE>Login Failure</TITLE></HEAD>
    <BODY bgcolor="#FF9900">
    <H1></H1>
    <font face="Arial" size="3">Sorry but you either entered an incorrect username
    or password </font>
    <P><font face="Arial" size="3">Try Again</font>
    </BODY></HTML>
    BADLOGINWITHEXCEPTIONOBJECT.JSP
    <HTML><HEAD><TITLE>Check User Login Against Parameters</TITLE></HEAD>
    <BODY bgcolor="#FF9900">
    <%@ page isErrorPage = "true"%>
    <P><font face="Arial" size="3">Error =</font> <%= exception.getMessage()%> <% PrintWriter writer = new PrintWriter(out); %>
    <P><font face="Arial" size="3">Stack =</font> <% exception.printStackTrace(writer); %>
    <P><font face="Arial" size="3">Try Again</font>
    </BODY></HTML>

  • Urgent help required in migration

    Hello,
    I am stuck on 77% of r3load process my all 15/16 processes are finished successfully only one process has failed I have cut paste the log (SAPAPPL1.log) below of the same. Request your urgent help.
    DbSl Trace: Connecting via TNS_ADMIN=/oracle/F01/920_64/network/admin, tnsname=F01
    DbSl Trace: Got NLS_LANG=AMERICAN_AMERICA.US7ASCII from environment
    DbSl Trace: Now I'm connected to ORACLE
    DbSl Trace: Database instance F01 is running on e027pae0 with ORACLE version 9.2.0.7.0
    trying to restart import ###
    (RIM) INFO: table "BKPF" truncated
    restart finished ###
    #START: 20070530101004
    TAB: BKPF
    (RD) ERROR: missing last block number for table "BKPF" in directory file "/sapcd/EXPDIR/DATA/SAPAPPL1.TOC"
    #STOP: 20070530101004
    Thanks & Regards,
    Bhushan

    Did you split the files?
    It seems that export file for this table got corrupt.
    Unfortunately, you ahve to start again. I had a similar problem and had to do it again.

  • Urgent HELP required on forming the Matrix of data using PL/SQL

    Hi All,
    I'm new to this thread and require your urgent help in this regard.
    I've got a requirement for building a 5000 X 5000 matrix using PL/SQL. My original data tables have 5000 rows each and I need to do a correlation analysis using this data and need to store in a physical table and not in-memory. Is this feat achievable using mere PL/SQL? I understand that Oracle DB has a limitation of 1000 columns(but not sure) and hence I'd like to know whether there is any work-around for such scenarios. If not, what are the other alternative method(s) to achieve this feat? Do I need to use any 3rd party tools to get this done? An early reply from the experts is highly appreciated.
    Thanking you all Gurus in advance.
    Rgds
    Sai

    Welcome to OTN!
    I'll get to your quesiton in a moment, but first some welcome information. Many OTN posters consider it impolite to mark threads as "urgent". We are volunteers and have jobs of our own to do without people we don't know making demands. You are brand new and deserve some patience but please understand this. It is very likely before I finish this post someone will complain about the word "urgent" in your subject.
    On to more interesting things :)
    You can do the matrix, but are out of luck with a 5000 x 5000 table because Oracle only allows 1000 columns per table. There are ways to work around this.
    How do do the matrix depends on what you want to do. You can do this different ways. You can create a table beforehand and use PL/SQL or simple SQL to populate it, or use the CREATE TABLE AS syntax to create and populate it in one step if you can get the underlying SQL to work the way you want, something like
    create table my_table as
      select a.*, b.*
        from table1 a, table2 bcan populate a matrix from 2 tables with an intentional cartesian join (the WHERE clause was left out intentionally, provided your data is already in the data base.
    If not you can use a PL/SQL routine to populate the data.
    There are a couple of ways to solve the 1000 column limit. The easiest way might be to have 5 collections of 1000 columns each. A more complicated but more elegant soltion would be to have nested collections, allowing 2 colliections that you can loop through - a collection of collections. Nested collections can be hard to work with. A third way would be to use nested tables in the database but I personally do not like them and the insert, update, and delete statements for nested tables are hard to use.
    I'm not going to give a code example because I am not sure which solution is best for you. If you have further questions post them.

  • Urgent Help required! - Storing the XML as String instead as a file

    Hi,
    I need urgent help on this.
    I have an XML file. I have used org.w3c.dom to build dom and manipulate the XML file.
    I have updated the values for some of the nodes and I have deleted some of the unwanted nodes.
    I am able to save the output of the DOM as another XML file using
    either transform class or XMLSerializer with OutputFormatter class.
    But my requirement is to save the output of the DOM into a String instead of a file.
    When I save it in String, I need to have the following XML decalration and DOCTYPE declration also with it.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE Test SYSTEM "Test.dtd">
    Can anyone pls help me in this??
    Thanks in Advance. Expecting some inpputs pls....!
    Regards,
    Gayathri.

    hi,
    i think this is what u want
        public static String getXmlString(Document d) {
          StringWriter strResponse = null;
          try {
             OutputFormat format  = new OutputFormat(d);
             strResponse = new StringWriter();
             XMLSerializer serial = new XMLSerializer( strResponse, format );
             serial.asDOMSerializer();
             serial.serialize(d.getDocumentElement());
          catch (Exception e) {
            System.out.println(e.toString());
          return strResponse.toString();
    }HTH
    vasanth-ct

  • Urgent Help Required - Video Not playing on IE11 and Firefox

    Hi,
    I need Urgent Help , I am trying to Play this Presentation on IE 11 and Firefox and it doesn't play the Video part which is FLV and f4v formats.
    I have been googeling it but couldn't find a solution so far ,Can anyone please help , its really urgent as I am done with the Project ,and this is the last bit which I have been struggling with for a while now.
    Here is the HTML Code I am using :
    <----------------------------------------------------------------------------------------- ----------------------------------------------------------------->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
      <title>index</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <style type="text/css" media="screen">
      html, body { height:100%; background-color: #ffffff;}
      body { margin:0; padding:0; overflow:hidden; }
      #flashContent { width:100%; height:100%; }
      </style>
    </head>
    <body>
      <div id="flashContent">
       <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="800" height="600" id="index" align="middle">
        <param name="movie" value="index.swf" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#ffffff" />
        <param name="play" value="true" />
        <param name="loop" value="true" />
        <param name="wmode" value="window" />
        <param name="scale" value="showall" />
        <param name="menu" value="true" />
        <param name="devicefont" value="false" />
        <param name="salign" value="" />
        <param name="allowScriptAccess" value="sameDomain" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="index.swf" width="800" height="600">
         <param name="movie" value="index.swf" />
         <param name="quality" value="high" />
         <param name="bgcolor" value="#ffffff" />
         <param name="play" value="true" />
         <param name="loop" value="true" />
         <param name="wmode" value="window" />
         <param name="scale" value="showall" />
         <param name="menu" value="true" />
         <param name="devicefont" value="false" />
         <param name="salign" value="" />
         <param name="allowScriptAccess" value="sameDomain" />
        <!--<![endif]-->
         <a href="http://www.adobe.com/go/getflash">
          <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
         </a>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
       </object>
      </div>
    </body>
    </html>
    <----------------------------------------------------------------------------------------- ----------------------------------------------------------------->

    Any Help in this Regards will be highly appreciated

  • Urgent help required: Query regarding LC Variables

    Hi All
    Sometime earlier I was working on a performance issue raised by a customer. It was shell script that was taking almost 8-9 hrs to complete. During my research I came across a fact that there were some variables which were not set, the LC variables were impacting the sort funnel operations because of which the script was taking a long time to execute.
    I asked them to export the following commands, after which the program went on smoothly and finished in a couple of mins:
    export LC_COLLATE=en_US.ISO8859-1
    export LC_MESSAGES=C
    export LC_MONETARY=en_US.ISO8859-1
    export LC_MONETARY=en_US.ISO8859-1
    export HZ=100
    export LC_CTYPE=en_US.ISO8859-1
    export LANG=en_US.UTF-8
    Later I did recover that setting the LC_COLLATE to C, is not helping and the program was again taking a lot of time. Few questions that I want to ask are:
    1. Can someone please tell me, what each of these variable mean and how these values make a difference.
    2. When I exported LC_COLLATE=en_US.ISO8859-1, it worked fine, but when i tried with the defalut value LC_COLLATE=C, then why the program didnt work.
    As this issue is still going on, hence I would request All to provide their valuable inputs and let me know as much as possible.
    Appreciate your help in this regard.
    Thanks
    Amit
    Hi All
    A new development in this regard. The customer has send us a screen shot in which they were trying to export the locale variable using the commands which I have pasted above. I can see in the screen shot that while exporting LC_COLLATE and LC_TYPE, they get a message that ""ksh: export: couldn't set locale correctly"".
    Request everyone to please give their inputs as it's a bit urgent.
    Thanks for all the help in advance.
    Thanks
    Amit
    Some help required please...
    Edited by: amitsinhaengg on Jul 22, 2009 2:03 AM
    Edited by: amitsinhaengg on Jul 22, 2009 2:06 AM

    LC_CTYPE
    Controls the behavior of character handling functions.
    LC_TIME
    Specifies date and time formats, including month names, days of the week, and common full and abbreviated representations.
    LC_MONETARY
    Specifies monetary formats, including the currency symbol for the locale, thousands separator, sign position, the number of fractional digits, and so forth.
    LC_NUMERIC
    Specifies the decimal delimiter (or radix character), the thousands separator, and the grouping.
    LC_COLLATE
    Specifies a collation order and regular expression definition for the locale.
    LC_MESSAGES
    Specifies the language in which the localized messages are written, and affirmative and negative responses of the locale (yes and no strings and expressions).
    You can use command
    # locale -k LC_CTYPE
    to see more detail about each type.

  • Sending Details -- URGENT HELP REQUIRED! ! !

    Hi,
    I have a programming problem which I need urgent help with....
    1.) I firstly have a HTML file which a user will fill out 3 fields on and submit.
    2.) A servlet will get these parameters, validate some information and update a database.
    Problem Part Needs to send on these details to another servlet which will be located on a seperate server.
    Is there a way of doing a submit like function without an actual submit, as this will all be done away from the user.
    Was initially going to use:
    ctx = getServletContext();
    rd = ctx.getRequestDispatcher("https://localhost:8443/servlet/FileName");But found out you can only do this with files in the same immediate location!
    3.) Next servlet will accept in the same details as 2, and do some more functions and database updating. Before again sendin on some details to another servlet! (so same problem as in 2).
    4.) Accepts in details from 3 and updaes database!
    So does anbody have any ideas how this can be done??
    Any help greatly appreciated.
    DBM.

    Whats so wrong with posting in more than one forum? I
    need to get this done in the next few hours and im not
    exaclt the most qualified java developer in the
    world!!
    sorry if its such a crime! :o(Should be obvious. You post exact question in forum A and B. Person A answers you on forum A. Person B, not knowing you were already answered because he's looking at the post on forum B, answers you on forum B, thus having wasted his time.

  • Unable to view dencrypted JEPG files! PLEASE HELP!

    I made the mistake of encryping my files on my SD card on my phone when i first brought my BB Z10. I was trying to back up my pictures on my SD card to my computer using a SD card reader and then i was unable to to see them on my picture view on my PC. The message "files is unsupported....etc." came up so i decided that there could be an issue with my SD card which is disallowing me to use it on my computer (completely forgetting it was the encryption i had on my BB). So i decided to transfer/move all my data and files from my SD card to my computer (encrypted) and format my SD card. Then when it was formatted i transfered my files back on to the SD card and now i cannot view my pictures on either my computer or my phone.
    Is there any possible way in which i can view my pictures again, i have not decrypted them but i still cannot see them. When viewing the properties of the files on my phone or computer it still say it has data (1MB for instance). They also do not have .REM after the file name.
    Any advice would be greatful, Thank You.

    Hi and Welcome to the Community!
    Sorry...nope. Encryption on BB is a very secure system. What you have done has the result of now locking those files from visibility anywhere at all. They are lost.
    Sorry.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Insert and update a data block which is based on view--urgent help required

    Hi experts,
    I created a view(A_VIEW) which is based on a union select. I have created a data block A_VIW_BLOCK which is based on this view. I need to insert/update one of the base tablesfor A_VIEW through this data block. I also need to be able to make a query through all the fields in the view.
    The questions are:
    1.Can it be done at all?
    2. What properties need to be set?
    3. If can't be done, what the best approach to achieve this?
    Thanks in advance!!
    Michael

    hi
    try something like this.
    CREATE TABLE demo_tab (
    person_id NUMBER(3),
    first_name VARCHAR2(20),
    last_name VARCHAR2(20));
    CREATE OR REPLACE VIEW upd_view AS
    SELECT * FROM demo_tab;
    INSERT INTO demo_tab
    (person_id, first_name, last_name)
    VALUES
    (1, 'Daniel', 'Morgan');
    INSERT INTO demo_tab
    (person_id, first_name, last_name)
    VALUES
    (2, 'Helen', 'Lofstrom');
    COMMIT;
    SELECT * FROM upd_view;
    UPDATE upd_view
    SET person_id = person_id * 10;
    SELECT * FROM upd_view;
    desc user_updatable_columns
    SELECT table_name, column_name, updatable, insertable, deletable
    FROM user_updatable_columns
    WHERE table_name IN (
       SELECT view_name
       FROM user_views);
    SQL> create table dummy (f1 number);
    Table created.
    SQL> create view dummy_v 
    2  as 
    3  select f1 from dummy 
    4  union all  
    5  select f1 from dummy;
    View created.
    SQL> create trigger dummy_v_it 
    2  instead of insert 
    3  on dummy_v 
    4  for each row 
    5  begin 
    6    insert into dummy values (:NEW.f1); 
    7  end; 
    8  /
    Trigger created.
    SQL> insert into dummy_v values (1);
    1 row created.
    SQL> select * from dummy_v;       
    F1
    1        
    1
    SQL> select *
      2  from user_updatable_columns
      3  where table_name = 'DUMMY_V';
    OWNER    TABLE_NAME   COLUMN_NAME  UPD INS DEL
    FORBESC  DUMMY_V      F1            NO  NO  NOforms settings.
    Enforce Primary Key - No
    Query Allowed - Yes
    Query datasource Name - V_TSFDETAIL
    Insert Allowed - Yes
    Update Allowed - Yes
    Delete Allowed - Yes
    Locking Mode - Automatic
    Key Mode - Automatic
    do not forget to create synonyms.
    hope this helps.
    sarah

  • I am unable to view my account information in itunes----"Help Please"

    Also as of the 16 of this month I'm not receiving my email by clicking the mail icon.
    Ohh and I can't download any apps on my iphone.
    Any help would be greatly appreciated.
    Johnny.

    Hi BA,
    That's a lot of different problems; you might get a better response by dividing the specific problems into the specific forums that they are related to. This forum is only for iTunes.
    Regarding your title problem (not being able to view your account information in iTunes), can you give more details? What happens when you click on the account e-mail in the upper right corner of the iTunes Music Store? Are you able to sign in?

  • Cisco MCS 7835i3 CM 7.1.5, unable to boot giving ECC bit DIMM Error, Urgent help required

    Hi,
    One of our client is using CUCM 7.1.5, on MCS 7835i3. CM is now unable to boot. giving ECC bit DIMM error. We have serviced MCS, then started, it started working but only one hard light is blinking. Is there any problem with hard or something else. As well show hardware logs are attached.
    Please find attached snapshots.
    Regards,
    Humza Khan

    Hi ,
    Try to reseat the RAID controller  i it helps else follow what Terry has said.
    http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5074114
    http://public.dhe.ibm.com/systems/support/system_x_pdf/ibm_doc_sraidmr_10i-10.03_user-guide.pdf
    regds,
    aman

  • URGENT HELP REQUIRED _ Creating Labels for Triangle

    Hi everyone... the code below is my application - Pythagoras Theorem.. or rather displaying it.. But i have not been able to get the Vertex of the triangle Labelled as A B C... I need to do that and change the Triangle Table data to A B C insted of Horizontal Vertical and Hypotenuise and as the triangle is stretched on screen A B And C keep moving as well ...
    Besides i need to Show this in the tabel
    - Values of A ^ 2 , B^2 and C ^2 as welll as a row showing A^2+B^2 = C^2
    the code is as follows..
    This is the main class called Geometry
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import java.lang.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import java.awt.FileDialog;
    import java.io.*;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JFrame;
    public class Geometry {
        CardLayout cards;
        JPanel panel;
        public Geometry() {
            cards = new CardLayout();
            panel = new JPanel(cards);
            addCards();
            JFrame f = new JFrame("Geometry");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setJMenuBar(getMenuBar());
            f.getContentPane().add(panel);
            f.setSize(500,500);
            f.setLocation(0,0);
            f.setVisible(true);
            f.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseMoved(MouseEvent e) {
                   System.out.println("Mouse  " + e.getX() +","  + e.getY());
                public void mouseDragged(MouseEvent e) {
                    System.out.println("Draggg: x=" + e.getX() + "; y=" + e.getY());
            //            public void mouseMoved(MouseEvent me) {
            //                System.out.println("Moving: x=" + me.getX() + "; y=" + me.getY());
            //        panel.addMouseMotionListener(
            //        new MouseMotionListener() { //anonymous inner class
            //            //handle mouse drag event
            //           public void mouseDragged(MouseEvent me) {
            //               setTitle("Dragging: x=" + me.getX() + "; y=" + me.getY());
            //            public void mouseMoved(MouseEvent me) {
            //                setTitle("Moving: x=" + me.getX() + "; y=" + me.getY());
        private void addCards() {
            // card one
            TriangleModel tri = new TriangleModel(175,100,175,250,325,250);
            TriangleView view  = new TriangleView(tri);
            JPanel panelOne = new JPanel(new BorderLayout());
            panelOne.add(view.getUIPanel(), "North");
            panelOne.add(view);
            panelOne.add(view.getTablePanel(), "South");
            panelOne.setName("Pythagoras's Theorem");
            panel.add("Pythagoras's Theorem", panelOne);
                  view.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                 public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse at " + e.getX() +","  + e.getY());
               public void mouseDragged(MouseEvent e) {
                   System.out.println("Dragging: x=" + e.getX() + "; y=" + e.getY());
            // card two
            TestModel trin = new TestModel(175,100,175,250,325,250);
            TestView viewn  = new TestView(trin);
            JPanel panelTwo = new JPanel(new BorderLayout());
            panelTwo.add(viewn.getUIPanel(), "North");
          // panelTwo.setBackground(Color.blue);
            panelTwo.setName("Similar Triangles");
            panelTwo.add(viewn);
            panelTwo.add(viewn.getTablePanel(), "South");
                  viewn.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                 public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse at " + e.getX() +","  + e.getY());
               public void mouseDragged(MouseEvent e) {
                   System.out.println("Dragging: x=" + e.getX() + "; y=" + e.getY());
            panel.add("Similar Triangles", panelTwo);
            JPanel panelThree = new JPanel();
            panelThree.setBackground(Color.white);
            panelThree.setName("Circle Theorem1");
            panel.add("Circle Theorem1", panelThree);
        private JMenuBar getMenuBar() {
            JMenu File = new JMenu("File");
            JSeparator separator1 = new JSeparator();
            JMenuItem Open = new JMenuItem("Open");
    //         Open.addActionListener(new java.awt.event.ActionListener() {
    //            public void actionPerformed(java.awt.event.ActionEvent evt) {
    //                openActionPerformed(evt);
            JMenuItem Save = new JMenuItem("Save");
            JMenuItem Print = new JMenuItem("Print");
            JMenuItem Exit = new JMenuItem("Exit");
            Exit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ExitActionPerformed(evt);
            JMenu theorem = new JMenu("Theorem");
            ActionListener l = new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    JMenuItem item = (JMenuItem)e.getSource();
                    String name = item.getActionCommand();
                    cards.show(panel, name);
            Component[] c = panel.getComponents();
            for(int j = 0; j < panel.getComponentCount(); j++) {
                String name = c[j].getName();
                JMenuItem item = new JMenuItem(name);
                item.setActionCommand(name);
                item.addActionListener(l);
                theorem.add(item);
            JMenuBar menuBar = new JMenuBar();
            JMenuBar menuBar1 = new JMenuBar();
            menuBar.add(File);
            File.add(Open);
            File.add(separator1);
            File.add(Save);
            File.add(Print);       
            File.add(Exit);
            menuBar.add(theorem);
            return menuBar;
    //    private void openActionPerformed(java.awt.event.ActionEvent evt) {
    //        FileDialog fileDialog = new FileDialog(this, "Open...", FileDialog.LOAD);
    //        fileDialog.show();
    //        if (fileDialog.getFile() == null)
    //            return;
    //        fileName = fileDialog.getDirectory() + File.separator + fileDialog.getFile();
    //        FileInputStream fis = null;
    //        String str = null;
    //        try {
    //            fis = new FileInputStream(fileName);
    //            int size = fis.available();
    //            byte[] bytes = new byte [size];
    //            fis.read(bytes);
    //            str = new String(bytes);
    //        } catch (IOException e) {
    //        } finally {
    //            try {
    //                fis.close();
    //            } catch (IOException e2) {
    //        if (str != null)
    //            textBox.setText(str);
        private void ExitActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
            System.exit(0);
        public static void main(String[] args) {
            new Geometry();
    }import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    public class Triangle
    public Triangle()
    TriangleModel tri = new TriangleModel(175,100,175,250,325,250);
    TriangleView view = new TriangleView(tri);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(view.getUIPanel(), "North");
    f.getContentPane().add(view);
    f.getContentPane().add(view.getTablePanel(), "South");
    f.setSize(500,500);
    f.setLocation(200,200);
    f.setVisible(true);
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import javax.swing.JTable;
    import javax.swing.event.MouseInputAdapter;
    * TriangleControl.java
    * Created on 06 February 2005, 01:19
    * @author  Rahindra Naidoo
    public class TriangleControl extends MouseInputAdapter
        TriangleView view;
        TriangleModel model;
        Point start;
        boolean dragging, altering;
        Rectangle lineLens;            // used for line selection
        public TriangleControl(TriangleView tv)
            view = tv;
            model = view.getModel();
            dragging = altering = false;
            lineLens = new Rectangle(0, 0, 6, 6);
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            lineLens.setLocation(p.x - 3, p.y - 3);
            // are we over a line
            if(model.isLineSelected(lineLens))
                start = p;
                altering = true;
            // or are we within the triangle
            else if(model.contains(p))
                start = p;
                dragging = true;
        public void mouseReleased(MouseEvent e)
            altering = false;
            dragging = false;
            view.getCentroidLabel().setText("centroid location: " +
                                             model.findCentroid());
            view.repaint();  // for the construction lines
        public void mouseDragged(MouseEvent e)
            Point p = e.getPoint();
            if(altering)
                int x = p.x - start.x;
                int y = p.y - start.y;
                model.moveSide(x, y, p);
                updateTable();
                view.repaint();
                start = p;
            else if(dragging)
                int x = p.x - start.x;
                int y = p.y - start.y;
                model.translate(x, y);
                view.repaint();
                start = p;
        private void updateTable()
            String[] lengths = model.getLengths();
            String[] squares = model.getSquares();
            String[] angles  = model.getAngles();
            JTable table = view.getTable();
            for(int j = 0; j < angles.length; j++)
                table.setValueAt(lengths[j], 1, j + 1);
                table.setValueAt(squares[j], 2, j + 1);
                table.setValueAt(angles[j],  3, j + 1);
            view.getCentroidLabel().setText("centroid location: " +
                                             model.findCentroid());
    * TriangleModel.java
    * Created on 06 February 2005, 01:18
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    * @author  Rahindra Naidoo
    public class TriangleModel                      //  (x1, y1)
    {                                         //      |\
        static final int SIDES = 3;         //      | \
        private int cx, cy;                  //      |  \
        Polygon triangle;                     //      |_ _\ (x3, y3)
        int selectedIndex;                   //  (x2, y2)
        NumberFormat nf;
        Line2D[] medians;
        Point2D centroid;
        public TriangleModel(int x1, int y1, int x2, int y2, int x3, int y3)
            int[] x = new int[] { x1, x2, x3 };
            int[] y = new int[] { y1, y2, y3 };
            triangle = new Polygon(x, y, SIDES);
            nf = NumberFormat.getNumberInstance();
            nf.setMaximumFractionDigits(1);
        public boolean contains(Point p)
            // Polygon.contains doesn't work well enough
            return (new Area(triangle)).contains(p);
        public boolean isLineSelected(Rectangle r)
            Line2D line = new Line2D.Double();
            for(int j = 0; j < SIDES; j++)
                int[] x = triangle.xpoints;
                int[] y = triangle.ypoints;
                int x1 = x[j];
                int y1 = y[j];
                int x2 = x[(j + 1) % SIDES];
                int y2 = y[(j + 1) % SIDES];
                line.setLine(x1, y1, x2, y2);
                if(line.intersects(r))
                    selectedIndex = j;
                    return true;
            selectedIndex = -1;
            return false;
         * Only works for right triangle with right angle at (x2, y2)
        public void moveSide(int dx, int dy, Point p)
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            switch(selectedIndex)
                case 0:
                    x[0] += dx;
                    x[1] += dx;
                    break;
                case 1:
                    y[1] += dy;
                    y[2] += dy;
                    break;
                case 2:
                    double rise  = y[2] - y[0];
                    double run   = x[2] - x[0];
                    double slope = rise/run;
                    // rise / run == (y[2] - p.y) / (x[2] - p.x)
                    x[2] = p.x + (int)((y[2] - p.y) / slope);
                    // rise / run == (p.y - y[0]) / (p.x - x[0])
                    y[0] = p.y - (int)((p.x - x[0]) * slope);
        public void translate(int dx, int dy)
            triangle.translate(dx, dy);
        public Polygon getTriangle()
            return triangle;
        public String findCentroid()
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            // construct the medians defined as the line from
            // any vertex to the midpoint of the opposite line
            medians = new Line2D[x.length];
            for(int j = 0; j < x.length; j++)
                int next = (j + 1) % x.length;
                int last = (j + 2) % x.length;
                Point2D vertex = new Point2D.Double(x[j], y[j]);
                // get midpoint of line opposite vertex
                double dx = ((double)x[last] - x[next])/2;
                double dy = ((double)y[last] - y[next])/2;
                Point2D oppLineCenter = new Point2D.Double(x[next] + dx,
                                                           y[next] + dy);
                medians[j] = new Line2D.Double(vertex, oppLineCenter);
            // centroid is located on any median 2/3 the way from the
            // vertex (P1) to the midpoint (P2) on the opposite side
            double[] lengths = getSideLengths();
            double dx = (medians[0].getX2() - medians[0].getX1())*2/3;
            double dy = (medians[0].getY2() - medians[0].getY1())*2/3;
            double px = medians[0].getX1() + dx;
            double py = medians[0].getY1() + dy;
            //System.out.println("px = " + nf.format(px) +
            //                 "\tpy = " + nf.format(py));
            centroid = new Point2D.Double(px, py);
            return "(" + nf.format(px) + ",  " + nf.format(py) + ")";
        public String[] getAngles()
            double[] lengths = getSideLengths();
            String[] vertices = new String[lengths.length];
            for(int j = 0; j < lengths.length; j++)
                int opp  = (j + 1) % lengths.length;
                int last = (j + 2) % lengths.length;
                double top = lengths[j] * lengths[j] +
                             lengths[last] * lengths[last] -
                             lengths[opp] * lengths[opp];
                double divisor = 2 * lengths[j] * lengths[last];
                double vertex = Math.acos(top / divisor);
                vertices[j] = nf.format(Math.toDegrees(vertex));
            return vertices;
        public String[] getLengths()
            double[] lengths = getSideLengths();
            String[] lengthStrs = new String[lengths.length];
            for(int j = 0; j < lengthStrs.length; j++)
                lengthStrs[j] = nf.format(lengths[j]);
            return lengthStrs;
        public String[] getSquares()
            double[] lengths = getSideLengths();
            String[] squareStrs = new String[lengths.length];
            for(int j = 0; j < squareStrs.length; j++)
                squareStrs[j] = nf.format(lengths[j] * lengths[j]);
            return squareStrs;
        private double[] getSideLengths()
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            double[] lengths = new double[SIDES];
            for(int j = 0; j < SIDES; j++)
                int next = (j + 1) % SIDES;
                lengths[j] = Point.distance(x[j], y[j], x[next], y[next]);
            return lengths;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    * TriangleView.java
    * Created on 06 February 2005, 01:21
    public class TriangleView extends JPanel
        private TriangleModel model;
        private Polygon triangle;
        private JTable table;
        private JLabel centroidLabel;
        private boolean showConstruction;
        TriangleControl control;
        public TriangleView(TriangleModel model)
            this.model = model;
            triangle = model.getTriangle();
            showConstruction = false;
            control = new TriangleControl(this);
            addMouseListener(control);
            addMouseMotionListener(control);
        public void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.draw(triangle);
            if(model.medians == null)
                centroidLabel.setText("centroid location: " + model.findCentroid());
            // draw medians and centroid point
            if(showConstruction && !control.dragging)
                g2.setPaint(Color.red);
                for(int j = 0; j < 3; j++)
                    g2.draw(model.medians[j]);
                g2.setPaint(Color.blue);
                g2.fill(new Ellipse2D.Double(model.centroid.getX() - 2,
                                             model.centroid.getY() - 2, 4, 4));
        public TriangleModel getModel()
            return model;
        public JTable getTable()
            return table;
        public JLabel getCentroidLabel()
            return centroidLabel;
        public JPanel getUIPanel()
            JCheckBox showCon = new JCheckBox("show construction");
            showCon.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    boolean state = ((JCheckBox)e.getSource()).isSelected();
                    showConstruction = state;
                    repaint();
            JPanel panel = new JPanel();
            panel.add(showCon);
            return panel;
        public JPanel getTablePanel()
            String[] headers = new String[] { "", "", "", "" };
            // row and column data labels
            String[] rowHeaders = {
                "sides", "lengths", "squares", "angles", "degrees"
            String[] sidesRow = { "vertical", "horizontal", "hypotenuse" };
            String[] anglesRow = { "hyp to ver", "ver to hor", "hor to hyp" };
            // collect data from model
            String[] angles  = model.getAngles();
            String[] lengths = model.getLengths();
            String[] squares = model.getSquares();
            String[][] allData = { sidesRow, lengths, squares, anglesRow, angles };
            int rows = 5;
            int cols = 4;
            Object[][] data = new Object[rows][cols];
            for(int row = 0; row < rows; row++)
                data[row][0] = rowHeaders[row];
                for(int col = 1; col < cols; col++)
                    data[row][col] = allData[row][col - 1];
            table = new JTable(data, headers)
                public boolean isCellEditable(int row, int col)
                    return false;
            DefaultTableCellRenderer renderer =
                (DefaultTableCellRenderer)table.getDefaultRenderer(String.class);
            renderer.setHorizontalAlignment(JLabel.CENTER);
            centroidLabel = new JLabel("centroid location:  ", JLabel.CENTER);
            Dimension d = centroidLabel.getPreferredSize();
            d.height = table.getRowHeight();
            centroidLabel.setPreferredSize(d);
            JPanel panel = new JPanel(new BorderLayout());
            panel.setBorder(BorderFactory.createTitledBorder("triangle data"));
            panel.add(table);
            panel.add(centroidLabel, "South");
            return panel;
    }PLEASE HELP ---- Also does any one know how to draw a Triangle on a screen which can be controlled by a JSlider such that as and whenits incremented the triangle increase and vice versa... I need to prove Similarity in triangles using A Jslider that controls one triangle while the other triangle is Still on screen

    Sharan,
    The code given was part of the assignment and you are supposed to make the changes for your part right?
    Please give details of what you have done so far and not expect us to do your assignment for you. We'll be glad to help answer questions and point to the right direction, but giving us the entire assignment and saying, very nicely I might add, "Please do it for me." Just seems to make a mockery of the hours, days, and years that many of us has spent earning our degrees and learning our skills.
    Work on it and ask specific questions with examples of what you have done and you'll get a much better response.

  • Urgent help required "java.lang.Exception: Connection reset"

    Hi Everyone,
    I am getting error message when I access cluster database from grid console.
    Error      java.lang.Exception: Connection reset
    I am unable to create jobs or do other admin stuff on the database, I have searched alot , restarted the repository database, restarted the emgc components, even the agents but of no use. The agent status showing OK as under.
    Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    Agent Version : 10.2.0.3.0
    OMS Version : 10.2.0.3.0
    Protocol Version : 10.2.0.2.0
    Agent Home : /app/oracle/agent/agent10g/rac2.tawaf
    Agent binaries : /app/oracle/agent/agent10g
    Agent Process ID : 19646
    Parent Process ID : 19629
    Agent URL : https://rac2.tawaf:3872/emd/main
    Repository URL : https://tawafapp.tawaf:1159/em/upload
    Started at : 2009-04-02 11:26:10
    Started by user : oracle
    Last Reload : 2009-04-02 11:26:10
    Last successful upload : 2009-04-02 12:27:42
    Total Megabytes of XML files uploaded so far : 3.48
    Number of XML files pending upload : 0
    Size of XML files pending upload(MB) : 0.00
    Available disk space on upload filesystem : 86.22%
    Last successful heartbeat to OMS : 2009-04-02 12:30:20
    Agent is Running and Ready
    The error reported in emoms.log is as under.
    2009-04-02 12:37:25,073 [MetricCollector:RACHOMETAB_THREAD600:60] ERROR rt.RacMetricCollectorTarget _getAllData.184 - oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1543)
    at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:915)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab._getAllData(RacHomeTab.java:180)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab.getData(RacHomeTab.java:91)
    at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:404)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:596)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:320)
    at java.lang.Thread.run(Thread.java:534)
    can anyone help me as its very urgent for me to clear this error.
    thanks

    this error is also reported against the cluster database.
         Thread: SeverityLoad https://rac2.tawaf:3872/emd/main java.sql.SQLException: ORA-20613: Severity for unknown target. (target guid = 1938FC9C72DDAC01E0C0F268FFC5F6AD) ORA-06512: at "SYSMAN.EM_VIOLATION_CHECKS", line 174 ORA-04088: error during execution of trigger 'SYSMAN.EM_VIOLATION_CHECKS' Error occured at line : 43, File name:Severity

Maybe you are looking for