Help needed in converting Object class

hi,
i have an array of type Object. when the user enters values only the string values are been accepted i want the Object[] array to accept int values also what can i do in this regard?
Thanks.

hi calvino u r right one last doubt how can i put this comditionally when the user enters values in the following cases?
          for (int a=0; a<enter.length; a++){
               enter[a] = new Long(a);
          for (int b=0; b<enter.length; b++){
               enter[b] = new String;

Similar Messages

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Help needed in converting a psd file to php layout

    I have a website Inspire2rise dot com . I recently came across a beautiful PSD file that I wanted to apply to my site's design. My site is based on WordPress. Is there any tool which can help me in converting the psd file to WordPress compatible theme?

    Tools: https://www.google.com/search?client=safari&rls=en&q=psd+to+wordpress&ie=UTF-8&oe=UTF-8
    Tutorials: https://www.google.com/search?client=safari&rls=en&q=psd+to+wordpress+tutorial&ie=UTF-8&oe =UTF-8

  • Help needed in converting Excel from XML file

    Hi Can anyone help me in converting XML in to Excel.
    Thanx,
    Ananth.

    well, that still isn't much to go off of. I give it a try though.
    I guess you want to parse out the relevent data out of the xml file and then decide on your favorite delimated file format for Excel. Two popular formats are comma delimated:
    "info1","info2","info3","info4"
    and tab delimeted:
    info <tab> info2 <tab> info3 <tab> info4
    Excel should be able to unsestand either of these formats.

  • Help needed in converting date to number

    Hi,
    I am trying to execute the below query, its failing with "invalid number" error.
    select * from process_status
    where time_process > to_char('&3','yyyymmdd')
    time_process is the "number" datatype.
    Details:
    SQL> select * from process_status
    2 where time_process > to_char('&3','yyyymmdd');
    Enter value for 3: 01-MAY-09
    old 2: where time_process > to_char('&3','yyyymmdd')
    new 2: where time_process > to_char('01-MAY-09','yyyymmdd')
    where time_process > to_char('01-MAY-09','yyyymmdd')
    ERROR at line 2:
    ORA-01722: invalid number
    If I execute the below query its working fine, I am facing problem only when I pass the date explicitly to the query. Please help me on converting the date to number format.
    select * from etl_process_status
    where time_process > '20090501'
    and rownum < 3;
    Thanks

    as others have said, it would be best to have your time_process column stored as a date in oracle, if it contains dates.
    The reason for this is because if you store your dates as a number, you have removed information from Oracle that says "This is a date", so when Oracle comes to try and estimate the number of rows greater than a specific value, it can no longer guess correctly, since it's basing its guess on that column being a number.
    There are lots more numbers between '20091201' and '20091101' than there are days between 1st November and 1st December.
    By hiding the fact that your data is a date, you could throw your execution plan off and end up with sub-optimal performance.
    In short, store your data in the correct column format!

  • Help needed in  converting ArrayList to ArrayCollection

    I am converting an ArrayList (Java) to ArrayCollection of Flex .
    Please help me in this , i dont know whether this is correct approach or not
    I have a Created a User VO ActionScript class  on flex with two properties as uname , pass .
    [Bindable]       
            var result:ArrayCollection
    private function displayDetails(event:ResultEvent):void
    result = event.result as ArrayCollection;
    <mx:DataGrid  dataProvider="{result}">
                    <mx:columns>
                        <mx:DataGridColumn headerText="UserName" dataField="uname"/>
                        <mx:DataGridColumn headerText="Password" dataField="pass"/>
                    </mx:columns>
                </mx:DataGrid>
    This is from my Java DAO File :
                ResultSet rs = stmt.executeQuery("select NAME , PASS from Users");
                list = new ArrayList();
                while (rs.next()) {
                    User user = new User();
                    user.setUname(rs.getString(1));
                    user.setPass(rs.getString(2));
                    list.add(user);
            return list;
    With the below code ,the displayed DataGrid is empty with no data , please help me where i am doung wrong
    Do i need to do anything more ?? The data is coming well on to the lcds server console .
    Please help .

    Hi Kiran,
    Debugging solves most of the problems that you encounter ......you need to use a lot of debuggung so that you will come to know exactly what's
    happening indeed...
    So just put a break point at your displayDetails(event:ResultEvent):void  function and try to watch the event variable and check the event.result
    What is the datatype of the event.result ...Are you getting any data or is it null..???
    Please make these observations and let me know...
    Thanks,
    Bhasker

  • Help need to convert hsa prog to an applet

    Hey everybody I have no clue what i am doin im trying to convert a mathquiz program from the hsa console to an applet. ive attached my hsa code:
    import java.awt.*;
    import hsa.Console;
    import java.io.*;
    public class MathQuizhsa
    static Console c; // The output "c" Console.
    public static void main (String[] args)
    c = new Console ();
    char cont;
    String name1, name2, name3;
    //Start Of Loop.
    while (true)
    // Varible declaration
    int scorechart = 0;
    int scorechart1 = 300;
    //Start of score reset
    int score = 0;
    //End of score reset
    // Display Code
    c.clear ();
    c.println ("\t\t\t\tMath Quiz");
    c.println ("\n\tType:");
    c.println ("\t1 for Easy");
    c.println ("\t2 for Medium");
    c.println ("\t3 for Hard");
    c.println ("\t4 for High Scores");
    c.println ("\t5 for HighScore Setup and reset");
    c.println ("\t6 or more to Exit");
    c.print ("\nEnter Choice Here: ");
    int dec = c.readInt ();
    c.clear ();
    // End of Display Code
    // Starting Of Easy code!....................................
    if (dec == 1)
    int count = 1;
    boolean boo = true;
    while (boo)
    if (count <= 10)
    c.println ("MATH QUIZ..... EASY");
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    int num1;
    num1 = (int) (Math.random () * (15));
    int num2;
    num2 = (int) (Math.random () * (15));
    int total;
    c.setCursor (2, 1);
    c.println ("Equation " + count);
    c.print ("\t" + num1 + " + " + num2 + " = ");
    total = c.readInt ();
    if (total == num1 + num2)
    c.println ("Correct, press any key to continue");
    cont = c.getChar ();
    score++;
    scorechart = scorechart + 20;
    scorechart1 = scorechart1 - 20;
    else
    c.println ("Wrong, press any key to continue");
    cont = c.getChar ();
    c.clear ();
    else if (count > 10)
    boo = false;
    count++;
    c.clear ();
    // End Of Easy Code!.........................................
    // Starting Of Medium code!....................................
    if (dec == 2)
    int count = 1;
    boolean boo = true;
    while (boo)
    if (count <= 10)
    c.setCursor (1, 1);
    c.println ("MATH QUIZ..... MEDIUM");
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    int num1;
    num1 = (int) (Math.random () * (50));
    int num2;
    num2 = (int) (Math.random () * (50));
    int total;
    c.setCursor (2, 1);
    c.println ("Equation " + count);
    c.print ("\t" + num1 + " + " + num2 + " = ");
    total = c.readInt ();
    if (total == num1 + num2)
    c.println ("Correct, press any key to continue");
    cont = c.getChar ();
    score++;
    scorechart = scorechart + 20;
    scorechart1 = scorechart1 - 20;
    else
    c.println ("Wrong, press any key to continue");
    cont = c.getChar ();
    c.clear ();
    else if (count > 10)
    boo = false;
    count++;
    // End Of Medium Code!.........................................
    // Starting Of Hard code!....................................
    if (dec == 3)
    int count = 1;
    boolean boo = true;
    while (boo)
    if (count <= 10)
    c.setCursor (1, 1);
    c.println ("MATH QUIZ..... HARD");
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    int num1;
    num1 = (int) (Math.random () * (100));
    int num2;
    num2 = (int) (Math.random () * (100));
    int total;
    c.setCursor (2, 1);
    c.println ("Equation " + count);
    c.print ("\t" + num1 + " + " + num2 + " = ");
    total = c.readInt ();
    if (total == num1 + num2)
    c.println ("Correct, press any key to continue");
    cont = c.getChar ();
    score++;
    scorechart = scorechart + 20;
    scorechart1 = scorechart1 - 20;
    else
    c.println ("Wrong, press any key to continue");
    cont = c.getChar ();
    c.clear ();
    else if (count > 10)
    boo = false;
    count++;
    // End Of Hard Code!.........................................
    // Start of highscore page!..................................
    else if (dec == 4)
    BufferedReader easyhigh1;
    BufferedReader easyhigh2;
    BufferedReader medhigh1;
    BufferedReader medhigh2;
    BufferedReader hardhigh1;
    BufferedReader hardhigh2;
    c.clear ();
    c.println ("\n\t\t\t\tHigh Scores!!");
    try
    //Easy highscore read start............
    String EasyHighnum, EasyHighname;
    easyhigh1 = new BufferedReader (new FileReader ("EasyHighscore.score"));
    EasyHighnum = easyhigh1.readLine ();
    easyhigh2 = new BufferedReader (new FileReader ("EasyName.score"));
    EasyHighname = easyhigh2.readLine ();
    c.println ("\t\t\t Press any key to exit!");
    c.println ("\nEasy High Scores!..");
    c.println ("\n\t" + EasyHighname);
    c.println ("\t\t\t\t\t\t\t\t" + EasyHighnum);
    //Easy highscore read end..............
    //Med highscore read start............
    String MedHighnum, MedHighname;
    medhigh1 = new BufferedReader (new FileReader ("MedHighscore.score"));
    MedHighnum = medhigh1.readLine ();
    medhigh2 = new BufferedReader (new FileReader ("MedName.score"));
    MedHighname = medhigh2.readLine ();
    c.println ("\nMedium High Scores!..");
    c.println ("\n\t" + MedHighname);
    c.println ("\t\t\t\t\t\t\t\t" + MedHighnum);
    //Med highscore read End..............
    //Hard highscore read start............
    String HardHighnum = "";
    String HardHighname = "";
    hardhigh1 = new BufferedReader (new FileReader ("HardHighscore.score"));
    HardHighnum = hardhigh1.readLine ();
    hardhigh2 = new BufferedReader (new FileReader ("HardName.score"));
    HardHighname = hardhigh2.readLine ();
    c.println ("\nHard High Scores!..");
    c.println ("\n\t" + HardHighname);
    c.println ("\t\t\t\t\t\t\t\t" + HardHighnum);
    //Hard highscore read End..............
    char ans = c.getChar ();
    catch (FileNotFoundException e)
    c.println ("\nHighscore files missing! Please run option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    return;
    finally
    continue;
    // End of highscore page!....................................
    // Start of highscore setup
    else if (dec == 5)
    try
    //easy file write
    PrintWriter out
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyHighscore.score")));
    out.print ("0");
    out.close ();
    PrintWriter out2
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyName.score")));
    out2.print ("NoName");
    out2.close ();
    //med file write
    PrintWriter out3
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedHighscore.score")));
    out3.print ("0");
    out3.close ();
    PrintWriter out4
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedName.score")));
    out4.print ("NoName");
    out4.close ();
    //hard file write
    PrintWriter out5
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardHighscore.score")));
    out5.print ("0");
    out5.close ();
    PrintWriter out6
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardName.score")));
    out6.print ("NoName");
    out6.close ();
    c.print ("Installing.");
    int loadbar = 5;
    for (int ii = 0 ; ii <= 20 ; ii++)
    c.print (".");
    c.setColor (Color.black);
    c.drawRect (5, 20, 205, 18);
    c.setColor (Color.blue);
    c.fillRect (5, 20, loadbar, 18);
    loadbar = loadbar + 10;
    c.setCursor (3, 1);
    c.print ((ii * 5) + "%");
    Thread.sleep (100);
    c.println ("\nYour Highscores are now reset and installed.");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    finally
    continue;
    // End of highscore setup
    // Start Of End Code!........................................
    else if (dec >= 6)
    System.exit (0);
    // Start Of End Code!........................................
    // Score Code................................................
    if (dec >= 1 & dec <= 3)
    c.setColor (Color.black);
    c.drawRect (400, 100, 20, 200);
    c.setColor (Color.blue);
    c.fillRect (400, scorechart1, 20, scorechart);
    if (score == 0)
    c.println ("Wow... That was horrible: " + score + " out of 10!");
    else if (score == 1)
    c.println ("Go Back To Kindergarten: " + score + " out of 10!");
    else if (score == 2)
    c.println ("Pitiful: " + score + " out of 10!");
    else if (score == 3)
    c.println ("You Suck: " + score + " out of 10!");
    else if (score == 4)
    c.println ("Awesome if your six: " + score + " out of 10!");
    else if (score == 5)
    c.println ("Cant complain with a pass: " + score + " out of 10!");
    else if (score == 6)
    c.println ("Barely: " + score + " out of 10!");
    else if (score == 7)
    c.println ("Ill give u a E for effort: " + score + " out of 10!");
    else if (score == 8)
    c.println ("Wow: " + score + " out of 10!");
    else if (score == 9)
    c.println ("Nerd: " + score + " out of 10!");
    else if (score == 10)
    c.println ("Your Score Was Perfect: " + score + " out of 10!");
    c.println ("Press any key to continue");
    c.setCursor (17, 45);
    c.println ("Your Score Is: " + score);
    cont = c.getChar ();
    c.clear ();
    else
    // Score Code................................................
    // Easy High Score Code...........................................
    if (dec == 1)
    BufferedReader file1;
    try
    file1 = new BufferedReader (new FileReader ("EasyHighscore.score"));
    catch (FileNotFoundException e)
    c.println ("No High Score. Please go to option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    continue;
    try
    int highscore1 = file1.read ();
    if (highscore1 == 48)
    highscore1 = 0;
    else if (highscore1 == 49)
    highscore1 = 1;
    else if (highscore1 == 50)
    highscore1 = 2;
    else if (highscore1 == 51)
    highscore1 = 3;
    else if (highscore1 == 52)
    highscore1 = 4;
    else if (highscore1 == 53)
    highscore1 = 5;
    else if (highscore1 == 54)
    highscore1 = 6;
    else if (highscore1 == 55)
    highscore1 = 7;
    else if (highscore1 == 56)
    highscore1 = 8;
    else if (highscore1 == 57)
    highscore1 = 9;
    else if (highscore1 == 58)
    highscore1 = 10;
    if (score >= highscore1)
    highscore1 = score;
    c.println ("Congrats! You beat the highscore. <Enter Name> ");
    name1 = c.readLine ();
    try
    PrintWriter out
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyHighscore.score")));
    out.print (highscore1);
    out.close ();
    PrintWriter out2
    = new PrintWriter (new BufferedWriter (new FileWriter ("EasyName.score")));
    out2.print (name1);
    out2.close ();
    finally
    continue;
    finally
    continue;
    // End Easy High Score Code...........................................
    // Medium High Score Code...........................................
    else if (dec == 2)
    BufferedReader file2;
    try
    file2 = new BufferedReader (new FileReader ("MedHighscore.score"));
    catch (FileNotFoundException e)
    c.println ("No High Score. Please go to option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    continue;
    try
    int highscore2 = file2.read ();
    if (highscore2 == 48)
    highscore2 = 0;
    else if (highscore2 == 49)
    highscore2 = 1;
    else if (highscore2 == 50)
    highscore2 = 2;
    else if (highscore2 == 51)
    highscore2 = 3;
    else if (highscore2 == 52)
    highscore2 = 4;
    else if (highscore2 == 53)
    highscore2 = 5;
    else if (highscore2 == 54)
    highscore2 = 6;
    else if (highscore2 == 55)
    highscore2 = 7;
    else if (highscore2 == 56)
    highscore2 = 8;
    else if (highscore2 == 57)
    highscore2 = 9;
    else if (highscore2 == 58)
    highscore2 = 10;
    if (score >= highscore2)
    highscore2 = score;
    c.println ("Congrats! You beat the highscore. <Enter Name> ");
    name2 = c.readLine ();
    try
    PrintWriter out3
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedHighscore.score")));
    out3.print (highscore2);
    out3.close ();
    PrintWriter out4
    = new PrintWriter (new BufferedWriter (new FileWriter ("MedName.score")));
    out4.print (name2);
    out4.close ();
    finally
    continue;
    finally
    continue;
    // End Medium High Score Code...........................................
    // Hard High Score Code...........................................
    else if (dec == 3)
    BufferedReader file3;
    try
    file3 = new BufferedReader (new FileReader ("HardHighscore.score"));
    catch (FileNotFoundException e)
    c.println ("No High Score. Please go to option 5 in main menu");
    c.println ("Press any key to continue");
    cont = c.getChar ();
    continue;
    try
    int highscore3 = file3.read ();
    if (highscore3 == 48)
    highscore3 = 0;
    else if (highscore3 == 49)
    highscore3 = 1;
    else if (highscore3 == 50)
    highscore3 = 2;
    else if (highscore3 == 51)
    highscore3 = 3;
    else if (highscore3 == 52)
    highscore3 = 4;
    else if (highscore3 == 53)
    highscore3 = 5;
    else if (highscore3 == 54)
    highscore3 = 6;
    else if (highscore3 == 55)
    highscore3 = 7;
    else if (highscore3 == 56)
    highscore3 = 8;
    else if (highscore3 == 57)
    highscore3 = 9;
    else if (highscore3 == 58)
    highscore3 = 10;
    if (score >= highscore3)
    highscore3 = score;
    c.println ("Congrats! You beat the highscore. <Enter Name> ");
    name3 = c.readLine ();
    try
    PrintWriter out5
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardHighscore.score")));
    out5.print (highscore3);
    out5.close ();
    PrintWriter out6
    = new PrintWriter (new BufferedWriter (new FileWriter ("HardName.score")));
    out6.print (name3);
    out6.close ();
    finally
    continue;
    finally
    continue;
    // End Hard High Score Code...........................................
    //End Of Loop.
    // Place your program here.
    } // main method
    } // MathQuiz class

    Most of the awt drawing methods are the same; you just need to provide a panel that calls them in its paint() method.
    You also need to add text fields for any inputs, and buttons or a combo box for choosing the skill level.
    You need to store high scores on the server as there is no way for an applet to access a local file.
    The code int highscore1 = file1.read ();
    if (highscore1 == 48)
    ...would better read in a string then use Integer.parseInt() rather than all those character comparisons, or one of the Character.digit() conversions.
    The code that is many versions of if (score == 0)
    c.println ("Wow... That was horrible: " + score + " out of 10!");
    ...can either be replaced with switch/case or an array of strings.
    You'd be better off reducing all the code you don't need before you convert it to an applet, just so there's only half the amount to convert.
    Pete

  • Please Help - Need to convert 400 gigs of giga samples into my EXS24

    Does anybody know what would be the fastest and most efficient way to convert 400 gigs of giga file samples from my PC into my logic pro EXS24 sampler on my mac?
    I purchased chicken system's translator professional which does batch conversion, but my pc was not working well with that application. I need to find a new way of converting. I know i can convert giga samples one by one in the exs24 but with 400 gigs of giga samples, it could take days and days.
    Any ideas wold be extremely helpful.
    Thank you for your time.
    -Smooth

    CDXtract is gettin' third'ed by me.... However, u r into one heu of a conversion armageddon....
    I recently did a huge convertion of my samplecell II lib into AKAI format...
    My recommendation is to convert on the fly - meaning - convert what u have to convert when u need it.
    And make sure when doing batch convertions that the sample programs u really want to WORK like it did in the GIGA gets special attention... Lots of the conversions done by cdxtract - are indeed converted but attack - decay etc... veries from sampler to sampler although the values are the same

  • Help needed to run 2 classes....

    Hi.
    I have 2 program.
    First program is to open and choose the file to run so it will display the choosen file's path and filename and most importantly - its results on a Window.
    Second program is design to run an external file e.g. music.mpeg and count number of services inside this file.
    Question is: How do I combine both classes such that the results of the number of services are display on the Window created by the first program upon clicking on a button on the Window e.g. <Count now>?
    Pls Help ..
    Your help will be greatly appreciated!!
    ...do U need the codes for the program?... pls tell me..thanks.

    have a look in the Swing tutorials, they talk about file choosers.

  • Help needed to convert 4.0 version llb to 6.0 or above

    Can some help me convert the attached old llb (written in LV 4.0) to 6.0 or higher version so I can open it in LV 2012? Thx
    Solved!
    Go to Solution.
    Attachments:
    igorbin4.llb ‏315 KB

    Try posting here:  http://forums.ni.com/t5/Version-Conversion/bd-p/VersionConversion
    Just for reference, here is a chart to help you know the minimum versions required.  Version 6.0+ is correct.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • Help need for sending object over TCP Connection

    I have
    ResultSet rs = (ResultSet)connection.getObject(1)
    and i have user's connection connected on a port
    Currently i am reading while rs.next elements , preparing somestring and i am using socket_connection.send('to_myuser',somestring) to send message
    and user receive it like (while input_stream.readLine() != null )
    etc .etc.. i am just writing some algorithm which very common.
    i want to reduce this recursion on the my server end and once user receive it , and to get all result set retrieved from that end.
    my question is , is it possible to send
    connection.send('myuser',rs);
    and how to read on the other end.
    Thanks in advance

    Just want to clarify how we can cache it..? I belive
    we have to put data somewher in the ArrayList or
    something ....which one major taskOf course caching requires that you store it in something.
    >
    second, you need a very good algorighm to query all
    your collections ... i think oracle SQL mechanism is
    very nice.... however in your recommended approach i
    have to write lots of searching and sorting
    alrogrthm... .correct?Generally no. Requests are usually limited to very few parameters and often limited only to one or zero. Thus a user first gets a list of customer names (no parameters for query) and then request the detail about a specific customer (using the customer id which is only one parameter.)
    Note that you mentioned large amounts of data. You didn't specify what large meant. However large requests should never be allowed from users (people). They can't use it anyways. Automated processes should be architected to provide for a technological solution with is cost effective.

  • Help needed on convert JTable to Image

    Hi, all
    I have made an application that can output a JTable with different colours in its every cells. Now I want to select the whole Table and put it as an Image to one of the Image Viewer Softwares(e.g. windows picture viewer).
    Is there anyone knows how to do that?
    Thanks in advance!
    Regards,
    swat.

    Now I want to select the whole Table and put it as an
    Image to one of the Image Viewer Softwares(e.g.
    windows picture viewer). If you don't have to do it programmatically, and you are working on windows, select the window with the table, Alt-PrtScr will copy just that window into the clipboard, and you can paste it into many different apps, including image views, word, so on.

  • Help needed to convert a dataset

    My cuurent dataset which is extracted using a view
    EID
    P ID
    IS PRIMARY
    HOURS
    1
    ABC
    yes
    200
    2
    DEF
    yes
    200
    3
    GEH
    NO
    40
    4
    IJK
    NO
    40
    5
    MNO
    NO
    50
    Desired output: Which will have the following columns with hours for each pid
    PrimaryID
    pidhrs
    P1
    pid1hrs
    p2
    pid2hrs
    p3
    pid3hrs
    abc
    200
    GEH
    40
    IJK
    40
    MNO
    50
    DEF
    200

    But, as vijays says, what relates the non-primary rows to the primary rows?  Why should GEH belong with ABC and not DEF?
    Assuming it's just grouping them into groups of 3 non-primary's to each primary based on the eid as the order, then you could do something like...
    SQL> ed
    Wrote file afiedt.buf
      1  with t(eid, p_id, isprimary, hours) as
      2        (select 1, 'ABC', 'Y', 200 from dual union all
      3         select 2, 'DEF', 'Y', 200 from dual union all
      4         select 3, 'GEH', 'N', 40 from dual union all
      5         select 4, 'IJK', 'N', 40 from dual union all
      6         select 5, 'MNO', 'N', 50 from dual union all
      7         select 6, 'PQR', 'N', 70 from dual
      8        )
      9  --
    10  -- end of test data, use query below
    11  --
    12      -- seperate out the primary records
    13      ,p as (select eid, p_id, hours
    14                   ,row_number() over (order by eid) as grp
    15             from   t
    16             where  isprimary = 'Y'
    17            )
    18      -- seperate out the secondary records
    19      -- assigning them to groups of 3 in order of their eid
    20      ,s as (select eid, p_id, hours
    21                   ,mod(row_number() over (order by eid)-1,3) as rn
    22                   ,ceil(row_number() over (order by eid)/3) as grp
    23             from   t
    24             where  isprimary = 'N'
    25            )
    26  --
    27  -- recombine the primary and secondary in their groups
    28  --
    29  select p.grp, p.p_id, p.hours
    30        ,max(decode(s.rn,0,s.p_id)) as p1
    31        ,max(decode(s.rn,0,s.hours)) as p1hrs
    32        ,max(decode(s.rn,1,s.p_id)) as p2
    33        ,max(decode(s.rn,1,s.hours)) as p2hrs
    34        ,max(decode(s.rn,2,s.p_id)) as p3
    35        ,max(decode(s.rn,2,s.hours)) as p3hrs
    36  from   p left outer join s on (p.grp = s.grp)
    37  group by p.grp, p.p_id, p.hours
    38* order by p.grp
    SQL> /
           GRP P_I      HOURS P1       P1HRS P2       P2HRS P3       P3HRS
             1 ABC        200 GEH         40 IJK         40 MNO         50
             2 DEF        200 PQR         70
    but that would seem like an odd requirement as I'd expect there to be some known relationship between the data.

  • How to typecast Object Class object dynamically

    Hai every one
    i have a object of any particular class , but i don't know the variables in that class object. But i have string variable contains value of variables in that class object.
    So i use following method for get value of variables in that class object.
    class ObjectCLass
         Sub s=new Sub();
         public static void main(String[] args)
              ObjectCLass a=new ObjectCLass();
              try
                   System.out.println(*a.getClass().getDeclaredField("s").get(a)*);
              catch(Exception e)
                   System.out.println("Exception");
    class Sub
         int i=5;
         public void print()
              System.out.println("Hello World!");
    }Here the bolder line give Object class object. By using this Object class object i need access the variable i and method print(). So i need to cast Object class object into sub class
    so how can i typecast it
    i try with following methods , but i cant succeed
    1.(  *(a.getClass().getDeclaredField("s").get(a).getClass)*   a.getClass().getDeclaredField("s").get(a)   ).print() ;
    2.(  (Class.forName(�Sub�) ) a.getClass().getDeclaredField("s").get(a) ).print();Please any one one help me how to typecast it dynamically
    By
    Thiagu

    If you know you're going to invoke the "print" method on an object, then you also need to know the type of the class, or interface, which has that method.
    It seems what you are looking for is a tutorial on interfaces.
    http://java.sun.com/docs/books/tutorial/java/IandI/index.html
    In a nutshell, you can set up an interface which defines a "print" method, and create class(es) which implement that interface. Then as long as you have an object which implements that interface, but do not know the exact type of that object, you can simply cast it to the interface type and invoke the method.

  • How to Convert a .class file into exe

    I need to convert a .class file to exe...
    If abybody know ...plz infrom me briefly....
    Thanx a lot

    I do not know.
    I come from china.
    [email protected]
    Is that suppose to be a racial joke?From his other post, I'm thinking he's actually serious. At first I thought it was just a troll, but even that email address looks correct (sina.com is a popular service in China and I don't expect an average troll to do 'research' like that).

Maybe you are looking for

  • How to make home button appear in screen?

    I am having some difficulty trying to make the home button to appear on screen instead of pressing the middle button to return to home screen.

  • Oracle 9.2.0.8 and AWR report?

    Does anyone know if 9.2.0.8 supports AWR? Thanks in advance!

  • Has any seen collection issues after 11g database upgrade?

    We do have an SR open. Just wondering if anyone else has experienced collection issues after upgrading the db to 11g? Our technical folks are hoping it is something else but for the past few weeks we have seen random issues stemming from collections.

  • Ovi Suite does not recognise special MP3 files

    My Ovi Suite does not import some of my MP3 files, even though they have proper ID3 tags (there are even albums where some files are recognised and others not, although I can see no difference in the "quality" of the tags). If I directly choose one o

  • PSE 8.0 unterstützt 4 Kerne?

    Hallo, ich möchte mir einen neuen Rechner kaufen und möchte wissen ob PSE 8 vier oder zwei Kerne des Prozessere unterstützt. Kann mir jemand weiterhelfen? Gruß leznem