How to add a comment in a .gitignore file?

Yes, you may put comments in there. They however must start at the beginning of a line. cf. http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files The rules for the patterns you can put in the .gitignore file are as follows: – Blank lines or lines starting with # are ignored. […] The comment character is #, example: # no .a files … Read more

HTML comments within comments?

I think the key point is this: Note that comments are markup. http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4 This is not valid markup: <div <span/> /> … so neither is the one you mention. Since all my sites are written in PHP I normally comment out code with PHP comments: <?/*?> <div>…</div> <p>…</p> <?*/?> Perhaps you can use a similar … Read more

How to write meaningful docstrings? [closed]

I agree with “Anything that you can’t tell from the method’s signature”. It might also mean to explain what a method/function returns. You might also want to use Sphinx (and reStructuredText syntax) for documentation purposes inside your docstrings. That way you can include this in your documentation easily. For an example check out e.g. repoze.bfg … Read more

Commenting Regular Expressions

Unfortunately, JavaScript doesn’t have a verbose mode for regular expression literals like some other langauges do. You may find this interesting, though. In lieu of any external libraries, your best bet is just to use a normal string and comment that: var r = new RegExp( ‘(‘ + //start capture ‘[0-9]+’ + // match digit … Read more

How can I access the table comment from a mysql table?

Based on the answer by OMG Ponies, but using INFORMATION_SCHEMA.TABLES instead of INFORMATION_SCHEMA.COLUMNS. When looking around on the web, all I could find was info on the columns’ comments, but never on the table’s. This is how to get a table’s comment. SELECT table_comment FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=”my_cool_database” AND table_name=”user_skill”; +————————–+ | table_comment | +————————–+ … Read more

Why can’t I comment attributes in XAML?

Though you can’t comment out using the basic XAML markup, you can achieve the desired results by importing the Open XML markup namespace. xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ xmlns:ignore=”http://www.galasoft.ch/ignore” mc:Ignorable=”ignore” <Label x:Name=”Gaga” FontSize=”20″ ignore:Content=”{Binding SomethingThatIsEmptyAtDesignTime}” Content=”LookAtMe!” /> This blog post describes how to do it.

tech