When i insert string text in hebrew i see ?????????

hi
when i insert string text in hebrew i see ????????? how to fix it ?
i work on:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
Oracle Developer ver. 2.1.1.64
thanks

i try this, but still same problem :(
my Settings:
NLS_LANGUAGE     AMERICAN
NLS_TERRITORY     AMERICA
NLS_CURRENCY     $
NLS_ISO_CURRENCY     AMERICA
NLS_NUMERIC_CHARACTERS     .,
NLS_CHARACTERSET     IW8MSWIN1255
NLS_CALENDAR     GREGORIAN
NLS_DATE_FORMAT     DD-MON-RR
NLS_DATE_LANGUAGE     AMERICAN
NLS_SORT     BINARY
NLS_TIME_FORMAT     HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY     $
NLS_COMP     BINARY
NLS_LENGTH_SEMANTICS     BYTE
NLS_NCHAR_CONV_EXCP     FALSE
NLS_NCHAR_CHARACTERSET     AL16UTF16
NLS_RDBMS_VERSION     11.2.0.1.0

Similar Messages

  • WPF TextBox insert new text

    When inserting a number in my textBox and then another number, for ex. 6 and then 3 I see: 63.
    but i want that when I insert 6 and then 3 to see only: 3. 
    i mean, that every Key comes instead of the one before and not added.
    what should i do?

    Handle PreviewKeyDown and set the Text property to empty string.
    private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
    TextBox tb = sender as TextBox;
    tb.Text = string.Empty;
    You probably also want an if round that so if tab or enter is pressed you don't lose the old string.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Inserting a Text Box

    When I insert a text box on my web page, I find it can be anywhere on the page and I have to set about looking for the blinking cursor. It may be in another box with text covering it or in a photo box. Is there a way that the inserted box can have a larger, darker graphic box? Am I doing something incorrectly in inserting the box?

    Bocamama wrote:
    Is there a way that the inserted box can have a larger, darker graphic box?
    As soon as you have inserted the text box, in the Inspector's Graphic tab, under Stroke choose Line and optionally increase the thickness of the line from 1 pt to 2 or 3 pt. That will make the box easy to see whilst working with it. (Revert back to Stroke - None before publishing.)
    Am I doing something incorrectly in inserting the box?
    I don't think so.

  • String text / bold font

    When using a string text to a concatenate, is there any backslash code that will make the text bold in the string box?  Sorry if this is a rookie question, but I just started with Lab View. 

    VeeJay wrote:
    I get that the String indicator will show string or information in BOLD.
    Which is because the Bol;d property is set for the string indicator, or are you using a Rich Text Box?
    VeeJay wrote:
    What if I want to send that string to a file or a balloonTip as BOLD characters?
    To a file?  Well... if it's a text file, you won't be able to set the bold property.  If a RTF or DOC or other formatted file, then you would have to deal with how it requires to be done.  The quick answer would be ActiveX.
    What do you mean by baloonTip?  (I know what it is, but are you referring to one from LV {tooltip} or another app?)
    VeeJay wrote:
    In essence, how to make the String Value completely in Bold font?
    You would set it's property to bold.  Again, are you referring to an indicator in LabVIEW or something else?

  • TS1717 all of a sudden, iTunes has stopped asking me if I want to import when I insert a cd.  Help!

    all of a sudden, iTunes has stopped asking me if I want to import when I insert a CD!  Help!

    See: Replace Your Preferences

  • Unknown error when inserting Flash text [was: Error]

    When I try to insert Flash text into a document, I keep getting an error message that says "Unknown error". What should I do? I'm taking a class online and we happen to be covering this feature.

    After nearly ripping my eyeballs out and chucking my laptop out the window, I finally fixed the problem!
    For some reason I didn't have a CMaps folder in my Adobe - Common Files - Font folder:
    C:\Program Files\Common Files\Adobe\Fonts\Reqrd\CMaps
    So I made the "CMaps" folder and copied and pasted the files "Identity-H" and "Identity-V" from an "Adobe Reader" CMap folder, and now I can save text in an *.ai file with PDF Compatibility checked.
    It's pretty strange Illustrator was working for 2 years without this folder, and now all the sudden it needed it.  Also, this is a very obscure fix.
    Hopefully the programmers at Adobe have fixed these bugs in newer versions.

  • Please Help.JTable insert styled text

    Hi all java guru,
    on post http://forum.java.sun.com/thread.jsp?forum=57&thread=485469 i've depicted my scenario in which i have a JTable where i want to add styled text.
    i've implemented a CustomTableModel that maintains information about text style, in such way that when renderer cell, i can rebuild exact text with its style....same method is adopted for CellEditor.
    It is possible to have more than one JTable in my application....then to correctly handle all JTables ' put them in a vector and during editing and rendering i find current focusable/selected JTable and edit/render it.
    Clearly i maintain information about style of text when i insert it, that is when i insert text, i update my CustomTableModel...same thing must be done when i delete text from JTable...that is, i must update CustomTableModel too in this case.
    Because my CellEditor is a JEditorPane component (extend it) i've registered document associated to it to a DocumentListener that notify every time that a remove operation is happens.
    What is the problem now???problem is that when i finish to edit a cell and click on another cell i've got a removeUpdate(DocumenEvent e) event, and i can't distinguish it.....it seems a real remove event....
    In this case(when i change cell) the code that is executes returns wrong result and invalidate all the rest.
    I think error is where i register celleditor , now i do it in CustomCellRenderer class that extend JEditorPane and implements TableCellRenderer.
    Please help me...this is a great trouble that invalidate all my work :(
    Any new idea is welcome.
    regards,
    anti-shock

    Hi stanislav, of course i can...you're a myth :)
    public class CustomCellEditor extends AbstractCellEditor implements TableCellEditor {
           CellEditor cellArea;
         JTable table;
         public CustomCellEditor(JTable ta) {
              super();
              table = ta;
              // this component relies on having this renderer for the String class
              MultiLineCellRenderer renderer = new MultiLineCellRenderer();
              table.setDefaultRenderer(String.class,renderer);
         public Object getCellEditorValue() {
              return cellArea.getText();
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,     int row, int column) {
              int start = 0;
              int end = 0;
                                               // Get current selected table
              TableEditor tb = (TableEditor) TableEditor.getSelectedTable();
              TableModel model = (TableModel) tb.getModel();
              Vector fontInfo = model.getFontFor(row,column);
              CellEditor cellArea = (CellEditor) ((CustomCellEditor)tb.getCellEditor (row,column)).getCellEditor();
              Document doc = cellArea.getDocument();
              String content = tb.getValueAt(row,column).toString();     
              if (doc!=null && fontInfo.size()>0 && !content.equals("")) {
                                                     // This method reads from model and get right style info
                                                     // for current text, and restore them
                                                     restoreFontWithAttributes(doc,fontInfo,content);
              else
                   cellArea.setText(tb.getValueAt(row,column).toString());
              cellArea.rowEditing = row;
              cellArea.columnEditing = column;
              cellArea.lastPreferredHeight = cellArea.getPreferredSize().height;
              return cellArea;
          * @return
         public CellEditor getCellEditor() {
              return cellArea;
         public class CellEditor extends JEditorPane {
              private CellStyledEditorKit k;
              public CellEditor() {
                    super("text/plain","");
                    k = new CellStyledEditorKit();
                    setEditorKit(k);
                    // I tried to add document here, but i have had wrong behavior
                   doc = new DocumentListener() {
                   public void removeUpdate(DocumentEvent e) {
                      // Get current selected table
                      TableEditor tb = (TableEditor) TableEditor.getSelectedTable();
                      TableModel model = (TableModel) tb.getModel();
                      model.updateFontInfo();
                   getDocument().addDocumentListener(doc);
    }Ok, stan...this is my CustomCellRenderer class....as i have already said, i have some style text info mainteined by CustomTableModel associated with JTable.
    I update CustomTableModel every time that an insert and remove operation happens.
    If i add a DocumentListener to CellEditor (that rapresents editor cell of my table) happens that, if i remove some character from an editing cell, i got a removeUpdate event.....and this is right!!! But if i change cell (e.g. supposing editing cell(1,1), click on cell(2,1) then stop edit cell(1,1) and start edit cell(2,1)) i got a removeUpdate event, that I don't wait for to me..
    Look at this:
    empty cell | some text
    cell 0 ------- cell1
    supposing you're in cell1 and you have finished to insert "some text".Then click on cell0, that is empty....then document associated with CellArea(extend JEditorPane) before of the click on cell0 had some text, but after click have no text, then for it a removeUpdate is happens.....and is that one i got..
    it's as if an unique document is associated to all cells, while should be one document for each cell (i hope this is right).
    Clearly, i've same code for renderer, in such way that i can restore style of text on rendering.
    Hope is clear....if U have any idea or suggestion please give to me.
    Tnx a lot Stanislav..
    regards,
    anti-shock

  • Script to search all files in specified folder for multiple string text values listed in a source file and output each match to one single results txt file

    I have been searching high and low for this one.  I have a vbscript that can successfully perform the function if one file is listed.  It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
    that way.  However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder.  At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
    was executed and folder was scanned.  So I am going back to the drawing board and starting from the beginning.
    I also have a txt file that contains the list of string text entries I would like it to search for.  Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back.  The current script
    I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand.  It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
    let it search.  There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for.  It is a search (read) only function, going thru the entire contents of the folder and
    when done, performs the loop function and onto the next file to repeat the process until all files are searched.  When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
    of the overall script.  Saving yet another step for me to do.
    My current script is set to append to the same results file and will echo [name of file I am searching]:  No errors found.  Otherwise, the
    output shows the filename and the string text that matched.  Because the results append to it, I can only run the script against each file separately or create individual output names.  I would rather not do that if I could include it all in one.
     This would also free me from babysitting it and running each file script separately upon the other's completion.  I can continue with my job and come back later and view the completed report all in one.  So
    if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence).  I don't want the entire line to be listed
    where the error was, just the match itself.
    Example:  (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line.  It somehow posted the example jumbled when I listed it) 
    File1.txt Line 54 
    Job terminated unexpectedly
     File1.txt Line 58 Process not completed
    File1.txt
    Line 101 User input not provided
    File1.txt
    Line 105  Process not completed
    File2.txt
    No errors found
    File3.txt
    Line 35 No tape media found
    File3.txt
    Line 156 Bad surface media
    File3.txt Line 188
    Process terminated
    Those are just random fake examples for this post.
    This allows me to perform analysis on a set of files for various projects I am doing.  Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on.  Therefore, the
    line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
    I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using.  Very useful.
    If you know how I can successfully achieve this in one script, please share.  I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
    Thanks for helping.

    I'm sorry.  I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing  help with.   I did have one created, but I came across one that seemed more organized than what I originally created.  Later
    on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly.  Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
    However, I could still use help on it.  I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error.  If I end with End, then it still gives same
    results.
    So to give credit where I located this:
    http://vbscriptwmi.uw.hu/ch12lev1sec7.html
    I then adjusted it for what I was doing.
    What this does does is it searches thru log files in a directory you specify when prompted.  It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file:  errors.log
    Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
    What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched.  That way, I can go directly
    to each instance for particular events if further analysis is needed later on.
    So I could use help on what statement should I be closing this with.  What event, events or error did I overlook that I keep getting prompted for that.  Any help would be appreciated.
    Option Explicit
    'Prompt user for the log file they want to search
    Dim varLogPath
    varLogPath = InputBox("Enter the complete path of the logs folder.")
    'Create filesystem object
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
    'Creates the output file that will contain errors found during search
    Dim oTSOut
    Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
    'Loop through each file in the folder
    Dim oFile, varFoundNone
    VarFoundNone = True
    For Each oFile In oFSO.GetFolder(varLogPath).Files
        'Verifies files scanned are log files
        If LCase(Right(oFile.Name,3)) = "log" Then
            'Open the log file
            Dim oTS
            oTS = oFSO.OpenTextFile(oFile.Path)
            'Sets the file log that contains error list to look for
            Dim oFile2
            Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
            'Begin reading each line of the textstream
            Dim varLine
            Do Until oTS.AtEndOfStream
                varLine = oTS.ReadLine
                Set objRegEx = CreateObject("VBScript.RegExp")
                objRegEx.Global = True  
                Dim colMatches, strName, strText
                Do Until oErrors.AtEndOfStream
                    strName = oFile2.ReadLine
                    objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
                    Set colMatches = objRegEx.Execute(varLine)  
                    If colMatches.Count > 0 Then
                        For Each strMatch in colMatches 
                            strText = strText & strMatch.Value
                            WScript.Echo "Errors found."
                            oTSOut.WriteLine oFile.Name, varLine.Line, varLine
                            VarFoundNone = False
                        Next
                    End If
                Loop
                oTS.Close
                oFile2.Close
                oTSOut.Close
                Exit Do
                If VarFoundNone = True Then
                    WScript.Echo "No errors found."
                Else
                    WScript.Echo "Errors found.  Check logfile for more info."
                End If
        End if

  • Why does this happen when I insert editable region?

    Hi ppl... I got a small problem here. When I insert editing region into the ORANGEBOX div, for some unknown reason which I can't figure out, my spry menu bar shifts to the left. But in preview, it looks fine. What's the reason for this and how can I avoid it? The shifted spry menu bar in the workspace is disturbing me.. haha.. I have attached screenshots of the 2 states below (Before inserting editable region and after inserting editable region)
    Before inserting editable region into the ORANGE BOX
    After inserting editable region into the ORANGEBOX
    Here's the code BEFORE inserting editable region.. If you are free, do try to insert an editable region into the ORANGEBOX, and kindly tell me why it's happening! =) Thanks!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    body {
        background-color: #666;
        margin: 0px;
        padding: 0px;
        margin: 0px;
        padding: 0px;
    #wrapper {
        padding: 0px;
        width: 900px;
        margin-right: auto;
        margin-left: auto;
        margin-top: 0px;
        overflow: hidden;
    #navigation {
        height: 122px;
    #mainContent {
        background-color: #FFF;
        overflow: hidden;
    #header {
        background-color: #033;
        height: 248px;
    #navigationlinks {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14px;
        font-weight: bold;
        color: #000;
        height: 42px;
        background-color: #0C0;
    #footer {
        height: 100px;
        background-color: #F39;
    #orangebox {
        height: 100px;
        width: auto;
        background-color: #F60;
    -->
    </style>
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper">
      <div id="header"></div>
      <div id="navigationlinks">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="#">Home</a>      </li>
          <li><a href="#">Audio Lectures</a></li>
          <li><a class="MenuBarItemSubmenu" href="#">Video Lectures</a>
            <ul>
              <li><a href="aqeedah1.htm">Aqeedah</a></li>
              <li><a href="fundamentals1.shtml">Tawheed</a></li>
    <li><a href="#">Friday Bayans</a></li>
    <li><a href="#">Other Topics</a></li>
            </ul>
          </li>
          <li><a href="#">Books</a></li>
        </ul>
      </div>
      <div id="mainContent">
        <p> </p>
        <p>mainContent</p>
        <p> </p>
        <div id="orangebox">
          <p>ORANGE BOX    </p>
          <p> </p>
        </div>
    <p> </p>
        <p>mainContent</p>
        <p> </p>
        <p> </p>
      </div>
      <div id="footer">
        <p> </p>
        <p> </p>
        <p> </p>
        <p> </p>
        <p>FOOTER </p>
        <p> </p>
        <p> </p>
        <p> </p>
      </div>
      <p> </p>
      <p> </p>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

    Here's the SpryMenuBarHorizontal.css
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: 9em;
        float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: 9em;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        width: 9em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        color: #333;
        text-decoration: none;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: bold;
        padding-top: 1.1em;
        padding-right: 0.75em;
        padding-bottom: 1.1em;
        padding-left: 0.75em;
        text-align: center;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        color: #FFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        color: #FFF;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarDown.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarRight.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarRightHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
        display: inline;
        f\loat: left;

  • Inserting strings in a RandomAccessFile at a particular location

    I wrote a java program to read and display the contents of RAF. It is working. Actually,I need to read a file and search for a string in it and if the string equals certain value, then i need to insert a line in the file at that location.
    My problem is I am not able to insert any string in the RandomAccessFile(RAF) at a particular location, it always overwrites the already present string.
    I have a file called SOE_Arrays2.js which needs to be read and its content has to be modified. I am searching for a string like "os = [" in it and inserting another line like "["64w","64-bit Windows"]," at that location.
    the file looks like this:
    os1 = [
    ["win","Windows"],
    ["unx","UNIX"],
    ["mvs","MVS"]
    os2 = [
    ["alp","Alpha VMS"],
    ["lnx","Linux"]
    var letter = [
    ["new","New"],
    ["addon","Add-on"],
    ["lsf","LSF"],
    ["renew","Renewal"]
    The java program i wrote is here:
    import java.io.*;
    public class RAFtest
         public void writeTo()
              try
         String f = "C:\\webapps\\oncall\\soe\\SOE_Arrays2.js";
         File arrayfile = new File(f);
         RandomAccessFile raf = new RandomAccessFile(arrayfile, "rw");
         String s="",ss="";
         int i,j = 0,len;
         long fp;
    while((s = raf.readLine()) != null)
              //System.out.println(s);
              int ptr = 0;
              ptr = s.indexOf("os2 = [");
              if(ptr != -1)
                   System.out.println(s);
                   System.out.println("The OS array is here:");
                   ss = s;
                   raf.writeBytes("\r\t");
                   fp = raf.getFilePointer();
                   raf.seek(fp-4);
              raf.writeBytes("[\"64w\",\"64-bit Windows\"],\r");
                   break;
         raf.close();     
         catch(Exception e){e.printStackTrace(System.out);}      
         public static void main(String args[])
              RAFtest e = new RAFtest();
              e.writeTo();
    After executing the code SOE_Arrays2.js looks like this:
    os1 = [
    ["win","Windows"],
    ["unx","UNIX"],
    ["mvs","MVS"]
    os2 = [["64w","64-bit Windows"],
    lnx","Linux"]
    var letter = [
    ["new","New"],
    ["addon","Add-on"],
    ["lsf","LSF"],
    ["renew","Renewal"]
    you can see that RAF overwrites to the file at that particular location( after the line "os2 = [ ". What i need is to insert the text at a particular location, Is there a way to do this?
    I tried to insert carriage return, etc and move the file ptr back a little and write, whatever it is, RAF overwrites it, is there a way to insert instead of overwrite?
    Basically I want to get some string from the user from a web page and insert that string in my SOE_Arrays2.js file at a particular location depending on certain conditions.
    Is there another way of doing this instead of RAF?
    Please let me know how to do this.
    Thanks,
    Priyha.

    Hi DrClap,
    Thanks for the clarification. Everything works except the renameTo() . I am trying to rename the arrayfile2 to arrayfile1 , but the rename always return false. I am not sure why rename is not successful.
    I checked for the permissions of the file, full permission is there. I closed the files before renaming.
    Here's the code.
    import java.io.*;
    public class RAFtest
    public void writeTo()
    try
    String f1 = "C:\\JAVA\\SOE_Arrays2.js";
    String f2 = "C:\\JAVA\\SOE_Arrays3.js";
    File arrayfile1 = new File(f1);
    File arrayfile2 = new File(f2);
    RandomAccessFile raf1 = new RandomAccessFile(arrayfile1, "rw");
    RandomAccessFile raf2 = new RandomAccessFile(arrayfile2, "rw");
    long fp1=0,fp2=0; // file pointers
    String s="",ss="";
    int i,j = 0,len;
    boolean b= false;
    raf2.seek(0);
    while((s = raf1.readLine()) != null)
    int ptr = 0;
    raf2.writeBytes(s);
    ptr = s.indexOf("var OS9.1_sol = [");
         if(ptr != -1)
              System.out.println(s);
              System.out.println("The OS array is here:");
              ss = s;
              fp1 = raf1.getFilePointer();
              raf2.writeBytes("[\"64w\",\"64-bit Windows\"],");
              fp2 = raf2.getFilePointer();
              break;
    raf1.seek(fp1);
    while((s = raf1.readLine()) != null)
         raf2.writeBytes(s);               
    raf1.close();
    raf2.close();
    if(arrayfile2.exists()) System.out.println("file2 exists!");
    try{
    b = arrayfile2.renameTo(arrayfile1); //rename the file, why does it return false?
    }catch(SecurityException se){se.printStackTrace(System.out);}
    catch(NullPointerException ne){ne.printStackTrace(System.out);}
    System.out.println("b: "+b);
    catch(Exception e){e.printStackTrace(System.out);}
    public static void main(String args[])
    RAFtest e = new RAFtest();
    e.writeTo();
    here is the SOE_Arrays2.js
    var OS9.1 = [
    ["win","Windows"],
    ["unx","UNIX"],
    ["mvs","MVS"]
    var OS9.1_sol = [
    ["alp","Alpha VMS"],
    ["lnx","Linux"]
    var letter = [
    ["new","New"],
    ["addon","Add-on"],
    ["lsf","LSF"],
    ["renew","Renewal"]
    Please let me know whats wrong with the above code. I have no clue why renameTo returns false.
    Thanks,
    Priyha

  • Decode Case statement to insert total text

    Where the AGE BRACKET fields are empty or Null I need to insert "Total" text? Can anybody help?
    Table
    SOURCE CODE     AGE BRACKET     COUNT
    CLUBBEN     0-40 Years     3     
    CLUBBEN     41-49 Years     6     
    CLUBBEN     50-59 Years     38     
    CLUBBEN     60-69 Years     205     
    CLUBBEN     70-79 Years     181     
    CLUBBEN     80+ Years     19     
    CLUBBEN          452     
    CLUBJUNE     41-49 Years     2     
    CLUBJUNE     50-59 Years     21     
    CLUBJUNE     60-69 Years     100     
    CLUBJUNE     80+ Years     1     
    CLUBJUNE          124     
    TOTAL          576     
    Script Currently entered
    SELECT DECODE(GROUPING(F.SOURCE_CODE),1,'TOTAL',0,F.SOURCE_CODE) as "SOURCE CODE",
    CASE
    WHEN D.AGE BETWEEN '0' AND '40' THEN '0-40 Years'
    WHEN D.AGE BETWEEN '41' AND '49' THEN '41-49 Years'
    WHEN D.AGE BETWEEN '50' AND '59' THEN '50-59 Years'
    WHEN D.AGE BETWEEN '60' AND '69' THEN '60-69 Years'
    WHEN D.AGE BETWEEN '70' AND '79' THEN '70-79 Years'
    WHEN D.AGE >= '80' THEN '80+ Years'
    ELSE ''
    END AS"AGE BRACKET",
    COUNT(F.MEMBER_COUNT) "COUNT"
    FROM A3_FACT_NEW F, DIM_AGE D
    WHERE F.AGE_KEY = D.AGE
    AND F.JOIN_DATE BETWEEN '25/JUNE/2012' AND '30/AUGUST/2012'
    AND F.BEN_TYPE = 'Prime member'
    AND F.SOURCE_CODE IN ('CLUBBEN','CLUBJUNE')
    GROUP BY ROLLUP(F.SOURCE_CODE,
    CASE
    WHEN D.AGE BETWEEN '0' AND '40' THEN '0-40 Years'
    WHEN D.AGE BETWEEN '41' AND '49' THEN '41-49 Years'
    WHEN D.AGE BETWEEN '50' AND '59' THEN '50-59 Years'
    WHEN D.AGE BETWEEN '60' AND '69' THEN '60-69 Years'
    WHEN D.AGE BETWEEN '70' AND '79' THEN '70-79 Years'
    WHEN D.AGE >= '80' THEN '80+ Years'
    ELSE ''
    END)
    ORDER BY(F.SOURCE_CODE),(2)
    --------------------------------------------------------------------------------------------------------------

    Welcome to the forum!!
    Please consider the following when you post a question. This would help us help you better
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Runtime Error when Posting Invoice with text added (MIRO)

    Hi Gurus,
    We are getting a shortdump (runtime error) when we post certain invoices in MIRO. This happens when we input some text in the text field or add some text to the NOTE tab.
    We are having exception ERROR_DP raised in the program c_textedit_control.
    If the text field is blank and nothing is writing in the NOTE tab, the invoice gets posted with no problem.
    Has anyone come accross this issue before and how did you solve it please.
    Thanks.

    are u processing thru BADI, then it is very easy there are interfaces and methods for handling texts. u sud not get any error and plz never write commit work in BADI.
    May be i cud provide more help if u share more details but let me tell more but let me share one recent development that i did.
    In ME59n when we do PR TO PO then texdts sud be copied to header text in PO and get reflected in PO. the coding is like below may be can give some clues wid ur MIRO stuff.
    METHOD if_ex_me_process_po_cust~process_header.
    *  Author        : Prasenjit Bist                                          *
    *  ID            : PRBIST                                                  *
    *  Date          : 04.08.2011                                              *
    *  Changes       : New Devlopment                                          *
    *  Change Request:                                                         *
    *  Description: To copy LSP information in PO                               *
    TYPES:
            BEGIN OF ty_text,
              auto_pr_po TYPE zman_auto_pr_po,
              plant TYPE zman_plant,
              vendor TYPE zman_vendor,
              lsp_vendor TYPE zman_lsp_name,
              contract_no_text TYPE zman_contract_no_text,
            END OF ty_text.
      TYPES:
           BEGIN OF ty_address,
             ort01      TYPE ort01_gp,  " city
             ort02      TYPE ort02_gp,  " district
             pfach      TYPE pfach,     " PO Box
             pstlz      TYPE pstlz,     " Postal code
             region     TYPE regio,     "Region (State, Province, County)
             telf1      TYPE telf1,     "1st telephone number
             telf2      TYPE telf2,     "2nd telephone number
             telfx      TYPE telfx,     "Fax number
             land1      TYPE land1,
           END OF ty_address.
      DATA:
       get the header level details
            ls_mepoheader TYPE mepoheader,
            lt_purchase_order_items TYPE purchase_order_items,
            ls_purchase_order_items LIKE LINE OF lt_purchase_order_items,
       get the line item details
            lt_mepoitem TYPE STANDARD TABLE OF mepoitem,
            ls_mepoitem TYPE mepoitem,
            lt_textlines TYPE mmpur_t_textlines,
            ls_textlines LIKE LINE OF lt_textlines,
    TEXT TYPES
            lt_texttypes TYPE mmpur_t_texttypes,
            ls_texttypes LIKE LINE OF lt_texttypes.
      DATA: l_name TYPE thead-tdname,
            ls_header TYPE thead,
            lt_lines TYPE STANDARD TABLE OF tline,
            ls_lines TYPE tline,
            l_tdobject TYPE thead-tdobject,
            l_metafield TYPE mmpur_metafield.
      DATA: ls_text TYPE ty_text,
            l_text(50).
      DATA: l_continue(1).
      DATA: l_pass_vendor TYPE lifnr,
            l_pass_plant TYPE werks,
            l_name1(35).
    fetch the address
      DATA: ls_address TYPE ty_address,
            l_landx    TYPE landx.
      CONSTANTS: lc_id TYPE thead-tdid     VALUE 'F01',
                 lc_langu TYPE thead-tdspras  VALUE 'E',
                 lc_object TYPE thead-tdobject VALUE 'EKKO'.
      CONSTANTS: lc_set(1) VALUE 'X',
                 lc_vendor(11) VALUE 'Vendor:    ',
                 lc_lsp_vendor(11) VALUE 'LSP Vendor:',
                 lc_contract_no_text(14) VALUE 'Contract Text:'.
      CLEAR: l_continue.
      IF sy-uname EQ 'PRBIST'.
    Read the header data
        ls_mepoheader = im_header->get_data( ).
    read teh item level data.
       break prbist.
        lt_purchase_order_items = im_header->get_items( ).
        LOOP AT lt_purchase_order_items INTO ls_purchase_order_items.
    The item attribute of the structure is reference to line item
          ls_mepoitem = ls_purchase_order_items-item->get_data( ).
          APPEND ls_mepoitem TO lt_mepoitem.
        ENDLOOP.
    CHECK VENDOR IS THE ONE WE WANT.
        SELECT SINGLE name1 FROM lfa1 INTO l_name1 WHERE lifnr = ls_mepoheader-lifnr.
    First read the vebdor name based on LIFNR.
        TRANSLATE l_name1 TO UPPER CASE.
        IF ( l_name1 EQ 'LSP1' ) OR ( l_name1 EQ 'LSP2' ).
          LOOP AT lt_mepoitem INTO ls_mepoitem.
            TRANSLATE ls_mepoitem-werks TO UPPER CASE.
            IF ls_mepoitem-werks EQ 'FI01'.
              l_continue = lc_set.
              l_pass_vendor = ls_mepoheader-lifnr.
              l_pass_plant = ls_mepoitem-werks.
              EXIT.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF l_continue EQ lc_set AND sy-tcode EQ 'ME21N'.
    Call the POP UP screen to display LPS information.
          CALL FUNCTION 'ZMAN_LSP_POP_UP'
            EXPORTING
              im_vendor = l_pass_vendor
              im_plant  = l_pass_plant
            IMPORTING
              ex_text   = l_text.
    GET Text Object (TTXOB)
          im_header->if_longtexts_mm~get_textobject(
                        IMPORTING ex_tdobject = l_tdobject
                                  ex_metafield = l_metafield ).
    GET TEXT IDS
          im_header->if_longtexts_mm~get_types(
                        IMPORTING ex_texttypes = lt_texttypes ).
    CHECK TEXT TYPE 'F01' EXISTS.
          READ TABLE lt_texttypes INTO ls_texttypes WITH  KEY tdid = lc_id.
          IF sy-subrc EQ 0.
    UPDATING ITEM TEXT.
            MOVE: l_tdobject TO ls_textlines-tdobject,
                  ls_texttypes-tdid TO ls_textlines-tdid,
                  '*' TO ls_textlines-tdformat.
         break prbist.
            ls_text = l_text.
         CONCATENATE l_text ls_texttypes-tdtext INTO ls_textlines-tdline.
           CONCATENATE ls_text-vendor
                       ls_text-plant
                       ls_text-lsp_vendor
                       ls_text-contract_no_text
                                               INTO ls_textlines-tdline SEPARATED BY space.
           APPEND ls_textlines TO lt_textlines.
          INSERT VENDOR
           CLEAR ls_textlines-tdline.
           CONCATENATE lc_vendor ls_text-vendor INTO ls_textlines-tdline SEPARATED BY space.
           APPEND ls_textlines TO lt_textlines.
          INSERT LSP VENDOR
            CLEAR ls_textlines-tdline.
            CONCATENATE lc_lsp_vendor ls_text-lsp_vendor INTO ls_textlines-tdline SEPARATED BY space.
            APPEND ls_textlines TO lt_textlines.
          INSERT CONTRACT TEXT.
            CLEAR ls_textlines-tdline.
            CONCATENATE lc_contract_no_text ls_text-contract_no_text INTO ls_textlines-tdline SEPARATED BY space.
            APPEND ls_textlines TO lt_textlines.
         INSERT A BLANK LINE.
            CLEAR ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
    INSERT addreSS CAPTION.
            CLEAR ls_textlines-tdline.
            MOVE 'Address:' TO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
            break prbist.
    READ THE ADDRESS
            SELECT SINGLE   ort01      " city
                            ort02      " district
                            pfach      " PO Box
                            pstlz      " Postal code
                            regio      "Region (State, Province, County)
                            telf1      "1st telephone number
                            telf2      "2nd telephone number
                            telfx      "Fax number
                            land1      "COUNTRY
            FROM lfa1 INTO ls_address WHERE lifnr = ls_mepoheader-lifnr.
    GET COUNTRY
            SELECT SINGLE landx FROM t005t INTO l_landx WHERE spras = 'E' AND land1 = ls_address-land1.
    INSERT ADDRESS DETAILS.
            CLEAR ls_textlines-tdline.
            CONCATENATE ls_address-ort01 ls_address-ort01 INTO ls_textlines-tdline SEPARATED BY space.
            APPEND ls_textlines TO lt_textlines.
    INSERT COUNTRY.
            CLEAR ls_textlines-tdline.
            MOVE l_landx TO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
    TELEPHONE DETAILS
            CLEAR ls_textlines-tdline.
            CONCATENATE 'Tel:' ls_address-telf1 '/' ls_address-telf2 INTO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
    FAX DETAILS.
            CLEAR ls_textlines-tdline.
            CONCATENATE 'Fax:' ls_address-telfx INTO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
          SAVE THE HEADER LONG TEXT.
            im_header->if_longtexts_mm~set_text(
                          EXPORTING im_tdid = ls_texttypes-tdid
                                    im_textlines = lt_textlines ).
          ENDIF.
        ELSEIF l_continue EQ lc_set AND sy-tcode EQ 'ME59N'.
    No need to display POPUP simply read the values and show.
    if not
        ENDIF. "(l_continue = 'X' and transaction code is ME21N or ME59N)
        CLEAR l_continue.
      ENDIF. "(sy-uname)
    ENDMETHOD.
    Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:15 AM
    Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:21 AM

  • How to know they is space or carrier return when java read a text file.

    Hi,
    Please help.
    How to know they is space or carrier return when java read a text file.
    The reason is that. I want to use java for loop to read each part of value. for example: first part is the items name. After the space (I need to tell java when this is a space here and its need to skip) , following by the items prices in double value and space again (need to skip also) and etc.
    item name1
    item name2
    item name3
    item name4
    item name5
    <--- here is the space to skip and another loop to read following items prices
    item price1
    item price2
    item price3
    item price4
    item price5
    <--- here is another spcae again. and so on
    thank in advance!

    You can check to see if the sting you read in is just nothing, depending on how you're reading it in:
    if((str = inStream.readLine().trim().equals("")))
    // skip and get ready for the next section
    else
    // handle the next item
    The trim() method gets rid of all leading and trailing spaces and I'm assuming you're using a stream that can use the readLine() method that returns a String.
    I hope this is clear. Let me know if it isn't, I'll try and word it different, or post how you're reading the values in if you need more help.

  • Brand new 5s- sometimes phone numbers display when receiving calls and texts instead of contact name.

    Brand new 5s- sometimes phone numbers display when receiving calls and texts instead of contact name. Hard to know who is calling/texting! A few times I've tapped on the text message icon and I can actually watch as the conversations turn from showing just numbers to the contact names. Same thing when looking at call history and voice mail- sometimes it shows numbers and then I'll go back and the contacts will be back. So frustrating!

    boomer1630 wrote:
    - i have a Samsung S3)
    -I have tried using *228 to update.
    You don't dial *228 to update the Preferred Roaming List on 4G phones; I"m surprised the call went through.  The PRL updates are handled by the SIM card. 
    Try this and see if it helps:  turn off the phone, remove the SIM card, and wait a few minutes.  Then re-insert the SIM card, turn the phone back on, and give the phone a few minutes to re-establish a network connection.

  • Why are random spaces being inserted in text on Acrobat Pro 9?

    My apologies if this has been asked & answered before. I did try and search and found some information but I still do not understand the complete picture.
    I am a relatively new user to Acrobat and used 7 prior to upgrading to Pro 9 recently.  I am using it for basic functions only at this point, combining multiple word (Microsoft Word 2003) documents from various authors.  Since upgrading to 9 I have come across a few instances where there were random spaces inserted in the PDF document. These spaces are usually between words or in the middle of words and can be just one or two spaces or 10+ spaces.  After doing some research I think I figured out that these spaces occurred after I had used the Touch Up Text tool to fix a small mistake (likely spelling).  After more research I went into the Change Conversion settings option in Word and removed all of the fonts listed in the 'Never Embed' section of the Fonts tab under advanced settings.  This seemed to solve the problem for a while but now it is occurring again.
    So, my questions are:
    1. Can someone explain to me if my research is correct and using the Touch Up Text tool is what caused the spaces in the first place?
    2. What can I do to ensure that this does not continue to happen while still being able to use the Touch Up Text tool occassionally?
    3. Is there something I am missing? (Highly likely given my lack of experience with Acrobat!)
    I truly appreciate any insight that can be offered. Unfortunately I cannot offer any examples to show you what is happening as I work in a legal environment and I have yet to be able to re-create the issue with something not sensitive.
    Kim

    There is really nothing like a space in an Acrobat pdf file. Each letter is positioned on the page according to the Acrobat language specification (similar to the postscript language). When you edit a pdf file anything can happen. I've seen changing one letter completely screw several lines of text (except for the fact that a line of text is not a pdf concept either). The best recommendation is to edit the original documents---not the pdf file. Sometimes it cannot be helped. Sometimes it works sometimes it doesn't. There are no workarounds for changes that occur when you edit the text in a pdf file.

Maybe you are looking for

  • Why we create Logical filename what is the significance.

    Hi Friends,        What is the use of Logical file name. Where we use it. Thanks&Regards, Naren.

  • Keeps asking for password (automatic downloads)

    Hi! On (nearly) every start iTunes asks for my password (for automatic downloads). Why doesn't it store it? Cu, Bjoern

  • Raid 3 or 5 setup

    Okay, we just got our Xserve RAID in today..., planning to hook it up the our G5 Quad as soon as our FC card gets in. The RAID is a 3.5 T (7-drive) model. It will serve image files (Tiff, PSD, JPEG) to three MacPro workstations. Obviously, redundacy

  • Set maximum instances for FTP polling

    We are in the process of implementing our first BPEL integration involving the FTP Adapter on 10.1.2. However, it is not scaling well. The FTP Adapter is set up to poll an FTP folder containing XML output from our sales system. Each record is in its

  • Steps to debug a workflow

    Hi Gurus,        I need to debug a standard workflow which is ws12300111 and i need the step by step procedure for debugging.i need the flow of bapis which are been used in this workflow. Thanq you, Bhavani.