Removal of Next Lines from Notepad huge data - alignment

Hi, I have this data of Bricks which are separated by Next line, I want all to be in the from of Last Line. I can't do it manually one by one because it's very huge data. Can anyone please guide me the easiest way or built in functionality of notepad or notepad++. Thank you
Click the link to see my file and data.
Regards,
Mubasher Aqeel

Use "Line Operations" to remove line breaks
You just need to remove the new lines. Using Notepad++ that is as simple as:
Ctrl + A (to select everything)
Press Ctrl + J (which is the shortcut for "Edit → Line Operations → Join Lines")
Use search/replace
Alternatively you can do it more manually using:
Ctrl + H (Replace)
Choose "extended" under "Search Mode" and replace occurrences of "\r\n" (line breaks) with a blank.

Related

Copy & paste folded text in Visual Studio Code

Given the following text
Node1_L1
Node1_L2
Node2_L2
Node2_L1
Node3_L2
Node1_L3
Node2_L3
Node4_L2
Node3_L3
Node4_L3
Node3_L1
Node5_L2
Node6_L2
I can use vscode's built-in folding feature to fold it to look like so
+ Node1_L1
Node2_L1
+ Node3_L2
+ Node4_L2
Node3_L1
Node5_L2
Node6_L2
but when I now select the folded text and copy & paste it then it actually grabbed all text - also the hidden one. The result of copy & paste of the first 4 lines of the folded text above would therefore be
Node1_L1
Node1_L2
Node2_L2
Node2_L1
Node3_L2
Node1_L3
Node2_L3
Node4_L2
whereas I would like to have
Node1_L1
Node2_L1
Node3_L2
Node4_L2
Hope that makes sense and someone knows a way to do it. Thanks!
Maybe there is another way of doing it but a workaround seems to be using block selection with multiple cursors - see the GIF
If the selection doesn't include the new line and carriage return, folded content will not be copied.
The selection must go to the start of the next line to select the folded text ( hidden text )
https://github.com/Microsoft/vscode/issues/41922#issuecomment-359368290
The op actually wants to select 'unfolded' text ignoring the folded text so they need to use a multi-line select where each selection will span a single line

Copy a table from iPython notebook into Word?

I want to copy a table from iPython notebook into a Word doc. I'm using Word for Mac 2011. The table is a standard pandas output and looks like this:
If I use Apple+C to copy the table, and then paste it into a Word doc, I get this:
Surely there must be an easier way?
Creating a table with the same number of rows/columns in Word and then trying to paste the cells there doesn't work either.
I guess I could screenshot the table, but I'd like to include the raw data in the document if possible.
The problem in this case (from the Word perspective) is not the table layout - it's the paragraph layout. Each paragraph has a substantial indent on right and left, and more space before/after than you would normally want.
I don't think any of the Paste options (e.g. Paste Special) in Word is going to help, unless you paste as unformatted text, then select the text, convert to a table, then proceed from there.
But, even a simple Word VBA macro such as this one will leave you with something a bit more manageable. (Select a table you copied in, then run the macro). A little bit more work on the code would probably allow you to get most of the formatting you want, most of the time.
Sub fixupSelectedTable()
With Selection.Tables(1).Range.ParagraphFormat
.LeftIndent = 0
.RightIndent = 0
.SpaceBefore = 0
.SpaceAfter = 0
.LineSpacingRule = wdLineSpaceSingle
End With
End Sub
If you are more familiar with Applescript, the equivalent looks something like this:
-- you may need to fix up the application name
-- (I use this to ensure that the script uses the Open Word 2011 doc
-- and does not try to start Word for Mac 15 (2016))
tell application "/Applications/Microsoft Office 2011/Microsoft Word.app"
tell the paragraph format of the text object of table 1 of the text object of the selection
set paragraph format left indent to 0
set paragraph format right indent to 0
set space before to 0
set space after to 0
set line spacing rule to line space single
end tell
end tell

notepad ++ How to remove words containing some characters, or a link

What expression can I use in Notepad ++ to remove all the words containing http??Not all the line but only the word!
Because I have a list of sentences and some of them contain a link that I would like to remove. Can someone help me??
thank you!!!
Search -> Replace (Ctrl + H).
In the Find what field type http.
In the Replace with field leave it blank.
Click Replace All
To replace a word containing http, then you'll need to do the same steps but in Search Mode select Regex, and in Find What change http to \bhttp\b.

NotePad++ Changing Few Number Entries

Here is a simple lists where I like to change the numbers: the entries are as below and it got over 300 entries like it
tom112
smith113
harry114
linda115
cindy106
samantha147
It need to be changed to
tom212
smith213
harry214
...and so on.
Please assist using notepad++ regular expression.
Thanks.
Assuming it's just a matter of replacing a name followed by a number starting with 1 with the same number but starting with 2 instead:
Ctrl + H for search & replace.
Check Regular expression under Search Mode.
Next to Find what type or copy in ([a-zA-Z]+)1([0-9]+).
Next to Replace with type or copy in \12\2.
Click Replace All and that should do it.
Add any other characters that might appear in the name before the number inside the first set of brackets with a-zA-Z.

How to count lines of code (LOC) using IntelliJ IDEA?

title says everything plus:
- development language Lua
- code revision control system - Perforce (integrated with IntelliJ IDE)
Posting for posterity - This was the top Google entry when searching "intellij count lines of code" (without quotes)
.
If you're like me and didn't want to install anything else, you can hack it via the native, global search:
Ctrl + Shift + F (to open global search)
Use regex mode (check "regex" checkbox)
In the searchbox, enter only a caret "^" (without the quotes)
You may want to limit the search to a specific directory, via the "directory" tab
Hit the "Open in Find Window" button on the bottom-right
If it asks whether you want to continue, press "Continue"
.
Notes:
In regex, the caret (^) denotes the start of a line, except when inside square brackets, in which case it denotes negation
If you wanted to count non-empty lines, you could instead use "^.*\S" (without quotes), which signifies "The start of a line (^), followed by any number of characters (except newline) (.*), followed by a non-whitespace character (\S)"
You can either turn on the display of lines of code for a single file by right clicking in the left gutter and highlighting "display lines of code". Or you can do it for your entire project by downloading the Statistic plug-in. It's very nice indeed, because it shows LOC and other metrics for your entire project.

Resources