Search Results

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

Page 10/226 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Teaching: How can you motivate students to comment?

    - by keflavich
    I remember when I was taught, "comments are the most important part of code." Or rather, when I was told that comments are the most important part of the code. I don't think I was convinced, and I still see common cases where programmers are not convinced of the necessity of good & thorough comments. I am certainly convinced myself at this point - trying to read, in particular, complex formulae that call functions that call other functions that I don't understand - but I don't know how to convey this to students.

    Read the article

  • Hierarchical/Nested Database Structure for Comments

    - by Stephen Melrose
    Hi, I'm trying to figure out the best approach for a database schema for comments. The problem I'm having is that the comments system will need to allow nested/hierarchical comments, and I'm not sure how to design this out properly. My requirements are, Comments can be made on comments, so I need to store the tree hierarchy I need to be able to query the comments in the tree hierarchy order, but efficiently, preferably in a fast single query, but I don't know if this is possible I'd need to make some wierd queries, e.g. pull out the latest 5 root comments, and a maximum of 3 children for each one of those I read an article on the MySQL website on this very subject, http://dev.mysql.com/tech-resources/articles/hierarchical-data.html The "Nested Set Model" in theory sounds like it will do what I need, except I'm worried about querying the thing, and also inserting. If this is the right approach, How would I do my 3rd requirement above? If I have 2000 comments, and I add a new sub-comment on the first comment, that will be a LOT of updating to do. This doesn't seem right to me? Or is there a better approach for the type of data I'm wanting to store and query? Thank you

    Read the article

  • Script/plugin to update web page (load next 25 comments) until page fully loaded

    - by Carl
    Brief summary: I need a script/plugin for Firefox that selects the "load next 25 comments" link at the bottom of a web page, until that link is no longer on the page. As you click that link - you get more comments - eventually all of them on the same page. See this web page for an example (there are 1,852 comments): http://www.cnn.com/2010/US/05/16/gulf.oil.spill/index.html#comment-50598247 I have a regular problem with CNN.com. I post comments there. People sometimes reply to them. I check my profile, and see the number of replies, but I can't read them there. I have to follow the link to the original article. The fist set of comments are at the bottom, with a 'load next 25' link at the bottom. There are often hundreds of comments, and sometimes a few thousand. There is no practical way for me to read the replies to my comments. If there's under around 300 hundred, I'll just click that link enough times to see what the replies to my comments are. I need a script/plugin to select that 'load next 25' link until that link is no longer present on the page. Then I could just search for my userid and read the responses.

    Read the article

  • Getting triple-tap for Gyration Media Center remote working in Windows shell

    - by Lunatik
    I have this Gyration remote which, out of the box, does not support triple-tap for text entry outside of Media Center; only numbers can be entered in the Windows shell. Gyration have a patch that supposedly allows this, but it hasn't worked for me. I'm not alone in this regard it seems though. I've seem some discussion on removing and reinstalling USB devices to get this working, but nothing I'd really trust not to screw something else up. Does anyone have any tips for getting this functionality working properly?

    Read the article

  • Triple ghost animated cursor

    - by R G A
    Since installing the driver for Intuos 4 Graphics tablet, animated cursors display as a triple ghost cursor. I cannot find any reference to this problem elsewhere. System specifications: new Dell XPS, Windows 7, ATI Mobility Radeon HD 4670. Graphics tablet and graphics software are virtually useless since the cursor hotspot is nearly impossible to identify. All drivers and software are current. Any thoughts? Vendors deny any knowledge or responsibility. Removing the Intuos driver does not fix this.

    Read the article

  • Foward slash in kibana 3 query

    - by G Mawr
    I'm trying to add a query that will match a request that ends with a slash, like this one: n.n.n.n - - [16/Oct/2013:16:40:41 +0100] "GET / HTTP/1.1" 200 25058 "-" "Mozilla/5.0 (iPad; CPU OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53" I'm using the Lucene query type. If my query is set to *, I see the event. If I set it to request:"css", I see CSS requests, as expected. However, all of the following yield no results: request:"/" request:"\/" request:"\\/" I tried a Lucene regular expression, with no luck: request:/\// I note that someone else is getting what appears to be a similar issue, although that's on Kibana 2: https://github.com/rashidkpc/Kibana/issues/401 How can I query for requests that end with a / character?

    Read the article

  • Slash Notation IP - What is what?

    - by Nirmal
    We just signed up with a new ISP and we got a static IP from them. Our previous ISP just gave one IP and we were able to configure our web server using that. Now, we have got this new IP with a slash notation. This type is new to me. When I used the CIDR calculator, it gave me the following results: 202.184.7.52/30 IP: 202.184.7.52 Netmask: 255.255.255.252 Number of hosts: 2 Network address: 202.184.7.52 Broadcast address: 202.184.7.55 Can someone please help me by explaining what these are? I could not understand what the number of hosts means. Is that telling that I can use two different IP for DNS (A) records? Also, which one should I setup in my router? The network address or broadcast address? Thank you very much for any answer you may provide.

    Read the article

  • Remove trailing slash using redirect directive in vhost

    - by Choy
    I have an issue where urls that end in a "/" after a file name causes css/js to break. I.e., http://www.mysite.com/index.php/ <-- breaks http://www.mysite.com/ <-- OK, only breaks for file names To fix, I tried adding a Redirect 301 directive in the vhost file as such where I'm checking to see if there's an extension with a slash after it: <VirtualHost *:80> ServerName mysite.com Redirect 301 ^(.*?\..+)/$ http://mysite.com/$1 </VirtualHost> The redirect appears to do nothing. Is this an issue with my implementation or is what I'm trying to accomplish not possible with a Redirect 301 in the vhost file?

    Read the article

  • Slash-started resources redirection in HTML with .htaccess

    - by Pawka
    I have moved old version of webpage to some subdirectory: http://www.smth.com/old/. But all resources (images, css, etc.) in HTML are linked with slash symbol at the start. So browser still tries to load them from root path. For example old/test.html contains: <img src="/images/lma_logo.ico" /> <!-- not working !--> <img src="images/lma_logo.ico" /> <!-- working !--> How can I rewrite ulrs to load resources from the "old" dir if urls still starts with "/"?

    Read the article

  • redirect to rootdomain after the first slash in url

    - by user142397
    I want to redirect this: http://www.site.com/xyz To http://www.site.com/ Basically i want to redirect to the root domain if a user types anything else after the first slash of my domain name like /xyz or anything else should be redirected or rewritten as the root URL in the browser. Can anybody help? Thanks for your help! (* This should be only for the first time like when a new user comes to visit my page, because once the page loads for the first time i do not want any re directions as i have different directories, and related webpages. Otherwise my visitor will only see landing page. )

    Read the article

  • Apache trailing slash added to files problem

    - by Francisc
    Hello! I am having a problem with Apache. What it does is this: Take /index.php file containing an code with src set to relative path myimg.jpg, both in the root of my server. So, www.mysite.com would show the image as would www.mysite.com/index.php. However, if I access www.mysite.com/index.php/ (with a trailing slash) it does the odd thing of executing index.php code as it would be inside an index.php folder (e.g. /index.php/index.php), thus not showing the image anymore. This is a simple example that's easy to solve with absolte addressing etc, the problem I am getting from this a security one that's not so easily fixed. So, how can I get Apache to give a 403 or 404 when files are accessed "as folders"? Thank you.

    Read the article

  • Resources started with slash .htaccess redirection

    - by Pawka
    I have moved old version of webpage to some subdirectory: http://www.smth.com/old/. But all resources (images, css, etc.) in HTML are linked with slash symbol at the start. So browser still tries to load them from root path. For example old/test.html contains: <img src="/images/lma_logo.ico" /> <!-- not working !--> <img src="images/lma_logo.ico" /> <!-- working !--> How can I rewrite ulrs to load resources from the "old" dir if urls still starts with "/"?

    Read the article

  • htaccess rewriterule leading slash

    - by Tiddo
    I'm using htaccess to rewrite my urls so that I can have nice clean urls. However, the same htaccess file does different things on my local server and my remote server: On my local server the url to the website is like http://localhost/example/ and on my remote server the url is http://example.com/. For my local server I can use the following htaccess redirect rule: RewriteRule ^(.*)$ index.php?page=$1 [L,QSA] However, when I use this on my remote server I get an internal server error. Instead I have to use this: (note the leading slash) RewriteRule ^(.*)$ /index.php?page=$1 [L,QSA] Unfortunately this doesn't work on my local server: this rewrite rule requests http://localhost/index.php instead of http://localhost/example/index.php on my local server. How can I make this work on both my remote and local server?

    Read the article

  • IIS 6.0 Rewrite rules for Wordpress (Forward slash not working and other things)

    - by DigitalBlade
    Hi, I am using Wordpress 3.0.4 on IIS 6.0 and Windows Server 2003, hosted by a company. I was having lots of issues using permalinks. I have fixed most, but now I have an issue with a forward-slash not being added to the address. This would be fine on most websites, but not on IIS for some reason. Specifically, if I go to "mysite.com/wp-admin" I can log-in and get to the dashboard, but as soon as I click anything there i am redirected to a broken link. For example: "mysite.com/post-new.php". If I add the slash at the end it's fine. So I tried to have a rewrite rule to automatically add the slash to such address: RewriteRule /wp-admin /wp-admin/ [L] But it still doesn't work. For your reference, here's the complete file: [ISAPI_Rewrite] RewriteBase / RewriteCond ${REQUEST_FILENAME} !-f RewriteCond ${REQUEST_FILENAME} !-d # For special WordPress folders (e.g. theme, admin, etc.) RewriteRule /wp-admin /wp-admin/ [L] RewriteRule /wp-(.*) /wp-$1 [L] RewriteRule /(.*\.(?:jpg|jpeg|gif|css|txt|xml|html|png|js)) /$1 [I,L] # Rules to ensure that normal content gets through RewriteRule /images/(.*) /images/$1 [L] RewriteRule /favicon.ico /favicon.ico [L] RewriteRule /robots.txt /robots.txt [L] RewriteRule /phpmyadmin/(.*) /phpmyadmin/$1 [L] RewriteRule /phpmyadmin /phpmyadmin/ [L] # For all WordPress pages RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L] Any ideas? Thanks in advance

    Read the article

  • Are there any code libraries that validate/convert blog comments to XHTML strict?

    - by Matthew James Taylor
    I am working on a website in PHP where people can make comments similar to a blog, and I only want particular tags to be allowed. Are there any pre-built libraries that process comments and produce valid XHTML Strict code? I would need to do this in JavaScript so I can generate a live preview like Stack Overflow, plus in PHP before saving it to a MySQL database. The allowed HTML tags will be: strong, em, blockquote, and links (rel=nofollow not required) One way would be to allow people to directly enter the HTML into the comment field but I would prefer to use a simple mark up something like this (can be different - this is an example): *strong* _em_ [blockquote] http://www.link.com I want line breaks to be converted to <br />. Are there any code libraries that do the above?

    Read the article

  • Do you have any tips for comments code to keep them in step with the code?

    - by Rob Wells
    G'day, I've read both of Steve McConnell's excellent Code Complete books "Code Complete" and "Code Complete 2" and was wondering if people have any other suggestions for commenting code. My commenting mantra could be summed up by the basic idea of expressing "what the code below cannot say". While enjoying this interesting blog post by Jeff about commenting I was still left wondering "When coding, when do you feel a comment is required?" Edit: Oops. Seems to be a duplicate of this question http://stackoverflow.com/questions/121945/how-do-you-like-your-comments so sorry for the noise. Thanks to my, seemingly, SO shadow for pointing it out - wouldn't have thought I was that interesting. Now off to read the original post and see if it is relevant. Edit: I meant to emphasise the best appraoch to ensure that your comments will stay in step with the code. Maybe expressing an intent rather than the mechansim for instance.

    Read the article

  • Is it OK to put link to SO questions in a program comments?

    - by WizardOfOdds
    In quite some codebase you can see comments stating things like: // Workaround for defect 'xxx', (See bug 1434594 on Sun's bugparade) So I've got a few questions, but they're all related. Is it OK to put link to SO questions in a program's comments: // We're now mapping from the "sorted-on column" to original indices. // // There's apparently no easy way to do this in Java, so we're // re-inventing a wheel. // // (see why here, in SO question: http://stackoverflow.com/questions/951848) Do you do it? And what are the drawbacks in doing so? (see my first comment for a terrible drawback)

    Read the article

  • WordPress + Facebook comments addition (php knowledge needed)

    - by user1356223
    I succeded to fetch Facebok comments number via this function: <?php function fb_comment_count() { global $post; $url = get_permalink($post->ID); $filecontent = file_get_contents('https://graph.facebook.com/?ids=' . $url); $json = json_decode($filecontent); $count = $json->$url->comments; if ($count == 0 || !isset($count)) { $count = 0; } echo $count; } ;?> And I call it with: <?php fb_comment_count();?> Now how do I add it to this code: <?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?> so that WordPress shows number of WP and FB comments together in one number. Thank you very much to everyone!

    Read the article

  • rails: best way to store comments in mysql

    - by ciss
    Hello. Okay i have two models: posts and comments. as you can think comments has column :post_id. My models Comments belongs_to :post Post has_many :comments So, this is pretty simple association but i have some problems with ordering comments. at first time, when i create my comments migration file i just add column :position. This column indicate comment position in the post. But now i think what where is more good way to do this. so i can't make my choise: 1) uses t.column :datatime :created_at, :default = Time.now() 2) or use timestamps? this is undiscovered for me, please tell me about your exp.

    Read the article

  • How to do comments in Activity Stream? (like Facebook)

    - by fesja
    Hi, I'm starting to develop an activity stream. I've read both How to implement the activity stream in a social network and What’s the best manner of implementing a social activity stream?. What I haven't found is the best way to add comments to the activities. As in facebook, each comment can be commented by another person. If each activity comment is saved as another activity, then I would not be able to get the activity of that comment without doing a query. So the solution I'm thinking is to save the comments inside the serialize data field of each activity. If the user wants to delete his comment, I would have to update that activity. Is this the correct solution? Is there a better approach? Thanks!

    Read the article

  • Triple Boot with Windows 7, Windows 7 and Ubuntu

    - by BillJeansk
    Hello, currently I have dual boot with 2 windows 7. (dont ask why, long story, I need them for each with different settings involving Audio Recording) I am very keen to install the new Ubuntu and get into a new OS, out of interest but I don't want to mess with my current 2 windows installations? If I install Ubuntu, will this simply add to my list of OS boot options when you set it, like I did when I install my 2nd Windows 7 Any comments or help would be great? Thanks Bill

    Read the article

  • Why should you document code?

    - by Edwin Tripp
    I am a graduate software developer for a financial company that uses an old COBOL-like language/flat-file record storage system. The code is completely undocumented, both code comments and overall system design and there is no help on the web (unused outside the industry). The current developers have been working on the system for between 10 and 30 years and are adamant that documentation is unnecessary as you can just read the code to work out what's going on and that you can't trust comments. Why should such a system be documented?

    Read the article

  • Should I comment Tables or Columns in my database?

    - by jako
    I like to comment my code with various information, and I think most people nowadays do so while writing some code. But when it comes to database tables or columns, I have never seen anyone setting some comments, and, to be honest, I don't even think of looking for comments there. So I am wondering if some people are commenting their DB strcuture here, and if I should bother commenting, for instance when I create a new column to an existing table?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >