Search Results

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

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

  • Django comments form validation, check if the comment is from authenticated user

    - by Headcrab
    I wanted to add reCaptcha to the comment form, but only for non-authenticated users. I've created my own comments app, using reCaptcha more or less according to this post, except that I don't have any (explicit) view function to post the comment, but instead I check captcha as a part of form validation process. Everything works fine so far. Now, how do I disable reCaptcha for a logged in user? Removing all reCaptcha-related fields in the template is no problem, but how do I validate the form, not checking captcha if the comment if from an authenticated user? Alternatively, is there a way to use two different comment form classes, depending on whether the user is authenticated or not?

    Read the article

  • AWK: is there some flag to ignore comments?

    - by HH
    Comment rows are counted in the NR. Is there some flag to ignore comments? How can you limit the range in AWK, not like piping | sed -e '1d', to ignore comment rows? Example $ awk '{sum+=$3} END {avg=sum/NR} END {print avg}' coriolis_data 0.885491 // WRONG divided by 11, should be by 10 $ cat coriolis_data #d-err-t-err-d2-err .105 0.005 0.9766 0.0001 0.595 0.005 .095 0.005 0.9963 0.0001 0.595 0.005 .115 0.005 0.9687 0.0001 0.595 0.005 .105 0.005 0.9693 0.0001 0.595 0.005 .095 0.005 0.9798 0.0001 0.595 0.005 .105 0.005 0.9798 0.0001 0.595 0.005 .095 0.005 0.9711 0.0001 0.595 0.005 .110 0.005 0.9640 0.0001 0.595 0.005 .105 0.005 0.9704 0.0001 0.595 0.005 .090 0.005 0.9644 0.0001 0.595 0.005

    Read the article

  • HTML / Conditional Comments - Do conditional comments behave as expected across browsers?

    - by John Himmelman
    Do conditional comments behave as expected across browsers? Can they cause rendering bugs or other issues? Are there any errors in the formatting/syntax of this CC? <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="718" height="227" id="swf"> <param name="movie" value="images/swf.swf" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="images/swf.swf" width="718" height="227"> <!--<![endif]--> <img src="images/alt.jpg" border="0" width="718" height="227"> <!--[if !IE]>--> </object> <!--<![endif]--> </object>

    Read the article

  • Ban HTML comments from your pages and views

    - by Bertrand Le Roy
    Too many people don’t realize that there are other options than <!-- --> comments to annotate HTML. These comments are harmful because they are sent to the client and thus make your page heavier than it needs to be. When doing ASP.NET, a simple drop-in replacement is server comments, which are delimited by <%-- --%> instead of <!-- -->. Those server comments are visible in your source code, but will never be rendered to the client. Here’s a simple way to sanitize a web site. From Visual Studio, hit CTRL+H to bring the search and replace dialog. Choose “Replace in Files” from the second meny on top of the dialog. Open the find options, check “use” and make sure “Regular expressions” are selected. Use “*.aspx;*.ascx;” as the file types to examine. Choose “Entire Solution” under “Look in”. Here’s the expression to search for comments: \<!--{[^-]*}--\> And here’s the replacement string: <%--\1--%> I usually use the “Find Next” and “Replace” buttons rather than the more brutal “Replace All” in order to not apply the fix blindingly. Once this is done, I do a second manual pass of finds with the same expression to make sure I didn’t miss anything.

    Read the article

  • Ban HTML comments from your pages and views

    Too many people dont realize that there are other options than <!-- --> comments to annotate HTML. These comments are harmful because they are sent to the client and thus make your page heavier than it needs to be. When doing ASP.NET, a simple drop-in replacement is server comments, which are delimited by <%-- --%> instead of <!-- -->. Those server comments are visible in your source code, but will never be rendered to the client. Heres a simple way to sanitize a web site. From...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Integrating Facebook Comments into your DotNetNuke Pages

    - by Chris Hammond
    Last week Facebook announced a new feature that websites can use to get Facebook Comments onto their web pages . I thought this was interesting as I have a few car racing sites that are using Forums, but also have the DNNSimpleArticle module for main page content. The forums are active, but the DNNSimpleArticle module doesn’t allow for comments as of right now (or in the foreseeable future) so I started to look into the Facebook comments a bit. From a quick read of their blog post/announcement it...(read more)

    Read the article

  • Comments in code

    - by DavidMadden
    It is a good practice to leave comments in your code.  Knowing what the hell you were thinking or later intending can be salvation for yourself or the poor soul coming behind you.  Comments can leave clues to why you chose one approach over the other.  Perhaps staged re-engineering dictated that coding practices vary.One thing that should not be left in code as comments is old code.  There are many free tools that left you version your code.  Subversion is a great tool when used with TortoiseSVN.  Leaving commented code scattered all over will cause you to second guess yourself, all distraction to the real code, and is just bad practice.If you have a versioning solution, take time to go back through your code and clean things up.  You may find that you can remove lines and leave real comments that are far more knowledgeable than having to remember why you commented out the old code in the first place.

    Read the article

  • Read the Comments!

    - by Bob Porter
    Originally posted on: http://geekswithblogs.net/blogofbob/archive/2013/06/18/read-the-comments.aspxSorry, I have been lax in posting for quite some time. Hopefully this will be the start of a renewed posting binge! A piece of advice, if you are searching for a solution to an issue, or a recommendation, or anything else on the web, when you find a post or a forum thread do 2 things.  First, check the date on the post of thread. If it is older it may no longer be fully up to date and or inaccurate. Bear that in mind.  Second, READ THE COMMENTS! Often small omissions or other issues in the post itself are resolved in the comments. If the solution to your issue does not appear to work check the comments. There may be a step missing or something else relavent that was raised by a prior reader or the author themselves. Cheers, Robert Porter

    Read the article

  • Trailing comments after variable assignment subvert comparison

    - by nobar
    In GNU make, trailing comments appended to variable assignments prevent subsequent comparison (via ifeq) from working correctly. Here's the Makefile... A = a B = b ## trailing comment C = c RESULT := ifeq "$(A)" "a" RESULT += a endif ifeq "$(B)" "b" RESULT += b endif ifeq "$(C)" "c" RESULT += c endif rule: @echo RESULT=\"$(RESULT)\" @echo A=\"$(A)\" @echo B=\"$(B)\" @echo C=\"$(C)\" Here's the output... $ make RESULT=" a c" A="a" B="b " C="c" As you can see from the displayed value of RESULT, the ifeq was affected by the presence of the comment in the assignment of B. Echoing the variable B, shows that the problem is not the comment, but the intervening space. The obvious solution is to explicitly strip the whitespace prior to comparison like so... ifeq "$(strip $(B))" "b" RESULT += b endif However this seems error prone. Since the strip operation is not needed unless/until a comment is used, you can leave out the strip and everything will initially work just fine -- so chances are you won't always remember to add the strip. Later, if someone adds a comment when setting the variable, the Makefile no longer works as expected. Note: There is a closely related issue, as demonstrated in this question, that trailing whitespace can break string compares even if there is no comment. Question: Is there a more fool-proof way to deal with this issue?

    Read the article

  • Strange named anchor behavior - only working with the hash mark after a trailing slash

    - by tnorthcutt
    I have an odd problem. Links to named anchors on a site I'm working on are only working correctly if the pound/hash sign is placed after a trailing slash (e.g. example.com/about/#who), rather than directly after a page name (e.g. example.com/about#who). What could be causing this? I should note that this is on a site running WordPress, with the WPML translation plugin. I'm not sure if that's causing the problem, though (otherwise I'd ask on the WordPress Answers SE site). Any suggestions as to what could be causing this strange behavior?

    Read the article

  • Triple boot Windows XP, Ubuntu, & Mac on Acer z5g notebook

    - by Yadnesh
    I'm planning to install Mac OS X 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? I'm going to create 30GB partition for MAC OS X. Is it correct thing to do?

    Read the article

  • T420 Triple Head with Optimus

    - by Rolo
    I see that this is possible on a T520 apparently (Triple-head on a Lenovo T520), but I can't see anyone claiming it's possible on a T420. I'm running 12.04 and have Bumbleebee installed and working fine but I can't get the display port monitor to display anything. The power light flicks on, but things only render on my VGA output monitor, and Ubuntu's display settings don't detect the third monitor. I'm not concerned with power management, ie, am happy to leave set on discrete graphics in the BIOS if that helps. Is this possible? Thanks.

    Read the article

  • Watch out for a trailing slash on $ORACLE_HOME

    - by user12620111
    Watch out for a trailing slash on $ORACLE_HOME oracle$ export ORACLE_HOME=/u01/app/11.2.0.3/grid/ oracle$ ORACLE_SID=+ASM1 oracle$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 29 13:04:01 2012 Copyright (c) 1982, 2011, Oracle.  All rights reserved. Connected to an idle instance. SQL> oracle$ export ORACLE_HOME=/u01/app/11.2.0.3/grid oracle$ ORACLE_SID=+ASM1 oracle$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 29 13:04:44 2012 Copyright (c) 1982, 2011, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options SQL>

    Read the article

  • Advice on triple/quadruple-booting?

    - by professorfish
    I am currently running Windows 7 Home Premium x64 on my laptop. I would like to install more than one Linux distro, IN ADDITION TO Windows 7. How do I go about this, what do I need to be careful and aware of, is it possible? The specific distros I might eventually install: Definitely: Ubuntu (is it a good idea to install the Linux-Secure-Remix version?) Almost definitely: OpenSUSE Probably: Zorin Possibly: Arch Possibly: Fedora Possibly: FreeBSD Computer details: Successfully used WUBI for Ubuntu in the past Recently reinstalled Windows using the RECOVERY partition Windows 7 Home Premium x64 model: ASUS K53U series AMD Brazos Dual Core E450 1.65 GHz 750GB hard drive, currently partitioned into C: (300GB total, 246 GB free), D: (373GB - total, 167 GB free), and RECOVERY (the rest of the space, I think) 4GB RAM Can I be sure that GRUB will work, if WUBI has worked? In short, how do I go about triple- or quadruple-booting Windows 7, Ubuntu and other distros? What do I need to be aware of? How do I set up the partition structure? Thank you in advance

    Read the article

  • Triple Monitor Setup with Nvidia and Compiz

    - by AndrewX192
    I have a triple monitor setup with two video cards on Ubuntu 10.04. I have the monitors and graphics cards currently setup as follows: Nvidia Geforce 210 #1 - 1920x1080 Monitor (Twinview) [Center - Monitor #1] - 1920x1080 Monitor (Twinview) [Right - Monitor #2] Nvidia Geforce 210 #2 - 1920x1080 Monitor (Separate X Screen) [Left - Monitor #3] This works fine, except when I open a program, it shows up in between monitor #1 and #2 - meaning I have to drag it to one screen before I can use the window. Gnome2's gnome-panel also does not work on the twinview setup; it spans between both monitors, but it does not redraw (ex: the clock never changes). In addition, when I maximize an application, it spans both monitors, which is not acceptable. When I enable Xinerama for my setup, gnome-panel no longer spans two monitors, and applications maximize as expected, but compiz does not work, as X11 compositing is not available. The lack of desktop compositing causes problems with dragging windows between screens (redraws take forever). Is there anything I can do to fix these issues without opting for different graphics cards?

    Read the article

  • Are there “server-side comments” in JSF / Seam / RichFaces?

    - by Jonik
    With the JSF/Seam/RichFaces stack, is there a way to mark up comments (on XHTML pages) so that they will not be included in the HTML output? I.e., something like JSP's <%-- comments --%>, as opposed to normal <!-- comments -->. I heard that facelets.SKIP_COMMENTS context-param migth do this for normal HTML comments, but is there any other option? (After all, there might be some comments that you want included in the page output and some that you don't.)

    Read the article

  • Triple boot vista xp ubuntu

    - by Artyom2033
    My partition table is pretty messed up from install/uninstall os and what I want to do now is to clear that and have vista/xp/ubuntu 12.04 on the same hard drive. I have create a new partition for xp on vista, everything was fine, but when I restarted my pc, I was getting the grub restore prompt. Even when I was trying to install xp, when the 'lunch windows' came, a wild BSOD appear. So I have deleted my partition for xp using gParted include in the 12.04 live cd. This haven't resolve the problem and I am still unable to boot in vista nor ubuntu. But I realy what this triple boot for LoL purpose (since my vista installation keep giving latency spike in this game and I hope this will not be the case in a fresh xp installation (I have tested it in ubuntu, the ping was good, but the fps wasn't). So what I want to do, is to install xp on a partition, then be able to boot on any of them without a problem from a nice installation of grub or something. gParted screenshot Thanks for help. Sorry for my English.

    Read the article

  • Getting a double slash when redirecting for a canonical hostname on Firefox only

    - by Brian Neal
    I have a Django powered website, and I'm trying to solve the "canonical hostname" problem. I want www.example.com to redirect to example.com. I have tried both techniques found in the Apache documentation here (scroll down to Canonical hostnames). I'm currently trying the mod_rewrite method, and I have this in a virtual host container: RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^/?(.*)$ http://example.com/$1 [L,R=301,NE] This works for me, except for one case. In Firefox only, if I type www.example.com in a browser, it redirects and I see this in the URL bar: example.com// (note the 2 trailing slashes). However, something like this will work correctly: www.example.com/news/ gets redirected to example.com/news/. I only see this on the root URL in Firefox. It seems to work fine on Windows under Chrome, IE9, and Opera (maybe those browsers eat the double slash?). My Mac using friend says it is fine in Safari, but he also sees the problem in Firefox. As far as Django settings go, I am using the default value of APPEND_SLASH=True. I don't know if Django has anything to do with it, but I've tried mod_rewrite rules like the above on static HTML sites before and it always seems to work.

    Read the article

  • Triple-display setup using AMD drivers

    - by Halik
    I am currently running a dual display setup with nVidia 8800GTS video card, on a Ubuntu 12.10 box. The current setup uses nVidia TwinView to render the image on a 1920x1200 display and 1600x1200 one. I'm planning to add a third, 1280x1024 display to the setup. The change will require me to upgrade my GFX card to one supporting triple displays. I'll probably go with Sapphire Radeon 7770 (FLEX edition, to avoid additional active DP-DVI adapters). Before I invest in new GFX I wanted to ask - how well the AMD drivers will support such a setup. It does not matter whether it's fglrx or the OSS ones. If I remember correctly, when running Fedora on a Radeon x800, I had 'void' areas above and below the working area on my second display. The desktop was rendered in 1920+1280 width and 1200 height (which left 176px of vertical space accessible for my cursor and windows but not displayed on the screen - I'd prefer to avoid that). It may have very well been my misconfiguration back then. Generally, are there any solutions from AMD on par with TwinView? Or is it a non-issue at all? Also, I'm wondering about the usual stuff - hardware h264 decoding support, glitch-free flash support, any issues with Compiz/Unity?

    Read the article

  • Django comments being spammed

    - by John
    Hi, I am using the built in comment system with Django but it has started to be spammed. Can anyone recommend anything I can use to stop this such as captcha for django etc. I'm looking for something that I can use along with the comment system rather than replacing it. Thanks

    Read the article

  • web2py server-side comments

    - by MikeWyatt
    In a web2py view, how do I comment out server-side code? In ASP.NET, I can surround any HTML or code tags with <%-- and --% and that block will not be compiled or sent to the client. Velocity does the same thing with #* and *#. Is there an equivalent in web2py? ASP.NET <div> <p><%=foo.bar%></p> <%-- don't print twice! <p><%=foo.bar%></p> --%> </div> web2py <div> <p><%=foo.bar%></p> ??? don't print twice! <p><%=foo.bar%></p> ??? </div>

    Read the article

  • Avoiding duplication in JavaDoc comments

    - by TERACytE
    I am writing a class where the same xml is used between some methods. e.g. /** * Sample Response: * <xmp> * <myXML> * <stuff> data </stuff> * </myXML> * </xmp> */ CommonXML Method1(); /** * Sample Submission: * <xmp> * <myXML> * <stuff> data </stuff> * </myXML> * </xmp> */ void Method2(CommonXML xml); I would like to write my documentation so that if the xml changes I have one resource to modify, rather than updating all of the JavaDoc for the affected methods. Does anyone know how to accomplish this?

    Read the article

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