comments

PHP Multiple Line Comment inside Multiple Line Comment

£可爱£侵袭症+ 提交于 2019-12-08 14:44:07
问题 <?php /* /* this is a comment */ */ ?> PHP returns "syntax error"... Is this just a completely wrong way to use multiple line comment? Sometimes I need to comment out a big block of code for testing, and this block contains hundreds of lines and there are many multiple line comments inside. So what's the best way to comment out this big block? besides removing it temporarily from the file? 回答1: From the PHP manual: 'C' style comments end at the first */ encountered. Make sure you don't nest

Most common/liked syntax for in-code documentation (comments)?

≯℡__Kan透↙ 提交于 2019-12-08 13:35:52
I've been coding PHP with Notepad++ for years now, but today I downloaded Eclipse IDE. One of its features is auto-completing certain "syntax-patterns", such as comments. I've seen a lot of different ways to implement comments and documentation into php-files, so now I started wondering, should I follow the syntax Eclipse suggests. Here's a snap of what I mean: What do you think? Martti Laine it's phpdoc format, a way to auto document your code using comments. http://www.phpdoc.org/ Eclipse appears to be picking up phpDoc (probably the most common solution for PHP projects and one I'm happily

Comment out and uncomment an xml element

最后都变了- 提交于 2019-12-08 13:17:27
I have an xml file and I want to uncomment and comment out an element in the file. <my_element> <blablabla href="docs/MyBlank.htm" /> </my_element> This one I would like to "close" (comment out) like this: <!-- <my_element> <blablabla href="docs/MyBlank.htm" /> </my_element> --> Furter down in the file I have an element with the same name which is "closed" (commented out) like this: <!-- <my_element> <blablabla href="secretwebhacking/MySecrectBankLogin.htm" /> </my_element> --> and I want to "open" it up (uncomment) like: <my_element> <blablabla href="secretwebhacking/MySecrectBankLogin.htm" /

How do I insert an post_id into a mysql database

耗尽温柔 提交于 2019-12-08 11:09:13
问题 I have a comment system that should input an id, an idea_id, a user_id, a comment, the data, and the time. Everything seems to work except every time I post a comment the idea_id is always 0. By the way an idea is basically a post. I did this using: <?php if(isset($_POST['submit'])) { $comment = $_POST['comment']; $user_id = $_SESSION['user_id']; $idea_id = $_POST['idea_id']; if(empty($comment)) { $message = "You Haven't Written Anything"; } else { mysql_query("INSERT INTO comments (idea_id,

jQuery code still being executed even after being commented out

时光总嘲笑我的痴心妄想 提交于 2019-12-08 09:13:29
问题 I have a basic .js file with this inside it //$('#show').html('<%= escape_javascript(render(:partial => 'show')) %>'); When the .js file is called, the code above gets executed and the partial is rendered even though it's commented out. When the code is deleted, the partial never gets rendered. The DOM remains unchanged, but I can see the partial being rendered by the server at the command line. What gives? 回答1: You're commenting out the JavaScript--which executes on the client side. The

Comment out and uncomment an xml element

余生长醉 提交于 2019-12-08 08:45:12
问题 I have an xml file and I want to uncomment and comment out an element in the file. <my_element> <blablabla href="docs/MyBlank.htm" /> </my_element> This one I would like to "close" (comment out) like this: <!-- <my_element> <blablabla href="docs/MyBlank.htm" /> </my_element> --> Furter down in the file I have an element with the same name which is "closed" (commented out) like this: <!-- <my_element> <blablabla href="secretwebhacking/MySecrectBankLogin.htm" /> </my_element> --> and I want to

HTML Tidy, Don't move those comments!

♀尐吖头ヾ 提交于 2019-12-08 08:43:13
问题 I was working with html-tidy and a couple of my comments were moved from the head to the root of the document. Is there anyway to avoid this behavior? (I'm trying to turn some really really bad markup into xhtml complaint code) Oh and additionally it uses an in-house developed semi-server-side scripting language that uses comments to place data within the html, very, very non-standard... I'd love to completely change it over...but you know how employers are... Here is the problem: Before Tidy

Remove extra leading spaces in single-line comments in Eclipse

放肆的年华 提交于 2019-12-08 08:34:45
问题 My projects in Eclipse using spaces to format code, not tabs . When commenting lines with single-line comment (pressing Ctrl + / ), leading spaces just shifts to right, breaking adjustment with other non-commented lines, for example: class Sample { public int x; // public int y; } What I want is: class Sample { public int x; // public int y; } Manually removing spaces is tedious. Is there any solution for this? (plugin, some kind of macro, any other?) I don't want to use tab-formatting. 回答1:

Userimage in Sharepoint Blog comment

☆樱花仙子☆ 提交于 2019-12-08 07:02:56
问题 I´m searching for a way to display the userimage next to the name of a Blog-comment in sharepoint 07. First idea was to add a Image column to the comment list and use a add event to fill it, but this would not catch a change of the userimage and I still have no control over the rendering. Thanks for any suggestion ren 回答1: To make a long Story short , there seems to be no simple Solution to achieve this. The Listview for the comments can not be bend to show userimages. Finally I had to create

Django Paginated Comments .. is there any existing solutions?

◇◆丶佛笑我妖孽 提交于 2019-12-08 06:46:27
问题 is there any existing pagination solution for Django contrib.comments? What I need is just a simple paginated django comments, for the Basic Blog application (from the Django Basic Apps) I used, using a simple has_previous and has_next I have copied the django.contrib.comments and tried modify the code but with no success. The code is pretty hard to understand (django/contrib/comments/templatetags/comments.py) because it consists of Node and Parser here is my comments.html template I used for