Bug? in Long.valueOf(String, radix)

Hi everyone,
I am currently programming a genetic algorithm(GA) for my work and a came across a small difficulty.
GA usually use binary strings for their internal operations. So I decided to use Double.toLongBits() to convert a double into a long and then Long.toBinaryString() to get a String to work with.
Here is the part of the code that confuses me a bit.
double d = -2.33;
long bit = Double.toLongBits(d);
String s = Long.toBinaryString(bit);
//now try and convert it back Binary Strings have radix 2
long back = Long.valueOf(s,2);
This last line always throws a NumberFormatException.
The code was only intended to show me that the conversion always works correctly in both directions.
If I use 2.33 instead of -2.33 it works.
Am I making a mistake or is this a bug?
Thanks for any remarks!

parseLong() interprets that as an overflow. Which is what it really is.
Roll your own ascii-to-long that ignores overflow (not tested):
    public static long binaryAtol(String s)
     long value = 0;
     for (int n = 0; n < s.length(); n++) {
         value <<= 1;
         char c = s.charAt(n);
         if (c == '1')
          value++;
         else if (c != '0')
          throw new NumberFormatException("not a binary digit: \"" + c + "\"");
     return value;

Similar Messages

  • Why  Integer. valueOf(String,radix) throws exception

    Can any one explains why this method throws exception
    Integer a = Integer. valueOf(" 123 ", 2);
    System.out.println(a);

    prady_jo wrote:
    Can any one explains why this method throws exception
    Integer a = Integer. valueOf(" 123 ", 2);
    System.out.println(a);As already mentioned, in binary notation, only 1's and 0's are permitted. Besides that, I see you also have some white spaces in your string: this will throw an exception as well.

  • Why Integer.valueOf(String) does not recognize plus sign

    The Integer.valueOf(String) works fine with strings like "-1", but does not work with "+1". The following code throws NumberFormatException:
    int i = Integer.valueOf( "+1" );
    Does anybody know what's the reason for this?
    Thanks,
    -- LK

    Welcome to the forum!
    >
    The Integer.valueOf(String) works fine with strings like "-1", but does not work with "+1". The following code throws NumberFormatException:
    int i = Integer.valueOf( "+1" );
    Does anybody know what's the reason for this?
    >
    The short answer is because it is defined that way.
    The place to start for questions like this is the Javadoc.
    You don't state what Java version you are using but for 1.6 the 'valueOf' method says this
    http://127.0.0.1:8082/resource/jar%3Afile%3A/C%3A/Software/Java/jdk1.6.0_02/jdk-6-doc.zip%21/docs/api/java/lang/Integer.html#valueOf(java.lang.String)
    >
    valueOf
    public static Integer valueOf(String s)
    throws NumberFormatExceptionReturns an Integer object holding the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the parseInt(java.lang.String) method. The result is an Integer object that represents the integer value specified by the string.
    >
    As you can see the description further refers you to the 'parseInt' method where you will find the answer.
    >
    parseInt
    public static int parseInt(String s)
    throws NumberFormatExceptionParses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseInt(java.lang.String, int) method.
    >
    You may have to do a little digging but when you have a question like this you should read the relevant Javadoc sections, search the forum for similar questions, search on the net and then if you still can't figure it out post a thread.

  • When I open an email, instead of the site opening I get a long web string that I need to click. Is used to open automatically when I opened the email. How can I go back to that?

    When a message comes in from a site such as Amazon or Shutterfly the site itself does not open when the email is opened. I need to click on a long web string to open the message. It all used to appear when the email was opened. How can I make that happen again? It seems an unnecessary step otherwise.

    I don't appear to have a toolbar either.

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts,
    I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
    I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
    Please provide solution.
    Thanks in advance.
    Regards
    Deepak

    This is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
    *& Module pool       ZMP_LTEXT                                         *
    PROGRAM  ZMP_LTEXT                               .
    TABLES: STXL.
    *&      Module  STATUS_9000  OUTPUT
    MODULE STATUS_9000 OUTPUT.
    CONSTANTS:line_length type i value 132.
    DATA:g_editor type ref to cl_gui_textedit,
         g_editor_container type ref to cl_gui_custom_container,
         CONT1 type scrfname value 'CONT1',
         g_repid like sy-repid,
         g_ok_code like sy-ucomm,
         g_mytable(132) type c occurs 0,
         g_mycontainer(30) type c ,
         v_result(256) type c,
         g_head like thead,
         it_line type table of tline with header line,
         wa_stxl type stxl.
    DATA : BEGIN OF IT_THEAD1,
           ICON TYPE ICON-ID.
           INCLUDE STRUCTURE STXL.
    DATA : END OF IT_THEAD1.
    DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
           WA_THEAD LIKE LINE OF IT_THEAD.
    IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
    select SINGLE * from STXL into wa_stxl
                     where tdname = '00006000156500000002'.
    SELECT SINGLE * from STXL into wa_stxl
                      where tdname = WA_THEAD-TDNAME
                      AND TDID = WA_THEAD-TDID
                      AND TDOBJECT = WA_THEAD-TDOBJECT
                      AND TDSPRAS = WA_THEAD-TDSPRAS.
    IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD EXIST' TYPE 'E'.
    ENDIF.
    MOVE-CORRESPONDING WA_STXL TO G_HEAD.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR '001'.
      if g_editor is initial.
         CREATE OBJECT G_EDITOR_CONTAINER
           EXPORTING
            PARENT                      =
             CONTAINER_NAME              = CONT1
            STYLE                       =
            LIFETIME                    = lifetime_default
            REPID                       =
            DYNNR                       =
            NO_AUTODEF_PROGID_DYNNR     =
           EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
             others                      = 6.
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT G_EDITOR
           EXPORTING
            MAX_NUMBER_CHARS       =
            STYLE                  = 0
       WORDWRAP_MODE          = cl_gui_textedit=>wordwrap_at_fixed_position
    for to fix number of characters in row to 132 characers
             WORDWRAP_POSITION      = line_length
             WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
    for the word to break to next line if it don’t fit in line
            FILEDROP_MODE          = DROPFILE_EVENT_OFF
             PARENT                 = G_EDITOR_CONTAINER
            LIFETIME               =
            NAME                   =
           EXCEPTIONS
            ERROR_CNTL_CREATE      = 1
            ERROR_CNTL_INIT        = 2
            ERROR_CNTL_LINK        = 3
            ERROR_DP_CREATE        = 4
            GUI_TYPE_NOT_SUPPORTED = 5
             others                 = 6  .
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
      REFRESH g_mytable.
         MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
               WA_THEAD-TDID TO STXL-TDID,
               WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
               WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
        CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = wa_stxl-tdid
          LANGUAGE                      = wa_stxl-tdspras
          NAME                          = wa_stxl-tdname
          OBJECT                        = wa_stxl-tdobject
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          LINES                         = it_line
      EXCEPTIONS
        ID                            = 1
        LANGUAGE                      = 2
        NAME                          = 3
        NOT_FOUND                     = 4
        OBJECT                        = 5
        REFERENCE_CHECK               = 6
        WRONG_ACCESS_TO_ARCHIVE       = 7
        OTHERS                        = 8
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT IT_LINE INTO V_RESULT.
       APPEND V_RESULT TO G_MYTABLE.
    ENDLOOP.
    CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
       EXPORTING
         TABLE           = G_MYTABLE
       EXCEPTIONS
         ERROR_DP        = 1
         ERROR_DP_CREATE = 2
         others          = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       endif.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
      WHEN 'SAVE'.
         CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
          EXPORTING
            ONLY_WHEN_MODIFIED     = FALSE
            IMPORTING
              TABLE                  = G_MYTABLE
            IS_MODIFIED            =
          EXCEPTIONS
            ERROR_DP               = 1
            ERROR_CNTL_CALL_METHOD = 2
            ERROR_DP_CREATE        = 3
            POTENTIAL_DATA_LOSS    = 4
            others                 = 5
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    LOOP AT G_MYTABLE INTO V_RESULT.
       APPEND V_RESULT TO IT_LINE.
    ENDLOOP.
    CLEAR V_RESULT.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = G_HEAD
            INSERT                = ' '
            SAVEMODE_DIRECT       = 'X'
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            LINES                 = IT_LINE
        EXCEPTIONS
          ID                    = 1
          LANGUAGE              = 2
          NAME                  = 3
          OBJECT                = 4
          OTHERS                = 5
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN '0'.
    *CALL SCREEN '0'.
    WHEN OTHERS.
    ENDCASE.
    *G_OK_CODE = SY-UCOMM.
    *CLEAR SY-UCOMM.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

  • ImmutableArrayList default for Map Long, Collection String

    Hi,
    There are a few topics out there about the com.tangosol.util.ImmutableArrayList default, but the actual fix still seems a bit unclear to me.
    In my example there is a Map with each entry containing a Collection of Strings (i.e. Map<Long, Collection<String>>). Objects will be placed in the Map as ArrayLists, but they seem to come out as ImmutableArrayLists.
    The Oracle site mentions wrapping the Collection (http://extranet.tangosol.com/display/COH35UG/Best+Practices+for+Coherence+Extend).
    There is another Oracle forum post that suggests using more general classes (List instead of ArrayList). (Serialize an ArrayList<ArrayList>
    It seems like you have to make a new collection anytime you wish to reserialize the object. Is there a better way?
    Thanks for taking the time,
    Mike

    This problem comes up for us when persisting documents. We are torn between saving as XML vice saving a normalized object model or something else: like your database solution.
    Since you have already designed the database, then you can reverse out the TopLink class from that database design in the mapping workbench. You then have to perform a transform in the middle tier to extract your business model.
    Alternatively, if you want your business model to map via ORM to the data model, then you would have a database design that more closely maps the business model design then you get three tables:
    TopLevel
    Integer primaryKey; //This table may just have the PK
    SetMap theSets;
    SetMap
    TopLevel parent; //FK to the Parent table
    Long primaryKey; //Assumes the Longs are globally unique. If not, the PK will include the parent
    SetList theSet;
    SetList
    SepMap parent; //Part of PK. This can get complicated if the PK migrates all the way from TopLevel. We insert a surrogate key at this point.
    String setMember; //Rest of PK
    The database constraints ensure that the SetList is unique. The equivalent string may exist in different SetMaps, but may not be duplicated for a particular parent.

  • !! help using: public static Boolean valueOf(String s)

    I am trying to use this simple function to convert a string value to a boolean. According to the documentation for this Boolean method (public static Boolean valueOf(String s)), this should work:
    Example: Boolean.valueOf("True") returns true.
    As a test, I tried to run this line of code:
    tmp_bool = Boolean.valueOf("True");
    I get this compilation error:
    test_file.java:10: incompatible types
    found : java.lang.Boolean
    required: boolean
    tmp_bool = Boolean.valueOf("True");
    .....................................^
    According to the documentation for SDK 1.4, there is a new function:
    public static Boolean valueOf(boolean b)
    It seems like the commpiler is focusing on this new version of the valueOf() method, and ignoring the case where a String is the parameter. Why won't it use the version that takes a String? What confuses me even more is that I am running version 1.3.1, and the new valueOf(boolean b) function is not mentioned in its documentation.
    Am I somehow using the method wrong?
    Thanks!

    OK, I think I understand now. Thanks.
    Let me make sure i have this right...
    So basically, if you use variable types of Boolean and need to pass them to methods that take booleans, would you have to call the booleanValue method first?
    ex:
    Boolean bool_obj;
    //example method that takes a boolean
    //test_method(boolean b);
    test_method ( bool_obj.booleanValue() );
    is that right?

  • Exact Difference and Usage between .toString / String.valueOf() / (String)

    Hi
    What are the differences in .toString / String.valueOf() / (String) ?
    I have tried the following :
    String a = "a";
             Object o = "o";
             int i = 1;
             System.out.println("String Value of " + String.valueOf(i));
             System.out.println("(String) " + (String)o);
             System.out.println(".toString() " + i.toString()); // does not work
             System.out.println(".toString() " + String(i)); // does not workThanks in Advance !!

    x.toString() calls the object's toString() method. It cannot be used for primitives, and it will give NullPointerException if x is null.
    String.valueOf(x) will call the object's toString() method if x is a non-null reference. If x is a null reference, it will return the string "null". If x is a primitive, it will return a String representation of that primitive, probably by calling toString on an appropriate wrapper object, or a static String.valueOf method on the appropriate wrapper class. You can look at the source code in src.zip if you're curious.
    Both toString() and String.valueOf are just methods. There's nothing special about them. You can look at their docs and/or source code to see what they do.
    (String)x will attempt to cast the reference x to a String. I doesn't change the object in any way. If x is not a reference to one of String's supertypes--Object, Comparable, etc.--then it will be a compile-time error. If x is a reference to one of String's supertypes, but points to an object at runtime that is not a String, it will be a ClassCastException.
    This is just casting, an there's nothing special about casting with Strings vs. any other class.
    Edited by: jverd on Apr 27, 2010 4:07 PM

  • File Not Found bug with long audio file names?

    Hello -
    Crazy problem. I'll probably post way too much information, but I want to make sure I cover everything. Help!
    We run Logic Studio/Logic 8 on multiple 10.4.10/11 computers - G5 Power PC, new intel iMac, intel mini, G4 laptops. We are working on an audio post job using very messy OMFs that were prepared in Final Cut. We had problems opening them in Logic, so we opened the OMFs in Soundtrack Pro, exported to AAFs, and opened those in Logic.
    The sessions look fine in Logic now (all files relinked), and the session is consolidated - ie, all files are local/in the project folder's Audio Files folder. I see this in the Audio Bin and can confirm in the finder.
    Here's the problem. With the sessions closed:
    (A) I renamed the project folder by adding an asterix to the front of the folder name, and changed the color label of the folder in the finder in order to mark it as the original folder.
    (B) I made a copy of the whole folder (session files & audio files) in order to have something to work from and not mess up the original. When I opened up the session in the new folder, it immediately said audio file not found, do you want to search, locate, or skip. It couldn't find the file in a search, and obviously when you skip, then skip, then skip all, it opens the session with the data (regions are there but grayed) - so all the audio files are orphaned.
    So when I try to locate the file, here's what happens. . . The audio file names are really horrendously long (must be some artifact of working in Final Cut). We're talking: "1087-001A SERG AIRPORT WAITING * 1-1channel_00044D02AA9- 363A-4CC5-A86B-0741023DB062.aif" - one bazillion characters.
    So the audio file locate dialog box truncates the name of the file that's missing by using the first 20 characters or so, and then a "#" character, and then some random string of 3-6 characters that is not at all related to the file name. So who knows which of the 4-30 SERG AIRPORT files is supposed to go there!
    Obviously if this were a 2 minute session file of 10 files or something, we could figure it out and relink everything, but we're talking about a feature-length session with a bazillion files.
    (C) Okay, so I tried to open the original session, in the folder that I had renamed by prefacing the original name with an * and changing the color of the folder. But I started to get the file not found errors. OH GEEZ. So I didn't save. I re-renamed the folder by taking out the * and changing the color label back. Then I tried to open the session again, but I still kept getting the file not found problem.
    I have to stress that I didn't move any of the audio files, or change ANYTHING in the session.
    So I thought - is all of this because I tried to open a new instance of the session, in a new instance of the folder? Is it because I renamed the folders? Normally you can rename folders, even session names, no problems, and Logic corrects the paths to the audio files!
    (D) So, crap. I reopened the original AAF file in logic and saved it in a new place. I closed the file, reopened it, closed, reopened, just to make sure everything was working! I checked the location of the files in the audio bin, and everything was great.
    (E) So now I copied the folders to an external hard drive to be able to work on another computer. But when I tried to open the sessions on a new computer. . . You guessed it, nada.
    So. . . the questions are:
    (1) Those original sessions that now will not work - is there anything I can do to recover their functionality? We had work in there that I would prefer not to lose. . .
    (2) Is this a known bug having to do with the length of the Audio File names?
    (3) How do we get over this? My only idea so far is we could select all in a working logic session and say "Audio Tracks names to regions" or something and will that change the actual file names on teh computer? Then hopefully things would work on mulitple systems. . .
    Okay. HELP! Thanks!
    Polly

    OK I got it.
    It is necessary to use prefix "file:///" before file name.
    Thanx everyway.

  • How to change from long to string ???

    can provide me and example??
    thanx

    String s1 = String.valueOf(someLong);
    String s2 = Long.toString(someLong);
    String s3 = "" + someLong;

  • Bug in "Unflatten from String" (LV7)

    I have binary files with different versions of a certain datatype. When loading a file, I try to unflatten the data using the newest dataversion. If I get an error, I try the 2nd newest dataversion and so on until I found the right datatype. This methode was ok up to LV6.01.
    Now I updated to LV7.0ger and I found following bug:
    When unflatting certain binary datas from string I get an error msg window "Nicht genügend Speicher zum Abschließen dieser Operation". The error-output of the vi is incorrect.
    Does anybody know a workaround of that bug?
    You can test the bug with the attached vi. Include also the two typedefs.
    Attachments:
    f_mancalib_UnflattenTypeCalibList.vi ‏184 KB
    f_mancalib_TypeCalibrationParams.ctl ‏24 KB
    f_mancalib_TypeCalibrationList.ctl ‏28 KB

    Hi,
    From the LV's help: "National Instruments recommends reworking any
    application that uses the Convert 4.x Data mode as a long term solution.".
    Data types may vary with differenct versions of LabVIEW. So, if types are
    not the same, this does not need to be a bug. Right click the Unflatten From
    String, and select Convert 4.x Data. This might not work, because the data
    is stored with Lv 5 or 6, but when you get it working, it will keep working
    for future versions of LV.
    The attached VI shows that a sting in a cluster does not convert to the same
    type string for lv4.x and lv7. Perhaps they are the same for lv4.x and lv6.
    If so, using convert 4.x data would be sufficient. If not, you need to read
    the data in 6, save the binary 4.x strings
    , and use 4.x from then on.
    You might also do the following: (also from the help) "If you use this
    function to flatten data from a custom control or indicator that you saved
    as a type definition, the function strips the type definition of its type
    definition wrapper. If you do not want to strip this wrapper, right-click
    the function and select Expose Typedefs from the shortcut menu."
    Regards,
    Wiebe.
    "albertz" wrote in message
    news:[email protected]..
    I allready told this to a NI tech support in Germany. They told me,
    the bug is known, but they do?nt have a workaround.
    So I hope for LV7.1 or maybe LV7.01.
    [Attachment Different Types.vi, see below]
    Attachments:
    Different_Types.vi ‏22 KB

  • Photos app bug resurrects long-removed photos (related to PNG alpha)

    Wanted to report/discuss a possible privacy concern and image glitch, and understand it better for submission to Apple's feedback page: the iPad (and maybe iPhone) Photos app will consitently resurrect long-deleted photos in your Camera Roll, under certain circumstances. These are long-removed photos (as in removed many months ago, prior to the iOS 5 update), and possibly only the reduced-size thumbnail versions.
    Note: as near as I can tell, the deleted photos were NOT originally from the camera roll! That's where they resurface, but I believe they are photos from other albums, maybe once which used to by synched to iPad but which I no longer synch. So "removed" might mean deleted or it might mean "no longer synched to iPad"... the images are so old I can't recall.
    So the bug, I'm guessing, it two-fold:
    1) The Photos app (and/or iPhoto during wired synch?) is not fully removing photos (or at least, their thumbs). They're no longer visible in Photos app, but are being retained somewhere on the device.
    2) A glitch in the Photos camera roll PNG handling (which I think may be new with iOS 5) causes those old images ro re-surface when you add a PNG to the camera roll. (The old photos were JPEG, but the image that triggers the bug must be a PNG with alpha channel)
    I have seen this on both an iPad 1 and iPad 2, running iOS 5.
    Here's how to reproduce it:
    1) Synch some photos to your iPad, then deselect them for synching and re-synch (so they're not there any more). Also, add some photos or screenshots to the camera roll and then delete them. I say to do both because I'm not 100% where the old photos come from, and I'm hoping this covers all bases! Actually, most people have already done these things in the past, and can probably skip this step.
    2)  Generate a transparent PNG using the art app Procreate (and probably any app that saves PNGs to the camera roll with alpha channel). All you have to do is scribble somethign into a blank Procreate canvas, then export it to your photo album. There is no need to do anything special to get an alpha channel or PNG format: you always get that. (Unless you used the Fill command to completely cover the canvas.) Now in the camera roll there should be your scribble on a transparent background. You can email it to yourself and see that clearly in Photoshop or Preview.
    3) Here's the glitch: look at your camera roll (thumbnails view) and you'll see that the alpha-transparent background of the image has become one of your old removed photos! Tap it to enlarge and the alpha becomes black (which is fine, although it may seem odd if you intended to paint onto the default white canvas). But for just a moment, before you see the black, you will get a full-size glimpse of the old photo. (Or, maybe, an enlargement of the thumbnail?)
    4) If you keep saving more alpha PNGs, you'll keep seeing more and different old photos coming back to life in the alpha regions of the thumbnails (and, briefly, at full size).
    5) If you delete all those PNGs and then save some new ones, you'll see the same sequence of old photos reappear again.
    Needed fix: removed phtos/thumbnails should be properly purged, and alpha PNGs should show simply black (or some default background) at all times.

    Ok, I replicated it and I don't like it! I didn't use the one you marked cause I couldn't call it up properly but I did Bing
    transparent gifs and loaded up 3, one was totally invisible in the thumbnail and I could clearly see one of my pics perfectly in the thumbnail but when I brought it to page the gif filled the frame.
    I have no idea where the pic came from, I mean I recognize it but from where in the album I have no idea.
    Oh yeah, I was wrong about the first pic coming to page, it wasn't the same image but a different one...and I have no idea how the one that came up, (what i thought was the underlying pic) did, or how it got there or even from where.
    This is some weird stuff though not as weird as that silly *** movie, what a load of tripe; I should have just spent my
    time on this, it's infinitely more enjoyable!
    Ok, here's the consensus from my layman iPad view:
    What happened now and most probably before was a 'transparent gif' or a partially transparent gif like the one I spoke of first that I could see the edge of or the outer perimeter of, the underlining image with the gif taking up say 3/4 of the thumbnail; this it what it was.
    This is totally apparent to me now because of your having me import a totally transparent gif which was invisible over my pic, thus the freaky part I didn't like...keying the thumbnail with one thing and ending up with something totally different when brought to page.
    Still doesn't explain where this silly iPad is grabbing these pics from?
      But here's something funny; my camera roll shows say 9,200 pics but my, 'iMy System' app say I have like 11,300 which I always thought was a fluke, that it was just reading wrong but maybe it's seeing something we're not.           What if all those pics we're deleting to save space or just generally culling have never left the system?                     Maybe that goofy app is really reading the true count!
       Those others up above us here who mentioned privacy concerns.. this could be whats going on, there's a ghost
    in the machine and it be our old pics and god knows what else floating around in that iPads memory.
    Ok, I'm crazy tired and I have to wrap this up. Least now we know how to replicate this but on the other hand I think we opened up an even bigger can of worms... the mystery of where all those images are hiding in our iPads?
    I haven't hardwired to a computer since I upgraded to ios5 so whatever's going on here, leastwise for me is iPad
    based and can't be blamed for synching issues like you discuss up above unless what I'm grabbing here is old stuff
    reimported back into my pad from the mainframe when I was backed up for the ios5 upgrade?
    Oh well, let me know what you think. Please do forgive my not getting back to you sooner on account of the movie
    but you already know I regret choosing that over this! Hope you had a good night and thanks...

  • How does this work: Long.parseLong(String)

    I am passing a string: "MM/DD/YYYY HH:MM:SS:MM" into the method Long.parseLong and it correctly gives me the epoch time as a long. Is this suppose to do this, or is this a freak thing? Does parseLong know that this is formatted as a date and correctly translates it to epoch? I searched api and cannot find anything.
    Thanks!

    Sorry, I am apparently an idiot. I am using a servlet. When the user clicks on a link it sends the time to a servlet which retrieves it from a database. The link is formatted as a date, but the actual href sends the epoch time. So it is a simple conversion to a long. Thanks anyways!

  • Call transformation XSLT and long note string in XML

    Hi
    Using call transformation (XSLT scheme) to convert XML file to html the problem is that line breaks in xml are ignored when passing the call tranformation.
    <b>Note in xml look like:</b>
    <com:Note><![CDATA[
    Serie 87% 0,000000
    Amount in this period 01-01-2006 - 01-07-2006 - 180 days
    Currency 16.267.117,38 DKK
    Loan DKK 14.332.700,00
    Debt 7.358.534,23
    Indexsfactor 226,230
    ]]></com:Note>
    <b>When HTML displayed in sap, - note is just a long string which continue out of the screen. Note looks like:</b>
    Serie 87% 0,000000Amount in this period 01-01-2006 - 01-07-2006 - 180 daysCurrency 16.267.117,38 DKKDebt 7.358.534,23Indexsfactor 226,230
    <i>What to do ? Any ideas ?</i>

    Hi Jon,
    What is the XSLT program that you're using to transform the XML?
    Can you try modifying the XSLT stylesheet and add or modify the following attribute.
    <xsl:output indent="yes"/>
    Regards,
    Erwin

  • CP 7 Bug? Long delay between preloader and first slide

    I am using OSX Mavericks 10.9.2 and recenly created my first project since upgrading to CP 7. My project is 15 slides and contains only audio (mp3) and image files. My preloader is set to 25%. When I upload the published project to my web server and test, there is a fairly long delay after the preloader loads and before the course begins. It last several seconds and appears as if all the elements on the first slide are missing (the only thing that shows is the playbar - I have only the CC button turned on):
    Is this a bug with CP 7? I have never experienced anything like this in CP 5.5 and 6.

    jon8979 wrote:
    During the latter part of the sync, I can open the Music app and scroll down to find the first last Artist with more songs than albums, and that is the one the device is currently working on.
    That should have been the "last" Artist, not "first". I would've edited the message, but I guess I'm too late as the option isn't available.

Maybe you are looking for