Trouble writing CFML to a file

I am trying to create a CFC that will write a file with CFML in it using code like the following example...
    <cffile action="write" file="C:\ColdFusion8\wwwroot\T\test.cfm" output="<cfmenu name=""test"">">
but ColdFusion keeps trying to read what is in the output="". Is there any way to make it so that ColdFusion doesn't try to read the output text as CFML?

Yep.
Do it the way I showed you in that other thread.  Basically the way to get the CF compiler to not compile CFML instructions which are actually part of a string, rather than code, is to "escape" the tags.
Relevant snippet from other thread:
    <cfsavecontent variable="sMenus">
        <cfset sCfO = "<" & "cf">
        <cfset sCfC = "</" & "cf">
        <cfoutput>
            #sCfO#menu    type="horizontal">
                <cfquery name="qMenus" dbType="query">
                    [snip]
                </cfquery>
                <cfloop query="qMenus">
                    #sCfO#menuitem display="#label#" href="#CGI.script_name#?id=#id#" name="sub_#parentId#_#id#">
                        #getSubmenus(menuData=qMenuData, parentId=id)#
                    #sCfC#menuitem>
                </cfloop>
            #sCfC#menu>
Where sCfO and sCfC ("CF open" and "CF close") are variables holding "<cf" and "</cf" respectively.  So when creating your string, you have "#sCfO#menu" which will contain "<cfmenu".
Make sense?
Adam

