How to optimize this code?

Hi all

The function I want to achieve is very simple. The reading of data from data acquisition, play the sound file if a rising edge is detected and stop playing if a front down is detected.

Attachment is my code, it works, but if I stop the program and restart it, the program will be somewhat stuck (but), so all I can do is to put an end to the task and to reopen the program. I put two structures case for each channel, I believe that the problem is caused by the second case structure.

I am a beginner of labview, could someone optimize me this code?

Thank you!

First, use the charts to your advantage.  You can do this fairly simple dynamic conversion of the Data Type in a table of waveforms.  Trigger detection can treat an array of waveforms.  You can then process all detections of relaxation in a loop, updated what trigger (and level), that you are looking for dynamically.

Tags: NI Software

Similar Questions

  • My code servlet JasperViewer report mode more download it in pdf in chrome. How to modify this code it gives only the view in JasperViewr?

    Mr President.

    My servlet code does two things

    1 see the report in JasperViewer

    2. it download it in pdf in chrome.

    How to modify this code it gives only the view in JasperViewr?

    My code is

    package esh.view;
    
    
    import esh.model.AppModuleImpl;
    
    
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    
    
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    
    
    import java.util.HashMap;
    import java.util.Locale;
    import java.util.Map;
    
    
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.design.JasperDesign;
    import net.sf.jasperreports.engine.xml.JRXmlLoader;
    
    
    import net.sf.jasperreports.view.JasperViewer;
    
    
    import oracle.jbo.client.Configuration;
    
    
    @WebServlet(name = "MultiReportServletJasper", urlPatterns = { "/multireportservletjasper" })
    public class MultiReportServletJasper extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
    
    
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        }
    
    
        protected Connection getConnection() {
                
                PreparedStatement st = null;
                String amDef = "esh.model.AppModule";
                String config = "AppModuleLocal";
                AppModuleImpl am = (AppModuleImpl ) Configuration.createRootApplicationModule(amDef, config);
                
                st = am.getDBTransaction().createPreparedStatement("select 1 from dual", 0);
                Connection conn = null;    
            
                try {
                    conn = st.getConnection();
                    return conn;
                } catch (SQLException e) {
                }   
            
                return null;
            }
    
    
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            String var0 = "";  
            String reportName = "";  
            try {  
                 reportName = request.getParameter("reportName");  
                } catch (Exception e) {  
                        e.printStackTrace();  
                       }  
                 response.setContentType(CONTENT_TYPE);  
                 Map parameters = new HashMap();  
                 parameters.put("format", "pdf");  
                 parameters.put("WEBDIR", getServletContext().getRealPath("/"));  
                 parameters.put("REPORT_LOCALE", new Locale("ar"));                             
                                                                                            
                 Connection conn = null;  
                 InputStream is = null;  
            try  
                {  
                 conn = getConnection();  
                 is = getServletContext().getResourceAsStream("/WEB-INF/reports/"+reportName+".jrxml");  
                              
                             
                 response.setContentType("application/pdf");  
                 response.addHeader("Content-Disposition", "attachment; filename="+reportName+".pdf");                                        
                 JasperDesign jasperDesign = JRXmlLoader.load(is);  
                 JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);  
                 JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);                      
                 JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());  
                 JasperViewer.viewReport(jasperPrint,false);                                                                                
                  conn.close();  
                }  
                   catch (Exception e) {  
                         e.printStackTrace();  
                    } finally {  
                        closeConnection(conn);  
                    try {  
                           if(is !=null){  
                              is.close();  
                         }                                                             
                } catch (Exception localException1)  
                    {  
                      }  
                }                      
        }
        
        protected static void closeConnection(Connection conn) {
                try {
                    if(conn !=null){
                       conn.close();
                    }           
                } catch (Exception ex) {
                    //  System.out.println("Developer Msg : Exception in printReport1Servlet.closeConnection()");
                }
            }
        
        
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    Concerning

    Change: response.addHeader ("Content-Disposition", "attachment; filename = "reportName +".pdf");"

    To: response.addHeader ("Content-Disposition", "inline; filename = "reportName +".pdf");"

    Browser first tries to show the PDF, and if no pdf reader is available, you will get the download dialog box.

    (and remove JasperViewer.viewReport (jasperPrint, false);  )

    Dario

  • How to convert this code random AS2 AS3 pos?

    Hello! I do a sort of screen saver and have random logo on the screen. In ActionScript 2, it's easy, simply paste a code for the object, and it works. Things to do it is total different in ActionScript 3 and I can not understand how to solve this problem. Would be nice if someone could take a look at my very simple example and point me in the right direction. Maybe there are some example out there done in AS3?

    I can't understand how post fla so I renamed it to jpg. Just change the extension to the fla again format...

    Best regards / Jimmy

    Hello

    I was not able to see the FichierVous have attached.

    However, I enclose you a zip that will give you the idea of how we can position any logo randomly on the stage.

    Check and let me know if that helps...

    P.S.: Zip and attach files whenever necessary

  • How to create this code in labview

    Hello...

    Please helpe me for that matter

    I have create this code in 'c' in ' labview "..."

    ex c:

    If {portc.f1 == 1}

    portc. F0 = ~ portc. F0

    }

    ex labview:

    If button is {1}

    led round = ~ led Tower

    }

    Thank you...

    pjr1121 wrote:

    See picture attached.

    Why people insist on the use of knots of property to get the value.  It has the same problems with the race as the local variable conditions, but is extremely slow (forces a thread page on the user interface thread).  In fact, you should keep the value of the LED in a shift register.

  • How to optimize this query?

    Hello

    I have a query like this:

    Merge into the table st1

    using (select * from (select pk, value, diff_value, m_date, row_number () over (PARTITION pk ORDER BY diff_value) rnk)

    from (select distinct / * + Full (t1) full (t2) * / t1.pk, t2.m_date)

    , Case when (t1.m_date = t2.m_date) then "CORRESPONDENCE".

    When (t2.m_date BETWEEN t1.m_date-1 and t1.m_date + 1) then ' MATCHED WITH +/-1gg.

    When (t2.m_date BETWEEN t1.m_date-2 and t1.m_date + 2) then "MATCHED WITH +/-2 days.

    else "

    end value_match

    Case when (t1.m_date = t2.m_date) then 0

    Where (t2.m_date BETWEEN t1.m_date + 1 and t1.m_date - 1) then 1

    Where (t2.m_date BETWEEN t1.m_date + 1 and t1.m_date - 1) then 2

    else "

    end diff_value

    of table t2, t1 table

    where t1.value is null

    and t1.id = t2.id)

    where value_match is not null)

    where rnk = 1) s

    on (st1.pk = s.pk)

    WHEN MATCHED THEN

    Update set st1.value = s.value_match, st1.diff_value = s.diff_value, st1.up_date = s.m_date

    where st1.value is null.

    Explain the plan:

    EXPLAIN_PLAN1.jpg

    Table1 a record 3Million and table 2 has 1 million records.

    I used gather stats before you run this query and 'Full' trick, even in this case, he is running for 45 minutes.

    Please suggest the best solution to optimize this query.

    Thanks in advance.

    Remove the tips.

    No need for the separate.

    Get the diff by ceil (abs(t2.m_date-t1.m_date)) and the filter for that where value_diff<>

    Assing the statement ".. MATCHED" lately in the update clause.

    Maybe give exactly to your needs with a small example may be the query may be getting more simplified or not what you want it to do.

  • How to change this code?

    This code creates an external text file scroll on the stage. I want to modify it so that it continues to scroll when the mouse is moved down, as the moving text, a little bit on each mouse click seems useless to me. Thank you, jcarruth.
    ------------------------------------------------------------------------------------------ -----------------------------------------
    var external_txt:TextField = new TextField();
    var externalReq:URLRequest = new URLRequest ("external.txt");
    var externalLoad: URLLoader = new URLLoader();
    externalLoad.load (externalReq);
    externalLoad.addEventListener (Event.COMPLETE, textReady);
    up_btn.addEventListener (MouseEvent.CLICK, scrollUp);
    down_btn.addEventListener (MouseEvent.CLICK, scrollup);
    external_txt.x = 175;
    external_txt.y = 100;
    external_txt. Border = true;
    external_txt. Width = 200;
    external_txt. Height = 200;
    external_txt.WordWrap = true;
    addChild (external_txt);
    function textReady(event:Event):void
    {
    external_txt. Text = event.target.data;
    }
    function scrollUp(event:MouseEvent):void
    {
    -external_txt.scrollV;
    }
    function scrollDown(event:MouseEvent):void
    {
    external_txt.scrollV ++;
    }

    :

  • How to optimize this query XMLDB

    Hello dear community, we have two XMLType table they are very similar but not identical and we do not have the XSD for validation for this exercise.

    We need to make a join between these tables and the data code example go like that

    create table xmltst ( xmldata xmltype);
    create table xmltst2 ( xmldata xmltype);
    
    declare
     idata varchar2(4000);
     idata2 varchar2(4000);
     begin
    
     idata := '<?xml version="1.0" encoding="UTF-8"?>
    <SWs>
      <SW s_ID="T6B890.00-01" t_ID="T6B890.00">
      <Ds>
      <De sX="59" sY="-57" rX="7" rY="22" m_ID="L" eTime_s="2014-12-12T02:22:11+08:00" eTime_e="2014-12-12T02:22:42+08:00" mst="0.631"/>
      <De sX="70" sY="-57" rX="7" rY="23" m_ID="L" eTime_s="2014-12-12T02:22:12+08:00"  eTime_e="2014-12-12T02:22:33+08:00" mst="0.217"/>
      <De sX="69" sY="-57" rX="47" rY="1" m_ID="R" eTime_s="2014-12-12T02:22:16+08:00" eTime_e="2014-12-12T02:22:56+08:00" mst="0.974"/>
      </Ds>
      </SW>
      <SW s_ID="T6B890.00-02" t_ID="T6B890.00">
      <Ds>
      <De sX="56" sY="-1" rX="72" rY="19" m_ID="R" eTime_s="2014-12-12T02:36:01+08:00" eTime_e="2014-12-12T02:36:29+08:00" mst="0.541"/>
      <De sX="57" sY="-1" rX="39" rY="42" m_ID="L" eTime_s="2014-12-12T02:22:12+08:00" eTime_e="2014-12-12T02:23:01+08:00" mst="0.426"/>
      <De sX="58" sY="-1" rX="72" rY="20" m_ID="R" eTime_s="2014-12-12T02:36:07+08:00" eTime_e="2014-12-12T02:36:18+08:00" mst="0.716"/>
      </Ds>
      </SW>
    </SWs>';
    
    
    idata2 := '<?xml version="1.0" encoding="UTF-8"?>
    <SWs>
      <SW s_ID="T6B890.00-01" t_ID="T6B890.00">
      <Ds>
      <De sX="59" sY="-57" rX="7" rY="22" m_ID="L" eTime_s="2014-12-12T02:22:11+08:00" eTime_e="2014-12-12T02:22:42+08:00"/>
      <De sX="70" sY="-57" rX="7" rY="23" m_ID="L" eTime_s="2014-12-12T02:22:12+08:00" eTime_e="2014-12-12T02:22:33+08:00"/>
      <De sX="69" sY="-57" rX="47" rY="1" m_ID="R" eTime_s="2014-12-12T02:22:16+08:00" eTime_e="2014-12-12T02:22:56+08:00"/>
      <De sX="72" sY="-57" rX="47" rY="2" armID="R" eTime_s="2014-12-12T02:22:18+08:00" eTime_e="2014-12-12T02:23:28+08:00"/>
      <De sX="82" sY="-57" rX="7" rY="25" armID="L" eTime_s="2014-12-12T02:22:19+08:00" eTime_e="2014-12-12T02:22:58+08:00"/>
      </Ds>
      </SW>
      <SW s_ID="T6B890.00-02" t_ID="T6B890.00">
      <Ds>
      <De sX="56" sY="-1" rX="72" rY="19" m_ID="R" eTime_s="2014-12-12T02:36:01+08:00" eTime_e="2014-12-12T02:36:29+08:00"/>
      <De sX="57" sY="-1" rX="39" rY="42" m_ID="L" eTime_s="2014-12-12T02:22:12+08:00" eTime_e="2014-12-12T02:23:01+08:00"/>
      <De sX="58" sY="-1" rX="72" rY="20" m_ID="R" eTime_s="2014-12-12T02:36:07+08:00" eTime_e="2014-12-12T02:36:18+08:00"/>
      </Ds>
      </SW>
    </SWs>';
    
    
    
    insert into xmltst values (idata);
    insert into xmltst2 values (idata2);
    
    
    end;
    
    
    commit;
    

    The SQL code, we try to optimize:

    with tt as (    
    SELECT /*+ materialize */
       x.*
         FROM xmltst t,
              XMLTABLE ('/SWs/SW[@s_ID="T6B890.00-01"]/Ds/De'
                        PASSING t.xmldata
                        COLUMNS sX number  PATH '@sX',
                                sY number  PATH '@sY',
                                rX number PATH '@rX',
                                rY number PATH '@rY',
                                eTime_s varchar2(30) PATH '@eTime_s',
                                eTime_e varchar2(30) PATH '@eTime_e',
                                mst number PATH '@mst'
                                ) x     
                                )
                                ,tt2 as (
                                
    SELECT /*+ materialize */
       x.*
         FROM xmltst2 t,
              XMLTABLE ('/SWs/SW[@s_ID="T6B890.00-01"]/Ds/De'
                        PASSING t.xmldata
                        COLUMNS sX number  PATH '@sX',
                                sY number  PATH '@sY',
                                rX number PATH '@rX',
                                rY number PATH '@rY',
                                eTime_s varchar2(30) PATH '@eTime_s',
                                eTime_e varchar2(30) PATH '@eTime_e'                            
                                ) x        
                                )
                                select tt2.*,tt.mst
                                from tt2
                                left outer join tt
                                on (tt2.sX = tt.sX and tt2.sY = tt.sY and tt2.rX = tt.rX and tt.rY=tt.rY)
    

    CREATE INDEX xmltst_idx ON xmltst (xmldata)
    INDEXTYPE IS XDB.XMLIndex
    PARAMETERS (
    'XMLTable SW_tab ''/SWs/Sw''
     COLUMNS 
     s_ID VARCHAR2(100) PATH ''@s_ID'',
     sX NUMBER PATH ''Ds/De/@sX'',
     sY NUMBER PATH ''Ds/De/@sY'',
     rX NUMBER PATH ''Ds/De/@rX'',
     rY NUMBER PATH ''Ds/De/@rY''');
    

    Create an index as above, but it does not seem to be used to explain the plan for the part of XML query.

    and a lot of time, I also get this error but I cannot now re - produce for some reason.

    I thought that its because I can't index after branch out according to s_ID

    SQL Error: ORA-29879: cannot create multiple domain indexes on a column list using same indextype
    29879. 00000 -  "cannot create multiple domain indexes on a column list using same indextype"
    *Cause:    An attempt was made to define multiple domain indexes on the same
               column list using identical indextypes.
    *Action:   Check to see if a different indextype can be used or if the index
               can be defined on another column list.
    

    and this index below seems to have choice as shown explain plan.

    Why can't I see the index above in the plan to explain it?

      CREATE INDEX "OE"."XMLTST_INDX01" ON "OE"."XMLTST" ("XMLDATA") 
       INDEXTYPE IS "XDB"."XMLINDEX"  PARAMETERS ('paths (include (/SWs/SW/@s_ID))');
    

    However, it is still the loop nest join when the join of two tables after the XML in the process... Is it possible to tell Oracle to a join index or some kind of faster join after the XML select part.

    My real case got way as many lines to make the join of X - Y and it may be nice to have an index to quickly reach?

    When do some small tests, the clause will eventually cause oracle core dump. It should not happen even it is a virtual machine with 3G of memory max and the max_memory_target = 800 M as all my data are not not even 50 M.

    We are the team of analysts and Dev team suggest that is a little too much time to contact Oracle Support and I finally create 3 global temporary table with commit preserve rows and operate with performance much better.

  • How I loop this code?

    It was originally a tween, I converted code and removed the interpolations.

    Import fl.motion.Animator;
    "var grass_xml:XML = < time Motion ="50"xmlns =" "fl.motion. *" xmlns:geom = "flash.geom. *" xmlns:filters = "flash.filters. *" >
    < source >
    < source frameRate = '24' x = "646.65" y = '138.15' = '1' = '1' rotation scaleY scaleX = '0' elementType = "chart" NomSymbole = 'Tween 9' >
    < size >
    < geom:Rectangle left = "-657.85" top = "-194.1" width = "1519.4" height = "678.7" / >
    < / size >
    < transformationPoint >
    < geom:Point = "0.4329669606423588" x = "0.2859879180786798" / >
    < / transformationPoint >
    < / source >
    < / source >

    < keyframe index = "0" tweenSnap = "true" >
    <>interpolation
    < SimpleEase ease = '0' / >
    < / tweens >
    < / keyframe >

    < keyframe index = "49" x = "-1021.8" / >
    < / motion >;

    var grass_animator:Animator = new Animator (grass_xml, grass);
    grass_animator. Play();

    How can I loop which so the animation continues to run, because at present it only runs once.

    Thank you

    var myTimer:Timer = new Timer (1000); 1 second

    var grass_animator:Animator = new Animator (grass_xml, grass);

    or some other function init

    public function onLoad(): void {}

    myTimer.addEventListener (TimerEvent.TIMER, timerTask);

    myTimer.start ();

    }

    public void timerTask(event:TimerEvent):void {}

    grass_animator. Play();

    }

  • Any ideas how to fix this code error: declaration of property not valid css to *.

    My mac guard getting hung up on some websites here, that's what appears on the Console error: declaration of property not valid css to the * and then cl css and about 4 numbers.

    Any ideas what's happening?

    Poorly coded Web page. What site?

  • Current month data: Help needed to change this code a return procedure

    Hello people I this scenario where I need to change the code so that there return data compared to the month current day to the day before if it's a daily report and data from the months preceding it is a monthly report.
    I have no idea how to change this code below. Currently the code returns the data of the monthly reports for the previous month. Someone has any idea how to change so that the code meets the requirements of daily and monthly reprts.



    BEGIN

    If v_lowdate is null or v_highdate is null then
    Select to_number (to_char (sysdate, 'DD')) double v_cur_day;
    If v_cur_day < 25 may
    -It's for the month to run
    Select Add_Months (trunc (sysdate, 'MONTH'), - 1).
    IN V_LOWDATE
    FROM DUAL;

    SELECT Last_Day (ADD_Months (Sysdate-1)) INTO V_Highdate From Dual;
    on the other
    -This is for the current delivery month
    Select trunc (sysdate, 'MONTH') IN V_LOWDATE FROM DUAL;

    SELECT Last_Day (Sysdate) IN the double V_Highdate;
    end if;

    end if;




    Thank you

    Published by: user11961230 on September 30, 2009 20:34

    Hello

    The revised version of the code below, statement a daily report on every day except the 1st of the month, will include the dates of the first of the month through yesterday.
    If a daily report is requested on the 1st of the month, then it will start the 1st of the month form last through yesterday (which is the last day of the previous month, making it the equivalent of a monthly report). I've added comments in the code on the lines that check these things.

    v_cur_day := TO_CHAR (SYSDATE, 'DD');
    
    IF  report_type = 'D'                         -- Daily report
    AND v_cur_day > '01'                         -- (except when run on 1st of the month)
    THEN                                   -- will cover from
    
         v_lowdate  := TRUNC (SYSDATE, 'MONTH');          -- 1st of this month to
         v_highdate := TRUNC (SYSDATE - 1);          -- yesterday
    ELSIF  report_type = 'M'                    -- Monthly report
    OR     (     report_type = 'D'               -- (or Daily report
           AND     v_cur_day = '01'               -- if run on the 1st of the month)
           )                              -- will cover from
         v_lowdate  := ADD_MONTHS ( TRUNC (SYSDATE, 'MONTH')
                         , -1
                         );               -- 1st of last month
         v_highdate := TRUNC (SYSDATE, 'MONTH') - 1;     -- last day of last month
    END IF;
    

    The above code always makes all the previous month, a monthly report. If you decide you want to want to do the month in progress (not the previous month) when a monthly report is run the or after the 25th of the month (as your original code), then use the version below:

    v_cur_day := TO_CHAR (SYSDATE, 'DD');
    
    IF  report_type = 'D'                         -- Daily report
    AND v_cur_day > '01'                         -- (except when run on 1st of the month)
    THEN                                   -- will cover from
    
         v_lowdate  := TRUNC (SYSDATE, 'MONTH');          -- 1st of this month to
         v_highdate := TRUNC (SYSDATE - 1);          -- yesterday.
    ELSIF  (     report_type = 'M'               -- Monthly report
           AND     v_cur_day <= '24'               -- (if run between the 1st and 24th,
    OR     (     report_type = 'D'               -- or Daily report
           AND     v_cur_day = '01'               -- if run on the 1st of the month)
           )                              -- will cover from
         v_lowdate  := ADD_MONTHS ( TRUNC (SYSDATE, 'MONTH')
                         , -1
                         );               -- 1st of last month to
         v_highdate := TRUNC (SYSDATE, 'MONTH') - 1;     -- last day of last month.
    ELSIF  (     report_type = 'M'               -- Monthly report
           AND     v_cur_day >= '25'               -- (if run on or after the 25th of the month)
           )                              -- will cover from
    THEN
         v_lowdate  := TRUNC (SYSDATE, 'MONTH');          -- 1st of this month to
         v_highdate := LAST_DAY (TRUNC (SYSDATE));     -- last day of this month
    END IF;
    
  • How to optimize the performance of this code?

    I have two clips on a flash project. One of them is fixed and the other can be moved with the arrow keys of the keyboard. The two clips have irregular shapes, so HitTestObject and HitTestPoint does not work very well. I have a function that detects the collision of two clips using bitmap. I wanted to update the position of the Movie clip mobile so I put the function of collision detection under the ENTER_FRAME event listener code. It works fine, but when I add many fixed film clips (about 10 clips fixed in an image), the game (.swf file) becomes slower and slows down the performance of the PC. I thought that my collision detection function has a negative effect on the performance of the PC, so I used the class on this page: https://forums.adobe.com/thread/873737
    but the same thing happens.

    You told me how to do to speed up execution of my codes?

    Here's the part of my code:

    stage.addEventListener (Event.ENTER_FRAME, myOnEnterFrame);

    function myOnEnterFrame(event:Event):void

    {

    If (doThisFn) / / doThisFn is a variable to allow or prevent the kind of mobile film clip moved with arrow keys

    {

    If (left & &! right) {}

    Player.x = speed;

    Player.rotation = player.rotation - speed;

    }

    If (right & &! left) {}

    Player.x += speed;

    Player.rotation = player.rotation + speed;

    }

    If (up & &! down) {}

    Player.y = speed;

    }

    If (down & &! up) {}

    Player.y += speed;

    }

    The clips of film sets are wall1, wall2, wall3, wall4,... and so on
    the following code checks to see how many walls exist on each image and pushes them in table wallA

    for (var i: int = 0; i < 1000; i ++) / / you can put up to 1000 object of wall in the table wallA

    {

    If (this ['wall' + i]) / / if the wall object exists, push it into the table wallA

    {

    wallA.push (this, ['wall' + i]);

    }

    }

    for (i = 0; i < wallA.length; i ++)

    {

    If ( h.hitF (player, wallA [i]) | gameOverTest) / / this code checks whether or not the player (the mobile clip) hit the walls

    {

    trace ("second try");

    gameOver.visible = true;

    doThisFn = false;

    }

    }

    I think the following codes are easy to turn and run. I think that the performance problem is due to previous codes.


    If (player.hitTestObject (door))

    {

    Win.Visible = true;

    doThisFn = false;

    }

    If (key) / / if there is a key on chassis

    {

    If (player.hitTestObject (key))

    {

    Key.Visible = false;

    switch (currentFrame)

    {

    case 4:

    wallA [0] .visible = false;

    .x wallA [0] = 50000;

    break;

    case 5:

    wall14. Play();

    wall8.x = 430;

    break;

    }

    }

    }

    }

    }

    It's a simple question that doesn't usually have a simple answer.

    Here is an excerpt of a book (Flash game development: in a Social, Mobile and 3D world) I wrote.

    Optimization techniques

    Unfortunately, I don't know any way completely satisfactory to organize this information. In what follows, I discuss memory management first with sub-themes listed in alphabetical order. Then I discuss the management of CPU/GPU with subheadings listed in alphabetical order.

    This may sound logical, but at least, there are two problems with this organization.

    1. I don't think it's the most useful way to organize this information.

    2. memory management affects the CPU/GPU use, so that everything in the section of memory management can also be listed in the section CPU/GPU.

    In any case, I'll also list information in two other ways, from the easiest to the most difficult to implement and more for much less.

    Two of these later inscriptions are subjective and dependent on experience developer and capabilities, as well as environmental test and the test situation. I very much doubt there would be a consensus on the order of these lists.  However, I think that they are still valid.

    Easier to the more difficult to implement

    1. do not use the filters.

    2. always use the reverse for loops and avoid loops and avoid while loops.

    3. explicitly stop timers for their loan for gc (garbage collection).

    4. use the weak event listeners and remove headphones.

    5. strictly type variable when possible.

    6. explicitly disable interactivity mouse when interactivity smile not necessary.

    7. replace dispatchEvents with callback functions whenever possible.

    8 it would be gc stop sounds for the sounds and SoundChannels.

    9. use the DisplayObject most basic need.

    10. always use cacheAsBitmap and cacheAsBitmapMatrix with air applications (i.e., mobile).

    11. reuse of objects when possible.

    12 Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.

    13. the pool instead of creating objects and gc objects ' ing.

    14. use partial blitting.

    15. use step blitting.

    16 use Stage3D

    Biggest advantage less

    1. Use the blitting Stadium (if there is enough memory system).
    2. Use Stage3D.
    3. Use partial blitting.
    4. Use cacheAsBitmap and cacheAsBitmapMatrix with mobile devices.
    5. Disable explicitly interactivity mouse when interactivity smile not necessary.
    6. Do not use filters.
    7. Use the most basic necessary DisplayObject.
    8. Reuse objects whenever possible.
    9. Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.
    10. Use reverse for loops and avoid the do loops and while loops.
    11. The pool instead of creating objects and gc'ing.
    12. Strictly, type variable when possible.
    13. Use weak event listeners and remove headphones.
    14. Replace dispatchEvents by the callback functions whenever possible.
    15. Explicitly stop timers on loan for the gc.

    16 stop sounds for the sounds and SoundChannels be gc would be.

  • I think someone is sneaking my iphone 6 s. they ve probably take my IMEI code... could someone tell me how to stop this please?

    Hello!

    I would like to ask how to stop my iphone sneak? I have an iphone 6 s. I bought it out of my country and I can't send it back. I think someone took my IMEI code and everything now can be seen on my iphone. Please could you help me how to stop this?

    I already did a reset completely, but I don't know if it's useful.

    Thank you!

    The phone is jailbroken?

    You share an Apple ID with anyone?

  • My Vista system trying to download the updates, and it does not complete the download. It is up to "Windowsupdate_00000646" and "windowsupdate_dt000" How do I clear this code to receive these updates?

    My Vista system trying to download the updates, and it does not complete the download. It is up to "Windowsupdate_00000646" and "windowsupdate_dt000" How do I clear this code to receive these updates?

    They are only updated office or all updates?

    For Office updates, usually to pick up the item at the: http://www.microsoft.com/downloads/en/default.aspx

    then manually download and install the same.

    If all updates, perhaps consider the following general tips-

    Option: File of Windows Update agent wups2.dll is incorrectly registered and the registry associated with the Wups2.dll file files are missing.

    Method 1: Save the Windows Update files

    1. Click Start and type notepad in the box start the search.
    2. click on Notepad in the list programs.
    3. copy the following commands, and then paste them into the opened Notepad window:
    REGSVR32 WUPS2. DLL/S
    REGSVR32 STINKS. DLL/S
    REGSVR32 WUAUENG. DLL/S
    REGSVR32 WUAPI. DLL/S
    REGSVR32 WUCLTUX. DLL/S
    REGSVR32 WUWEBV. DLL/S
    REGSVR32 JSCRIPT. DLL/S
    REGSVR32 MSXML3. DLL/S
    4. in Notepad, on the file menu, click Save as.
    5. in the file type list, click all files.
    6. in the file name box, type register.bat.
    7. save the Register.bat file to your desktop.
    8 right-click the Register.bat file, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password or click on continue.
    9. try to reinstall updates.

    http://support.Microsoft.com/kb/958053
    See: method 1: save the Windows Update files

    http://support.Microsoft.com/kb/326253
    Method 5: Registry Windows Update engine files

    http://support.Microsoft.com/kb/971058
    How to reset the Windows Update components?

    Method 2: Download and install Windows Update agent

    Windows Update Agent

    How to get the latest version of the Windows Update Agent to help manage updates on a computer
    http://support.Microsoft.com/kb/949104

    Information for network administrators about how to obtain the latest Windows Update Agent
    http://support.Microsoft.com/kb/946928

    Click Start, click run, click Browse, navigate to the file you saved and click Open.

    Add the switch /wuforce at the end of the command run and then click OK. For example, the command run might look like this: "C:\WindowsUpdateAgent30-x86.exe" /wuforce

    Click run.

    Follow the steps to complete the wizard.

    Important

    To reinstall Windows Update Agent - download the relevant file from one of the links provided above and save it to a drive where Vista is not loaded because the file cannot be launched directly from the root directory of the system.

    Click Start, run, type: "D:\WindowsUpdateAgent30-x86.exe /wuforce" (without the quotes) and press ENTER to install the Windows Update engine.

    Note: There is a space between "D:\WindowsUpdateAgent30-x86.exe" and "/ wuforce.

    D: is the drive where Windows is not installed (IE a flash drive or a 2nd hard drive etc.)

    TaurArian [MVP] 2005-2010 - Update Services

  • My computer has an operating system of windows vista Home premium 64-bit. When I try to get updates, there is a message error code: 8000-ffff. How to solve this problem?

    My computer has Windows Vista Home Premium 64 - bit operating system.  When I try to get updates, there is an Error Message Code 8000 ffff.  How fix/resolve this problem?

    Error when you download updates using Windows Update or Microsoft Update: 8000FFFF
    http://support.Microsoft.com/kb/946414

    How to reset the Windows Update components?
    [Launch the difficulty mode by default and aggressive , if necessary]
    http://support.Microsoft.com/kb/971058
    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I have a Canon MG6120. When I start it up I get the error code 5050. Does anyone know how to fix this?

    I have a Canon MG6120 all-in-one. When I start it up I get the error code 5050. Does anyone know how to solve this, more power to the wide / power?

    Hello gregg.

    Please, try the following to see if we can solve your problem:

    1. turn off the printer.

    2 disconnect the power from the printer for at least 5-10 minutes.

    3. once unplugged, remove any paper from the device.

    4. check for obstructions in the paths of the unit or the paper.

    5 If no obstacles are, plug the power back in and switch on the device.

    If the problem persists, the unit will require repairs for the correction.  We apologize for the inconvenience.  Please contact our support group using the 'Contact us' below for further assistance.

    It has not responded to your question or problem? Find more help at the Contact Us.

Maybe you are looking for

  • Driver issue Microsoft Virtual Wifi Miniport Adapter (error code 31)

    My map of Microsoft virtual Miniport is not up-to-date (it says this when I try to connect wirelessly to something and when I view it in Device Manager, it also has a caveat next to him) and when I went to install in Windows update, it has failed sev

  • Vista fails

    I have an old Dell laptop on Vista, 32-bit. Recently, he developed the 'local only' quirkiness and none of the fixes work. There is a recovery partition. Can I just wipe, restore, reinstall the OS from scratch and - if I - I'll be able to update all

  • Help with presentation of VPN public ip to the customer

    Currently we have our vpn Setup so that they can talk side by side lan lan. ATT: contains relevant parts of the structure of vpn that work between offices. We now have a private customer that we need to configure a tunnel that will not address privat

  • cannot use the Lifecam VX-700 to just take pictures

    I got the Lifecam VX-700 for Christmas and it works when I use it on myspace, and tumblr, but I can't use it to just take pictures unless I'm on a Messenger or a social network. Can anyone help? I have Windows 7 32-bit, but it was the same thing when

  • Why CC does not accept my VAT ID?

    As an entrepreneur I´d want to get VAT deducted from the price of my Adobe CC membership. However, the membership page does not accept my VAT ID in any form and I can not get the VAT deducted from the foreign property purchase price or service - whic