comments

How can I get Vim to not break DocBlock comments?

僤鯓⒐⒋嵵緔 提交于 2020-01-11 06:35:11
问题 /** * Example Comment */ When I press enter after Comment Vim autoindents but leaves the cursor lined up with the * characters. How can I get Vim to add the * and a space so that my comment lines up with the E ? 回答1: You will want to modify the value of the formatoptions (short name fo ) Vim option, like this: :set fo+=or The r option enables the behavior in insert mode; o enables it when using o or O in normal to switch into insert. Try Vim's builtin help for details: :help formatoptions 来源:

Auto-approve all comments in Comments Plugin

↘锁芯ラ 提交于 2020-01-11 05:04:55
问题 Is there a way to auto-approve and make all the Comments Plugin's comments public by default? Also I really need to know on what basis the comments are held for moderation. On some pages, they are public by default, on others they end up in moderation queue. ---------- Update 0 --------- I removed fb:admins , the moderation UI has disappeared, but the moderation is still in effect. I get the admin UI when I load the page logged in with the App admin creds, and the I can see the comments are

Catching (and keeping) all comments with ANTLR

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-09 10:55:13
问题 I'm writing a grammar in ANTLR that parses Java source files into ASTs for later analysis. Unlike other parsers (like JavaDoc) I'm trying to keep all of the comments. This is difficult comments can be used literally anywhere in the code. If a comment is somewhere in the source code that doesn't match the grammar, ANTLR can't finish parsing the file. Is there a way to make ANTLR automatically add any comments it finds to the AST? I know the lexer can simply ignore all of the comments using

Youtube api how get replies to comments and likes

非 Y 不嫁゛ 提交于 2020-01-07 05:02:53
问题 To get comments using this Comment Threads: list GET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet { "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", "extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." } } But how get each comment

PHP/MYSQL Comment-reply table structure

与世无争的帅哥 提交于 2020-01-06 14:03:48
问题 I have got a comment script written in PHP working pretty well. It saves the comments in a a mysql comments table with fields for commentid, subjectid, userid and timecreated. I now want to implement a reply function. Should I create a new table of replies with userid, time created, reply and a commentid field. Or would it be better to just include the replies in the comments table as comments but with two extra fields, one denoting that this particular comment is a reply and the other the

Adding a taxonomy tag to wordpress post by writing it in comment with hashtag

拜拜、爱过 提交于 2020-01-06 06:45:23
问题 In wordpress, I have a post with some tags. A user should be able to add a tag to the post by writing the tag with a hashtag in the comment, e.g. 'This is a comment that adds #orange' should add the tag orange. That is my code: function add_tag_from_comment( $comment_ID ) { $comment = get_comment($comment_ID); $search_text = strip_tags( str_replace( array( "\n", "\r"), $comment->comment_content)); preg_match_all('/#([\d\w-_]+)[\b|]{0,3}/', $search_text, $matches, PREG_PATTERN_ORDER); foreach(

Can I indicate dynamic type returned to PhpStorm?

♀尐吖头ヾ 提交于 2020-01-06 03:32:04
问题 I have 3 classes like : class Foo { static function test() { return new static(); } } class Bar extends Foo {} class Baz extends Foo {} Now if call : $var = Bar::test(); I want PhpStorm to identify $var as the called_class , here: Bar . But, if I do $var = Baz::test(); $var is Baz instance. How can I get the dynamic called_class to indicate to PhpStorm what type is returned? I there a syntax like /** @return "called_class" */ to help PhpStorm and indicate the type? 回答1: First you have an

Facebook moderation link doesn't show when using hash in data-href URL

送分小仙女□ 提交于 2020-01-06 02:38:10
问题 I am using Facebook comments in my website. My problem is that I don't get to see the moderation tool. I see it when the code is embedded within the page when it loads. In my case, I load the comment section dynamically, inserting the comment div into another div and running FB.XFBML.parse(); . Note: I am using hash in the URL for the data-href. I do see the Facebook comments plugin and I can write comments, but the moderation tool is not visible. Any ideas how to make the moderation tool

Give Wordpress custom page template a title for appearance editor

試著忘記壹切 提交于 2020-01-05 19:42:08
问题 When in Wordpress theme appearance editor, certain pages have a neat titles displayed in the right hand list for your theme files.For example page.php shows as "Page Template". This is clean and easily read. Is there any comment syntax that Wordpress uses to give these titles for my custom page template? For example, my single-video.php page could be "Video Page Template". 回答1: Yes you can. Make sure your page opens with something like: <?php /** Template Name: Text & Image */ get_header(); ?

POI 3.17 creating Cell Comments in a cloned sheet creates inconsistent xlsx

拥有回忆 提交于 2020-01-05 12:56:44
问题 I used the cloneSheet method to copy a sheet within the same workbook which already contains comments. Afterwards new comments where added to this new sheet and the excel saved. When openening the file with Excel 365, it complained about /xl/comments1.xml and recovered the file. The newly created comments are available. The comments from the clone are removed during the recovery. Opening the zip file and looking at the /xl/comments1.xml , it shows a difference. Is this an issue with the