comments

Facebook comments plugin - same comments on every page

好久不见. 提交于 2019-12-01 06:38:11
Facebook comments on my website work well except the fact when someone comments on one article that same comment shows up on every article on the website. Obviously, I don't want that. What I did is basically copy and paste code offered on developers.facebook.com: `<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>` `<div class="fb

Visual Studio regex to remove all comments and blank lines in VB.NET code using a macro

只愿长相守 提交于 2019-12-01 06:35:44
I was trying to remove all comments and empty lines in a file with the help of a macro. Now I came up with this solution which deletes the comments(there is some bug described below) but is not able to delete the blank lines in between - Sub CleanCode() Dim regexComment As String = "(REM [\d\D]*?[\r\n])|(?<SL>\'[\d\D]*?[\r\n])" Dim regexBlank As String = "^[\s|\t]*$\n" Dim replace As String = "" Dim selection As EnvDTE.TextSelection = DTE.ActiveDocument.Selection Dim editPoint As EnvDTE.EditPoint selection.StartOfDocument() selection.EndOfDocument(True) DTE.UndoContext.Open("Custom regex

Visual Studio regex to remove all comments and blank lines in VB.NET code using a macro

余生颓废 提交于 2019-12-01 05:27:18
问题 I was trying to remove all comments and empty lines in a file with the help of a macro. Now I came up with this solution which deletes the comments(there is some bug described below) but is not able to delete the blank lines in between - Sub CleanCode() Dim regexComment As String = "(REM [\d\D]*?[\r\n])|(?<SL>\'[\d\D]*?[\r\n])" Dim regexBlank As String = "^[\s|\t]*$\n" Dim replace As String = "" Dim selection As EnvDTE.TextSelection = DTE.ActiveDocument.Selection Dim editPoint As EnvDTE

Facebook comments plugin - same comments on every page

隐身守侯 提交于 2019-12-01 04:58:13
问题 Facebook comments on my website work well except the fact when someone comments on one article that same comment shows up on every article on the website. Obviously, I don't want that. What I did is basically copy and paste code offered on developers.facebook.com: `<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs

Auto-approve all comments in Comments Plugin

强颜欢笑 提交于 2019-12-01 04:37:19
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 in the moderation queue (even new ones). I have even ticked "Make every post visible to everyone by

Generating commented-out content with Wicket

谁说我不能喝 提交于 2019-12-01 04:34:23
For debug reasons, and on a whim, I'd like to include certain information in a Wicket page's HTML output that is enclosed in HTML comments . The output would be something like... <!-- <div wicket:id="foo"> 1234 </div> --> ...where "1234" is some interesting, dynamically created piece of information. I have tried, to no avail: <!-- <div wicket:id="foo"></div> --> → Wicket complains that element with id "foo" is missing from the HTML page enclose in <wicket:remove> → such sections cannot contain elements with wicket:id label.setVisible(false) → Wicket doesn't output the label at all new Label(

Removing HTML Comments

寵の児 提交于 2019-12-01 04:14:43
How would one go about removing Comments from HTML files? They may only take up a single line, however I'm sure I'll run into cases where a comment may span across multiple lines: <!-- Single line comment. --> <!-- Multi- ple line comment. Lots '""' ' " ` ~ |}{556 of !@#$%^&*()) lines in this comme- nt! --> Simon Mourier You could use the Html Agility Pack .NET library. Here is an article that explains how to use it on SO: How to use HTML Agility pack This is the C# code to remove comments: HtmlDocument doc = new HtmlDocument(); doc.Load("yourFile.htm"); // get all comment nodes using XPATH

How to remove Disqus reaction from the counter?

拜拜、爱过 提交于 2019-12-01 03:12:34
Two questions for Stackoverflow ninjas: I have a blog using Disqus. However, the theme I'm using do not have space to have the 'Reactions' (# of Twitters), just have the space for the numbers of the Comments. OK, Basically I do not have space enough to stay with this 'Reactions' provided for Disqus. Does anyone knows how could I remove just the 'Reactions" counts from Disqus? The new Disqus put a box with "Your site is using the new Disqus. Check the Disqus 2012 F.A.Q. or visit our support page for help." message and I would love to remove it. Does anyone knows how to do it? Edit 2: We've made

Comment javascript methods in Visual Studio

[亡魂溺海] 提交于 2019-12-01 02:58:36
Is there a way to insert a snippet for XML comments in javascript in Visual Studio 2010 with automatically generated parameters? If I type /// here... function foo(a, b){ ...it should change to this (depending on the parameters): function foo(a, b){ /// <summary>$cursorhere</summary> /// <param name="a" type="string">Param a</param> /// <param name="b" type="string">Param b</param> /// <returns type="function">Return function</returns> So it would be similar to the snippet generation if I'm in C# code. EDIT To clarify, I just want to know if there is a shortcut or existing plugin to achieve

Unicode in javadoc and comments?

旧街凉风 提交于 2019-12-01 02:50:15
Some compilers failed on non-ASCII characters in JavaDoc and source code comments. What is the current (Java 7) and future (Java 8 and beyond) practices with respect to Unicode in Java source files? Are there differences between IcedTea, OpenJDK, and other Java environments, and what is dictated the the language specification? Should all non-ASCII characters be escaped in JavaDoc with HTML &escape; -like codes? But what would be the Java // comment equivalent? Update : comments indicate that one can use any character set, and that upon compiling one needs to indicate what char set is used in