json_SetItems - constant string no ending in IE

I get the following error in Internet Explorer (firefox works fine).

Unfinished string constant
apex_4_0.js line 1
0 26659 code tank

I'm continuing IE 8.0, APEX 4.0. I have a function javascript as follows...

var get = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=RUNCALC',$v('pFlowStepId') );

     get.add('P0_CLEAR',      $v('P0_CLEAR'));
     get.add('P0_TAPE',        $v('P0_TAPE'));
     get.add('P0_REGISTER',  $v('P0_REGISTER'));
     get.add('P0_CALC',      $v('P0_CALC'));

     gReturn = get.get();
     //alert( gReturn );
     json_SetItems(gReturn);
     gReturn = null;
I've traced the error to the use of newline Chr (10). The P0_TAPE element is a Textarea component and a back-end procedure (PL/SQL) generates a string using Chr (10) and returns the value as well as others using the apex_util.json_from_items (). -Works fine in Firefox, but in IE, throw this error on the 3rd call to this routine javasript. -J' tried Chr (13) but no help. -If I replace Chr (10) with say 'X', it works but the display is not what I want. -

Any thoughts on how to solve this problem?

Luke

  • Replace the of the CHR (10) and Chr (13) is "\n" in the PLSQL process, then this variable in JS JSON is not broken.

    REPLACE(REPLACE('String with line breaks',CHR(10),'\n'),CHR(13),'\n');
    
  • Tags: Database

    Similar Questions

    • Error: constant string no ending; Code: 800A03F7; Source: Microsoft JScript compilation error

      [Moved from the community centre of Participation]

      Once connected, 3 Windows script appears on my screen. I've tried the clean boot, but when I went to a normal start, the error will appear again. Help, please.

      When I checked again in the msconfig selective startup sound. If the return to normal, the error still occurs. We already have last more time on this, I think that I better reformat this computer. What do you suggest me?

      A reformat will solve this problem, but I wouldn't do this just to resolve this minor problem.

      You are judged be in selective startup, only because you stopped these unwanted processes to run. There's nothing wrong with selective startup. I have an XP laptop that works to the selective startup for 10 years.

      If you get the selective startup with every startup message, click on the "do not show this message again" option. "

      Possible, other than msconfig, solutions are (1) begin to guess and uninstall programs that you * could * have created these process or run (2) several programs of malware removal in the hope that one of them will remove this unidentified program.

      Free malware removal tools:

      Free version to http://www.malwarebytes.org/

      AdwCleaner http://download.bleepingcomputer.com/dl/18a5d5683343e8f3e8a6e3dff236fcae/53c3bae5/windows/security/security-utilities/a/adwcleaner/AdwCleaner.exe

      Junkware Removal Tool http://thisisudax.org/downloads/JRT.exe

      Don

    • Constant string BD is safe to use a password internal unchangable?

      Hi all

      reasons to restrict access to some of my program ini files, I intend to use the password of the ZIP files coming with the tools of librarians openG and so save these critical files in a ZIP protected archive. Of course, some time when running the initialization of the program I have to give uncompress works the password required to read the contents of these files. Now my question is whether the use of a constant of simple string on the block diagram would be safe enough to use here.

      I tried to find a constant text string in the saved VI file using Notepad ++ test but could not. So far so good. Is there a simple way to get any of the VI file constant string value without using LabVIEW and the opening of the comic (which would of course be PW protected so)? The necessary level of security is really not high, I want to just exclude any obvious loophole that I might not be aware of here.

      Of course - then that ZIP archive remains open for read access at initialization, anyone can read the files from the hard drive. But it would take a number of "criminal intent" I really don't want to guarantee against the application.

      Thanks for the thoughts that anyone could share.

      It depends on your needs.  Looks like you don't need to be impossible to crack you want just a security level.  For this the zip method is probably fine, but keep in mind that the decompress function is as you said, a loophole in there self because the files will be unzipped at any given time.

      Another solution is to write your files in binary form.  If you know the structure of your data you will be able to understand it.  It gets a little pain that you need to update your data type but a def type helps out with that.

      EDIT: to also answer your question, I never could find anything like a string on a block diagram, my analysis constant a VI on the disk.

    • Choose between the control of sting and constant string.

      Hello

      I need help with a program. I've attached what I'm trying to do here. There are 2 cases init and Add. I enter a value chain in the chain I / p or control channel and click on add, it will add cases where the value of the entered string goes in the chain or the output indicator. Now what I'm trying to do is if I don't get any value then I clicked on add a predefined string constant must go in the output. This is what I am trying to accomplish. The reason why I'm doing this is I did a similar thing in another program with 2 cases init and Add. But here instead of 1 string I / p there are many i / ps and the creation of an output table. But the problem is whenever I have to enter each value and press Add. I wanted to do it in a way I get 1 of those remaining and string values it bed from the constant, please help me how to program it for helping me with the Sub attached with 1 chain control, indicator 1 channel and 1 string constant. Thanking you in advance.

      Like this?

      With regard to the second part of your message, understood that you talk in which case of tables and multiple entries.

    • Table of constant string

      Hello

      I have read the data of database Access (table 2D), I need to use these data throughout my application. Is there a way to initialize

      an array of string with data constants that is to get an array of string constant with database values

      Constant No.. A is a constant. You can:

      1. make a vi that accesses information in an indicator of the string, which you'll then change to a constant and use in your program.

      2. access to information and store it in a shift register or send the wire to VI in need.

      /Y

    • Table in spreadsheet string - no end of line

      In the attached VI, I expect to have a character at the end of the line at the end of each element of the array.  The indicator chain on the front panel, I get a line instead of three.  What have I done wrong?

      Thank you.

      By default, a tab is the separator for the worksheet line.  Just set it's the constant of end of line.

    • Find the string starts with a string and ending with a year

      Hi all

      I have the following situation.

      I'm in a string TVTdamacus LKK214/342009sstLKK
      I need to select the channel that begin withLKK and end a year. This year can be any year. In this case it is 2009, but it can also be 2012
      In this case the right string would be LKK214/342009
      Does anyone have an idea how I can do this.
      I thank in advance for your help is.

      --------------------------------------------------------------------------------
      Create table test (identification number, name varchar2 (100));

      Insert into test (id, name)
      values (1,'TVTdamacus LKK214/342009sstLKK ');

      Insert into test (id, name)
      values (2,'TVTdamacus LKK24/342012sstLKK ');

      I missed the 'between condition of 20 years' in the above query.

      Fix here...

      SQL> WITH test AS
        2  (
        3      SELECT 1 id,'TVTdamacus LKK214342009sstLKK' name FROM dual UNION all
        4      SELECT 1 id,'TVTdamacus LKK214341999sstLKK' name FROM dual UNION all
        5      SELECT 2 id,'TVTdamacus LKK24/342012sstLKK' name FROM dual UNION all
        6      SELECT 1 id,'TVTdamacus LKK214341989sstLKK' name FROM dual UNION all
        7      SELECT 2 id,'TVTdamacus LKK24344012sstLKK' name FROM dual
        8  )
        9  SELECT
       10      id,
       11      name,
       12      case when to_number(substr(REGEXP_SUBSTR (name, 'LKK[0-9]+[[:digit:]]{4}'),-4))
       13              between extract(year from sysdate)-20 and  extract(year from sysdate)
       14           then REGEXP_SUBSTR (name, 'LKK[0-9]+[[:digit:]]{4}')
       15           else null end newstr
       16  FROM test;
      
              ID NAME                          NEWSTR
      ---------- ----------------------------- -----------------------------
               1 TVTdamacus LKK214342009sstLKK LKK214342009
               1 TVTdamacus LKK214341999sstLKK LKK214341999
               2 TVTdamacus LKK24/342012sstLKK
               1 TVTdamacus LKK214341989sstLKK
               2 TVTdamacus LKK24344012sstLKK
      
    • Comparing a constant string with the procedure VARCHAR2 parameter

      Hello.
      I had a strange behavior of PL/SQL (propably I don't know something I should). I have a procedure:
      PROCEDURE przetworzLinie(P_LINIA VARCHAR2) IS
      BEGIN
        if not (nvl(pv_swde_section,'...') = 'SO') then
          CASE (p_linia)
            WHEN 'SN;' THEN      pv_swde_section := 'SN';
            WHEN 'SP;' THEN      pv_swde_section := 'SP';
            WHEN 'ST;' THEN      pv_swde_section := 'ST';
            WHEN 'SO;' THEN      pv_swde_section := 'SO';
            ELSE  NULL;
          END CASE;
        end if;
      -- (...)
      END;
      The procedure is called breast:
      procedure importuj(p_plik varchar2) is
        linia VARCHAR2(1000);
      begin
        pv_plik := p_plik;
        pv_plikID := otworzPlik(pv_plik);
        loop
          linia := czytajlinie(swde_file);     -- calls UTL_FILE.read_line and return a line from file
          exit when instr(linia, 'SWDEX') = 1; -- end of SWDE file
          przetworzLinie(linia);
        end loop;
      end importuj;
      The strange thing is that this procedure przetworzLinie never change the pv_secton_swde package variable, because the expresion:
      WHEN 'SN;'
      is always FALSE, even when p_linia contains "SN;" string.

      I solved this problem by replacing
      CASE (p_linia)
      with
      CASE (substr(p_linia,1,3))
      Please explain to me, why CASE (p_linia) is malfunctioning.
      Thanks in advance :)

      Published by: sandrine Sep 2, 2010 08:59

      P.s., database is 10.2.0.3.0 (64-bit)

      Check the length of the parameter p_linia and maybe a few extra spaces are added.

    • ORA-00285: TIME not given as constant string

      Hello

      in 10g R2:
      How to write then:
      SQL> recover database until time to_date"('17-02-2009 06:27:00','DD-MM-YYYY HH24:MI:SS')";
      ORA-00285: TIME not given as a string constant
      SQL> recover database until time '17-02-2009 06:27:00';
      ORA-01861: literal does not match format string
      
      
      SQL> recover database until time 'to_date"('17-02-2009 06:27:00','DD-MM-YYYY HH24:MI:SS')"';
      ORA-01841: (full) year must be between -4713 and +9999, and not be 0
      Thank you.

      Hello..

      TRY: -.

      DATABASE TO RECOVER UP TO THE HOUR ' 2009-02 - 17:06:27:00';

      HTH
      Anand

    • literal error string not ending whenever firefox opens a page.

      Every time firefox opens a new page, the error appears. He said: error Javascript at the top of the window for error - and the error is 'incomplete string literal. It is very annoying, some pages have several instances of the error window popping up above the other. I rebooted, no change program. I'm ready to give up and go to the Chrome (which has no error)

      This problem may be caused by an extension that is not working properly.

      Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/Firefox/tools > Modules > appearance).

      • Do NOT click on the reset button on the startup window Mode without failure.

      If it works in Mode safe mode and normal mode with all extensions (Firefox/tools > Modules > Extensions) off and then try to find which extension is the cause by allowing an extension at a time until the problem reappears.

      Close and restart Firefox after each change via "Firefox > Exit ' (Windows: Firefox/file > quit;) Mac: Firefox > quit Firefox. Linux: Firefox/file > exit)

    • Orders series does not work with the string constant

      I have a single serial device, I used.  The device requires no handshake.  Simply send a command to the device and the device responds.  I modified the example labview for simple serial communication and that works when I enter the chain command and click the button to send the command to the device.  But when I tried to put the same example of communication series in a simple state machine where I replace the chain control on the front panel with a string constant on the scheme that the standard equipment does not respond.  Where do I go awry with the constant string and the state machine?

      Thank you

      Control of the working channel is \-codes display, while the constant diagram is in normal display. Once you pass the constant \-codes diagram, you will see that it is in fact "/ 1ZR\\r\\n". Switch to \-codes, re - enter the text you want and see if things improve.

    • When the instances of String in the constant pool is GC'ed?

      Hi all

      I am involved in the development of the application; where we save many string objects in several HashMaps. Because the string created/places in HashMap objects may have duplicate values; We call the String method: intern() to make use of the pool of characteristic string constant in Java. But my concern is - instance when the constant string will be removed from the Pool? Is it follow the same behavior if no references are presentm, it is eligible for GC; i.e., removal of an instance of the HashMaps?

      Help, please.

      Thank you and best regards,
      R Kaja abdenour

      An internal String can be reclaimed by garbage collection. It seems that you should use a WeakHashMap. That does not sound references to key chains at all, regardless of whether or not they were interned.

    • Create endpoint network Stream - pre-allocation for strings

      Hello

      I would use really allocation entry mode to pre-allocate memory on my RT goal. My concern is how to allocate memory for the size of the string.

      Because of the documentation

      "pre-allocate specifies that memory allocation buffer occurs when the end point is created. Wired for the type of input data determines the amount of memory allocated for each item. If a greater element is added to the buffer during execution, the extra memory is allocated dynamically. "

      I understand that if I am wiring constant string to the category data, 40 to the size of the buffer I receive buffer to 40 channels. String but how long? A single character?

      I don't want to let the Manager of memory to run after the creation of endpoint, so I would allow large memory space (for example 40 string, 10 characters each).

      Is it possible to do constant connection string (for example with 10 characters) or I have to put my string specific to the cluster size?

      Another question of trival perhaps, is - it possible to check what size buffer was allocated by this VI?

      Kamil

      Hello

      Here is some additional information on the allocation of memory for network streams:

      http://www.NI.com/white-paper/12267/en/

      My guess is that in order to pre-allocate buffers to not scalar data types, you'll write 'false' elements of the size desired in the stream to read or to flush out these elements "dummy" bevore using the flow in normally.

      Best regards!

    • Are constants of body of the PL/SQL Package in the shared or private area

      Based on that it is not clear to me if body Package PL/SQL constants are stored in the shared or private area.

      http://docs.Oracle.com/CD/B28359_01/server.111/b28318/memory.htm

      "PL/SQL program units and the Shared Pool

      Oracle database treats PL/SQL program units (anonymous blocks, procedures, functions, packages and triggers in database) much the same way he treats the individual SQL statements. Oracle database allocates a shared area to hold the shape analyzed, compiled a program unit. Oracle database allocates a private space to hold values specific to the session who runs the program unit, including local, global and package variables (also known as the package is instantiated) and stamps of SQL execution. If more than one user is running the same program unit, a place unique and shared is used by all users, while each user runs a separate copy of his own private SQL area containing session-specific values.

      The individual SQL statements contained in a PL/SQL program unit are processed as described in the previous sections. Despite their origins within a PL/SQL program unit, these SQL statements use a shared area to hold their analysed representations and a private space for each session, who executes the statement. »


      I am also curious to know what are the differences in fine grain in a perspective of memory and performance (multisession) for the two examples below. One is more effective?


      Example 1.

      create or replace
      package body
      application_util
      as

      c_create_metadata constant varchar2 (6000): =...

      procedure process_xxx
      (
      )
      as
      Start
      ...
      end process_xxx;

      end application_util;

      vs.

      Example 2.

      create or replace
      package body
      application_util
      as

      procedure process_xxx
      (
      )
      as

      c_create_metadata constant varchar2 (6000): =...

      Start
      ...
      end process_xxx;

      end application_util;

      881398 wrote:

      But I still have to ask because it seems still more particularly in example 1 that the constant can be attributed to the use that the actual value could be a pointer to a constant string value in a table of symbols or something related to the compilation unit. I'm always curious in a perspective of management of memory if there is a difference between the example 1 and example 2, and if one is better and why.

      The storage is real, references to this storage internal to the PL/SQL engine. And irrelevant to the PL/SQL programmer.

      This question is really a disagreement over the shape is better: example 1 or example 2. I prefer the 1 example, for readability, testability, etc., and so the question is where is the performance of the memory/differences and or is it just preference of developer.

      I agree with rp0428 - he raised a very important point that it is a problem of scope and nothing else.

      Basically is there any trade-off between using one shape on the other insofar as the performance and memory management?

      Not really. Most runtime engines release not just actual system memory when a variable is out of range. the malloc() calls are expensive. Free() calls are expensive (and are not always the result in usable free memory which can be malloc'ed again).

      Several execution engines use what is called a managed heap. A malloc is made of a new process when it is initialized. The heap memory / managed malloc'ed is adjacent. Pointer allocation of memory for this process is initially pointing to the base of the managed heap. As the process allocates / uses memory, the pointer is moved just advance in the managed heap, which indicates the HWM as such - the beginning of the 'free' memory in the heap. Allocation is sequential.

      Reset of your variable execution, or releasing your runtime object, does not reset the HWM as other objects/variables can still be used and located after this place in the bunch. In this case set him free memory by releasing / resetting the language variables does not restore the kernel memory.

      Memory management is a sophisticated process entirely processed by the engine running - and best left to the runtime engine. As you as a programmer do not explicitly control the memory management, it is not a good idea to try to write code that artificially attempt to use 'better' for the runtime engine memory management. The next version of the runtime of that aura of new features, optimizations and so on — and your interference in your code to get the "valorisation" of memory can happen just bite you not bad after an upgrade to execution.

      Regarding the performance aspect - variable initialization is dependent on scope. In order to have a global scope means a one-time initialization, whereas a private scope (created each call) is a multiple unit. If the first is a little faster than the latter.

      However, the performance differences are tiny - IMO too small to justify this as a valid consideration to spend in addition to the decision of functional design on what possibilities a variable or a constant need to have.

      SQL> create or replace package FooLib1 as
        2          procedure Exec;
        3  end;
        4  /
      
      Package created.
      
      SQL>
      SQL> create or replace package body FooLib1 as
        2          const1  constant varchar2(32767) := rpad('-',10000,'-');
        3
        4          procedure Exec is
        5                  var1    varchar2(32767);
        6          begin
        7                  var1 := const1;
        8          end;
        9  end;
       10  /
      
      Package body created.
      
      SQL>
      SQL>
      SQL> create or replace package FooLib2 as
        2          procedure Exec;
        3  end;
        4  /
      
      Package created.
      
      SQL>
      SQL> create or replace package body FooLib2 as
        2          procedure Exec is
        3                  const1  constant varchar2(32767) := rpad('-',10000,'-');
        4                  var1    varchar2(32767);
        5          begin
        6                  var1 := const1;
        7          end;
        8  end;
        9  /
      
      Package body created.
      
      SQL>
      SQL> set timing on
      SQL> exec for i in 1..100000 loop FooLib1.Exec; end loop;
      
      PL/SQL procedure successfully completed.
      
      Elapsed: 00:00:00.28
      SQL> exec for i in 1..100000 loop FooLib2.Exec; end loop;
      
      PL/SQL procedure successfully completed.
      
      Elapsed: 00:00:00.74
      SQL> 
      

      A second difference 0.0000046 in a single execution for FooLib.Exec between the use of package for the constant scope, against increased private. Which means that the issue of the scope is not a decision of the performance. Not when improving performance overhead is 0,0046 millisecs.

    • maybe simple question of string of the variable in the pop up window

      Hello

      I write a name who helped me in the previous question, but now the list is great and sorry, no nicks personal

      Hi all

      We have a chain

      scany_col value {{15677, 5654, 7453}, {37008, 19532 17733}, {32896, 15163 14906}, {15934, 6939, 9509}, {16705, 6682, 9252}, {38293, 39064, 40092}, {19532, 6939, 8224}, {65535, 65535 65535}, {17219, 6425, 8738}, {24158, 9509, 11051}, {14392, 5911, 8481}, {22873, 16448, 16191}, {30840, 14649, 14649}, {29041, 16191, 15934}, {12593, 5397, 8224}}

      -(this is a RGB pixels)

      Choose from the list of the scany_col with the title "what color to the first position.

      the value of result listreturn

      listreturn

      ... one one-and this script returns an error "blah - blah with chain of cant.

      Tell me please, what is the problem?

      The sublists themselves aren't of strings and numbers.

      If you wish to choose from the sublists, replace the choice of the list command with:

      Choose from list (point 1 of scany_col) with the title "what color to the first position.

      If you want to choose a specific sub-list on all of them:

      scany_col value {{15677, 5654, 7453}, {37008, 19532 17733}, {32896, 15163 14906}, {15934, 6939, 9509}, {16705, 6682, 9252}, {38293, 39064, 40092}, {19532, 6939, 8224}, {65535, 65535 65535}, {17219, 6425, 8738}, {24158, 9509, 11051}, {14392, 5911, 8481}, {22873, 16448, 16191}, {30840, 14649, 14649}, {29041, 16191, 15934}, {12593, 5397, 8224}}

      Set scany_strings to {}

      Repeat with this_item in scany_col

      the value scany_strings scany_strings & ((article 1 de la this_item as string) & "," & (article 2 of the this_item as string) & "," & (point 3 of this_item as string))

      end repeat

      Choose from the list of scany_strings with the title "what color to the first position.

      listreturn Set result

      listreturn

      (143331)

    Maybe you are looking for