How do I achieve the effect of preformated text in SSRS?
For example, this is what I see,
First Line of text
Second line of text
Third line of text
But I would like to see
First Line of text
Second line of text
Third line of text
The problem is obviously the leading spaces that I used in every line to indent the lines themselves. When those lines are rendered in SSRS (which is web based), the consecutive whitespaces are ignored.
Related
I have been able to extract text from multiple pdf files but the original files had double line spacing within 1 column of text which was wrapped or justified so my extracted text also has alot of CR LF within. My issue is when the text wraps sentences also contain CR LF
toy example
This sentence continues
on this line. Next ....
I don't want to loose all the spacing structure like paragraphs so is there a way to unwrap (un-justify) text using python without removing all spacing in the document or intelligently join the lines back?
Eventually I want to spell check the text with Spacy after additional text processing to handle non english text but the justified/wrapped text may be causing misspellings and difficultly detecting all the non english text.
I have big data at excel, and some cells contains html codes. These cells have line breaks in them. I tried to replace line breaks (Alt+010, \n) but excel said there is no char like this.
When I copied cell to notepad, there is no line break.
When I copied from notepad to phpmyadmin sql area or textpad, I see line breaks again.
There are notepad, textpad and phpmyadmin sql area screenshots below. How can I remove these invisible line breaks?
This could be a problem with Carriage Return + Line Feed. When you press Alt+Enter in Excel it only incerts a Line Feed. But if you somehow get both Carriage Return + Line Feed in a cell that could leed to additional problems. See this page for solutions:
https://www.ablebits.com/office-addins-blog/2013/12/03/remove-carriage-returns-excel/
Did you try to remove any unnecessary tab within the code? Also check for some trivial things like e.g string max length in your mysql database or editor's miscellaneous settings.
EDIT. oh, I forgot. It may be also caused by your language settings, check for default database's regional coding preset and if Turkish is currently supported.
Line breaks - do you mean the line breaks you could introduce in Excel with ALT+ENTER?
Then you could use Search / Replace option in Excel without need to copy your content to another tool:
Open it and introduce in Search for CTRL+J (you will receive a point displayed in the search field).
In Replace you could introduce what you want (nothing, a space, a semicolon, ...).
Select Replace all.
EDIT:
I've tested it by copying html from textpad to one cell using clipboard. With this the method described by me is not working.
But there is another solution: Open replace command, for "search string" introduce ALT-Key (keep it pressed), then introduce by using the numeric key pad (on the right side of a "standard" keyboard) the tree digits 0 1 0 and finally release ALT-Key (you will see a point displayed in the search field). Choose as replacement string what you want and choose replace all.
Function =clean() helped me. Find/replace with ALT+J worked to replace, but did not fully deleted all the invisible characters in the string, so the cell was still misbehaving with text in columns. The =clean() function finally removed all the invisible characters left there.
I'm trying to add/paste different lines of text to existing lines of text via notepad++.
I have a text file with a list of towns/cities and I need to add a comma and then longitude and latitude values after the town/city name like this:
Preston,55.8091,-2.3364
Reston,55.85201,-2.1973
Sinclair's Hill,55.74975,-2.29538
St Abbs,55.89951,-2.13229
How is this done? I can do this for identical text by using replace $ and replace with. But this only works for identical text.
To use command :set number in vim can add numbers at the beginning of the every line.
But the line number is not part of the line contents ,when you copy the contents ,the line number will not be in it ,how can i create the line number ,and make it be the part of the line content ,you can copy and paste the number with every line?
I believe that you are looking for this line:
:%s/^/\=line('.').' '/
this will add line number to each line of text.
note:
the original text would be changed.
the line number won't be automatically fixed if you add new line or remove lines, they are parts of your text (line content), as you wished.
FYI
if you are on linux box, you may consider to use other tool(s) to get line-numbered text output, without changing your original text, like:
nl file
cat -n file
awk '$0=NR" "$0' file
.....
In the visual studio 2012 editor, I don't need to remove entire or multiple blank lines as all of the other stuff I could search on S/O is concerned with. I want to select multiple lines of aspx markup (usually from 2 to 10 or so) and remove the line endings on multiple lines of source code so that you end up with everything that was in the selected lines on one line. A small example of what I want to do is:
BEFORE source code:
[dx:GridViewTextColumn ID="Inactive"
Width="50"]
[/dx:GridViewTextColumn]
AFTER:
[dx:GridViewTextColumn ID="Inactive" Width="50"][/dx:GridViewTextColumn]
(replace the "[" chars above with "<" chars, and "]" with ">" chars, I entered it that way just to get it to display somewhat properly here)
It seems like this should be pretty simple, but I have tried various search/replace and regex values that are talked about in the many articles that talk about removing entire blank lines, but can't get anything to work. A little help? :)
** 2014-02-06 at 2306 hrs update:
Still trying, but this gets me really close:
In Visual Studio 2012 ide.
Working in an aspx file with its xml markup.
Do Ctrl-H to do a string search/replace on a selected stretch of xml (from start to finish of a particular well-formed tag, which may or may not contain subtags, but each tag is on a separate line).
Specify the following in the from textbox:
\s{2,}
Specify one blank space in the to textbox.
For the first example I gave, the result would be:
[dx:GridViewTextColumn ID="Inactive" Width="50"] [/dx:GridViewTextColumn]
Note the single blank space between the separate tags (after the first ']' character and before the second '[' character) . If I could figure out how to not have that space in the result it would be perfect.
** 2014-02-06 at 2322 hrs update:
Oh duh. Otay, I think I got it, the from textbox value is the same, but for the to textbox value, instead of a single space, just have nothing. That seems to work for my specific use case (selecting a certain amount of xml within aspx markup and making it all be on a single line with no extraneous blank spaces). Yay!
In the VS2012 ide, Ctrl-H dialog, specify regex, then in the from textbox put:
\s{2,}
and in the to textbox put nothing.
Execute on whatever amount of xml that you have selected (from the beginning tag less-than character to its matching ending tag greater-than character, along with any/all subtags in between, over any number of lines of source code).
What you have selected will be condensed to one line of source code without any extraneous blank spaces present.
This seems to work for the xml that is in .NET aspx markup (what I specifically needed); not guaranteed to work anywhere else.