Pointers: more efficient method(s), styles for making unconventional UI's

i currently use mages on my custom panels to give the customized look i want for my apps. But i just can shake the feeling that there are more efficient ways to do it. i just need pointers to some materials (books, articles, documentation, etc) for some technology i can use.
thanks!

i currently use mages on my custom panels to give the customized look i want for my apps. But i just can shake the feeling that there are more efficient ways to do it. i just need pointers to some materials (books, articles, documentation, etc) for some technology i can use.
thanks!

Similar Messages

  • I need a more efficient method of transferin​g data from RT in a FP2010 to the host.

    I am currently using LV6.1.
    My host program is currently using Datasocket to read and write data to and from a Field Point 2010 system. My controls and indicators are defined as datasockets. In FP I have an RT loop talking to a communication loop using RT-FIFO's. The communication loop is using Publish to send and receive via the Datasocket indicators and controls in the host program. I am running out of bandwidth in getting data to and from the host and there is not very much data. The RT program includes 2 PID's and 2 filters. There are 10 floats going to the Host and 10 floats coming back from the Host. The desired Time Critical Loop time is 20ms. The actual loop time is about 14ms. Data is moving back and forth between Host and FP several times a second without regularity(not a problem). If I add a couple more floats each direction, the communications goes to once every several seconds(too slow).
    Is there a more efficient method of transfering data back and forth between the Host and the FP system?
    Will LV8 provide faster communications between the host and the FP system? I may have the option of moving up.
    Thanks,
    Chris

    Chris, 
    Sounds like you might be maxing out the CPU on the Fieldpoint.
    Datasocket is considered a pretty slow method of moving data between hosts and targets as it has quite a bit of overhead assosciated with it.  There are several things you could do. One, instead of using a datasocket for each float you want to transfer (which I assume you are doing), try using an array of floats and use just one datasocket transfer for the whole array.  This is often quite a bit faster than calling a publish VI for many different variables.
    Also, as Xu mentioned, using a raw TCP connection would be the fastest way to move data.  I would recommend taking a look at the TCP examples that ship with LabVIEW to see how to effectively use these. 
    LabVIEW 8 introduced the shared variable, which when network enabled, makes data transfer very simple and is quite a bit faster than a comparable datasocket transfer.  While faster than datasocket, they are still slower than just flat out using a raw TCP connection, but they are much more flexible.  Also, the shared variables can fucntion in the RT fifo capacity and clean up your diagram quite a bit (while maintaining the RT fifo functionality).
    Hope this helps.
    --Paul Mandeltort
    Automotive and Industrial Communications Product Marketing

  • How do I  create more than one CSS style for text links?

    Hello,
    Just like the title says, I need help with creating more than one CSS text link style in Dreamweaver CS4. For instance, I want the navigation on the website I'm building to have a different text link style than a link in some part of the body copy. I've been playing with Dreamweaver for a while and can't find any way to do this. If it's even possible to do this, I would really appreciate any help.

    Yes it is possible but as you have failed to provide a valid link to your site, I will tell you in general Terms:
    1) First create a class or an ID to to your Nav bar;
    2) Now style your navbar in such a way that these styles will only apply to your nav bar.  To do this, you start your style by doing something like this:
    ul#vavigation {.........}
    ul#navigation a {.........}
    ul#navigation a:hover {.........}
    ul#navigation li {.........}
    your html code might look like this:
    <ul id="navigation">
         <li><a href="#">Home</a></li>
         etc etc .........................
    </ul>
    hth

  • Making code more efficient

    I am having a lot of trouble getting my code to work fast enough. I have 4 sonic anemometers and currently my code is only efficient enough to collect data from one. I have programs that run 2 sonic anemometers and save the data, but bites pile up at the port. The instruments are in unprompted mode and send data at 10hz. I find that using the wait command dose not work well for some reason so I have the loop continuously running. The first version of my code (V3a) worked for one sonic and bites did not pile up at the port. So I made (V3b) and tried to make a more efficient program. I tried separating things into multiple loops but, it still does not work well and was hoping to get some ideas to make things work better.
    I attached the 2 versions of my code. I am not sure if I should attach the subVIs, let me know.
    Thanks!
    Attachments:
    fo3csat_unprompted_v3a.vi ‏23 KB
    fo3csat_unprompted_v3b.vi ‏27 KB

    I'm going to ask you a very important question about that occurrence in the top loop: by using the occurrence the way you have, have you eliminated the possibility of a race condition? The answer is NO... study it, and you'll see why. If you can't figure it out, post back and I'll tell you why the race condition is still present.
    Also, if you ever are coding and thinking to yourself, "WOW, I can't believe the guys who developed LabVIEW made it so hard to do this simple task!", odds are, you're making it hard yourself! Rather than making 4 parallel branches of a numeric, converting to an ASCII string, then reinterpreting as 4 separate numerics, consider the following code. It's nearly equivalent, except my seconds has more significant digits (maybe good, maybe not):
    I'm going to argue that even splitting the discrete components of time is unnecessary, unless your logging protocol specifically requires that format. Instead, simply write the timestamp directly to file with the data points.
    Also, remember to use a standard 4x2x2x4 connector pane on your SubVIs. Refer to the LabVIEW Style Guide (search, and you will find it).
    Finally, I'm going to disagree with the other guys, it's not evident why you split the one loop into three loops. The only "producer/consumer" architecture has the top loop as the "producer", and all it's producing is a timestamp! This is not a typical or intended use of the producer/consumer architecture. Your VI is intended to only save a data point once every 30 minutes (presumably), so it's no big deal of both of your serial devices are in the same loop.
    The single biggest problem why your VI is completely railing out a CPU core (you didn't state this, but I'm guessing the reason you posting is because you noticed a core running at 100%!) is the unmetered loop rate... like the other guys say, drop a "Wait Until Next ms Multiple" and slow the loop rate down significantly. 10msec is probably too fast for your application.... actually, a loop rate of once every 30 minutes (that's 1800000msec) might be best.
    Let us know how it goes!
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • IFRAME into iMOVIE - most efficient method for importing?

    What would be the most efficient method for importing iFrame movies from a camera into iMovie?
    iFrame i suppose to save time and work more efficiently in lue of quality but I don't seem to find I way to import the movies faster than in other formats.
    On a second note, inporting in iMovie from DV (tape) cameras dramaticly reduced the image quality. Do we still have the same issue when importing an iFrame movie?
    Thank you for your help!

    Im completly new myself to importing IFRAME into Imovie 11 as i only got my new Panasonic X920 Camcorder 2 days ago.Can you please tell me is there a big drop in quality from 1080 60p to IFRAME Quality.

  • More than one entity found for a single-object find method

    Hi everyone...
    I have this error when my webservice is running..I don't know what it means and what would be the best solution..
    <pns:message>More than one entity found for a single-object find method.</pns:message>
    it throws an Exception..
    Thanks!

    = More than one row found in a DB with the "unique" key supplied...
    Your method is returning an object where it should return a collection ?
    Enjoy

  • More than one style for a single link state?

    RH 8 outputting CHM
    Hello,
    Is it possible to define more than one style for a single link state?
    For example, I would like a link in the footer of my master page to be smaller than the links that appear in the body of my topics. I want to retain behavior, and simply change the point size.
    I can't simply hand format in Design mode, because my link is within a script. Or, am I missing something easy here?
    Thanks much.

    I'm pleased to say I figured out how to change the formatting of a hyperlink embedded within a script.
    Within the script, I used a var string to reproduce the text in my link. Then I used another var to change the string size.
    So, here's the part of my script that produces what I'm after:
    var mailDisplay = 'Was this information helpful? ';
    var str = 'Was this information helpful?';
    var mailDisplay = str.fontsize("1");
    Upon generation of the CHM, the script trumps the CSS. It's a beautiful thing.

  • [svn:fx-trunk] 10006: Initial checkin of the "More styles for Spark skins" feature.

    Revision: 10006
    Author:   [email protected]
    Date:     2009-09-03 15:04:47 -0700 (Thu, 03 Sep 2009)
    Log Message:
    Initial checkin of the "More styles for Spark skins" feature. Details here:
    http://opensource.adobe.com/wiki/display/flexsdk/MoreStylesforSparkSkins
    There are some known issues:
    Panel bottom corners not rounded correctly when the panel has a control bar
    cornerRadius on Tab and DateChooser non functional
    cornerRadius values > 4 have drawing artifacts in the "down" state of Button and button-like components
    TextInput/TextArea incorrectly list lineBreak and verticalAlign as valid styles
    This checkin also includes a couple minor unrelated bug fixes:
    Remove MiniDebugTarget. This is a logging target that used MiniDebug, which hasn't worked since Flex 1.5
    Fix RTEs when setting focusSkin to null
    Optimization: don't measure skins if the host component has explicit sizes
    QE notes: Yes, many baseline images will need to be regenerated
    Doc notes: New ASDoc comments should be scrubbed
    Bugs: SDK-22931, SDK-22798, SDK-22217, SDK-19358
    Reviewer: Jason
    Tests run: checkintests, cyclone
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22931
        http://bugs.adobe.com/jira/browse/SDK-22798
        http://bugs.adobe.com/jira/browse/SDK-22217
        http://bugs.adobe.com/jira/browse/SDK-19358
    Modified Paths:
        flex/sdk/trunk/frameworks/halo-manifest.xml
        flex/sdk/trunk/frameworks/mxml-manifest.xml
        flex/sdk/trunk/frameworks/projects/airframework/defaults.css
        flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as
        flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication. as
        flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowed ApplicationSkin.mxml
        flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/WindowedApplication Skin.mxml
        flex/sdk/trunk/frameworks/projects/framework/defaults.css
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as
        flex/sdk/trunk/frameworks/projects/spark/defaults.css
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.a s
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableCom ponent.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTex tBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/SparkSkin.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ApplicationSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonBarFirstButtonSkin.m xml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonBarLastButtonSkin.mx ml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultButtonSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListButtonSkin.mxm l
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/NumericStepperTextInputSki n.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SpinnerDecrementButtonSkin .mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SpinnerIncrementButtonSkin .mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextInputSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/BorderSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ButtonBarFirstButtonSkin .mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ButtonBarLastButtonSkin. mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ButtonSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ComboBoxSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/DefaultButtonSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/EditableComboBoxSkin.mxm l
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/PanelBorderSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/PopUpButtonSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/SparkSkinForHalo.as
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperDecrButtonSkin.mx ml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperIncrButtonSkin.mx ml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/TextInputBorderSkin.mxml
        flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ApplicationSkin.mx ml
        flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.css
        flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/BorderTestScript.mxml
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/targets/MiniDebugTarget.as

    Gordon, it looks like its been a while since you made this post.  Not sure how valid it is now...   I am particularly interested in the LigatureLevel.NONE value.  It seems that it is no longer supported.
    How do I turn of ligatures in the font rendering?
    My flex project involves trying to match the font rendering of Apache's Batik rendering of SVG and ligatures have been turned off in that codebase.  Is there any way (even roundabout) to turn ligatures off in flash?
    Thanks,
    Om

  • Suggests for a more efficient query?

    I have a client (customer) that uses a 3rd party software to display graphs of their systems. The clients are constantly asking me (the DBA consultant) to fix the database so it runs faster. I've done as much tuning as I can on the database side. It's now time to address the application issues. The good news is my client is the 4th largest customer of this 3rd party software and the software company has listened and responded in the past to suggestions.
    All of the tables are setup the same with the first column being a DATE datatype and the remaining columns are values for different data points (data_col1, data_col2, etc.). Oh, that first date column is always named "timestamp" in LOWER case so got to use double quotes around that column name all of the time. Each table collects one record per minute per day per year. There are 4 database systems, about 150 tables per system, averaging 20 data columns per table. I did partition each table by month and added a local index on the "timestamp" column. That brought the full table scans down to full partition index scans.
    All of the SELECT queries look like the following with changes in the column name, table name and date ranges. (Yes, we will be addressing the issue of incorporating bind variables for the dates with the software provider.)
    Can anyone suggest a more efficient query? I've been trying some analytic function queries but haven't come up with the correct results yet.
    SELECT "timestamp" AS "timestamp", "DATA_COL1" AS "DATA_COL1"
    FROM "T_TABLE"
    WHERE "timestamp" >=
    (SELECT MIN("tb"."timestamp") AS "timestamp"
    FROM (SELECT MAX("timestamp") AS "timestamp"
    FROM "T_TABLE"
    WHERE "timestamp" <
    TO_DATE('2006-01-21 00:12:39', 'YYYY-MM-DD HH24:MI:SS')
    UNION
    SELECT MIN("timestamp")
    FROM "T_TABLE"
    WHERE "timestamp" >=
    TO_DATE('2006-01-21 00:12:39', 'YYYY-MM-DD HH24:MI:SS')) "tb"
    WHERE NOT "timestamp" IS NULL)
    AND "timestamp" <=
    (SELECT MAX("tb"."timestamp") AS "timestamp"
    FROM (SELECT MIN("timestamp") AS "timestamp"
    FROM "T_TABLE"
    WHERE "timestamp" >
    TO_DATE('2006-01-21 12:12:39', 'YYYY-MM-DD HH24:MI:SS')
    UNION
    SELECT MAX("timestamp")
    FROM "T_TABLE"
    WHERE "timestamp" <=
    TO_DATE('2006-01-21 12:12:39', 'YYYY-MM-DD HH24:MI:SS')) "tb"
    WHERE NOT "timestamp" IS NULL)
    ORDER BY "timestamp"
    Here are the queries for a sample table to test with:
    CREATE TABLE T_TABLE
    ( "timestamp" DATE,
    DATA_COL1 NUMBER
    INSERT INTO T_TABLE
    (SELECT TO_DATE('01/20/2006', 'MM/DD/YYYY') + (LEVEL-1) * 1/1440,
    LEVEL * 0.1
    FROM dual CONNECT BY 1=1
    AND LEVEL <= (TO_DATE('01/25/2006','MM/DD/YYYY') - TO_DATE('01/20/2006', 'MM/DD/YYYY'))*1440)
    Thanks.

    No need for analytic functions here (they’ll likely be slower).
    1. No need for UNION ... use UNION ALL.
    2. No need for <quote>WHERE NOT "timestamp" IS NULL</quote> … the MIN and MAX will take care of nulls.
    3. Ask if they really need the data sorted … the s/w with the graphs may do its own sorting
    … in which case take the ORDER BY out too.
    4. Make sure to have indexes on "timestamp".
    What you want to see for those innermost MAX/MIN subqueries are executions like:
    03:19:12 session_148> SELECT MAX(ts) AS ts
    03:19:14   2  FROM "T_TABLE"
    03:19:14   3  WHERE ts < TO_DATE('2006-01-21 00:12:39', 'YYYY-MM-DD HH24:MI:SS');
    TS
    21-jan-2006 00:12:00
    Execution Plan
       0   SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2.0013301108 Card=1 Bytes=9)
       1    0   SORT (AGGREGATE)
       2    1     FIRST ROW (Cost=2.0013301108 Card=1453 Bytes=13077)
       3    2       INDEX (RANGE SCAN (MIN/MAX))OF 'T_IDX' (INDEX) (Cost=2.0013301108 Card=1453 Bytes=13077)

  • [svn:fx-trunk] 10024: Fix regressions from "More styles for Spark skins" checkin.

    Revision: 10024
    Author:   [email protected]
    Date:     2009-09-04 10:13:32 -0700 (Fri, 04 Sep 2009)
    Log Message:
    Fix regressions from "More styles for Spark skins" checkin.
    Remove redundant Group tag from BorderSkin
    Support borderStyle="none" for TextInputBorderSkin
    Made BorderSkin work correctly when borderStyle="none" and contentBackgroundColor is set
    QE notes: This should clean up a bunch of mustella failures
    Doc notes: None
    Bugs: SDK-23004, SDK-23008, SDK-23011
    Reviewer: Corey
    Tests run: checkintests, basictests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23004
        http://bugs.adobe.com/jira/browse/SDK-23008
        http://bugs.adobe.com/jira/browse/SDK-23011
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/BorderSkin.mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/TextInputBorderSkin.mxml

  • Making Sound More Efficient

    I got this code to play some audio clips and it works alright. The only issue is that when I call the play method it lags the rest of my game pretty badly. Is there anything in the play method you guys think could be moved to the constructor to make it more efficient?
    btw I know I posted this in the sound section already but it had like 17 views there and no responses after like a week on the front page so I decided to bring it here.
    package main;
    import java.io.*;
    import javax.sound.sampled.*;
    public class Sound
         private AudioFormat format;
        private byte[] samples;
        private String name;
         public Sound(String filename)
              name=filename;
              try
                AudioInputStream stream =AudioSystem.getAudioInputStream(new File("sounds/"+filename));
                format = stream.getFormat();
                samples = getSamples(stream);
            }catch (Exception e){System.out.println(e);}
         public byte[] getSamples()
            return samples;
        private byte[] getSamples(AudioInputStream audioStream)
            int length=(int)(audioStream.getFrameLength()*format.getFrameSize());
            byte[] samples = new byte[length];
            DataInputStream is = new DataInputStream(audioStream);
            try
                is.readFully(samples);
            }catch (Exception e){System.out.println(e);}
            return samples;
        public void play()
             InputStream stream =new ByteArrayInputStream(getSamples());
            int bufferSize = format.getFrameSize()*Math.round(format.getSampleRate() / 10);
            byte[] buffer = new byte[bufferSize];
            SourceDataLine line;
            try
                DataLine.Info info=new DataLine.Info(SourceDataLine.class, format);
                line=(SourceDataLine)AudioSystem.getLine(info);
                line.open(format, bufferSize);
            }catch (Exception e){System.out.println(e);return;}
            line.start();
            try
                int numBytesRead = 0;
                while (numBytesRead != -1)
                    numBytesRead =
                        stream.read(buffer, 0, buffer.length);
                    if (numBytesRead != -1)
                       line.write(buffer, 0, numBytesRead);
            }catch (Exception e){System.out.println(e);}
            line.drain();
            line.close();
        public String getName()
             return name;
    }

    BammRocket wrote:
    I got this code to play some audio clips and it works alright. The only issue is that when I call the play method it lags the rest of my game pretty badly. Is there anything in the play method you guys think could be moved to the constructor to make it more efficient?you got this code from chapter 4 of [Developing Games in Java|http://www.brackeen.com/javagamebook/] right?
    are you playing the sounds in a different thread?
    if not, your program will just freeze until the sound is finished.

  • Using "Next style" with the same paragraph style for more than one paragraph

    Hi.
    I have been using paragraph styles with the "next style" option, it's a huge help. But I need a bit more. So I have the following paragraph structure: ABCCCABCCCAB...
    I defined paragraph styles for each kind of paragraph, then in paragraph style A, I added paragraph style B as the next style, and so on. However, when I get to paragraph style C I reach a dilemma. Should I define the next style as the same, or define three paragraph C styles (C1, C2 and C3), link them to each other with next style, and then loop the C3 style into the A style again?
    My hope is that there is a way, something like the nested style options, that allows me to define that style C should be used for 3 paragraphs and then the next style becomes style A again.
    Thanks.

    You just need two styles, almost identical, you can duplicate one.  The only
    difference is one has the next paragraph c and one has the next paragraph
    a.  After that I don't see the problem.

  • Making it more efficient

    I will be using this function
                   private function inter_1a(evt:MouseEvent):void {
                    var popUpInterDisplay:interactionexporter;
                    popUpInterDisplay = new interactionexporter();
                    popUpInterDisplay.source = "lessons/lessonone/interactions/inter1a.swf";
                    PopUpManager.addPopUp(popUpInterDisplay, this, true);
    But will use it at least 30 times. For example:
                   private function inter_1b(evt:MouseEvent):void {
                    var popUpInterDisplay:interactionexporter;
                    popUpInterDisplay = new interactionexporter();
                    popUpInterDisplay.source = "lessons/lessonone/interactions/inter1b.swf";
                    PopUpManager.addPopUp(popUpInterDisplay, this, true);
               private function inter_1c(evt:MouseEvent):void {
                     var popUpInterDisplay:interactionexporter;
                     popUpInterDisplay = new interactionexporter();
                     popUpInterDisplay.source = "lessons/lessonone/interactions/inter1c.swf";
                     PopUpManager.addPopUp(popUpInterDisplay, this, true);
        ETC......
    Any ideas as to make this more efficient?
    Thanks

    This can be written more efficient indeed. How are these functions called, by Buttons or by an item in a datagrid?
    In case it are buttons, you can store the name of the swf in their id properties:
    private function inter(evt:MouseEvent):void
          var popUpInterDisplay:interactionexporter = new interactionexporter();
          popUpInterDisplay.source = "lessons/lessonone/interactions/" + evt.target.id + ".swf";
          PopUpManager.addPopUp(popUpInterDisplay, this, true);
    In case of a datagrid, you can use a property of the selectedItem:
    private function inter(evt:MouseEvent):void
           var popUpInterDisplay:interactionexporter = new interactionexporter();
           popUpInterDisplay.source = "lessons/lessonone/interactions/" + evt.currentTarget.selectedItem.propName + ".swf";
           PopUpManager.addPopUp(popUpInterDisplay, this, true);
    Dany

  • Which is more efficient for includes/imports?

    Which is more efficient?
    1) <jsp:include
    2) <%@ include file
    3) <c:import
    4) Custom tag version (tomcat 5)
    <me:header/>
    header.tag
    navigation html stuff
    Thanks,
    Karmen

    Depends...
    1) <jsp:include -- this is a runtime include. It will embed the included file at runtime.
    2) <%@ include -- this is a compile-time include. It will copy the file's contents into the JSP page when it compiles it into a servlet. Also, typcially it will not recompile the main page if the include file changes, where as #1 above will.
    3) <c:import -- ...well, I don't honestly know what this does.
    4) Custom tag -- what this does clearly depends on what the tag is written to do. But most of the time, this is just going to write some simple HTML stuff out. You could do it that way, but using 1 or 2 to include some HTML or JSP fragment files would probably be better, since it would be easier to maintain.

  • Efficient method?

    I wanted to know which of the following is an efficient method of declaring Strings.
    a) String a = new String();or
    b) String a = "";Which of the following is more efficient when declaring a larger number of String objects [say 10]?

    "" is more efficient, because the literal gets constructed at runtime and is used at every literal declaration of the same thing.
    new String() is less, because as of this writing, no optimizing compiler is allowed to optimize out object creation (because in the limit case, it still has to load the class). This may or may not be true for Strings, however, so all I can do is guess and refer you to the source code of your local jvm.
    It doesn't really matter, however. "" is much clearer in its intentions than new String(). Use ""'s for writing literals, like "HI!", and the constructor for anything else, like making a string from a char array.
    ~Cheers

