Attaching the same function to multiple mouse actions

Please excuse my ignorance, I'm trying to learn, and upgrade
my old way of doing things. If I am going about this all wrong,
please let me know.
I'm attaching my code below. My question is, how do I trigger
this function with different mouse interactions with my movie clip
without having to rewrite it twice, like I've done here?
Thanks!

playHead.onRelease = playHead.onReleaseOutside = myOnRelease;
function myOnRelease(){
dragPlayHead = false;
stopDrag();
_parent._parent.demoClip.isPlaying = true
}

Similar Messages

  • Parallel run of the same function from multiple jobs

    Hello, everyone!
    I have a function which accepts a date range, reads invoices from a partitioned by date table and writes output to a partitioned by invoice table. Each invoice can have records only with one date, so both tables may have one invoice only in one partition, i.e. partitions do not overlap. Function commits after processing each date. The whole process was running about 6 hrs with 46 million records in source table.
    We are expecting source table to grow over 150 million rows, so we decided to split it into 3 parallel jobs and each job will process 1/3 of dates, and, as a result, 1/3 of invoices.
    So, we call this function from 3 concurrent UNIX jobs and each job passes its own range of dates.
    What we noticed, is that even if we run 3 jobs concurrently, they do not run this way! When 1st job ends after 2 hrs of run, the number of commited rows in the target table is equal to the number of rows inserted by this job. When 2nd job ends after 4 hrs of run, the number of rows in the target table is equal the summary of two jobs. And the 3rd job ends only after 6 hrs.
    So, instead of improving a process by splitting it into 3 parallel jobs we ended up having 3 jobs instead of one with the same 6 hrs until target table is loaded.
    My question is - How to make it work? It looks like Oracle 11g is smart enough to recognize, that all 3 jobs are calling the same function and execute this function only once at the time. I.e. it looks like only one copy of the function is loaded into the memory at the same even if it called by 3 different sessions.
    The function itself has a very complicated logic, does a lot of verifications by joining to another tables and we do not want to maintain 3 copies of the same code under different names. And beside this, the plan is that if with 150 mln rows we will have a performance problem, then split it to more concurrent jobs, for example 6 or 8 jobs. Obviously we do not want to maintain so many copies of the same code by copying this function into another names.
    I was monitoring jobs by quering V$SESSION and V$SQLAREA ROWS_PROCESSED and EXECUTIONS and I can see, that each job has its own set of SID's (i.e. runs up to 8 parallel processes), but number of commited rows is always eqal to the number of rows from the 1st job, then 2nd+1st, etc. So, it looks like all processes of 2nd and 3rd jobs are waiting until 1st one is done.
    Any ideas?

    OK, this is my SQL and results (some output columns are ommited as irrelevant)
    SELECT
            TRIM ( SESS.OSUSER )                                                        "OSUser"
          , TRIM ( SESS.USERNAME )                                                      "OraUser"
          , NVL(TRIM(SESS.SCHEMANAME),'------')                                         "Schema"
          , SESS.AUDSID                                                                 "AudSID"
          , SESS.SID                                                                    "SID"
          , TO_CHAR(SESS.LOGON_TIME,'HH24:MI:SS')                                       "Sess Strt"
          , SUBSTR(SQLAREA.FIRST_LOAD_TIME,12)                                          "Tran Strt"
          , NUMTODSINTERVAL((SYSDATE-TO_DATE(SQLAREA.FIRST_LOAD_TIME,'yyyy-mm-dd hh24:mi:ss')),'DAY') "Tran Time"
          , SQLAREA.EXECUTIONS                                                          "Execs"
          , TO_CHAR(SQLAREA.ROWS_PROCESSED,'999,999,999')                               "Rows"
          , TO_CHAR(TRAN.USED_UREC,'999,999,999')                                       "Undo Rec"
          , TO_CHAR(TRAN.USED_UBLK,'999,999,999')                                       "Undo Blks"
          , SQLAREA.SORTS                                                               "Sorts"
          , SQLAREA.FETCHES                                                             "Fetches"
          , SQLAREA.LOADS                                                               "Loads"
          , SQLAREA.PARSE_CALLS                                                         "Parse Calls"
          , TRIM ( SESS.PROGRAM )                                                       "Program"
          , SESS.SERIAL#                                                                "Serial#"
          , TRAN.STATUS                                                                 "Status" 
          , SESS.STATE                                                                  "State"
          , SESS.EVENT                                                                  "Event"
          , SESS.P1TEXT||' '||SESS.P1                                                   "P1"
          , SESS.P2TEXT||' '||SESS.P2                                                   "P2"
          , SESS.P3TEXT||' '||SESS.P3                                                   "P3"
          , SESS.WAIT_CLASS                                                             "Wait Class"
          , NUMTODSINTERVAL(SESS.WAIT_TIME_MICRO/1000000,'SECOND')                      "Wait Time"
          , NUMTODSINTERVAL(SQLAREA.CONCURRENCY_WAIT_TIME/1000000,'SECOND')             "Wait Concurr"
          , NUMTODSINTERVAL(SQLAREA.CLUSTER_WAIT_TIME/1000000,'SECOND')                 "Wait Cluster"
          , NUMTODSINTERVAL(SQLAREA.USER_IO_WAIT_TIME/1000000,'SECOND')                 "Wait I/O"
          , SESS.ROW_WAIT_FILE#                                                         "Row Wait File"
          , SESS.ROW_WAIT_OBJ#                                                          "Row Wait Obj"
          , SESS.USER#                                                                  "User#"
          , SESS.OWNERID                                                                "OwnerID"
          , SESS.SCHEMA#                                                                "Schema#"
          , TRIM ( SESS.PROCESS )                                                       "Process"
          , NUMTODSINTERVAL(SQLAREA.CPU_TIME/1000000,'SECOND')                          "CPU Time"
          , NUMTODSINTERVAL(SQLAREA.ELAPSED_TIME/1000000,'SECOND')                      "Elapsed Time"
          , SQLAREA.DISK_READS                                                          "Disk Reads"
          , SQLAREA.DIRECT_WRITES                                                       "Direct Writes"
          , SQLAREA.BUFFER_GETS                                                         "Buffers"
          , SQLAREA.SHARABLE_MEM                                                        "Sharable Memory"
          , SQLAREA.PERSISTENT_MEM                                                      "Persistent Memory"
          , SQLAREA.RUNTIME_MEM                                                         "RunTime Memory"
          , TRIM ( SESS.MACHINE )                                                       "Machine"
          , TRIM ( SESS.TERMINAL )                                                      "Terminal"
          , TRIM ( SESS.TYPE )                                                          "Type"
          , SQLAREA.MODULE                                                              "Module"
          , SESS.SERVICE_NAME                                                           "Service name"
    FROM    V$SESSION    SESS
    INNER JOIN V$SQLAREA    SQLAREA  
       ON SESS.SQL_ADDRESS  = SQLAREA.ADDRESS
       and UPPER(SESS.STATUS)  = 'ACTIVE'
    LEFT JOIN  V$TRANSACTION  TRAN
       ON  TRAN.ADDR         = SESS.TADDR
    ORDER BY SESS.OSUSER
            ,SESS.USERNAME
            ,SESS.AUDSID
            ,NVL(SESS.SCHEMANAME,' ')
            ,SESS.SID
    AudSID     SID     Sess Strt     Tran Strt     Tran Time     Execs     Rows     Undo Rec     Undo Blks     Sorts     Fetches     Loads     Parse Calls     Status     State     Event     P1     P2     P3     Wait Class     Wait Time     Wait Concurr     Wait Cluster     Wait I/O     Row Wait File     Row Wait Obj     Process     CPU Time     Elapsed Time     Disk Reads     Direct Writes     Buffers     Sharable Memory     Persistent Memory     RunTime Memory
    409585     272     22:15:36     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITED SHORT TIME     PX Deq: Execute Reply     sleeptime/senderid 200     passes 2     0     Idle     0 0:0:0.436000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     7     21777     22739     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     203     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.9674000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     25     124730     4180     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     210     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.11714000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     24     124730     22854     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     231     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.4623000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     46     21451     4178     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     243     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITED SHORT TIME     PX qref latch     function 154     sleeptime 13835058061074451432     qref 0     Other     0 0:0:0.4000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     35     21451     3550     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     252     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.19815000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     49     21451     22860     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     273     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.11621000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     22     124730     4182     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     277     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     db file parallel read     files 20     blocks 125     requests 125     User I/O     0 0:0:0.242651000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     39     21451     4184     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     283     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.2781000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     42     21451     3552     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     295     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.24424000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     40     21451     22862     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409585     311     22:30:01     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.15788000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     31     21451     22856     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     242     22:15:36     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITED KNOWN TIME     PX Deq: Execute Reply     sleeptime/senderid 200     passes 1     0     Idle     0 0:0:0.522344000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     28     137723     22736     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     192     22:29:20     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.14334000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     31     21462     4202     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     222     22:29:20     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.16694000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     37     21462     4194     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     233     22:29:20     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.7731000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     44     21462     4198     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     253     22:29:20     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     db file parallel read     files 21     blocks 125     requests 125     User I/O     0 0:0:0.792518000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     39     21462     4204     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     259     22:29:20     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.2961000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     35     21462     4196     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409586     291     22:29:20     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq Credit: send blkd     sleeptime/senderid 268566527     passes 1     qref 0     Idle     0 0:0:0.9548000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     35     21462     4200     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409587     236     22:15:36     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq: Table Q Normal     sleeptime/senderid 200     passes 2     0     Idle     0 0:0:0.91548000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     25     124870     22831     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409587     207     22:30:30     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq: Execution Msg     sleeptime/senderid 268566527     passes 3     0     Idle     0 0:0:0.644662000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     43     21423     4208     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409587     241     22:30:30     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     PX Deq: Execution Msg     sleeptime/senderid 268566527     passes 3     0     Idle     0 0:0:0.644594000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     47     21423     4192     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448
    409587     297     22:30:30     22:15:36     0 0:14:52.999999999     302     383,521               305     0     1     3598          WAITING     db file parallel read     files 20     blocks 109     requests 109     User I/O     0 0:0:0.793261000     0 0:0:1.124995000     0 0:0:0.0     0 1:56:15.227863000     12     21316     4206     0 0:25:25.760000000     0 2:17:1.815044000     526959     0     25612732     277567     56344     55448Here I found one interesting query http://www.pythian.com/news/922/recent-spike-report-from-vactive_session_history-ash/
    But it does not help me

  • Loading in a second Actions panel with the same functionality as the first, but independent from it

    The actions panel is perfect at what it does; however, if you have a few action sets and, in order to eliminate scrolling, you need to expand them into a double row of buttons, it quickly becomes difficult to maintain. As soon as you delete an action or add an action to it, it disorders the others and you have to reorganize again, which becomes a vicious cycle. I like to keep things organised and neat with all that I do and pretty much the only way to have this feature is to expand it on the back end of the software or, if possible, create a script that loads a second Actions panel with the same functionality as the first but completely independent from it. I assume that the SDK will not allow us to expand on the software in this particular way, as Photoshop is not open source; however, maybe this suggestion will be taken into account for future updates or versions since I have yet to find a suitable way to do this.
    Thank you in advance.
    Kind regards

    That would depend on the links on the page. Some pages have links that refer to different areas on the same page. If you want to force a link to open in a new tab, you can middle-click it.

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • How can I apply the same crop to multiple photos?

    It is easy to apply the same Adjust settings to multiple photos by using the Copy and Paste in the Adjust pane. Or by using iPhoto Batch Enhancer.
    But can you apply the same crop to multiple photos? I don't see any way to copy a crop. iPhoto Batch Enhancer can do something like it but, being an external editor, it does so on a copy of the photo. I want it on the original photo. (Well, it's not really the original since that one is saved separately in the Library but on the current version).
    Thanks for any suggestion.
    Bo

    Here's how:
    1 - bring up the first photo in the edit window and click on the Crop button or *use the "C" key on the keyboard*.
    2 - set the crop size/ratio in the menu and position the crop window over the photo as needed.
    3 - click the Apply button or *use the Enter key*.
    4 - click on the right arrow in iPhoto or *use the right arrow key on the keyboard* to bring up the next photo.
    5 - click the "C" key to bring up the crop function.
    6 - repeat steps 2 thru 5 for each photo.
    This video screenshot shows how:
    Click to view video screenshot
    Happy Holidays

  • With out using Weblogic libraries to maintain the same functionality

    Hi,
    Please tell the solution of my problem.Here application developed in Weblogic,now we are migrating that applicationin jboss.Here one java servlet program is there which is using Weblogic libraries to get the connection pool .
    How can change the code without using Weblogic libraries to maintain the same funtionality. Is there any alternate method to get the connection pools in Jboss.
    Here I am attaching the code ,please go througth the code and provide me the correct solution.
    package gsk.servlets;
    import java.io.*;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import javax.management.*;
    import javax.management.InstanceNotFoundException;
    import javax.management.InvalidAttributeValueException;
    import javax.management.Notification;
    import javax.servlet.*;
    import javax.servlet.http.*;
    //Below lines are commnented by Anupama on 29-09-05 to avoid using Weblogic libraries.
    //import weblogic.jndi.Environment;
    //import weblogic.management.MBeanHome;
    //import weblogic.management.MBeanCreationException;
    //import weblogic.management.*;
    //import weblogic.management.runtime.*;
    //import weblogic.management.configuration.*;
    //import weblogic.management.RemoteNotificationListener;
    //import weblogic.management.logging.WebLogicLogNotification;
    //import javax.management.Notification.*;
    //below lines are added by Anupama T on 29-09-05 to run the same functionality without using Weblogic libraries
    import org.jboss.management.*;
    import org.jboss.jdbc.*;
    import org.jboss.naming.*;
    import org.jboss.management.j2ee.MBean;
    import javax.management.AttributeChangeNotification;
    import javax.management.JMException;
    import javax.management.MalformedObjectNameException;
    import javax.management.MBeanServer;
    import javax.management.NotificationListener;
    import javax.management.ObjectName;
    import org.jboss.logging.Logger;
    import org.jboss.system.ServiceMBean;
    import gsk.adip.portal.GKMProperties;
    import gsk.adip.dbconnectionservice.DatabaseConnector;
    * @author jjc18400
    * The ConnectionsManager class acts as a Servlet that listens and
    * responds to events that are thrown by WebLogic MBeans. In particular,
    * it listens for failures in WebLogic connection pools, and attempts to
    * restore these pools.
    public class ConnectionsManager extends HttpServlet implements NotificationListener {
         private static Context ctx;
         private static MBean managedHome;
         private static MBean adminHome;
         private static String SERVER_NAME;
         private static String DOMAIN_NAME;
         private static MBeanServer myServer;
         private JDBCConnectionPoolRuntimeMBean connectionPoolMBean;
         private JDBCConnectionPoolMBean jdbcConnPoolMBean;
         private JDBCConnectionPoolMBean myPool;
         private static ResultSet rset = null;
         public void init(ServletConfig config) throws ServletException {
              super.init(config);
              System.out.println("Initializing the ConnectionsManager servlet.");
              SERVER_NAME = GKMProperties.getProperty("GKM_SERVER_NAME");
              DOMAIN_NAME = GKMProperties.getProperty("DOMAIN_NAME");
              findMBeans();
              testConnectionPool("GENNETConnectionPool");
              try {
                   //findConnPool("GENNETConnectionPool").addNotificationListener(this, null, null);
                   RemoteMBeanServer rmbs = adminHome.getMBeanServer();
                   WebLogicObjectName oname =
                        new WebLogicObjectName("TheLogBroadcaster", "LogBroadcasterRuntime", DOMAIN_NAME, SERVER_NAME);
                   rmbs.addNotificationListener(oname, this, null, null);
              catch (IllegalArgumentException e) {}
              catch (MalformedObjectNameException e) {}
              catch (InstanceNotFoundException e) {}          
         public void handleNotification(Notification notification, Object obj) {
              WebLogicLogNotification wln = (WebLogicLogNotification)notification;
              System.out.println("\nWebLogicLogNotification");
              System.out.println(" type = " + wln.getType());
              System.out.println(" message id = " + wln.getMessageId());
              System.out.println(" server name = " + wln.getServername());
              System.out.println(" timestamp = " + wln.getTimeStamp());
              System.out.println(" message = " + wln.getMessage() + "\n");
         private void testConnectionPool(String poolName) {
              JDBCConnectionPoolMBean aPool = findConnPool(poolName);
              JDBCConnectionPoolRuntimeMBean aRuntimeMBean = findRuntimeMBean(poolName);
              /*while(aRuntimeMBean.getPoolState()) {
                   try {
                        Thread.sleep(6000);
                        System.out.println("Thread is sleeping.");
                   catch (InterruptedException ie) {
              retargetConnPool(aPool);
         private JDBCConnectionPoolRuntimeMBean findRuntimeMBean(String aPoolName) {
              JDBCConnectionPoolRuntimeMBean aRuntimeMBean = null;
              if (managedHome != null) {
                   try {
                        aRuntimeMBean = (JDBCConnectionPoolRuntimeMBean)managedHome.
                                  getRuntimeMBean(aPoolName, "JDBCConnectionPoolRuntime");
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolRuntimeMBean: " + e);
                        aRuntimeMBean = null;
              return aRuntimeMBean;
         private JDBCConnectionPoolMBean findConnPool(String poolName) {
              if (adminHome != null) {
                   try {
                        myPool = (JDBCConnectionPoolMBean)adminHome.getMBean(poolName, JDBCConnectionPoolMBean.class);
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolMBean: " + e);
                        myPool = null;
              return myPool;
         private void retargetConnPool(JDBCConnectionPoolMBean aPool) {
              //System.out.println("The connection pool: " + aPool.toString() + " is not responding.\nAttempting to retarget the pool...");
              try {
                   System.out.println("Attempting to remove " + myServer.toString() + " from the connection pool target list.");
                   aPool.removeTarget(myServer);
                   System.out.println("Removal successful: " + aPool.getTargets().toString());
                   aPool.addTarget(myServer);
                   System.out.println("Addition successful: " + aPool.getTargets().toString());
              catch (InvalidAttributeValueException e) {
                   System.out.println(e.toString());
              catch (DistributedManagementException e) {
                   System.out.println(e.toString());
         public void doPost(HttpServletRequest req, HttpServletResponse resp)
                   throws ServletException, IOException {
              String poolName = (String)req.getParameter("poolName");
              String dataSource = (String)req.getParameter("dataSource");
              //System.out.println("req.getAttribute(poolName) is: " + poolName);
              //System.out.println("req.getAttribute(dataSource) is: " + dataSource);
              String message = runTestQuery(dataSource);
              getConnectionPoolMBean(poolName);
              resp.setContentType("text/html");
              PrintWriter out = resp.getWriter();
              out.println("<html>");
              out.println(" <head><title>The ConnectionsManager Responds:</title></head>");
              out.println(" <body>");
              out.println(" <h1>" + message + "</h1>");
              out.println(" </body>");
              out.println("</html>");
         public void destroy() {
              System.out.println("Destroying the ConnectionsManager servlet.");
         public String getServletInfo() {
              return "This servlet monitors and corrects errors in WebLogic connection pools.";
         /**private void runTests() {
              while (false) {
                   rset = testConnection();
                   if (rset == null) {
                        resetConnectionPool();                    
                   try {
                        wait();
                   catch (InterruptedException e) {}
         private String runTestQuery(String dataSource) {
              String statusMessage = "";
              Connection conn = null;
              Statement stmt = null;
              ResultSet rset = null;
              //String aPoolName = "GENNETConnectionPool";
              String aSql = "select * from dual where 1 = 1";
              try {
                   conn = DatabaseConnector.getDatabaseConnection(dataSource);
                   System.out.println("Established database connection.");
                   if (conn != null) {
                        conn.setAutoCommit(false);
                        stmt = conn.createStatement();
                        rset = stmt.executeQuery(aSql);
                        statusMessage = "The connection \'" + dataSource + "\' is OK.";
              catch (Exception e) {
                   try {
                        conn.rollback();
                   catch (Exception e1) {}
                   e.printStackTrace();
                   statusMessage = "The connection \'" + dataSource + "\' has failed.\n" + e.toString();
              finally {
                   try {
                        if (stmt != null) stmt.close();
                        if (conn != null) conn.close();
                   catch (Exception e) {
                        e.printStackTrace();
                   return statusMessage;
         public void resetConnectionPool() {
         private void findConnPoolRuntimeMBean(String poolName) {
              try {
                   connectionPoolMBean = (JDBCConnectionPoolRuntimeMBean)managedHome.getRuntimeMBean(poolName, "JDBCConnectionPoolRuntime");
              catch (InstanceNotFoundException e) {
                   System.out.println("Unable to find the JDBCConnectionPoolRuntimeMBean: " + e);
         private void findMBeans() {
              Environment env = new Environment();
              try {
                   ctx = env.getInitialContext();
                   managedHome = (MBeanHome)ctx.lookup(MBeanHome.JNDI_NAME + "." + SERVER_NAME);
                   System.out.println(MBeanHome.JNDI_NAME + "." + SERVER_NAME + " -- managedHome found successfully.");
                   adminHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                   System.out.println(MBeanHome.ADMIN_JNDI_NAME + " -- adminHome found successfully.");
                   myServer = (ServerMBean)adminHome.getMBean(SERVER_NAME, ServerMBean.class );
                   System.out.println(MBeanHome.ADMIN_JNDI_NAME + " -- " + SERVER_NAME + " instance found successfully.");
                   ctx.close();
              catch (NamingException e) {
                   System.out.println("Naming Exception: " + e);
                   managedHome = null;
                   adminHome = null;
              catch (InstanceNotFoundException e) {
                   System.out.println("Unable to find the JDBCConnectionPoolMBean: " + e);
         public String displayHomeName() {
              getConnectionPoolMBean("GENNETConnectionPool");
              if (managedHome != null) {
                   return new String("MBeanHome found successfully.");
              else return new String("MBeanHome not found.\nSee WL Console for error.");
         private void getConnectionPoolMBean(String poolName) {
              String thisPoolName = poolName;
              connectionPoolMBean = null;
              if (managedHome != null) {
                   try {
                        connectionPoolMBean =
                             (JDBCConnectionPoolRuntimeMBean)managedHome.getRuntimeMBean(thisPoolName, "JDBCConnectionPoolRuntime");
                        if (connectionPoolMBean != null) {
                             System.out.println("JDBCConnectionPoolRuntime found successfully.");
                             System.out.println("connectionPoolMBean.toString() is: " + connectionPoolMBean.toString());
                             System.out.println("connectionPoolMBean.getFailuresToReconnectCount() is: " + connectionPoolMBean.getFailuresToReconnectCount());
                             System.out.println("connectionPoolMBean.getPoolState() is: " + connectionPoolMBean.getPoolState());
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolRuntimeMBean: " + e);
                        connectionPoolMBean = null;
              // Obtain MBeanHome for the administration server.
              /*JDBCConnectionPoolMBean mbean = (JDBCConnectionPoolMBean)home.
                        getConfigurationMBean(poolName, "JDBCConnectionPoolConfig");
              mbean.setConnLeakProfilingEnabled(true);
              mbean.setSqlStmtParamLoggingEnabled(true);
              mbean.setSqlStmtMaxParamLength(maxLen);*/
              /*try {
                   mypool = (JDBCConnectionPoolMBean)mbh.getMBean( "mypool",
                   JDBCConnectionPoolMBean.class );
              catch( javax.management.InstanceNotFoundException e ) {
                   mypool = (JDBCConnectionPoolMBean) mbh.createAdminMBean( "mypool",
                        "JDBCConnectionPool", "mydomain" );
                   mypool.addTarget( myserver );
                   mypool.setDriverName( "org.gjt.mm.mysql.Driver" );*/
              if (adminHome != null) {
                   try {
                        myPool = (JDBCConnectionPoolMBean)adminHome.getMBean(poolName, JDBCConnectionPoolMBean.class);
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolMBean: " + e);
              if (myPool != null) {
                   //System.out.println("myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
                   try {
                        myPool.setMaxCapacity(10);
                        System.out.println("Before: myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
                        myPool.setMaxCapacity(100);
                        System.out.println("After: myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
                   catch (InvalidAttributeValueException e) {
                        System.out.println("Max Capacity is an invalid value.");
                   //System.out.println("myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
    }

    Hy, i've got the same problem as you. Did you find out a solution.
    If so, please contact me. Thanks a lot.
    Lorenzo

  • NSArray of UIButtons calling the same function

    I've been thinking and searching and I can't figure it out. I've come across these two threads which seem to be pieces of my issue:
    http://discussions.apple.com/message.jspa?messageID=7891554
    http://discussions.apple.com/thread.jspa?threadID=1985019&tstart=0
    I'm basically attempting to create an array of 9 UIButtons which will all call the same function, but I need to know which button was clicked.
    I'm not entirely sure how to create the NSArray of buttons, and when I include (id)sender with the selectSquare function, it doesn't work. Any help is much appreciated!
    // Square a1
    a1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [a1 setFrame:CGRectMake(0.0f, 0.0f, 70.0f, 70.0f)];
    [a1 setBackgroundImage:[UIImage imageNamed:@"black.png"] forState:UIControlStateNormal];
    [a1 setCenter:CGPointMake(60.0f, 200.0f)];
    [a1 addTarget:self action:@selector(selectSquare) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:a1];
    // I currently have the previous "a1" button code repeated 9 times, each
    // with a different button name... I want to put all these in a single
    // array instead
    -(void) selectSquare:(id) sender {
    if(turn == x) {
    [sender setBackgroundImage:[UIImage imageNamed:@"x_button.png"] forState:UIControlStateNormal];
    statusImage.image = [UIImage imageNamed:@"o_image.png"];

    TicTacToe indeed!
    The positions I have for my buttons seemed to be perfect when I tested them, so I just went with that vs. using IB.
    As for the tag property, would it just be an int? Like:button1.tag = 5And then use the tag as that button's index in the array? So the button with tag 5 would be the 6th element?
    Also, I'm still not sure on why -(void) selectSquare:(id) sender; doesn't work. When I click on "a1" (the current button with an action assigned to it), the simulator does nothing and then brings Xcode to the front... But when I take out (id)sender, it works fine.
    In the second thread I posted, somebody mentioned something about unbinding and rebinding control actions to fix this, but I'm not too sure what that process entails.
    Here is my interface for that controller:#import <UIKit/UIKit.h>
    @interface TicTacToeViewController : UIViewController {
    UIImageView *statusImage;
    UIButton *playButton;
    UIButton *a1;
    UIButton *a2;
    UIButton *a3;
    UIButton *b1;
    UIButton *b2;
    UIButton *b3;
    UIButton *c1;
    UIButton *c2;
    UIButton *c3;
    //IBOutlet UILabel *gameText;
    //IBOutlet UILabel *x_score;
    //IBOutlet UILabel *o_score;
    //IBOutlet UILabel *round;
    NSInteger turn;
    //NSInteger xscorevalue;
    //NSInteger oscorevalue;
    @property(nonatomic,retain) IBOutlet UIImageView *statusImage;
    @property(nonatomic, retain) UIButton *playButton;
    @property(nonatomic, retain) UIButton *a1;
    @property(nonatomic, retain) UIButton *a2;
    @property(nonatomic, retain) UIButton *a3;
    @property(nonatomic, retain) UIButton *b1;
    @property(nonatomic, retain) UIButton *b2;
    @property(nonatomic, retain) UIButton *b3;
    @property(nonatomic, retain) UIButton *c1;
    @property(nonatomic, retain) UIButton *c2;
    @property(nonatomic, retain) UIButton *c3;
    //@property(nonatomic,retain) IBOutlet UILabel *gameText;
    //@property(nonatomic,retain) IBOutlet UILabel *x_score;
    //@property(nonatomic,retain) IBOutlet UILabel *o_score;
    //@property(nonatomic,retain) IBOutlet UILabel *round;
    @property(nonatomic) NSInteger turn;
    //@property(nonatomic) NSInteger x_score;
    //@property(nonatomic) NSInteger o_score;
    //-(void)reset:(BOOL) newGame;
    -(void) selectSquare:(id) sender;
    @end

  • How to use rule and send the same email to multiple recipents

    Hi,
    My requirement is to send the workitem to the multiple recipents. one of my reiend suggest me to use the rule but i don't know how to use that .
    can any one of you suggest me how to use rule in workflow.
    Also i want to send the same email to multiple recipent .how can i do it by using the multiline variable...please advice me with example if possible..
    Note :- Is it necessary to saparate the email id with comma or i will add all the email next one another..
    Please suggest.
    Thanks in advance ,
    Anand

    Hi Anand,
    I would suggest you first follow the guidelines of the forum and a little searching. One of your questions has been asked just a few threads below.
    Regards,
    Martin

  • Can I view the same pdf on multiple iPads at the same time with 1 iPad operating as the master (controlling page turns etc)?

    Would like to use 4nr iPads as an autocue system. Can I view the same pdf on multiple iPads at the same time with 1 iPad operating as the master (controlling page turns etc) and the others operating as slaves? Can this be done without the use of 3G or a remote Wifi hub? I would appreciate your input.................

    Open the document in Acrobat Reader and use the menu Window > New Window.

  • Can i use the same advertisement to multiple collections?

    Can i use the same advertisement to multiple collections?
    Advertisment A1 currently linked to collection C1.
    Can i use the same advertisement A1 to a collection C2? Because my collection C1 is query based and the C2 would be a static one.
    If i use the same A1 advert, will it affect the earlier linked C1 collection i any ways?
    System Security analyst at CapG

    Well, in 2007 you actually kind of can. You can used linked collections to make C2 a linked sub-collection under C1 and ensure that the advert applies to sub-collections.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How to change the same cell in multiple tables at the same time

    help if you can,
    i have a workbook
    workbook has 10 sheets
    each sheet has 1 table
    when in excel you were able to select a sheet then hold control and select another, this would group the sheet as if to make them the same. change a single cell in one of the sheets and this changed cell would be also be changed in all grouped sheets. is there the same functionality in numbers?

    It's funny.
    This question was asked several times in the last ten days.
    The feature is unavailable.
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'10
    Yvan KOENIG (VALLAURIS, France) jeudi 8 octobre 2009 18:57:14

  • TS2755 keep receiving the same text message multiple times, at the same time of the night. How can I stop this?Thabnks

    Hi
    I keep on receiving the same text message multiple times and at around the same time each night. Any idea how I can stop this happening? The text messages are originating from to separate Saudi Arabian mobile numbers. Both these people are listed in my contacts so do you think if I delete their names it might stop the texts coming htrough each night?
    Cheers

    Deleting the people from your contacts will not stop the messages. Have you tried talking to the people and finding out if they're sending you messages? You could try contacting your carrier and finding out what blocking services they offer. However, theat would block all messages from those people.

  • Can I have the same printer installed multiple times under different names?

    On WIndows I have the same printer installed multiple times
    All using the same driver
    I have a Canon printer that has a rear tray and a bottom tray
    So, I will have one printer that prints to the rear and the other to the bottom
    Other printers (the same one) will be set so that they print in high quality and in duplex for example
    I'll name the printers 1.Canon 2.Canon 3.Canon etc
    So, when I go to print, I just hit a number on the keyboard and the printer I want is selected
    Can I do the same on my laptop?
    Thanks
    Omar

    Back Up - that's in case things go wrong.
    In the case you cite:
    You have
    Mother
    Mother Maiden Name
    as Faces, right?
    In the Corkboard view click on Mother Maiden Name and delete the 'Maiden Name'.
    It will disappear and all the photos will be in the Mother face.
    Note that 'Mother' and 'Mother ' (that is, with a trailing space) are not the same.
    You can  also just edit the name 'Mother Maiden Name' to 'Mother'
    As for photos staying in manual sort, I can only say that mine do. But as I've no idea what troubleshooting steps you've used.
    Regards
    TD

  • Using the same library with multiple computers over a network Use Aperture

    Hi Everyone. I am researching some cataloguing/editing programs to recommend one to my boss, and I was wondering if it was possible to use the same library between multiple computers on a network. Does anyone know if this is possible? This may be what makes or breaks the decision on whether or not to go with Aperture as we need a program that can access a large database of photos on multiple computers.
    Thank you.

    Welcome to the forum.
    You can do it, but...
    It's not supported by Apple.
    Performance won't be great unless you're running a really fast network.
    If more than one person tries to access the Library at one time you're likely to end up with a corrupted database, and there's no code in Aperture to limit access to one person at a time.
    The Library must be stored on an HFS+ volume - don't even try putting it on a FAT32-formatted drive.
    If you want 'proper' multi-concurrent-user network-enabled cataloguing software you're looking into a whole different level of investment than the low price of Aperture - think more in terms of thousands or even tens of thousands of dollars.
    Ian

  • How can I edit the same photo in multiple LR catalogs?

    Hi Forumworld,
    I would like to edit the same photo in multiple LR catalogs. Before you say "don't", there are many reasons why I'd like to do this. I am a working professional photographer and LR is one of the many tools in my workflow. I essentially want to organize my catalogs according to two different principles: once by year and once by theme. As in, a catalog each for 2014, 2015, 2016. But also one where I can group all of my wedding photos, for instance. I have several reasons for not throwing all of them together into one catalog.
    I know that LR is essentially non-destructive, making this an uphill battle. But: if I do something like set all LR catalogs involved to Automatically Write Changes into XMP, should that a) be visible by any catalog and b) sync properly? As in: once the photo is imported to both Catalog A to Catalog B, can I edit it in A and see those changes - including developing, but also flagging etc. - in B? And vice-versa?
    Thanks for your help,
    Adam

    Hi All,
    thanks for the various answers. I've considered most of what was written already, but the gem in all this that I was looking for was from John's answer:
         You will also lose some of your work (xmp doesn't record flags, stacking, virtual copies, history steps...). So for one thing you specifically mentioned, flagging, you can't sync it across multiple collections
    This is consistent with what I've experienced - I wanted to find out if there was a way to not loose some of my work. The goal was to find a way that everything would sync automatically & properly so that I would always access the identical image from various catalogs. This is what I thought XMP would do - but I experienced that it didn't and now I understand that it won't do it properly, regardless of the settings. Flags were exactly the piece of information I was missing when I tried this.
    I am surprised that everyone is telling me to use one Catalog. I am sorry but I don't believe that it will scale - because that is not what I have experienced. When my LR4 catalog got to about 50,000 images, it slowed down dramatically.  Has something big changed in LR5? I have read many threads about this, most seem to say that already in LR4 it shouldn't have slowed down, but it did. No, my hard drive wasn't full. I just shoot a lot, mostly with a D800.
    Thanks,
    Adam

Maybe you are looking for

  • Warehouse Ship to Address

    Hi Experts, I've come across some interesting behavior that I don't fully understand and cannot find any documentation on an hoping someone can shed some light in these dark corners of SAP B1. In the "Shipping Types - Setup" window (Administration->S

  • TimesTen In-Memory Database -ORA-00942: table or view does not exist rc = -1

    Hi Chris, This is wrt the thread : Unable to create CacheGroup. I have configured Oracle_DB[11.2.0.3.0] for timesten, installed timesten[11.2.2.7.0], configured cache_DB. So the Oracle database has user TIMESTEN(cache user) and TTENADMIN(cache admin

  • Purpose of "Refresh Organizational Environment"

    Hi, I have a workflow which is working fine in development. But in quality, when the approver clicks on Approve, it is showing error "No administrator found for the task". From sdn, I found that we have to "Refresh Organizational Environement" to sol

  • Odbc connectivity problem

    Hi all, when i am installing ECC 5.0 i got below error. "odbc connectivity problem, error executing sql command" what may be the reason. plz give me some solution. vinnu.

  • Having problems with usage on my phone - in serious need of help

    My phone continues to say that the "other" on it is taking up 3.3 GB - all other people I know with the iPhone have other taking up only about 1 GB on their phones. I do not even have an entire GB used up with apps, and I have almost 2 GB used up for