Similar Messages

  • Trouble writing pixel array back to gif file

    Hi everyone. I am in the middle of constructing a steganography api for a final year group project. I have taken out the pixels into an array from a gif file. I am having trouble writing it back to a gif file. Here is my code:
    import javaSteg.stegoLibrary.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    import Acme.*;
    import Acme.JPM.Encoders.*;
    public class Gif extends Canvas{
         public void encodeGif(byte[] imageData){
              //create toolkit obarrayPointerect
              Toolkit t = Toolkit.getDefaultToolkit();
              MediaTracker tracker = new MediaTracker(this);
              //decode specified Gif cover
              Image img = t.createImage(imageData);      
              tracker.addImage(img,0);
              try{
                   tracker.waitForAll();
              catch(InterruptedException e){
              System.out.println("Tracker interrupted.");
              //retrive picture from image
              int[] pix = new int[img.getWidth(this) * img.getHeight(this)];
              PixelGrabber pg = new PixelGrabber(img, 0, 0, img.getWidth(this), img.getHeight(this), pix, 0, img.getWidth(this));
              try{ pg.grabPixels();
              } catch (InterruptedException ioe) {
                   System.err.println("Interrupted");
              if ((pg.getStatus() & ImageObserver.ABORT) != 0) {
              System.err.println("image fetch aborted or errored");
              return;
              //put into byte array
              byte[] pixels = new byte[img.getWidth(this) * img.getHeight(this)];     
              for(int arrayPointer=0;arrayPointer<pix.length;arrayPointer++){
                   pixels[arrayPointer] = new Integer(pix[arrayPointer]).byteValue();
              //edit pixels not implemented yet
    //assign edited pixels to an image
              img = t.createImage(pixels);
              // Now encode the image using ACME free GIF encoder (www.acme.com)
              try{
                   FileOutputStream fos = new FileOutputStream("D:\\result.gif");
                   GifEncoder encoder = new GifEncoder(img, fos);
                   encoder.encode();
                   fos.close();
              }catch(IOException e) {
              System.out.println("FATAL IOException "+e);
    From this i get a single pixel in my output gif file. Is there a way of swapping out the edited pixels with the origonal pixels in the image file? or an alternative way to write back the complete file.
    Thanks a lot
    MickyT

    ive managed to solve it. For those who come across this thread and want to know the solution i needed to use MemoryImageSource with the pixels inorder to pass them to the createImage method :o)

  • Trouble writing large Quicktime file to DVD

    I'm having trouble writing a large (2.4G) Quicktime mov. file to DVD. If I burn it as a video it comes out fine, but when I try to write it as a file the end product is jerky and staggered and can't be easily transferred to another computer. I'm wondering if it has anything to do with the size of the file and if there is another way of transferring this file uncompressed, short of carrying my hard drive across town.

    The trouble is caused by the speed (data rate) that can be achieved when playing from DVD media via QuickTime Player.
    If you burn the DVD as a "data file" you should then copy it (temporarily) to the HD of the viewing machine. Drag the file from the DVD to the Desktop on the viewing machine and then open it with a double click.
    When you "burn" it as DVD media you are actually converting the file to MPEG-2 format and the DVD Player can handle these lower data rates.
    Does this make sense to you?

  • Trouble Writing Large Files to Time Capsule - Windows 7

    Hi
    I'm having some trouble with my Time Capsule. I can access it and read files from it fine. However, I have trouble writing files to it. Small files ( say multiple word docs) write fine. However, with medium size files (say 120 mb) it crashes. I have noticed that no matter how large the file is, it writes up to 10% of the file very quickly but then crashes. It fails with the error message that 'the network location specified is no longer available'. Sometimes, when it crashes, it essentially crashes my Time Capsule network. I.E I am still connected to the internet but I can access the Time Capsule.
    I used to be able to write files (when I was using Vista) no problem. I still have 250gb left.
    What can I do to fix this?
    For details:
    500gb Time Capsule
    Windows 7 64bit Home Premium

    anyone know how to help?

  • Writing to a flat file using UTL in a procedure

    Hello All,
    I am creating a procedure in which I am trying to write data to a flat file using UTL. Code is shown below:
    CREATE OR REPLACE PROCEDURE wrt_lifungduty IS
       sql_stmt             varchar2(200);
       sql_stmt1            varchar2(200);
       sql_stmt2            varchar2(200);
       v_cur_hdl            integer;
       v_rows_processed     BINARY_INTEGER;
       V_file           UTL_FILE.FILE_TYPE;
       V_flatfile_line      VARCHAR2(98) := NULL;
      V_OBLIGATION_KEY    NUMBER(10);
      V_OBLIGATION_LEVEL  VARCHAR2(6);
      V_KEY_VALUE_1       VARCHAR2(20);
      V_KEY_VALUE_2       VARCHAR2(20);
      V_PARTNER_TYPE      VARCHAR2(6);
      V_PARTNER_ID        VARCHAR2(10);
      V_EXT_INVC_NO       VARCHAR2(30);
      V_EXT_INVC_DATE     DATE;
      V_PAID_DATE         DATE;
      V_PAID_AMT          NUMBER(20,4);
      V_COMP_ID           VARCHAR2(10);
      V_RECEIPT_DATE      DATE;
      V_ORDER_QTY         NUMBER(12,4);
      V_RECEIPT_QTY       NUMBER(12,4);
      V_FRT               NUMBER;
      V_DUTY              NUMBER;
      V_SUPPLIER          NUMBER;
      V_FLAG              VARCHAR2(1);
      V_ELC_COST          NUMBER;
      V_ADJ_ELC           NUMBER;
    Cursor x is
          select OBLIGATION_KEY,OBLIGATION_LEVEL,KEY_VALUE_1,KEY_VALUE_2,PARTNER_TYPE,PARTNER_ID,EXT_INVC_NO,EXT_INVC_DATE
                 ,PAID_DATE,PAID_AMT,COMP_ID,RECEIPT_DATE,ORDER_QTY,RECEIPT_QTY,FRT,DUTY,SUPPLIER,FLAG,ELC_COST,ADJ_ELC
          from RMSBIZ.CT_ANALYZE_LIFUNG_DUTY;    
    BEGIN
    if not UTL_FILE.IS_OPEN(V_file) then
          V_file := UTL_FILE.FOPEN('/exchange/biz/rms2lan','sb_duty.dat','w'); --need to give the location for testing
       end if;
    for x1 in x loop
      V_OBLIGATION_KEY    :=1;
      V_OBLIGATION_LEVEL  :='test';
      V_OBLIGATION_KEY    :=x1.OBLIGATION_KEY;
      V_OBLIGATION_LEVEL  :=x1.OBLIGATION_LEVEL;
      V_KEY_VALUE_1       :=x1.KEY_VALUE_1;
      V_KEY_VALUE_2       :=x1.KEY_VALUE_2;
      V_PARTNER_TYPE      :=x1.PARTNER_TYPE;
      V_PARTNER_ID        :=x1.PARTNER_ID;
      V_EXT_INVC_NO       :=x1.EXT_INVC_NO;
      V_EXT_INVC_DATE     :=x1.EXT_INVC_DATE;
      V_PAID_DATE         :=x1.PAID_DATE;
      V_PAID_AMT          :=x1.PAID_AMT;
      V_COMP_ID           :=x1.COMP_ID;
      V_RECEIPT_DATE      :=x1.RECEIPT_DATE;
      V_ORDER_QTY         :=x1.ORDER_QTY;
      V_RECEIPT_QTY       :=x1.RECEIPT_QTY;
      V_FRT               :=x1.FRT;
      V_DUTY              :=x1.DUTY;
      V_SUPPLIER          :=x1.SUPPLIER;
      V_FLAG              :=x1.FLAG;
      V_ELC_COST          :=x1.ELC_COST;
      V_ADJ_ELC           :=x1.ADJ_ELC;
      V_flatfile_line:=  V_OBLIGATION_KEY||','||
      V_OBLIGATION_LEVEL  ||','||
      V_KEY_VALUE_1       ||','||
      V_KEY_VALUE_2       ||','||
      V_PARTNER_TYPE      ||','||
      V_PARTNER_ID        ||','||
      V_EXT_INVC_NO       ||','||
      V_EXT_INVC_DATE     ||','||
      V_PAID_DATE         ||','||
      V_PAID_AMT          ||','||
      V_COMP_ID           ||','||
      V_RECEIPT_DATE      ||','||
      V_ORDER_QTY         ||','||
      V_RECEIPT_QTY       ||','||
      V_FRT               ||','||
      V_DUTY              ||','||
      V_SUPPLIER          ||','||
      V_FLAG              ||','||
      V_ELC_COST          ||','||
      V_ADJ_ELC;
    V_flatfile_line:= V_OBLIGATION_KEY||','|| V_OBLIGATION_LEVEL;
        UTL_FILE.PUT_LINE(V_file, V_flatfile_line);
    end loop
      commit;
       UTL_FILE.fclose(V_file); 
    END;
                Getting the following errors:
    SQL>Welcome-->
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_FILE", line 98
    ORA-06512: at "SYS.UTL_FILE", line 157
    ORA-06512: at "RMSBIZ.WRT_LIFUNGDUTY", line 39
    ORA-06512: at line 1
    SQL>Welcome-->39
    39* V_file := UTL_FILE.FOPEN('/exchange/biz/rms2lan','sb_duty.dat','w');
    SQL>Welcome-->
    Does any one know why it is erroring out?
    Thanks,
    Chiru

    the code below works if i take out the last 3 columns while writing to the flat file line.
    CREATE OR REPLACE PROCEDURE wrt_lifungduty IS
       sql_stmt             varchar2(200);
       sql_stmt1            varchar2(200);
       sql_stmt2            varchar2(200);
       v_cur_hdl            integer;
       v_rows_processed     BINARY_INTEGER;
       V_file           UTL_FILE.FILE_TYPE;
       V_flatfile_line      VARCHAR2(98) := NULL;
      V_OBLIGATION_KEY    NUMBER(10);
      V_OBLIGATION_LEVEL  VARCHAR2(6);
      V_KEY_VALUE_1       VARCHAR2(20);
      V_KEY_VALUE_2       VARCHAR2(20);
      V_PARTNER_TYPE      VARCHAR2(6);
      V_PARTNER_ID        VARCHAR2(10);
      V_EXT_INVC_NO       VARCHAR2(30);
      V_EXT_INVC_DATE     DATE;
      V_PAID_DATE         DATE;
      V_PAID_AMT          NUMBER(20,4);
      V_COMP_ID           VARCHAR2(10);
      V_RECEIPT_DATE      DATE;
      V_ORDER_QTY         NUMBER(12,4);
      V_RECEIPT_QTY       NUMBER(12,4);
      V_FRT               NUMBER;
      V_DUTY              NUMBER;
      V_SUPPLIER          NUMBER;
      V_FLAG              VARCHAR2(1);
      V_ELC_COST          VARCHAR2(20);
      V_ADJ_ELC           VARCHAR2(20);
    Cursor x is
          select OBLIGATION_KEY,OBLIGATION_LEVEL,KEY_VALUE_1,KEY_VALUE_2,PARTNER_TYPE,PARTNER_ID,EXT_INVC_NO,EXT_INVC_DATE
                 ,PAID_DATE,PAID_AMT,COMP_ID,RECEIPT_DATE,ORDER_QTY,RECEIPT_QTY,FRT,DUTY,SUPPLIER,FLAG,ELC_COST,ADJ_ELC
          from RMSBIZ.CT_ANALYZE_LIFUNG_DUTY;
    BEGIN
    if not UTL_FILE.IS_OPEN(V_file) then
          V_file := UTL_FILE.FOPEN('/rmsapps/rms803/biz/data/utl_files','sb_duty.csv','w'); --need to give the location for testing
       end if;
    for x1 in x loop
      V_OBLIGATION_KEY    :=nvl(x1.OBLIGATION_KEY,null);
      V_OBLIGATION_LEVEL  :=nvl(x1.OBLIGATION_LEVEL,null);
      V_KEY_VALUE_1       :=x1.KEY_VALUE_1;
      V_KEY_VALUE_2       :=x1.KEY_VALUE_2;
      V_PARTNER_TYPE      :=x1.PARTNER_TYPE;
      V_PARTNER_ID        :=x1.PARTNER_ID;
      V_EXT_INVC_NO       :=x1.EXT_INVC_NO;
      V_EXT_INVC_DATE     :=x1.EXT_INVC_DATE;
      V_PAID_DATE         :=x1.PAID_DATE;
      V_PAID_AMT          :=x1.PAID_AMT;
      V_COMP_ID           :=x1.COMP_ID;
      V_RECEIPT_DATE      :=x1.RECEIPT_DATE;
      V_ORDER_QTY         :=x1.ORDER_QTY;
      V_RECEIPT_QTY       :=x1.RECEIPT_QTY;
      V_FRT               :=x1.FRT;
      V_DUTY              :=x1.DUTY;
      V_SUPPLIER          :=x1.SUPPLIER;
      V_FLAG              :=nvl(x1.FLAG,'0');
      V_ELC_COST          :=to_char(nvl(x1.ELC_COST,0));
      V_ADJ_ELC           :=to_char(nvl(x1.ADJ_ELC,0));
      V_flatfile_line:=  V_OBLIGATION_KEY||','||
      V_OBLIGATION_LEVEL  ||','||
      V_KEY_VALUE_1       ||','||
      V_KEY_VALUE_2       ||','||
      V_PARTNER_TYPE      ||','||
      V_PARTNER_ID        ||','||
      V_EXT_INVC_NO       ||','||
      V_EXT_INVC_DATE     ||','||
      V_PAID_DATE         ||','||
      V_PAID_AMT          ||','||
      V_COMP_ID           ||','||
      V_RECEIPT_DATE      ||','||
      V_ORDER_QTY         ||','||
      V_RECEIPT_QTY       ||','||
      V_FRT               ||','||
      V_DUTY              ||','||
      V_SUPPLIER          ||','||
    -- V_FLAG            ||','||
      V_ELC_COST          ||','||
      V_ADJ_ELC;
        UTL_FILE.PUT_LINE(V_file, V_flatfile_line);
    end loop
      commit;
       UTL_FILE.fclose(V_file);
    EXCEPTION
      WHEN UTL_FILE.INVALID_PATH
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_PATH');
      WHEN UTL_FILE.INVALID_MODE
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_MODE');
      WHEN UTL_FILE.INVALID_FILEHANDLE
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_FILEHANDLE');
      WHEN UTL_FILE.INVALID_OPERATION
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_OPERATION');
      WHEN UTL_FILE.READ_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: READ_ERROR');
      WHEN UTL_FILE.WRITE_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: WRITE_ERROR');
      WHEN UTL_FILE.INTERNAL_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INTERNAL_ERROR');
      WHEN OTHERS THEN
         --     v_error_code := SQLCODE;
    --          v_error_message := SQLERRM;
    --         dbms_output.put_line('ERROR: '||v_error_code);
       --       dbms_output.put_line('ERROR: '||v_error_message);
              RAISE_APPLICATION_ERROR(-20003,'sbduty - aborted');  
    END;
    /It fails as soon as it encounters the V_FLAG in the V_flat_file_line. The data in the table has nulls for the FLAG, and some -ve numbers for the ELC_COST,ADJ_ELC..but that should'nt cause any problems does it?
    Whats wrong with those 3 columns?
    Errors that i get are:
    SQL>Welcome-->BEGIN wrt_lifungduty; END;
    ERROR at line 1:
    ORA-20003: sbduty - aborted
    ORA-06512: at "RMSBIZ.WRT_LIFUNGDUTY", line 117
    ORA-06512: at line 1
    SQL>Welcome-->117
    117* RAISE_APPLICATION_ERROR(-20003,'sbduty - aborted');
    SQL>Welcome-->
    Thanks,
    Chiru

  • Problem in reading no. of files and writing into a single file

    Hi,
    Iam with Problem in reading no. of files and writing into a single file....
    Iam reading no. of files stored in local directory.......
    Iam able to read and print the data in files successfully....but while writing..only first file is being written...and the next files are not written in my output file...
    plz tell me my mistake....I hope Iam doing some mistake while writing into file...PLz help.....
    Basically my code structure is like this....
    import java.io.*;
    import java.util.regex.*;
    import java.util.*;
    import java.text.*;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    class Writing {
    public static void main(String args[]) throws Exception {
              FileOutputStream fileOut = new FileOutputStream("ServerResult.xls"); //my output file
              int counter = 1;
              File dir = new File("C:/Perform/ServerLogs");
              String[] children = dir.list();
              if( children == null)
                   System.out.println("The Directory mentioned does not exist");
              else {
                   for (int fileNo = 0; fileNo < children.length; fileNo++ ) {        //Files iteration starts
                        String filename = children[fileNo];
              File logFile = new File(filename);
    FileReader logFileReader = new FileReader(logFile);
    BufferedReader logReader = new BufferedReader(logFileReader);
    StringBuffer sBuf = new StringBuffer(5000);
              HSSFWorkbook wb = new HSSFWorkbook();          
              HSSFSheet sheet = wb.createSheet();
              HSSFRow rowTitle;
              HSSFRow rowReq;
              HSSFRow rowRes;
    String aLine = null;
    boolean skip = false;
    boolean readed = false;
    boolean initReq = false;
              boolean flag = false;
    long requestTime = 0;
    long responseTime = 0;
    long recdTime = 0;
    long sentTime = 0;
              long hasTime = 0;
              long presentTime = 0;
              int hasCalls = 0;
    Pattern startMessage = Pattern.compile("^<MESSAGE.*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    Pattern requestMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"RequestMsg.\".*ID=\".*_"+args[0]+"\".*<ActName>(.*)</ActName>.*", Pattern.DOTALL);
    Pattern requestMessage1 = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"RequestMsg.\".*ID=\".*_"+args[0]+"\".*<Svc id=\"(.*)\">.*", Pattern.DOTALL);
    Pattern responseMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    Pattern initMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"HostConnInit\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    Pattern initResMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\"null\".*", Pattern.DOTALL);
    Pattern initResIDMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\"null\".*<IATA>"+args[0]+"</IATA>.*", Pattern.DOTALL);
              Pattern sentMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"DCMsgSentInfo\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
              Pattern rcvdMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"DCMsgRcvdInfo\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    DecimalFormat dcf = new DecimalFormat("########.##");
    String actName = "";
              if (fileNo ==0)
              rowTitle = sheet.createRow((short)0);
              rowTitle.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)0).setCellValue("Req/Res");
              rowTitle.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)1).setCellValue("Action");
              rowTitle.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)2).setCellValue("Server Time(in ms)");
              rowTitle.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)3).setCellValue("Request Vs Response Time in Server(in ms)");
              rowTitle.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)4).setCellValue("Time Taken By HAS/HOST(in ms)");
              rowTitle.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)5).setCellValue("No. of HAS calls");
              rowTitle.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)6).setCellValue("Data Size");
              //wb.write(fileOut);
    while((aLine=logReader.readLine()) != null) {
    if(aLine.startsWith("<MESSAGE TYPE=\"EVENT\"")) {
    Matcher m = startMessage.matcher(aLine);
    if(m.find()) {
    sBuf.setLength(0);
    sBuf.append(aLine);
    skip = false;
    initReq = false;
    m = initMessage.matcher(aLine);
    if(m.find()) {
    initReq = true;
    } else {
    if(initReq) {
    m = initResMessage.matcher(aLine);
    if(m.find()) {
    sBuf.setLength(0);
    sBuf.append(aLine);
    skip = false;
    } else if(aLine.startsWith("</MESSAGE>")) {
    if(!skip) {
    sBuf.append(aLine);
    readed = true;
    } else if(!skip){
    sBuf.append(aLine);
    if(!skip && readed) {
    String tempStr = sBuf.toString();
    if(tempStr.length() > 0) {
    boolean reqMatched = false;
    Matcher m = null;
    if(initReq) {
    m = initMessage.matcher(tempStr);
    actName = "Intialization";
    } else {
    m = requestMessage.matcher(tempStr);
    String time = "";
    if(m.find()) {
    reqMatched = true;
    for (int i=1; i<=m.groupCount(); i++) {
    String groupStr = m.group(i);
    if(i == 1) {
    time = groupStr;
    } else if(i == 2) {
    actName = groupStr;
    } else if(!initReq){
    m = requestMessage1.matcher(tempStr);
    if(m.find()) {
    reqMatched = true;
    for (int i=1; i<=m.groupCount(); i++) {
    String groupStr = m.group(i);
    if(i == 1) {
    time = groupStr;
    } else if(i == 2) {
    actName = groupStr;
    if(time.length() > 0 ) {
    try{
    requestTime = sdf.parse(time).getTime();
    }catch(Exception ex){}
    System.out.println("Request,"+actName+","+time+",,,,"+dcf.format(((double)time.length()/1024.0))+"K");
                                  //bw.write("Request,"+actName+","+time+",,,,"+dcf.format(((double)time.length()/1024.0))+"K");
                                  String reqDataSize = dcf.format(((double)time.length()/1024.0))+"K" ;
                                  rowReq = sheet.createRow((short)counter);
                                       rowReq.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)0).setCellValue("Request");
                                       rowReq.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)1).setCellValue(actName);
                                       rowReq.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)2).setCellValue(time);
                                       rowReq.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)3).setCellValue("");
                                       rowReq.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)4).setCellValue("");
                                       rowReq.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)5).setCellValue("");
                                       rowReq.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)6).setCellValue(reqDataSize);
                                       counter = counter +1;
                                       System.out.println("counter is "+counter);
                             Matcher l = sentMessage.matcher(tempStr);
                             Matcher k = rcvdMessage.matcher(tempStr);
                   if(l.find()) {
                                            for (int i=1; i<=l.groupCount(); i++) {
         String groupStr2 = l.group(i);
    try{
    sentTime = sdf.parse(groupStr2).getTime();
    }catch(Exception ex){}
                        if(k.find())
                                                 for(int j=1;j<=k.groupCount(); j++) {
                                                 String groupStr1 = k.group(j);
                                                 try{
    recdTime = sdf.parse(groupStr1).getTime();
    }catch(Exception ex){}
                                                 presentTime = (recdTime - sentTime);
                                                 hasTime = hasTime + presentTime;
                                                 hasCalls = hasCalls +1;
    if(!reqMatched) {
    if(initReq) {
    m=initResIDMessage.matcher(tempStr);
    } else {
    m=responseMessage.matcher(tempStr);
    if(m.find()) {
    for (int i=1; i<=m.groupCount(); i++) {
    String groupStr = m.group(i);
    try{
    responseTime = sdf.parse(groupStr).getTime();
    }catch(Exception ex){}
                                                 String resDataSize = dcf.format(((double)tempStr.length()/1024.0))+"K" ;
                                                 rowRes = sheet.createRow((short)(counter));
                                                 rowRes.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)0).setCellValue("Response");
                                                 rowRes.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)1).setCellValue(actName);
                                                 rowRes.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)2).setCellValue(groupStr);
                                                 rowRes.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                                                 rowRes.createCell((short)3).setCellValue((responseTime - requestTime));
                                                 rowRes.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                                                 rowRes.createCell((short)4).setCellValue(hasTime);
                                                 rowRes.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                                                 rowRes.createCell((short)5).setCellValue(hasCalls);
                                                 rowRes.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)6).setCellValue(resDataSize);
                                                 hasTime = 0;
                                                 hasCalls = 0;
                                                 counter = counter + 1 ;
    sBuf.setLength(0);
    readed = false;
              wb.write(fileOut);
              } // End of for (int fileNo = 0; fileNo < children.length; fileNo++ )
    }     //End of else
              fileOut.close();
    } //End of public static void main
    } // End of Class

    First of all, use [code]-tags to make your code readable, please.
    I didn't do a complete inspection of your code (because it's too much and unreadable as it is) and I don't know POI, but creating a new HSSFWorkbook for each input file sounds fishy to me ... try re-using the workbook and just creating a new sheet in each iteration.

  • Having trouble merging powerpoint or word files in single PDF in acrobat X professional on mac book pro

    Hi
    I am having trouble merging word and poerpoint files into single PDF by acrobat X professional on a mac book pro. Error says its not supported format. Why is that? It works perfectly on windows. Is the feature of merging office files not enabled in Mac version of software?

    Hi Adam,
    Welcome to the forums. They've really helped my Mac learning-curve since first getting a Mac in late April.
    It sounds to me from reading the different ways you want to use your computer that you would be very well suited for the Macbook. I have the Macbook Pro but I got it about 3 weeks before the Macbooks came out. And I was quite upset. I use my computer mainly for word editing, watching DVDs and picture management. I will have to admit the 15.4" screen is great for side-by-side document editing, but aside from that, I would think that for my needs the Macbook would have been perfect.
    For the money I spent on the low end Macbook Pro I could have gotten the fastest Macbook with 2GB RAM. Instead I have the slowest MBP with only 512MB of RAM which was painfully slow when multitasking. I upgraded to 1GB and it was a huge difference.
    But really... I never use the video card. And since I love the portability of the Macbook Pro, another 2 inches off the body would be AMAZING since the 15" is a little big...
    That's my 2 cents.

  • Sony just isn't helping me. I'm still having trouble transferring my NX3 video files.

    Well, I'm still having trouble transferring my NX3 video files to my editing software.  Sony suggested using the Sony Content Browser but that doesn't work. Sony just can't seem to help me. If the scene shot on the card is longer than 10 minutes, 4 frames of audio is lost from each file.  So if you shoot 60 minutes straight (say a wedding, you loose audio every 10 minutes)  I guess this doesn't sound important, unless it happens just as the bride is saying "Yes" in her vows.
    My original post is as follows:
    Sony NXCAM (NX-3) drops audio tracks when importing into FCPX and Premiere.
    I called Sony on Feb 13, 2015. I spoke with Doug (case no. 661972). I've been using my NX-3 for about 3 months. I'm still testing Sony NX-3. Looking for a way to transfer the video and audio without dropping audio frames. I didn't catch it at first, I mean it's only a few audio frames. It seems to happen with files over 12 minutes shooting. It seems that I can't upload the video/audio shot in my NX-3 to either my iMac (using FCPX nor Premiere) nor can I upload it to my PC (using Premiere) without 3 to 6 audio "frames" being dropped. When I spoke with Doug at Sony, a person I've actually spoke with in the past, he seemed frustrated. I was speaking with him as a professional and was attempting to find a solution, he was being protective and wanted to place blame at other companies. He stated that the camera played back the files correctly so it isn't a Sony problem. I explained that it is a problem for all of us if we choose Sony as our purchase. He told me "you should all buy Canons next time." That kind of through me. How do you speak to that. I explained that I am just looking for a solution and he told me to call the software and computer companies. Doesn't Sony realize that just because the camera works, that isn't the end of the road. You need to put the video into a devise to edit the video. I asked him what software would he recommend to a professional to use to edit footage taken by the Sony, he no reply. All I received from Doug was a really bad feeling about Sony. I've been a Sony "shooter" for over 34 years. I still can't believe the way I was treated. Not sure now what path I will take with this. But I surely need to tell everyone (all of my associates who have been asking me how I like my new camera) what response I received from Sony. Buy a Canon. By the way, I asked if Sony might have another camera of the same type that didn't drop audio. Doug didn't know. Really strange. Is Doug not happy with his prosition with Sony? 

    Auto Correct:
    As far as I'm aware this cannot be turned off. Someone may prove me wrong on this point
    CDDB Update:
    Again, as far as I'm aware this cannot be done. You could use WMP to update the files then import them into iTunes.
    Music Deletion:
    iTunes seems to only ask you if you want to delete a file if the file is located in its library folder. In the Preferences>Advanced>General section try changing your iTunes Music Folder to the folder where all your music is stored and it should ask you if you want to move files to the recycle bin when you delete them.
    Library Update:
    This is a feature I with iTunes would introduce. When you delete or move a file iTunes loses track of it. What it needs to be able to do is first check to see that all the existing files in the library are still there, and remove the ones that aren’t, then it needs to search for new tracks.
    It can search for new tracks but if you have renamed a file, then it will be in the library twice, one is the old file (which will no longer play because it doesn’t exist) and the other is the new file.
    The way I now avoid iTunes annoyances in relation to file names and folder organisation is I let iTunes sort it all out for me. Selecting "Keep iTunes Music folder organised" and "Copy files to iTunes folder when adding to library" will get iTunes to sort your music into Artist folders, then within the Artist folders are Albums, then within the album folders are the actual files, which are named Track Number Artist. For example Coldplay - Clocks will be named 05 Clocks.mp3.
    WARNING: Selecting "Keep iTunes Music folder organised" will copy all the music in your library to the iTunes Music folder. You must have enough Hard Disk space to do this.
    ...that wound up longer then I thought it would. Hope you can make sense of it all.
    Cheers,
    Ben

  • Trouble writing Query for Pivoting data from a table

    I am having a little trouble writing a query for converting the below table data into a pivot data. I am trying to write a query for which if I give a single valid report_week date as input it should give me the data for that week and also provide two extra columns, one which gives the data of last week for the same countries and the second column which gives the difference of numbers in both the columns(i.e. COUNT - COUNT_LAST_WEEK).
    REPORT_WEEK     DIVISION     COUNT
    9/26/2009     country1     81
    9/26/2009     country2     97
    9/26/2009     country3     12
    9/26/2009     country4     26
    9/26/2009     country5     101
    10/3/2009     country1     85
    10/3/2009     country2     98
    10/3/2009     country3     10
    10/3/2009     country4     24
    10/3/2009     country5     101
    10/10/2009     country1     84
    10/10/2009     country2     98
    10/10/2009     country3     10
    10/10/2009     country4     25
    10/10/2009     country5     102
    For example, if I give input as 10/10/2009, the output should be as give below.
    REPORT_WEEK     DIVISION     COUNT     COUNT_LAST_WEEK     DIFFERENCE
    10/10/2009     country1     84     85     -1
    10/10/2009     country2     98     98     0
    10/10/2009     country3     10     10     0
    10/10/2009     country4     25     24     1
    10/10/2009     country5     102     101     1
    For example, if I give input as 10/3/2009, the output should be as give below.
    REPORT_WEEK     DIVISION     COUNT     COUNT_LAST_WEEK     DIFFERENCE
    10/3/2009     country1     85     81     4
    10/3/2009     country2     98     97     1
    10/3/2009     country3     10     12     -2
    10/3/2009     country4     24     26     -2
    10/3/2009     country5     101     101     0
    Can anyone please shed some light on Query building for the above scenarios.
    Thank you
    SKP
    Edited by: user11343284 on Oct 10, 2009 7:53 AM
    Edited by: user11343284 on Oct 10, 2009 8:28 AM

    I assume there is no gap in report weeks. If so:
    SQL> variable report_week varchar2(10)
    SQL> exec :report_week := '10/10/2009'
    PL/SQL procedure successfully completed.
    with t as (
               select to_date('9/26/2009','mm/dd/yyyy') report_week,'country1' division,81 cnt from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country2',97 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country3',12 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country4',26 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country5',101 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country1',85 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country2',98 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country3',10 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country4',24 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country5',101 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country1',84 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country2',98 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country3',10 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country4',25 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country5',102 from dual
    select  max(report_week) report_week,
            division,
            max(cnt) keep(dense_rank last order by report_week) cnt_this_week,
            max(cnt) keep(dense_rank first order by report_week) cnt_last_week,
            max(cnt) keep(dense_rank last order by report_week) - max(cnt) keep(dense_rank first order by report_week) difference
      from  t
      where report_week in (to_date(:report_week,'mm/dd/yyyy'),to_date(:report_week,'mm/dd/yyyy') - 7)
      group by division
      order by division
    REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
    10-OCT-09 country1            84            85         -1
    10-OCT-09 country2            98            98          0
    10-OCT-09 country3            10            10          0
    10-OCT-09 country4            25            24          1
    10-OCT-09 country5           102           101          1
    SQL> exec :report_week := '10/3/2009'
    PL/SQL procedure successfully completed.
    SQL> /
    REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
    03-OCT-09 country1            85            81          4
    03-OCT-09 country2            98            97          1
    03-OCT-09 country3            10            12         -2
    03-OCT-09 country4            24            26         -2
    03-OCT-09 country5           101           101          0
    SQL> SY.

  • Pueden decirme para que se utiliza writing waverform data to file

    me encontre con un pdf que habla acerca de filtros y menciona mucho writing waverform data to file  y especificamente no se para que se utiliza podrian ayudarme ezplicandome su uso y en donde lo puedo conseguir?.
    muchas gracias.

    Pues se utiliza para guardar datos en un archivo de forma que se pueden leer despues para poner en un grafico o analyzar de cualquier forma.
    Existen varios typos de archivos y entonces varios VIs para guardar datos, creo que uno esta con los "Express VIs" y los otros se encontran el la "palette" Files.
    Espero que le ayude.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Writing metadata to media-file

    Hello everybody,
    I'm developing an application for viewing/editing metadata of media files (mainly MP3). Therefore I'm using JavaFX 2.2.
    Viewing works like a charm, but I'm currently stuck at the editing part.
    I've tried media.getmetadata().put("string", object) but this throws only an UnsupportedOperationException.
    Am I doing anything wrong? Or is there any other way writing metadata to media files without using external libraries?
    Thank you in advance

    is there any other way writing metadata to media files without using external libraries? No.
    JavaFX media libraries are currently only support playback and not editing (even for metadata).

  • Can someone help with a previous post labeled "Writing to a data file with time stamp - Help! "

    Can someone possibly help with a previous post labeled "Writing to a data file with time stamp - Help! "
    Thanks

    whats the problem?
    Aquaphire
    ---USING LABVIEW 6.1---

  • Trouble writing PDF out of Framemaker 7.1

    Hello,
    I have an old version of Framemaker, 7.1, and I'm having trouble writing a pdf. Our office is all Windows based. On two machines, when I write the pdf, I can't get it to create crop marks and I lose chucks of text, indents are changed and spacing between paragraphs are changed. On a third machine, I get the pdf to render just fine with the crop marks. The settings we use on all three machines is the same. The problem I have is, the good PC is leaving next week when the owner goes traveling on buisness.
    Can anyone offer me any suggestions, please? Thank you.
    Jeff

    My first suggestion would be to provide us with some more info.  ;-  )
    Your OS, exact version of FM(from Help > About --  the p number),  version of Acrobat, and anything else that seems relevant.
    Or to cut to the chase, you could confirm that you have the highest  patch levels of FM and Acrobat, and if you have XP, that you're also  fully patched there -- including the Microsoft HotFix for PS printers  (such as Acrobat) --  http://support.microsoft.com/?id=952909 -- it applies to all PS printers, including the logical PDF you're  using, and one of the fixes is the missing text you mentioned.
    Cheers,
    Art

  • Writing Data to a file using TEXT_IO in Forms

    I have a situtation where i have 5 columns and having arabic as well as english data. when i want to write this data to a txt file using TEXT_IO in a specific format, it writes to a file but as soon as it finds an arabic field, it changes the posistion. how can i write to a txt file in the posistion i want???

    vaishnavinatarajan wrote:
    How to write data to a file without leaving any blank lines in the file? How to check if the cursor is placed in the corner of a notepad file using LAB VIEW?
    If you write data to a file, simply don't include any blank lines. We cannot give more specific advice unless you are telling us how you are writing. Are you writing to a new file or appending to an existing file. If the blank lines already exist, you need to read the entire file, remove the undesired lines from the string, and write the data back.
    Notepad files don't have any "corners". Please describe what you are trying to do.
    What is "LAB VIEW"?
    LabVIEW Champion . Do more with less code and in less time .

  • Writing a Compressed AVI File in NI LabWindows/CVI with the IMAQ Vision Acquisition

    I'm still facing some problems when I try to save pictures from a GigE Vision camera into a compressed avi-file in a LabWindows/CVI application on Windows7.
    The task is to grab images from the camera with 30 fps to monitor a process, evaluate the grabbed pictures to find certain characteristics of the monitored process and save them in an avi-file to have the possibility to load and evaluate them once again Offline if necessary.
    My questions: which compression filters can I get with the NI-Imaq Vision Acquisition and Vision Development Runtime 2012 SP1? Is a mpeg4 codec available to compress quickly and effective? Can I use a third party codec or only the ones delivered with NI-Vision?
    I posted the problem two times already, but there is little response up to now. Thanks

    The encoding algorithm, or codec, that's used for compression needs to present on your system. When I had done some research on this sometime back, I found that if your custom codec could align with the DirectShow architecture, then your codec would work with IMAQ AVI functions.The codecs that are available may vary from system to system, depending on what software is currently installed. Be sure to check out this article:
    Writing a Compressed AVI File with the IMAQ Vision Acquisition Software
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

