Advice on Multiple Returns and Unanchored Frames

Hello everyone--
I'm hoping to get some guidance on how to approach a problem I'm facing.  I have been tasked with updating a series of documents totalling around 5,000 pages to incorporate our new corporate fonts and colors. The new fonts are slightly larger than the fonts used in those documents. Upon review of the documents, my heart fell as I saw how the indd files were initially built. 
Here are the lovely challenges:
The original designers didn't anchor a single image in any of the documents.
They rarely used text wrap; instead they would use carriage returns and baseline shifts to create the spacing they wanted. 
Some of the documents have threaded stories that run 60-70 frames long. 
I was hoping to update the paragraph styles and adjust the layouts as needed based on text flow. (These are training manuals). Nonetheless, as you can imagine, this causes the document to get messy really quick, as text flows to other pages while the associated graphics stay in their original location.
Due to the number of documents I need to update, some sort of automated solution would be great.  Ideally, I would be able to anchor graphics to the text and remove the extraneous returns so that when the paragraph styles are updated, I can at least maintain the integrity of the content as i work through the other aspects of the layout that I need to update.
Some ideas:
Is there maybe a way to see if there is a graphic in the same general location as the multiple returns? Maybe using the some calculation of the offset properties on the first and last return, and then comparing it with the bounds of any graphics on the page? 
I'm also thinking of splitting the stories and updating each page's styles separately, but the document contains a lot of numbered lists. Splitting the stories would mean I'd need to figure out how to keep all of those lists in the right numbering scheme. 
I'm not asking for anyone to script this for me. (first of all these may be dumb ideas).  Rather, I would love advice on how to go about scripting something like this (or if it is even possible).  If faced with these challenges, how would you approach them? 
Thank you in advance for your time and effort! 

as per my view u have to create tree diffrent tables, because if tree diff. table then multi join can be done

