comments

Tool to find commented out VHDL code

爷,独闯天下 提交于 2019-12-07 04:02:41
问题 This question asks the general question. I'm asking about VHDL in particular, since the tools that question's answer mentions are for Java and PL/SQL. It doesn't need to be perfect, some manual interpretation would be fine. I'm doing this for an automated commit task. EDIT 3/9/11: @phillipe pointed out automated commit task is inconsistent with manual interpretation. I'm trying to encourage other engineers to get rid of code and see that they did it. I guess a pessimistic tool would be better

How to comment within an HTML attribute?

寵の児 提交于 2019-12-07 01:40:26
问题 The final (closing) angle bracket in the code below is not interpreted as closing the <input> element: <input type='text' name='name' <!-- id='name' -->> I thought this was a valid way to comment out this attribute but Google Chrome, Firefox and Notepad++ (color coding) all suggest that this is not the way to go. I used CTRL + Shift + Q in Notepad++ to do this. Then what is the proper way to comment out this <id> attribute? 回答1: HTML provides no way to place a comment inside a tag. If you are

Insert a picture in code comment via Emacs

蹲街弑〆低调 提交于 2019-12-07 01:35:27
问题 An idea has just came to my mind. Is there any methods to insert a picture in code comment to help explain our code? After all, a picture is worth a thousand words. Since I use Emacs, is there any implementations for Emacs so far? 回答1: Take a look at iimage-mode : it is a standard solution to display an image in a text buffer. For example, given the following file: /* an image is worth a thousand words: * <path/to/image.png> */ int main (int argc, char **argv) { return 0; } then running M-x

Adding facebook comment box plugin for web based phonegap app

自作多情 提交于 2019-12-07 00:23:26
I am trying to add the facebook comment box to my web based app but it does not show up when I install on my phone. Is there some special plugin or methodology for getting the facebook comment plugin to work with phonegap and/or ionic? I currently have this plugin in my config: <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.9.0"> I managed to do it with iframe also. I solved resizing with https://github.com/davidjbradshaw/iframe-resizer for login i had to change the native code. iOS: MainViewController.m - (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:

how to change xml by browser

别来无恙 提交于 2019-12-07 00:12:33
I would like to change some rules in my XML depending on the browser. For example, the 'fontcolor' should be black when using IE. So far I googled it, I found this could be possible using XSLT. But unfortunately, after googling/trying&error after 1/2 days, I still didn't get the clue how to do this. Could someone help me how to solve this? Any help would be highly appreciated. Thanks !! EetieD. My current XML: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <skin version='1.1' name='player' author='me'> <components> <component name='control'>

What does %#ok<SAGROW> comment mean in MATLAB?

孤街醉人 提交于 2019-12-06 23:13:09
问题 I've encountered many MATLAB codes which have a %#ok<SAGROW> comments. This comment is used in different circumstances and I can't figure it out what it means. As an example: i = 1; flag = true; for l = 1:k while(flag==true) if(probs(i)~=0) leaves(l).val = i-1; %#ok<*SAGROW> leaves(l).zero = ''; leaves(l).one = ''; leaves(l).prob = probs(i); i = i + 1; flag = false; else i = i+1; flag = true; end end flag =true; end There are other references to this comment too, for instace: http://www

Is it ok to put comments about bug fixes in the source code?

巧了我就是萌 提交于 2019-12-06 21:36:23
问题 And if so, where do you draw the line? My coworkers and I disagree on this subject. I have seen such things as // fixes bug # 22 to // fixed bug: shouldnt be decrementing i++; Is it ok if the change is fairly significant, and radically changes what the method was written to do? Or do you simply change the summary text of the method to reflect what it is now meant to do? My opinion is that this information should be put into source control. Some state that this is bad because then it will be

Why does “<! --” comment out a style rule, but “<!--” does not?

↘锁芯ラ 提交于 2019-12-06 19:22:52
问题 Take it easy on me. I am just learning HTML. Accroding to http://www.w3.org/TR/html-markup/syntax.html#comments and many other sites I've seen such as this http://www.w3schools.com/tags/tag_comment.asp they say an HTML comment is <!-- text --> with no space between ! and the next dash. Yet, I show below that only when I write <! -- test --> is the stuff inside be actually gets ignored. Notice the space added between <! and -- Here is the HTML code <!DOCTYPE HTML> <html> <head> <style type=

Can the Pluggable Annotation Processor API retrieve source code comments?

自古美人都是妖i 提交于 2019-12-06 19:03:19
问题 I am using the pluggable annotation processing api withing Java6+ to automatically create some deployment XML files. Part of these XML files contains a description of the object. The description is ALWAYS the same content as the Javadoc associated with the class itself. I could force the comment to be a field of the @Block annotation, but that duplicates the information. Is there any way during annotation processing to get the contents of the class/type comment? In this example, I want to get

Old Code in comments [closed]

落爺英雄遲暮 提交于 2019-12-06 18:55:03
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . How long should you keep old code commented out in your code base? The contractors continue to keep old code in code base by turning it into comments. This is really frustrating and I want them to just remove the old code instead of commenting it out. Is there a valid reason