Accessing UIView.bounds has side effects?

I'm trying to debug another CocoaTouch issue, and so I added a bit of logging to my view controller:
NSLog(@"view size = %f,%f", self.view.bounds.size.width, self.view.bounds.size.height);
But just adding this line of code changes the behavior, causing my lower subviews to appear about 45 pixels higher than they do without the line.
I've read the UIView bounds documentation six times, but I can't see anything there suggesting that I should expect side-effects from the getter.
Anybody know what's going on here?

Hi,
maybe it's because you're accesing self.view, wich will cause the view beeing loaded if it wasn't loaded allready.
So, depending on where you put this line of code it could change the behavior of your app at least in theory.

Similar Messages

  • Changing bounds origin of UIView has no effect

    I try to pan/scroll a big image(500x500) in a small frame (200,200) like in Google Maps. Changing bounds origin of UIImageView has no effect. The same part of image is displayed by the view.
    IBOutlet UIImageView *image;
    -(void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
    CGRect bounds=[image bounds];
    bounds.origin.x=bounds.origin.x+10;
    bounds.origin.y=bounds.origin.y+10;
    [image setBounds:bounds];
    Does anyone have any idea what is wrong?

    Ok, I found out what's wrong.
    To "pan" an image you have to change bounds origin of PARENT view.
    - (void)applicationDidFinishLaunching:(UIApplication *)application {
    CGRect viewRect = CGRectMake(50, 50, 100, 100);
    UIView* myView = [self createView:viewRect withColor:[UIColor redColor]];
    UIView* childView = [self createView:CGRectMake(0, 0, 50, 50) withColor:[UIColor blueColor]];
    [myView addSubview:childView];
    [window addSubview:myView];
    myView.clipsToBounds=TRUE;
    myView.bounds=CGRectMake(45, 45, 100, 100);
    [myView release];
    [childView release];
    [window makeKeyAndVisible];
    -(UIView*) createView:(CGRect)viewRect withColor:(UIColor*)color
    UIView* myView = [[UIView alloc] initWithFrame:viewRect];
    myView.backgroundColor=color;
    return myView;
    }

  • Intel GMA - turning off rotation access keys has no effect

    I want to use ctrl+alt+down and ctrl+alt+up in some application, so I want to turn these access keys off. I did it in Intel Graphics Media Accelerator Driver for Mobile settings but it has no effect - these key combinations still rotate my screen. The settings are correctly remembered.
    I tried it on administrator and on normal user account. Anyone knows how to solve this problem?

    Yes. I have already done it, but it's a workaround, not a solution to this problem. I got used to this key combinations in Eclipse (programming environment). There are a lot of key shortcuts, which I use, so it's hard to choose another one, which is good and free.
    When I comes to rotating a screen - I don't need it. I can not even imagine use case when 180 degree screen rotation in laptop would be useful :)

  • What exactly are side-effects in #pragma no_side_effect?

    Which of the following qualify as side-effects for the purposes of #pragma [no_side_effect|http://docs.sun.com/app/docs/doc/819-5265/bjaby?a=view#bjacp]:
    1. dynamically allocating/deallocating memory using malloc/free or operator new/delete
    2. exiting the function by throwing a C++ exception
    3. temporarily changing the disposition for a signal (e.g., ignoring or suspending a signal)
    4. creating a thread and joining with it

    Thanks for your answers! Just to make sure I understand correctly: accessing the local state of the caller through a parameter is not a side-effect. I.e., in the following snippet the function has_no_side_effects() has no side-effects:
    int get (int *p) { return *p; }
    void set (int *p, int x) { *p = x; }
    void has_no_side_effects () {
        int x;
        int y;
        set (&x, 0);    // not a side-effect (x is local)
        y = get (&x);   // same
    }But in the following, has_side_effects() does:
    void has_side_effects () {
        static int x;
        static int y;
        set (&x, 0);    // side-effect: writing a "global"
        y = get (&x);   // side-effect: reading a "global"
    }Also, reading global const data (i.e., what might be in ROM) is not a side-effect. Correct? E.g.,
    static const int global[] = { 1, 2 };
    void has_no_side_effects () {
        int x;
        int y;
        x = global [0];   // not a side-effect, global is in ROM
        y = global [1];   // same
    }

  • [Solved] Side effects of compiling on slower machines.

    So, I had been doin' casual stuff on my big 'ol laptop (Quad-core I7), when it's bios randomly bricked and I was unable to boot. (I think it was the bios, since it crashed on the boot logo before dying.)
    Anyway, I now have a silly lil' lappy (Dual-Core I3 fuq yeah!) which I actually bought for school.
    Compiling linux-pf took ~5 hours, and wine-silverlight around the same time.
    I wonder, since compiling tasks have to be split over only 2 cores (I use -j4 anyway ), and they have to work much harder to compile because they don't have as much power as I7, does compiling also affect the lifetime of the lappy much more than it did on my "big 'ol laptop"?
    And, does it also have more side effects?
    EDIT: I forgot to state that the lappy is a netbook.
    Last edited by mid-kid (2013-10-23 07:26:28)

    Anoknusa is on the right track.   There is actually an analogy to electrical circuits when looking at heat flow.   Essentially, heat is dissipated in the junctions of the transistors in the die.  the temperature of the die is a function of the heat capacity of silicon, and the amount of heat present.  If the die is insulated thermally, then heat cannot flow from the device and the temperature will increase without bounds (or until something melts)
    If there is a thermal sink (Think the heat sink), and a thermal source (the die), and a thermal path between them, then heat will flow from the source to the sink.  The rate of heat flow is determined by the delta (difference) in temperature between the temperature of the source and the sink, and the thermal resistance between them.  Thermal resistance is a function of the material (plastics have a low thermal conductivity, metals and ceramics have high conductivity) and the area.  ICs are rated at maximum junction temperatures and define the thermal conductivity to the case.
    So, the variables include the thermal conductivity of the processor, the junction temperature at which the processor runs (a function of the number of transistors and who fast they switch), the area on top of the processor on to which you can attach a heatsink, the ambient temperature around the heatsink, the size of the heatsink, the airflow over the heat sink, and the thermal conductivity of the goo between the heatsink and the case of the processor (BTW, Air is a sucky thermal conductor, so a heatsink without goo is worthless).   To make things even more complex, many modern chips have thermal pads under the parts that are intended to be soldered down to ground layers on the printed circuit board to allow the board itself to act as a heatsink.  These pads are impossible to solder without a surface mount reflow process.  I think the Ras-Pi has a processor with this type of thermal pad.   This type of thermal pad is not compatible with socketed devices.  In fact, sockets probably do a pretty good job of insulating the entire bottom of a processor.
    Last edited by ewaller (2013-10-19 16:36:59)

  • How do you adjust the earpiece volume on my 5s, the   button has no effect? Is it as I suspect, the phone is faulty or am I missing a trick somewhere?

    How do you adjust the earpiece volume on my 5s, the   button has no effect? Is it as I suspect, the phone is faulty or am I missing a trick somewhere?

    Thank you for the reply.
    ctrl B makes the top bar (File. Edit. View. Controls. Store. Help.) appear and disappear.
    ctrl S makes a side bar appear on the left side of iTunes. It shows the library which has Music. Movies. TV Shows. Apps. Playlists. Ect.
    When I did the steps you suggested, my iPhone did not show up in that list.
    I checked my firewall settings again, and they seem to be okay. My firewall is the only thing that I am not 100% sure of. If I go to Control Pannel>System and Security>Windows Firewall>Allow an app through Windows Firewall. It shows that iTunes is allowed. I'm not sure if something else might need to be allowed as well though. I have a few Remote options that are not allowed such as, Remote Event Log Management, Remote Scheduled Tasks Management, Remote Shutdown, Remote Volume Management, and Routing and Remote Access. I'm not sure if any of these need to be allowed or not, or if they are even affiliated with iTunes.

  • Excel Web Access(An error has occurred.Please contact your system administrator if this problem persists. )

    I'm using share point 2007 under windows server 2008 R2(one web server, another db server).When I publish a excel(*.xlsx) to report library or view it in web browser with the same error as bellows:
    Excel Web Access
    An error has occurred.
    Please contact your system administrator if this problem persists.
    Please kindly support to guide how to fix it with bellow information in details such as log.Many thanks!
    1. The 12/logs file is as bellows:
    10/10/2014 09:53:55.18  w3wp.exe (0x6528)                        0x5C08 Excel Services               
     Excel Calculation Services     2u7d Medium   ExcelServerSharedWebApplication.Local: An exception was thrown by configdb infrastructure: System.InvalidOperationException: ExcelServerSharedWebApplication.Local: Could
    not get ServerContext.Current, which indicates that either SharePoint or the SSP infrastructure isn't provisioned correctly or that we're running outside of a web context.     at Microsoft.Office.Excel.Server.ExcelServerSharedWebApplication.get_Local(). 
    10/10/2014 09:53:55.18  w3wp.exe (0x6528)                        0x5C08 Excel Services               
     Excel Services Administration  8tqh Critical Excel Services: Unexpected exception while trying to access Shared Services Database;. Error = ExcelServerSharedWebApplication.Local: Could not get ServerContext.Current, which indicates that
    either SharePoint or the SSP infrastructure isn't provisioned correctly or that we're running outside of a web context.. 
    10/10/2014 09:53:55.18  w3wp.exe (0x6528)                        0x5C08 Excel Services               
     Excel Web Access               6nfi Unexpected InternalEwr.OpenWorkbook - An unexpected exception in the ECS Proxy occurred. Message: Microsoft.Office.Excel.Server.ExcelServerSettingException:
    An error has occurred. ---> System.InvalidOperationException: ExcelServerSharedWebApplication.Local: Could not get ServerContext.Current, which indicates that either SharePoint or the SSP infrastructure isn't provisioned correctly or that we're running
    outside of a web context.     at Microsoft.Office.Excel.Server.ExcelServerSharedWebApplication.get_Local()     --- End of inner exception stack trace ---     at Microsoft.Office.Excel.Server.ExcelServerSharedWebApplication.get_Local()    
    at Microsoft.Office.Excel.Server.ExcelServerSettings.get_Settings()     at Microsoft.Office.Excel.Server.ExcelServerSettings.get_EcsList()     at Microsoft.Office... 
    2.the event in event viewer is:
    Log Name:      Security
    Source:        Microsoft-Windows-Security-Auditing
    Date:          2014/10/10 9:49:43
    Event ID:      4625
    Task Category: Logon
    Level:         Information
    Keywords:      Audit Failure
    User:          N/A
    Computer:      ***.net
    Description:
    An account failed to log on.
    Subject:
     Security ID:  NULL SID
     Account Name:  -
     Account Domain:  -
     Logon ID:  0x0
    Logon Type:   3
    Account For Which Logon Failed:
     Security ID:  NULL SID
     Account Name:  ***
     Account Domain:  ***
    Failure Information:
     Failure Reason:  An Error occured during Logon.
     Status:   0xc000006d
     Sub Status:  0x0
    Process Information:
     Caller Process ID: 0x0
     Caller Process Name: -
    Network Information:
     Workstation Name: ***
     Source Network Address: ***
     Source Port:  63664
    Detailed Authentication Information:
     Logon Process:  
     Authentication Package: NTLM
     Transited Services: -
     Package Name (NTLM only): -
     Key Length:  0
    This event is generated when a logon request fails. It is generated on the computer where access was attempted.
    The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
    The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
    The Process Information fields indicate which account and process on the system requested the logon.
    The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
    The authentication information fields provide detailed information about this specific logon request.
     - Transited services indicate which intermediate services have participated in this logon request.
     - Package name indicates which sub-protocol was used among the NTLM protocols.
     - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
    Event Xml:
    <Event xmlns="">
      <System>
        <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" />
        <EventID>4625</EventID>
        <Version>0</Version>
        <Level>0</Level>
        <Task>12544</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8010000000000000</Keywords>
        <TimeCreated SystemTime="2014-10-10T01:49:43.563436300Z" />
        <EventRecordID>37602685</EventRecordID>
        <Correlation />
        <Execution ProcessID="532" ThreadID="26096" />
        <Channel>Security</Channel>
        <Computer>***.net</Computer>
        <Security />
      </System>
      <EventData>
        <Data Name="SubjectUserSid">S-1-0-0</Data>
        <Data Name="SubjectUserName">-</Data>
        <Data Name="SubjectDomainName">-</Data>
        <Data Name="SubjectLogonId">0x0</Data>
        <Data Name="TargetUserSid">S-1-0-0</Data>
        <Data Name="TargetUserName">***</Data>
        <Data Name="TargetDomainName">***</Data>
        <Data Name="Status">0xc000006d</Data>
        <Data Name="FailureReason">%%2304</Data>
        <Data Name="SubStatus">0x0</Data>
        <Data Name="LogonType">3</Data>
        <Data Name="LogonProcessName">
        </Data>
        <Data Name="AuthenticationPackageName">NTLM</Data>
        <Data Name="WorkstationName">***</Data>
        <Data Name="TransmittedServices">-</Data>
        <Data Name="LmPackageName">-</Data>
        <Data Name="KeyLength">0</Data>
        <Data Name="ProcessId">0x0</Data>
        <Data Name="ProcessName">-</Data>
        <Data Name="IpAddress">***</Data>
        <Data Name="IpPort">63664</Data>
      </EventData>
    </Event>

    Hi Tracy,
    Have you changed something on your SharePoint 2007 environment recently before this issue occurred?
    This issue may be related to Alternate Access Mappings settings like the following similar post, if you have configured AAM, you can check if this issue happened to some URLs, if it's the case, please add the problematic URLs as a Publish URLs for the default
    zone for your web application, and also add these URLs as trusted locations, then check results again.
    If above doesn't work, please enable ULS log on verbose level to get more useful log errors which time are corresponding to the errors occur. 
    https://social.technet.microsoft.com/Forums/en-US/c9ab4818-65c9-444d-be50-1bfed1f1509b/excel-web-access-web-part-works-on-intranet-but-not-internet?forum=sharepointgenerallegacy
    http://blog.bugrapostaci.com/2011/09/08/how-to-enable-verbose-log-mode-on-moss-2007/
    Thanks
    Daniel Yang
    TechNet Community Support

  • Widescreen setting in video - tv out has no effect

    after a couple of hours of experimentation, i have concluded that the widescreen setting (on/off) in the tv out section of the video settings has no effect. i believe what it SHOULD do is adjust the signal to display properly on a widescreen (16x9) tv. i believe it does nothing. video displays stretched and squashed (photos too btw). this is after experimenting with the same itunes-purchased and non-itunes purchased videos on both my ipad and my iphone 3gs, using the same tv and the apple component av cable. the iphone works fine. the only way to get a semi-acceptable display on the tv with the ipad is to the set to tv to normal 4x3 display. (late model sony lcd hdtv). then you get thick black bars around the picture. with the iphone i can leave the tv display setting at it's regular "full" option and the picture fills the screen properly. i tried both sd and hd videos on the ipad. (sd only on the iphone obviously). does anyone else have this issue? is there a bug in the ipad software? is there a problem with MY ipad? will a software restore help?
    Message was edited by: Michael Rosenberg

    i tried a fair amount of stuff. here's 2 examples:
    1) itunes store copy of an episode of the office in both hd and sd.
    2) digital copy of the new star trek movie
    so the first is 16x9 and the second is a widescreen movie 2.35-1.
    both look fine when playing back off the iphone 3gs (sd copy of the office). both looked stretched horizontally and squashed vertically when playing off the ipad. note that everything looks fine on the ipad itself. it just messed up when connecting
    the ipad to my tv. in all cases, the widescreen setting in the tv out section of the video panel on the ipad has NO effect.
    i can change the screen settings ON THE TV to fix the distortion but then i end up with thick black bars on all 4 sides. and i don't need to do this with the iphone 3gs. i continue to believe something is wrong with the ipad (or MY ipad).

  • MOPZ-generated SIDE EFFECT report never shows up in SOLMAN

    HI - we are using SOLMAN ST 400, SPS#24
    I am doing a MOPZ transaction for an ERP604/NW701 system landscape - specifically for updating from a lower SPS level to a more recent one...
    In MOPZ....i requested the SIDE EFFECT report.....at that time got to a screen where it displayed the following message "Your request has not yet been processed. Please check back again in a few hours. "
    I've waited more than 3 days - and still - when I go back into SOLMAN....into this same MOPZ transaction#....to look for the SIDE EFFECT report......it doesn't show up anywhere - instead....i just continue to see the same message (Your request has not yet been processed. Please check back again in a few hours. )
    Please advise
    (it seems that the process for MOPZ-generated side effect reports is not as "user friendly" as the "old" way - outside SOLMAN/MOPZ - of doing this - in the "old" way, using SMP....you always got a request id#....and you always got an EMAIL in a few hrs ....that you clicked on to get the report.....i see neither of these when using MOPZ)

    Hi there,
    sometimes the side-effect report may take longer to arrive due to a long processing time for the request. This may happen due to many concurrent requests at the same time, or because there are technical issues in the service backend systems here at SAP.
    I hear that you already got the side-effect reports after a delay, so I guess that your request was finally processed.
    Best regards,
    Miguel Ariñ

  • Show Details in pagetoolbar-options - property has no effect?

    Hello all
    When I set the property-value in the pageToolBar-iView for the Details it seems to have no effect:
    When I save and preview the whole thing, the option "Details" is still available...
    When I change the options for everything else (Reload, Add to Favourites, ...) it has immediate effect.
    By the way - although I don't want it - I also can't remove the caption/title of the current view in the pageToolBar.
    Any help or explanation is greatly appreciated.
    Regards
    Michael

    Hi Vineeth
    Thanks so far for your reply.
    Of course, this could be due to some server-/proxy-side caching, although I doubt that in my case.
    I already made the same settings on the productive-portal and experience the same behaviour there, which surprises me a little.
    I'll simply wait about a week, maybe the problem will vanish by itself (rather I'll wait for the proxy or any other cache to un-cache it).
    I'll post my experiences.
    Regards
    Michael

  • Documentviewer new toolbar button HorizontalAlignment="Right" has no effect?

    Hi all,
    I added a button to the documentviewer toolbar after extracting a copy of the template in Blend. I added a button (closeButton) with an "X" as its content. It works but I want the button to be at the right side of the toolbar. I tried the
    horizontalAlignment property but is has no effect. If I add margin="500,0,0,0" it works. But I don't want to fix it that way. What Am I missing?
    Thanks
    <Style x:Key="myDocumentViewerStyle" BasedOn="{x:Null}" TargetType="{x:Type DocumentViewer}">
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ContextMenu" Value="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerContextMenu, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}"/>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DocumentViewer}">
    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Focusable="False">
    <Grid Background="{TemplateBinding Background}" KeyboardNavigation.TabNavigation="Local">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="*"/>
    <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <ContentControl Grid.Column="0" Focusable="{TemplateBinding Focusable}" Grid.Row="0" Style="{DynamicResource myContentControlStyle}" TabIndex="0"/>
    <ScrollViewer x:Name="PART_ContentHost" CanContentScroll="true" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalScrollBarVisibility="Auto" IsTabStop="true" Grid.Row="1" TabIndex="1"/>
    <DockPanel Grid.Row="1">
    <FrameworkElement DockPanel.Dock="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
    <Rectangle Height="10" Visibility="Visible" VerticalAlignment="top">
    <Rectangle.Fill>
    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
    <LinearGradientBrush.GradientStops>
    <GradientStopCollection>
    <GradientStop Color="#66000000" Offset="0"/>
    <GradientStop Color="Transparent" Offset="1"/>
    </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    </Rectangle.Fill>
    </Rectangle>
    </DockPanel>
    <ContentControl x:Name="PART_FindToolBarHost" Grid.Column="0" Focusable="{TemplateBinding Focusable}" Grid.Row="2" TabIndex="2"/>
    </Grid>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <Style x:Key="myContentControlStyle" TargetType="{x:Type ContentControl}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ContentControl}">
    <ToolBar Focusable="{TemplateBinding Focusable}" ToolBarTray.IsLocked="True" Language="en-us" KeyboardNavigation.TabNavigation="Continue" Uid="ToolBar_2">
    <Button x:Name="PrintButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerPrintButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Print" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="0" ToolTip="Print (Ctrl+P)" Uid="Button_14" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="CopyButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerCopyButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Copy" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="1" ToolTip="Copy (Ctrl+C)" Uid="Button_15" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_110"/>
    <Button x:Name="ZoomInButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerZoomInButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.IncreaseZoom" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="3" ToolTip="Increase the size of the content (Ctrl +)" Uid="Button_16" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="ZoomOutButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerZoomOutButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.DecreaseZoom" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="4" ToolTip="Decrease the size of the content (Ctrl -)" Uid="Button_17" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    <Button x:Name="ActualSizeButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerActualSizeButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="100.0" Command="NavigationCommands.Zoom" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="5" ToolTip="100% (Ctrl+1)" Uid="Button_18" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="PageWidthButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerPageWidthButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="DocumentViewer.FitToWidthCommand" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="6" ToolTip="Page Width (Ctrl+2)" Uid="Button_19" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="WholePageButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerWholePageButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="1" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="7" ToolTip="Whole Page (Ctrl+3)" Uid="Button_20" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="TwoPagesButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerTwoPagesButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="2" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="8" ToolTip="Two Pages (Ctrl+4)" Uid="Button_21" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    <Button x:Name="closeButton" Width="20" Content="X" ToolTip="Close" HorizontalAlignment="Right" VerticalAlignment="Center" Click="closeButton_Click"/>
    </ToolBar>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>

    Hi DSP1024,
    >>I tried the horizontalAlignment property but is has no effect. If I add margin="500,0,0,0" it works
    Yes, the HorizontalAlignment property has no effect for the items inside the ToolBar control, as a workaround, we can move your "closeButton" out of ToolBar content, like this:
    <Style x:Key="myContentControlStyle" TargetType="{x:Type ContentControl}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ContentControl}">
    <Grid>
    <ToolBar Focusable="{TemplateBinding Focusable}" ToolBarTray.IsLocked="True" Language="en-us" KeyboardNavigation.TabNavigation="Continue" Uid="ToolBar_2">
    <Button x:Name="PrintButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Print" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="0" ToolTip="Print (Ctrl+P)" Uid="Button_14" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="CopyButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Copy" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="1" ToolTip="Copy (Ctrl+C)" Uid="Button_15" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_110"/>
    <Button x:Name="ZoomInButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.IncreaseZoom" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="3" ToolTip="Increase the size of the content (Ctrl +)" Uid="Button_16" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="ZoomOutButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.DecreaseZoom" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="4" ToolTip="Decrease the size of the content (Ctrl -)" Uid="Button_17" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    <Button x:Name="ActualSizeButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="100.0" Command="NavigationCommands.Zoom" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="5" ToolTip="100% (Ctrl+1)" Uid="Button_18" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="PageWidthButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="DocumentViewer.FitToWidthCommand" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="6" ToolTip="Page Width (Ctrl+2)" Uid="Button_19" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="WholePageButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="1" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="7" ToolTip="Whole Page (Ctrl+3)" Uid="Button_20" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="TwoPagesButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="2" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="8" ToolTip="Two Pages (Ctrl+4)" Uid="Button_21" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    </ToolBar>
    <Button x:Name="closeButton" Width="20" Content="X" ToolTip="Close" Margin="0,0,18,0" HorizontalAlignment="Right" VerticalAlignment="Center" />
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    Screenshot:
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Snmp configuration on weblogic 10 has no effect

    SNMP in MMC(Mobile Management Center, A HP Product), use joesnmp.jar internal to send snmp trap generated by mmc app. This part works well in weblogic 10;
    snmp in weblogic , configured by weblogic console. In weblogic 8, we configure such items:
    Weblogic Subsystem
    Purpose
    Level
    Deployer
    Monitor all war/ear deploy/undeploy/redeploy
    INFO
    JDBC
    Monitor all warnings/errors in jdbc operation
    WARN
    Current tests shows that the snmp configuration on weblogic 10 has no effect.
    Due to MMC4.6 gets the Weblogic updated from 8.16 to 10.3, we didn’t find the configuration about “Enable JDBC Logging”. Below is the former config page about Weblogic 8.16.
    But in Weblogic 10.3 we cannot find this configuration. We have followed the guide http://e-docs.bea.com/wls/docs100/jdbc_admin/monitor.html#wp1048793
    And tried to set the appropriate properties on the command line like this,
    -Dweblogic.debug.DebugJDBCSQL=true -Dweblogic.log.StdoutSeverity="Info"
    Actually we can get the DM, Core, SMTP, Bulk, Adaptor Class, and connection fail error messages in weblogic backend log, but seems Weblogic cannot send SNMP trap messages to SNMP monitoring tool like Openview.
    PS. Weblogic can send out the SNMP trap messages when the server starts and stops.
    So till now the SNMP cannot monitor the DM, Core, SMTP, Bulk, Adaptor Class, and connection fail for MMC4.6.

    Hi, I am on 12.1 weblogic, and I am stuck on where you set the SNMP Servername and port number.
    We are on windows 2008, I see there is a services, SNMP .
    Is there something I need to do on the weblogic side before i get into the SNMP agenets and traps, this part I understand, I am just unsure where to add the SNMP Servername and the user I wish the emails to go to.
    I see in the security realms the user i can add to the group monitors.
    -->, I am running WL 10.3 and SNMP works fine. The cluster generates traps based on particular mbeans, such as when a server's health state is not "OK", or when there are JDBC connection issues. You have to create a new SNMP agent within the admin server then build the individual traps ( String, Gauge, Counter, etc. ) and make sure you have a Trap Destination.

  • Cursor_sharing Side-effects

    I have a situation where several off-the-shelf applications (same vendor) are running on the same instance. One of the is performing poorly and I was able to get a good performance boost with cursor_sharing=force. After much testing in QA, we are ready to move it to production.
    Now two of the other applications are having trouble. Apparently, the applications do some very basic selects from sqlplus and then parse the results. Setting cursor_sharing to force has had a side-effect (bug) that changes the column widths of these selects. The end result is that the other application fails because it can't parse it correctly.
    This is a documented problem and Oracle recommends to always explicitly set your column widths in sqlplus. This is what we want to do, but the effort is not small.
    A kludge work-around is to alter cursor_sharing before and after the batch processes. This can be done at either the system or session level.
    My question is this: Is there a simple way to set it up so an that when this black-box application create a session, it will set the cursor_sharing to force?
    Thanks,
    Scott
    http://www.erpfuture.com

    I have a situation where several off-the-shelf
    applications (same vendor) are running on the same
    instance. One of the is performing poorly and I was
    able to get a good performance boost with
    cursor_sharing=force. After much testing in QA, we
    are ready to move it to production.
    Now two of the other applications are having trouble.
    Apparently, the applications do some very basic
    c selects from sqlplus and then parse the results.
    Setting cursor_sharing to force has had a
    a side-effect (bug) that changes the column widths of
    these selects. Actually it is the off the shelf applications that have the bug, they are not using bind variables which means you are overparsing and fragmenting your shared pool. Poor performance is about the best you will get from such applications. You are also likely open to security issues that arise from [url=http://www.google.com/search?q=sql+injection
    ]sql injection.
    Cursor sharing force is a workaround for a badly written application. It auto binds all literals. This means plans will change and all literal values are variables which could contain anything which leads to the problem you describe.
    select 'test' from dual;becomes
    select :b_sys_0 from dual;where :b_sys_0 could be 4000 characters long.
    I would second kamathg's advice that if you need to use the cursor sharing workaround to only set it at the session level for the application that needs it using the logon trigger.
    You should do this as an interim measure while you file a bug report with the software vendor to have them fix their application.
    The security issues do not go away.

  • Any bad side-effects to lengthy blocking in native code? - crosspost

    [This question was also posted on the Native Methods forum a day ago, so far no response]
    1) Are there any negative side-effects to having one (or maybe a few) Java threads block for an extended period (e.g. hours) in native code? Naturally the thread would NOT be one of the "special" threads (such as the Swing event dispatcher, etc).
    2) Does the answer vary by platform? I'm interested in Win32, Linux and possibly Solaris (in that order).
    3) What if I scale the number of threads blocked in JNI code up to 100 threads. Does that change any of the answers? This is perhaps a silly number, I'm just trying to understand if more resources are consumed by blocking in the JNI as opposed to blocking in Java.
    4) Do modern JVM's use one native thread per Java thread? If so, then I would guess there is really nothing special about blocking in native code.
    Lastly, Is this stuff spelled out in some document? Or is there some newsgroup dedicated to the topic? I looked a comp.lang.java.machine, but there is nothing there but spam.
    Motivation for query -- In my application I need to interface with legacy C++ code that blocks (mostly on socket and i/o selects). I'm not thrilled about native code, but if there are no serious side-effects to extended blocking, it may be a viable approach.

    [This question was also posted on the Native Methods
    forum a day ago, so far no response]
    1) Are there any negative side-effects to having one
    (or maybe a few) Java threads block for an extended
    period (e.g. hours) in native code? Naturally the
    thread would NOT be one of the "special" threads (such
    as the Swing event dispatcher, etc).No. It is common to have a "reader" thread for a blocking socket connection. This results in a block in native code for days (months). The only impact is that you may end up creating alot of threads to handle this blocking code.
    >
    2) Does the answer vary by platform? I'm interested in Win32, Linux and possibly Solaris (in that order).I would hope not. You may find that WIn32 will run out of threads fairly quickly (at about 1000 threads) Earlier versions of Linux create a different process per thread which can have a non-trival overhead. Solaris will probibly not care. It has a thread number limit but if you reach it you are probibly doing something wroung.
    >
    3) What if I scale the number of threads blocked in
    JNI code up to 100 threads. Does that change any of
    the answers? This is perhaps a silly number, I'm just
    trying to understand if more resources are consumed by
    blocking in the JNI as opposed to blocking in Java.It takes a while to start a thread, it also consumes a minimal amount of per thread memory which can add up if you have 100s of threads. f you are writing the JNI I would suggest writing it to scale such that say more connections/files etc can be handled by a small number of threads (like NIO does) and these issues are reduced.
    >
    Motivation for query -- In my application I need to
    interface with legacy C++ code that blocks (mostly on
    socket and i/o selects). I'm not thrilled about native
    code, but if there are no serious side-effects to
    extended blocking, it may be a viable approach.See above.

  • Using Field Blend plug-in, any side effects?

    Cutting an HDV show with lots of action. Camera may have had 'sharpen' mode set too high, but end result is that the action scenes show way too much of the 'interlace lines' in playback on an LCD screen. Distractingly so.
    I used the Field Blend plug-in from Joe's Filters on the whole show, and get a very smooth looking clean result. No interlace lines on LCD screen.
    But! What I'm wondering is: will this have a negative effect when I output the HDV Quicktime master to MPEG2 and DVD?
    Is there some side-effect one has to deal with when using the Field Blend plug-in?
    All ears, thank you,
    Ben

    Are there any side effects of munging two fields
    together? Yes. You are about halving your resolution.
    The show works fine on an NTSC monitor. But the client will be showing it on a lovely new laptop, and also projecting it in a large cinema theatre.
    The thing that puzzles me Patrick, is that I play both versions on a 23 inch Apple HD Cinema monitor and I cannot for the life of me see any difference, other than the 'blended' version is not full of interlace artefacting. I KNOW it's SUPPOSED to be less resolution. But I can't SEE any difference. Maybe on a 35 foot theatre screen?
    Maybe Joe is doing something special with his plug-in?
    B.

