ApplescriptObjC: function that is always running?

Hi Community,
As much CPU as it will take up, I need a function that is always running. I tried making a function (called theTest for the sake of the test) that has a repeat block in it and displays some dialog every 3 seconds and then calling on it from the applicationwillfinishlaunching_(aNotification), but the application won't finish launching until the function I call on has finished running (which is never because of the repeat block). Does anyone know how i can make a function that is always running without having any interaction from the user? Or if there is already a function that does that that i don't know about? Thanks. Here's the code I tried:
          on applicationWillFinishLaunching_(aNotification)
                         theTest()
          end applicationWillFinishLaunching_
          on theTest()
       repeat
            repeat with i from 1 to 3
                                                       do shell script "sleep 1"
            end repeat
                                        display dialog "Test"
       end repeat
          end theTest

Ok, so it says this:
textDidChange:
Informs the delegate that the text object has changed its characters or formatting attributes.
- (void)textDidChange:(NSNotification *)aNotification
Discussion
The name of aNotification is NSTextDidChangeNotification.
Availability
Available in Mac OS X v10.0 and later.
Available as part of an informal protocol prior to Mac OS X v10.6.
Declared In
NSText.h
But how do I actually use it (sorry, I'm not too great with ObjC). Would i do something like:
on NSTextDidChangeNotification_(aNotification)
#stuff
end NSTextDidChangeNotification_
Also, how do i specify the text field? Thanks for the help

Similar Messages

  • Portege M400 - always running fan at 100%

    I was excited to receive my new toshiba portege m400 today, but the fan noise is quite bad.
    The problem is that it always runs 100% -- I tried the Toshiba power save properties to
    set the fan speed but to no avail, it has no effect at all. Furthermore, I tried to set
    all three bios power options (low,full power,user) but that has no effect either.
    Worst of all, the cpu temperature is very cool, just 29 degrees, and there is no need
    at all to run the fan at full speed. I guess the power save utilities are bugged and I wonder
    if Toshiba will come out with a new version of their tools? Is there anything I can do?
    Thanks,
    -- Daan.
    ps. bios version 1.30, toshiba power save tools 7.08.00. Cpu speed is dynamic, usually at 1 ghz and
    the temprature is very low.
    [Edited by: admin on 20-Apr-06 06:48]

    Hi all,
    thanks for the suggestions. However, my cooling unit is brand new and doesn't have dust in it, and the antivirus package does not take cpu time: on the contrary, at the moment, I use about 1% of my cpus, the temperature of the cpu is 28 degree celcius (which is extremely low), and the fan just happily blows lots of cold air out of my machine. I think just feeling that the air coming out is *cold* is the best sign that the fan just blows too much.
    I have the latest bios, the latest drivers, set the cooling method to "battery optimized" and nothing helps -- it makes more noise than my other workstation. What should I do? Are there any technical engineers around at Toshiba that look into the fan wiring/temperature sensor?

  • Is there a possibility to switch off in Firefox the functionality of quick launch key (additional key in laptop) that cause to run the homepage

    Dear Support,
    Is there a possibility to switch off in Firefox the functionality of quick launch key (additional key in laptop) that cause to run the homepage. I would like to switch this functionality off, because the key is malfunctioned and always pressed. I was able to switch off the functionality of this key in Windows system by deleting entries in registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey. After this change, when somebody works in system the Firefox is not running is not launching all the time. But when I open the Firefox the setting in system is overwritten and when I am using it Firefox returns to the homepage instantly. I think because of this quick launch button. I tried to change settings in about:config like browser.startup.homepage, browser.startup.homepage_override, startup.homepage_override_url,… this is for Firefox version is 10.0.2
    Thank you
    Best Regards

    Hi,
    Thank you for your interesst.
    This internet button key is one of buttons located above the keyboard near the power button. What I have achieved to this moment was to stop it functionality in the system by clearing the entries in the fields Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\17\ShellExecute and entry
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\7\Association that was http
    After these changes in registry the behavior of the button was suppressed, the Firefox stopped to start unexpectedly all the time – so in system it works. But the problem is still when I have opened Firefox. Every time when you want to surf in internet – the homepage is activated also unexpectedly. I wrote this post with intention to ask if there is a possibility to switch off the functionality of this quick launch button in Firefox. Because I assume Firefox overrides the system setup – this I have made in registry. I tried with some option changes in about:config but without success. And I know that for older versions of firefox was some option in about:config do disable_quick launch button. But in 10.0.2 I couldn't locate it.
    Thank you
    Regards
    Lukasz

  • When the apple review team review our app,they point out that our  app uses a background mode but does not include functionality that requires that mode to run persistently.but in fact,when the app in background ,the app need data update to make the

    when the apple review team review our app,they point out that our  app uses a background mode but does not include functionality that requires that mode to run persistently。but in fact,when the app in background ,the app need data update to make the function of  trajectory replay come ture。in fact, we have added function when the app  is in background mode。we have point out the point to them by email。but they still have question on the background mode,we are confused,does anyone can help me,i still don't know why do review team can't find the data update when  the app is in background and how do i modify the app,or what is the really problem they refered,do i misunderstand them?
    the blow is the content of the review team email:
    We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the App Store Review Guidelines.
    We noticed your app declares support for location in the UIBackgroundModes key in your Info.plist but does not include features that require persistent location.
    It would be appropriate to add features that require persistent use of real-time location updates while the app is in the background or remove the "location" setting from the UIBackgroundModes key. If your application does not require persistent, real-time location updates, we recommend using the significant-change location service or the region monitoring location service.
    For more information on these options, please see the "Starting the Significant-Change Location Service" and "Monitoring Shape-Based Regions" sections in the Location Awareness Programming Guide.
    If you choose to add features that use the Location Background Mode, please include the following battery use disclaimer in your Application Description:
    "Continued use of GPS running in the background can dramatically decrease battery life."
    Additionally, at your earliest opportunity, please review the following question/s and provide as detailed information as you can in response. The more information you can provide upfront, the sooner we can complete your review.
    We are unable to access the app in use in "http://www.wayding.com/waydingweb/article/12/139". Please provide us a valid demo video to show your app in use.
    For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
    - complete details of your rejection issue(s)
    - screenshots
    - steps to reproduce the issue(s)
    - symbolicated crash logs - if your issue results in a crash log
    If you have difficulty reproducing a reported issue, please try testing the workflow as described in <https://developer.apple.com/library/ios/qa/qa1764/>Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.

    Unfortunately, these forums here are all user to user; you might try the developer forums or get in touch with the team that you are working with.

  • HT1688 when you double tap the home button to go back to your other apps are those apps always running and using cellular data even if I am not currently using them?  I thought it froze them and didn't use data other that a select few apps like Facebook,

    when you double tap the home button to go back to your other apps are those apps always running and using cellular data even if I am not currently using them?  I thought it froze them and didn't use data other that a select few apps like Facebook, email, etc.  Also I always select no when I download an app and it wants me to have those push notifications.  Because that would mean that I would have to delete my apps after everytime I just them from that bar and that would be very annoying and just stupid.  Or maybe apps do use data and it's just a big scheme to make everyone go over on their data plans. 

    This should help: http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html.

  • Add code behind functionality that run when the user view the SP 2013 content pages

    I need to add code behind functionality that run when the user view the SP 2013 content pages, What is the best approach to do that?
    is it add Delegate Control to master page?
    is it add code behind to master page?
    is there an event reviver for that?
    Your answer will be highly appreciated

    Hi,
    According to me, for code behind stuff
    Create master page(using module etc..), have the required placeholders in it.
    Then, create a page that inherit from this master page, now you can use that placeholder in you page.
    Lastly, place web parts in that placeholder. So, code behind will come with that master page .
    Hope it helps.
    Thanks
    -Rahul

  • Fan is alway running on my new dv7-4290us. Should I exchange for a new one or is this normal?

    I just got my new dv7-4290us from the HP store and after a little while of playing with it, I noticed that the fan seems to always be running. It's not spinning very fast, just kind of a soft blowing or purring sound but audible for sure. Is this normal for this notebook or notebooks with quad cores and dedicated graphics? I called HP tech support and asked them if it was normal for the fan to run all the time, but they where kind of clueless with, 3 different guys giving me 3 different answers. I did mess around with some power management settings and the HP Thermal program but that didn't help. Turning off the fan always on setting in the bios just causes the fan to blow up every 20 seconds, so that is not a solution. There wasn't a bios update on the driver page, so I don't know about that as a fix. Otherwise everything seems to be functioning properly with no BSOD or lockups so far.  The computer doesn't seem to be running hot (core temps stay under 50°c under light load) and the fan doesn't sound unhealthy like it has a bad bearing or anything. I just want to know if the fan always running at a low speed thing is normal on these machines. From my expereince with notebooks the fan alway running is a sign that your system is not cooling properly, so I wanted to get a second opinion from fellow users before I go through the hastle of exchanging this for a new one.

    Does this happen on AC power only?  There maybe an option in BIOS for 'Fan always on while on AC power'.
    ________________________________________________________________________________________________________ I Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly

  • Installing Snow Leopard on a MacBook that is currently running Tiger

    Is it possible to install Snow Leopard on my MacBook that is currently running Tiger? I have heard rumors that Leopard must be installed before Snow Leopard will work. I bought a white MacBook about three and a half years ago with Tiger installed.

    1. The Snow Leopard installer itself runs the equivalent of Disk Utility's verify disk step on the volume selected for the install, so while this remains a good idea when upgrading to Leopard or other previous OS versions, doing it as a separate pre-install step is not necessary or likely to improve anything when upgrading to Snow Leopard.
    In this respect the installer is quite finicky: if the volume doesn't pass verification, it will refuse to begin the install.
    2. Aside from that, the installer is only finicky about two other things regarding format: (a) the drive must be formatted with the GPT (GUID Partition Table) partition scheme (the scheme the drives of all Intel Macs ship with) & (b) the table must conform to the standard GPT format. If the drive doesn't meet these criteria, the installer marks any volumes on it as not suitable for the install & users can't select them.
    3. Some users seem unaware of just how different the Snow Leopard installer is from the earlier ones. When Apple talks about streamlining it in the product's blurb, it refers to much more than just eliminating the old Archive & Install and Erase & Install options, notably:
    • Unlike the old Upgrade option, SL's version completely replaces the existing OS component files with the ones from the installer's 'payload.' (The old Upgrade option just replaced or patched components that had been changed for that OS version.) This is why the single provided option is equally suitable for a volume that contains an existing OS or an empty one. (It's also why upgrading from Leopard or Tiger works essentially the same way.)
    • The new installer doesn't create a "Previous Systems" folder like the old Archive & Install did. There is no reason for this largely redundant folder anymore, since the new installer selectively leaves in place user-added items from the old system folders that they previously had to move back into those folders manually if they wanted to restore their functionality. However, if the "Previous Systems" folder exists because a user did an A&I with an older OS installer, the new one leaves it in place. But since the new OS ignores it, just as previous ones did, this has no effect on OS operation.
    • If -- but only if -- users start the install process by launching the "Install Mac OS X" pre-install application while running from an installed OS, that app will use the installed OS's network settings to 'phone home' to Apple's database of software known to be incompatible with Snow Leopard & use that info to decide what if anything to move to a root level "Incompatible Software" folder during the install. The DVD has its own short list, but since that list was created before the DVD was made, it is now out-of-date & incomplete. Thus, it is always a good idea to start the install this way when possible, just as Apple recommends.
    • Other minor refinements that only work if there is an existing OS include automatically deciding if Rosetta or Quicktime Player 7 should be installed, automatic language selection for the install process, & enabling the 'install drivers only for local & nearby printers' option. Each of these depends in some way on what's already installed.
    4. All these refinements do not make the new installer 100% reliable but they eliminate the most common problems users had with the older ones, especially if they follow Apple's instructions & *do not* erase the drive beforehand. Just as the Installation Guide included on the disc (also available online here) says in the "Advice about installing" section, erasing the drive should be reserved for the rare times when the normal method fails.

  • Why the process chain always run twice when triggered from R3?

    I run a program from R3 by calling the remote function 'RSSM_EVENT_RAISE' on BW to trigger an event and in turn the event on BW bring up the running of a process chain.  But whenever I run the program on R3 to bring up the running of the process chain, I find the process chain always run twice at the same time.  Does anybody knows the answer? 
    And also I would like to know the functionalities of the two picture buttons "Activate" and "Activate and Schedule" in process chain.  In which case the "Activate" button should be used and in which case, the "Activate and Schedule" button should be used?   If we click the Start variant of a process chain, then click "Change Selections" button which bring up the window "Start Time" where the buttons "Immediate", "Date/Time", "After job", and "After event" are listed at the top.  If we modify at any of the above buttons, then after save this modification, we will have to click "Activate and Schedule" button to make it work, right? 
    Thanks a lot and everyone's idea is greatly appreciated!

    Kevin, make sure there is only one job scehduled for the Start Process of your Process Chain.  If you bring up the Process Chain (not the log view), right click on the Start Process and select "Displaying Scheduled Job(s)...".  There should only be one scheduled job with name BI_PROCESS_TRIGGER.  If there is more than one, then when triggered, it would execute more than once at the same time.  If there is only one job, then maybe your R/3 program is triggering the event more than once? 
    As far as the Start conditions for the Start Process, it works off the same principals as a scheduled job.  These start conditions determine when or how the Process Chain is to be executed.  You also have control over frequency.  These start conditions determine the scheduling of the Start Process of your Process Chain.
    When you schedule a Process Chain, a separate scheduled job is created for "each" process in the Chain.  BW controls the triggering of these jobs based upon how the processes in the Chain are linked.  All the jobs associated with Process Chains have strict naming conventions and all begin with BI_PROCESS_...  If you use SM37 to view all jobs that begin with BI_PROCESS_ you will find alot of scheduled jobs associated with your process chains.  Each job represents one of the processes within your process chains. 
    Does this help?
    Another tip might be to trigger the event manually in BW (use tx SM64).  If the process chain executes twice again, then maybe there is a separate scheduled job in BW that triggers the process chain that is triggered by the same event as the start process of the process chain.
    Message was edited by: George Shannon

  • Is it bad to (almost) always run MacBook Pro using the adapter?

    Question is in the title.
    If you always run your laptop with the adapter, would that have a negative impact on the battery life/performance due to not being used as much?
    15.4" Macbook Pro Intel Core 2 Duo   Mac OS X (10.4.8)  

    This is no problem, just make sure you calibrate your battery regulary! I do it at least every month!
    Quoted from Apple: Calibrate the battery in your MacBook or MacBook Pro every month or two to keep your battery functioning at its fullest capacity.
    Mac OS X 10.4 Help - Calibrating a MacBook or MacBook Pro battery:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh2339.html
    Hopefully this is helpfull or solved your problem.
    Please see the "helpfull" and "solved" button's on top off this message! Apple: Why reward points?

  • Can the width of a report that has been run in the background be increased?

    Hello Experts,
    How can I increase the width of a report that I have run in the background so that it does not wrap text to the next line?
    I have been running the same HR report successfully in the background for many months.  Today I ran it with the same parameters that I've always used and when I retrieve it from my Own Job Spool - System | Own Spool Request | Display Contents the last field is wrapped to the next line.
    Thanks.
    Regards,
    Jeanette

    Jeanette,
    Thereu2019s another possibility if Tedu2019s suggestion doesnu2019t work. When you look at your spool requests, thereu2019s an icon on the toolbar next to the eyeglasses that looks like a yellow rectangular callout. Itu2019s called u201CDisplay in Maximum Widthu201D. Select the Spool no. to display and then press this icon. Shift + F4 is the shortcut.
    Regards,
    Howard

  • Set Busy cursor does not work for a VI that is dynamically run

    The cursor functions (Set busy and unset busy) usually work well when they are used in a VI that is statically run (either a top VI or a VI called from within a VI).
    However, when they are used in a VI that is openned and run dynamically (using the VI server) I get an error message:
    LabVIEW:  Null window.
    =========================
    NI-488:  Wait in progress on specified input handle.
    How can I solve this problem?

    Bruno Paillard wrote:
    I have just talked to the support people. This is a recognized bug and will be corrected in the next release. They said there is no workaround at this time.
    G Toolbox ($) can set cursor style, long before NI implemented this feature in LabVIEW.
    George Zou
    http://webspace.webring.com/people/og/gtoolbox

  • SOLVED: How can I use or call a function that returns %ROWTYPE?

    Hi
    edit: you can probably skip all this guff and go straight to the bottom...In the end this is probably just a question of how to use a function that returns a %rowtype.  Thanks.
    Currently reading Feuerstein's tome, 5th ed. I've downloaded and run the file genaa.sp, which is a code generator. Specifically, you feed it a table name and it generates code (package header and package body) that will create a cache of the specified table's contents.
    So, I ran:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\OPP5.WEB.CODE\OPP5.WEB.CODE\genaa.sp"
    749  /
    Procedure created.
    HR@XE> exec genaa('EMPLOYEES');which generated a nice bunch of code, viz:
    create or replace package EMPLOYEES_cache is
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE) return HR.EMPLOYEES%ROWTYPE;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE) return HR.EMPLOYEES%ROWTYPE;
        procedure test;
    end EMPLOYEES_cache;
    create or replace package body EMPLOYEES_cache is
        TYPE EMPLOYEES_aat IS TABLE OF HR.EMPLOYEES%ROWTYPE INDEX BY PLS_INTEGER;
        EMP_EMP_ID_PK_aa EMPLOYEES_aat;
        TYPE EMP_EMAIL_UK_aat IS TABLE OF HR.EMPLOYEES.EMPLOYEE_ID%TYPE INDEX BY HR.EMPLOYEES.EMAIL%TYPE;
        EMP_EMAIL_UK_aa EMP_EMAIL_UK_aat;
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMPLOYEE_ID_in);
            end;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMP_EMAIL_UK_aa (EMAIL_in));
            end;
        procedure load_arrays is
            begin
                FOR rec IN (SELECT * FROM HR.EMPLOYEES)
                LOOP
                    EMP_EMP_ID_PK_aa(rec.EMPLOYEE_ID) := rec;
                    EMP_EMAIL_UK_aa(rec.EMAIL) := rec.EMPLOYEE_ID;
                end loop;
            END load_arrays;
        procedure test is
            pky_rec HR.EMPLOYEES%ROWTYPE;
            EMP_EMAIL_UK_aa_rec HR.EMPLOYEES%ROWTYPE;
            begin
                for rec in (select * from HR.EMPLOYEES) loop
                    pky_rec := onerow (rec.EMPLOYEE_ID);
                    EMP_EMAIL_UK_aa_rec := onerow_by_EMP_EMAIL_UK (rec.EMAIL);
                    if rec.EMPLOYEE_ID = EMP_EMAIL_UK_aa_rec.EMPLOYEE_ID then
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup OK');
                    else
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup NOT OK');
                    end if;
                end loop;
            end test;
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /which I have run successfully:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\EMPLOYEES_CACHE.sql"
    Package created.
    Package body created.I am now trying to use the functionality within the package.
    I have figured out that the section
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /is the initialization section, and my understanding is that this is supposed to run when any of the package variables or functions are referenced. Is that correct?
    With that in mind, I'm trying to call the onerow() function, but it's not working:
    HR@XE> select onerow(100) from dual;
    select onerow(100) from dual
    ERROR at line 1:
    ORA-00904: "ONEROW": invalid identifier
    HR@XE> select employees_cache.onerow(100) from dual;
    select employees_cache.onerow(100) from dual
    ERROR at line 1:
    ORA-06553: PLS-801: internal error [55018]
    HR@XE> select table(employees_cache.onerow(100)) from dual;
    select table(employees_cache.onerow(100)) from dual
    ERROR at line 1:
    ORA-00936: missing expressionHe provides the code genaa.sp, and a very brief description of what it does, but doesn't tell us how to run the generated code!
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    So I try wrapping the call in an exec:
    HR@XE> exec select employees_cache.onerow(100) from dual;
    BEGIN select employees_cache.onerow(100) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement
    HR@XE> exec select table(employees_cache.onerow(100)) from dual;
    BEGIN select table(employees_cache.onerow(100)) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 14:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    HR@XE> exec employees_cache.onerow(100)
    BEGIN employees_cache.onerow(100); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00221: 'ONEROW' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredNo joy.
    Of course, now that I'm looking at it again, it seems that the way to go is indicated by the first error:
    PLS-00428: an INTO clause is expected in this SELECT statement
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    I've had a stab at this, but still, no joy:
    create or replace procedure testcache is
        emp employees%rowtype;
        begin
            select employees_cache.onerow(100) from dual into emp;
            dbms_output.put_line('Emp id: ' || emp.employee_id);
        end testcache;
    show errors
    HR@XE> @testcache.sql
    Warning: Procedure created with compilation errors.
    Errors for PROCEDURE TESTCACHE:
    LINE/COL ERROR
    4/9      PL/SQL: SQL Statement ignored
    4/54     PL/SQL: ORA-00933: SQL command not properly ended
    HR@XE>Have a feeling this should be really easy. Can anybody help?
    Many thanks in advance.
    Jason
    Edited by: 942375 on 08-Feb-2013 11:45

    >
    Ha, figured it out
    >
    Hopefully you also figured out that the example is just that: a technical example of how to use certain Oracle functionality. Unfortunately it is also an example of what you should NOT do in an actual application.
    That code isn't scaleable, uses expensive PGA memory, has no limit on the amount of memory that might be used and, contrary to your belief will result in EVERY SESSION HAVING ITS OWN CACHE of exactly the same data if the session even touches that package.
    Mr. Feuerstein is an expert in SQL and PL/SQL and his books cover virtually all of the functionality available. He also does an excellent job of providing examples to illustrate how that functionality can be combined and used. But the bulk of those examples are intended solely to illustrate the 'technical' aspects of the technology. They do not necessarily reflect best practices and they often do not address performance or other issues that need to be considered when actually using those techniques in a particular application. The examples show WHAT can be done but not necessarily WHEN or even IF a given technique should be used.
    It is up to the reader to learn the advantages and disadvantages of each technicalogical piece and determine when and how to use them.
    >
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    >
    That is correct. To be used by SQL you would need to create SQL types using the CREATE TYPE syntax. Currently that syntax does not support anything similar to %ROWTYPE.
    >
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    >
    NO! That is a common misconception. Each session has its own set of package variables. Any session that touches that package will cause the entire EMPLOYEES table to be queried and stored in a new associative array specifically for that session.
    That duplicates the cache for each session using the package. So while there might be some marginal benefit for a single session to cache data like that the benefit usually disappears if multiple sessions are involved.
    The main use case that I am aware of where such caching has benefit is during ETL processing of staged data when the processing of each record is too complex to be done in SQL and the records need to be BULK loaded and the data manipulated in a loop. Then using an associative array as a lookup table to quickly get a small amount of data can be effective. And if the ETL procedure is being processed in parallel (meaning different sessions) then for a small lookup array the additional memory use is tolerable.
    Mitigating against that is the fact that:
    1. Such frequently used data that you might store in the array is likely to be cached by Oracle in the buffer cache anyway
    2. Newer versions of Oracle now have more than one cache
    3. The SQL query needed to get the data from the table will use a bind variable that eliminates repeated hard parsing.
    4. The cursor and the buffer caches ARE SHARED by multiple sessions globally.
    So the short story is that there would rarely be a use case where ARRAYs like that would be preferred over accessing the data from the table.

  • Windows Vista Boot Camp always running

    I just recently purchased a macbook air ( 1.86, 128gb ssd) and I've been extremely happy with it. I was wondering if people have noticed that the fan is always running when using Vista but not in OS X?
    Is there a solution?

    I have the same machine with Vista running via Boot Camp and Fusion. Although the fan does run more frequently than when running Mac o/s, it certainly doesn't run "all the time" as you report.
    Note, however, that I only use Vista for occasional browsing with Explorer and to run one app for which there is no Mac alternative; could be that it's the app you're running that makes the fan more active?

  • Memory leak in JCO when calling an ABAP-function that returns larg tables

    Hello everybody,
    I think discovered a memory leak in JCO when the calling functionions that have exporting tables with large datasets. For example the ABAP-function RFC_READ_TABLE, which in this example I use to retrieve data from a table called "RSZELTTXT", which contains ~ 120000 datasets. RFC_READ_TABLE exports the data as table "DATA".
    Here a simple JUnit test:
    http://pastebin.ca/1420451
    When running it with Sun Java 1.6 with standard heap size of 64mb I get a heapsize OutOfMemory error:
    http://pastebin.ca/1420472
    Looking at the heap dump (which I unfortunately cannot post here, because of it' size), I can see that I've 65000 char[512] array objects in my heap, which don't get cleaned up. I think, each char[512] array stands for one dataset in the exporting table "DATA", since the table contains 120000 datasets, the heap is full after the first 65000 datasets are parsed. Apparently, JCO tries to read all datasets in memory instead of justing reading the dataset to which the pointer (JCoTable.setRow(i)) currently points to and releasing it from memory after the pointer moves forward ...
    Did anybody else experience this?
    Is SAP going to remove to issue in upcoming versions of JCO?
    regards Samir

    Hi,
       Check Below links
    1) How To Analyze Performance Problems JCO
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3fbea790-0201-0010-6481-8370ebc3c17d
    2) How to Avoid Memory Leaks 
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c3e598fe-0601-0010-e990-b8622840c8c2
    Salil...
    Edited by: salil chavan on Jun 2, 2009 5:21 AM

Maybe you are looking for

  • Mail and Safari crashing

    Not until I moved to 10.5.2 have I had so many crashes and lock ups. It's as if I'm working on a PC. The problem seems to be when I'm working in mail and Safari. I know there is no solution to this problem but I thought I should post my frustration.

  • How do i erase photos that were synced to my new phone from my old phone?

    photos that were saved to my iPhoto, synced onto my new phone and when i try to erase, the trash can button doesn't appear.

  • Pearl with gps and wi-fi

    hiya, does anyone know a way to get both gps and wi-fi in a pearl?  gps or wifi addon/card to supplement the missing feature in one of the current pearls? just wait and see if they ever do it?  thanx, bradt

  • Calendar Losing Events-Crazy!

    I am using Mavericks on an iMac and iOS 7 on an iPad and an iPhone. Up until the other day, they synched their calendars perfectly via iCloud. But now....well this is crazy.... If I add an event on my iMac on any day after October 6th 2013 they show

  • Smartform to pdf conversion Doubt

    Dear Expert i'm refering the below code to convert smartform to pdf in module pool program i have created two pushbuttons one for preview and one for edit, if users edit the values it will store in ztable and then they want to preview that changes in