Search Results

Search found 256 results on 11 pages for 'multiline'.

Page 1/11 | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Disable inserted lines in multiline TextBox

    - by Shohin
    I have a multiline Textbox for my web page. When user logs in and enters text and press "Save" button, data will be saved. Then, next time when the same user logs in and searches for data, I want him to edit only new text in multiline TextBox, not removing or replacing previously entered text. Is there any way to make multiline TextBox to lock inserted lines or inserted text and allow to only add text? Thanks in advance.

    Read the article

  • Help needed with pyparsing [closed]

    - by Zearin
    Overview So, I’m in the middle of refactoring a project, and I’m separating out a bunch of parsing code. The code I’m concerned with is pyparsing. I have a very poor understanding of pyparsing, even after spending a lot of time reading through the official documentation. I’m having trouble because (1) pyparsing takes a (deliberately) unorthodox approach to parsing, and (2) I’m working on code I didn’t write, with poor comments, and a non-elementary set of existing grammars. (I can’t get in touch with the original author, either.) Failing Test I’m using PyVows to test my code. One of my tests is as follows (I think this is clear even if you’re unfamiliar with PyVows; let me know if it isn’t): def test_multiline_command_ends(self, topic): output = parsed_input('multiline command ends\n\n',topic) expect(output).to_equal( r'''['multiline', 'command ends', '\n', '\n'] - args: command ends - multiline_command: multiline - statement: ['multiline', 'command ends', '\n', '\n'] - args: command ends - multiline_command: multiline - terminator: ['\n', '\n'] - terminator: ['\n', '\n']''') But when I run the test, I get the following in the terminal: Failed Test Results Expected topic("['multiline', 'command ends']\n- args: command ends\n- command: multiline\n- statement: ['multiline', 'command ends']\n - args: command ends\n - command: multiline") to equal "['multiline', 'command ends', '\\n', '\\n']\n- args: command ends\n- multiline_command: multiline\n- statement: ['multiline', 'command ends', '\\n', '\\n']\n - args: command ends\n - multiline_command: multiline\n - terminator: ['\\n', '\\n']\n- terminator: ['\\n', '\\n']" Note: Since the output is to a Terminal, the expected output (the second one) has extra backslashes. This is normal. The test ran without issue before this piece of refactoring began. Expected Behavior The first line of output should match the second, but it doesn’t. Specifically, it’s not including the two newline characters in that first list object. So I’m getting this: "['multiline', 'command ends']\n- args: command ends\n- command: multiline\n- statement: ['multiline', 'command ends']\n - args: command ends\n - command: multiline" When I should be getting this: "['multiline', 'command ends', '\\n', '\\n']\n- args: command ends\n- multiline_command: multiline\n- statement: ['multiline', 'command ends', '\\n', '\\n']\n - args: command ends\n - multiline_command: multiline\n - terminator: ['\\n', '\\n']\n- terminator: ['\\n', '\\n']" Earlier in the code, there is also this statement: pyparsing.ParserElement.setDefaultWhitespaceChars(' \t') …Which I think should prevent exactly this kind of error. But I’m not sure. Even if the problem can’t be identified with certainty, simply narrowing down where the problem is would be a HUGE help. Please let me know how I might take a step or two towards fixing this.

    Read the article

  • Match multiline regex in file object

    - by williamx
    How can I extract the groups from this regex from a file object (data.txt)? import numpy as np import re import os ifile = open("data.txt",'r') # Regex pattern pattern = re.compile(r""" ^Time:(\d{2}:\d{2}:\d{2}) # Time: 12:34:56 at beginning of line \r{2} # Two carriage return \D+ # 1 or more non-digits storeU=(\d+\.\d+) \s uIx=(\d+) \s storeI=(-?\d+.\d+) \s iIx=(\d+) \s avgCI=(-?\d+.\d+) """, re.VERBOSE | re.MULTILINE) time = []; for line in ifile: match = re.search(pattern, line) if match: time.append(match.group(1)) The problem in the last part of the code, is that I iterate line by line, which obviously doesn't work with multiline regex. I have tried to use pattern.finditer(ifile) like this: for match in pattern.finditer(ifile): print match ... just to see if it works, but the finditer method requires a string or buffer. I have also tried this method, but can't get it to work matches = [m.groups() for m in pattern.finditer(ifile)] Any idea?

    Read the article

  • Java multiline string

    - by skiphoppy
    Coming from Perl, I sure am missing the "here-document" means of creating a multi-line string in source code: $string = <<"EOF" # create a three line string text text text EOF In Java I have to have cumbersome quotes and plus signs on every line as I concatenate my multiline string from scratch. What are some better alternatives? Define my string in a properties file? Edit: Two answers say StringBuilder.append() is preferable to the plus notation. Could anyone elaborate as to why they think so? It doesn't look more preferable to me at all. I'm looking for away around the fact that multiline strings are not a first-class language construct, which means I definitely don't want to replace a first-class language construct (string concatenation with plus) with method calls. Edit: To clarify my question further, I'm not concerned about performance at all. I'm concerned about maintainability and design issues.

    Read the article

  • vbCrLf in Multiline TextBox shows up only when .Trim() is called

    - by Brandon Montgomery
    I have an ASP TextBox with TextMode set to MultiLine. I'm having problems with preserving the vbCrLf characters when a user tries to put line breaks into the text. When a button on the page is pressed, I'm taking the text from the control, trimming it using String.Trim, and assigning that value to a String property on an object (which, in turn assigns it to a private internal String variable on the object). The object then takes the value from the private internal variable and throws it into the database using a stored procedure call (the SP parameter it is put into is an nvarchar(4000)). ASPX Page: <asp:UpdatePanel ID="UpdatePanel2" runat="server" RenderMode="Inline" UpdateMode="Conditional" ChildrenAsTriggers="true"> <ContentTemplate> <!-- some other controls and things --> <asp:TextBox TextMode="MultiLine" runat="server" ID="txtComments" Width="100%" Height="60px" CssClass="TDTextArea" Style="border: 0px;" MaxLength="2000" /> <!-- some other controls and things --> </ContentTemplate> </asp:UpdatePanel> code behind: ProjectRequest.StatusComments = txtComments.Text.Trim object property: Protected mStatusComments As String = String.Empty Property StatusComments() As String Get Return mStatusComments.Trim End Get Set(ByVal Value As String) mStatusComments = Value End Set End Property stored proc call: Common.RunSP(mDBConnStr, "ProjectStatusUpdate", _ Common.MP("@UID", SqlDbType.NVarChar, 40, mUID), _ Common.MP("@ProjID", SqlDbType.VarChar, 40, mID), _ Common.MP("@StatusID", SqlDbType.Int, 8, mStatusID), _ Common.MP("@Comments", SqlDbType.NVarChar, 4000, mStatusComments), _ Common.MP("@PCTComp", SqlDbType.Int, 4, 0), _ Common.MP("@Type", Common.TDSqlDbType.TinyInt, 1, EntryType)) Here's the strangest part. When I debug the code, if I type "test test" (without the quotes) into the comments text box, then click the save button and use the immediate window to view the variable values as I step through, here is what I get: ?txtComments.Text "test test" ?txtComments.Text.Trim "test test" ?txtComments.Text(4) " "c ?txtComments.Text.Trim()(4) " "c Anyone have a clue as to what's going on here?

    Read the article

  • Multiline values in dropdown (ComboBox)

    - by Vladimir Kuzin
    Is there are any libraries to make ComboBox to select multiline options when expanded. I am looking something similar to Combobox in ExtJS except values have to appear when user clicks down arrow, like in normal dropdown. Does someone know if its possible to do something like that with ExtJS? Because their own community and support sure doesn’t (http://www.extjs.com/forum/showthread.php?t=94079)

    Read the article

  • HOW TO SElect line number in TextBox Multiline

    - by Alhambra Eidos
    Hi all, I have large text in System.Windows.Forms.TextBox control in my form (winforms), vs 2008. I want find a text, and select the line number where I've found that text. Sample, I have fat big text, and I find "ERROR en línea", and I want select the line number in textbox multiline. string textoLogDeFuenteSQL = @"SQL*Plus: Release 10.1.0.4.2 - Production on Mar Jun 1 14:35:43 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. ** MORE TEXT **** Conectado a: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, Data Mining and Real Application Testing options WHERE LAVECODIGO = 'CO_PREANUL' * ERROR en línea 2: ORA-00904: ""LAVECODIGO"": identificador no v?lido INSERT INTO COM_CODIGOS * ERROR en línea 1: ORA-00001: restricción única (XACO.INX_COM_CODIGOS_PK) violada"; ** MORE TEXT **** Any sample code about it ? thanks in advanced,

    Read the article

  • Multiline for WPF TextBox

    - by baron
    I am developing a app for sending some feedback. Basically i'm trying to make a TextBox for comments, but i'm used to the WinForms MultiLine=true. I've set MinLines to 3, which is getting there, but preferably i'd like if user is able to type wherever in this block, like press enter and do dot points sort of thing - like: - Item 1 blah - Item 2 blahlb lahbvl d But at the moment the text all stays on one line. - Item 1 blah - Item 2 blahb blahb blah This comments will then help fill the body of an email which is sent. It may be pointless if I can't easily keep the same formatting when putting this string into the email body string (so that it looks like it does when sent as it does when typed). Can I achieve what I'm after or do I have to leave it as all text on one line?

    Read the article

  • Textarea (asp:Textbox TextMode="Multiline") overlapping buttons

    - by Gogster
    Hi all, I'm having this problem with form buttons overlapping an asp:Texbox with TextMode set to multi-line: Here is the code: <asp:Panel ID="pnlGiftStep" Visible="false" runat="server"> <img src="/images/shopping-cart/form-separator.png" alt="separator" /> <div class="form-title">GIFT OPTIONS</div> <div class="row"> <asp:TextBox ID="txtGiftName" Height="31" Width="323" BorderStyle="None" Font-Names="Arial" Font-Size="116.7%" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="wmeGiftName" TargetControlID="txtGiftName" WatermarkText="Gift Name" WatermarkCssClass="watermark" runat="server"></cc1:TextBoxWatermarkExtender> </div> <br class="clear" /> <div class="row"> <asp:TextBox ID="txtGiftMessage" Rows="5" Width="323" BorderStyle="None" Font-Names="Arial" TextMode="MultiLine" Font-Size="116.7%" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="wmeGiftMessage" TargetControlID="txtGiftMessage" WatermarkText="Gift Message" WatermarkCssClass="watermark" runat="server"></cc1:TextBoxWatermarkExtender> </div> <br class="clear" /> <div class="button-row"> <asp:ImageButton ID="imbShippingDetails" ImageUrl="/images/shopping-cart/ship-details-btn.png" OnClick="ReturnToShipping" ValidationGroup="shipping" runat="server" /> <asp:ImageButton ID="imbPayDetails" ImageUrl="/images/shopping-cart/pay-details-btn.png" ValidationGroup="pay" runat="server" /> </div> <br class="clear" /> </asp:Panel> Here is the CSS: .row { float:left; height:40px; } .button-row { float:left; width:323px; text-align:right; } Any ideas how I can stop this? Thanks.

    Read the article

  • Multiline editable textarea in SVG

    - by Timo
    I'm trying to implement multiline editable textfield in SVG. I have the following code in http://jsfiddle.net/ca4d3/ : <svg width="1000" height="1000" overflow="scroll"> <g transform="rotate(5)"> <rect width="300" height="400" fill="#22DD22" fill-opacity="0.5"/> </g> <foreignObject x="10" y="10" overflow="visible" width="10000" height="10000" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <p style="display:table-cell;padding:10px;border:1px solid red; background-color:white;opacity:0.5;font-family:Verdana; font-size:20px;white-space: pre; word-wrap: normal; overflow: visible; overflow-y: visible; overflow-x:visible;" contentEditable="true" xmlns="http://www.w3.org/1999/xhtml"> Write here some text. Be smart and select some word. If you wanna be really COOL, paste here something cool! </p> </foreignObject> </svg> In newest Chrome, Safari and Firefox the code works in some way, but in Opera and IE 9 not. The goal is that: 0) Works in newest Chrome, Safari, Firefox, Opera and IE and if ever possible in some pads. 1) White-spaces are preserved and text wraps only on newline char (works in Chrome, Safari and Firefox, but not in Opera and IE 9 *). 2) The textfield is editable (in the same reliable and stabile way as textareas and contenteditable p elements in html) and height and width is expanded to fit text (works in Chrome, Safari and Firefox, but not in Opera and IE 9 *). 3) Texfield can be transformed (rotated, skewed, translated) while maintaining text editability (Tested rotation, but not work in any browser *). EDIT: Foreignobject rotation works on Firefox 15.0.1, but not in Safari 5.1.7 (6534.57.2), Chrome 22.0.1229.79, Opera 12.02, IE 9. Tested on Mac OS X 10.6.8. 4) Textfield can be clipped and masked while not necessarily maintaining text editability (not yet tested). *) using above code These all can be achieved using Flash, but Flash has so severe problems that it is not suitable for my purposes (after every little change in code, all have to be compiled again using Flex, which is slow, font size has limits, tracking technique is pixeloriented, not relative to em size etc.) and there still are differences across platforms. And I want to give a try to SVG! GUESTION: Can I achieve my goals 0-4 with current SVG support in browsers? Is coming SVG 2.0 for some help in this case? EDIT: Changed display:table to display:table-cell (and added new jsfiddle), because display:table made the field to loses focus when pressed arrow-up on first text row.

    Read the article

  • android ellipsize multiline textview

    - by Arutha
    I need to ellipsize multiligne textview. My component is large enough to display at least 4 lines with the ellipse, but only 2 lines are displayed. I tried to change the minimum and maximum number of rows in the component but it changes nothing

    Read the article

  • Multiline TextBox control in WPF

    - by Stian Karlsen
    For some reason I need the content of a TextBox to span multiple lines, and I need this to be defined directly in XAML. I know I can set TextWrapping="Wrap", and I will do that too, but what I need to do is add newlines anywhere I want in the TextBox. Can this be done in XAML? I know the following example won't work, but what I want is something like this: <TextBox>Test1 \n Test2 \n Test3</TextBox> .. and then have these displayed on three lines. Test1 Test2 Test3

    Read the article

  • VB multiline string as XML Literals

    - by Mike Koerner
    Probably known by most programmers, but I want to document it so I can find it myself later.An easy way to create a multiline VB string is to create a xml literal and use the valueDim myTest = <string>Here is a multiline string that I want to use insome other code.  Ithelps the readability andcut and paste functionality.Even if this is a poor example</string>Dim strInside as string = myTest.value

    Read the article

  • Multiline Replacement With Visual Studio

    - by Alois Kraus
    I had to remove some file headers in a bigger project which were all of the form #region File Header /*[ Compilation unit ----------------------------------------------------------       Name            : Class1.cs       Language        : C#     Creation Date   :      Description     : -----------------------------------------------------------------------------*/ /*] END */ #endregion I know that would be a cool thing to write a simple C# program use a recursive file search, read all lines skip the first n lines and write the files back to disc. But I wanted to test things first before I ruin my source files with one little typo. There comes the Visual Studio Search and Replace in Files dialog into the game. I can test my regular expression to do a multiline match with the Find button before actually breaking anything. And if something goes wrong I have the Undo button.   There is a nice blog post from Paulo Morgado online who deals with Multiline Regular expressions. The Visual Studio Regular expressions are non standard so you have to adapt your usual Regex know how to the other patterns. The pattern I cam finally up with is \#region File Header:b*(.*\n)@\#endregion The Regular expression can be read as \#region File Header Match “#region File Header” \# Escapes the # character since it is a quantifier. :b* After this none or more spaces or tabs can follow (:b stands for space or tab) (.*\n)@ Match anything across lines in a non greedy way (the @ character makes it non greedy) to prevent matching too much until the #endregion somewhere in our source file. \#endregion Match everything until “#endregion” is found I had always knew that Visual Studio can do it but I never bothered to learn the non standard Regex syntax. This is powerful and it is inside Visual Studio since 2005!

    Read the article

  • XML multiline comments in C# - what am I doing wrong?

    - by Dave
    According to this article, it's possible to get multiline XML comments -- instead of using ///, use /** */. This is my interpretation of what multiline comments are, and what I want to have happen: /** * <summary> * this comment is on line 1 in the tooltip * this comment is on line 2 in the tooltip * </summary> */ However, when I use this form, the tooltip that pops up when I hover over my class name in my code is single-line, i.e. it looks exactly as if I had written my comment like this: /// <summary> /// this comment is on line 1 in the tooltip /// this comment is on line 2 in the tooltip /// </summary> Is this behavior actually possible still in VS2008?

    Read the article

  • can I have multiline text with GD and PHP?

    - by alekone
    hello! I'm trying to output multiline text with GD+PHP but can't get it working. my php knowledge is really basic. here's the code, any idea on how to output 2 or 3 lines of text? $theText = (isset($_GET['caption']))? stripslashes($_GET['caption']) :''; imagettftext($baseImage, $textSize, $textAngle, $textXposition, $textYposition, $textColor, $fontName, $theText);

    Read the article

  • Formatting: Group Multiline Alignment - Added

    - by Petr
    One week ago I have added two new properties for formating PHP code into NetBeans 7.1. In Alignment category there are new properties for Group Multiline Alignment - Assignment and Array Initializer.  The Assignment property influence position of the char '=' in a group of lines with assignments.  Let see the pictures below.  On the left site -  Assignment property is off and on the right site the property is on. As you can see, when the property is set on, then the assignment char '=' is placed after the longest identifier in a group. The group is defined as a number of lines that contains the same type of assignments. End of a group can be empty line, line where is only a comment, different expression, end of a block. This formatting options works for variable assignment, field initialization and constants.  The second new property is for Array Initializer.   Both properties are switched off by default. If you will play with it, please file any problem into our Bugzilla.  

    Read the article

  • CPP extension and multiline literals in Haskell

    - by jetxee
    Is it possible to use CPP extension on Haskell code which contains multiline string literals? Are there other conditional compilation techniques for Haskell? For example, let's take this code: -- If the next line is uncommented, the program does not compile. -- {-# LANGUAGE CPP #-} msg = "Hello\ \ Wor\ \ld!" main = putStrLn msg If I uncomment {-# LANGUAGE CPP #-}, then GHC refutes this code with a lexical error: [1 of 1] Compiling Main ( cpp-multiline.hs, cpp-multiline.o ) cpp-multiline.hs:4:17: lexical error in string/character literal at character 'o' Using GHC 6.12.1, cpphs is available. I confirm that using cpphs.compat wrapper and -pgmP cpphs.compat option helps, but I'd like to have a solution which does not depend on custom shell scripts. -pgmP cpphs does not work. P.S. I need to use different code for GHC < 6.12 and GHC = 6.12, is it possible without preprocessor?

    Read the article

  • NCurses, scrolling of multiline items, "current item" pointer and "selected items"

    - by mjf
    I am looking for hints/ideas for the best (most effective) way on how to scroll multi-line items as well as emphasizing of the "current item" and "selected items" such as: 1 FOO ITEM 1 Foo sub-item 2 Foo sub-item 3 Foo sub-item 2 BAR ITEM 1 Bar sub-item 3 BAZ ITEM 1 Baz sub-item 2 Baz sub-item 4 RAB ITEM 5 ZZZ ITEM 1 Zzz sub-item 2 Zzz sub-item 3 Zzz sub-item 4 Zzz sub-item using NCurses (some combination of windows, sub-windows, pads, copywin? Uff! In fact, the lines could exceed the stdscr's width so that possibility to scroll left/right would be also nice - pads?)... The whole items (including the sub-items) are supposed to be emphasized as full-width window/pad areas. The "current item" (including it's set of lines) should be emphasized (i.e. using A_BOLD), selected set of items of choice (including the set of lines for each the selected item) should be emphasized in another way (i.e. using A_REVERSE). What would you choose to cope with it the most effective NCurses way? (The less redrawals/refreshes the better and terminal is supposed to have the ability to change it's size - such as XTerm running under "floating window" management.) Thank you for your ideas (or perhaps some piece of code where something similar is already solved - I was not able to find anything helpful on the Internet. I mean I am not going to copy/paste foreign code but programming NCurses properly is still somehow difficult to me). P.S.: Would you suggest to "smooth-scroll" +1/-1 screen line or rather "jump-scroll" +lines/-lines of the items? (I personally prefer the latter one.) Sincerely, -- mjf

    Read the article

  • Recursive multiline sed - remove beginning of file until pattern match.

    - by yaya3
    I have nested subdirectories containing html files. For each of these html files I want to delete from the top of the file until the pattern <div id="left- This is my attempt from osx's terminal: find . -name "*.html" -exec sed "s/.*?<div id=\"left-col/<div id=\"left-col/g" '{}' \; I get a lot of html output in the termainal, but no files contain the substitution or are written Thanks

    Read the article

  • Multiline Equation won't center and align on equals sign

    - by cubicleWar
    I have a multiline equation which I wish to align on the '=' and center the equation block on the page. I have selected align on '=' and center as a group, however the equation group becomes left justified on the page (and aligned on the =). No matter what I do I cannot get it to concurrently center the group on the page and also align on the '='. Does anyone know what setting at what level would cause this type of behavior? (I'm using MS Word 2011 on OS X 10.8)

    Read the article

1 2 3 4 5 6 7 8 9 10 11  | Next Page >