Is this the best it can do?

I just burned out a 12 minute movie thru IDVD and got 14 flash frames, either white, or where a photo from elsewhere pops up for a moment.
I burned an IPhoto slideshow to a Quick Time Movie, then put that into an IDVD project at Professional Quality.
What accounts for the flash frames?
If I burn this out again, am I just going to get new flash frames in different places?
I get that all this software is consumer-grade, but even consumers want a DVD that people can watch, that's the whole point isn't it?
Yikes.
D

Hi Douglas,
I was having the same issue. I have a business (http://www.itunesmylife.com) where I convert customers home videos into iTunes compatible formats so they can play them on iPod, iPhone, Mac, and Apple TV. Many of customers still wanted the DVD copies. I was getting very poor quality with my own photo slideshows and HD video content when I tried to make DVD copies. I think I finally fixed the problem.
1. From iMovie '09, I export using Quicktime with the following settings:
Compression Type: Apple Intermediate Codec
Frame Rate: Current
Compressor Preset: HDV 720p
Size: 1280 x 720 HD
Checked Preserve aspect ratio using Letterbox
Checked Deinterlace Source Video
2. I am not sure if this step is necessary but I had read in the forum that the old version of iMovie '06 had "lossless" transfer to iDVD. I import the ".MOV" file from Step 1 into iMovie '06. iMovie project settings are DV-NTSC-Widescreen.
3. After the import completes. I drag the clip to the timeline and then share directly to iDVD '09.
4. From iDVD '09, I choose profession quality and burn the image to Disk.
The DVD contained photos and video and looks terrific on HD television. Prior to this approach, the quality was very "jagged" and poor. It almost looked like the video had been "double-interlaced" which is why I think the "deinterlace" export from iMovie may have done the trick.
I hope this works for you. Let me know. I am here to help

Similar Messages

  • Shared Ball example works poorly! Is this the best FMS can do?

    I used AS2 to recreate the shared ball example ( a simplified version) but the ball is really jerky. I've set so.setFps(60) and it's just as bad. The active client is only updated when the mouse stops (the ball simply follows the mouse in my version) and the receiving client is very jerky even with swf framerate set to 60fps! Any suggestions? Or is FMS just for video (I don't plan to recreate Youtube)? I am really disappointed and frustrated.
    Thanks for any suggestions

    Thanks, Lisa, but I have tried that. The code is simple:
    connect to the server: nc = new netconnection
    nc.connect(url)
    so = SharedObject.getRemote(nc)
    so.onSync = function(list){ //update ball.xy here}
    and that's it!
    I don't know what else is there to do. It works, just very poorly. I've scoured the docs and can't seem to find any alternatives. The server performance shows mem/CPU usage so low it's not even registering. Bandwidth is also very low as the client is being tested on the development server. I've written realtime multiplayer-code using PHP that performed better! and that was on a shared hosted server that I didn't control that was "who-knows-where." Is it because I'm using the free development server? I need to impress my supervisor before I can recommend this product or we're going back to open source. I hope not because FMS is easier to code.
    Any other suggestions are welcome. Thanks

  • Adobe X PDF files converted to jpg, edited and converted back to PDF have ragged, unclear text.  I didn't have this problem with Acrobat 9 standard.  What is the remedy for this.  If this is the best I can expect, I won't be able to use X standard.

    Adobe X PDF files converted to jpg, edited and converted back to PDF have ragged, unclear text.  I didn't have this problem with Acrobat 9 standard.  What is the remedy for this.  If this is the best I can expect, I won't be able to use X standard.

    I can't imagine any worse workflow than converting to JPEG to edit text, then back to PDF. Text in a PDF is a vector thing, smooth at all resolutions. And JPEG is made for photos. EVERY conversion to JPEG and back loses quality but how much loss there is will vary.
    If you must go to an image format, try PNG.

  • Is this the best performed query?

    Hi Guys,
    Is this the best performed query or i can still improve it ?
    I am new to SQL performacne tune, please help to get best performance of the query.
    SQL> EXPLAIN PLAN SET STATEMENT_ID = 'ASH'
    2 FOR
    3 SELECT /*+ FIRST_ROWS(30) */ PSP.PatientNumber, PSP.IntakeID, U.OperationCenterCode OpCenterProcessed,
    4 PSP.ServiceCode, PSP.UOMcode, PSP.StartDt, PSP.ProvID, PSP.ExpDt, NVL(PSP.Units, 0) Units,
    5 PAS.Descript, PAS.ServiceCatID, PSP.CreatedBy AuthCreatedBy, PSP.CreatedDateTime AuthCreatedDateTime,
    6 PSP.AuthorizationID, PSP.ExtracontractReasonCode, PAS.ServiceTypeCode,
    7 NVL(PSP.ProvNotToExceedRate, 0) ProvOverrideRate,
    8 prov.ShortName ProvShortName, PSP.OverrideReasonCode, PAS.ContractProdClassId
    9 ,prov.ProvParentID ProvParentID, prov.ProvTypeCd ProvTypeCd
    10 FROM tblPatServProv psp, tblProductsAndSvcs pas, tblProv prov, tblUser u, tblGlMonthlyClose GLMC
    11 WHERE GLMC.AUTHORIZATIONID >= 239
    12 AND GLMC.AUTHORIZATIONID < 11039696
    13 AND PSP.AuthorizationID = GLMC.AUTHORIZATIONID
    14 AND PSP.Authorizationid < 11039696
    15 AND (PSP.ExpDt >= to_date('01/03/2000','MM/DD/YYYY') OR PSP.ExpDt IS NULL)
    16 AND PSP.ServiceCode = PAS.ServiceCode(+)
    17 AND prov.ProvID(+) = PSP.ProvID
    18* AND U.UserId(+) = PSP.CreatedBy
    19 /
    Explained.
    Elapsed: 00:00:00.46
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    Plan hash value: 3602678330
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 8503K| 3073M| 91 (2)| 00:00:02 |
    |* 1 | HASH JOIN RIGHT OUTER | | 8503K| 3073M| 91 (2)| 00:00:02 |
    | 2 | TABLE ACCESS FULL | TBLPRODUCTSANDSVCS | 4051 | 209K| 16 (0)| 00:00:01 |
    | 3 | NESTED LOOPS | | 31 | 6200 | 75 (2)| 00:00:01 |
    | 4 | NESTED LOOPS OUTER | | 30 | 5820 | 45 (3)| 00:00:01 |
    |* 5 | HASH JOIN RIGHT OUTER | | 30 | 4950 | 15 (7)| 00:00:01 |
    | 6 | TABLE ACCESS FULL | TBLUSER | 3444 | 58548 | 12 (0)| 00:00:01 |
    |* 7 | TABLE ACCESS FULL | TBLPATSERVPROV | 8301K| 585M| 2 (0)| 00:00:01 |
    | 8 | TABLE ACCESS BY INDEX ROWID| TBLPROV | 1 | 29 | 1 (0)| 00:00:01 |
    |* 9 | INDEX UNIQUE SCAN | PK_TBLPROV | 1 | | 0 (0)| 00:00:01 |
    |* 10 | INDEX UNIQUE SCAN | PK_W_GLMONTHLYCLOSE | 1 | 6 | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("PSP"."SERVICECODE"="PAS"."SERVICECODE"(+))
    5 - access("U"."USERID"(+)="PSP"."CREATEDBY")
    7 - filter(("PSP"."EXPDT">=TO_DATE('2000-01-03 00:00:00', 'yyyy-mm-dd hh24:mi:ss') OR
    "PSP"."EXPDT" IS NULL) AND "PSP"."AUTHORIZATIONID">=239 AND "PSP"."AUTHORIZATIONID"<11039696)
    9 - access("PROV"."PROVID"(+)="PSP"."PROVID")
    10 - access("PSP"."AUTHORIZATIONID"="GLMC"."AUTHORIZATIONID")
    filter("GLMC"."AUTHORIZATIONID">=239 AND "GLMC"."AUTHORIZATIONID"<11039696)
    28 rows selected.
    Elapsed: 00:00:00.42

    Thanks a lot for your reply.
    Here are the indexes on those tables.
    table --> TBLPATSERVPROV ---> index PK_TBLPATSERVPROV ---> column AUTHORIZATIONID
    table --> TBLPRODUCTSANDSVCS ---> index PK_TBLPRODUCTSANDSVCS ---> column SERVICECODE
    table --> TBLUSER ---> index PK_TBLUSER ---> column USERID

  • Is This The Best Way To Put iMovie Effects On An FCE Clip?

    I have often suggested to other people that they should export clips from FCE to iMovie in order to make use of certain iMovie effects that FCE can't do.
    As with most things there are several different ways of "transporting" the clips.
    Bearing in mind that we want the quickest/lossless method possible, is this the best?
    1. In the FCE Timeline double-click the clip.
    2. Select File>Export>QuickTime Movie and click "Save".
    3.Open a new iMovie Project, import the newly made QuickTime Movie clip and add the necessary effect.
    4. Back in FCE, Import the QuickTime Movie from the iMovie Project.
    Is this in fact the best way or do you know of a better/quicker one?
    Ian.

    Thanks for the confirmation, Tom.
    By "clip" I was actually meaning a few seconds of video I had chopped up on the timeline.
    What caught me out initially was when I simply highlighted the 10 second "clip" and selected QuickTime Movie.
    The estimated time for conversion was around 10 minutes! It was actually making a QT Movie of the complete Sequence, not just the selected "clip". I soon realised that the "clip" needed double-clicking to ensure that only the required 10 seconds were converted.
    Ian.

  • Is this the best deal Im going to get from Apple (UK) online store?

    Ok looking to buy my 1st ever iMac,
    At moment if your a teacher (my sister is-is it ok to use her as the contact for buying in educational but still use my credit card to buy the iMac?) you can get the normal educational discount (about £50 (UK) off a £799 iMac) plus at moment you also get a free 4Gb new Nano - until the 30th Oct
    Is this the best sort of deal Im goona get? I know Apple stuff is normally rigid in its prices, do you think there will be any better deals coming before Xmas? what about in the past has there been?
    also I noticed Quidco are offering 4% commision so this is another approx £32 Uk I would get back as well with my extras I would want (320Gb HDD+wireless mouse)
    sorry for the long post but please help
    thanks
    Message was edited by: the loc-man

    Amigo, the bottom line is that you are asking the wrong folks. Obviously no one here has experience buying from Apple with the jockeying around that you need to afford the purchase. In the end it is up to Apple. If the sale doesn't go through on the Apple Store website in her name on your bank card, then you may need other arrangements.
    My experience with Apple is that if you are honest with them, they are honest with you. The education discount is to help students and teachers afford computers. It isn't so someone who qualifies can buy computers for all their relatives. Which is why there is an annual limit on how much is allowed for purchase to each person who qualifies for the discount
    Good luck.

  • Cfqueryparam numeric help - is this the best way

    I have an update in one of my programs and I'm using the
    cfqueryparam. It works fine if the value is not entered since the
    type is cf_sql_varchar. If the value is cf_sql_integer/cf_sql_float
    and the field is required, it again works fine. Now if the field is
    cf_sql_integer and not required, it will throw an error if no value
    is passed to it. I tried using the NULL parameter, but that will
    put NULL in the field every time. I finally ended up using a cfif
    statement to check. Is this the best way? Am I missing something?
    How do others handle this?

    Your's is as good a way as any. But since you asked, my
    approach is usually like this:
    Step 1, build a string variable called sql. Perform all your
    if/else and other logic at this step.
    Step 2
    <cfquery>
    #PreserveSingleQuotes(sql)#
    </cfquery>
    My method makes it almost impossible to use cfqueryparam
    because of all the quotes. However, I find it easier to develop,
    read, and maintain code when you have as much if/else, loop, etc
    processing in the same block of code.
    You might be able to do both. Something like
    Step 1 - use if/else logic to set a variable (call it null)
    to either yes or no.
    Step 2
    cfqueryparam null="#null#">
    I've never actually tried. Most of my work is with a db that
    does not support cfqueryparam so using it is not a high priority
    item for me.

  • Is this the best Adobe e-Learning can do?

    Please hold as we route your chat to an Adobe Representative.
    Welcome to Adobe.com! My name is Carol. May I assist you with your selection today?
    Carol: Hi, How are you doing today?
    Ann: At this point a little on the cranky side.
    Ann: I would like to place a complaint
    Ann: several
    Ann: are you still here?
    Carol: Ann, I'm sorry to hear that, since I'm online with you let me help you with any information you need.
    Carol: Also I'm sorry for the delay.
    Carol: Please go ahead, how can I assist you?
    Ann: I was told by one of your people +36204 that you might not be able to assist, but I will run it by you anyway. The angering part is that she didn't follow-up with an email as promised, and then I had to wait 53 minutes and I got the same person, and then she hung-up on me, and now we are here ... the problem OTHERWISE is ...
    Carol: Ann, was it on call or was it on chat?
    Ann: I purchased an Adobe Captivate about one month ago, because it was the best I could do in that I wanted REALLY the Adobe e-learning 6 suite, but I was told by customer service they had no idea when it was coming out. Because there was no time limit ... I took the adobe captivate by itself for about $300 and then the next few days later the new product came out ... I want the new e-learning but I think I should have $300 off because I'm duplicating the Captivate ... AND the woman - she was a call then stated that there was student pricing for e-learning and that it was $599 ... I did a LOT of research and KNEW it wasn't a student price. She asked for proof ... I know have that proof
    Ann: I'm on disabilty ... I'm trying to work my way up in school. And, I don't have enough money to support a terrible program if you are not able to work with me. THIS is why I want to register a formal complaint
    Carol: Ann, I'm sorry for the inconvenience caused to you.
    Ann: are you still responding
    Carol: I'm here, checking an option with my supervisor.
    Ann: thank you
    Carol: Ann, thank you for staying online.
    Ann: I waited last time on phone for 53 minutes to be hung-up on ... I can wait a little longer
    Carol: I understand your concern. I checked and see that you can register a formal complaint in the forum where all issue are discussed with us.
    Carol: I'll provide you a link where you can login and  check the details.
    Carol: Please click here.
    Ann: This then seems like the process for reporting a problem. Fine I will use the resource, what about the problem of overpaying for a duplicate program?
    Carol: Ann, I request you to check with our customer service team at 1-800-833-6687 from Monday to Friday 5:00 am to 7:00 pm PST.
    Carol: They'll check and help you with necessary information on that.
    Ann: THAT is the ONE who GAVE me the OTHER problem!
    Carol: I'm sorry to hear that.
    Ann: I know if I call that number and ask for that option I will get hung-up on like the last time ... I have no guarantee it will happen any differently or the same person wouldn't pick-up and connect me to the right people
    Ann: If you are sales, why can't you help me with a sales querie?
    Carol: Ann, I'm from online sales  chat support team and I do not have an access to your previous purchase nor I can issue any refund or difference amount which you've paid earlier.
    Carol: *for the software earlier.
    Carol: I can only guide our customer to choose correct product of their needs and guide them through order process by providing a link being from online sales chat support team.
    Ann: please give me the link I need for refund of product.
    Carol: As per Adobe return policy our customer who has purchased Adobe product can return product for refund only within 30 days. If you've exceeded the return time frame you'll not be eligible for refund.
    Ann: Oh Lordy.
    Carol: Please click here to view more information
    Ann: You are in my disfavor ... you are following your process, but you have NOT been helpful
    Carol: I'm trying my best to help you with a resolution.
    Carol: Could you please tell me when did you buy the product?
    Ann: Is there anything you can help me with other than lying down a total of $599 when I've already paid $300?
    Ann: July 16, 2012. Obviously I hadn't been aware of a 30 day policy ... I was too angry and frustrated to even look at your site. I turned from a position of Oh my Gosh I love this company ... to I hope never to work with them again
    Ann: It's a bad policy arrangement to not tell customers who ask directly that the new product is going to launch 2-3 days later ... It's a bad policy decision to not give them ANY kind of date to assess reasonable wait time
    Ann: Obviously, people in the company knew it was going to be released
    Carol: I understand. I apologize on behalf of our representatives who misguided you with the wrong information on your previous chat.
    Carol: Ann, I wish I could issue a coupon or discount or initiate a refund on this live chat, however, we do not have an access. I'm really sorry for that.
    Carol: Once you contact our customer service team on phone they'll guide you and help you with alternate solution to resolve this issue.
    Ann: your customer service person stated she was going to send a contact information ... and she did not.
    Ann: what kind of alternate solution is that?
    Ann: I do appreciate you can see that I'm very frustrated
    Ann: the second time I contacted her she hung up ... why do you think giving me an option of calling her a third time would be a good decision?
    Carol: I understand how frustrating it would be, however, I'd like you to try once more. You might get connected with our other representatives who will help you to resolve this issue.
    Ann: How would you like to end this conversation we are having? It is circular and unhelpful ... I've not gone any distance further, but to be more frustrated at you telling me to do what already has proven not to work.
    Carol: Ann, I wish I could help you on this chat, however, I'm helpless at this moment since we don't have any access on this chat being a sales representative.
    Carol: Your issue will be resolved only by contacting our customer service team.
    Ann: Thank you for your service ... though I don't find you to be obviously very customer orientated.
    Carol: Ann, I can provide you a link to chat with our customer service team too.
    Carol: Please click here.
    Your chat transcript will be sent to [email address removed by host] at the end of your chat.
    Carol: Thank you for visiting Adobe.com. Have a great day!
    Thank you for chatting with us today.

    Carey,
    Thank you, I just received your email.  Concerning your statements and questions ...
    I appreciate your diligence in contacting me and I appreciate that you would like to alleviate my frustration.  I am satisfied to hear that somehow my experience might better train the situation for the next time it comes up, and in particular with that particular representative since I had TWO bad interactions with her one worse than the other.  I believe Carol tried to do her best, but felt her much too limited in her abilities or authority to be of any service.  It was a runaround, and what was more disappointing was that apparently her supervisor had stepped in and had not rectified the problem, or even had the courtesy to talk to me directly. She left both Carol and myself hanging. I've been in these situations before where one has responsibility and no authority.  If you had significant resources at Adobe - that might also be looked at.   I can let that go though too.  In general though, I think a company as major an educational resource could do better.
    I talked to whoever left the number +36204 on my phone between 12-1 pm central today 8-27-12.  I believe I talked to the second person, Carol, for approximentaly 45 minutes and the conversation was betweeen 1:03 and 1:48 central today 8-27-12.  The woman on +36204 did not provide me a name or number, but it had been recorded on my phone.  For the second outreach, Carol, obviously, we emailed ourselves a copy of the transcript verbatem and then left it here as directed our complaints should go.  In the meantime I tweeted the situation and by chance TJ Holmes from CNN was asking responding to a situation similiar to this one.  It was at #trafficlights and also dealt with the issue of posting complaints formally at forums directed by the service provider.  I made a realization at that time that no one from Adobe had appeared to contact any customers at the forum, but then here you are.  Thank you.  BTW - I contributed to the CNN conversation my frustration, but believe I had no impact in the discussion - just the realizatioin that Adobe is not the only one to be trying to handle complaints through specific gestures.
    The issue I would rather focus on at this point, is your correct, I did want the e-learning suite provided that I can afford it.  I am a student at Jones Internatioal University and my student email is [E-mail address removed by moderator.].  Please continue emailing me at [E-mail address removed by moderator.].  I don't use the student email for any other purposes than things like this.  My understanding CONTRARY to the first woman is that you don't offer a student discount which is very unfortunate, because it is obvious those students getting in the teaching field could utilize a reasonably cost(ed) course-building tool.  I had gotten the cloud service as well and thought I'd already invested so much more into this than I should on a fixed income from disability.  I'm trying to make better use of me by teaching others with my disability.  My newly formed business email is here http://newsdidmpd.blogspot.com and my normal blog is at http://annsmultipleworldofpersonality.blogspot.com.  I am a self-proclaimed advocate for people with dissociative identity disorders.
    I am disabled, but not useless or less intelligent than most.  Please do what you can within reasonable.
    I do want the Adobe e-learning software, I do have Captivate ... and would rather be using captivate WITHIN the e-learning package. If there was a refund on Captivate that could work into some reasonable cost I would be satisfied. 
    Thank you for looking at these messages.  It does not leave me feeling so helpless or hopeless with this situation.
    Our best,
    Ann

  • Music Libraries / Composing - Is this the best Mac for me?!

    Hi,
    So I was completely new to all this a year or so ago. I bought an old upgraded mac mini and Logic Studio, but since then I've been upgrading my sound libraries and the mini just can't handle it, nowhere enough memory (even though I currently have 8GB).
    I'm using a mix of high quality sound libraries, and I'm doing orchestral scoring, so I need something that can run ALL the sound libraries at once without falling over!
    Currently I have sound libraries like LA Scoring strings and, Project Sam Orchestral Brass, Symphonic Choir etc, and many others. My current mac can't even handle ONE properly without having logic stick up an error about 'not being able to process all the required data in time'.
    I'm thinking of buying this iMac:
    2.7GHz Quad-Core Intel Core i5
    16GB 1333MHz DDR3 SDRAM - 4x4GB
    1TB Serial ATA Drive
    AMD Radeon HD 6770M 512MB GDDR5
    Do I NEED that much ram?! Or will the better processing speed mean I don't need as much? Will this allow me to use all my sample libraries as plug ins for logic at the same time without any issue, with reverb etc? I just want a setup that will stop giving me problems and run without issue.
    Could you suggest a better buy or setup for what I need?
    Please help, i'm so scared of spending this amount of money then having it not work properly or needing to upgrade again soon. Couldn't afford to do that again.
    Please ONLY COMMENT IF YOU HAVE EXPERIENCE WITH SOUND LIBRARIES OF THIS KIND. I need specific help.
    Many thanks for all your help.

    Hi,
    Thanks for your posting.
    This development mode can exclude some errors, such as the file upload complete at the same time... from my experience, this is a good choice to achieve the goal.
    Best Regards,
    Jambor  
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • BC4J datatags: is this the best way to do this?

    In my BC4J JSP application, in the DataTableComponent.jsp, I want to check
    if a property exists on the view object. This is the best way I could come
    up with:
    String PropertyValue =
    (String)dsBrowse.getApplicationModule()
    .findViewObject(dsBrowse.getViewObjectName())
    .getProperty("PropertyName");
    Is this the proper way to get at a view property? Seems like it should be more straightforward.
    Also, does an instance of the ViewImpl class get automatically created when the DataSource tag is used or do you have to specifically instantiate it if you want to use a client method on the view?
    Thanks,
    Steve

    You can do:
       String propVal = dsBrowse.getRowSet().getViewObject().getProperty("PropName");You do not have to instantiate any classes on your own to accomplish this.

  • When I delete files on a USB, it doesn't free up memory on the stik. I find I have to empty the entire stik, use Disk Utility to 'erase' it, then transfer back the files I removed to free up all the space on the stik. Is this the best practice?

    It frustrates me that if I delete a file from a USB, it doesn't free up the memory on the stik. I have been removing all the files from the stik, opening Disk Utility and erasing the empty USB. That frees up the entire stik. Then I have been transferring back the files I removed from the stik. The result is that I have memory available to use again. It seems to me this is an unnecessarily complicated and time consuming way to get the result. Is there a shorter way to do this?

    Hello Horst,
    Thank you for the question.  Have you been emptying your trash after deleting the items?  For the item to be removed from your USB device, you will need to empty the trash on your MacBook Pro after you delete the items, as described in the featured discussion below.  Your USB device will still need to be connected when you do this:
    Choose Empty Trash from the Finder menu. Unlike Windows, the trash needs to be emptied manually for any drive other than one mounted through the network.
    Can't delete off my USB drive
    https://discussions.apple.com/thread/1946841
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Is this the best way to redirect using servlet?

    I making a servlet application where the user sends some FORM value to a servlet. I want the servlet to redirect to the answer page after processing the page. Do you think the following code is the correct way of doing?
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            String dnaText = request.getParameter("dnaText");
            /*Getting the tranlated output from dnaToRna method*/
            String finalVal = null;
            String link="http://www.mail.yahoo.com";
            try{
                 finalVal = String.valueOf(dnaToRna(dnaText));
                 response.sendRedirect(link);
                }catch(Exception ex){}
        }

    Many thanks for replying.
    My output file have lots of html code and I dont want to make my servlet heavy with unnecessary code. So I have decided to use another page result.jsp as output file. In result.jsp I intend to call these objects which is storing the value here to display the result.
    As I am new to jsp. I am still in the processing of thinking the best way to handle errors. I have created a method which takes in int values and returns corresponding String values. Like this
    public class DnaToRna extends HttpServlet {
       String error=" * NULL *";
    private String printError(int i) {
            if(i==1){
                error = "There is an error in String to char array";
            }else if (i==2){
                error = "There is an error in your DNA sequence";
            return error;
        }Since error is declared as a class object, if there is no error then I think it should rerun the String NULL. Which can be used to tell people if there is no error. On the contrary if there is really an error, I can use this to tell what is exactly causing the error.
    Although I am new to web programing. I think this would be nice.
    Here is the other method
    public String dnaToRna (String dnaText) throws Exception{
                /*Trim()*/
                dnaText = dnaText.trim();
                /*Codes for Dna to Rna translation*/
                if(Pattern.matches(".*[^atgc]+.*",dnaText))
                return printError(2);
                return dnaText.replaceAll("t","u");
                }

  • Adding buttons to multiple frames -- is this the best way to do this?

    In CS5, I want to create a series of buttons that when clicked will linked to other frames in the same timeline. So one button will link to frame 5, one will link to frame 10, one will link to 15, etc. All the buttons will appear across the top of the stage on a layer, and I want them to appear on all of the frames so the user can click back-and-forth to the different frames/screens.
    1. Is the best way to do this to just add the buttons to frame 1 and add a keyframe to the last frame in the timeline, frame 15, so they are copied to all the frames in between?
    2. Are there any issues with doing it this way?
    Thanks!!!

    Just have the one keyframe in frame 1 and extend it to frame 15.  You do not need/want another keyframe at frame 15.

  • Is this the best way to measure the speed of an input stream?

    Hi guys,
    I have written the following method to read the source of a web page. I have added the functionality to calculate the speed.
    public StringBuffer read(String url)
            int lc = 0;
            long lastSpeed = System.currentTimeMillis();
            //string buffer for reading in the characters
            StringBuffer buffer = new StringBuffer();
            try
                //try to set URL
                URL URL = new URL(url);
                //create input streams
                InputStream content = (InputStream) URL.getContent();
                BufferedReader in = new BufferedReader(new InputStreamReader(content));
                //in line
                String line;
                //while still reading in
                while ((line = in.readLine()) != null)
                    lc++;
                    if ((lc % _Sample_Rate) == 0)
                        this.setSpeed(System.currentTimeMillis() - lastSpeed);
                        lastSpeed = System.currentTimeMillis();
                    //add character to string buffer
                    buffer.append(line);
            //catch errors
            catch (MalformedURLException e)
                System.out.println("Invalid URL - " + e);
            catch (IOException e)
                System.out.println("Invalid URL - " + e);
            //return source
            return buffer;
        }Is it faster to read bytes rather than characters?
    This method is a very important part of my project and must be as quick as possible.
    Any ideas on how I can make it quicker? Is my approach to calculating the speed the best way to it?
    Any help/suggestions would be great.
    thanks
    alex

    sigh
    reading bytes might be slightly faster than reading chars, since you don't have to do the conversion and you don't have to make String objects. Certainly, you don't want to use readLine. If you're using a reader, use read(buf, length, offset)
    My suggestion:
    Get your inputstream, put a bufferedInputStream over it, and use tje loadAll method from my IOUtils class.
    IOUtils is given freely, but please do not change its package or submit this as your own work.
    ====
    package tjacobs;
    import java.awt.Component;
    import java.io.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import javax.swing.JOptionPane;
    public class IOUtils {
         public static final int DEFAULT_BUFFER_SIZE = (int) Math.pow(2, 20); //1 MByte
         public static final int DEFAULT_WAIT_TIME = 30 * 1000; // 30 Seconds
         public static final int NO_TIMEOUT = -1;
         public static final boolean ALWAYS_BACKUP = false;
         public static String loadTextFile(File f) throws IOException {
              BufferedReader br = new BufferedReader(new FileReader(f));
              char data[] = new char[(int)f.length()];
              int got = 0;
              do {
                   got += br.read(data, got, data.length - got);
              while (got < data.length);
              return new String(data);
         public static class TIMEOUT implements Runnable {
              private long mWaitTime;
              private boolean mRunning = true;
              private Thread mMyThread;
              public TIMEOUT() {
                   this(DEFAULT_WAIT_TIME);
              public TIMEOUT(int timeToWait) {
                   mWaitTime = timeToWait;
              public void stop() {
                   mRunning = false;
                   mMyThread.interrupt();
              public void run () {
                   mMyThread = Thread.currentThread();
                   while (true) {
                        try {
                             Thread.sleep(mWaitTime);
                        catch (InterruptedException ex) {
                             if (!mRunning) {
                                  return;
         public static InfoFetcher loadData(InputStream in) {
              byte buf[] = new byte[DEFAULT_BUFFER_SIZE]; // 1 MByte
              return loadData(in, buf);
         public static InfoFetcher loadData(InputStream in, byte buf[]) {
              return loadData(in, buf, DEFAULT_WAIT_TIME);
         public static InfoFetcher loadData(InputStream in, byte buf[], int waitTime) {
              return new InfoFetcher(in, buf, waitTime);
         public static String loadAllString(InputStream in) {
              InfoFetcher fetcher = loadData(in);
              fetcher.run();
              return new String(fetcher.buf, 0, fetcher.got);
         public static byte[] loadAll(InputStream in) {
              InfoFetcher fetcher = loadData(in);
              fetcher.run();
              byte bytes[] = new byte[fetcher.got];
              for (int i = 0; i < fetcher.got; i++) {
                   bytes[i] = fetcher.buf;
              return bytes;
         public static class PartialReadException extends RuntimeException {
              public PartialReadException(int got, int total) {
                   super("Got " + got + " of " + total + " bytes");
         public static class InfoFetcher implements Runnable {
              public byte[] buf;
              public InputStream in;
              public int waitTime;
              private ArrayList mListeners;
              public int got = 0;
              protected boolean mClearBufferFlag = false;
              public InfoFetcher(InputStream in, byte[] buf, int waitTime) {
                   this.buf = buf;
                   this.in = in;
                   this.waitTime = waitTime;
              public void addInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        mListeners = new ArrayList(2);
                   if (!mListeners.contains(fll)) {
                        mListeners.add(fll);
              public void removeInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        return;
                   mListeners.remove(fll);
              public byte[] readCompletely() {
                   run();
                   return buf;
              public int got() {
                   return got;
              public void run() {
                   if (waitTime > 0) {
                        TIMEOUT to = new TIMEOUT(waitTime);
                        Thread t = new Thread(to);
                        t.start();
                   int b;
                   try {
                        while ((b = in.read()) != -1) {
                             if (got + 1 > buf.length) {
                                  buf = expandBuf(buf);
                             buf[got++] = (byte) b;
                             int available = in.available();
                             if (got + available > buf.length) {
                                  buf = expandBuf(buf);
                             got += in.read(buf, got, available);
                             signalListeners(false);
                             if (mClearBufferFlag) {
                                  mClearBufferFlag = false;
                                  got = 0;
                   } catch (IOException iox) {
                        throw new PartialReadException(got, buf.length);
                   } finally {
                        buf = trimBuf(buf, got);
                        signalListeners(true);
              private void setClearBufferFlag(boolean status) {
                   mClearBufferFlag = status;
              public void clearBuffer() {
                   setClearBufferFlag(true);
              private void signalListeners(boolean over) {
                   if (mListeners != null) {
                        Iterator i = mListeners.iterator();
                        InputStreamEvent ev = new InputStreamEvent(got, buf);
                        //System.out.println("got: " + got + " buf = " + new String(buf, 0, 20));
                        while (i.hasNext()) {
                             InputStreamListener fll = (InputStreamListener) i.next();
                             if (over) {
                                  fll.gotAll(ev);
                             } else {
                                  fll.gotMore(ev);
         public static interface InputStreamListener {
              public void gotMore(InputStreamEvent ev);
              public void gotAll(InputStreamEvent ev);
         public static class InputStreamEvent {
              public int totalBytesRetrieved;
              public byte buffer[];
              public InputStreamEvent (int bytes, byte buf[]) {
                   totalBytesRetrieved = bytes;
                   buffer = buf;
              public int getBytesRetrieved() {
                   return totalBytesRetrieved;
              public byte[] getBytes() {
                   return buffer;
         public static void copyBufs(byte src[], byte target[]) {
              int length = Math.min(src.length, target.length);
              for (int i = 0; i < length; i++) {
                   target[i] = src[i];
         public static byte[] expandBuf(byte array[]) {
              int length = array.length;
              byte newbuf[] = new byte[length *2];
              copyBufs(array, newbuf);
              return newbuf;
         public static byte[] trimBuf(byte[] array, int size) {
              byte[] newbuf = new byte[size];
              for (int i = 0; i < size; i++) {
                   newbuf[i] = array[i];
              return newbuf;

  • I have a new iPod Touch and PC running Windows 7. I want to upload pictures from my PC to my iPod. The best I can do right now is to create a new subdirectory on my PC and put all the pictures I want in that subdirectory. I want many subdirectories! ??

    I have a new iPod Touch. I also run Windows 7 on my desktop PC. I have tried to post pictures from my PC to the iPod. But the only way you can do this that I know of, is to create a subdirectory on the PC and put all of your pictures that you want on the iPod in that subdirectory. Then you must use iTunes to synchronize the PC subdirectory with photos on the iPod. But I want many subdirectories to organize my pictures on the iPod. Can you do this??, it doesn't look to me like you can!??
    Thanks Tom

    Yes.
    tomfromlong beech wrote:
    "Remember one one level of subfolders is allowed."  Does this mean that you can have as many subfolders as you want, but they can only be one level deep under the main folder?

Maybe you are looking for

  • TV Apple TV MacBook Air:How to connect my computer's monitor and TV as multiple monitors (NOT mirroring)

    I have an insignia TV, an apple TV I just bought less than a month ago, and a Macbook Air (mountain Lion) and a MacBook pro (mountain lion). I am able to connectboth of my computers with the TV to mirror my screen/monitor, but I have not been able to

  • BOBI 4.x Webi - Graphs when exported to Excel, turns as picture.

    Hello, In SAP BO XI 3.x version, a Webi document having graphs, when exported to Excel sheet, the graphs are exported as they are and were able to modify them. However, in SAP BO BI 4.x version, the graphs are exported as picture and are not able mod

  • Using iPhone 4 with my car radio

    I have a car radio which can connect to the standard iPhone (or iPod or iPad) connector/charger port and the music from the device can then be played through the car speakers. The tracks and playlists are listed on the radio and you control the devic

  • Question about encrypt/decrypt

    Hello! I want to transform my inputdata to my databas so no one can read it in clear text. I also have to be able to decrypt the text for process information when I want to. I have tried to use DES but that algorithm seems to use different keys every

  • Data Load: Replace with Rule

    Hi guys, this might be a simple question but need to find out quickly: Can it load exports with a rule file even its not in column format?? Data source is an export and NOT in column format and need to load the data with a rule file to replace a memb