Search Results

Search found 5136 results on 206 pages for 'comment bot'.

Page 17/206 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • In C/C++ mode in Emacs, change face of code in #if 0...#endif block to comment face

    - by pogopop77
    I'm trying to add functionality found in some other code editors to my Emacs configuration, whereby C/C++ code within #if 0...#endif blocks is automatically set to the comment face/font. Based on my testing, cpp-highlight-mode does something like what I want, but requires user action. It seems like tying into the font-lock functionality is the correct option to make the behavior automatic. I have successfully followed examples in the GNU documentation to change the face of single-line regular expressions. For example: (add-hook 'c-mode-common-hook (lambda () (font-lock-add-keywords nil '(("\\<\\(FIXME\\|TODO\\|HACK\\|fixme\\|todo\\|hack\\)" 1 font-lock-warning-face t))))) works fine to highlight debug related keywords anywhere in a file. However, I am having problems matching #if 0...#endif as a multiline regular expression. I found some useful information in this post (How to compose region like ""), that suggested that Emacs must be told specifically to allow for multiline matches. But this code: (add-hook 'c-mode-common-hook (lambda () '(progn (setq font-lock-multiline t) (font-lock-add-keywords nil '(("#if 0\\(.\\|\n\\)*?#endif" 1 font-lock-comment-face t)))))) still does not work for me. Perhaps my regular expression is wrong (though it appears to work using M-x re-builder), I've messed up my syntax, or I'm following the wrong approach entirely. I'm using Aquamacs 2.1 (which is based on GNU Emacs 23.2.50.1) on OS X 10.6.5, if that makes a difference. Any assistance would be appreciated!

    Read the article

  • How to fix an error in a Mercurial changeset comment?

    - by Sly
    Is there a way to rewrite the hg commit message if the wrong information was entered? We always include our Bug ID when we commit a changeset. For instance: hg commit -m "Bug 14585: LastName field should be mandatory" But If I put the wrong bug ID, is there a way (through an extension maybe) to fix the comment once the changeset has been committed and pushed to a central repo?

    Read the article

  • How do I code a comment box on my blog?

    - by Malcolm
    Obviously, I am a novice web designer. I'm using php and sql to do all the under-the-hood stuff, but I want a visually appealing as well as functional comment system. Right now I am just using HTML forms but they don't look very good. Should I be using javascript? Any tips to get me started?

    Read the article

  • How can I create a FreeBSD package using EPM that has the ORIGIN @comment?

    - by Chris R
    I'm building packages of our internal software products using EPM, and over time these packages (of which we have a large number) clutter up the output of pkg_delete and pkg_add with the following general kind of messages: err: pkg_add: package MYPACKAGE has no origin recorded I can see from some old FreeBSD lists that the +CONTENTS file in the package must have a line like this: @comment ORIGIN:some_source_path What I don't see is a way to get this line in place using EPM. Can somebody tell me how to do this?

    Read the article

  • What was the most refreshingly honest non-technical comment you saw?

    - by DVK
    OK, so we all saw the lists of "funny" or "bad" comments. However, today, when maintaining an old stored procedure, I stumbled upon a comment which I couldn't classify other than "refreshingly brutally honest", left by a previous maintainer around a really freakish (both performance and readability-wise) page-long query: -- Feel free to optimize this if you can understand what it means So, in the first (and hopefully only) poll type question in my history of Stack Overflow, I'd like to hear some other "refreshingly brutally honest" code comments you encountered or written.

    Read the article

  • Wordpress: How to display posts that have at least one comment?

    - by Keith Donegan
    I have been pulling my hair out for the past 3 hours!! Does anybody have any idea on how to show posts in wordpress that have at least one comment? The below code uses orderby=comment_count and it does work, but it still display other posts that have no comments too :( <?php $home_loop= new WP_Query("cat=-182,-183&showposts=10&paged=$paged&orderby=comment_count&order=DESC"); ?>

    Read the article

  • What was the most refreshingly honest non-technical comment you saw in the code?

    - by DVK
    OK, so we all saw the lists of "funny" or "bad" comments. However, today, when maintaining an old stored proc, I stumbled upon a comment which I couldn't classify other than "refreshingly brutally honest", left by a previous maintainer around a really freakish (both performance and readability-wise) page-long query: -- Feel free to optimize this if you can understand what it means So, in the first (and hopefully only) poll type question in my history of Stack Overflow, I'd like to hear some other "refreshingly brutally honest" code comments you encountered or written.

    Read the article

  • How to fix error in a Mercurial changeset comment?

    - by Sly
    Is there a way to rewrite the hg commit message if the wrong information was entered? We always include our Bug ID when we commit a changeset. For instance: hg commit -m "Bug 14585: LastName field should be mandatory" But If I put the wrong bug ID, is there a way (through an extension maybe) to fix the comment once the changeset has been committed (and possibly pushed)?

    Read the article

  • ASP.NET Web API - Screencast series Part 2: Getting Data

    - by Jon Galloway
    We're continuing a six part series on ASP.NET Web API that accompanies the getting started screencast series. This is an introductory screencast series that walks through from File / New Project to some more advanced scenarios like Custom Validation and Authorization. The screencast videos are all short (3-5 minutes) and the sample code for the series is both available for download and browsable online. I did the screencasts, but the samples were written by the ASP.NET Web API team. In Part 1 we looked at what ASP.NET Web API is, why you'd care, did the File / New Project thing, and did some basic HTTP testing using browser F12 developer tools. This second screencast starts to build out the Comments example - a JSON API that's accessed via jQuery. This sample uses a simple in-memory repository. At this early stage, the GET /api/values/ just returns an IEnumerable<Comment>. In part 4 we'll add on paging and filtering, and it gets more interesting.   The get by id (e.g. GET /api/values/5) case is a little more interesting. The method just returns a Comment if the Comment ID is valid, but if it's not found we throw an HttpResponseException with the correct HTTP status code (HTTP 404 Not Found). This is an important thing to get - HTTP defines common response status codes, so there's no need to implement any custom messaging here - we tell the requestor that the resource the requested wasn't there.  public Comment GetComment(int id) { Comment comment; if (!repository.TryGet(id, out comment)) throw new HttpResponseException(HttpStatusCode.NotFound); return comment; } This is great because it's standard, and any client should know how to handle it. There's no need to invent custom messaging here, and we can talk to any client that understands HTTP - not just jQuery, and not just browsers. But it's crazy easy to consume an HTTP API that returns JSON via jQuery. The example uses Knockout to bind the JSON values to HTML elements, but the thing to notice is that calling into this /api/coments is really simple, and the return from the $.get() method is just JSON data, which is really easy to work with in JavaScript (since JSON stands for JavaScript Object Notation and is the native serialization format in Javascript). $(function() { $("#getComments").click(function () { // We're using a Knockout model. This clears out the existing comments. viewModel.comments([]); $.get('/api/comments', function (data) { // Update the Knockout model (and thus the UI) with the comments received back // from the Web API call. viewModel.comments(data); }); }); }); That's it! Easy, huh? In Part 3, we'll start modifying data on the server using POST and DELETE.

    Read the article

  • How Search Engine Bots Crawl Forums?

    - by Waleed Eissa
    If I have a forums site with a large number of threads, will the search engine bot crawl the whole site every time? Say I have over 1,000,000 threads in my site, will they get crawled every time the bot crawls my site? or how does it work? I want my website to be indexed but I don't want the bot to kill my website! In other words I don't want the bot to keep crawling the old threads again and again every time it crawls my website. Also, what about the pages crawled before? Will the bot request them every time it crawls my website to make sure they are still on the site? I'm asking this because I only link to the latest threads, i.e. there's a page that contains a list of all the latest threads, but I don't link to the older threads, they have to be explicitly requested by URL, e.g. http://www.mysite.com/showthread.aspx?threadid=7 , will this work to stop the bot from bringing my site down and consuming all my bandwidth? P.S. The site is still under development but I want to know in order to design the site so that search engine bots don't bring it down. Thanks

    Read the article

  • Le web sémantique &#0150; comment lier les données et les schémas sur le web ? de Fabien Gandon, Catherine Faron-Zucker, Olivier Corby

    Le web sémantique désigne un ensemble de technologies visant à rendre les ressources du web plus largement utilisables ou plus pertinentes grâce à un système de métadonnées qui utilisent notamment la famille des langages développés par le W3C (World Wide Web Consortium). Cet ouvrage offre dans un langage accessible une synthèse de ce qu'il faut aujourd'hui savoir du web sémantique. Il explique simplement quelles sont les techniques mises en oeuvre et dresse un panorama des utilisations potentielles et des bénéfices attendus. Critique de l'ouvrage Le web sémantique ? Comment lier les données et les schémas sur le web ?...

    Read the article

  • Pourquoi tant de panique en cas de panne des services en ligne ? Et vous, comment réagissez-vous sans Gmail ou Facebook ?

    Pourquoi les gens ont-ils tant tendance à paniquer en cas de panne des services en ligne ? Et vous, comment réagissez-vous sans Gmail ou Facebook ? Hier, Twitter et Skype ont connu une grosse panne. Simultanée. Et, déjà, certains ont commencé à paniquer. Tout comme lorsque, la semaine dernière, Facebook a rencontré quelques 30 minutes d'indisponibilité générale. Que se passerait-il alors, si tous ces services web tombaient en panne en même temps, le même jour, à la même heure ? Plus de Twitter, ni de Skype, ni de Facebook, ni de Tumblr ou de Gmail ou de MSN. Horreur. En cas d'indisponibilité, les utilisateurs ont tendance à migrer en masse vers un autre moyen de communication. Mais que faire si aucun n...

    Read the article

  • Realtime Twitter Replies?

    - by ejunker
    I have created Twitter bots for many geographic locations. I want to allow users to @-reply to the Twitter bot with commands and then have the bot respond with the results. I would like to have the bot reply to the user as quickly as possible (realtime). Apparently, Twitter used to have an XMPP/Jabber interface that would provide this type of realtime feed of replies but it was shut down. As I see it my options are to use one of the following: REST API This would involve polling every X minutes for each bot. The problem with this is that it is not realtime and each Twitter account would have to be polled. Search API The search API does allow specifying a "-to" parameter in the search and replies to all bots could be aggregated in a search such as "-to bot1 OR -to bot2...". Though if you have hundreds of bots then the search string would get very long and probably exceed the maximum length of a GET request. Streaming API The streaming API looks very promising as it provides realtime results. The API allows you to specify a follow and track parameters. follow is not useful as the bot does not know who will be sending it commands. track allows you to specify keywords to track. This could possibly work by creating a daemon process that connects to the Streaming API and tracks all references to the bot's names. Once again since there are lots of bots to track the length and complexity of the query may be an issue. Another idea would be to track a special hashtag such as #botcommand and then a user could send a command using this syntax @bot1 weather #botcommand. Then by using the Streaming API to track all references to #botcommand would give you a realtime stream of all the commands. Further parsing could then be done to determine which bot to send the command to. Third-party service Are there any third-party companies that have access to the Twitter firehouse and offer realtime data? I haven't investigated these, but here are a few that I have found: Gnip Tweet.IM excla.im TwitterSpy - seems to use polling, not realtime I'm leaning towards using the Streaming API. Is there a better way to get near realtime @-replies for many (hundreds) of Twitter accounts?

    Read the article

  • Android - Linkify Problem

    - by Ryan
    I seem to be having trouble with the linkify I am using in my Custom Adapter. For some reason I recieve the following stack track when I click on one of the links: 06-07 20:49:34.696: ERROR/AndroidRuntime(813): Uncaught handler: thread main exiting due to uncaught exception 06-07 20:49:34.745: ERROR/AndroidRuntime(813): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.app.ApplicationContext.startActivity(ApplicationContext.java:550) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.content.ContextWrapper.startActivity(ContextWrapper.java:248) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.text.style.URLSpan.onClick(URLSpan.java:62) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.text.method.LinkMovementMethod.onTouchEvent(LinkMovementMethod.java:216) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.widget.TextView.onTouchEvent(TextView.java:6560) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.View.dispatchTouchEvent(View.java:3709) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.app.Activity.dispatchTouchEvent(Activity.java:2061) Here is the code that is calling it: TextView bot = new TextView( c ); bot.setText(li.getBottomText()); bot.setTextColor(Color.BLACK); bot.setTextSize(12); bot.setPadding(50, 35, 0, 10); Linkify.addLinks(bot, Linkify.ALL); rL.addView(bot,ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); I understand what the error is saying but I am not sure how to fix it. Does anyone have any ideas? Thanks in advance for your help!

    Read the article

  • How do I get Facebook Connect to alert me when people comment on my blog?

    - by andygeers
    I'm using Facebook Connect's "Comments Box" (http://wiki.developers.facebook.com/index.php/Comments_Box) to handle comments on my blog. However, there doesn't appear to be an easy way to find out when people comment - ideally I'd like to receive an email whenever it happens, but I'd settle for an RSS feed or similar. Is there an easy way to set this up? Officially as an admin you can enable "notifications" but these are just the passive things that show up when you log on to Facebook itself - I rarely do this, and anyway it doesn't seem to work for anonymous comments.

    Read the article

  • Is it better to comment out unneeded code or delete it?

    - by Matt Connolly
    For web applications under maintenance, assuming you have source control, when you need to remove part of the UI and the associated code, do you delete the code and check in, or do you comment out the old code? Arguments in favor of deleting: cleaner code, can still see deleted code in source control history, no worrying about refactoring code that might be uncommented some day. Arguments in favor of commenting: sometimes you need to add the feature back in and the developer adding it back in may not know to check source control history, sometimes the code represents unique functionality that can be a handy reference, seeing it all in one place can help provide clues to deciphering the active code.

    Read the article

  • In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text?

    - by Edward Tanguay
    Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and delete multiscreen blocks of text or write e.g. three large methods out to another file and then delete them for testing purposes in Vim when using it via putty/ssh where you cannot use the mouse? I can easily yank-to-the-end-of-line or yank-to-the-end-of-code-block but if the text extends over many screens, or has lots of blank lines in it, I feel like my hands are tied in Vim. Any solutions? And a related question: is there a way to somehow select 40 lines, and then comment them all out (with "#" or "//"), as is common in most IDEs?

    Read the article

  • Should an edit of a comment be sent through POST or PUT?

    - by the_drow
    I have the following URI: Posts/{postId}/Comments/{commentId} I would like to enable users to edit a comment through my API, should the edit be done with POST or PUT? One one hand, POST updates the contents of a resource so that makes sense but on the other hand PUT replaces it with a new one. So if I understand correctly with POST I need to send only what needs to be updates and with PUT I send the whole resource. Usually in edit forms, the whole resource is loaded anyway so what's the point of using POST? If I take one approach or the other, what are the differences?

    Read the article

  • How to generating comments in hbm2java created POJO?

    - by jschoen
    My current setup using hibernate uses the hibernate.reveng.xml file to generate the various hbm.xml files. Which are then turned into POJOs using hbm2java. We spent some time while designing our schema, to place some pretty decent descriptions on the Tables and there columns. I am able to pull these descriptions into the hbm.xml files when generating them using hbm2jhbmxml. So I get something similar to this: <class name="test.Person" table="PERSONS"> <comment>The comment about the PERSONS table.</comment> <property name="firstName" type="string"> <column name="FIRST_NAME" length="100" not-null="true"> <comment>The first name of this person.</comment> </column> </property> <property name="middleInitial" type="string"> <column name="MIDDLE_INITIAL" length="1"> <comment>The middle initial of this person.</comment> </column> </property> <property name="lastName" type="string"> <column name="LAST_NAME" length="100"> <comment>The last name of this person.</comment> </column> </property> </class> So how do I tell hbm2java to pull and place these comments in the created Java files? I have read over this about editing the freemarker templates to change the way code is generated. I under stand the concept, but it was not to detailed about what else you could do with it beyond there example of pre and post conditions.

    Read the article

  • How to generate comments in hbm2java created POJO?

    - by jschoen
    My current setup using hibernate uses the hibernate.reveng.xml file to generate the various hbm.xml files. Which are then turned into POJOs using hbm2java. We spent some time while designing our schema, to place some pretty decent descriptions on the Tables and there columns. I am able to pull these descriptions into the hbm.xml files when generating them using hbm2jhbmxml. So I get something similar to this: <class name="test.Person" table="PERSONS"> <comment>The comment about the PERSONS table.</comment> <property name="firstName" type="string"> <column name="FIRST_NAME" length="100" not-null="true"> <comment>The first name of this person.</comment> </column> </property> <property name="middleInitial" type="string"> <column name="MIDDLE_INITIAL" length="1"> <comment>The middle initial of this person.</comment> </column> </property> <property name="lastName" type="string"> <column name="LAST_NAME" length="100"> <comment>The last name of this person.</comment> </column> </property> </class> So how do I tell hbm2java to pull and place these comments in the created Java files? I have read over this about editing the freemarker templates to change the way code is generated. I under stand the concept, but it was not to detailed about what else you could do with it beyond there example of pre and post conditions.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >