Is ‘# -*- coding: utf-8 -*-‘ also a comment in Python?

Yes, it is also a comment. And the contents of that comment carry special meaning if located at the top of the file, in the first two lines. From the Encoding declarations documentation: If a comment in the first or second line of the Python script matches the regular expression coding[=:]\s*([-\w.]+), this comment is processed … Read more

Remove comments from C/C++ code

Run the following command on your source file: gcc -fpreprocessed -dD -E test.c Thanks to KennyTM for finding the right flags. Here’s the result for completeness: test.c: #define foo bar foo foo foo #ifdef foo #undef foo #define foo baz #endif foo foo /* comments? comments. */ // c++ style comments gcc -fpreprocessed -dD -E … Read more

Can’t comment selection

Try this. Out of all the other suggestions, this was the only one that worked for me. Go to your applications folder and rename Xcode to whatever you want, then open the Xcode. Check to see if the comment selection now works, if so, you can go back and rename Xcode to its default name. … Read more

XML comments and “–“

Maybe it can be helpful for someone. I had a problem, that I wanted to comment out a command line parameter in XML that starts with –: <arg line=”-v –line-break 0″ /> so naturally normal way like this <!– <arg line=”-v –line-break 0″ /> –> didn’t work, but I found out, that if the – … Read more

Comment on a line in Github without a commit?

Unfortunately it is not possible to comment on a line in Github without a commit. But you can create links to lines in your file (click on line and copy link on browser bar). For example you can use this links in your issues to discuss about code line: https://github.com/sebastianbergmann/phpunit/blob/master/src/Runner/StandardTestSuiteLoader.php#L72 Update You can also hold … Read more

How to add comments into a Xaml file in WPF?

I assume those XAML namespace declarations are in the parent tag of your control? You can’t put comments inside of another tag. Other than that, the syntax you’re using is correct. <UserControl xmlns=”…”> <!– Here’s a valid comment. Notice it’s outside the <UserControl> tag’s braces –> [..snip..] </UserControl>