Bug in ThreadLocal documentation?

This example shows up in the docs here: http://download.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html
<code>
import java.util.concurrent.atomic.AtomicInteger;
public class UniqueThreadIdGenerator {
private static final AtomicInteger uniqueId = new AtomicInteger(0);
private static final ThreadLocal < Integer > uniqueNum =
new ThreadLocal < Integer > () {
@Override protected Integer initialValue() {
return uniqueId.getAndIncrement();
public static int getCurrentThreadId() {
return uniqueId.get();
} // UniqueThreadIdGenerator
</code>
I believe that getCurrentThreadId() should be changed to:
<code>
return uniqueNum.get();
</code>
Otherwise initialValue is never executed. Also, uniqueId is not ThreadLocal so all threads calling getCurrentThreadId() will return the same value all the time.
Am I missing something?
Sorry for the code formatting, it's not clear to me how to properly format it for this forum.

843904 wrote:
I believe that getCurrentThreadId() should be changed to:
return uniqueNum.get();Otherwise initialValue is never executed. Correct. That's a bug in the doc.
Also, uniqueId is not ThreadLocal so all threads calling getCurrentThreadId() will return the same value all the time.Wrong. At least, wrong once you make the above fix.
Both of which you could have found out by simply running, fixing, and re-reunning the code. At which point your real question becomes, "Why do the different threads not share the same value?"
Remember, once you fix the typo, uniqueId is only ever used by initialValue(), which is only called once per thread. So thread T1 calls uniqueNum.get() the first time, which calls initialValue(), which, which calls getAndIncrement(). From then on, any time T1 calls uniqueNum.get(), it's just getting the value that was set the first time by initialValue(). T1 never looks at uniqueId again. T2 comes in, does the same thing on its first call to get(), and gets the next ID, and then never looks at uniqueId again. And so on...
Am I missing something?Apparently either the fact that each thread only calls initialValue() once, or the fact that initialValue() is the only place that looks at uniqueId. Maybe both. :-)
Sorry for the code formatting, it's not clear to me how to properly format it for this forum.[code] and [/code] or just {code} before and after.

Similar Messages

  • A bug in UML documentation in SJSE 8.1

    Hi!
    Is There a bug in UML documentation in SJSE 8.1?
    When I write some text in editor, it insert ENTER and Blanck lines in my text.
    What is hapend? What am I doing?
    Thanks!

    Hi,
    Is There a bug in UML documentation in SJSE 8.1?
    When I write some text in editor, it insert ENTER and
    Blanck lines in my text. Could you please be more specific? What is an action which causes insertion
    of Enter and Blank lines? Is it after Save? Or after reopen of project? Or
    after/before something else? It would be valuable if you provide an example of
    your text before your action and after it.

  • BUG in ThreadLocal Example

    Hi,
    I just spot a bug in ThreadLocal example demonstrated in the JAVA API doc.
    here is the code snippet:
    public class UniqueThreadIdGenerator {          
    private static final AtomicInteger uniqueId = new AtomicInteger(0);
    private static final ThreadLocal < Integer > uniqueNum =
    new ThreadLocal < Integer > () {
    @Override protected Integer initialValue() {
    return uniqueId.getAndIncrement();
    public static int getCurrentThreadId() {
    return uniqueId.get();
    where the getCurrentThreadId() method should be change to this for it to work:
    public static int getCurrentThreadId() {
    return uniqueNum.get();
    Edited by: 899848 on Nov 29, 2011 8:10 PM

    Thanks, it's been noted here before, and I believe reported in the Bug Parade.

  • Is there any bug in the documentation??

    hi guyes,
    i am refering "Oracle® Data Guard Concepts and Administration 10g Release 2 (10.2) B14239-05 August 2008" to configure physical standby database on my same host having my primary database.
    i told you it was my worst experience using any oracle documentation.
    i am using oracle 10g R2,and followd all procedure to configure physical standby database,but i think there are some bugs in this document.
    1. they have told to create controlfile for the stadby database but didnt ask to edit controlfile for new path of datafiles.
    2.they have ask to copy all primary datafiles to stdby location,but when you try to open standby database,it dosent match the path of stdby datafile due to same controlfile.
    these and there are many bugs are in this document.
    they ask to edit tnsnames.ora file but dosent provide the procedure to do so.
    i mean this is not the complete guide to follow.
    a hopeless thing
    is this a bug???
    thanks and regards
    VD

    vikrant dixit wrote:
    hi guyes,
    i am refering "Oracle® Data Guard Concepts and Administration 10g Release 2 (10.2) B14239-05 August 2008" to configure physical standby database on my same host having my primary database.
    i told you it was my worst experience using any oracle documentation.
    i am using oracle 10g R2,and followd all procedure to configure physical standby database,but i think there are some bugs in this document.I'm assuming that you specifically mean Section 3.2 Step-by-Step Instructions for Creating a Physical Standby Database
    1. they have told to create controlfile for the stadby database but didnt ask to edit controlfile for new path of datafiles.That isn't required if you follow the step by step guide since the example uses the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT database initialisation parameters. In particular see step2 and Example 3.5
    2.they have ask to copy all primary datafiles to stdby location,but when you try to open standby database,it dosent match the path of stdby datafile due to same controlfile.
    these and there are many bugs are in this document.If you have followed the steps as described in the document you won't get the errors that you describe above. You'll also note in the backup and recovery guides there is a similar example for database duplication on the same host which also uses the file_name convert parameters. If you still require help it might be useful to list the precise error and what you have set the relevant parameters to.
    they ask to edit tnsnames.ora file but dosent provide the procedure to do so.They do however, directly in the step by step guide, refer to the relevant manual - the Net Services adminsitrators guide - that contains a section http://max00994:7777/docs/db10gr2/network.102/b14212/naming.htm#sthref700 on managing net service names, if you'd read it you'll see that there are 3 different tools that you could use and that the exact steps to follow depend on your environment, given this complexity it isn't unreasonable in my view to link you directly to where the information can be found rather than to include the best part of an entire chapter on service naming in the middle of a step-by-step guide.
    i mean this is not the complete guide to follow.This particular guide does deal with standby configuration, complete with practical examples that do in fact work when followed diligently, I should know I've followed them previously on more than one occasion. It doesn't of course deal with underlying subject matter that is referenced elsewhere. I don't know what Oracle's target audience is for this book, but wouldn't think it unreasonable to assume that a dba considering building a dataguard installation was already familiar with Oracle SQLNet (it would certainly be required knowledge in my book).
    a hopeless thing
    is this a bug???As the documentation works as written I wouldn't consider it a bug. I don't personally like the particular names that Oracle have chosen for their examples, primarily because I don't like the idea of naming database services after physical location in a standby environment. You can however, if you have a support contract, log bugs against the documentation and Oracle do correct the bugs - though unfortunately in the next release of the docs and not online.
    Niall Litchfield
    Oracle DBA
    http://www.orawin.info/

  • Bug in JDev documentation re: debugging servlets

    This is in the document titled "Using the Servlet Debugger Class" found in the JDeveloper electronic documentation.
    I'll quote the first bit:
    "You can use the ServletDebugger class to tailor the debugging environment to your servlets. Using the ServletDebugger class, you can specify:
    the JDeveloper root directory
    which servlet's to register with the JDeveloper web server. The servlets you specify will appear in the Servlet Launcher.
    the document root directory for the integrated web server
    the starting URL for the Servlet Launcher
    the JDeveloper web server port
    URL arguments
    To configure the debug environment:
    For an HTTP servlet or for any servlet created outside of the JDeveloper environment, import the following package in your servlet's Java file:
    import oracle.jdeveloper.servlet.*;"
    Whoops, this last part is wrong. It should instead be "import oracle.jdeveloper.debugger.*;" I could not get it to compile with the first one, but the 2nd one worked fine.
    -- Alex
    null

    Alex,
    Thanks for pointing this out.
    This has been fixed for the JDeveloper 3.1 documentation.
    Thanks,
    -John
    null

  • Dynamic region bugs and bad documentation

    I cannot get the second taskflow to behave correctly in a dynamic region.
    Here's my scenario:
    In the pursuit of resusablilty, I have two taskflows that are coming from ADF Library Jars into a master application.
    Both taskflows have their own associated application modules, which appear as data controls in the master project.
    Following the instructions in the Fusion Developers guide, I create a dynamic region and dynamic links.
    After swapping to the second task flow, when I click on a different table, I get an error that a target is unreachable:
    Target Unreachable, 'RoleId' returned null
    For more information, please see the server's error log for an entry
    beginning with: Server Exception during PPR, #1{code}
    I posted the problem originally under this thread: [dynamic region errors
    and got a response that I didn't understand -- both taskflows have data-control-scope = shared.
    In contrast to the problem using a dynamic region, if I build a different page in the master application and use each taskflow as *separate* regions (via a tabbed panel), they work fine.
    So it doesn't seem there is anything wrong with the taskflows per se, but rather something in the dynamic region switching mechanism that is broken.
    I'd appreciate hearing from anyone who has had similar problems or anyone who knows of a solution.
    In exasperation, lili5058
    UPDATE
    Sorry for the earlier rant. I figured out the reason for the odd behavior and it has to do with the code generated by the wizard. This code isn't so much wrong as it is short-sighted. Here's the code generated for the managed bean by the wizards for creating a dynamic region and dynamic link that is put into *backingBeanScope*:
    {code:java}package view.beans;
    public class DynamicRegionBean {
    private String taskFlowId = "/WEB-INF/taskflow1.xml#first-taskflow";
    public DynamicRegionBean() {
    public TaskFlowId getDynamicTaskFlowId() {
    return TaskFlowId.parse(taskFlowId);
    public String firstTaskflowtaskflow() {
    taskFlowId = "/WEB-INF/taskflow1.xml#first-taskflow
    return null;
    public String secondTaskflowtaskflow() {
    taskFlowId = "/WEB-INF/taskflow2.xml#second-taskflow";
    return null;
    }{code}
    The user is taken to the second task flow by clicking the link that executes the secondTaskflowtaskflow() handler, however, any subsequent requests take the user back to the first taskflow, i.e., the one assigned to the private instance variable, since that's how the wizard wrote the code. This explains why the table on the second taskflow displayed "Fetching Data . . .". The table's content delivery was set to lazy, so when the browser issued the AJAX request to get the data for the table, the task flow switched back to the first one and thus making the data unavailable. Changing the the content delivery attribute value to immediate, brings up the data initially, but any subsequent work on that taskflow routed the user right back to the first taskflow.
    I ended up fixing the problem by adding the TaskFlowId (data type) to the pageFlowScope map, so it would be remembered across requests until the user deliberately requests a different taskflow.
    Edited by: lili5058 on Feb 7, 2009 12:56 PM
    Edited by: lili5058 on Feb 7, 2009 5:06 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    chances are you are hitting a bug. But this is hard to say from here. If you want, we can further track the issue down. I suggest you exclude the use of ADF libraries and verify that the scenario works if the two taskflows work in the mentioned scenario of they are both defined in the project itself. If this works then it seems like a bug that should be filed. Can you verify this ?
    Frank

  • N78 v20.149 Bug List Thread

    Hi everyone, thanks for all your advice and comments now that v20.149 has been released here (only on FOTA and not NSU yet) are the changes I have noticed, along with some newly discovered bugs:
    NOTE: all the documented features/improvements are performed with the Theme Effects turned on.
    Changes/Improvements/New features I have noticed from v12.046 to v20.149:
    Standby screen:
    *While scanning for wireless networks in the home screen, instead of saying “No networks found” as in the past, it says “No WLANs available”, also some other minor name changes in this menu.
    *Share online icon in standby screen seems to be different
    *When going back to the music player via the standby screen, it goes straight into the player without a fading in/out transition as it did before when Theme Effects are turned on (an instantaneous response). However, for going into other sections from the standby screen the fade in/out transition still occurs.
    *When Music Player is operating, and seeing the track name on the screen, and then when one song ends and goes to the next track, the speed at which this happens is much improved although not flawless (there is still some lag).
    *Scrolling up and down through the entries in the standby screen is very fast and not slow like before.
    Call log, Contacts and calling function:
    *Calling speed (from standby screen to Contacts or Call Log) and transition to call/disconnected screens much faster and improved
    *Faster resume of music playback after call is ended
    *Volume bar is changed from ten dotted increment to continuous coloured volume triangle (this has also been reflected in other menus and options throughout the phone)
    Maps:
    *Maps updated to version 2.0
    Music Player:
    *Much faster interface and speed through all menus
    *Pressing volume keys is much improved and faster and more accurate response than before (where it may have taken time in the past for the volume level to update)
    *Music controls (i.e. Rewind, Fast forward, play/pause, stop) are no longer the same colour as the matching theme, now it is just the same light green colour across all themes
    *Visualisations are still a bit slow, but faster than before
    Photos:
    *Transition into the Photos application is much faster than before
    *Scrolling through photos and videos and the like is still jerky and thumbnails still take a while to be updated from pixelated to clear thumbnails
    Settings:
    *In Themes, there is a new theme called Music (very yucky looking I must admit)
    *Power saver now includes “Now playing” option, so when the backlight goes off, the currently playing song and time are displayed on the screen for a number of seconds before disappearing. This occurs before keypad lock is activated, and when any key is pressed, the names of the song light up (in green or red). Also when going from one track to the next while this screensaver is activated, the date is displayed briefly.
    Other:
    *General speed improvements across all menus and applications
    *Help function is much faster and speed improved
    *New help topics added to Help function
    *Speed dial now works without any lag
    *New RealPlayer interface and version updated (where the RealPlayer screen is no longer displayed but grey bars on top and bottom of the video)
    *About application has been updated for the year dates so that they are all “2009”.
    *Installation of applications and refresh of available applications within the Application Manager is much improved and faster (although icons for installed applications are now not displayed)
    *”Application update” added to Applications
    *Carousel menu has new options under each heading
    *Navi-wheel seems to have been tweaked a bit more
    *Background light settings actually work now
    *Truncated email-account login name fixed
    Other documented changes that have been stated by others for v13.052 and now v20.149:
    *Improvements:
    Connectivity:
    - System Error message appears when trying to stream a clip from a busy server
    - Timestamp corruption error in long streaming which leads to 'Error in receiving live
    content'
    -VPN not working through WLAN in offline mode
    - Priorities of protected IAPs could not be changed via UI
    - Mail For Exchange did not play tone for every mail received as per S60 3.0 and 3.1
    products
    - DM settings were not generated automatically when Email settings are defined in variant
    Photos:
    - Thumbnail displayed does not match actual image if user deletes thumbnail file in
    memory card private folder
    Internet:
    - UI issues when viewing Youtube videos
    Music:
    - Playing WMA audio files improved
    - IHF cannot be enabled during call when FMT is on
    - DRM: The ampersand character ('&') encoding is not correct
    Other changes:
    - Weekly recurring clock alarm always sets for the current weekday regardless of the day
    chosen
    - Contact Groups are not titled correctly
    - Help text located in settings/general/Navi Wheel
    - Help text for Voice commands
    - Access point generation difficulties after factory reset
    New features:
    - Boingo – Cancelled
    - Comes With Music (CWM) - This SW Version includes CWM enablers
    Changes:
    Bluetooth
    * N78 to CK-07W Audio Lost at regular intervals
    * Call Not Working With Bluetooth Headset
    WLAN
    * WLAN APN passed along with SDP contents is not utilized by Real Player
    Power Management
    * Sleep current too high while video applications at background
    GPS
    * The phone freezes when launching the Trip distance by clicking the link in Help content
    PC Suite
    * Harvester Server doesn’t close all necessary connections to other services during backup/restore
    SIM/USIM
    * Incorrect error codes are passed by TSY from SIM server to application layer for Smart card feature
    Radio
    * RadioLauncher gets corrupted state when VisualRadio exits
    * FM frequency range extends below 87.5MHz
    Podcast
    * Podcasts: garbled search results when entering a number as the search title
    Photos
    * Crash when launching Photos application after restoring from memory card
    * Slideshow doesn’t work after used device for a while
    Internet
    Maps
    * Maps:”My position” and “My place” are translated into the same Chinese
    Messaging
    * E-mail username truncated causes problem with login
    * Adding new number from SMS to existing number in ADN causes corruption
    Download!
    * Download client doesn’t work with certain operators WAP APN
    Other Changes:
    * Java platform version number not updated in IAD
    * Widget installer plugin cannot be upgraded
    * Removing battery during alarm makes the device unusable
    * Stub sis file doesn’t include httptransfer component
    * Paths are incorrect in cenrep creation file (Naviscroll and FMTX affected)
    * Internal Debugging tool wrongly included in Production SW
    * Device cuts off URL parameter in RTSP streaming link
    * Delivery via Device Management corrupts EAP-FAST PAC file
    * TCK failure with HTTP and AMR Combination
    * SpaceUI doesn’t allow for changes when a default number is assigned in Phonebook
    * Display corrupts with 3rd party application BestCalc
    Bugs/missing features already found:
    *Will not let you enter the Date and Time settings, instead going back to the main menu
    *Will not let you enter settings for the alarm Clock, instead going back to the main menu (related to the Date and Time above)
    *Carousel menu by pressing that small silver key is still inconsistent, sometimes appears with scroll bar and performance is still slow
    *Still no N-gage client within firmware
    I have yet to check all the bugs that were documented for v12.046 in the thread /discussions/board/message?board.id=swupdate&thread.id=42047&page=4, but I will go about that very soon and document all the changes here in this thread. But so far, so good, the firmware appears to be a lot better and more stable than 12.046. Again, thanks to all users for their current feedback on problems. Remember to be sure to add your experiences with the N78 here!
    Message Edited by celandine on 15-Jan-2009 02:59 PM

    My n78 froze at the standby screen when it rebooted itself during the upgrade from v12 to v20.149. The background image and active standby icons appeared, but nothing else - no network provider name, no battery or signal level indicator, no clock, no calender entries, no wlan scanning, no share online. I left it for 15 minutes or so before crossing my fingers and removing and replacing the battery (since the power button did nothing). Not a great start I thought. But it started up ok.
    new/unfixed bugs
    The clock alarm did not switch the phone back on after the first 5 minute snooze, but it did do the snooze resume thing when I actually switched the phone on 15 minutes later... I setup a "within 24 hours" alarm and that had no problems switching on the phone several times with a 1 minute snooze so I guess I'll have to wait until tomorrow morning to see if my weekday alarm snoozes properly now...
    The FM transmitter was transmitting at 107.5 even though the settings screen and active standby message showed 106.9 which I had set it to before the update... Viewing and saving the fm transmitter settings did update the frequency to 106.9 though.
    I'm still unable to set default numbers for some contacts - the contacts app exits to the standby screen.
    Unable to zoom camera/photos when musicplayer and fm transmitter activated.
    improvements
    At least the loudspeaker function works after using the FM transmitter now.
    Playback of videos through the images app seems much improved - i.e. it actually plays video clips all the way through without freezing the picture.
    I'll post more if I notice anything

  • A bug in Y value?

    Hi,
    In the follwoing trace code, I got correct values for the
    first three lines, e.g., Height, width, and x values. But Y is
    always 0 for all controls I tried. And obviously they are at
    different vertical positions. So this is a bug of Flex or something
    else?
    Thanks.
    trace("Height: " +
    this[page.@id][Form.@id][Error.ObjID].height);
    trace("Width: " +
    this[page.@id][Form.@id][Error.ObjID].width);
    trace("X: " + this[page.@id][Form.@id][Error.ObjID].x);
    trace("Y: " +
    this[page.@id][Form.@id][Error.ObjID].y);

    Hi,
    Is There a bug in UML documentation in SJSE 8.1?
    When I write some text in editor, it insert ENTER and
    Blanck lines in my text. Could you please be more specific? What is an action which causes insertion
    of Enter and Blank lines? Is it after Save? Or after reopen of project? Or
    after/before something else? It would be valuable if you provide an example of
    your text before your action and after it.

  • Flex 2 : Possible bug in Slider

    Hi,
    I have been trying to restrict the thumbs of an HSlider from
    overlapping.
    Setting allowThumbOverlap to false did not work.
    I noticed that the ability of the thumbs to overlap is
    directly related to the maximum value allowed for the slider.
    Given below is an example for the same. I presume this must
    be a bug, since the documentation mentions
    nothing about this. If somebody can throw more light on this,
    it would be great.
    TestSlider.mxml
    ===========================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*">
    <mx:HBox>
    <mx:Label text="Maximum 13" width="90"/>
    <mx:HSlider id="slider13" width="180" thumbCount="2"
    snapInterval="1" minimum="0" maximum="13" dataTipPlacement="bottom"
    />
    <mx:Label text="Thumbs overlap in both directions"
    width="300"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="Maximum 14" width="90"/>
    <mx:HSlider id="slider14" width="180" thumbCount="2"
    snapInterval="1" minimum="0" maximum="14"
    dataTipPlacement="bottom"/>
    <mx:Label text="Thumbs overlap from left to right"
    width="300"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="Maximum 15" width="90"/>
    <mx:HSlider id="slider15" width="180" thumbCount="2"
    snapInterval="1" minimum="0" maximum="15"
    dataTipPlacement="bottom"/>
    <mx:Label text="Thumbs do not overlap" width="300"/>
    </mx:HBox>
    </mx:Application>
    ===========================
    Regards!
    Santosh

    Santosh,
    This is indeed a bug. Thank you for bringing it to our
    attention. As a
    workaround, try using different values for the width property
    or don't
    specify a width at all.
    Jason Szeto
    Adobe Flex SDK Developer
    "stchavan" <[email protected]> wrote in
    message
    news:e9lh3m$sv0$[email protected]..
    > Hi,
    >
    > I have been trying to restrict the thumbs of an HSlider
    from overlapping.
    > Setting allowThumbOverlap to false did not work.
    > I noticed that the ability of the thumbs to overlap is
    directly related to
    > the
    > maximum value allowed for the slider.
    > Given below is an example for the same. I presume this
    must be a bug,
    > since
    > the documentation mentions
    > nothing about this. If somebody can throw more light on
    this, it would be
    > great.
    >
    > TestSlider.mxml
    > ===========================
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*">
    > <mx:HBox>
    > <mx:Label text="Maximum 13" width="90"/>
    > <mx:HSlider id="slider13" width="180" thumbCount="2"
    snapInterval="1"
    > minimum="0" maximum="13" dataTipPlacement="bottom" />
    > <mx:Label text="Thumbs overlap in both directions"
    width="300"/>
    > </mx:HBox>
    > <mx:HBox>
    > <mx:Label text="Maximum 14" width="90"/>
    > <mx:HSlider id="slider14" width="180" thumbCount="2"
    snapInterval="1"
    > minimum="0" maximum="14" dataTipPlacement="bottom"/>
    > <mx:Label text="Thumbs overlap from left to right"
    width="300"/>
    > </mx:HBox>
    > <mx:HBox>
    > <mx:Label text="Maximum 15" width="90"/>
    > <mx:HSlider id="slider15" width="180" thumbCount="2"
    snapInterval="1"
    > minimum="0" maximum="15" dataTipPlacement="bottom"/>
    > <mx:Label text="Thumbs do not overlap"
    width="300"/>
    > </mx:HBox>
    > </mx:Application>
    > ===========================
    >
    > Regards!
    >
    > Santosh
    >

  • Reproducable Scrollbar Bug. please confirm?

    Please can someone confirm they can reproduce behaviour?
    I just wasted 2 hours trying to figure it out and Im 99% sure
    its a bug.
    Add a VScrollBar
    Set minScrollPosition to 0, maxScrollPosition to 100
    now at runtime, update the 4 properties of the scroller as
    follows....
    scroller.pageSize = 400;
    scroller.minScrollPosition = 0;
    scroller.maxScrollPosition = 400;
    scroller.pageScrollSize = 200;
    At this point, dragging the thumb tab of the scroller will
    NOT update the scrollPos correctly, nor will the scrollEvent be
    correct. It behaves as if Scrollposmax is still 100.
    If you click the scrollbar client area, or use the arrows, it
    works fine. But dragging the thumbtab does not.
    Now get rid of the 4 updates, and simply use
    scroller.setScrollProperties(400, 0, 400, 200)
    You can see this is instantly different because the thumb tab
    changes in height. dragging this works as expected
    Very frustrating. Maybe there was a method I should have
    called after updating the 4 properties, but if so the docs made no
    mention of it.
    Its a bug as far as Im concerned.
    Does anyone agree?

    I haven't tried to reproduce your results, but maybe you need
    to call invalidateDisplayList() on the item after you update those
    properties. That should make the necessary call to
    setScrollProperties() for you.
    I don't know about the status of this as a bug - quoth the
    documentation - "In general, setting a property on a component
    automatically calls the appropriate invalidation method" - although
    that brings up the question of what kind of scope the word
    "general" entails.

  • Flattened pixmap mask description wrong for small images -- Bug?

    I've been working with images loaded from disk lately, and it seems to me the description for the mask element of the flattened pixmap cluster is incorrect when the image size is small. The online help reads:
    mask is an array of bytes in which each bit describes mask
    information for a pixel. The first byte describes the first eight pixels, the
    second byte describes the next eight pixels, and so on. If a bit is zero,
    LabVIEW draws the corresponding pixel as transparent. If the array is empty,
    LabVIEW draws all pixels without transparency. If the array does not contain a
    bit for each pixel in the image, LabVIEW draws any pixels missing from the array
    without transparency.
    So there should be one bit in the mask for each pixel. Here is what I'm getting:
    image size   # pixels    mask length, bytes (bits)
    1x1               1            2   (16)
    1x2               2            2   (16)
    2x2               4            4   (32)
    4x4              16            8   (64)
    8x8              64           16  (128)
    9x9              81           18  (144)
    32x32          1024          128 (1024)
    33x33          1089          198 (1584)
    It looks like there are two issues here. One, the mask array works on rows of pixels. If the row does not end on a byte, the byte is padded on the right with zeros until the end, then the next row starts. E.g., for the 9x9 image, pixel #9 is byte 2, bit 8; byte 2 is padded with zeros; pixels 10-18 start with byte 3.
    Two, for some reason small images (i think 8 pixels per row or less, but I'm not sure) have every other byte a zero. For example, here is the mask for my 4x4 test image, with every pixel opaque:
       11110000 00000000 11110000 00000000 11110000 00000000 11110000 00000000
    According to thel help text, the mask array should be 2 bytes long, with every bit a 1.
    It seems to me that the first issue is likely intentional, and the help text just isn't entirely clear. The second issue, I'm not sure about. Maybe it was just assumed that pictures would be large and small pictures wouldn't be used?

    Wiebe is correct that every line of the image gets an even number of bytes in it mask.
    The help was misleading, I agree. I have reported this confusion as a bug in the documentation (I do not remeber to CAR#) so it can be explained better.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • DirectoryWatcher - bug & doc error

    I've set up a DirectoryWatcher event to monitor a shared
    directory on a network (CF7.01 Ent on Win2003 has full R/W/D
    permissions). I've noticed two quirks, possibly bugs or
    undocumented "features".
    1) The interval setting in the config file is ignored and the
    event is triggered the moment a new file is added. The
    documentation says the directory is only checked at the interval
    specified in the config file which defaults to 60000ms (60sec). I
    suspect this setting is for Unix flavours of CF only but can't find
    documentation to suggest that CF on Windows will ignore the
    interval setting.
    2) I'm only using the addFunction=onAdd event but this is
    called twice whenever a file is added. If 1 file is added it gets
    run twice, if 3 files are added it runs 6 times. I added some code
    within the onAdd function to log whenever it's executed and this
    confirms it's run twice when a new file is added. (New files are
    created by a different CF server on the network.)
    The documentation says to set the changeFunction and
    deleteFunction "to nothing" if you don't want them monitored, so I
    did. However, I have reason to believe the changeFunction is still
    executed despited the line "changeFunction=" without any value.
    I tried a test and disregarded the documentation and
    commented out the changeFunction and deleteFunction lines in the
    config file and hey presto, the "addFunction=onAdd" function is now
    executing just once per file!
    This suggests there is 1 bug and 1 documentation error. The
    bug is something like "changeFunction=" will actually execute the
    onAdd event (CF's wiring must be mixed up), hence a new file will
    execute onAdd twice. The documentation error is that "set to
    nothing if you don't want to see these events" should actually say
    "remove or comment out these lines if you don't want these events
    to be triggered".
    Gary.

    Hi Russ,
    same issue here (FM 11, Win7). I'm not sure, but in my opinion it's an error in the documentation. The values for ComponentType should be:
    Constants.FV_BK_FOLDER (0x2): Folder
    Constants.FV_BK_GROUP (0x40): Group
    Constants.FV_BK_FILE (0x200): File
    Additionally you could check the sort of file type via BookComponentFileType (FM, MIF, XML, Ditamap).
    In a short test script for traversing a hierarchical book the BookComponentFileType has some more values:
    Constants.FV_BK_FOLDER (0x2): Folder
    Constants.FV_BK_BOOK (0x4): Book (inside another book)
    Constants.FV_BK_FM (0x8): FrameMaker document
    Constants.FV_BK_MIF (0x10): MIF document
    Constants.FV_BK_XML (0x20): XML document (also Ditamap and Bookmap)
    Constants.FV_BK_GROUP (0x40): Group
    The main difference between ComponentType and BookComponentFileType seems to be the more detailed information about the file type.
    Best Regards, Andreas
    Message was edited by: justBE

  • Bridge CC constantly re-caching some folders (again).

    My new Bridge CC on Win 7 is repeatedly re-caching thumbnails on some folders. Not all folders, just some, and that is my mystery. I have been doing extensive tests and yet can't determine what it is about some folders or their contents that cause a constant re-cache.
    Would like to know if anyone else is seeing a re-caching problem with Bridge CC, and if you have a clue why?
    I have tried all the usual suspects, short of a complete re-install. I've updated, I've trashed preferences, I've tried many different image folders and contents. I've set my cache size to the max and put it on a disk with tons of room.  I've completely deleted the cache and started over. Can't find any rhyme or reason.
    This problem is similar to one I and several other people had with CS6 many months ago.
    http://forums.adobe.com/thread/1024624?start=0&tstart=0
    http://forums.adobe.com/thread/1007560
    Different people reported different causes and cures. In my case, the cause was the presence of layered TIF files in a folder. Disabling TIF support made it go away.  The final cure for me was the last update to CS6 Bridge.
    But my current CC Bridge cache problem is not the same. Layered TIFs are definitely not the cause. It appears to happen only on folders with raw files, but not all of them. It does not happen on different folders containing tif or jpeg versions of the same files. Something is making Bridge think the files in a folder have changed when, in fact, they have not.

    I have less sympathy. The bug has been documented for several years, and no one seems to have taken ownership of the problem. As it only affects Bridge, it appears to automatically become very low priority. The only reason the first bug was fixed was because I isolated the cause and then badgered Adobe. So, I reckon the only way to get the second bug fixed is if us users can find a way to recreate the symptoms reliably.
    I have about 40,000 images in scores of folders, organised by century, year and month-date. I'd say more than 3/4 of the folders are unaffected by the bug. The folders that are affected tend to regenerate up to 3/4 of the thumbnails. Clearing the cache for the folder can sometimes reduce this fraction. As you noted, copying them to a new location can remove the problem, but this is not necessarily permanent, and it often returns. Simply copying the files to another computer doesn't work. It seems to be a problem with the cache and the Bridge database.
    I've spent several hours trying to diagnose the criteria which triggers the bug. The ONLY thing which seemed to help was to untick the "Enable Lens Profile Corrections" box. It killed the repeats dead on my system. My guess is that this bug is more likely to affect people to change Camera Raw defaults to enable this feature and process most or all of their images, as they will have a very high percentage of thumbnails subject to LPCs in every folder. Like the 6.1 bug, the 7.3 bug probably needs some other condition to trigger the cache discrepancy which causes the regeneration.
    So, my workaround was to remove LPC from all of my non-shortlisted images, and from Camera Raw defaults. Now, I only use LPC on my best images, and only if necessary. It seems to have cut down the drain on resources, but the better my photos, the more work Bridge must do! ;-)

  • What is the diffrence between Row id and primary key ?

    dear all
    my question is about creating materialized views parameters (With Rowid and
    With Primary kry)
    my master table contains a primary key
    and i created my materialized view as follow:
    CREATE MATERIALIZED VIEW LV_BULLETIN_MV
    TABLESPACE USERS
    NOCACHE
    LOGGING
    NOCOMPRESS
    NOPARALLEL
    REFRESH FAST ON DEMAND
    WITH PRIMARY KEY
    AS
    SELECT
    BCODE ID, BTYPE BTYPE_ID,
    BDATE THE_DATE,SYMBOL_CODE STOCK_CODE,
    BHEAD DESC_E, BHEADARB DESC_A,
    BMSG TEXT_E, BMSGARB TEXT_A,
    BURL URL, BTIME THE_TIME
    FROM BULLETIN@egid_sefit;
    I need to know is there a diffrence between using (with row id) and (with primary key) on the performance of the query?

    Hi again,
    fast refreshing complex views based on rowids, according to the previous subject.
    (You're example shows that) are not possible.
    Complex remote (replication) snapshots cannot be based on Rowid too.
    for 10.1
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm#sthref5054
    for 10.2
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm#sthref6873
    So I guess (didn't check it) that this applies ONLY to replication snapshots.
    This is not documented clearly though (documentation bug ?!)
    Documentation states that the following is generally not possible with Rowid MVIEWS:
    Distinct or aggregate functions
    GROUP BY or CONNECT BY clauses
    Subqueries
    Joins
    Set operations
    Rowid materialized views are not eligible for fast refresh after a master table reorganization until a complete refresh has been performed.
    The main purpose of my statements was to try to give a few tips how to avoid common problems with this complex subject, like for example: being able to CREATE an MVIEW with fast refresh clause does not really guarantee that it will refresh fast in the long run (reorganisation, partition changes) if ROWID based, further the rowid mviews have limitations according to the documentation (no group by, no connect by, link see above) plus fast refresh means only to use filter columnns of the mview logs, plus for aggregates you need additional count (*) pseudo columns.
    kind regards
    Karsten

  • Getting "Origin is not allowed" When Trying to Invoke RESTful Service from Another Domain

    I am having problems trying to invoke my RESTful web service from a different domain. I'm well aware of the normal restrictions of cross-site / cross-domain scripting but in Oracle documentation it says that all origins are allowed by default when creating a RESTful service without using authentication.
    I have created a very simple service and am trying to invoke it using jQuery.Ajax calls from a different domain and I am getting XMLHttpRequest cannot load http://address_to_my_web_service. Origin http://calling_from_address is not allowed by Access-Control-Allow-Origin.
    I understand that using JSONP instead of JSON is actually the best practice around cross-site scripting but it appears as though APEX does not support JSONP because with JSONP, there are URI parameters added to the base request (callback).
    I am stuck and would greatly appreciate any help.
    I'm starting to wonder if this could be a bug because Oracle documentation says all origins should be allowed when using a service that does not require authentication. I also tried to force the origin to be allowed by typing it in and also using the wildcard '*' and it still did not work.
    Thanks,
    Mark Williamson
    EDIT: It is now working after adding a URI prefix to my web service module.

    The SSL handshake works differently to a browser as it is making the connections automatically.
    The browser asks every time if you want to trust an expired certificate, and it also recommends not to. Its impractical to manually check every service call to say do you trust the certificate so the functionality doesn't exist. I doubt any integration product does this. Therefore there isn't a option to ignore the certificate if it has expired.
    This makes sence as the certificate is untrustworthy. The whole idea around SSL is trusting the site you are communicating with, all parties need to be trusted. This stops hackers from replicating their site and intercepting data.
    If the administrator of the remote site is not willing to renew the certificate, are they really interested in SSL. I suggest they expose a non SSL service.
    cheers
    James

Maybe you are looking for

  • Cannot send message using the server (null)

    i use mail 2.1. i have a .mac account and have three other email accounts attached to my mail account. lately, i cannot send any email. the switchiing ports fix hasn't helped either. this is the error message: CANNOT SEND MESSAGE USING THE SERVER (nu

  • Cannot start BI Server (nQSError: 15014)

    Hello, just migrated a Discoverer EUL with the migration tool and integrated the new rpd file into the NQSConfig.ini. When I tried to start the BI Server, I got an error: "...Server start up failed: [nQSError: 15014] No subject area is available in t

  • How do I get calendar on a computer with Windows?

    I have a PC with Windows and want a calendar to sync with my iPod. Can I use iCal or is there another calendar that will work? Someone said I could use the Outlook Express calendar, but how do I find it? Thanks.

  • Use SAP service without XI/PI?  Need answer for mgmnt mtg in 30 min

    Trying to read SDN info in last hour, but can't see definitely that a SAP web service can be available for external appl... without using SAP PI (which we've not used).   All diagrams/text seem to indicate XI/PI as dependent component.

  • Automated install of AMS 5.0.1 Linux

    Hello, Is there an automated install function to AMS 5.0.1 installer?  I haven't found anything in the documentation, yet. Thank you, Eugene