Writing safely to a layer

Hello everyone,
I m writing an effect with a layer parameter LP.
I copy to a source layer SL the LP with scale, rotation ... using the transform_world function from PF_WorldTransformSuite
My problem is that when two copy overlap i got artifacts in my result
I guess it is related to multithreaded issues, with try to write the  same pixel at the same time.
does anyone has any suggestions?

Thank you for the answer. i will explain in details:
Here is what I'm doing:
Render function:
- create a temporary layer (same size as input layer)
- call iterate function to iterate over all pixels
Here is code snippet:
ERR(in_data->utils->new_world(in_data->effect_ref, input->width,
             input->height, PF_NewWorldFlag_NONE, &tmpLayer));
err = suites.Iterate8Suite()->iterate(in_data,
                                            progress_base,
                                            progress_final,
                                             src,   
                                            area,                   
                                            refcon,                   
                                            pix_fn,
                                             dst);
Here is what the per-pixel function (i.e. pix_fn) does:
1) read from input buffer at (x,y)
2) Clear the temp buffer region (x-width, y-height) to (x+width, y+height) in tmpLayer
3) Render the transformed kira to tmpLayer
4) For every pixel (i,j) in region (x-width, y-height) to (x+width, y+height) in tmpLayer
a) read from tmpLayer location (i,j)
b) do some math using read value
c) write a result value to output buffer location (i,j)
Steps 2 and 3 implemented with the following code:
    dstRect.bottom = (A_short)data->height-1;
    dstRect.top    = 0;
    dstRect.left   = 0;
    dstRect.right  = (A_short)data->width-1;
    ERR(suites.FillMatteSuite1()->fill(
         data->effect_ref,
        NULL,
        &dstRect,
        temp ));
    ERR(suites.WorldTransformSuite1()->transform_world(
        data->effect_ref,
        data->quality,
        PF_MF_Alpha_STRAIGHT,
         PF_Field_FRAME,
        &context->shapeLayerParam.u.ld,
        &compositeMode,
        NULL,
        &mat, 1,
        TRUE,
        &dstRect,
        temp ));
The result is corrupt rendering.
I suspect this is because the iterate function can process two pixels at once.
Between step 2 and step 4c there maybe FillMatteSuite1 that is called by another thread and may result in a corrupted result
I thought about three solutions:
1-allocate the temporary layer in the iterate function.
2-dont use the iterate function and process sequentially pixels
3-find a way to lock the temporary layer to avoid corruption
By using solution 2 and not using the iterate() function and instead processing all the pixels sequentially on my own, the corruption problem was resolved.
I will try the solution 1, hoping AE is doing good caching and memory management to avoid performance hit.
I dont know if there is a way to do the solution 3.
i would be happy to hear If you have any ideas that could help