Maybe you are looking for

  • Audio and video sticking and jumping after installing windows 8.1

    Hello,  I have a HP Pavilion G6 - 2292sa The product no is C1Y93EA#ABU I have recently upgraded my system from windows 8 to the windows 8.1 update. Since I updated my audio won't work properly at all. During random intervals when playing songs on itu

  • Problem in Printing ABAP Report in EP using SAP Transaction IVIEW

    Dear All, A very gud evening, I am using SAP Transaction Iview to show the ABAP Reports, But I have a Problem... How to print this report??? Please solve this issue, I have measure requirement of it from client. Thanks in Advance..

  • Sampleapp unzip password

    I'm attempting to unzip the SampleApp_Webcat.zip per the instructions in the SampleApp_Deploy_Instructions_825.pdf file. There are several files in that zip that are password encrypted. The unzip password is not Admin123. I don't find the password in

  • I keep receiving the 3030 error when trying to connect to itunes.

    I am unable to connect to itunes on my pc running Windows 7 64bit.  I have attempted every possible fix for this that I have been able to find online.  I have also deleted all antivirus software from the machine and made sure itunes is allowed throug

  • Two-computer workflow advice?

    I have a desktop Intel iMac; soon I'll have a Mac Book Pro to replace my PB G4, and it will be practical to run Aperture on both (day to day, and for traveling with the MBP). But what is the best way? If I want to import and edit images, not just vie