Search Results

Search found 5637 results on 226 pages for 'triple slash comments'.

Page 5/226 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Correct redirect after posting comment - django comments framework

    - by Sachin
    I am using django comments framework for allowing users to comment on my site, but there is a problem with the url to which user is redirected after posting the comment. If I render my comment form as {% with comment.content_object.get_absolute_url as next %} {% render_comment_form for comment.content_object %} {% endwith %} Then the url to which it is redirected after the comment is posted is <comment.content_object.get_absolute_url/?c=<comment.id> For example I posted a comment on a post with url /post/256/a-new-post/ then the url to which I am redirected after posting the comment is /post/256/a-new-post/?c=99 where assume 99 is the id comment just posted. Instead what I want is something like this /post/256/a-new-post/#c99. Secondly when I do comment.get_absolute_url() I do not get the proper url instead I get a url like /comments/cr/58/14/#c99 and this link is broken. How can I get the correct url as mentioned in the documentation. Am i doing something wrong. Any help is appreciated.

    Read the article

  • XML comments and "--"

    - by Vi.
    <!-- here is some comment -- ^ | what can be here apart from '>'? XML seems not to like '--' inside comments. I read somewhere that '--' switchs some modes inside <! ... > thing, but <!-- -- -- --> (even number of --s) seem to be invalid too. If it is some historic feature, what is "pro" part of it? ("contra" part is inability to have -- in comments). What is the reason of complicating comment processing by not making just '--' end of comment and allowing '--' inside?

    Read the article

  • Comments for Function in Emacs

    - by Ryan
    I'm looking for a way to add comments for my functions in Emacs. Of course doxymacs is a nice candidate. But I prefer another way works without the necessary libs. Can anyone recommend some others ways for adding smart comments for functions in Emacs? Thanks. Edit: Now I found this: http://nschum.de/src/emacs/doc-mode/, but it seems that it does not work well after I require it into my .emacs and add hook for js-mode. Doesn't it support js functions ?

    Read the article

  • Comments syntax for Idoc Script

    - by kyle.hatlestad
    Maybe this is widely known and I'm late to the party, but I just ran across the syntax for making comments in Idoc Script. It's been something I've been hoping to see for a long time. And it looks like it quietly snuck into the 10gR3 release. So for comments in Idoc Script, you simply [[% surround your comments in these symbols. %]] They can be on the same line or span multiple lines. If you look in the documentation, it still mentions making comments using the syntax. Well, that's certainly not an ideal approach. You're stuffing your comment into an actual variable, it's taking up memory, and you have to watch double-quotes in your comment. A perhaps better way in the old method is to start with my comments . Still not great, but now you're not assigning something to a variable and worrying about quotes. Unfortunately, this syntax only works in places that use the Idoc format. It can't be used in Idoc files that get indexed (.hcsp & .hcsf) and use the <!--$...--> format. For those, you'll need to continue using the older methods. While on the topic, I thought I would highlight a great plug-in to Notepad++ that Arnoud Koot here at Oracle wrote for Idoc Script. It does script highlighting as well as type-ahead/auto-completion for common variables, functions, and services. For some reason, I can never seem to remember if it's DOC_INFO_LATESTRELEASE or DOC_INFO_LATEST_RELEASE, so this certainly comes in handy. I've updated his plug-in to use this new comments syntax. You can download a copy of the plug-in here which includes installation instructions.

    Read the article

  • Disable comments / Spam protection

    - by SamIAm
    My client site is built in Silverstripe, there is a news page, and it allows people to leave comments. Unfortunately we've got loads of spam emails. I'm new to this, is there any way we can disable the comment field by default? How do I do it? Alternatively is there easy way for me to install a spam protection? Thanks heaps. Sam Update - Because this is someone else's code, I just realised that they have some sort of spam protection already, so we are trying to disable comments now. I have manage to set no comment as default by changing file BlogEntry.php static $defaults = array( "ProvideComments" => true, 'ShowInMenus' => false ); to static $defaults = array( "ProvideComments" => false, //changed 'ShowInMenus' => false ); Am I on the right track to disable comments by default? Also how can I stop on the news page showing xxx comments link? eg Test Posted by Admin on 21 June 2011 | 3 Comments Tags: P This is a test.... 3 comments | Read the full post Thanks. S:)

    Read the article

  • Disable comments / Spam protection

    - by SamIAm
    My client site is built in Silverstripe, there is a news page, and it allows people to leave comments. Unfortunately we've got loads of spam emails. I'm new to this, is there any way we can disable the comment field by default? How do I do it? Alternatively is there easy way for me to install a spam protection? Thanks heaps. Sam Update - Because this is someone else's code, I just realised that they have some sort of spam protection already, so we are trying to disable comments now. I have manage to set no comment as default by changing file BlogEntry.php static $defaults = array( "ProvideComments" => true, 'ShowInMenus' => false ); to static $defaults = array( "ProvideComments" => false, //changed 'ShowInMenus' => false ); Am I on the right track to disable comments by default? Also how can I stop on the news page showing xxx comments link? eg Test Posted by Admin on 21 June 2011 | 3 Comments Tags: P This is a test.... 3 comments | Read the full post Thanks. S:)

    Read the article

  • Does DirectX implement Triple Buffering?

    - by Asik
    As AnandTech put it best in this 2009 article: In render ahead, frames cannot be dropped. This means that when the queue is full, what is displayed can have a lot more lag. Microsoft doesn't implement triple buffering in DirectX, they implement render ahead (from 0 to 8 frames with 3 being the default). The major difference in the technique we've described here is the ability to drop frames when they are outdated. Render ahead forces older frames to be displayed. Queues can help smoothness and stuttering as a few really quick frames followed by a slow frame end up being evened out and spread over more frames. But the price you pay is in lag (the more frames in the queue, the longer it takes to empty the queue and the older the frames are that are displayed). As I understand it, DirectX "Swap Chain" is merely a render ahead queue, i.e. buffers cannot be dropped; the longer the chain, the greater the input latency. At the same time, I find it hard to believe that the most widely used graphics API would not implement such fundamental functionality correctly. Is there a way to get proper triple buffered vertical synchronisation in DirectX?

    Read the article

  • Silverstripe: How can I disable comments?

    - by SamIAm
    My client site is built in Silverstripe, there is a news page, and it allows people to leave comments. Unfortunately we've got loads of spam emails. I'm new to this, is there any way we can disable the comment field by default? How do I do it? Alternatively is there easy way for me to install a spam protection? Update - Because this is someone else's code, I just realised that they have some sort of spam protection already, so we are trying to disable comments now. I have manage to set no comment as default by changing file BlogEntry.php static $defaults = array( "ProvideComments" => true, 'ShowInMenus' => false ); to static $defaults = array( "ProvideComments" => false, //changed 'ShowInMenus' => false ); Am I on the right track to disable comments by default? Also how can I stop on the news page showing xxx comments link? eg Test Posted by Admin on 21 June 2011 | 3 Comments Tags: P This is a test.... 3 comments | Read the full post

    Read the article

  • Is spreading code with refactoring comments a good idea?

    - by Uooo
    I am working on a "spaghetti-code" project, and while I am fixing bugs and implementing new features, I also do some refactoring in order to make the code unit-testable. The code is often so tightly coupled or complicated that fixing a small bug would result in a lot of classes being rewritten. So I decided to draw a line somewhere in the code where I stop refactoring. To make this clear, I drop some comments in the code explaining the situation, like: class RefactoredClass { private SingletonClass xyz; // I know SingletonClass is a Singleton, so I would not need to pass it here. // However, I would like to get rid of it in the future, so it is passed as a // parameter here to make this change easier later. public RefactoredClass(SingletonClass xyz) { this.xyz = xyz; } } Or, another piece of cake: // This might be a good candidate to be refactored. The structure is like: // Version String // | // +--> ... // | // +--> ... // | // ... and so on ... // Map map = new HashMap<String, Map<String, Map<String, List<String>>>>(); Is this a good idea? What should I keep in mind when doing so?

    Read the article

  • Fair Comments

    - by Tony Davis
    To what extent is good code self-documenting? In one of the most entertaining sessions I saw at the recent PASS summit, Jeremiah Peschka (blog | twitter) got a laugh out of a sleepy post-lunch audience with the following remark: "Some developers say good code is self-documenting; I say, get off my team" I silently applauded the sentiment. It's not that all comments are useful, but that I mistrust the basic premise that "my code is so clearly written, it doesn't need any comments". I've read many pieces describing the road to self-documenting code, and my problem with most of them is that they feed the myth that comments in code are a sign of weakness. They aren't; in fact, used correctly I'd say they are essential. Regardless of how far intelligent naming can get you in describing what the code does, or how well any accompanying unit tests can explain to your fellow developers why it works that way, it's no excuse not to document fully the public interfaces to your code. Maybe I just mixed with the wrong crowd while learning my favorite language, but when I open a stored procedure I lose the will even to read it unless I see a big Phil Factor- or Jeff Moden-style header summarizing in plain English what the code does, how it fits in to the broader application, and a usage example. This public interface describes the high-level process and should explain the role of the code, clearly, for fellow developers, language non-experts, and even any non-technical stake holders in the project. When you step into the body of the code, the low-level details, then I agree that the rules are somewhat different; especially when code is subject to frequent refactoring that can quickly render comments redundant or misleading. At their worst, here, inline comments are sticking plaster to cover up the scars caused by poor naming conventions, failure in clarity when mapping a complex domain into code, or just by not entirely understanding the problem (/ this is the clever part). If you design and refactor your code carefully so that it is as simple as possible, your functions do one thing only, you avoid having two completely different algorithms in the same piece of code, and your functions, classes and variables are intelligently named, then, yes, the need for inline comments should be minimal. And yet, even given this, I'd still argue that many languages (T-SQL certainly being one) just don't lend themselves to readability when performing even moderately-complex tasks. If the algorithm is complex, I still like to see the occasional helpful comment. Please, therefore, be as liberal as you see fit in the detail of the comments you apply to this editorial, for like code it is bound to increase its' clarity and usefulness. Cheers, Tony.

    Read the article

  • Custom template for Django's comments application does not display fields

    - by Jannis
    Hi, I want to use django.contrib.comments in a blogging application and customize the way the form is displayed. My problem is that I can't get the fields to display although displaying the hidden fields works just fine. I had a look at the docs and compared it with the regular way of displaying forms but honestly I don't know why the following doesn't work out: {% get_comment_form for comments_object as form %} <form action="{% comment_form_target %}" method="POST"> […] {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} {% for field in form.fields %} {{field}} {% endfor %} […] </form> The output looks like this: <form action="/comments/post/" method="POST"> <input type="hidden" name="content_type" value="flatpages.flatpage" id="id_content_type" /> <input type="hidden" name="object_pk" value="1" id="id_object_pk" /> <input type="hidden" name="timestamp" value="1269522506" id="id_timestamp" /> <input type="hidden" name="security_hash" value="ec4…0fd" id="id_security_hash" /> content_type object_pk timestamp security_hash name email url comment honeypot […] </form> </div> Can you tell me what I'm doing wrong? Thanks in advance

    Read the article

  • XML comments on delegate declared events

    - by Matt Whitfield
    I am visiting some old code, and there are quite a few events declared with delegates manually rather than using EventHandler<T>, like this: /// <summary> /// Delegate for event Added /// </summary> /// <param name="index">Index of the item</param> /// <param name="item">The item itself</param> public delegate void ItemAdded(int index, T item); /// <summary> /// Added is raised whenever an item is added to the collection /// </summary> public event ItemAdded Added; All well and good, until I come to use sandcastle to document the library, because it then can't find any XML comments for the private Added field that is generated by the event declaration. I want to try and sort that out, but what I would like to do is either: Get sandcastle to ignore the auto-generated private field without telling it to ignore all private fields entirely or Get XML comments generated for the private field Is there any way of achieving this without re-factoring the code to look like this: /// <summary> /// Delegate for event <see cref="Added"/> /// </summary> /// <param name="index">Index of the item</param> /// <param name="item">The item itself</param> public delegate void ItemAdded(int index, T item); /// <summary> /// Private storage for the event firing delegate for the <see cref="Added"/> event /// </summary> private ItemAdded _added; /// <summary> /// Added is raised whenever an item is added to the collection /// </summary> public event ItemAdded Added { add { _added += value; } remove { _added -= value; } }

    Read the article

  • How can I get Visual Studio 2010 to show Chinese comments properly

    - by Joe H
    I have some code from a Chinese business partner, but all of the comments in the code which are in Chinese. However, Visual Studio displays them as gibberish. How can I get them to display properly. Here is a code example with some comments converted to gibberish: //Á¬½Óµ½·þÎñÆ÷ void CTestAPIDlg::OnBnClickedButton2() { UpdateData(TRUE); //ÉèÖÃÊÇ·ñ¼Ç¼ÈÕÖ¾ m_ObjRSI->EnableLog(m_bIsOnLogReg,m_bIsOnLogComm); //ÅжÏÊÇ·ñÆôÓôúÀí if (m_bIsOnProxy) { //´úÀí²ÎÊý char proxyIP[64]; char proxyUserName[64]; char proxyUserPwd[64]; ZeroMemory(proxyIP,sizeof(proxyIP)); ZeroMemory(proxyUserName,sizeof(proxyUserName)); ZeroMemory(proxyUserPwd,sizeof(proxyUserPwd)); //×¢£º´Ë´¦ÒòΪÊÇʹÓÃunicode±àÒ룬ËùÒÔÒª×Ö·ûת»»£¬ÏÂͬ. WideCharToMultiByte(CP_ACP,0,m_strProxyIP,-1,proxyIP,64,NULL,NULL); WideCharToMultiByte(CP_ACP,0,m_strProxyUserName,-1,proxyUserName,64,NULL,NULL); WideCharToMultiByte(CP_ACP,0,m_strProxyPwd,-1,proxyUserPwd,64,NULL,NULL); //ÉèÖôúÀí²ÎÊý m_ObjRSI->SetProxyParam(proxyIP,m_iProxyPort,proxyUserName,proxyUserPwd,m_iProxyType); } //Á¬½Ó²ÎÊý char szIp[64]; ZeroMemory(szIp,sizeof(szIp)); WideCharToMultiByte(CP_ACP,0,m_strIP,-1,szIp,64,NULL,NULL); //Á¬½Ó·þÎñÆ÷ m_ObjRSI->SetCommParam(szIp,m_iPort,m_iCheckIDPort); m_ObjRSI->StartService(); //ÉèÖð´Å¥×´Ì¬ ((CButton*)GetDlgItem(IDC_CHECK2))->EnableWindow(FALSE); ((CButton*)GetDlgItem(IDC_CHECK3))->EnableWindow(FALSE); } Thanks in advance for any help...

    Read the article

  • triple bot xp,ubuntu,mac on acer z5g notebook

    - by Yadnesh
    i m plannin to install mac using these instructions http://basshead.wordpress.com/2010/04/04/snow-leopard-on-acer-aspire-one-aoa150zg5/ on my acer z5g notebook i have windows xp ,ubuntu 11.04 dual booting on it perfectly fine, my question is how do i make triple boot system what exactly do i need to do for this.do i need to tweak grub for that and i m going to create 30GB partition for MAC OS X.is it correct thing to do??

    Read the article

  • Telerik RadEditor add comments while being in Preview mode

    - by eyusubov
    Telerik's RadEditor is used for our content management system's WYSIWYG editor. We need to find a way to display content for review. User should be able to add comments and NOT be able to change the text itself. Currently, RadEditor has a Preview mode, and i am looking on how to add commenting functionality through context menu or button. The editor is pretty customizable, anyone know is ti possible to be done, any hack ways to accomplish this?

    Read the article

  • Convert Doxygen to XML comments

    - by jmster
    We have a C# project which for historical reasons uses both Doxygen and Visual Studio style comments in the same code. Has anyone tried to systematically translate one standard to another, preferably to the common XML subset? I guess it would not be too difficult to write a script to cover the most common features, but I would not like to reinvent the wheel.

    Read the article

  • Allowing users to delete their own comments in Django

    - by RaDeuX
    I am using the delete() function from django.contrib.comments.views.moderation module. The staff-member is allowed to delete ANY comment posts, which is completely fine. However, I would also like to give registered non-staff members the privilege to delete their OWN comment posts, and their OWN only. How can I accomplish this?

    Read the article

  • Strip out C Style Multi-line Comments

    - by Olaseni
    I have a C# string object that contains the code of a generic method, preceded by some standard C-Style multi-line comments. I figured I could use System.Text.RegularExpressions to remove the comment block, but I can seem to be able to get it to work. I tried: code = Regex.Replace(code,@"/\*.*?\*/",""); Can I be pointed in the right direction?

    Read the article

  • Java NetBeans Comments Class Diagram Helper

    - by ikurtz
    i am starting to learn Java using Netbeans 6.8 IDE. i am wondering if there is a utility in NetBeans similar to VS2008 that facilitates commenting code and later display these comments in class diagrams? thanks. EDIT: i found the Javadoc feature. it is some help but not that great.

    Read the article

  • Will IE9 support conditional comments?

    - by greim
    I thought I remembered reading somewhere that IE9 would not be supporting them, but now after searching I can't find any indication that this is true. Is anyone aware of a definitive statement, either way, about whether Microsoft will be supporting conditional comments in IE9?

    Read the article

  • Is trailing slash automagically added on click of home page URL in browser?

    - by Question Overflow
    I am asking this because whenever I mouseover a link to a home page (e.g. http://www.example.com), I notice that a trailing slash is always added (as observed on the status bar of the browser) whether the home page link contains a href attribute that ends with a slash or not. But whenever I am on the home page, the URL on display will not have a trailing slash. I tried entering a slash to the URL in the URL bar. And with Firebug enabled, I notice that the site always return a 200 OK status. An article here discussing this states that having a slash at the end will avoid a 301 redirection. But I am not seeing any redirection, even on this page. Could this be a browser feature that is appending the slash?

    Read the article

  • Do comments slow down an interpreted language?

    - by mvid
    I am asking this because I use Python, but it could apply to other interpreted languages as well (ruby, php). Whenever I leave a comment in my code, is it slowing down the interpreter? My limited understanding of an interpreter is that it reads program expressions in as strings and converts those strings into code. It seems that every time it parses a comment, that is wasted time. Is this the case? Is there some convention for comments in interpreted languages, or is the effect negligible?

    Read the article

  • Is there an editor that shows WYSIWYG comments?

    - by Bráulio Bezerra
    Has anyone seen an editor/IDE that shows WYSIWYG comments inside the code? I have seen some that show the docs of an element in a separated tab/windows, but not together with code. For example, a JavaDoc comment would be much clearer and easier to edit if it had no tags and could be edited like a snippet from a normal text document. /** * Writes <code>Hello world!</code> to the <b>standard output</b>. * @seealso showGoodbye */ public static void showHello() { Could be something like this: /* Writes Hello world! to the standard output. See also: showGoodbye() */ public static void showHello() { but, editable, of course. And for anyone who happens to have some knowledge/experience with open IDEs like Eclipse, Netbeans, etc.: would it be too hard to implement this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >