Search Results

Search found 70 results on 3 pages for 'linebreaks'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Doctrine: textarea line breaks & nl2br

    - by Tom
    Hi, I'm pulling my hair out with something that should be very simple: getting line breaks to show up properly in text that's returned from the database with Doctrine 1.2 I'm saving a message: $body = [text from a form textarea]; $m = new Message(); $m->setSubject($subject); $m->setBody($body); $m->save(); Querying the message: $q = Doctrine_Query::create() ->from('Message m') ->where('m.message_id = ?', $id) ->limit(1); $this->message = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY); In my template: echo $message[0]['body'] ... outputs the text without line breaks echo ln2br($message[0]['body']) ... no difference ... and I've tried every combination I could think of. Is Doctrine doing something to line breaks that's affecting this, or is there something that I'm just missing? Any help would be appreciated. Thanks.

    Read the article

  • TTStyledTextLabel offset between link and regular text when changing from default font

    - by Guy Ephraim
    I'm using Three20 TTStyledTextLabel and when I change the default font (Helvetica) to something else it creates some kind of height difference between links and regular text The following code demonstrate my problem: #import <Three20/Three20.h> @interface TestController : UIViewController { } @end @implementation TestController -(id)init{ self = [super init]; TTStyledTextLabel* label = [[[TTStyledTextLabel alloc] initWithFrame:CGRectMake(0, 0, 320, 230)] autorelease]; label.text = [TTStyledText textFromXHTML:@"<a href=\"aa://link1\">link</a> text" lineBreaks:YES URLs:YES]; [label setFont:[UIFont systemFontOfSize:16]]; [[self view] addSubview:label]; TTStyledTextLabel* label2 = [[[TTStyledTextLabel alloc] initWithFrame:CGRectMake(0, 230, 320, 230)] autorelease]; label2.text = [TTStyledText textFromXHTML:@"<a href=\"aa://link1\">link2</a> text2" lineBreaks:YES URLs:YES]; [label2 setFont:[UIFont fontWithName:@"HelveticaNeue" size:16]]; [[self view] addSubview:label2]; return self; } @end In the screen shot you can see that the first link is aligned and the second one isn't How do I fix it? I think there is a bug in the TTStyledTextLabel code...

    Read the article

  • IE 8 remove line break between nodes with JavaScript

    - by Tokimon
    Ok i have a list of HTML nodes which should be inline with no spacing between them. The problem is, that the nodes are written from a CMS and therefore will come with all sorts of linebreaks and spaces. Therefore I'm removing the spaces with JS using the method descibed in this question. The problem is, however, that in IE (not 9) the white spaces isn't part of the childrens list of the parent node, rendering the method useless in IE. However IE 7 (or at least IE 9 emulating IE 7) ignores the linebreaks, so that one is in the clear. That leaves IE 8 as the troublemaker. I discovered that the line break is actually a part of the outerHTML and that a simple reset of the outerHTML did the trick - like so: node.outerHTML = node.outerHTML However this will reset the node intirely and therefore removing all events and other settings on the node, which isn't really any good. So my question is now: Is there a way to remove that linebreak from the nodes outerHTML whitout resetting the node? I've tried with zoom: 1, but to no avail. Hope anyone has any experience with this.

    Read the article

  • OSX Workgroup Manager error

    - by Bobby Jack
    When trying to carry out admin in Workgroup Manager - specifically, working with users and groups - I'm getting an 'unexpected' error of type 'eDSEmptyAuthStepData'. The full error message is: Error of type eDSEmptyAuthStepData (-14248) on line 850 of /SourceCache/WorkgroupManager/WorkgroupManager-361.3.1/Plugins/ UserAccounts/UserPrivilegesPluginView.m (linebreaks added) Does anyone know how I can go about resolving this?

    Read the article

  • How do I format a String in an email so Outlook will print the line breaks?

    - by MattGrommes
    I'm trying to send an email in Java but when I read the body of the email in Outlook, it's gotten rid of all my linebreaks. I'm putting \n at the ends of the lines but is there something special I need to do other than that? The receivers are always going to be using Outlook. I found a page on microsoft.com that says there's a 'Remove line breaks' "feature" in Outlook so does this mean there's no solution to get around that other than un-checking that setting? Thanks

    Read the article

  • jQuery question

    - by Fuxi
    hi all, i'm having the following string <img alt="over 40 world famous brandedWATCHES BRANDs to choose from " src="http://www.fastblings.com/images/logo.jpg"></strong></a><br> i want to define a regex pattern like <img alt="(.+?)" src="http://(.+?).(jpg|gif)"> but as u can see the target strings has a linebreak in the alt attribute - so how can i incorporate this? the rule should be like "anything in the alt-attribute including linebreaks" thx

    Read the article

  • formatting sourcecode using jQuery

    - by Sorskoot
    Does anyone know if there's a jQuery plugin to format code, XML or HTML? I'm showing the user some code on an html page. I used google prettify to make the code look pretty, but would like some indentation and linebreaks too. any suggestions?

    Read the article

  • need a regex for matching repeating lines of symbols (example: ------------- or *****************)

    - by Haroldo
    I want to be able to remove linebreaks etc that people make by using recurring characters, for example: **************************************************** ---------------------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ etc i'd like to not have to specify which characters it will match, maybe all that are NOT \w characters? also note they will not always start/end on a new line.. is this possible?

    Read the article

  • Windows XP environment variable editor replacement that handles lines

    - by Codism
    I'm looking for an environment variable editor that handles linebreaks well. I have a monster %PATH% to edit (edited to save side-scrolling): C:\Program Files\Windows Resource Kits\Tools\;C:\Program Files\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; C:\cygwin\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;C:\WINDOWS \system32\WindowsPowerShell\v1.0\;C:\Utils;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\; C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\; C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\; C:\Program Files\MKVtoolnix;C:\Program Files\Common Files\Roxio Shared\ DLLShared;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE I want the editor to put each path in a line and when I click save & close, for the editor put the lines back in the right format. Is there an editor that can do that?

    Read the article

  • Credentials work for SSMS but not (ODBC) LogParser script

    - by justSteve
    Via SSMS I'm able to connect and navigate the server/db in question. but trying to connect via a logparser script the same credentials fail. I'm trying to execute this from the same box on which the server's running. the username is owner/dbo of the db. The db has mixed mode authentication. [linebreaks for clarity] C:\TTS\tools\LogParserc:\tts\tools\logparser\logparser file:c:\tts\tools\logparser\errors2SQL.sql?source="C:\inetpub\logs\LogFiles\W3SVC8\u_ex100521.log" -i:IISW3C -o:SQL -createTable:ON -oConnString:"Driver={SQL Server Native Client 10.0};Server=servername\SQLEXPRESS;db=Tter;uid=logger2;pwd=foo" -stats:OFF Task aborted. Error connecting to ODBC Server SQL State: 28000 Native Error: 18456 Error Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'logger2'. C:\TTS\tools\LogParser

    Read the article

  • how can I use vim as a wordprocess with soft wordwrap and columns only 40?

    - by Angela
    I have been trying to use vim as a wordprocessor to do most of my initial drafting and then open in abiword or open office to do my final printing. Problem has been, even with :set linebreak and :set wrap, when I open it, there's a ton of line breaks. I have to go and manually remove them. What I want is to be able to write at 40 columns wrap around softly so that when I open it up in Open Office, it gets restored to whatever that column width is, preserving things like carriage return but without all those linebreaks.

    Read the article

  • Is there any diff tool for XML files?

    - by qedi
    Are there any good (Linux) tools for diffing two XML files? Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. I'll often care that the files are functionally the same, but diff by itself, would be annoying to use, especially if the XML file doesn't have a lot of linebreaks. For example, the following should really be okay to me: <tag att1="one" att2="two"> content </tag> <tag att2="two" att1="one"> content </tag>

    Read the article

  • Remove linebreak at specific position in textfile

    - by williamx
    I have a large textfile, which has linebreaks at column 80 due to console width. Many of the lines in the textfile are not 80 characters long, and are not affected by the linebreak. In pseudocode, this is what I want: Iterate through lines in file If line matches this regex pattern: ^(.{80})\n(.+) Replace this line with a new string consisting of match.group(1) and match.group(2). Just remove the linebreak from this line. If line doesn't match the regex, skip! Maybe I don't need regex to do this?

    Read the article

  • Creating <li> with JavaScript in an XUL Application

    - by echox
    Hi! I try to create some li elements in my XUL Application. Theres only the text of the elements shown, but no list typical bullets and linebreaks. Example: text text text text text text text Heres the JS Code I use to create the list: var li = document.createElement('html:li'); var txt = document.createTextNode("only shown as simple text"); li.appendChild(txt); document.getElementById('someList').appendChild(li); HTML: <html:ul id="someList"> <html:li>this is shown in correct list style</html:li> </html:ul> I tried 'html:li' and also 'li' but nothing worked. Any suggestions?

    Read the article

  • TextMate can't find my RSpec gem in opt (from macports)

    - by sbwoodside
    I know I've had this problem before so I'm really frustrated. I've got the Ruby RSpec bundle installed for TextMate, but when I Run Behaviour Description or Run Focused Example I get this wonderful error: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827: in `report_activate_error': Could not find RubyGem rspec (>= 1.1.0) (Gem::LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261: in `activate' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby /1.8/rubygems.rb:68:in `gem' from /Users/simon/Library/Application Support/TextMate/Bundles/Ruby RSpec.tmbundle/Support/lib/spec_mate.rb:13 from /tmp/temp_textmate.oWRPUR:3:in `require' from /tmp/temp_textmate.oWRPUR:3 (I added linebreaks to make it readable) I'm using macports so my rspec gem is installed in /opt/local/lib/ruby/gems/1.8/gems/. Why isn't it finding it? In Preferences Advanced Shell Variables my TM_RUBY is set to /opt/local/bin/ruby. I also tried the trick here: http://dnite.org/2007/8/28/textmate-and-your-environment-variables/ ... which didn't do anything.

    Read the article

  • Turn off enclosing <p> tags in CKEditor 3.0

    - by Kosi2801
    Is there a possibility to turn off the automatic enclosing of all written content within <p></p> in CKEditor 3.x? I tried CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR; but this just changes the inline linebreaks to <br /> while leaving the enclosing paragraph. Currently writing "Test" produces this output <p> Test</p> but I want it to be simply Test Is there a configuration property for this or would another inline editor to be better suited for this?

    Read the article

  • XHtml Strict, Float: Center ?

    - by Axel Myers
    Hi everyone. I'm having hard time with Xhtml Strict 1.0 and Css. And I'm almost out of solutions. My Site Url: http://www.pro-turk.net/beta/ I made a jquery multilevel dropdown menu for my site. It looks like OK, but I have used inline-block property of css display attribute on navigation menu which is a part of css 2.1 and isn't supported by some browsers (including ie6 and ie7). I want to make #nav li elements block level elements, but to do this and having all of them in same line, the only way is using float in #nav li. But I want to center them in their parent (the menu bar). So I need something like float:center (I know it's pretty stupid and doesn't exist). But is there a way to include block level elements as children elements without linebreaks (I mean without making a block level element). Regards.

    Read the article

  • ActionScript find LineBreak in XML and count them

    - by Pepe Sanchez
    Hi, i have an XML that has line breaks like this: This is a text that has line breaks im reading that xml in action script.. and trying to count how many linebreaks are in the text. Here is my code.. it returns 0 , it should return 5 for the example. function countBreaks(str:String) : Number { var count:Number = 0; for (var i:Number = 0; i < str.length-1; i++) { if(str.charAt(i)+str.charAt(i+1) eq "\n") count++; } return count; } I appreciate any help :)

    Read the article

  • How do I get the name of the newest file via the Terminal?

    - by Alec
    I'm trying to create a macro for Keyboard Maestro for OS X doing the following: Get name of newest file in a directory on my disk based on date created; Paste the text "newest file: " plus the name of the newest file. One of its options is to "Execute a shell script", so I thought that would do it for 1. After Googling around a bit I came up with this: cd /path/to/directory/ ls -t | head -n1 This sorts it right, and returns the first filename. However, it also seems to includes a line break, which I do not want. As for 2: I can output the text "newest file: " with a different action in the app, and paste the filename behind that. But I'm wondering if you can't return "random text" + the outcome of the ls command. So my question is: can I do this only using the ls command? And how do I get just the name of the latest file without any linebreaks or returns?

    Read the article

  • What's the best example of pure show-off code you've seen?

    - by Damovisa
    Let's face it, programmers can be show-offs. I've seen a lot of code that was only done a particular way to prove how smart the person who wrote it was. What's the best example of pure show-off code you've seen (or been responsible for) in your time? For me, it'd have to be the guy who wrote FizzBuzz in one line on a whiteboard during a programming interview. Not really that impressive in the scheme of things, but completely unnecessary and pure, "look-what-I-can-do". I've lost the original code, but I think it was something like this (linebreaks for readability): Enumerable.Range(1,100).ToList().ForEach( n => Console.WriteLine( (n%3==0) ? (n%5==0) ? "FizzBuzz" : "Fizz" : (n%5==0) ? "Buzz" : n ) );

    Read the article

  • Minify CSS using preg_replace

    - by x3ro
    Hey folks, I'm trying to minify multiple CSS files using preg_replace. Actually, I'm only trying to remove any linebreaks/tabs and comments from the file. the following works for me: $regex = array('{\t|\r|\n}', '{(/\*(.*?)\*/)}'); echo preg_replace($regex, '', file_get_contents($file)); But I'd like to do it in a single multiline regex, like this: $regex = <<<EOF {( \t | \r | \n | /\*(.*?)\*/ )}x EOF; echo preg_replace($regex, '', file_get_contents($file)); However, this does not do anything at all. Is there any way to do this? Regards, x3ro Edit: Ok, so I'll take a look at existing minifiers, but it still leaves me with the question how I would do a multiline regex like this, because with the x-modifier multiline regexs should work fine even in php, shouldn't they?

    Read the article

< Previous Page | 1 2 3  | Next Page >