DBMS_STATS.SET_TABLE_PREFS does not work as expected

Hi there!
I am experiencing rather strange behaviour of the DBMS_STATS.SET__PREFS proceduree.
I want to achieve that the statistics on the table is gathered with degrre = 4 in parallel and I want to achieve that by setting table preferences and not explicitely mentioning degree in the call to gather table statistics.
This is what I've done:
-first check global preferences:
select dbms_stats.get_prefs('DEGREE', 'GLOBAL') from dual;
======================================
NULL
Then get table preferences :
select
dbms_stats.get_prefs('DEGREE', 'DARL', 'EIGNUNGSEINZELERGEBNISSE' )
from dual;
================================================
NULL
Then I try to set DEGREE to 4:
begin
dbms_stats.set_table_prefs('DARL', 'EIGNUNGSEINZELERGEBNISSE', 'DEGREE', '4');
end;
and after that I query preferences:
select
dbms_stats.get_prefs('DEGREE', 'DARL', 'EIGNUNGSEINZELERGEBNISSE' )
from dual;
====================================================
4
But when I run
begin
dbms_stats.gather_table_stats('DARL', 'EIGNUNGSEINZELERGEBNISSE' );
end;
statistics is not gathered in parallel..
I just need to mention degree explicitely- and it runs in parallel:
begin
dbms_stats.gather_table_stats('DARL', 'EIGNUNGSEINZELERGEBNISSE' , degree => '4' );
end;
Now - I simply checked the prosesses each command produced...in the latter example one could clearly see th 4 parallel processes.
To be honest, I dont't now in which catalog view could I look up if the resulting statistics gathering operation ran in parallel or not.
And the table is 5,4 G and partitioned..it takes a while to gather statistics, with all the other parameters as they are.
What is going on here.. did I forget something. Is there any other parameter that needs to be set for the preferences to function properly?
Database version is 11.2
Edited by: Reggy on Nov 26, 2012 2:25 PM
Edited by: Reggy on Nov 27, 2012 8:18 AM

I just checked and got the same result in 11.2 database.
At first I noticed the following in the description of the procedure:
...DBMS_STATS may use serial execution if the size of the object does not warrant parallel execution.
I checked on 4G table and 250G table with the same result.
The second thing I noticed was how default degree is calculated in the procedure:
  degree           NUMBER   DEFAULT to_degree_type(get_param('DEGREE')),
...Please note the use of currently deprecated DBMS_STATS.GET_PARAM procedure that is replaced by GET_PREFS. The former would not pick up preferences set on the table level. If you set global preferences using DBMS_STATS.SET_GLOBAL_PREFS it would be used as the default (I verified).
Of cause depending on your situation you might find that solution unacceptable. I this case you can still explicitly specify the degree as you did before.
Looks like a bug to me, but of cause I have no confirmation of it yet.
Hope it helps.

