Function Logic

Hi All,
I created a function call which builds a WHERE clause
CREATE OR REPLACE FUNCTION test(p_organization_in IN VARCHAR2)
RETURN VARCHAR2 IS
v_where_clause VARCHAR2(1000);
CURSOR c_cur IS
SELECT organization,
channel_id,
hierarchy_id
FROM application_filter
WHERE organization = p_organization_in;
BEGIN
FOR c_rec IN c_cur LOOP
IF c_rec.hierarchy_id IS NOT NULL THEN
v_where_clause := 'WHERE COL5 = '|| c_rec.hierarchy_id;
ELSE
v_where_clause := 'WHERE COL5 IN( '|| c_rec.channel_id ||')';
END IF;
END LOOP;
RETURN v_where_clause;
END test;
The issue i have is for some organizations i have more than one channel_id. With this i am only getting the last processed channel_id in the WHERE clause. If i have 5 channel_id's i am getting the last one. I want the WHERE clause to show the multiple channel_id's for example WHERE COL5 IN(1,2,3,4....)
Thanks in advance

Something like this..?
sql > select * from application_filter;
ORGANIZATION CHANNEL_ID HIERARCHY_ID
         100          1            1
         100          2            2
         100          3            3
         200          1            1
create or replace function test(
     p_organization in application_filter.organization%type)
   return varchar2 is
  l_where_clause varchar2(200);
begin
   for v_rec in (select channel_id
                      from application_filter
                        where organization = p_organization
                ) loop
       if (l_where_clause is null)  then
          l_where_clause := v_rec.channel_id;
          dbms_output.put_line(l_where_cluase); 
       else
          l_where_clause := l_where_clause || ',' || v_rec.channel_id;
          dbms_output.put_line(l_where_clause);
        end if;
   end loop;
   l_where_clause := ' where channel_id in (  ||
                     l_where_clause ||
   return l_where_clause;
end;
sql > select test(200) where_clause from dual;
WHERE_CLAUSE
  where channel_id in ( 1   )
sql > select test(100) where_clause from dual;
WHERE_CLAUSE
  where channel_id in ( 1,2,3   )Let me know if it helps..
Thanks,
Rajesh.