Similar Messages

  • Search for multiple values separated by carriage return and not commas

    I have developed a report in BI Publisher that allows a user to enter multiple values that are separated by commas.
    Is there any way of entering multiple values that are separated by carriage return and not commas?
    Any help would be appreciated.
    Thanks

    Here below, without function :
    SQL> with tbl as
      2  (select 0 c1, 'j' c2 from dual union all
      3   select 1 c1, 'k' c2 from dual union all
      4   select 2 c1, 'l' c2 from dual union all
      5   select 3 c1, 'm' c2 from dual union all
      6   select 4 c1, 'n' c2 from dual )
      7  select *
      8  from   tbl
      9  where   c1 in (select substr(mystring,instr(mystring,',',1,rownum)+1,instr(mystring,',',1,rownum+1)-instr(mystring,',',1,rownum)-1)
    10                 from   (select ','||'&str'||',' mystring from dual)
    11                 connect by  level <= length(mystring)-length(replace(mystring,','))-1);
    Enter value for str: 1,2,3
    old  10:                from   (select ','||'&str'||',' mystring from dual)
    new  10:                from   (select ','||'1,2,3'||',' mystring from dual)
            C1 C
             1 k
             2 l
             3 m
    SQL> /
    Enter value for str: 0
    old  10:                from   (select ','||'&str'||',' mystring from dual)
    new  10:                from   (select ','||'0'||',' mystring from dual)
            C1 C
             0 j
    SQL> Nicolas.

  • Flex services with multiple return types

    Hello,
    We are creating a webapplication with flex and php.
    Everything is working very good, until we got to the library part of the application.
    Every service so far had only 1 return type (eg: User, Group, ...)
    Now for the library we want to return a ArrayCollection of different types of objects. To be more specific the LibraryService should return a ArrayCollection containing Folder and File objects.
    But how to configure this in Flex (Flash Builder 4 (standard))?
    So far it converts every object to the type Object, i would really like it to be Folder or File
    The only solution we can think of right now is to create a new object Library that will contain 2 ArrayCollections, one of type Folder and one of type File. This could work ofcourse, but I wonder if there is a better solution for this OR that i can configure multiple return types for a service.
    Any ideas/advice is greatly appreciated.

    Normally if you are using Blazeds(Java stuff, i'm sure there should be something similar for php), you can map java objects to that of the AS objects, when you get the data back you are actually seeing the object which is a Folder or a File object rather than just a Object.

  • Multiple return values (Bug-ID 4222792)

    I had exactly the same request for the same 3 reasons: strong type safety and code correctness verification at compile-time, code readability and ease of mantenance, performance.
    Here is what Sun replied to me:
    Autoboxing and varargs are provided as part of
    JSRs 14 and 201
    http://jcp.org/en/jsr/detail?id=14
    http://jcp.org/en/jsr/detail?id=201
    See also:
    http://forum.java.sun.com/forum.jsp?forum=316
    http://developer.java.sun.com/developer/earlyAccess/adding_generics/index.html
    Multiple return values is covered by Bug-ID 4222792
    Typically this is done by returning an array.
    http://developer.java.sun.com/developer/bugParade/bugs/4222792.html
    That's exactly the problem: we dynamically create instances of array objects that would better fit well within the operand stack without stressing the garbage collector with temporary Array object instances (and with their backing store: 2 separate allocations that need to be recycled when it is clearly a pollution that the operand stack would clean up more efficiently)
    If you would like to engage in a discussion with the Java Language developers, the Generics forum would be a better place:
    http://forum.java.sun.com/forum.jsp?forum=316
    I know that (my report was already refering to the JSR for language extension) Generics is not what I was refering to (even if a generic could handle multiple return values, it would still be an allocated Object
    instance to pack them, i.e. just less convenient than using a static class for type safety.
    The most common case of multiple return values involve values that have known static datatypes and that should be checked with strong typesafety.
    The simple case that involves returning two ints then will require at least two object instances and will not solve the garbage collection overhead.
    Using a array of variable objects is exactly similar, except that it requires two instances for the components and one instance for the generic array container. Using extra method parameters with Integer, Byte, ... boxing objects is more efficient, but for now the only practical solution (which causes the least pollution in the VM allocator and garbage collector) is to use a custom class to store the return values in a single instance.
    This is not natural, and needlessly complexifies many interfaces.
    So to avoid this pollution, some solutions are used such as packing two ints into a long and returning a long, depacking the long after return (not quite clean but still much faster at run-time for methods that need to be used with high frequencies within the application. In some case, the only way to cut down the overhead is to inline methods within the caller code, and this does not help code maintenance by splitting the implementation into small methods (something that C++ can do very easily, both because it supports native types parameters by reference, and because it also supports inline methods).
    Finally, suppose we don't want to use tricky code, difficult to maintain, then we'll have to use boxing Object types to allow passing arguments by reference. Shamely boxed native types cannot be allocated on the operand stack as local variables, so we need to instanciate these local variables before call, and we loose the capacity to track the cases where these local variables are not really initialized by an effective call to the method that will assign them. This does not help debugging, and is against the concept of a strongly typed language like Java should be:
    Java makes lots of efforts to track uninitialized variables, but has no way to determine if an already instanciated Object instance refered in a local variable has effectively received an effective assignment because only the instanciation is kept. A typical code will then need to be written like this:
    Integer a = null;
    Integer b = null;
    if (some condition) {
    //call.method(a, b, 0, 1, "dummy input arg");
    // the method is supposed to have assigned a value to a and b,
    // but can't if a and b have not been instanciated, so we perform:
    call.method(a = new Integer(), b = new Integer(), 0, 1, "dummy input
    arg");
    // we must suppose that the method has modified (not initialized!)
    the value
    // of a and b instances.
    now.use(a.value(), b.value())
    // are we sure here that a and b have received a value????
    // the code may be detected at run-time (a null exception)
    // or completely undetected (the method() above was called but it
    // forgot to assign a value to its referenced objects a and b, in which
    // case we are calling in fact: now.use(0, 0); with the default values
    // or a and b, assigned when they were instanciated)
    Very tricky... Hard to debug. It would be much simpler if we just used:
    int a;
    int b;
    if (some condition) {
    (a, b) = call.method(0, 1, "dummy input arg");
    now.use(a, b);
    The compiler would immediately detect the case where a and b are in fact not always initialized (possible use bere initialization), and the first invoked call.method() would not have to check if its arguments are not null, it would not compile if it forgets to return two values in some code path...
    There's no need to provide extra boxing objects in the source as well as at run-time, and there's no stress added to the VM allocator or garbage collector simply because return values are only allocated on the perand stack by the caller, directly instanciated within the callee which MUST (checked at compile-time) create such instances by using the return statement to instanciate them, and the caller now just needs to use directly the variables which were referenced before call (here a and b). Clean and mean. And it allows strong typechecking as well (so this is a real help for programmers.
    Note that the signature of the method() above is:
    class call {
    (int, int) method(int, int, String) { ... }
    id est:
    class "call", member name "method", member type "(IILjava.lang.string;)II"
    This last signature means that the method can only be called by returning the value into a pair of variables of type int, or using the return value as a pair of actual arguments for another method call such as:
    call.method(call.method("dummy input arg"), "other dummy input arg")
    This is strongly typed and convenient to write and debug and very efficient at run-time...

    Can anyone give me some real-world examples where
    multiple return values aren't better captured in a
    class that logically groups those values? I can of
    course give hundreds of examples for why it's better
    to capture method arguments as multiple values instead
    of as one "logical object", but whenever I've hankered
    for multiple return values, I end up rethinking my
    strategy and rewriting my code to be better Object
    Oriented.I'd personally say you're usually right. There's almost always a O-O way of avoiding the situation.
    Sometimes though, you really do just want to return "two ints" from a function. There's no logical object you can think of to put them in. So you end up polluting the namespace:
    public class MyUsefulClass {
    public TwoInts calculateSomething(int a, int b, int c) {
    public static class TwoInts {
        //now, do I use two public int fields here, making it
        //in essence a struct?
       //or do I make my two ints private & final, which
       //requires a constructor & two getters?
      //and while I'm at it, is it worth implementing
      //equals(), how about hashCode()? clone()?
      //readResolve() ?
    }The answer to most of the questions for something as simple as "TwoInts" is usually "no: its not worth implementing those methods", but I still have to think about them.
    More to the point, the TwoInts class looks so ugly polluting the top level namespace like that, MyUsefulClass.TwoInts is public, that I don't think I've ever actually created that class. I always find some way to avoid it, even if the workaround is just as ugly.
    For myself, I'd like to see some simple pass-by-value "Tuple" type. My fear is it'd be abused as a way for lazy programmers to avoid creating objects when they should have a logical type for readability & maintainability.
    Anyone who has maintained code where someone has passed in all their arguments as (mutable!) Maps, Collections and/or Arrays and "returned" values by mutating those structures knows what a nightmare it can be. Which I suppose is an argument that cuts both ways: on the one hand you can say: "why add Tuples which would be another easy thing to abuse", on the other: "why not add Tuples, given Arrays and the Collections framework already allow bad programmers to produce unmainable mush. One more feature isn't going to make a difference either way".
    Ho hum.

  • My touch screen isn't working and stopped working after I went running with it. I have restarted it multiple times and restored it on my MacBook. It will still not let me slide it to even look at the phone. Please help ASAP.

    I took my iPhone running today and when I returned I was not able to slide it open or type in my pass code. All buttons are still responding. I have tried restarting it multiple times and even restored it, but the touch screen will not respond to anything. I also cleaned the screen off with a damp cloth. Please help! I WAS able to slide it open in the middle of restoring it but not able to click on any apps. Help! My life is on my iPhone and I am a nurse on call!

    Try restore as new using computer iTunes.

  • Multiple users and shopping carts, one searchable index?

    Hi all,
    I've got an idea but I would like to know if it possible with Business Catalyst. I'll try and explain as simply as possible:
    I have multiple users (let's say 10). They all need separate shopping carts as they are all selling different products. They all need their own admin areas that keep track of their incomes, workflows, shopping carts, etc. They are essentially 10 independent users. Will the WebCommerce10 plan satisfy their needs, or will 10 separate WebCommerce single plans need to be sold?
    Taking the above into account, is there anyway to have 10 independent shopping carts, but they can all be searchable simultaneously? e.g. think eBay, lots of users with their own independent admin areas and products, but one search field returning many results from all the user's shopping carts? Is there anyway to achieve something like this with BC? Can subdomains do this? Any other ideas how to achieve this if none of the above is possible?
    My plan B is having a landing page where a link for each of the 10 users will take them to their relevant shopping carts, but this experience isn't quite as integrated as I would like, from a web surfer's point of view.
    Thanks.
    Clint,
    Komma Media

    Hi Robbie,
    Yes, this would require significant modification to the shopping cart functionality. As it is now, it's very dependent the ShoppingCart being associated with the session and therefore the user. To change that would be significant work.
    Additionally, if you had two people logging in to the same account and editing the same order around the same time, this would tend to not to work well. This is because two users would be two sessions and they would often get routed to different app server instances. Because the way orders are managed, there's no way to immediately sync up the changes between multiple instances, and if you managed to do it would likely slow things down drastically. I would not recommend trying this with ATG.
    Thanks.
    Nick Glover
    Oracle Support for ATG Products

  • How can I edit multiple clips with different frame rates on the same timeline

    how can I edit multiple clips with different frame rates on the same timeline

    You do not want to edit material from different frame rates on one timeline. You CAN do this, but it is a very bad idea - and this is why.
    Once you establish the sequence frame rate - lets say it is PAL material at 25fps, any material that you drop into the sequence other than 25 fps will have to be changed to play at 25 fps. If the material you add is NTSC (29.97), FCP will DROP 5 frames per sec to bring the frame rate down to 25 fps. Which 5 get thrown away? Every 6th one. This yields a funky cadence that becomes even more complex as as there are also interlaced fields (DV/NTSC is an interlaced format). Oh, and by the way, the image sizes are different as well. DV/PAL has 576 lines of resolution and DV/NTSC has 480. FCP has to scale up the NTSC to fit the PAL frame.
    You do not want FCP adjusting these things on the fly. You want to do a thoughtful (and time consuming) conversion so that you end up with all your material in one format with the best possible image from the conversion process. Compressor can do an adequate job with Frame Controls turned on. The Natress Standards Conversion FCP plugin is another way to go. A third option is to find a post house that can do the conversion for you using a hardware based process.
    The good news is, once everything is in the same format, editing it will be painless and the output process very quick.
    Whatever frame rate/ image size you select, I'd suggest using ProRes for the codec. It is 4:2:2 color and will withstand color correction and composting with much more grace than any variant of DV based codecs.
    Have fun.
    x

  • Playback of clips only plays between 4 and 12 frames

    Hi all,
    I am fairly new to Premiere, have used After Effects CS4 to produce some clips, but need something that handles editing better, and I thought I would give Premiere CS4 a try.
    Unfortunately, I can't get Source or Sequence preview working.  I click the play button and the video plays for about 1/2 to 1/4 or a second (between 4 and 16 frames) and then stops, returning to the place where I hit play.  Almost like I had selected an in and out of 14 frames and hit "play in to out".
    The duration of the playback is random, but never more than a full second.
    The computer I am on is:
      Model Name: MacBook Pro
      OS: Snow Leopard 10.6.2
      Processor Name: Intel Core 2 Duo
      Processor Speed: 2.4 GHz
      L2 Cache: 3 MB
      Memory: 4 GB
      Bus Speed: 800 MHz
      Chipset Model: GeForce 8600M GT   
      Bus: PCIe
      VRAM (Total): 256 MB
      Vendor: NVIDIA (0x10de)
      RAM Size: 4 GB
      Type: DDR2 SDRAM 667 MHz
      HDD: 500Gb 7200RPM (50% empty)
    Apple system updater says I am up to date.
    I have Adobe Premiere CS4 installed (trial) 4.2.1 (003 (MC: 166418))
    Adobe Updater says I am up to date.
    I have done the following to try and resolve:
    * Tried different source files (mp4, mov)
    * Tried rendering a video in After Effects CS4 as MOV H264 and importing
    * Tried putting still frames on the time line and playing those (no effects, no transitions)
    * Tried playing no video, just music
    * Ensure that "clear all markers" is done on the source and preview monitors
    * Ensure loop is not playing
    * Force in and out markers to a 5 second clip and press play
    * Full deinstall and reinstall of all adobe products (I had some CS3 left overs that I cleaned out)
    * Deleted all adobe application preferences folders before reinstall
    * Deleted plugin cache
    * Created new projects and tried all the above.
    I have tried shutting down every other program before running Premiere, it is definitely not a resources problem, there is 3Gb of RAM free and CPUs sitting at 5% when I try this.
    I am looking at buying Premiere, but if I can't get playback to work it's a bit of a waste
    Anyway, any help or pointers would be appreciated!
    Mikel

    Thanks everyone for the long thread and lots of comments, unfortunately I have tried them all.
    I even purchased a full copy of Premiere Pro (as part of a Masters collection set) and this still has not fixed the problem.
    The screen recording of my problem is exactly the same as the one linked to here: Screen Recording 2 720p.mov, and I am also going to open a support ticket with Adobe.
    Another point is that it even does not work on a tiny video that I used (320 x 240px)  Still same problems.
    This is very frustrating.
    It should be noted that After Effects and Encore both play videos fine in a similar situation, it is just Premiere that is bombing out.
    See the first post for my configuration, it is still the same, except now I own a full copy of Premiere Pro as part of CS4 Masters collection.
    Any further ideas?
    Mikel

  • Can only see first and last frame of clip in the timeline HELP PLEASE

    Hi, my first time and I did look for an answer, but can't find one. I have premiere elements 4 and I am trying out ver. 9. In ver. 4 the clips in the timelin shows all the frames, but in ver. 9 it only shows the first and last frame of the clips. Is there any way to make all the frames show. By "all the frames", I mean the clips fill with frames.I liked to see all the frames in the timeline, it is easier for me to select and trim the bits out.
    My specs are Core 2 Duo 6750, Nvidia 8600GTS, 4G Ram, Vista Home Premium. 3 HDD 3TB.
    Thank you for answering
    Werner

    As for the GUI, PrE had one more like PrPro (the early versions), up through PrE 3. With PrE 4, they streamlined the GUI (and some of the operation), and went with the "dark look." PrPro went in that direction starting with CS3, and now, the two programs' GUI looks more alike - darker. Personally, I like PrPro 2.0's brighter GUI. Now, one can alter the brightness, but the contrast can work against doing much of that - give me the lighter GUI....
    The look of PrE 4 thru PrE 9 is very similar, though things have moved about some. Still the look is similar. Same for PrPro CS 3 through CS 5.5.
    As for the trial, things have changed in PrPro, as of CS 5.5. Once, the PrPro trial was very crippled, but had no watermark. No more. No crippling, and still no watermark. The trial for PrE is far less crippled, but does have the watermark. We do not know what changes might be coming with the trial of PrE10. We will just have to wait and see. One great option that Adobe offers is the 30-day, money-back guarantee. If you buy Premiere (either flavor), and use it for 29 days, but do not like it, then you return it for your money back. This is the full-paid version (both flavors) with nothing crippled, and no watermark. Not that many companies make such an offer. Basically, on can use the trial for 30 days, to see some of the powers of the program, and then buy it, and try it fully for another 29 days. If not completely satisfied, they get their money back - essentially a 59 day trial.
    Were I doing AVCHD, I would definitely look at buying PrE 9, and giving it a 29 day shakedown. The only caveat is that AVCHD requires a lot of computer "horsepower," and not all computers (especially if more than a year, or so old) are up to that task. I find it amazing that a consumer format, like AVCHD, requires more computer power to process, than most professional formats, until one gets up to, say RED 2K/4K. However, that is the nature of the H.264 CODEC, and by that, I mean all H.264, not just the AVCHD version.
    Good luck and happy editing,
    Hunt

  • Multiple Return Types

    haven't been around in a while, so I thought I'd stir up some comments with a suggestion for a new feature in Java, which I'm sure has been suggested at some point, but I can't remember seeing it talked about, so here goes:
    Multiple Return Types:
    public String, int getStateInfo(String abbrev) {
       if("nj".equalsIgnoreCase(abbrev)) {
          return "New Jersey", 11408042;
       // ... and other states...
       return null, -1;
    String name, int population = getStateInfo("nj");
    System.out.println("The population of " + name + " is " + population + ".");Yes yes, I know. Create a StateInfo object with the fields needed. Still, I think that could be interesting.

    apart from it getting ugly with more than twoparameters
    What? How is this ugly? ;-)
    public String, int, String, Color, String, String
    getStateInfo(String abbrev) {
    return name, population, stateFlower, stateColor,
    or, stateAnimal, governorsName;
    there no indication on what the return valuesrepresent.
    Well, I guees the API docs would have to speak for
    themselves. Or better method naming... In that
    sense, it's no different then now. I could write a
    method "getStateName()" and return totally different.
    public String, int getStateNameAndPopulation(String
    abbrev) {...
    I used to like "tuples" when I studied The Tom Programming Language (that's how he calls them), as every CS student is a bit of a "featurist"... Now that I came to develop 40 hours a week and to love Java's simple and powerful expressiveness, I tend to find such constructs overly ugly to be avoided as possible... a matter of personal taste, too, I suppose...

  • Read multiple files and save all into one output file(AGAIN)

    Hi, guys
    I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
    public class FileReduction1 extends JFrame implements ActionListener
       // GUI definition and layout
        /* ACTION PERFORMED */
        public void actionPerformed(ActionEvent event) {
            if (event.getActionCommand().equals("Open File")) getFileName();
        /* OPEN THE FILE */
        private void getFileName() {
            // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(true);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
            if (result == JFileChooser.APPROVE_OPTION)
             files = fileChooser.getSelectedFiles();
                textArea.setText("");
                if(files.length>0)
                    filelist="";
                    System.out.println("files length"+files.length);
                    for(int i=0;i<files.length;i++)
                         System.out.println(files.getName());
    filelist+=files[i].getName()+" ,";
    if (checkFileName(files[i]) )
    openButton.setEnabled(true);
    readButton.setEnabled(true);
    textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
    readFile(files[i]);
    textfield.setText(filelist);
    else{JOptionPane.showMessageDialog(this,"Please select file(s)",
                    "Error 5: ",JOptionPane.ERROR_MESSAGE); }
         // Obtain selected file
    /* READ FILE */
    private void readFile(File fileName_in) {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines(fileName_in);
         data = new String[numLines][4];
         // Read file
         readTheFile(fileName_in);
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines(File fileName_in) {
    int counter = 0;
         // Open the file
         openFile(fileName_in);
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile(fileName_in);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile(fileName_in);
         System.exit(1);
    /* READ FILE */
    private void readTheFile(File fileName_in)
    // Open the file
    //int row=0;
    int col=0;
    openFile(fileName_in);
    System.out.println("Read the file");
    // Loop through file incrementing counter
    try
    String line = fileInput.readLine();
    while (line != null)
    boolean containsDoubles = false;
    double temp;
    String[] lineParts = line.split("\t");
    try
    for (col=0;col<lineParts.length;col++)
    temp=Double.parseDouble(lineParts[col]);
    data[row][col] = lineParts[col];
    containsDoubles = true;
    System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
    } catch (Exception e) {row=0; col=0; temp=0.0;}
    if (containsDoubles){ row++;}
    System.out.println();
    line = fileInput.readLine();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
    closeFile(fileName_in);
    System.exit(1);
    //System.out.println("length"+data.length);
    closeFile(fileName_in);
    process(fileName_in);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName(File fileName_in) {
         if (fileName_in.exists()) {
         if (fileName_in.canRead()) {
              if (fileName_in.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* OPEN FILE */
    private void openFile(File fileName_in) {
         try {
         // Open file
         FileReader file = new FileReader(fileName_in);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
         textArea.append("OPEN FILE\n---------\n");
         textArea.append(fileName_in.getPath());
         textArea.append("\n");
         //System.out.println("File opened successfully");
    /* CLOSE FILE */
    private void closeFile(File fileName_in) {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    private void process(File fileName_in) {
    //getNumberOfLines();
         //data = new String[numLines][3];
         // Read file
    double temp,temp1;
         //readTheFile();
    //System.out.println("row:"+row);
    //int number=data.length;
    //System.out.println(number);
    for (int i=0; i<row; i++)
    temp=Double.parseDouble(data[i][1]);
    sumx+=temp;
    temp1=Double.parseDouble(data[i][3]);
    sumy+=temp1;
    multixy+=(temp*temp1);
    square_x_sum+=(temp*temp);
    square_y_sum+=(temp1*temp1);
    //System.out.println("Sum(x)="+sumx);
    double tempup=(row*multixy)-(sumx*sumy);
    double tempdown=(row*square_x_sum)-(sumx*sumx);
    slope=tempup/tempdown;
    double tempbup=sumy-(slope*sumx);
    intb=tempbup/row;
    double tempside=(row*square_y_sum)-(sumy*sumy);
    double cordown=Math.sqrt(tempdown*tempside);
    corr=tempup/cordown;
    r_sqrt=corr*corr;
         textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
         textArea.append("\n");
         textArea.append("Please enter output file name including extension.");
    System.out.println("number"+row);
    System.out.println("slope(m)="+slope);
    System.out.println("intecept b="+intb);
    System.out.println("correlation="+corr);
    System.out.println("correlation="+r_sqrt);
    saveFile();
    private void saveFile()
    textArea.append("SAVE FILE\n---------\n");
    if (openFile1())
         try {
              outputToFile();
    catch (IOException ioException) {
              JOptionPane.showMessageDialog(this,"Error Writing to File",
                   "Error",JOptionPane.ERROR_MESSAGE);
    private boolean openFile1 ()
         // search for the file path
    StringBuffer stringpath;
    title=textfield1.getText().trim();
    int temp=fileName_in.getName().length();
    int temp_path=fileName_in.getPath().length();
    int startd=(temp_path-temp);
    stringpath=new StringBuffer(fileName_in.getPath());
    stringpath.delete(startd, temp_path+1);
    //System.out.println("file-path="+temp_path);
    //System.out.println("length-file="+temp);
    path=stringpath.toString();
    fileName_out = new File(path, title);
    //System.out.println(file_out.getName());
    if (fileName_out==null || fileName_out.getName().equals(""))
         JOptionPane.showMessageDialog(this,"Invalid File name",
                   "Invalid File name",JOptionPane.ERROR_MESSAGE);
         return(false);
         else
    try
    boolean created = fileName_out.createNewFile();
    if(created)
    fileOutput = new PrintWriter(new FileWriter(fileName_out));
    fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
    return(true);
    else
    fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
    return(true);
    catch (IOException exc)
    JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
    return(false);
    private void outputToFile() throws IOException
    // Initial output
         textArea.append("File name = " + fileName_out + "\n");
         // Test if data exists
         if (data != null)
         fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
    textArea.append("File output complete\n\n");
         else
    textArea.append("No data\n\n");
         // End by closing file
    initialcomp();
         fileOutput.close();
    private void initialcomp()
    slope=0.0;
    intb=0.0;
    corr=0.0;
    r_sqrt=0.0;
    sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
    for(int i=0;i<data.length;i++)
    for(int j=0;j<data[i].length;j++)
    data[i][j]=null;
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Sorry about the long lines.
    As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
    When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
    Does anybody have an idea to solve this?
    Thanks a lot!!

    you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
    your code is doing too much..and hard to follows..
    1. get the selected files
    for each selected file
    process the file and return the result
    write out the result.
    /** close the precious resource */
    public void closeResource(Reader in){
        if (in != null){
            try{ in.close(); }
            catch (Exception e){}
    /** get the total number of line in a file */
    public int getLineCount(File file) throws IOException{
        BufferedReader in = null;
        int lineCount = 0;
        try{
            in = new BufferedReader(new FileReader(file));
            while ((in.readLine() != null)
                lineCount++;
            return lineCount;
        finally{ closeResource (in);  }
    /** read the file */
    public void processFile(File inFile, File outFile) throws IOException{
        BufferedReader in = null;
        StringBuffer result = new StringBuffer();
        try{
            in = new BufferedReader(new FileReader(inFile));
            String line = null;
            while ((in.readLine() != null){
                .. do something with the line
                result.append(....);
            writeToFile(outFile, result.toString());
        finally{ closeResource (in);  }
    public void writeToFile(File outFile, String result) throws IOException{
        PrintWriter out = null;
        try{
            out = new PrintWriter(new FileWriter(outFile, true));  // true for appending to the end of the file
            out.println(result);
        finally{  if (out != null){ try{ out.close(); } catch (Exception e){} }  }
    }

  • Adobe Premiere Saving Issue: Returning a Video Frame

         I have Adobe Premiere Elements 4 and have edited a video on it. The video format is AVI, from a camera that didn't seem to have trouble before this. It is a Sony if that is any help. I'm really hoping it isn't CODEC problems.
         Last night I finished my project and tried to save it on my desktop as a Windows Media movie, but an error popped up saying that "Adobe Premiere failed to return a video frame." I tried other saving styles to no avail.
         Thus I began the process of googling and then trying to solve this saving error by changing my edits. I have removed all Video Effects, except for three black and white shots. I have gone through and checked that I have no gaps, about five times. I saw that my audio (in a wma format) wasn't perfectly aligned with my visuals and had gaps, so I added in audio till there was never a silent moment.
         Is that audio format (wma) acceptable?
         I am playing two soundtracks over each other, one is the vocals and one is the music. The music's format is MP3.
         I have several still shots created with the program with titles over it. At one moment I tried to put a menu on the project, but it didn't work out. When I went to try and delete my attempt, I couldn't find the menu to remove it.
         The piece is about five minutes long. I can't think of anything else to tell you.
         I'm running out of things to change. I'm afraid my CODEC is wrong and I may have to start all over (is there a way to apply a fix to a CODEC error on a project?). Having spent all day on this, I'm at a point of desperation. If I can't get it to work, I'm about to start all over in Windows Movie Maker where at least I know I can save it and turn it in tomorrow.
         Thanks

    For the Audio Assets, the best that one can do is to use PCM/WAV, and use any number of audio-editing programs to convert that.
    Still, your error is "Return a Video Frame." That indicates an error in the Video portion of the Timeline.
    Besides gaps, do you have any overly large still images?
    As for any gaps, did you use the method outlined in the linked article? They can be very hard to see, even when zoomed into the max view (Frame View).
    I still did not see the CODEC of the used AVI files. Can you provide that please, as it might make a differenece?
    Good luck,
    Hunt

  • Multiple screens in one frame

    Hi all,
    I'd like to know how to be able to display multiple screens within one frame. Depending on the choice made on the first screen, the second screen should be either "View Default" or "Modify Default." The modifying will involve a number of other screens.
    One idea is to group by Panel and control panels. Any better idea?
    Regards,
    Omer

    Do you mean multiple displays in one frame? If so, you have several options. With JTabbedPane you could dynamically add new views to the frame, with the disadvantage of only being able to see one at a time. JSplitPane allows you to nest various views within one frame, though has the disadvantage of having extremely complex display logic when several split panes are displayed at the same time, and of displaying all displayed panes simultaneously.
    Perhaps the best possibility is to use JDesktopPane, within which you can insert as many JInternalFrames as you want.

  • Email Payment advice to multiple recipients

    I have successfully implemented the function module to allow emailing of payment advices but have a new requirement for the ability to email payment advices to multiple recipients.  I am using the communication area in the vendor master maintenance to enter the email addresses.  The z_process_2040 function module returns all of the email addresses but I'm looking for suggestions on how to repeat the output for each of the addresses returned. Has anyone done this successfully?  Thanks in advance for your help.

    Thank you, Naresh, for your suggestion.  I will investigate to see if there is a way it can be used for a solution to our situation.
    Edited by: Patricia Holland on Nov 17, 2009 3:48 PM

  • Email payment advice for multiple emails

    Hi There,
    I have configured the BTE 00002040, every thing works perfectly to send the payment advice to a single email id from vendor master but out client wants a copy of the payment advice also to sent to their group email id, so with the help of our abaper we are trying to hard code the group email id and try to send the email to both vendor email id and group email id but is it nor working.
    Can any body tell me how to send the payment advice to multiple emails?
    Thank you in advance
    Madhu

    Thank you Hugo,
    We tried this but for some reason it is not working, i know some body else also suggested the same on SDN but no luck.
    It works fine for one emaild from vendor master but not when we put the group email id in the program as a hard code.
    pl let me know, if you have any other thoughts.
    Thanks
    Madhu

Maybe you are looking for

  • How do I use my airport extreme with my FIOS router?

    How do I use my AirPort Extreme base station with my FIOS Router to extend my network?  I have hard disks connected to my AirPort Extreme and would lik to access them.

  • Sounds NOT working! Please help!

    I have a ON/OFF switch to sound the music. When the site loads the music plays automatically and if clicked it turns off the music and it works OK, but if I imported a new music file with a different file name and delete the one that worked. I set th

  • Some contact names are not being updated

    Some of my friends show as live:abc123 or facebook:abc123 and don't update in my contacts list even when the friends change it later in their profile. I have this issue both on Windows and Windows Phone. Please fix this.

  • How do I screen capture a page

    When reading a magazine in zinio, how do I capture the page to copy to Evernote, etc

  • Clone stamp tool suddenly looks bitmapped around the edges

    I'm using the clone stamp tool, as well as the spot healing brush, and it has suddenly begun to look "bitmapped" around the edges. I am using the clone stamp at the halfway mark between hard and soft, but instead of a smooth blend at the edges of the