Similar Messages

  • Two hour sequence to dual-layer DVD?

    Hi,
    I'm confused.
    I have a two hour 16:9 sequence (actually 1 hour, 56 minute) that I want to put on a dual-layer DVD. I guess I didn't fully think it through when I sent it from FCP to Compressor and selected DVD 16:9 120 minute fastest encode, because it compressed it to 4.04 gigs rather than twice that size at a better quality. Now I'm looking for a setting that tells it my destination is a dual-layer DVD and I don't see it.
    Additionally, the m2v file that came from that process cut off the final minute or so of my sequence. Why in the world would that happen?
    Kenny

    These instructions assume you're using DSP for authoring. I don't know if iDVD has DL capability.
    The 'calculator' in Compressor assumes a single layer DVD. The key is to look at the summary, which is the far left tab in the Inspector. About 1/3 from the top, it will show the estimated file size. Adjust the bit rate selector until you get the file size approaching the capacity of the Dual Layer disk. You have other restrictions to consider as well. Totally data rate of video(s)audio(s)other data cannot exceed the maximum for the DVD spec (nominally 10mb/s).
    Once inside DSP, when you burn the disk, you'll be asked to select a marker to indicate where the burner will change from writing to the first layer to the second layer. This should occur at a convenient location in the video (a fade to black, eg.) near the end of the first layer capacity. If you don't already have a marker near that point, be sure to add one for the switch-over.
    Good luck
    allen

  • Dual Layer Break Point problem

    Hi,
    I just found out after I updated DSP 4 to version 4.0.3 my Layer 1 on every project since updating gets corrupted!
    I thought it was the Dual Layer discs I used that caused the problem, but after I re-installed DVD Studio to the original version 4.0.0 the same project worked perfect.
    Anyone else have issues with Dual Layer Break Point after updating to 4.0.3?
    I have tried different chapters as layerbreak points on my project, and even a test project, with the same result. The finished discs is barely playable on some DVD players, showing wierd interference and noise, and DVD Player on mac crashes when reaching the dual layer break point, and the plant i send the master have a software to check DVDs and they said that it couldnt find/was corrupt Layer 1 on one of my discs. Hope someone can fix this, DSP is the best software otherwise!
    Best regards,
    Mats.

    DVD+R or DVD-R?
    http://documentation.apple.com/en/dvdstudiopro/usermanual/index.html#chapter=1%2 6section=9%26tasks=true
    DVD+R Double-Layer 
    You can use DVD+R double-layer media, often referred to as DVD+R DL, for burning your dual-layer projects. With DVD+R double-layer media, DVD Studio Pro places the layer break point and sets the switch point to be nonseamless as specified in your project.
    DVD+R double-layer discs require you to use the Opposite Track Path (OTP) direction setting when burning the disc. This means that the first layer must be larger than the second layer. See Setting the Dual-Layer Direction for more information.
    While DVD+R double-layer discs allow you to burn your dual-layer projects, they tend to have more compatibility issues than the other types of DVD media.
    DVD-R Dual-Layer 
    If your system contains a DVD drive that can write to the new DVD-R dual-layer media, you can burn your DVD project to it with DVD Studio Pro. However, there are several issues:
    Because currently DVD Studio Pro has no way to identify DVD-R dual-layer media as having two layers, burning a dual-layer project to it results in the appearance of an alert message telling you that the DVD media may have insufficient room to hold the project. This message is based on the assumption that the disc is single layer. Both layers of the disc will be written to as needed, however, when you click Continue.
    If you are burning a dual-layer project, the break point you set will not affect where the layer break actually occurs. Instead, the first layer is written to until filled, at which point the drive switches to writing to the second layer.
    The switch between layers is a seamless layer change not supported by some DVD players, which may stop playing the disc when the switch point is reached.
    Important: Do not use DVD-R dual-layer media unless these issues do not impact your project.

  • Why is my Flex extension for Photoshop out of focus while writing text?

    Hi All,
    I have a query. Why is my Flex extension for Photoshop out of focus while I am writing text to a layer? I noticed that if I am writing some text in a text layer, and while writing I try to do some action in my extension, like clicking a button, I am unable to do so.. Why is that? The extension doesn't receive any click events.. I have to select the layer and then perform any such action.. Please answer if there is a way of solving this issue..
    Thanks!

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    In Firefox 4 [http://kb.mozillazine.org/Safe_mode Safe mode] disables extensions and disables hardware acceleration.<br />
    If disabling hardware acceleration works then check if there is an update available for your graphics display driver.
    * Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)

  • Can't burn Dual Layer DVD-R on new Mac Pro?

    Can't burn Dual Layer DVD-R on new Mac Pro?
    I have a new Mac Pro with Pioneer DVD burner built in. I've since found out that it only burns Dual Layer +R type, and not the -R type.
    My replication company need a Dual Layer -R type DVD as they can't get a glass-master off the +R type Dual Layer discs.
    Can anyone recommend/suggest a cheap way of being able to either master off a DVD to Dual Layer -R disc, or perhaps copy my Dual Layer +R to a Dual Layer -R ?
    Thanks guys.

    Everything I have ever read about the DVD-R DL discs says the layer break can't be chosen by the author. It is not a DVDSP issue; it is an issue with the media.
    This is actually listed in the DVDSP 4.1 Late Breaking News on page 15:
    "Using DVD-R Dual-Layer Media
    If your system contains a DVD drive that can write to the new DVD-R dual-layer media, you can burn your DVD project to it with DVD Studio Pro. However, there are several issues:
    Since there is no current way for DVD Studio Pro to identify DVD-R dual-layer media as having two layers, burning a dual-layer project to it results in a warning appearing telling you that the DVD media may have insufficient room to hold the project. This message is based on the assumption that the disc is single layer. Both layers of the disc will be written to as needed, however, when you click Continue.
    If you are burning a dual-layer project, the break point you set will not affect where the layer break actually occurs. Instead, the first layer is written to until filled, at which point the drive switches to writing to the second layer.
    The switch between layers is a seamless layer change not supported by some DVD players, which may stop playing the disc when the switch point is reached.
    Important: Do not use DVD-R dual-layer media unless these issues do not impact your project.
    You can use DVD+R double-layer media for burning your dual-layer projects. With DVD+R double-layer media, DVD Studio Pro places the layer break point and sets the switch point to be nonseamless as specified in your project."
    Can you tell us what drive you have and what firmware (revision) it is?

  • Dual Layer DVD-R are freezing

    I got Lacie dual layer recorder (*** according consumer report)
    I made 5 copies 2 hours DVD from Mpeg2, which exported from FCP5. Each copy either freezes or skips in a half way. My media is 4X RiData. I wonder if the DVD was burned to fast. I have to use 1X. If DVD players are playing fine the commercial DVD, which are dual layers, why they would not play well my burned copies? Is there a setting to tell the DVD burner to use a slow, 1X speed?
    I have a friend...the same problem!
    Thanks.

    if you are using DVD-R Dual Layer (as opposed to DVD+R Double Layer):
    [quote]
    Using DVD-R Dual-Layer Media
    If your system contains a DVD drive that can write to the new DVD-R dual-layer media, you can burn your DVD project to it with DVD Studio Pro. However, there are several issues:
    Since there is no current way for DVD Studio Pro to identify DVD-R dual-layer media as having two layers, burning a dual-layer project to it results in a warning appearing telling you that the DVD media may have insufficient room to hold the project. This message is based on the assumption that the disc is single layer. Both layers of the disc will be written to as needed, however, when you click Continue.
    If you are burning a dual-layer project, the break point you set will not affect where the layer break actually occurs. Instead, the first layer is written to until filled, at which point the drive switches to writing to the second layer.
    The switch between layers is a seamless layer change not supported by some DVD players, which may stop playing the disc when the switch point is reached.
    [/quote]
    altho if its DVD+R Double Layer, then its a different problem (and the same as what i'm having)
    Enf...

  • DLTs and layer break questions

    Hi guys. I have 2 questions on layer break points and DLT tapes. About a month ago, I completed a DL DVD project that was sent out to a replicator on DLT tapes for replication. I had burned DVD copies (from the software not from the DLTs) for testing and had no problem with those. Then I burned the DLTs and had no problem burning those. The tapes went off to the replicator and a few days later I got an e-mail telling me that the replicator received this error - "seamless playback flag not set correctly at layer break". They said they could fix the problem for $175 a layer or $350. So to expidite the problem, the client went ahead and had them fix the problem.
    Now here are my 2 questions...
    1. It took me some time to find a usuable break point because the disk is so full, there is only a limited area where a valid break point could go. But after I found it, I had no problems with the disks I burned or burning the DLTs. Why would this error then pop up in the replication step if it wasn't an issue before?
    2. Now I have a new e-mail from the client saying that when he watches the one-off from the replicator, on certain DVD players there is a jitter during one of the videos that wasn't there on the original test disks I sent him. My theory is that the replicator moved the layer break point to fix the previous problem and that now he is seeing the jitter at the new layer break. (I originally had the break point set in an area of black so any pause wouldn't be noticable). Does this sound like a good theory? And getting back to the question 1 again, why would the replicator have a problem with my DLTs if the test disks I burned worked fine?
    Thanks for any advice you can give me.
    Power Mac G5   Mac OS X (10.4.8)   Dual 2.0, 2.5G RAM, Radeon X800XT

    Cmerillo,
    The only thing the replicator could do to your Image is properly flag the existing layer break cell as non seamless, if that indeed was what triggered the Eclipse rule. We'd have to see, as other phenomina can cause that error.
    If the replicator created another cell in your VOB for the layer break, that's a no no, and they should know better.
    Only the authoring system can safely place the layer break cell, due to the fact that if you place a layer break cell after the fact, without the authoring system's knowledge, you'll have video/audio and/or subtitle packs for the previous cell duration (now split), sitting on the second layer 1, the authoring system 'thought' was on the first layer (due to it's proper multiplexing routines). This will cause decoding glitches across the layer break on many players.
    So, you might find out what the heck they did; which they should have consulted you on before doing anything. But it sounds like they added a cell for the layer break to your existing VOB.
    The only way to get an approximation of what's on the DLT, is to restore the DLT's Image to hard drive and burn a disc from that. Each multiplex and formatting is potentially different (Long story on this fact, but lots of surprises can await if no testing is done on that DDP Image).
    Sorry you're having issues. Let me know if you need some help with this one. Or, for sure, please keep us posted as this unfortunate situation progresses.
    Take care,
    Trai
    Trai Forrester
    TFDVD Research Labs
    DVD/DLT Verification

  • DVD Studio Pro Dual Layer Break Point Problem

    I have a problem with a disc that I am burning. It is a dual layer (the break point is not set to seamless) with 1 movie that is about 3.6 GB and 1hr 23 min long, a 30 min slideshow, another 30 min extra and five other extras that total to about 20 min. I put the dual layer break point at the beginning of the slideshow, everything played fine on the computer, but on the Panasonic DVD player it just freezes at 35 seconds into the slideshow. Its never had a problem with DLs before. Itried the DVD on my softmodded Wii, on a program for it called WiiMC (it uses Mplayer) and everything played fine. I tried another burn where i set the break point to fifteen minutes before the end on the main 1:23 movie and on the DVD player it still froze at 35 seconds on the slideshow. Is there anything that you guys can suggest to help?

    DVD+R or DVD-R?
    http://documentation.apple.com/en/dvdstudiopro/usermanual/index.html#chapter=1%2 6section=9%26tasks=true
    DVD+R Double-Layer 
    You can use DVD+R double-layer media, often referred to as DVD+R DL, for burning your dual-layer projects. With DVD+R double-layer media, DVD Studio Pro places the layer break point and sets the switch point to be nonseamless as specified in your project.
    DVD+R double-layer discs require you to use the Opposite Track Path (OTP) direction setting when burning the disc. This means that the first layer must be larger than the second layer. See Setting the Dual-Layer Direction for more information.
    While DVD+R double-layer discs allow you to burn your dual-layer projects, they tend to have more compatibility issues than the other types of DVD media.
    DVD-R Dual-Layer 
    If your system contains a DVD drive that can write to the new DVD-R dual-layer media, you can burn your DVD project to it with DVD Studio Pro. However, there are several issues:
    Because currently DVD Studio Pro has no way to identify DVD-R dual-layer media as having two layers, burning a dual-layer project to it results in the appearance of an alert message telling you that the DVD media may have insufficient room to hold the project. This message is based on the assumption that the disc is single layer. Both layers of the disc will be written to as needed, however, when you click Continue.
    If you are burning a dual-layer project, the break point you set will not affect where the layer break actually occurs. Instead, the first layer is written to until filled, at which point the drive switches to writing to the second layer.
    The switch between layers is a seamless layer change not supported by some DVD players, which may stop playing the disc when the switch point is reached.
    Important: Do not use DVD-R dual-layer media unless these issues do not impact your project.

  • Data level Security issue in obiee 11g

    Hi,
    We are trying to implement data level security, let me explain the issue
    The requirement is, we have 7 schools and each school has one principle , there will be a Superdintent who has 3 schools under him. so now when each principle logs in to dashboard we have a prompt for school i.e Name of school in that prompt he should see only his school and even the data of that school only which are assigned to him, now when Superdintent logs in he should see all 3 schools in the prompt and data. I have gone through this link (http://www.rittmanmead.com/2012/03/obiee-11g-security-week-row-level-security/) but could not achieve.
    We are able to achieve by writing SQL in BMM layer ( LTS Table) so where ever the table is used in dashboards the security is being applied and we are able to see what we want. We want to achieve this by application role, But when we are creating session variables and applying on Application Role its not working. We want to achieve this by using Application role because suppose in other dashboards when the table is not used or pulled in, it will not work.But if we do it using application role its applies to all dashboards and data is resticted. so that when principle or Superdintent logs in automatically its restricts the data.
    Below is the SQL which we used in BMM LTS, its working fine. But when the same SQL is applied in Application Role it's not working.
    SQL used in session variable -
    select  'SCHOOL_CD1', school_cd1 from w_staff_d where empl_id ='VALUEOF(NQ_SESSION.USER)'
    and job_desc1 = 'Principal High School - KPI'
    Any suggestions please ??
    Thanks,
    VRP

    Hi,
    I pasted the log view below by applying SET VARIABLE LOGLEVEL=2, DISABLE_CACHE_HIT=1;, ran this report by applying SQL in Session variable. Let me know if you want anything -
    Thanks
    [OracleBIServerComponent] [TRACE:2] [USER-0] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] ############################################## [[
    -------------------- SQL Request:
    SET VARIABLE QUERY_SRC_CD='Report',SAW_SRC_PATH='/shared/Key Performance Analytics/Analysis/Climate and Culture/Analysis for total school suspensions',LOGLEVEL=2, DISABLE_CACHE_HIT=1; SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11 FROM (
    SELECT
    0 s_0,
    "High School KPI"."- Date"."School Year" s_1,
    "High School KPI"."- Grade"."Grade Level" s_2,
    "High School KPI"."- School"."School Name" s_3,
    "High School KPI"."- School Suspensions"."% of Students Suspended" s_4,
    "High School KPI"."- School Suspensions"."Count of Students Enrolled" s_5,
    "High School KPI"."- School Suspensions"."Count of Students with Incidents" s_6,
    CASE WHEN (CASE WHEN MAX("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END +(CASE WHEN (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END)=0 THEN CASE WHEN CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END <0 THEN (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END *-1) ELSE CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END END ELSE (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END) END /10))<0 THEN 1 ELSE 2 END s_7,
    CASE WHEN (CASE WHEN MAX("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END)=0 THEN CASE WHEN CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END <0 THEN (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END *-1) ELSE CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END END ELSE (CASE WHEN MAX("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END - CASE WHEN MIN("- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY )END) END s_8,
    CASE WHEN MAX("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 10 ELSE MAX("- School Suspensions"."% of Students Suspended" BY ) END s_9,
    CASE WHEN MIN("High School KPI"."- School Suspensions"."% of Students Suspended" BY ) IS NULL THEN 0 ELSE MIN("- School Suspensions"."% of Students Suspended" BY ) END s_10,
    REPORT_AGGREGATE("High School KPI"."- School Suspensions"."% of Students Suspended" BY "High School KPI"."- Date"."School Year") s_11
    FROM "High School KPI"
    WHERE
    (("- Discipline Action"."Discipline Action Code" = 'Suspension') AND ("- Date"."School Year Desc" = VALUEOF("school_year_desc")))
    ) djm ORDER BY 1, 2 ASC NULLS LAST
    [2012-10-17T18:36:55.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-23] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] -------------------- General Query Info: [[
    Repository: Star, Subject Area: High School KPI, Presentation: High School KPI
    [2012-10-17T18:36:55.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-18] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] -------------------- Sending query to database named SPA (id: <<62064>>), connection pool named Initialization Block Connection Pool: [[
    WITH
    SAWITH0 AS (select T30351.SCHOOL_YEAR_DESC as c2,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T29835.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30351.SCHOOL_YEAR_DESC, T29835.STDNT_WID ORDER BY T30351.SCHOOL_YEAR_DESC DESC, T29835.STDNT_WID DESC) as c7
    from
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_SCHOOL_YEAR_D T30351 /* KPI_W_SCHOOL_YEAR_D */ ,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_ENROLL_SCHOOL_F T29835 /* KPI_W_STDNT_ENROLL_SCHOOL_F */
    where ( T26564.GRADE_LEVEL_WID = T29835.GRADE_LEVEL_WID and T26686.ORGANIZATION_WID = T29835.ORGANIZATION_WID and T29835.SCHOOL_YEAR_WID = T30351.SCHOOL_YEAR_WID and T30351.SCHOOL_YEAR_DESC = '2011-2012' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH1 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    D1.c2 as c2,
    count(distinct D1.c6) as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH0 D1
    group by D1.c2, D1.c4, D1.c5),
    SAWITH2 AS (select sum(D1.c1) over (partition by D1.c2) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH1 D1),
    SAWITH3 AS (select T30647.SCHOOL_YEAR as c3,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T26023.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30647.SCHOOL_YEAR, T26023.STDNT_WID ORDER BY T30647.SCHOOL_YEAR DESC, T26023.STDNT_WID DESC) as c7
    from
    W_DISCIPLINE_ACTION_D T29975 /* KPI_W_DISCIPLINE_ACTION_D */ ,
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_KPI_QTR_DAY_D T30647,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_DISCIPLINE_F T26023 /* KPI_W_STDNT_DISCIPLINE_F */
    where ( T26023.DISCIPLINE_ACTION_WID = T29975.DISCIPLINE_ACTION_WID and T26023.ORGANIZATION_WID = T26686.ORGANIZATION_WID and T26023.DATE_WID = T30647.DATE_WID and T26023.GRADE_LEVEL_WID = T26564.GRADE_LEVEL_WID and T29975.DISCIPLINE_ACTION_CD = 'Suspension' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH4 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    count(distinct D1.c6) as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH3 D1
    group by D1.c3, D1.c4, D1.c5),
    SAWITH5 AS (select sum(D1.c1) over (partition by D1.c3) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH4 D1)
    select distinct case when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 end as c1,
    case when D1.c4 is not null then D1.c4 when D2.c4 is not null then D2.c4 end as c2,
    case when D1.c5 is not null then D1.c5 when D2.c5 is not null then D2.c5 end as c3,
    case when D1.c3 = 0 then NULL else D2.c2 * 100.0 / nullif( D1.c3, 0) end as c4,
    D1.c3 as c5,
    D2.c2 as c6
    from
    SAWITH2 D1,
    SAWITH5 D2
    where ( nvl(D1.c2 , '1') = nvl(D2.c3 , '1') and nvl(D1.c2 , '2') = nvl(D2.c3 , '2') and nvl(D1.c4 , '1') = nvl(D2.c4 , '1') and nvl(D1.c4 , '2') = nvl(D2.c4 , '2') and nvl(D1.c5 , '1') = nvl(D2.c5 , '1') and nvl(D1.c5 , '2') = nvl(D2.c5 , '2') )
    order by c1, c2, c3
    [2012-10-17T18:36:55.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-18] [] [ecid: c9928ce086f2ff4f:4405c138:13a559973e0:-8000-000000000000f7e9] [tid: 128c] [requestid: 5e40000b] [sessionid: 5e400000] [username: weblogic] -------------------- Sending query to database named SPA (id: <<62434>>), connection pool named Initialization Block Connection Pool: [[
    WITH
    SAWITH0 AS (select T30351.SCHOOL_YEAR_DESC as c2,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T29835.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30351.SCHOOL_YEAR_DESC, T29835.STDNT_WID ORDER BY T30351.SCHOOL_YEAR_DESC DESC, T29835.STDNT_WID DESC) as c7
    from
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_SCHOOL_YEAR_D T30351 /* KPI_W_SCHOOL_YEAR_D */ ,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_ENROLL_SCHOOL_F T29835 /* KPI_W_STDNT_ENROLL_SCHOOL_F */
    where ( T26564.GRADE_LEVEL_WID = T29835.GRADE_LEVEL_WID and T26686.ORGANIZATION_WID = T29835.ORGANIZATION_WID and T29835.SCHOOL_YEAR_WID = T30351.SCHOOL_YEAR_WID and T30351.SCHOOL_YEAR_DESC = '2011-2012' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH1 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    D1.c2 as c2,
    count(distinct D1.c6) as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH0 D1
    group by D1.c2, D1.c4, D1.c5),
    SAWITH2 AS (select sum(D1.c1) over (partition by D1.c2) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH1 D1),
    SAWITH3 AS (select T30647.SCHOOL_YEAR as c3,
    T26564.GRADE_LONG_DESC as c4,
    T26686.SCHOOL_NM as c5,
    T26023.STDNT_WID as c6,
    ROW_NUMBER() OVER (PARTITION BY T30647.SCHOOL_YEAR, T26023.STDNT_WID ORDER BY T30647.SCHOOL_YEAR DESC, T26023.STDNT_WID DESC) as c7
    from
    W_DISCIPLINE_ACTION_D T29975 /* KPI_W_DISCIPLINE_ACTION_D */ ,
    W_GRADE_LEVEL_D T26564 /* KPI_W_GRADE_LEVEL_D */ ,
    W_KPI_QTR_DAY_D T30647,
    W_ORGANIZATION_D T26686 /* KPI_W_ORGANIZATION_D */ ,
    W_STDNT_DISCIPLINE_F T26023 /* KPI_W_STDNT_DISCIPLINE_F */
    where ( T26023.DISCIPLINE_ACTION_WID = T29975.DISCIPLINE_ACTION_WID and T26023.ORGANIZATION_WID = T26686.ORGANIZATION_WID and T26023.DATE_WID = T30647.DATE_WID and T26023.GRADE_LEVEL_WID = T26564.GRADE_LEVEL_WID and T29975.DISCIPLINE_ACTION_CD = 'Suspension' and (T26564.GRADE_LONG_DESC in ('Grade 10', 'Grade 11', 'Grade 12', 'Grade 9')) and (T26686.SCHOOL_NM in ('Central Sr', 'Como Park Sr', 'Harding Sr', 'Highland Park Sr', 'Humboldt Secondary School', 'Johnson Sr', 'Washington Technology Secondary')) ) ),
    SAWITH4 AS (select count(distinct case D1.c7 when 1 then D1.c6 else NULL end ) as c1,
    count(distinct D1.c6) as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH3 D1
    group by D1.c3, D1.c4, D1.c5),
    SAWITH5 AS (select sum(D1.c1) over (partition by D1.c3) as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    SAWITH4 D1),
    SAWITH6 AS (select case when max(D1.c1) = 0 then NULL else max(D2.c1) * 100.0 / nullif( max(D1.c1), 0) end as c11,
    case when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 end as c12
    from
    SAWITH2 D1,
    SAWITH5 D2
    where ( nvl(D1.c2 , '1') = nvl(D2.c3 , '1') and nvl(D1.c2 , '2') = nvl(D2.c3 , '2') and nvl(D1.c4 , '1') = nvl(D2.c4 , '1') and nvl(D1.c4 , '2') = nvl(D2.c4 , '2') and nvl(D1.c5 , '1') = nvl(D2.c5 , '1') and nvl(D1.c5 , '2') = nvl(D2.c5 , '2') )
    group by case when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 end )
    select D2.c11 as c1,
    D2.c12 as c2
    from
    SAWITH6 D2
    order by c2
    Edited by: 965968 on Oct 17, 2012 11:49 AM

  • Need help in Object-Relational Mapping

    I'm writing a simple two-tiered business application with Swing application on the client side and a DBMS on the server side. To make my client code more maintainable, I decided to create Business Objects instead of having my client accessing the database directly via SQL. For simplicity, I'm not using any features from the J2EE framework, and the Business Objects will be hosted on the client side, with one-to-one mapping to tables in the database. Since this is my first attempt in Object-Relational Mapping, I'm faced with the following problems:
    1. What kind of methods are appropriate for business objects? For example, if I have a Machine and Employee entity. A Machine is owned by an employee, and this is represented in the DB by storing the employee ID (not the name) as a foreign key in the Machine table. Let's say in the user interface I have a table that needs to display the list of Machines, but instead of displaying the owner employee's ID, I want to display the owner employee's name by doing a join select. Should the findMachines() method always perform a join select to get owner's name and store it in the Machine object which is returned, or should findMachines() simply return the owner's ID so the UI will need to make another SQL call (through the Employee object) to get the employee's name? The latter is more elegant, but would it be horribly inefficient if there are lots of machines to be displayed (and for each machine we make a separate select call to get the owner's name).

    Business objects should be separate from how they're persisted.
    When you say object-relational mapping, do you mean a tool like Hibernate? Or are you writing your own persistence layer using JDBC and SQL?
    I'd recommend that you read about the Data Access Object pattern and keep the persistence code out of the business objects themselves:
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
    url=http://www-106.ibm.com/developerworks/java/library/j-dao/

  • Pointer to an unanswered j2ee question

    This is just a pointer to a question posted on j2ee that remains unanswered; hopefully someone here can help - I'm attempting to get into j2ee stuff, obviously.
    Regards,
    Here's the post: http://forum.java.sun.com/thread.jspa?threadID=5305753&tstart=0
    ~Bill
    Edited by: abillconsl on Jun 17, 2008 1:22 PM

    Two books:
    (1) "Database Modeling and Design" by Toby Teorey,
    (2) "Patterns of Enterprise Application Architecture" by Martin Fowler.
    You'll want to know about SQL and normalization. The Teorey book is good for both. Fowler's book will help with writing that data access layer in Java. - MOD

  • Select statements where we have to write in crm 7.0

    hi
    i am new to sap crm 7.0
    1)where we are useing select statments in sap crm 7.0
    where we have to write the code as a crm technical consultant
    at which level genil or bol .if we write can u plz let me knw with clear answer.

    Subhani,
    Writing queries in CRM is always tricky. The question you have asked is very general, still i will try my hands on it for the larger benefit of the community.
    One should avoid writing queries on UI layer - As a general practice writing queries on UI is not appreciated because it hampers performance to a large extent.
    Use of standard FM instead of queries - There are several standard FM provided by SAP which serves most of the purpose for which queries may have to be written, they are written in a way so as to optimize the DB connect.
    BOL/GenIL - Incase the interaction with the DB table is very frequent, Query must be written in BOL/GenIL layer, this is done in order to have a steady framework and avoid frequent DB connect.
    If you have any specific query, feel free to post it but be more elaborative so that community members can help.
    Regards,
    Harshit Kumar

  • Whar are logical table, Physical table Logical data Source

    Hi,
    Can any one explain me in details what Whar are logical table, Physical table Logical data Source.
    Any qucik help will be graetly appreciated

    In OBI there are three layers - Physical, Business Model and Mapping (BMM) and Presentation.
    As the name specifies the Physical layer mainly contain physical aspect of the application like which connection to use, which schema (also catalog in case of SQL server) to connect and also which table to use. This layer confirms the PK_FK joins for the related tables. This layer mainly depicts how the data has been stored in the database layer.
    On top of this layer you will have you BMM layer. The place where all work of a developer starts. You will structure the tables accourding to the business need. The structure has to be a STAR schema. All the entities in this layer are called logical because they do not directly represent any database object rather they provides a logical mapping to the database entities. This becomes clear when you use more that one Logical Table Source (LTS) for your logical tables. One logical column can map to N number of physical columns based on context. You can also create calculative columns in this layer which are totaly logical in nature.
    I am not writing anything on Presentation layer as it is not in you question. :)
    Hope this will help.
    Regards,
    Somnath

  • Set of user roles in Tomcat servlets

    I'm using Tomcat's role based authentication scheme for security of my web application and want to build a servlet to show a dynamic options menu based on the authenticated user's roles using my role-option table (with option and role columns). I want to know how to programatically obtain the set of roles of the authenticated user, independent from the type of the security realm used(MemoryRealm, JDBCREalm, JNDIRealm, etc)

    When I was looking at this a year ago I fired off an email to the JAAS guys and the servlet guys. I don't think there's anything that will help you that's in the standards. Perhaps websphere has its own API. I ended up punting and writing my own security layer using Filters and JAAS, with the drawback that my web server security doesn't flow into the EJB tier. Good luck with your project.

  • Getting user roles/credentials? (TOMCAT web auth)

    Hi all ! I need a way to retreive the roles/credentals that a user has assigned in the tomcat web auth.
    I was using request.getUserPrincipal(), but that returns a string thats not really what Im looking for:
    *GenericPrincipal[manusan(Gerencia,)]*
    Here manusan is the user and Gerencia is the role. Is there a way to just get the role? or do I have to take split/index the string?.
    Thanks!

    When I was looking at this a year ago I fired off an email to the JAAS guys and the servlet guys. I don't think there's anything that will help you that's in the standards. Perhaps websphere has its own API. I ended up punting and writing my own security layer using Filters and JAAS, with the drawback that my web server security doesn't flow into the EJB tier. Good luck with your project.

Maybe you are looking for

  • I dont have share Internet on the menu of my iPad

    There's in no Share Internet option in the menu of my Ipad2 3G?

  • Audio is routing to the wrong place

    Hello everyone, I hope this is the right community for this question. I've been using a MOTU 828mk3 audio interface just fine with my MacPro for a couple years now. Just two ago, however, the audio inexplicably started routing to different outputs th

  • I do not want Firefox 12

    Help please. I am on my final warning before automatic update to Fx12 but I do not want Fx12. I want to remain on the superiour 3.6.28 How the heck can I stop it from changing. If there is no way to stop it then for me it is bye bye Firefox and hello

  • Is there a forum for test posts?

    Nevermind, this is my test post :-) Anyway, one would be useful to try out functionality. Edited by: alexkotopoulis on Nov 5, 2008 4:10 PM

  • Exporting video problem

    When I export a video, there are parts of the video that are not exported. Only the first portion of the video gets exported and the parts with no audio or in slow motion didn't. I export to Windows Media since it takes up little space and the video