Similar Messages

  • Java User Exit for Variant Function logic in CRM

    Hello Experts,
    We have implemented Variant configuration in ECC with some variant functions / function modules.  Now we have to implement the corresponding Java class in CRM for the knowledge base & version to work. 
    Can anyone help me out to find the correct userexit where I need to implement this Java class consisting the variant function logic.
    Thank You
    Satish

    I don't have any CRM system at hand, but I'm sure there are some BAdI's for this. Look in SE18 for BP or BUS, and i'm sure  you will find something.
    One suggestion though: Before going for the BadI, try and see if CRM also uses change pointers for sending Idoc's . This case you wont need any user exits / badis, an probably no programming at all.
    Transaction
    BD50: Activate Change Ptrs for Mess. Type
    BD61: Activate Change Pointers - Generally
    and use report RBDMIDOC for triggering IDoc.

  • Tiny burn on a functioning logic board causing dark screen!?

    Hello everyone!!! Hoping someone can help me because i am totally STUMPED!
    I have a 2010 macbook pro and the screen suddenly went dark. The computer works perfecty with an external monitor, so i assumed the backlight was just burnt out.
    When i took it to the Apple Authorized Mac Support Store here in Brooklyn, they thought the same thing and kept it to replace the light. HOWEVER, a few days later when they called the said they had replaced the lights but the screeen was still black! So they opened up the computer and saw that there is a tiny burn on the logic board that is preventing my screen from lighting up.
    I asked them if they can just fix the tiny burn but they said no, i would have to replace the entire logic board for close to $1000.
    Question #1: Does this sound right??? As I said, the computer functions perfectly with an external monitor.
    Question #2: If this is correct, is it possible to just fix the little burn instead of replacing the entire logic board? Some time of component repair?
    Question #3: if i was able to find some place to fix the tiny burn rather than replace the entire logic board, are the chances high that i would have a problem again sometime in the near future?
    I just dont want to go out and have the board replaced for close to $1000 and have the darn thing break a month later. I would be totally screwed. I desperately need this laptop for work!
    Any help would be greatly appreciated!!!
    Thank you so much!
    Tracy

    It is "broken" if it does not work when connected to good componets like a good screen.
    Based on the phtos and desciption I say it is damaged.

  • Creating a Function logic for dynamically created XML buttons

    Hi!
    It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and  Object to tooltip.
    In my code I get this error msg when initiating the function on dynamically created buttons:
    1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
    I beleive there are more than one thing here needing a fix.
    Can someone have a look and give me a pointer?
    Thanks
    function contentTooltip(ttt:String, ttclip:MovieClip):void {
        ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        function mouseOverHandler(e:MouseEvent):void {
            ttip.descr.text=ttt;
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
            ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
            ttip.visible = true;
        function mouseOutHandler(e:MouseEvent):void {
            ttip.visible = false;
            ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
        function mouseMoveHandler(e:MouseEvent):void {
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
    contentTooltip("Scale button",scale_btn);
    contentTooltip("Hide button",hide_btn);

    I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
    From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
    How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
    With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
    scale_btn.toolTip = "Scale button";
    test_btn.toolTip = "Test button";
    hide_btn.toolTip = "Hide button";
    scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    var overTarget:MovieClip;
    function mouseOverHandler(e:MouseEvent):void {
         overTarget = e.currentTarget;
         ttip.descr.text = overTarget.toolTip;
         ttip.x = stage.mouseX;
         ttip.y = stage.mouseY - 15;
         overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
         setChildIndex(ttip, numChildren - 1);
         ttip.visible = true;
    function mouseOutHandler(e:MouseEvent):void {
         ttip.visible = false;
         overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 
    function mouseMoveHandler(e:MouseEvent):void {
         TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
         TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
         //ttip.x=stage.mouseX;
         //ttip.y=stage.mouseY-ttclip.height/2;

  • FSCM-COL:  Functional logic of Basic Rule BR00000002

    Hi,
    We are implementing SAP Collections Management and we have a few
    customers that are never considered valid to the Worklist.
    We checked a few customers and it seems that because of Basic Rule BR00000002 they aren't considered valid.
    I checked transactional data and they have overdue items.
    What is the lfunction ogic for this basic rule ?
    It has a couple of conditions, namely amount and number of days. Whats the logic of this basic rule ?
    For instance, i have an customer that as an invoice that is overdue for 5 days for 100 Euros.
    Today is 09.02.0211 so, if i go to UDM_Strategy and in select options i put :
                    - amount > 0
                    - number of days = 5 (by the way this rule only acepts the operator '=' and not '>' or '<'
    So, will the customer be valid to the rule ?
    As far i was able to understood,  for this kind of example, the system will calculate an valid date between the diferential of todays date (in exampleo 09-02-2010) and the days putted in condition (in this case 5).
    For this example it will be 04-02-2011. After that, he will get the amount of all open invoices that are created for the date LE than 04-02-2011.
    Am i corrected ?
    Best Regards,
    Bruno

    Hi Mark,
    Yes, documentation states that the basic rule applies if the total of all overdue items for a customer in the collection segment is in amount interval that  i specified and, that if i don't specify an amount, the system checks whether there are overdue items for this customer in the collection segment.
    But my doubt is regarding the second part namely that i can also specify that only those items are to be considered that are overdue since a specific number of days (tolerance days).
    This part is not totally clear for me...so if my conditions are:
    - Amount > 0,01
    - Number of days = 5
    The system will check if i have an total overdue amount greater that 0,01 for documents that are overdue until 03.02.2011 (Worklist date minus 5 days) ?
    Thanks in advance.

  • Voice Over Functionality(Universal Access) in Logic Pro 8

    Anybody know what functionality Logic Pro 8 offers in terms of universal access, specifically voiceover functionality.
    How specific do the descriptions get, on sub menus, tracks etc...???
    Any help is highly appreciated.....

    Hi,
    I believe that .dll file are for Windows PC only? The VST's I have end in .vst.
    Logic only accepts audio units. Yes, you can use FXpansion to convert VSt to AU, but the VST's need to be in Mac format - not Windows PC. This is not only a format change but an OS change.
    Contact the manufacturers of the plugins. You may find they allow you to have the Mac versions as well. In fact check on your installation discs and install them from CD/DVD directly.
    JG

  • To generate sql string of desired row  using function.

    Hi l,
    I return the below query to get sum of vehicles which falls between the specific weight ranges.
    It returns 20 rows( As I selected 4 classification vehicles).I was expect only 4 rows .One row for each classification of vehicles.
    Is there a way if do some loop or decode in my function logic?
    will tht work?
    "(This is only smple. In my real appilication, if I use 15 classification vehicles it returns 320 rows. But i expect only 16 rows - 0 to 15 one row for each classification .Duirng runtime I'm getting an error as buffer string too small)"
    How could I solve this?
    I use this query inside a function and I call that function in a dynamic sql.
    SELECT 'SUM('
        || 'CASE '
        || 'WHEN weight_report_data.weight >=  '|| repo_range_param.min_value ||' 
            AND weight_report_data.weight   <       repo_range_param.max_value
            THEN weight_report_data.weight_count '   
        || 'ELSE 0 '
        || 'END '
        || ') "Class ' || repo_param.r_value || '" '   
          FROM repo_param
          JOIN repo_range_param
            ON repo_param.r_id = repo_range_param.r_id
         WHERE repo_param.r_id    = 1
           AND repo_param.r_group = 'class'
           AND repo_param.r_name  = 'class'
           AND repo_range_param.r_group = 'gvw'
           AND repo_range_param.r_name  = 'gvw'
         ORDER BY CAST(repo_param.r_value AS NUMBER) ASC;
    "sample sql string output when I run the above query "
    SUM(CASE WHEN weight_report_data.weight >=10
             AND weight_report_data.weight  <15
            THEN weight_report_data.weight_count ELSE 0 END ) "Class 0"
    SUM(CASE WHEN weight_report_data.weight >=15
             AND weight_report_data.weight  <20
            THEN weight_report_data.weight_count ELSE 0 END ) "Class 1"
    SUM(CASE WHEN weight_report_data.weight >=5
             AND weight_report_data.weight  <10
            THEN weight_report_data.weight_count ELSE 0 END ) "Class 2"
    SUM(CASE WHEN weight_report_data.weight >=20
             AND weight_report_data.weight  <25
            THEN weight_report_data.weight_count ELSE 0 END ) "Class 3"
    "sample data for the tables involved"
    CREATE  TABLE weight_report_data
    start_date_time       TIMESTAMP      NOT NULL,
    end_date_time         TIMESTAMP      NOT NULL,
    weight                NUMBER(12,0)   NOT NULL,
    weight_count          NUMBER(12,0)   NOT NULL
    INSERT INTO weight_report_data(start_date_time, end_date_time, weight, weight_count)
           VALUES('01-JUL-08 12:00:00','03-JUL-08 12:00:00',4,5);
    INSERT INTO weight_report_data(start_date_time, end_date_time, weight, weight_count)
           VALUES('01-JUL-08 12:00:00','03-JUL-08 12:00:00',3,1);
    INSERT INTO weight_report_data(start_date_time, end_date_time, weight, weight_count)
           VALUES('01-JUL-08 12:00:00','03-JUL-08 12:00:00',8,6);
    INSERT INTO weight_report_data(start_date_time, end_date_time, weight, weight_count)
           VALUES('01-JUL-08 12:00:00','03-JUL-08 12:00:00',25,9);
    CREATE  TABLE repo_param
    R_ID       NUMBER(12,0),
    R_GROUP     VARCHAR2(10),
    R_NAME     VARCHAR2(10),
    R_VALUE     VARCHAR2(10)
    INSERT INTO repo_param(r_id, r_group, r_name, r_value)
           VALUES(1,'class','class',0);
    INSERT INTO repo_param(r_id, r_group, r_name, r_value)
           VALUES(1,'class','class',1);
    INSERT INTO repo_param(r_id, r_group, r_name, r_value)
           VALUES(1,'class','class',2);
    INSERT INTO repo_param(r_id, r_group, r_name, r_value)
           VALUES(1,'class','class',3);
    CREATE  TABLE repo_range_param
    R_ID       NUMBER(12,0),
    R_GROUP     VARCHAR2(10),
    R_NAME     VARCHAR2(10),
    MIN_VALUE NUMBER(3,0),
    MAX_VALUE     NUMBER(3,0)
    INSERT INTO repo_range_param(r_id, r_group, r_name, min_value, max_value)
           VALUES(1,'gvw','gvw',0,5);
    INSERT INTO repo_range_param(r_id, r_group, r_name, min_value, max_value)
           VALUES(1,'gvw','gvw',5,10);
    INSERT INTO repo_range_param(r_id, r_group, r_name, min_value, max_value)
           VALUES(1,'gvw','gvw',10,15);
    INSERT INTO repo_range_param(r_id, r_group, r_name, min_value, max_value)
           VALUES(1,'gvw','gvw',15,20);
           INSERT INTO repo_range_param(r_id, r_group, r_name, min_value, max_value)
           VALUES(1,'gvw','gvw',20,25);
    Thanks in advance
    Edited by: user10641405 on Jun 18, 2009 4:10 PM
    Edited by: user10641405 on Jun 18, 2009 4:15 PM
    Edited by: user10641405 on Jun 18, 2009 4:15 PM
    Edited by: user10641405 on Jun 18, 2009 4:16 PM
    Edited by: user10641405 on Jun 18, 2009 4:17 PM
    Edited by: user10641405 on Jun 18, 2009 7:47 PM
    Edited by: user10641405 on Jun 19, 2009 4:15 PM

    Say you have a 3 tables
    Table name Description rowcount()
    ============================================================================
    weight_report_data report table having weights and counts 4
    repo_param having id column gives different classes 4
    repo_range_param is detail table of repo_param with id 4
              as foreign key and defines weight
              min max ranges.
    Now you need to report
    per class how many weights weights are there ?
    --not understood report id clearly in relation to weight_report_data
    step1:
    need to map each row of weight_report_data againist its class.
    select wrd.weight,wrd.weight_count,(select rp.class||rp.value
    from repo_range_param rrp,
              repo_param rp
    where rrp.id= rp.id
    and rp.id=1 -- add your other join condition
    and wrd.weight between rrp.min and rrp.max ) class_nm
    from weight_report_data wrd ;
    This will give 4 rows , i.e for each row in wrd it tells which class it falls.
    now you want to group by class_nm to get sum or count of weights.
    step2:
    select class_nm,sum(weight), count(weight), sum(weight_count)
    from (
    select wrd.weight,wrd.weight_count,(select rp.class||rp.value
    from repo_range_param rrp,
              repo_param rp
    where rrp.id= rp.id
    and rp.id=1 -- add your other join condition
    and wrd.weight between rrp.min and rrp.max ) class_nm
    from weight_report_data wrd ) wrd_classnm
    group by class_nm;
    I hope this helps .
    suggestion: first analyse and breakdown into stpes how you r going to do if you do by hand and then translate into sql and then optimise

  • Is there anything I can possibly do about these logic boards?

    Ok, I have 4 broken 4th Generation iPods. Two of them are white 20GB models, one is a white 40GB model, and one is a U2 Special Edition 20GB model. All of them have broken logic boards. Every month or so I give them another go to see if I can get any of them working. But, like usual, I tried today and had no luck.
    EDIT: Let me specify, these are all monochrome 4th generation models.
    The difference here (as opposed to previous attempts) is that now I have a working monochrome 4G (meaning a perfect functioning logic board) that I purchased since my last attempt at fixing these (meaning I now have 1 working iPod but still the 4 broken ones). I was able to restore one of my spare hard drives (20GB MK2006GAL model) with firmware version 3.1.1 using this working iPod. I was even able to add songs, and after disconnecting, play them in the working iPod. Not to mention, the hard drive sounds like it is running beautifully.
    So, I thought, "maybe if I plug a 4th gen formatted, working hard drive with the latest 4th gen firmware into one of these corrupted iPods, they'll at least play the music, even if they won't connect to the PC". Wrong. I still get the old routine of Apple logo, folder icon, "Do not disconnect" for about 5 seconds until it resets itself to the Apple logo, a sad face, and finally a low battery sign (regardless of how charged the battery is) in that exact order. This occurs with 3 of the logic boards. The other logic board, which was originally in the U2 iPod, is able to boot up, and choose a language, but the logic board is broken in that the battery is undetected (no charging, and as soon as you unplug it, poof, its gone). I've tried several batteries that I know work; I am 100% positive it is a logic board issue.
    I've tried diagnostic mode on each and every iPod. On the working 4th gen (with functioning logic board), they pass HDD R/W and HDD SCAN. But they never complete on any other iPod; even after an hour, they've done nothing, and act like they have frozen. I've run the 5-in-1 test on each of these, and they all complete fine.
    So... I guess it all comes down to corrupted logic boards prevent the iPod from properly booting, connecting, and completing diagnostic tests. Is there ANYTHING I can do to rewrite or fix these files? Would connecting to a Mac help at all? (I ask because there is no Mac available to me, not even at a local computer store, but if you guys think it would help, I would go out of my way to the Apple store about 1 hour away). I know Mac's use different formats for the hardware, but I thought this was all hard drive related. Thanks for any help/recommendations/etc.
    Oh, one last note, about that logic board that is able to boot but can't detect the battery: It actually can tell if theres a battery there, but it just doesn't... work. Like, if I have a completely dead battery installed, and I try to plug it in, I get the battery with exclamation point icon. If I plug it in with a battery 50% charged, it will boot and the battery icon will show that is it 50% charged, but it won't charge it, and it still turns off it its disconnected. Any help with this would be great as well.

    I tried running the HP tool today, to see if that would help, but it to was unable to detect my iPod.
    I should also point out that Windows can not detect my iPod either (and thus it has no drive assigned to it).

  • A query regarding synchronised functions, using shared object

    Hi all.
    I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
    Ok, I will clear myself with the following example :
    class First
    int a;
    static int b;
    public void func_one()
    synchronized((Integer) a)
    { // function logic
    } // End of func_one
    public void func_two()
    synchronized((Integer) b)
    { / function logic
    } // End of func_two
    public static void func_three()
    synchronized((Integer) a)
    { // function logic
    } // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
    // just written here for completeness.
    public static void func_four()
    synchronized((Integer) b)
    { / function logic
    } // End of func_four
    First obj1 = new First();
    First obj2 = new First();
    Note that the four functions are different on the following criteria :
    a) Whether the function is static or non-static.
    b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
    Now, first my-thoughts; kindly correct me if I am wrong :
    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
    Kindly correct me I am wrong anywhere in the above.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
    Kindly correct me I am wrong anywhere in the above.
    c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
    d) In case 4, we have a static function, synchronized on a static object.
    Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
    First, Kindly correct me I am wrong anywhere in the above.
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
    Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
    Or am I being dumb ?
    Looking forward to replies..
    Ashutosh

    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
    d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
    Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
    and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
    which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
    Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
    However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
    You need:
    Object a = new Object();
    static Object b = new Object();

  • HT1420 How do I deauthorize a computer that is no longer functional or has been stolen...

    ...since I have had both happen to two laptops recently and now I can't authorize a 6th (but in reality a 4th) computer...seems a bit like needing the key to get inside, but the key is locked in the house. So if I have 5 computers stolen I would need to go find those who stole it to deauthorize? Come on now. If I am incorrect and there is in fact another way, then at minimum more information needs to be represented regarding the proper procedure to achieve my goal of deauthorizing an inaccessable computer. I cannot be the only one who has faced this conundrum. Eventually if 5 computers fail beyond repair or are stolen and I can't gain access to deauthorize them then I will have NO access to my own songs. That is unnacceptable at best, and the way I see it potentially illegal.

    I was worried I'd get completely locked out if I did that. I don't assume it's going to function logically when it comes to software...So deauthorize all and then reauthorize the ones I want authorized?

  • Use of Logical System

    Hi GRC Experts:
    I am currently defining my RAR landscape strategy. In the past, I have used logical systems for the same "type" of system. For example, we had 3 ECC environments so I created a logical system for the 3 ECC systems.
    Now we have 1 ECC, 1 APO and 1 SRM system. Are there any benefits of setting up a logical system within this landscape? I would imagine there are some benefits with creating a logical system and assigning the BASIS risks to that system because the risks exist across the different environments. But are there any others?
    Thank you,
    Grace Rae

    Hi Grace, Logical Systems would be an optimal design if you need to add more systems in the future to the GRC landscape to perform Risk analysis.
    Logical System 1: ECC Logical System
    All the ECC Physical Systems (PR1, PR2, etcu2026)
    Function Authorizations to be uploaded are r3_function_actions and r3_function_permissions files which excludes the Basis Functions
    Logical System 2: SRM Logical System
    All the SRM physical Systems (PS1, PS2, etc...)
    Function Authorizations to be uploaded are srm_function_actions and srm_function_permissions
    Logical System 3: APO Logical System
    All the APO physical Systems (PA1, PA2, etc...)
    Function Authorizations to be uploaded are apo_function_actions and apo_function_permissions
    Logical System 4: ALL Systems
    All the physical systems (PR1, PR2, PS1, PS2, PA1, PA2....)
    Function Authorizations to be uploaded are just the Basis Function Actions and permissions
    Bugesh

  • Logical test OK and test interface Fail

    Hi Masters,
    I have a problem with a message mapping. With the logical function and a xml of DESADV.ORDERS05 for testing , it's works fine. But, with the same values and in the tap TEST XI reports a problem with the same field.
    The logical function:
    E1ADRM1-PARTNER_Q = 'SP' ?
    If OK, a table create with fixvalues to convert E1ADRM1-PARTER_ID to output value with 4 digits.
    The result of the table is putted in AKVART.
    Please see the link with acrobat file with graphical details, values, etc
    [Function Logical OK, Test Fail|http://personales.ya.com/oscarnavas/sap/function_test.pdf]
    Thanks in advance.

    Hi Oscar,
    I really don't want to tell you things you already might know. Forgive me if I do so but to achieve a repeating xml-structure not only the field mapping itself but a graphical mapping of the higher located tag is necessary, too. And this higher tag must not be (1..1) but (1..unbounded) or (0..unbounded).
    Example:
    HIGHER_TAG (1..unbounded)             ->                         HIGHER_TAG (1..unbounded)
    LOWER_TAG_1 (1..1)                                         -
    >                       LOWER_TAG_1 (1..1)
    LOWER_TAG_2 (1..1)                                         -
    >                       LOWER_TAG_2 (1..1)
    I hope this solves your problem...
    Greetings
    Ralph

  • Oracle result cache and functions

    Hi All,
    I am on 11.2 in Linux.
    I want to use Oracle's result cache to cache results of (user defined) functions, which we use in SELECT commands.
    My question is, does result caching work for deterministic and non-deterministic functions ?
    Just curious, how Oracle keeps track of changes being made which affect a function's return value?
    Thoughts please.
    Thanks in advance

    I want to ... cache results of (user defined) functions, which we use in SELECT commands.You have four choices:
    1. Subquery caching - (wrap function call in SELECT) useful for repeated function calls in a single SELECT
    2. Marking function as DETERMINISTIC - inconsistent results across versions, deterministic best reserved for function-based indexes only
    3. Result Cache
    4. Move function logic out of function and inline to the main SQL statement.
    The biggest downside of any function call that is inline to SQL is that it bypasses the read consistency mechanism, actually that's probably the second biggest downside. The biggest downside is normally that their misuse kills performance.
    If your function itself contains SQL then you should seriously reconsider whether you should be using a function.
    does result caching work for deterministic and non-deterministic functions ?Result cache knows nothing about determinism so yes it should be applied regardless.
    Oracle keeps track of changes being made which affect a function's return value?See v$result_cache_dependency.
    The mechanism is very blunt, there is no fine-grained tracking of data changes that may affect your result.
    It's as simple as function F1 relies on table T1. If the data in table T1 changes, invalidate the results in the result cache for F1.

  • Solution Needed for ODI function call

    Hi Experts,
    I am using ODI 11g.
    Currently i am using oracle procedures to call a function in ODI .
    just like "Select package_name.function_name from dual " i am using this query in ODI variables.The output of the function
    i am using in ODI mails .
    So for this ..Suppose for any changes i need to go to the Oracle package and change the function logic...and then promote this
    to production ..which is a time taking for me.
    So i want to write this Function inside ODI variable and send the output to ODI mail ...So that i dont need DB side to promote
    the code to production on every changes.
    Please let me know whether this solution is good or not.
    Thanks,
    Lony

    Hi,
    under my opinion is good having all the logic inside ODI. But it depends from the complexity of the logic and the frequency of your change. If you change the logic once for year it's quite useless make this inside your ODI.
    A good compromise could be to put a package_name.function_name step in your package.

  • Need advice about Macbook internal HD and Logic Pro

    Hi!
    If I use an external Firewire HD for my projects. The Audiofiles gets saved ( recorded ) in the "audio" folder inside the projects folder on the external HD.
    Does it have ANY impact on my macbooks ( logic pro's ) performance that the internal HD of the macbook is only a 5400 RPM HD.
    Ill try to be silly clear here so u'll understand my question right.
    Is the internal Hard disk used in ANY way if the project is on an external HD. Is the internal HD used for playing samples "live" for Ultrabeat, RMX, EXS24 and so on or not or that doesnt matter for performance.
    I need to avoid the intern HD so I am wondering what to do. Should I buy a new 7200 RPM HD even if the projects is situated on external HD.
    To be uberclear: Macbook, black, intel core duo, 2.0 Ghz, 1 GB intern. 100 Gb 5400 RPM internHd. Logic Pro 7.2.3. External FW HD 7200 RPM. Latest Tiger update.
    / Mikke

    yes the internal drive has an impact on performance. this is related to how much RAM you have, but even if you have the max 2GB RAM that you can have in a macbook (or 3GB if they updated it to that like the pros), OSX still uses the system drive for a great deal of swap files. logic does too. it's just the way it all works. back in OS9 days, you may (or may not) remember a thing called virtual memory.. well that hasn't disappeared from OSX as many people think, it's actually built in and always operating under the hood, but it self-manages... there's no need for a user to assign amounts of hard drive for VM, or to assign the memory allocation for applications. OSX does it all by itself, and it does make judicious use of the system drive just to function.
    logic also is part of this equation. depending on how you set it up, if some of your exs library is on the system drive (such as the basic library or garage band sounds), then it's possible that logic will access the sys drive at times if you have exs streaming enabled. also, if your freeze files get created on the sys drive, they'll be read from there too.
    with all that in mind, the other thing is that the 5400rpm is not really that slow. in fact, if it is a drive that uses the new PMR technology (the 5400s in the latest macbook pro do use this, don't know about the standard macbook), then there have been plenty of tests out there that show it's almost as fast as a 7200rpm longitudinal drive, and under some circumstances, faster.
    personally, I ordered a macbook pro with a 7200rpm because I want my system drive to be as zippy as possible for all the fast read/writes that the system does. battery life is not an issue for me as it will always be used in a powered situation. a good review of the 7200rpm drive vs the new PMR 5400s that are the options in the new macbook pros that I read on the net said that the 7200 still does have the slight edge in performance. except, curiously, when the drives are both getting full, at which point they both slow down and the 5400 almost equals the 7200. I wish I could remember the site so I could post the link, it was a laptop review site and they ran their own tests so it wasn't just based on quoted specs.
    anyway for me I'm still going to use an external FW800 for audio and sound library, the internal is just for system. I made the choice to go 7200 for the system performance reasons above, but I really don't think you'll be disappointed with the 5400.

Maybe you are looking for

  • IPhoto 09 originals disappeared after Aperture 3 import

    *My situation as it used to be:* Aperture 2 contained my iPhoto library as referenced masters. All was good. *My current situation:* After updating to Aperture 3, I decided to import all of my iPhoto files so I'd have a single library with all my pho

  • [Pulseaudio] equalizer problem (solve)

    Hello I installed pulseaudio and all work fine but I tried to setup a system wide equalizer with the ladspa-sink module. I think the module is well load but there is a problem with pa_sink_input_update_max_request function. I am not alone in this sit

  • How to implement this aggregate logic at target column in odi inteface mapp

    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row) how to implement this aggregate logic at target column in odi inteface mappings

  • Image Over Hover not working in IE but fine in Firefox

    I have a new page that I just uploaded today.  You can find it here. http://www.rugged-cctv.com/ruggedhd.shtml If you scroll down to the section labeled Features that ALL of our Advanced DVRs share! with a bright blue background, you will see a pictu

  • 2 and 3 finger swipe work inconsistent

    I wonder why in Chrome, for example, 3 finger swipe right moves you to the next page, but 2 finger swipe right (if changed in prefs) moves you to previous page. Why does so amazing "natural" swiping mechanism works differently with 2 and 3 finger swi