Maybe you are looking for

  • CLOB - ORA-01704 string literal too long

    I have to insert a value larger than 4000 chars into a CLOB field. I get the above error when I try to do so. What is the best way to do it. ColdFusion is our front end. I can write a PL/SQL stored proc if necessary. Any ideas/suggestions? Vidhya

  • 2.1 Upgrade causes Pandora app to crash and then iTunes

    After listening to Pandora for about 30 minutes, it started to switch back and forth to unrelated songs on iTunes. Finally, iTunes seemed to take over, and then it shuttles through all my songs, playing a few seconds of each, no matter what I do with

  • Opening a shared mailbox in Outlook 2013 (office 365) returns "Cannot Expand Folder" error.

    Hi! We've just upgraded from our old Domino email server to Office 365 E1 and running an on-premise Exchange 2013 hybrid server. In Outlook 2013, when trying to expand a shared mailbox, It asks me to enter my outlook credentials. Trying so doesn't wo

  • DVD DL burn issues - internal target error - fake hardware errors

    I am receiving an error from DVD studio pro 3 and Toast 6 when burning DVD DL. The error only appears when burning Memorex and Verbatim discs (so far) using these applications. HP branded DVD DLs burnt fine from the same applications. Aside from the

  • Uninstalling Quicktime Manually

    I just jumped through a hundred hoops trying to get my iTunes to work again after an update. There was no error message, but there was a message that said an old version of Quicktime (7.0d.0) is installed and iTunes requires a newer version. The prob