|
Of course! Why didn't I think of that.
It should probably be a VS extension, and should work with all current and future versions in all cultures.
This could take weeks of procrastination productive time saving work.
cheers
Chris Maunder
|
|
|
|
|
I think you are joking.
There is a SED one-liner for finding any file recursively from a parent folder and printing any file that contains lines that end with a white space. You can also do it with PowerShell.
I don't remember how to do either one of them off the top of my head.
Best Wishes,
-David Delaune
|
|
|
|
|
Solution - toss Style Cop where it belongs.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Absolutely! This is well past where that tool has stopped being "productive" or helpful.
|
|
|
|
|
|
Nice!
cheers
Chris Maunder
|
|
|
|
|
I recently took a morning debugging an application that for some reason didn't work.
After hours I found a non printable character in an encrypted password in the web.config
It's nothing short of a miracle that I found it at all
|
|
|
|
|
Sander Rossel wrote: After hours I found a non printable character Non-printable occasionally end up in my php files from (I don't know where) - and when I try to start a session it gets rather cross with me. Three unprintable characters to start the file.
Once I discovered the problem I only have the annoyance of opening it in HexEdit, replacing the characters with printable ones, saving, and then deleting them on the other side.
Still, at least I know the cure, if not the cause.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: Three unprintable characters to start the file.
Let me guess - are they: 0xEF, 0xBB, and 0xBF?
If so, that would be the UTF8 Byte Order Mark:
Byte order mark - Wikipedia[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I literally went over all of my failing files and cleaned it up. Seems about right.
What I need to do, then, is find which editor/tool is adding that.
Since I've some templates to get most new pages started, I just checked and found it in my primary editor. Somehow, it reminds me of the stoned virus in reverse. As long as I keep using templates. Same for various library-ish files. Only when something rather new is created does it show.
Thanks and Kudos!
* Templates to save me some work and keep users comfortable with something similar to what they've seen before.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
For some reason solving those types of issues give me the greatest satisfaction.
I dunno why.
cheers
Chris Maunder
|
|
|
|
|
Chris Maunder wrote: For some reason solving those types of issues give me the greatest satisfaction.
I dunno why.
Cause they come with a free soy, decaf, almond milk latte?
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
One can dream...
cheers
Chris Maunder
|
|
|
|
|
That type of dream is normally referred to as a nightmare.
|
|
|
|
|
Has Anyone Seen Mike Hunt wrote: Cause they come with a free soy, decaf, almond milk latte?
|
|
|
|
|
Has Anyone Seen Mike Hunt wrote: soy, decaf, almond milk latte
I wouldn't give (or even sell) one of those to my worst enemy!
Coffee should be black as sin, hotter than Hell, and sweeter than love.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: I wouldn't give (or even sell) one of those to my worst enemy!
That is a Maunder special.
Daniel Pfeffer wrote: Coffee should be black as sin, hotter than Hell, and sweeter than love.
I have 4+ shots of espresso and then froth like a big machiato, no sugar, it ain't needed.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
Productivity killer of the day: The Lounge?
|
|
|
|
|
Notepad++ - search for " \n" in extended character search mode. Or, if you want it a little more challenging, you can do the same thing in Microsoft Word, but that probably isn't the correct instruction for that program (and I'm not going to figure it out)!
|
|
|
|
|
My editor trims trailing whitespace.
Trailing whitespace is about the only kind I don't like.
|
|
|
|
|
Visual Studio's editor used to have a rather convenient way of finding trailing whitespace using regular expressions. The newer releases have made it far less convenient.
|
|
|
|
|
Ctrl-H, "; "
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Maybe paste the code into a text-editor that allows you to search using regular expressions (i.e., Notepad++) and search using "^.+\s$"?
|
|
|
|
|
You can do regex searches in Visual Studio.
This space for rent
|
|
|
|
|
But... regex???
Do you do regex searches for "myvar" as well? A space followed by a newline is just as literal as "myvavar"; you don't need regex for either. The editor probably requires some sort of quoting or escaping for the newline, but quoting is just an external syntax required by the input scanner.
Every now and then I replace <space><newline> with <newline> throughout the source files of the solution, in one single sweep.
Well, sometimes in two or three, maybe even more: Every now and then I manage to create empty lines with spaces up to the indentiation of the neighbour lines. So I often start out with <4 spaces><newline> and click "Replace all in entire solution" until "0 replacements made". Then I change <4 spaces> to <space> and click the button up to three times more. You might say that clicking the same button up to three times in a row imposes such a strain on your index finger that you prefer to save effort by writing a regexp to do the equivalent. I'll bet that executing the regexp would slow down the replacement so that it would take more time to complete than my quick button clicks, even without conting the time for writing the regex and ensuring that it works as intended.
|
|
|
|