Similar Messages

  • Silverlight 5 binding on a property with logic in its setter does not work as expected when debug is attached

    My problem is pretty easy to reproduce.
    I created a project from scratch with a view model.
    As you can see in the setter of "Age" property I have a simple logic.
        public class MainViewModel : INotifyPropertyChanged
                public event PropertyChangedEventHandler PropertyChanged;
                private int age;
                public int Age
                    get
                        return age;
                    set
                        /*Age has to be over 18* - a simple condition in the setter*/
                        age = value;
                        if(age <= 18)
                            age = 18;
                        OnPropertyChanged("Age");
                public MainViewModel(int age)
                    this.Age = age;
                private void OnPropertyChanged(string propertyName)
                    if (this.PropertyChanged != null)
                        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    In the MainPage.xaml 
         <Grid x:Name="LayoutRoot" Background="White">
                <TextBox 
                    Text="{Binding Path=Age, Mode=TwoWay}" 
                    HorizontalAlignment="Left"
                    Width="100"
                    Height="25"/>
                <TextBlock
                    Text="{Binding Path=Age, Mode=OneWay}"
                    HorizontalAlignment="Right"
                    Width="100"
                    Height="25"/>
            </Grid>
    And MainPage.xaml.cs I simply instantiate the view model and set it as a DataContext.
        public partial class MainPage : UserControl
            private MainViewModel mvm;
            public MainPage()
                InitializeComponent();
                mvm = new MainViewModel(20);
                this.DataContext = mvm;
    I expect that this code will limit set the Age to 18 if the value entered in the TextBox is lower than 18.
    Scenario: Insert into TextBox the value "5" and press tab (for the binding the take effect, TextBox needs to lose the focus)
    Case 1: Debugger is attached =>
    TextBox value will be "5" and TextBlock value will be "18" as expected. - WRONG
    Case 2: Debugger is NOT attached => 
    TextBox value will be "18" and TextBlock value will be "18" - CORRECT
    It seems that when debugger is attached the binding does not work as expected on the object that triggered the update of the property value. This happens only if the property to which we are binding has some logic into the setter or getter.
    Has something changed in SL5 and logic in setters is not allowed anymore?
    Configuration:
    VisualStudio 2010 SP1
    SL 5 Tools 5.1.30214.0
    SL5 sdk 5.0.61118.0
    IE 10
    Thanks!                                       

    Inputting the value and changing it straight away is relatively rare.
    Very few people are now using Silverlight because it's kind of deprecated...
    This is why nobody has reported this.
    I certainly never noticed this problem and I have a number of live Silverlight systems out there.
    Some of which are huge.
    If you want a "fix":
    private void OnPropertyChanged(string propertyName)
    if (this.PropertyChanged != null)
    //PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    Storyboard sb = new Storyboard();
    sb.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
    sb.Completed += delegate
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    sb.Begin();
    The fact this works is interesting because (I think ) it means the textbox can't be updated at the point the propertychanged is raised.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • VPD context_sentisitive policy does not works as expected

    Hi,
    I'm trying to implement CONTEXT_SENSITIVE RLS policies:
    http://docs.oracle.com/database/121/ARPLS/d_rls.htm#ARPLS67721
    Server re-evaluates the policy function at statement execution time if it detects context changes since the last use of the cursor. For session pooling where multiple clients share a database session, the middle tier must reset context during client switches. Note that the server does not cache the value returned by the function for this policy type; it always executes the policy function on statement parsing. Applies to only one object.
    What I have discovered so far:
    1. policy function executed each time when query executed from SQL*Plus. Independently of context changes.
    2. policy function executed only once when query executed from PL/SQL.
    3.  When we have a PL/SQL procedure like this:
    begin
    <query>
    <change context>
    <query>
    end;
    Additionally, query (cursor) is not present in PL/SQL cursor cache, then
    policy functions executed only once when first query executed.
    So wrong results are possible when application context changed in a way that policy function returned predicate also changed.
    4. JDBC: policy function executed each time when query is executed. Policy function executed only once when I enabled statement caching:
    OracleDataSource ods =  new OracleDataSource();
    // skip
    ods.setConnectionCachingEnabled( true );
    ods.setImplicitCachingEnabled( true );
    Properties cacheProps = new Properties();
    cacheProps.put( "InitialLimit", "1" );
    cacheProps.put( "MinLimit", "1" );
    cacheProps.put( "MaxLimit", "5" );
    cacheProps.put( "MaxStatementsLimit", "50" );
    ods.setConnectionCacheProperties( cacheProps );
    5. Queries with RLS policies are not cached in the session cursor cache. For example, if we executed same query multiple times in SQL*Plus - then this query will be not cached.
    2 and 3 (PLSQL) relates to PL/SQL cursor cache.
    As a result, when we disable PL/SQL cursor cache (setting session_cached_cursors=0), then policy function executed each time in PL/SQL.
    What I have observed, it is not agreed with documentation on context_sensitive policies (I provided a link above):
    Server re-evaluates the policy function at statement execution time if it detects context changes since the last use of the cursor.
    Signature of DBMS_RLS.ADD_POLICY procedure was changed in 12c with additional arguments: NAMESPACE, ATTRIBUTE.
    I tried to use them with no luck, results are the same.
    In my opinion statements below are contradict to each other:
    1. Server re-evaluates the policy function at statement execution time if it detects context changes since the last use of the cursor.
    2. it always executes the policy function on statement parsing.
    First, documentation says that the policy function evaluates at statement execution time.
    Second, documentation says that the policy function executes on statement parsing.
    I have used Oracle Database 12.1.0.2 for testing.
    I provided a script that I have used in my tests:
    rls_policy.txt - creates test schema and policy
    rls_sqlplus.txt - runs simple select against query with RLS policy
    rls_plsql.txt - more complex example, runs some anonymous blocks with queries against table with RLS policy.
    In my opinion, context_sensitive policies does not works as described in the documentation.
    Is it a bug or I'm missing something?
    Please advice.
    Best regards,
    Mikhail.

    Thanks Scott. May i know why i should never use user policies for denying access?
    From my readings on some articles, there is no way to deny users permission in sharepoint after granting domain users with read access other than the web application user policy in our case (with certain reason, we need this group to be granted with
    read access but we would like to restrict small amount of users from seeing the page)

  • CuciLync 9.2 - registry key configuration does not work as expected

    Hi,
    according to the Administration Guide for CuciLync 9.2.2 some registry keys are supported to configure the client.
    In the chapter 'Phone Parameters' there is a statement that four registry keys are supported:
    CcmcipServer1
    CcmcipServer2
    TftpServer1
    TftpServer2
    In the next chapter 'CTI Load Balancing' there is an explanation that the registry key UseCUCMGroupForCti is also supported.
    => Does that mean that five registry keys are supported and not only four ?
    My next questions leads to the possible values for these registry keys.
    With CuciLync 8.6 it was possible to leave the registry keys for CcmcipServer empty.
    In this case the IP addresses for CcmcipServer were automatically defined by downloading the config file.
    And with UseCUCMGroupForCti these IP addresses were 'copied' to CtiServer.
    That means with CuciLync 8.6 there was need to define CcmcipServer and CtiServer.
    Only the TftpServers were configured by registry keys.
    => Is this also supported with CuciLync 9.2 ?
    => If no: In which future version do you plan to implement this ?
    => If yes: Are there any extra settings needed ? Because it does not work at the moment
    Thanks for your feedback
    Best Regards
    Carsten Lucy
    (Bayer Business Services)

    According to MSDN:
    When caching is enabled, the module caches the service information data until it polls the Service Control
    Manager and discovers that the data has changed. If changed, the module updates the cached data and returns it as output. You can disable this caching feature, but doing so will cause the module to return data at every polling interval instead of only returning
    when the data has changed or when the polling interval count has reached a multiple of 10.
    However, the configuration is DisableCaching, and the default is False. Go figure that one out. Gotta
    love Microsoft configuration names and documentation! If true, then it's not disable..... :)
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • Multiroom DVR does not work as expected.

     Short description of my problem:
    I can't use the multiroom DVR with the SD receiver I was sent nor another DVR. This leaves me only one option, an HD receiver which costs me more per month but does not give me any other added benefits.
    Long description:
    I recently ordered FIOS TV. I was drawn in by the multiroom DVR. I was a DirecTV customer for over 7 years and never had a problem with them (never lost signal in a storm either...). I got an ad that said I could get a free multiroom DVR, which is $19 a month, free for life. With my DirecTV setup, I had a DVR connected to both TVs in my house. I thought it might be nice to watch a recorded show at either one instead of having to watch it on the DVR it was recorded on.
    After a frustrating experience with tech support, I finally had my multiroom DVR and standard set top box activated. I recorded something on the DVR and went upstairs to try and watch it. To my surprise, I found out that I could not. I had recorded it in HD and the receiver that had been supplied to me was an SD receiver. At this point I found it stupid that if I wanted to be able to watch a show at both locations, I either had to record it in SD, which looks like crap on an HDTV, or record it in both HD and SD which would use up both of my recording channels for one show. I know that I can upgrade to a HD receiver and watch it on both sets, but if I am going to pay more (just to make something work that was supposed to work for "free"), I might as well pay a little bit extra and get another DVR. I really liked being able to pause and rewind live TV at both locations.
    I called sales to place an order for another DVR. Surprise again, a multiroom DVR will not stream to another DVR. So my only option is to have an HD receiver if I want to be able to use the multiroom DVR and not lose functionality. As a result, I have lost 2 channels of recording because I have one less DVR than I used to, and I can no longer pause live TV at one of my TVs. I don't think that is worth the $10 ($19 - $8 for an HD receiver) a month.
    Solved!
    Go to Solution.

    kiseraut wrote:
    Justin,
    Thank you for the reply.  I am in western PA but can't check my DVR for the version until I get home.
    Can you please elaborate what you mean by "and as an aside, if you have QIP6416 DVRs and/or the QIP2500 SD STB, you will not be happy with 1.9 on any of those boxes."  I'm not sure what kind of receivers I have off hand.
    If I can get two DVRs to work with each other I would be ecstatic!!!  Thanks again for the info.
    You obviously have internet access, you can't use the internet to view what STBs you have in your account? If you do that, it will show you the model numbers of each of your STBs.
    But anyway, the 6xxx boxes are the old original STBs that Verizon delivered for FiOS TV starting 6 years ago. They worked fine with all levels of the IMG up through 1.8 (I had one for 5 1/2 years, got rid of it earlier this year, replaced it with a 7232). With the new 1.9 level, the 6xxx and 2500 boxes perform very poorly, they just do not have the processor, graphics processor, memory (and for the 6xxx boxes, an eSATA port) to support the new HD graphics and things like an external hard drive. So your Guide will still be SD, it will be somewhat hard to read, the boxes will be slow, slow, slow, etc.
    As I said, two DVRs most certainly can work together with 1.9. That feature is called Multi-Hub, it is free, just needs to be turned on on the DVRs. Allows you to access, schedule, and delete recordings on either DVR from other STBs as well as the DVRs themselves.
    A simple way to tell if you already have 1.9 is to look at the Guide and if it has the light blue/gray background it is 1.9.
    If you still have the two DVRs but not yet 1.9, I suggest you just keep them (unless they are 6xxx boxes), the new support should be available to you soon.
    Edit: Just had a thought, I know Verizon also uses Cisco STBs in some areas. I have no idea whether they do where you are, but it is possible that that is what you have. If so, I think they have an older version of 1.9 that does not yet support some of the features that the 1.9 for Motorola boxes has. Not sure which features.....
    Justin
    FiOS TV, Internet, and phone user
    QIP7232, QIP7100-P2, IMG 1.9A
    Keller, TX 76248

  • Multiple row column-sharing with GridBadLayout does not work as expected

    I was trying to figure out why I could not initially accomplish the following with a GridBagLayout:
    Row0: 0000011111
    Row1:      1111122222
    Row2:           2222233333The above is supposed to be 3 JLabels on three different rows:
    The 1st row has a single JLabel starting in column 0 with a width of 2, extending it to column 1.
    The 2nd row has a single JLabel starting in column 1 with a width of 2, extending it to column 2.
    The 3rd row has a single JLabel starting in column 2 with a width of 2, extending it to column 3.
    The entire grid is 4 columns and 3 rows total.
    Below I have two examples where I attempted the above. Only the 2nd example produces the desired effect. The 1st code example ends up putting both the Row 0 and Row 1 JLabel in the same column. This was surprising because I thought the GridBagLayout would give each column contained by a control enough weight to actually make those columns exist.
    Here is what my first code example below produces:
    Row0: 0000011111
    Row1: 1111122222
    Row2:           2222233333The first two JLabels, 0000011111 and 1111122222, appear in the same column, and the 3rd JLabel appears in the seemingly 2nd column. This was confusing to me which is the point of this whole post.
    In order to gain the desired effect, I had to place 4 blank dummy empty JLabel components in a non-visible Row 0 of the grid. I did this for all 4 columns of that invisible row 0. The row is non-visible because the JLabel have no text or output. After adding this non-visible Row 0, all of the original mentioned Rows 0 through 2 become Rows 1 through 2 respectively.
    For example:
    Row0: iiiiiIIIIIiiiiiIIIII
    Row1: 0000011111
    Row2:      1111122222
    Row3:           2222233333The above shows an inserted Row 0 with invisible labels that are not seen, but they seem to give weight to each column, allowing each to exist. Without doing this, as mentioned, the first code example (shown below) fails. The second example (also below) works, so it appears that putting the invisible controls into the first row, one in each column, somehow gives enough weight to each column to "establish" the column more so than otherwise.
    The big question I have is why didn't the first example work?
    I mean, in that example, I'm giving each JLabel equal weight, and each one takes up a width of 2 columns, so why doesn't the JLabel in the second row end up in column 1? Instead, both the original row 0 and row 1 JLabels appear in what looks like column 0, the same column. Does anyone know why this happened?
    The invisible control solution is fine but I'm just curious why it wasn't as intuitive as it should have been. The only thing I can come up with is that the weight of the 1st and 2nd JLabel (row 0 and 1) got combined in some fashion which combined them into column 1 which end up looking like column 0 since 0 somehow looses all weight. (???)
    ****************** THE FOLLOWING DOES NOT PRODUCE THE RIGHT EFFECTS ******************
    public class TestCoincidingColumns1 extends javax.swing.JFrame {
        /** Creates new form TestCoincidingColumns1 */
        public TestCoincidingColumns1() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new java.awt.GridBagLayout());
            jLabel1.setText("LabelRow0Col0Wid2");
            jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 255, 255)));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
            getContentPane().add(jLabel1, gridBagConstraints);
            jLabel2.setText("LabelRow1Col1Wid2");
            jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 0, 0)));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 1;
            gridBagConstraints.gridy = 1;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
            getContentPane().add(jLabel2, gridBagConstraints);
            jLabel3.setText("LabelRow2Col2Wid2");
            jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 255, 0)));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 2;
            gridBagConstraints.gridy = 2;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
            getContentPane().add(jLabel3, gridBagConstraints);
            pack();
        }// </editor-fold>
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new TestCoincidingColumns1().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        // End of variables declaration
    ****************** THE FOLLOWING WORKS ******************
    public class TestCoincidingColumns1WithFix extends javax.swing.JFrame {
        /** Creates new form TestCoincidingColumns1WithFix */
        public TestCoincidingColumns1WithFix() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
            DummyRow0Col0 = new javax.swing.JLabel();
            DummyRow0Col1 = new javax.swing.JLabel();
            DummyRow0Col2 = new javax.swing.JLabel();
            DummyRow0Col3 = new javax.swing.JLabel();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new java.awt.GridBagLayout());
            jLabel1.setText("LabelRow0Col0Wid2");
            jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 255, 255)));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(jLabel1, gridBagConstraints);
            jLabel2.setText("LabelRow1Col1Wid2");
            jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 0, 0)));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 1;
            gridBagConstraints.gridy = 2;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(jLabel2, gridBagConstraints);
            jLabel3.setText("LabelRow2Col2Wid2");
            jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 255, 0)));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 2;
            gridBagConstraints.gridy = 3;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(jLabel3, gridBagConstraints);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(DummyRow0Col0, gridBagConstraints);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 1;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(DummyRow0Col1, gridBagConstraints);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 2;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(DummyRow0Col2, gridBagConstraints);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 3;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.weightx = 1.0;
            getContentPane().add(DummyRow0Col3, gridBagConstraints);
            pack();
        }// </editor-fold>                        
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new TestCoincidingColumns1WithFix().setVisible(true);
        // Variables declaration - do not modify                     
        private javax.swing.JLabel DummyRow0Col0;
        private javax.swing.JLabel DummyRow0Col1;
        private javax.swing.JLabel DummyRow0Col2;
        private javax.swing.JLabel DummyRow0Col3;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        // End of variables declaration                   
    }

    I think I figured out the general reason for the problem based on a quick trace through of the GridBadLayout code in a simple example, and I wanted to share my findings in case they may be useful to anyone else. I felt there were some concepts gleaned from the source code that don't appear reinforced with documentation or, more importantly, in tutorials or books I checked. That's why I wanted to share my findings with this simple yet perplexing example.
    This example is very much like the one in my original post except it is more simple and only uses two JLabels.
    I created a grid with the following settings:
    JLabel1,gridx=0,gridy=0,gridwidth=2,weightx=1.0
    JLabel2,gridx=1,gridy=1,gridwidth=2,weightx=1.0Using the character '1' for JLabel1, and the character '2' for JLabel2, and 'x' for an "empty" grid cell, the above gives me the following simple conceptual layout:
    11x
    x22But the 'x' cell columns don't receive any weight, so things actually appear as follows:
    11
    22Internally, GridBagLayout (GBL), is really producing the following:
    11x
    x22But since the 'x' locations take no weight, they therefore get no size, so both JLabels appear as though they are in the first and only column.
    From what I can see, it doesn't really matter what I do, I'll never be able to produce the following effect with just two JLabels:
    11x
    x22I cannot do the above with just two JLabel components and a GridBagLayout. The reason is that the GridBagLayout, while it does define a "grid" of rows and columns, the grid is not a grid that actually relates to what is displayed. It's really a grid that defines what I'll refer to as "weight collisions" or "weight pools." If two components share, say, a grid column, their weights will combine with respect to that column. But the total size of the grid doesn't play a role in enforcing that some sort of grid display is maintained. The grid can possibly do that, but it would probably be safer to view that result as a side-effect produced by using the "weight pools" created by the grid itself.
    In the above simple example, JLabel1 ends up giving gridx 1 (0 being first) its full weight of 1.0. The gridx 0 column receive zero weight from JLabel1. What happens is the code in GridBagLayout sees that there are no presently assigned weights to column 0 and it simply assigns all remaining unassigned weight of JLabel1 to JLabel1's last, right-most in this case, gridx column. This means that gridx 1 gets the full 1.0.
    By contrast, though, when processing JLabel2, the GridBagLayout sees the previously assigned 1.0 to gridx 1 (JLabel1's right-most grid column) and it ends up assigning all of JLabel2's weight to that same grid location, gridx 1. In this case, even though JLabel2 supposedly spans through to gridx 2, the actual gridx 2 column gets 0 weight from JLabel2 and therefore gets no width.
    The result is that both JLabel1 and JLabel2 give 100% of their weight to gridx column 1 (what I called above a "weight pool" rather than a grid location), and both gridx 0 and gridx 2 receive 0 weight and I'm guessing appear without any size. What's odd about this is that even though JLabel1 starts at gridx=0, it really doesn't draw itself anywhere but starting at gridx=1. Likewise, even though JLabel2 draws itself supposedly from gridx=1 through to gridx=2, it doesn't really go into gridx=2 because gridx=2 doesn't get any width.
    In fact, given the code in GridBagLayout, it doesn't matter how much weight I give to either JLabel, all 100% of the weight will end up in gridx 1, the "center" grid location. The only way to get columnar distribution is to create other components to force the GridBagLayout to see individual columns which match the "grid." When I do this, the columns allow me to create the JLabels in a fashion where they intent/stagger, where a JLabel can start at a "column" location that is in the middle of another JLabel.
    Given this, I've come to the conclusion that it's not worthwhile to look at the GBL "grid" as a grid that propagates grid-like visual locations. It's more like the grid exists during the computation of weights which end up determining the true columns and rows that will visually exist, which may well not be anything like the grid locations one might visualize when looking at the constraints used.
    I think it's unfortunate that many examples and tutorials don't reinforce this concept with simple examples that help one grasp this easily. Most examples I see actually can fool a user into thinking a grid is a true grid in that positions represent visual locations, or that a control spanning into a grid column means that weight will be (at least) partially distributed there.
    You very often won't see the problem I'm describing above when you have dialogbox-like alignment of components which most tutorials and examples utilize. For example, if I take the same example as above, but intent JLabel so that it's gridx is 2, not 1, then both JLabels will not be sharing a single grid column so their weights won't collide. In such a case, one might be misled into thinking that a GridBagLayout's grid is truly providing row/col locations when it's not really doing that. Instead, in this latter case, one is really gaining that effect because certain unintuitive weight collisions. which would produce unexpected results, are being avoided.
    I thought weightx values would give a weight equally to all gridx columns that a component spans but that doesn't seem to be the case here. In fact, it's not even a components first column in my simple example above. GBL causes JLabel1 to given all its weight to gridx=1 (and nothing to gridx=0) while GBL causes JLabel2 to give all its weight to gridx=1 (and nothing to gridx=2). In one case, JLabel1, all weight goes to its right-most spanned-to column, while with JLabel2, it goes to JLabel2's entire first gridx location.
    I guess this is what makes GridBagLayout (GBL) unintuitive. But I don't think it's so much unintuitive as it is probably not well documented. When you look at the source code, it explains stuff which should be in the docs. In fact, not one single book I saw gave any help in solving this problem. I'm guessing this is largely because folks use GBL through trial and error until they get what they want, and perhaps they don't often need to indent halfway as I'm trying to do with GBL in the above example. If a lot of components are aligned, the results are not as unexpected. I'd say, though, that even in those not-so-confusing cases, GBL can troublesome without knowing its grid is all about a grid of weight pools which may or may not produce a visual grid depending on all components' constraint settings.

  • HELP: Burning double layer DVD does not work as expected by project info

    Hi,
    I have the following problem: I created an new project in iDVD and choose the following settings in the project info: Video-Modus=PAL, Coding=HighQuality, Format=16:9 and DVD-Typ=DoubleLayer. When I saved the project and open it again the project info dialog shows me the following amounts of used space: 1867 MB DVD-ROM, 4595 MB Diashows, 128 MB Menus, 0 MB Film, alltogether 6,48 GB and 200 minutes of duration.
    NOW: When I choose to burn the DVD it first tells me that I need to use a double layer DVD because the project is too large to be burned to a normal DVD. If I press OK (having inserted the DL-DVD), I am back in the standard iDVD editing mode. If I then have a look to the settings in the project info it is as follows: 3733 MB DVD-ROM, 4595 MB Menus, 128 MB Menus, 0 MB Film, alltogether 8,31 GB and still 200 minutes of duration. This obviously does not fit to the 7,7 GB DL-DVD so I cannot make iDVD to burn my DVD...
    QUESTION: What happend ? Why doubled the DVD-ROM space ? In fact what I can see is that there are several diashows doubled and even lots of picture more than once on the DVD. Could it be that there is a trash somewhere implemented ? I cut and pasted some of the diashows to a different place on the DVD...
    Thanks for answers and support.

    In fact what I can see is that there are several diashows doubled and even lots of picture more than once on the DVD.
    Do you mean "slideshows" instead of diashows?
    Did you add anything to the dvd-rom section of the DVD? If not, you may want to check this section to see what's going on.
    Also what does map view look like? Does it show anything that may have been duplicated?
    Please tell us your current ecoding settings.
    In other words, is the encoding set to Best Quality, Best Performance, or Professional Quality?
    Lastly, is this Dvd made up of of only slidesshows / images? Or did you also add a movie/s with actual video footage? And if so, what is the total playback / run time of this Dvd in hours and minutes? (keep in mind iDvd doesn't look at size/s but rather total QT playback in minutes; not to exceed 120 mins per SL Dvd-R and twice that amount for DL media).
    Message was edited by: SDMacuser

  • Opening/closing References in TS-engine does not work as expected, so creating memory hooks. Any solutions?

    Hi!
    As my project had grown beyond the point where I could keep a global overview, I tried creating atool that dynamically creates a kind of hirarchy for my TS libraries. It runs quite well for a small test setup, but crashes due to missing memory for the whole project. Any ideas?
    A short description: I do all coding in LV7.1.
    * Firts I open an automation refnum to TS.Iengine and invoke the method 'GetSequenceFileEx' with the path to my main seqfile, Flags = 0 and conflicthandler_Error.
    * Than I use that sequencefile object to invoke the method 'Getsequence' with an index of 0 (assuming this beeing the 'MainSequence').
    * For the returned sequence object I invoke the method 'GetNumSTep', which is fed into a For-Loop. Inside that loop, the very same object reference is used to:
    - invoke 'GetStep' with the loop index
    - with the step object i get some proiperties like Name, some expression and bolean values. If the step 'can_Specify_module', I invoke 'GetDescriptionEx', before the step object is closed (cvlose reference vi)
    - I also invoke 'Parameters' on the step object. The parameter reference is used to access the property 'getLocation', which than is used as lookupString to access the property 'GetNumSubProperties', which I take as number of parameters of that step. Finally the parameters reference is closed
    * The reference to the sequence object is closed after the for loop.
    I fianlly get an array of description for all steps in the sequence file, in the order they are called from mainsequence there.
    This array is used to recursively add a similar subarray for any subsequence call in it, until all calls are resolved (using a while loop that runs until the loop counter reaches the number of steps in the step description array).
    The array is than scanned for 'typical' errors of mine like wrong parameter number at subsequence calls, missing/misspelled subsequences andf so on.
    The LabVIEW execution accumulates more than 1 GB of RAM. LabVIEW itself reports just some 100kB of used RAM. So I assume the difference is RAM used by TS as a child process in LV. What can be done?
    A vi with this code is provided (AS IS!).
    Attachments:
    SeqFileAnalyser.zip ‏192 KB

    Hello Lul,
    I tried out you tool and took a quick look at it and it ran fine. I did notice that LV memory grows during execution but only a few kb with a standard demo from TS (the increase is about the same size as the file being saved at the end). This is expected bahavior since results are being stored in memory during execution. When it is done, my mem goes back to about what it used to be before running. 1 GB of Mem seems to be very very very high! Did you expect it to be like this? How big is your txt file being created? Is the VI you posted exactly what you are using or do you have additinal loops that make the VI run continuosly and save to txt after multiple runs? I did not see any critical issues with your VI but I also did not go into your code in debth.
    As long as you close all your TS references in LV, you should not havbe any mem leaks.
    If you expect big fiole to be created, your PC will use up all RAm then use Virtual mem, the size for Virtual mem can be set in the Control Panel in Windows, usually tough, the system can set it dinamically, this might help you avoid crashe.
    Hope this helps
    Nick

  • Background refresh does not work as expected

    Hello All,
    I am brand new to iphone after using Android for several years, one thing that is really bothering me is the way certain apps seem to behave and how the background app refresh seems to have no affect when on or off.
    The examples I will use is Whatsapp & Kik (Both messaging apps)
    If someone sends me a message on either of the above then I get an alert saying 1 new message, however that message doesn't download to my phone, what seems to happen is when I open the app it says "connecting" at the top of the screen for a while and it takes a few seconds (sometimes longer) for the message to appear. If I have poor signal it is very frustrating, I know I have several messages and my phone says that, but because I cant connect it just goes round in circles for ages saying connecting and failed and i cannot read my messages until i have full signal again.
    On the android, if I got a notification to say I had a whatsapp message then that message would download automatically, even if I had no signal at the point of opening the app then it would instantly show the new message, because it had downloaded it immediately in the background, of course I couldn't reply with no signal but at least I could read it which i cant with the iphone.
    so, my understanding of Background refresh would be that it would resolve my issues, if the app updates in the background and i get a message, surely that means when I open it 20 minutes later that the new message would be present? but it's not, even with app refresh on it makes no difference to what I'm saying.
    Am I reading app refresh all wrong and can anyone see my point and explain if I'm doing something wrong.
    sorry to bang on but another example could be facebook, if i dont go on it all day but have app refresh on and have the task open, surely when I eventually load it it should have all the latest feed on my timeline - but it doesnt, it will be exactly as I left it the day before and would spend the first 30 seconds updating.
    Please please feel free to comment and let me know if I'm doing something wrong or misunderstanding the backgound app refresh function
    My phone is the iPhone 5s and is on the latest IOS 8.1.1 but was the same on 8.1.0 and whatever was previous to that.
    I am on the three network pay monthly and all issues i mentioned about relate to being on 3G and on wifi so it's not a signal issue.
    I'm soooo confused :/
    Thank you

    I Have your same question, I don't understand the advantages of keeping the app refresh on....

  • Color management does not work as expected, different from v3.6

    Color management seems to work differently than FF 3.6.
    On a home page, I have a background graphic that is supposed to blend into the page background. I have left that graphic untagged so the blending will work in all browsers regardless of color management. This works fine in IE, Safari, Chrome, and Firefox 3.6 in all color management modes.
    In default mode 2 in v3.6, the graphics is not color managed because it is untagged. The page's background is left as is, and things blend perfectly. In mode 1, full color management, the graphic is assumed to be srgb and is color managed, and the page's background color seems to follow.
    In Firefox 4, using mode 1 creates a mismatch between graphic and background, as if this time only the graphic is color managed and not the rest. This is bad because it now creates a situation where we cannot be sure that there will be a match.

    A good place to discuss issues with Minefield 4 nightly builds and Firefox 4.0 beta builds is at the mozillaZine Firefox Builds forum.
    You need to register on the mozillaZine forum site in order to post at that forum.
    See http://forums.mozillazine.org/viewforum.php?f=23

  • The G-Force visualization from Soundspectrum does not work as expected on Windows 8.1 - d3dx9_43.dll is missing - Incompatible application

    I get this message when I install the G-Force visualization from Soundspectrum on Windows 8.1. It says that d3dx9_43.dll is missing and is incompatible with Windows 8.1. it was for Windows Media Player on Windows 8.1. The visualization was only for Windows
    XP/Vista/7.
    The program can't start because d3dx9_43.dll is missing from your computer. Try reinstalling the program to fix this problem. 

    Hi,
    I made a test in our test enviroment, Windows 8.1 X64 Enterprise, no problem with it.
    According to the error message, it should be directX problem, your system lost d3dx9_43.dll. please install the DirectX Runtime to solve your issue:
    DirectX End-User Runtimes (June 2010):http://www.microsoft.com/en-us/download/details.aspx?id=8109
    Roger Lu
    TechNet Community Support
    According to the SoundSpectrum website, after completing the process, it required XP/Vista/7. It worked on my Vista computer, while my laptop did not. After installation, it canceled, and now d3dx9_43.dll is missing.

  • BAdI: CUSTOMER_ADD_DATA - CHECK_ALL_DATA does not work as expected?!

    Hi,
    to display custom fields (from a KNVV-append)  in the customer (transaction VD0x) , I've implemented the two BAdIs CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS corresponding to the note 577502.
    This works fine. We have a new button in the customer master data and a new screen with our custom fieds.
    Now, before saving the customer, I want to check if these fields are not empty. If empty, I want to display an error message.
    So I tried different things, but nothing worked.
    1.) Method CHECK_ALL_DATA in BAdI CUSTOMER_ADD_DATA
      IF S_KNVV-VKORG EQ 'ABCD'.
        IF S_KNVV-ZZFIELD1 IS INITIAL.
          E_MSGID = 'Z1'.
          E_MSGNO = '001'.
          E_SCRGR = 'Z1'.
          E_DYNNR = '0100'
          E_FCODE = 'Z1KNVV01'.
        ENDIF.
      ENDIF.
    => the error message is displayed, but the following displayed screen is not the custom screen with our fields!
    AND also the button to switch to the the custom tab is not more visible!?
    2.) EXIT_SAPMF02D_001
    => same behaviour as above  (Button is not more available!)
    3.) Of course, I can set the fields in the PBO to obligatory in our custom screen. But this will only check, if the user go to this screen. If the user doesn't go  to the screen, it will not be checked and the customer is saved with the empty fields... so this will not help me.
    Could someone help me!?
    Thanks!
    Andreas

    Hello shishupalreddy,
    thank you very much for your help!
    This helped me a lot! But with your coding, no fields were visible on the screen...
    so I changed the fcode (to our fcode, defined as function code for our custom screen in SPRO -> "Prepare Modificatin-Free Enhancement of Customer Master Record") and than it worked!
    Here is my code:
          e_msgid = 'Z1'.
          e_msgno = '003'.
          e_scrgr = 'Z1'.
          e_dynnr = '4000'." -----This is important .
          e_fcode = 'Z1KNVV01'.
    It's really very important to use screen '4000'!
    Thanks!
    Andreas

  • AE Cineware 2.0 layers does not work as expected?

    Hello,
    Started working with Cineware 2.0 layers inside After Effects. But they are not really helpful or there is a bug.
    When I have two different Cineware effects on two AE layers, with a different C4D layer selected for each.
    I can only have one layer selected per comp. If I change the C4D layer from one of them, the other one is switched too.
    Annoying. See GIF:

    You have Synchronize Layer enabled. You can disable that.

  • CS6 Image Trace Ignore White feature does not work as expected coming from Live Trace in 5 and 5.5

    When I click ignore white in 5 or 5.5 using say a basic black and white image I'm tracing, I get zero white. Usually for our purposes, we will direct select the frame and remove it then drag select all the artwork and color it whatever pantone the customer needs, save, place in the InDesign document relevant tot he image, and send to print. In CS6, ignore white leaves, ironically, a ton of white so deleting the frame and then drag selecting gives you a question mark in color and of course it follows that coloring, colors all kinds of things. Same picture, two different versons of trace and our job just got alot more time consuming.

    This is exactly the criticism that I have posted on occasion.
    Instead of producing an orderly stack of objects like Streamline did, Live Trace produces compound paths.
    So if you want to simplify your trace and avoid duplicate paths you need to release the compound(s) and rearrange the stack. This takes time and a certain amount of skill.
    With Steamline you could of course make your own compounds if you needed them, but making a compound is a simpler business than releasing one and editing the colours of the resulting stack.
    Does anyone know whether Streamline is available for OS X?

  • File-renaming functionality for book does not work as expected

    Adobe Framemaker 8.0
    I am on Windows XP. Dell computer. Xerox printer.
    I follow the basic instructions for renaming a file in a FM book (To change the name of a document in a book:
    1. In the book window, select the file you want to rename, and then choose Edit > Rename File.
    2. Type the new name of the file and press Return or Enter. When the alert message appears, click OK to update other files in the book.) but I do not get past step 1. Instead an error message comes up that says "The text cannot be changed. To change the name of this file, please display filenames."
    What is meant here by "filenames" and how/where would one display such?

    Thank you indeed! I was with your help able to rename the file. However, the Book Error Log barked at me that it couldn't open BadFileName (a reference not to the file I renamed but another file which I not so elegantly dubbed "Conten ts" (with an unintended space between "n" and "t"--maybe this spacing is the reason behind its being dubbed bad?) since it could not be found. Should I disregard the error message or play along and rename "Conten ts" to "Contents". If that's all I need to do to get rid of the error message then of course, I'll do it. Thank you for answering my last question--whether or not you answer this one. Cheers, Siobhan

Maybe you are looking for