Maybe you are looking for

  • Can no longer connect to internet w/ cell signal - advice?

    Hi, all - I can no longer access the internet using a cell signal on my Droid 3. Everything was working fine until about a week ago, but now I get no 3G signal at all and only one or two bars. When I turn on the WiFi, I have no trouble accessing the

  • Features missing from Adobe Connect 9, 16x9

    I saw a preview of Adobe Connect 9 at the Adobe Connect Federal User's Group meeting yesterday. Product looks great and well worth the trouble to upgrade. Unfortunately, two of my wish list items weren't addressed. For Adobe Connect 9, it's still a 4

  • Where can I find a "dummy" macbook pro

    I work for a company who is looking to create some accessories for Macbook Pro 15" with retina display and 13" with retina display. I am looking to obtain either a "gutless" or "dummy" laptop to be able to send to Asia for sampling, etc. Or a broken

  • AE CS5 will not open

    I have just installed CS5 Premium Production on a MacPro(1,1) 2.66mhz Quad, 9gb RAM, OS 10.6.3.  All of the applications except AE open and work.  Only AE bounces once in the dock and that is it.  I have installed Rosetta as an option from the OS 10.

  • HT201198 Who to contact in regards to "invalid product serial number"?

    I have both my Serial No. and Reg No. but when I type them in, it tells me I have the wrong serial number. It can't be wrong I've entered it multiple times and it is clearly labelled "serial number" on the box and the receipt. Who should I contact?