Getting the JScrollpane to be the correct size?

I am having a problem with my scroll bars in the scroll pane. They are allowing me to scroll way more than I would like them to.
I have added a screenshot of my problem here:
http://www.minds.may.ie/~colly/problem.JPG
I know that I could make the Scrollbars smaller by making my panel much smaller but then I could loose information if the boxes go outside that space.
What I would like is for the scrollbars to take amount of space the images take up into account rather than the size of the panel.
I do not need it to see the whole panel if the panel only contains one small image.
Thanks for your help.

What I would like is for the scrollbars to take amount of space the images take up into account rather than the size of the panel.
The answer is simple, it is that your panel should define its preferred size according to its contents. The scroll pane will allow you to view the panel according to its preferred size.

Similar Messages

  • How to get the correct size of the loaded swf file?

    final public class main extends Sprite
      public function main()
       loaderInfo.addEventListener(Event.COMPLETE, _onLoadCompleted);
      private function _onLoadCompleted(event: Event): void
       var tw: int = stage.width;
       var th: int = stage.height;
       var tsw: int = stage.stageWidth;
       var tsh: int = stage.stageHeight;   
    Above is my simple as3 project in flex builder 3.
    My screen resolution is 1920*1080, when debugging, the swf is stretched to the full client area of the IE, but the stage.stageWidth is 500 and the stage.stageHeight is 375, both the stage.widht and stage.height are 0, who can tell me why and how to get the right size of the swf file, named the client area size of the IE in this situation?
    Thanks very much!

    The HTML wrapper might resize the SWF later, so wait a frame and check stageWidth/stageHeight again.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • How and where to get the correct message size in XI ?

    Hi,
    I need to get the message size in bytes in the following stages in SAP XI. Please help me.
    1. Message size after adapter engine
    2. Message size before entering the integration engine
    3. Message size after transformation/mapping in integration engine
    I appreciate your input in this regard.
    Regards
    Gopal

    1. Message size after adapter engine
    After adapter engine at receiver side, the message is out of XI and you cannot check the size then. At sender side, after adapter engine would mean inside integration engine. You may check it in sxmb_moni trace or Copy the source of payload in notepad, save it as xml and check the size.
    2. Message size before entering the integration engine
    That means inside adapter engine. You may use RWB -> Performace Monitoring
    3. Message size after transformation/mapping in integration engine
    This is as 1st case inside integration engine. Use the same method as in case 1.
    Regards,
    Prateek

  • HP C309a All in one Printer - Problems with printing documents the correct size.

    Hi I recently purchased an HP 309a as a replacement for an EPSON printer which had to be replaced a couple of times so I thought I would change manufacturer.
    The HP printer prints well in post places but when I print from Excel on an A4 scale it only prints 3/4 size on an A4 page.  I tried everything to get it to print the correct size.  I have adjusted the settings to scale to A4, print boderless etc and it just will not print correctly.
    It seems to be ok in Word and many other programs so I don't know why there is an issue with Excel.  Iam I missing something, please help.
    Also is there any way to default the printer to A4 automatically instead of 8" x 11".

    I also have issues using this printer with Excel/ Word.
    When I am using Excel or Word I have to remove the HP 309a as my default printer.
    when set as default, excel and word just "hang" for up to 3 minutes when opening or saving.
    I called HP who said the printer works with all other files so basically it's tough. One of their tech guys tried to sort it out but couldn't.
    Has anyone else had this same problem? If so, how was it resolved?
    £300 for a printer that doesn't work with MS. It's not funny and I won't buy HP product again.

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Get the file size of a file on the server.

    okay.. for my download manager i need to get the file size. I tried using the available method of inputstream, and the getContentLength() of URLConnection, which worked but only for webpages. so does anyone know how to do this? Sun does it in SDM, but i dont think the source is included. ill download it again and check.
    thanks.

    content-length is not guaranteed to be anythingi dont think so. correct me if i am wrong..
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#s
    c4.4 states -
    " When a Content-Length is given in a message where a
    message-body is allowed, its field value MUST exactly
    match the number of OCTETs in the message-body.
    HTTP/1.1 user agents MUST notify the user when an
    invalid length is received and detected."
    this sort of guarantees that if a file is being
    downloaded the content-length gives the size of the
    file. i am able to confirm this by sniffing the
    traffic of my download manager.This is only guaranteed if the content length field is present. :-)
    However, looking two paragraphs up:
    'All HTTP/1.1 applications that receive entities MUST accept the "chunked" transfer-coding (section 3.6), thus allowing this mechanism to be used for messages when the message length cannot be determined in advance.'
    There is mechanism built in for cases where the size cannot be determined.
    Regards,
    Bhaveet

  • Why can't the bloody window get the right size?

    I have a huge problem with graphical components... and I doubt that I'm alone with it. This concerns how to get the bloody windows to be laid out with the correct size. Java never wants to have the window sized as I set it. It's always different, and the size changes when I change platform. If I set the size for a JFrame in a Windows-environment, and then run the program on a Solaris environment, the window has a completely different size. Even when I switch from the CDE desktop to KDE or Gnome, every new environment presents a new way of laying out my application's windows, with different sizes.
    Now, I have tried to get rid of the problem through various tricks... obviously the setBounds(x,x,x,x) method is a complete fake... that's when most problems occur. So I tried with the pack() method together with setting the preferred size of my components. That works better, but it's not even near to make me satisfied. The windows don't change dramatically with platform change, but a few pixels here and there.
    It drives me crazy! I shouldn't be this hard to set the size of a normal bloody window! I can't believe that I still haven't figured out a failproof way of sizing my windows.. (I'm using the null layout, so I need to have exactly the correct size at all times)
    If anyone has reached enlightenment on this topic, please contact me before I end up in some mental institution. ([email protected])
    Please?
    /Erik (from Sweden)

    it's as simple as this. I want the space used to lay out components to be the same on all platforms.
    I could just as well explain what I mean with "the space used to lay out components" too. if you set a Frame or JFrame to "undecorated", the only thing showing is that space... simple enough. but with frame decorations, such as title bar, window borders (used to resize windows)... it's not as simple, because these decorations differ on all platforms. even between windows-versions... windows XP has a far larger title-bar than windows 2000 (and earlier windows).
    so what I need to do is to make my program to lay out the window, so that the area used to lay out components is the samt, independent of the decorations used on the particular system you're working with.
    I think it should be clear enough now...
    but I also have to tell you that I feel I'm as close to a solution as one could possibly be. because I took a peek in the bugs database and saw that there is a bug concerning the window size and position on KDE under linux, which is the platform I'm testing this on (apart from windows 2000/XP) so I might have solved the problem, just that java itself is buggy :)
    I don't know, but I'm going to test it on different environments in Solaris this week... CDE, GNOME, KDE... such.
    I used the setSize() method together with getInsets() to get the sizes of the decorations... but that method has to be called for after the JFrame is set visible ( show() ) so I have to resize the window after it is set visible and then hide() and show() it again... strange... but it might work now.

  • Getting the ACTUAL size of a JTable

    Hi all, I've been trying to get the actual size of a JTable for awhile now. I have tried just about every getSize or whatever other size method you can think of and nothing is working out for me. A lot of the times I'll get a value of 0 and other times I'll get a non-zero value. The variance is coming from which getSize method I use and where I'm using it. Whatever the value is though, they do not match up with the actual size that I'm seeing when everything is displayed.
    My JTable is within a JScrollPane, which is within a JSplitPane. The JTable takes up the complete size of the JScrollPane and the JScrollPane takes up the complete size of JSplitPane (the top component at least). I have tried getting the sizes from each of these components that are used to contain the JTable, but each one of the values I get are incorrect too.
    Anyone have any ideas to help me out?
    Thanks, Bryan

    Thanks for your help camickr.
    I ended up writing a component listener for the frame since componentShown only listens for calls to the setVisible method. Also, I can now resize the table columns whenever the user resizes the frame.
        /*Add component listener to frame.  When frame is shown or
          resized, then set student table column widths*/
        this.addComponentListener(new ComponentListener() {
          public void componentShown(ComponentEvent e) {
            setStudentTableColumnWidths();
          public void componentResized(ComponentEvent e) {
            setStudentTableColumnWidths();
          public void componentMoved(ComponentEvent e) {}
          public void componentHidden(ComponentEvent e) {}
       * Sets the student table column widths.  The username column should take up
       * ~1/3 of the table and the student name column should take up ~2/3 of the
       * table.
      private void setStudentTableColumnWidths()
        TableColumnModel tableColumnModel = studentsTable.getColumnModel();
        Dimension scrollPaneViewportSize = studentsTableScrollPane.getViewport().getSize();
        int usernameColWidth = scrollPaneViewportSize.width/3;
        int studentNameColWidth = scrollPaneViewportSize.width - usernameColWidth;
        tableColumnModel.getColumn(0).setPreferredWidth(usernameColWidth);
        tableColumnModel.getColumn(1).setPreferredWidth(studentNameColWidth);
      }

  • Getting the correct userid in a afterproperties in a item event receiver

    HI,
     am writing  a   custom item event receiver and i am trying to read from a user/group column. and when i am  using afterproperties to get the  getitembyid() for a user, am getting different values on different times.
     yesterday when i accessed the same, i am getting the correct  user id i mean if its  "in\john.mith " am getting the  values  john.smith.
     but today when i debugged, i am not getting the john.smith value instead it pulled the fully qualified value - i eman  - along with authentication  - i:#w0/.....kind of.
    its strange that sometiems its working fine and sometimes the same code behaves in a different way.
    can ansyone please provide any hint what exactly going on and how can i get a correct id when i use afterproperties.
    help  is appreciated!

    Hi,
    According to your description, the value of the User field in the AfterProperties not always the same.
    As you said, the value got changed today when you debug your event receiver, is there any change in your environment recently?
    A possible reason might be that the authentication method has been changed.
    There is a test in Naim’s blog about the different value of User filed in an Event Receiver when in different authentication mode:
    http://naimmurati.wordpress.com/2014/07/25/user-field-in-event-receivers-when-using-claims-based-authentication-and-classic-mode-authentication/
    How to determine the Authentication mode of a web application:
    http://blogs.msdn.com/b/psssql/archive/2011/02/22/sharepoint-adventures-how-to-identify-if-you-are-using-claims-authentication.aspx
    Thus, a possible workaround to get the user name from a User field is that you can use
    properties.ListItem["UserField"] which will return same result whatever the authentication mode would be.
    Best regards
    Patrick Liang
    TechNet Community Support

  • How can i get the correct text from the url which has the mulitp-languages?

    hi, all
    i built a application and deployed it on sun application server 8.1. when i request a url which include some multi-languages (for example http://xxx.com/servlet?value=XXX. the 'XXX' may be simply chinese. ), i got the ??? instead of the correct text. how can i do it? in tomcat server, i can set the URIEncoding=GBK to get the correct code in server.xml. how can i do it in sun app server?
    thanks.

    Ok, it is unclear on what is happening here.
    Are you saying that when the webclient gets the data that it is not honoring the quote characters? Or the processing of the data buffer is causing issues?
    This is what I see the of your example text which is trying to be parse out:
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();">";
    It appears to me that the  escapes `&rsquo;` does not have matching `&ldquo;` anywhere within the tooltip. So it appears that the page properly places left quotes in when processing the page, but the raw html has broken text.
    Hence a garbage in, garbage out situation.
    William Wegerson (www.OmegaCoder.Com)

  • I Sorted but I am trying to get the correct Month to print

    {noformat}I am creating a program that requires me to get the highest number and lowest number in a month.I have sorted the Array into a 1 dimesional Array of [12]. Here is my issue How do I get the Highest and lowes number reported while How can I get the correct Month to print? I keep getting Jan and Dec obviously since they are the first and last month.
    I am not sure how to do a sort that will get me the proper month.
    I am creating a program that requires me to chose the highest number and lowest number of the 12 months calculated. I created a seperate sorting array. Currently these number are in the indexed memory location. This Array of numbers is not Initialized! I am just showing what is currently in memory.
    double total [12]={114,93.10,89.30,92.90,98.40,111.00,102.40,105.40,81.40,82.60,80.90,113.40} .
    //intialized
    String[] months={"January","February", "May","June","July","August","September","October","November",
    "December"};
    Here is my issue How do I get the Highest and lowest number printed that also corresponds with the correct month? I have a String of months. I just dont understand how I can do this. My highest numner is 114 which is January and my Lowest 80.89 is November. Is there another part of the swapping I am missing?
    Here is my code. Thank you for your help. I am having issues getting proper code formatting.
    import java.util.Scanner;
    import java.io.*;
    import java.util.*;
    import java.util.Arrays;
    public class MonthRain
        public static void main(String[] args) throws IOException
                    String[] months={"January","February", "March","April","May","June","July","August","September","October","November",
                    "December"};
                    final double [] [] rain = {
                    { 10.1,8.1, 6.8, 4.2, 2.1, 1.8, 0.2, 0.3, 1.1, 2.3, 6.1, 10.4,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 9.2, 9.8, 4.4, 3.3, 2.2, 0.8, 0.4, 0.0, 0.6, 1.7, 4.3, 5.2,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6 },
                    { 6.6, 5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 4.3, 4.3, 4.3, 3.0, 2.0, 1.2, 0.2, 0.2, 0.4, 2.4, 3.5, 6.6,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 8.5, 8.2, 1.2, 1.6, 2.4, 0.0, 5.2, 0.9, 0.3, 0.9, 1.4, 7.3,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 10.1,8.1, 6.8, 4.2, 2.1, 1.8, 0.2, 0.3, 1.1, 2.3, 6.1, 7.4,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 9.2, 9.8, 4.4, 3.3, 2.2, 0.8, 0.4, 0.0, 0.6, 1.7, 4.3, 5.2,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 9.2, 9.8, 7.4, 3.3, 2.2, 0.8, 0.4, 0.0, 0.6, 1.7, 4.3, 5.2,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 6.6, 2.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.1, 1.3, 2.6, 4.2,3.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 4.1, 7.4,6.6, 5.5, 3.8},
                    { 2.6, 5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.3, 1.3, 2.6, 3.2,6.6,5.5, 1.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 4.3, 1.3, 4.3, 3.0, 2.0, 1.2, 0.2, 0.2, 0.4, 2.4, 2.5, 3.6,6.6,2.5, 1.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8},
                    { 8.5, 8.2, 1.2, 1.6, 2.4, 7.0, 5.2, 8.9, 0.3, 0.9, 1.4, 7.3,6.6,5.5, 3.8, 2.8, 1.8, 0.2, 0.0, 0.0, 0.0, 1.3, 2.6, 4.2,2.3, 6.1, 7.4,6.6, 5.5, 3.8}};
                   double [] total=new double [12];
                   double total_rain=0;
                   double average=0;
                   int col=0;
                   int row=0;
                   int i;
                                  for( row=0;row<rain.length;row++){
                                       total_rain=0;
                                       for( col=0;col<rain[row].length;col++){
                                          total_rain+=rain[row][col];
                                               average=total_rain/(col+1);
                                               total[row]=total_rain;
                                       System.out.printf("%9s Total Rain= %4.2f\n ",months[row],total[row]);
                                       System.out.printf("%9s Montly Average= %4.2f\n ",months[row],average);
                                       System.out.printf("\n");
                                               for(i=0;i<total.length;i++){
                                                 System.out.printf("Total Rain=%.2f\n",total);
                                                 double minValue;
                                                                          int sort,index,minIndex;
                                                                          for(sort=0;sort<total.length-1;sort++)
                                                                               minIndex=sort;
                                                                               minValue=total[sort];
                                                                               for(index=sort+1;index<total.length;index++)
                                                                                    if(total[index]<minValue)
                                                                                         minValue=total[index];
                                                                                         minIndex=index;
                                                                          total[minIndex]=total[sort];
                                                                          total[sort]=minValue;
                                                                     System.out.printf("High Rain=%s and Low Month=%s\n",total[sort],total[0]);
                                                                     System.out.printf("\n");
    Edited by: happyfootsie on Dec 6, 2009 1:12 AM
    tried to fix formatting                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    happyfootsie wrote:
    Here is my issue How do I get the Highest and lowes number reported while How can I get the correct Month to print?OK, apart from the fact that you've dumped everything in one place as opposed to breaking up your logic, the main thing I can see is that you have no inherent mapping between the values that you're storing and the months that they apply to.
    That's all fine while you're just pulling in the values (I assume that each block of 12 is listed from January to December), but the second you do a sort, you lose the fact that '114.93', which is probably now in last place (being the highest) actually referred to the month of January.
    First suggestion: break it up into methods (a couple of suggestions would be 'getAverages() and 'sort()', but I'm sure there's more).
    Second suggestion: Have a look at the Java Collections framework (you might want to start here). It has a shed-load of classes for doing exactly what you want.
    Winston

  • Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone (if you're using iOS 7), then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How do I get the correct ICloud account on my iOS devices?

    Hello. A few days ago, I changed my Apple ID username from my old email to my new one. Everything worked fine and I was able to re-login to the App Store, iMessage, etc. A few days later, I got a message from iCloud asking me to login. When I tried to login it failed and I realized that it was using my old Apple ID email to login to iCloud. So I went into accounts and tried to delete that account and add the account with the correct Apple ID. When I tried to delete the account it asked for my iCloud password to confirm, which doesn't work because it is using my old Apple ID. I then tried to add my current iCloud account without deleting the old one, but when I did it said it was already on the device. How do I get the correct ICloud account on my iOS devices?

    Log out of the old ID, then login using the new one with the correct pw.

  • Is there a way to get the correct order from the dependent types of a sche

    Hi ,
    I have a CT facing the following problem:
    When trying to built a SQL script to create all the object types within a schema using the DBMS_METADATA packages.
    Did insert in a table the names of the types that will be exported following a concrete order, next loop into the table and call the DBMS_METADATA package for each row.
    These type are depedent between them, there are some type attributes calling other types and here the issue
    First : try to generate the order by created column of dba_objects and when the generated SQL script is launched a lot of type appearing as incomplete state due to the order isn't correct.
    Second : try to insert the table ordering by object_id colums of dba_tables view, it appears incomplete types too.
    Currently want to insert the table using a recursive query with connect by against the dba_type_attrs starting with the rows when ATTR_TYPE_NAME is not null (the types that are called by other types), but this way has a issue dificult to resolve: the roots of hierarchy are the rows when ATTR_TYPE_NAME is not null and we've dependencies between roots nodes
    The question is is there a way to get the correct order from the dependent types of a schema?
    Platform: IBM SP AIX
    DB version: 9.2.0.7
    Any help will be appreciated .
    Thanks in advance.

    The xxx_dependencies view should give you the dependencies betwee nthe various types. I would look at something along the lines of:
    SELECT object_name, referenced_name
    FROM (SELECT o.object_name, d.referenced_name
          FROM user_objects o, user_dependencies d
          WHERE o.object_name = d.name(+) and
                o.object_type = d.type(+) and
                d.referenced_type(+) = 'TYPE' and
                o.object_type = 'TYPE')
    START WITH referenced_name IS NULL
    CONNECT BY PRIOR object_name = referenced_nameThe outer join between user_objects and user_dependencies is required to generate the names of types which are not dependent on other types, or do not have other types dependent on them.
    HTH
    John

  • Help ...how to get the file size on a server

    Hi.I use this code to parse a file that is on a server.
    The question is: how can i get the file size (bytes size)?
    Thanks.
    //Open the file for reading:
    URL u = new URL(entry);
    InputStream inputXML = u.openStream();
    //Build document:
    DocumentBuilder builder = factory.newDocumentBuilder();
    doc = builder.parse(inputXML);

    Try this instead:
    URL u = new URL(entry);
    URLConnection conn = u.openConnection();
    // get the file size
    int size = conn.getContentLength();
    // open the input stream from the URLConnection (which is functionally the same as opening it directly from the URL)
    InputStream inputXML = conn.getInputStream();
    Shaun

  • How do I get the byte size of a server file before sending output via HTTP?

    I need to get the byte size of the file prior to streaming it. I can't seem to find a class/method I need. Basically, I have the path c:\\tomcat\\webapps\\documents\\sample.pdf in the servlet, I was hoping I could just use something from the File class but I couldn't find anything that seems to do the trick?
    thanks, in advance,
    Chuck

    maybe the source of the problem will help...I am trying to stream a PDF to IE and a blank page is being generated although all other file type work.
    I have found a lot of answers in the forum but no specific code examples. Here's what I have so far from picking through threads in here (can someone please show me how to get the byte size of the file so that I can assign it to the method response.setContentLength();?):
    String CONTENT_TYPE = " ";
         String target = " ";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
         StringBuffer buf = new StringBuffer();
         HttpSession session = request.getSession();
         String file = request.getParameter("filename");
         target = file;
         int end = file.length();
    int beg = end-2;
         String type = file.substring(beg, end);
         if (type.equals("DOC")){
              CONTENT_TYPE = "application//vnd.msword";
         }else if (type.equals("XLS")){
              CONTENT_TYPE = "application//vnd.x-excel";
         }else if (type.equals("PPT")){
              CONTENT_TYPE = "application//vnd.ms-powerpoint";
         }else if (type.equals("PDF")){
              CONTENT_TYPE = "application//vnd.x-pdf";
         }else if (type.equals("MPP")){
              CONTENT_TYPE = "application//vnd.ms-project";
         }else if (type.equals("ZIP")){
              CONTENT_TYPE = "application//ZIP";
         }else if (type.equals("TXT")){
              CONTENT_TYPE = "text//plain";
         }else {
              CONTENT_TYPE = "text//html";
         //File f = new File(file);
         //int l = f.length();
         response.setContentLength(l); <----- supposedly this fixes my problem but I don't know how to get the byte szie of the file in an integer??
         // reset the response
         response.reset();
         response.setContentType(CONTENT_TYPE);
         try{
         // Get streams
         FileInputStream fileInputStream = new FileInputStream(target);
         ServletOutputStream servletOutputStream = response.getOutputStream();
         // Init byte count and array
         int bytesRead = 0;
         byte byteArray[] = new byte[4096];
         // Read in bytes through file stream, and write out through servlet stream
         while((bytesRead = fileInputStream.read(byteArray)) != -1) {
         servletOutputStream.write(byteArray, 0, bytesRead);
              servletOutputStream.flush();
         // Flush and close streams
         servletOutputStream.flush();
         servletOutputStream.close();
         fileInputStream.close();
         } catch (Exception e) {
         System.out.println(e.toString());

Maybe you are looking for

  • GR/IR Balances in Cut-OVer

    Hi Viewers, I would like to know how to take the GR/IR balances at the cutover in the FICO. It's needed, since I am in very close to Go-Live date 5th Jan. Thanks & Regards Aswin

  • Acrobat 9 Pro PDF is not retaining original page settings from Word doc

    The document I am trying to put into PDF format (from Word 2000, using Acrobat 9 Pro (trial version)) drops my original Word page settings (5.5" x 8.5") and defaults to 8.5" x 11" in the PDF.  Using "Crop Pages" does not remedy the situation - the do

  • Transferring iWeb page to a Word document

    I am just using iWeb for the first time. I dont want to publish what I make at all because I am just making this page for a homework assignment. How can I save the webpage in a Word document so that it is accessible to be able to save it to my files?

  • Udf in Banks - validate accountnumber

    Hello, In the Netherlands almost every accountnumber can be validate with a check digit formula. Some banks use this check digit formula and some banks don't. I would like add an udf in banks with a checkbox. When someone add a new accountnumber on t

  • Version 6.0 sp2 is not able to reload servlets withour server restart

              I am unable to have WebLogic reload servlets without restarting the whole WebLogic           application. It will work for a few days and then it stops. They only way I           can fix the problem is if I reinstall all of WebLogic. How ca