Search Results

Search found 5496 results on 220 pages for 'threaded comments'.

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

  • Most efficient way to fetch and output Content with 2-Level Comments?

    - by awegawef
    I have some content with up to 2-levels of replies. I am wondering what the most efficient way to fetch and output the replies. I should note that I am planning on storing the comments with fields content_id and reply_to, where reply_to refers to which comment it is in reply to (if any). Any criticism on this design is welcome. In pseudo-code (ish), my first attempt would be: # in outputting content CONTENT_ID all_comments = fetch all comments where content_id == CONTENT_ID root_comments = filter all_comments with reply_to == None children_comments = filter all_comments with reply_to != None output_comments = list() for each root_comment children = filter children_comments, reply_to == root_comment.id output_coments.append( (root_comment, children) ) send output_comments to template Is this the best way to do this? Thanks in advance. Edit: On second thought, I'll want to preserve date-order on the comments, so I'll have to do this a bit differently, or at least just sort the comments afterward.

    Read the article

  • Commenting System For A Website

    - by lvil
    I hope this is the right place for such a question. I am developing a website that has no users system. I am looking for a commenting system for the website. Requirements: Ajax commenting Flagging comments administration (deleting comments) php using my DB or external service No registration, no FB comments Option for a captcha Hebrew or customizable interface Can you please suggest such a system?

    Read the article

  • Why the different coarse threaded screws?

    - by Luke
    I'm seeing more and more of these screws (pictured below), which are almost triangular. I find I can only put them into Power Supplies and PCI(e) cards in cases, but they will break/strip away if I put them into a hard drive or a standoff for a motherboard Notice the triangular shape on it? On the Root Access chat, I started asking, but no concrete answer yet. I don't assume it's a production flaw, as I've seen hundreds and replaced them with the "proper" round screws. It is coarse-threaded, not fine-threaded (i.e. for a DVD drive or floppy drive). What are they for, and why do we need them instead of the regular round ones?

    Read the article

  • Proper Data Structure for Commentable Comments

    - by Wesley
    Been struggling with this on an architectural level. I have an object which can be commented on, let's call it a Post. Every post has a unique ID. Now I want to comment on that Post, and I can use ID as a foreign key, and each PostComment has an ItemID field which correlates to the Post. Since each Post has a unique ID, it is very easy to assign "Top Level" comments. When I comment on a comment however, I feel like I now need a PostCommentComment, which attaches to the ID of the PostComment. Since ID's are assigned sequentially, I can no longer simply use ItemID to differentiate where in the tree the comment is assigned. I.E. both a Post and a Post Comment might have an ID of '5', so my foreign key relationship is invalid. This seems like it could go on infinitely, with PostCommentCommentComment's etc... What's the best way to solve this? Should I have a field in the comment called "IsPostComment" or something of the like to know which collection to attach the ID to? This strikes me as the best solution I've seen so far, but now I feel like I need to make recursive DataBase calls which start to get expensive. Meaning, I get a Post and get all PostComments where ItemID == Post.ID && where IsPostComment == true Then I take that as a collection, gather all the ID's of the PostComments, and do another search where ItemID == PostComment[all].ID && where IsPostComment == false, then repeat infinitely. This means I make a call for every layer, and if I'm calling 100 Posts, I might make 1000 DB calls to get 10 layers of comments each. What is the right way to do this?

    Read the article

  • Great Blog Comments

    - by Paul Sorensen
    Just a quick note to let you know that in the interest of keeping the most useful content available here on the Oracle Certification Blog, we do moderate the comments. We welcome (and encourage dialog, questions, comments, etc) here on the topics at hand. We'll never 'censor' out a comment just because we don't like it - in fact, this is how we often learn ways in which we can do better. But of course we will filter out the typical list like anyone else: crude/offensive remarks, foul language, reference to illegal activity, etc. We will also often redirect any customer-service type inquiries to [email protected] where they can best be handled.Also, if you have a question of a general nature, please research it on the Oracle Certification website first. We often won't respond to questions asking such as "tell me how to get 11g ocp", as we've already made sure that you have that kind of information available. Now if we've inadvertently 'hidden' something on our site (gulp), then fair enough - please let us know that you're having a hard time finding it and we'll be sure to try and "unbury it" ;-)Additionally, you may have more of an 'opinion' type question, such as "should I do 'x' certification or 'y' certification." For these, we highly recommend checking on the Oracle Technology Network (OTN) Certification Forum, where you can engage in peer-to-peer discussions, share techniques, advice and best practices with others in the field.In the meantime, please continue to share your thoughts, ideas, opinions, tech tips etc - we look forward to seeing them and passing them wherever we can!QUICK LINKS:Oracle Certification WebsiteEmail - Customer ServiceOracle Technology Network (OTN) Certification Forum

    Read the article

  • SEO Practices - Comments on Blogs

    I have been creating web pages for some time and have spent considerable time researching SEO (Search Engine Optimisation) techniques, and as the owner of several blogs have always wondered about one of the techniques. Quoted from the results of a recent Google search on "SEO Blog Comments":

    Read the article

  • VS for Database Pros (GDR R2) Removes Sproc Comments (2 replies)

    I have been working with my team to implement Data Dude GDR R2 for managing ALL of the databases for our applications. So far I am very pleased by what we can do with the tool with a single exception. I want to have a header with comments as part of every stored procedure so we can track the history of a procedure. When creating a deployment script, and subsequently running it, Data Dude strips ou...

    Read the article

  • VS for Database Pros (GDR R2) Removes Sproc Comments (2 replies)

    I have been working with my team to implement Data Dude GDR R2 for managing ALL of the databases for our applications. So far I am very pleased by what we can do with the tool with a single exception. I want to have a header with comments as part of every stored procedure so we can track the history of a procedure. When creating a deployment script, and subsequently running it, Data Dude strips ou...

    Read the article

  • SQLAuthority News – Blog Subscription and Comments RSS

    - by pinaldave
    Quite often I get email where many readers ask me how to get email from SQLAuthority.com blog. Today very quickly I will go over few standard practices of this blog using you can stay connected with SQLAuthority.com First the most important is search: I received hundreds of emails and hundreds of comments every day. I try [...]

    Read the article

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

    - by Rob Wells
    Possible Duplicate: How do you like your comments? 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

  • How to ignore comments when reading a XML file into a XmlDocument?

    - by tunnuz
    Possible duplicate: How to remove all comment tags from XmlDocument Hello, I am trying to read a XML document with C#, I am doing it this way: XmlDocument myData = new XmlDocument(); myData.Load("datafile.xml"); anyway, I sometimes get comments when reading XmlNode.ChildNodes. For the benefit of who's experiencing the same requirement, here's how I did it at the end: /** Validate a file, return a XmlDocument, exclude comments */ private XmlDocument LoadAndValidate( String fileName ) { // Create XML reader settings XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreComments = true; // Exclude comments settings.ProhibitDtd = false; settings.ValidationType = ValidationType.DTD; // Validation // Create reader based on settings XmlReader reader = XmlReader.Create(fileName, settings); try { // Will throw exception if document is invalid XmlDocument document = new XmlDocument(); document.Load(reader); return document; } catch (XmlSchemaException) { return null; } } Thank you Tommaso

    Read the article

  • How to extend the comments framework (django) by removing unnecesary fields?

    - by Ignacio
    Hi, I've been reading on the django docs about the comments framework and how to customize it (http://docs.djangoproject.com/en/1.1/ref/contrib/comments/custom/) In that page, it shows how to add new fields to a form. But what I want to do is to remove unnecesary fields, like URL, email (amongst other minor mods.) On that same doc page it says the way to go is to extend my custom comments class from BaseCommentAbstractModel, but that's pretty much it, I've come so far and now I'm at a loss. I couldn't find anything on this specific aspect.

    Read the article

  • What are the virtues of using XML comments in .NET?

    - by Michal Czardybon
    I can't understand the virtues of using XML comments. I know they can be converted into nice documentation external to the code, but the same can be achieved with the much more concise DOxygen syntax. In my opinion the XML comments are wrong, because: They obfuscate the comments and the code in general. (They are more difficult to read by humans). Less code can be viewed on a single screen, because "summary" and "/summary" take additional lines. They suggest that all method parameters have to be commented, whereas 90% of them are obvious and SHOULD be left not commented. The only problem I have with this is that my point of view seems to be in minority. Why?

    Read the article

  • Help with an SQL query on a single (comments) table (screenshot included)

    - by citrus
    Please see screenshot Goal: id like to have comments nested 1 level deep The comments would be arranged so that rating of the parent is in descending order the rating of the children comments is irrelevant The left hand side of the screenshot shows the output that Id like. The RHS shows the table data. All of the comments are held in 1 table. Im a beginner with SQL queries, the best I can do is: SELECT * FROM [Comments] WHERE ([ArticleId] = @ArticleId) ORDER BY [ThreadId] DESC, [DateMade] This somewhat does the job, but it obviously neglects the rating. So the above statement would show output where Bobs Comment and all of the children comments are before Amy's and her childrens comments. How can I run this query correctly?

    Read the article

  • Database model for keeping track of likes/shares/comments on blog posts over time

    - by gage
    My goal is to keep track of the popular posts on different blog sites based on social network activity at any given time. The goal is not to simply get the most popular now, but instead find posts that are popular compared to other posts on the same blog. For example, I follow a tech blog, a sports blog, and a gossip blog. The tech blog gets waaay more readership than the other two blogs, so in raw numbers every post on the tech blog will always out number views on the other two. So lets say the average tech blog post gets 500 facebook likes and the other two get an average of 50 likes per post. Then when there is a sports blog post that has 200 fb likes and a gossip blog post with 300 while the tech blog posts today have 500 likes I want to highlight the sports and gossip blog posts (more likes than average vs tech blog with more # of likes but just average for the blog) The approach I am thinking of taking is to make an entry in a database for each blog post. Every x minutes (say every 15 minutes) I will check how many likes/shares/comments an entry has received on all the social networks (facebook, twitter, google+, linkeIn). So over time there will be a history of likes for each blog post, i.e post 1234 after 15 min: 10 fb likes, 4 tweets, 6 g+ after 30 min: 15 fb likes, 15 tweets, 10 g+ ... ... after 48 hours: 200 fb likes, 25 tweets, 15 g+ By keeping a history like this for each blog post I can know the average number of likes/shares/tweets at any give time interval. So for example the average number of fb likes for all blog posts 48hrs after posting is 50, and a particular post has 200 I can mark that as a popular post and feature/highlight it. A consideration in the design is to be able to easily query the values (likes/shares) for a specific time-frame, i.e. fb likes after 30min or tweets after 24 hrs in-order to compute averages with which to compare against (or should averages be stored in it's own table?) If this approach is flawed or could use improvement please let me know, but it is not my main question. My main question is what should a database scheme for storing this info look like? Assuming that the above approach is taken I am trying to figure out what a database schema for storing the likes over time would look like. I am brand new to databases, in doing some basic reading I see that it is advisable to make a 3NF database. I have come up with the following possible schema. Schema 1 DB Popular Posts Table: Post post_id ( primary key(pk) ) url title Table: Social Activity activity_id (pk) url (fk) type (i.e. facebook,twitter,g+) value timestamp This was my initial instinct (base on my very limited db knowledge). As far as I under stand this schema would be 3NF? I searched for designs of similar database model, and found this question on stackoverflow, http://stackoverflow.com/questions/11216080/data-structure-for-storing-height-and-weight-etc-over-time-for-multiple-users . The scenario in that question is similar (recording weight/height of users overtime). Taking the accepted answer for that question and applying it to my model results in something like: Schema 2 (same as above, but break down the social activity into 2 tables) DB Popular Posts Table: Post post_id (pk) url title Table: Social Measurement measurement_id (pk) post_id (fk) timestamp Table: Social stat stat_id (pk) measurement_id (fk) type (i.e. facebook,twitter,g+) value The advantage I see in schema 2 is that I will likely want to access all the values for a given time, i.e. when making a measurement at 30min after a post is published I will simultaneous check number of fb likes, fb shares, fb comments, tweets, g+, linkedIn. So with this schema it may be easier get get all stats for a measurement_id corresponding to a certain time, i.e. all social stats for post 1234 at time x. Another thought I had is since it doesn't make sense to compare number of fb likes with number of tweets or g+ shares, maybe it makes sense to separate each social measurement into it's own table? Schema 3 DB Popular Posts Table: Post post_id (pk) url title Table: fb_likes fb_like_id (pk) post_id (fk) timestamp value Table: fb_shares fb_shares_id (pk) post_id (fk) timestamp value Table: tweets tweets__id (pk) post_id (fk) timestamp value Table: google_plus google_plus_id (pk) post_id (fk) timestamp value As you can see I am generally lost/unsure of what approach to take. I'm sure this typical type of database problem (storing measurements overtime, i.e temperature statistic) that must have a common solution. Is there a design pattern/model for this, does it have a name? I tried searching for "database periodic data collection" or "database measurements over time" but didn't find anything specific. What would be an appropriate model to solve the needs of this problem?

    Read the article

  • Reporter seeking comments on computer science education [closed]

    - by user63982
    I'm a reporter doing a story for a tech website on computer science education, the need for software engineers, and the proficiency of new engineer hires. I would love to chat or exchange emails with anyone on this site who has an opinion on cs education and whether it did or did not prepare them for a job, and the pluses and minuses of the theoretical vs. the practical. I saw 1051's post and its comments and would love to connect with the poster and any of the commenters. Or anyone else with an opinion. I look forward to hearing from you. Thank you.

    Read the article

  • Creating a Blog ruby on Rails - Problem Deleting Comments

    - by bgadoci
    As I always type I am new to rails and programming in general so go easy. Thanks in advance. I have successfully followed the initial tutorial from Ryan Bates on how to build a weblog in 15 minutes. If you don't know this tutorial takes you through creating posts and allowing for comments on those post. It even introduces AJAX through the creating and displaying comments on the posts show.html.erb page. All works great. Here's the hiccup, when Ryan takes you though this tutorial he clears out the comments_controller and only shows the code for creating comments. I am trying to add back the ability to edit and destroy comments. Can't see to get it to work, keeps deleting the actual post not the comment (log shows that I keep sending DELETE request to PostsController). Here is my code: class CommentsController < ApplicationController def create @post = Post.find(params[:post_id]) @comment = @post.comments.create!(params[:comment]) respond_to do |format| format.html { redirect_to @post } format.js end end def destroy @comment = Comment.find(params[:id]) @comment.destroy respond_to do |format| format.html { redirect_to(posts_url) } format.xml { head :ok } end end end /views/posts/show.html.erb <%= render :partial => @post %> <p> <%= link_to 'Edit', edit_post_path (@post) %> | <%= link_to 'Destroy', @post, :method => :delete, :confirm => "Are you sure?" %> | <%= link_to 'See All Posts', posts_path %> </p> <h2>Comments</h2> <div id="comments"> <%= render :partial => @post.comments %> </div> <% remote_form_for [@post, Comment.new] do |f| %> <p> <%= f.label :body, "New Comment" %><br/> <%= f.text_area :body %> </p> <p> <%= f.submit "Add Comment" %></p> <% end %> /views/comments/_comment.html.erb <% div_for comment do %> <p> <strong>Posted <%= time_ago_in_words(comment.created_at) %> ago </strong><br/> <%= h(comment.body) %><br/> <%= link_to 'Destroy', @comments, :method => :delete, :confirm => "Are you sure?" %> </p> <% end %>

    Read the article

  • Any way to automatically wrap comments at column 80 in Visual Studio 2008? ..or display where column

    - by Jon Cage
    Is there any way to automatically wrap comments at the 80-column boundary as you type them? ..or failing that, any way to display a faint line at the coulmn 80 boundary to make wrapping them manually a little easier? Several other IDEs I use have one or other of those functions and it makes writing comments that wrap in sensible places much easier/quicker. [Edit] If (like me) you're using Visual C++ Express, you need to change the VisualStudio part of the key into VCExpress - had me confused for a while there!

    Read the article

  • .NET: How to ignore comments when reading a XML file into a XmlDocument?

    - by tunnuz
    Hello, I am trying to read a XML document with C#, I am doing it this way: XmlDocument myData = new XmlDocument(); myData.Load("datafile.xml"); anyway, I sometimes get comments when reading XmlNode.ChildNodes. Is there a way to avoid that? I know that you can avoid reading comments if you use XmlReader, but then, how to get the XmlDocument out of a XmlReader? Thank you Tommaso

    Read the article

  • How can a single threaded application like Excel 2003 take more than 50% of a hyper-threaded or dual

    - by Lunatik
    I'm waiting for Excel to finish a recalculation and I notice that the CPU usage as reported by Task Manager occasionally spikes to 51% or 52% on a Pentium 4 with hyper-threading. How is a single-threaded application like Excel 2003 doing this? Is it just a rounding/estimation error on the part of Task Manager? Or is it something to do with HT allocation i.e. I wouldn't see this happening on a genuine dual-core or dual-CPU machine?

    Read the article

  • Using disqus for a website (question on SERP and backlink)

    - by Homunculus Reticulli
    I am building a website and am trying to decide between writing my own commenting system and using disquss. One of the main deciding factors is that (obviously), I want comments left on my page to be show on SERPS. However, I remeber reading somewhere that disqus loads comments into a page using AJAX - and therefore the comments are "invisible" as far as Googlebot and other SE crawlers are concerned. Could someone confirm or refute this? The other question I have is about whether (as a commenter), When I place a comment on another website using disqus (including any links I may add to my comment), do the lionks in my comment count as a backlink (in other words are they "dofollow" or "nofollow" links)?

    Read the article

  • 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

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