Quantcast
Channel: Active questions tagged newline - Stack Overflow
Browsing all 97 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to add line break into XML file with Java?

How to add line break after the "do not edit this file" comment? I've tried to add textnode with line break but it doesn't work.Code:import java.io.File;import...

View Article



VueJS newline character is not rendered correctly

I got the following problem, I read data string from an API which contains new line characters \n and I want to display them correctly in my template. But when I do something like:<p>{{ mytext...

View Article

Newline in node label in dot (graphviz) language

Does anyone know how to put newline in the label of the node? \n is not working - instead some new nodes appear.

View Article

Removing a newline character at the end of a file

To remove all newlines you could, say:tr -d '\n'< days.txtcat days.txt | tr -d '\n'but how would you use tr to remove just the newline at the end/bottom of a text file?I'm not sure to specify just...

View Article

with php, how to embed a newline in an output string [closed]

Is there a way to get something like the following php snippet to produce two lines (ie., 'xxx' and 'yyy', respectively), rather than both on a single line? (I'm running php under Windows...

View Article


Image may be NSFW.
Clik here to view.

Why does Powershell xml.save create LFs in multi line comments on Windows?

I found out that xml.save ends multi line comments with LF on windows instead of CR LF. Why is that? Here is my code [xml]$myXml= @"<myTag><!-- multi line comment each line ends with CR LF in...

View Article

Match a space or newlines [duplicate]

I'm using the following code to check WordPress version remotely.preg_match('/<meta name="generator" content="WordPress (\d+(\.\d+)*)"/i', $html_content, $matches);If the website's meta tag is in...

View Article

Is it possible to separate this print line so that it prints on separate...

your_name = input("Please tell me your name: ")your_age = int(input("Please tell me your age: "))print_times = int(input("How many times would you like to print this message? "))years_old = 2023 + 100...

View Article


How to prevent that CR and LF are changed when writing bytes to file?

I have a function that returns a string. The string contains carriage returns and newlines (0x0D, 0x0A). However when I write to a file it contains only the new line feeds. Is there a way to get the...

View Article


Notebook is printing ' \n \tat' as it if as part of the string

I am doing a query on database, using a Python notebook, and retrieving a string. After retrieving I print this string, like print(string) and I have something like"blabla\n \tat blabla\n \tat". As you...

View Article

Image may be NSFW.
Clik here to view.

Windows notepad not supporting newline character '\n'

From my iPhone application I'm outputting data from text to a file. When opened with windows notepad, the data is all on one line and where there should be a new line a block character is present...

View Article

how the null value '\0' assign in the exacted \n index?

printf("enter destination file name to print : "); fgets(target_file, sizeof(target_file), stdin); target_file[strcspn(target_file, "\n")] = '\0' if(target_file == NULL){ printf("enter any key to exit...

View Article

How do I add a newline to a windows-forms TextBox?

I am trying to add a line of text to a TextBox component in VB.net, but I cannot figure out for the life of me how to force a new line. Right now it just adds onto what I have already, and that is not...

View Article


How to find files that contain MULTIPLE newlines at their end?

I want to find all files that have multiple new line characters at the end of their content.How is this possible?

View Article

newline in Leaflet marker popup text

I have a form to associate some text to a marker on a Leaflet map:<form action="map.php" method="POST"><section><label>write some text here</label><textarea id="text"...

View Article


Why do I keep getting "[eslint] Delete `CR` [prettier/prettier]"?

I am using VS Code with Prettier 1.7.2 and ESLint 1.7.0.After every newline I get:[eslint] Delete `CR` [prettier/prettier]This is the .eslintrc.json:{"extends": ["airbnb",...

View Article

git alias for creating a .gitattributes on init - how do I add the new lines?

My latest iterationjinit= !git init && printf "* text=auto\n*.java text\n*.jsp text\n*.css text\n*.html text\n*.js text\n*.xml text\n*.sql text\n*.MF text\n*.tld text\n*.md text\n\n# git...

View Article


Render a string in HTML and preserve spaces and linebreaks

I have an MVC3 app that has a details page. As part of that I have a description (retrieved from a db) that has spaces and new lines. When it is rendered the new lines and spaces are ignored by the...

View Article

Git attributes: `-text` vs `eol=lf`

I want to configure a git repository in a way that all checkouts use LF as line endings, even on windows if core.autocrlf is enabled. I got the following ideas from the documentation:text means: the...

View Article

PdfWriter Python how to update field with multiline text

I've been trying for hours to insert a multiline text into a PDF with Python but none of the potential solutions worked. I've looked at multiple libraries and other solutions but none of them were...

View Article
Browsing all 97 articles
Browse latest View live




Latest Images