Search Results

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

Page 20/226 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Styling a comment box to appear below dynamically-generated comments

    - by John
    Hello, For the code below, how could I make the form always appear 30 pixels below the bottom of the HTML table styled with "commentecho"? Thanks in advance, John $sqlStr = "SELECT comment.comment, comment.datecommented, login.username FROM comment LEFT JOIN login ON comment.loginid=login.loginid WHERE submissionid=$submissionid ORDER BY comment.datecommented DESC LIMIT 100"; $result = mysql_query($sqlStr); $arr = array(); echo "<table class=\"commentecho\">"; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td class="commentname1">'.$row["comment"].'</td>'; echo '</tr>'; echo '<tr>'; echo '<td class="commentname2"><a href="http://www...com/sandbox/members/index.php?profile='.$row["username"].'">'.$row["username"].'</a>'.date('l, F j, Y &\nb\sp &\nb\sp g:i a &\nb\sp &\nb\sp \N\E\W &\nb\sp \Y\O\R\K &\nb\sp \T\I\M\E', strtotime($row["datecommented"])).'</td>'; echo '</tr>'; } echo "</table>"; echo '<form action="http://www...com/sandbox/comments/comments2.php" method="post"> <input type="hidden" value="'.$_SESSION['loginid'].'" name="uid"> <input type="hidden" value="'.$submissionid.'" name="submissionid"> <input type="hidden" value="'.$submission.'" name="submission"> <label class="addacomment" for="title">Add a comment:</label> <input class="commentsubfield" name="comment" type="comment" id="comment" maxlength="1000"> <div class="commentsubbutton"><input name="submit" type="submit" value="Submit"></div> </form> ';

    Read the article

  • MySql "comments" parameter as descriptor?

    - by Nick
    So, I'm trying to learn a lot at once, and this place is really helpful! I'm making a little running log website for myself and maybe a few other people, and I have it so that the user can add workouts for each day. With each workout, I have a variety of information the user can fill out for the workout, such as running distance, time, quality of run, course, etc... I store this in a MySql database as a table with fields titled "distance", "time", "runquality", etc... Now, these field titles don't match up with what I want displayed on the running log, so I was thinking of using the "Comments" attribute for a field to store its human-readable title--thus the field "runquality" would have "Quality of run" as its comment, and then I would pull the comment with a SQL query and display it instead of the field name. Is this a good theoretical/practical way of going about it? And what sort of SQL would I use to pull the comment for the field anyway? Secondly, suppose I want to add the ability for the user to create their own workout descriptors. So say a user wants to add a "temperature" descriptor for their workout. Should I create a script that adds fields to my workout table, or should I create a separate table listing only workout descriptors and somehow link the descriptor table with the "contents" table? I haven't learned any theory about database design or anything so any help is appreciated!

    Read the article

  • VB.net: Custom ' TODO: List on an Interface

    - by Shiftbit
    How do I add my own todo and comments list to appear on Interfaces? I want it to pop up like IDisposable does: Public Class Foo : Implements IDisposable Private disposedValue As Boolean = False ' To detect redundant calls ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not Me.disposedValue Then If disposing Then ' TODO: free other state (managed objects). End If ' TODO: free your own state (unmanaged objects). ' TODO: set large fields to null. End If Me.disposedValue = True End Sub #Region " IDisposable Support " ' This code added by Visual Basic to correctly implement the disposable pattern. Public Sub Dispose() Implements IDisposable.Dispose ' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above. Dispose(True) GC.SuppressFinalize(Me) End Sub #End Region End Class Whenever I enter my own comments and todo list they are never autogenerated like IDisposable Interface does. I would like my own Interfaces to preserve the comments so that I can share my Interfaces with in source documentation.

    Read the article

  • postID collection? through Graph API

    - by Raul Sanchez
    I've spent last days trying to get a list of recent comments in my site with no success What I want to retrieve is just the same content as I can get at https://developers.facebook.com/tools/comments/?id={APP_ID}&view=recent_comments For example... https://graph.facebook.com/{APP_ID}/comments Always returns... { "data": [ ] } I've read this query should be made to a post_id, not app_id, but then... How can I get a collection of postIDs made in my site?? Can you someone give me a tip? Thanks!

    Read the article

  • What external comment system to use for Jekyll powered blog?

    - by Jakub Narebski
    What external comment system (i.e. something like Disqus or perhaps even Hacker News / YCombinator) would you recommend for Jekyll-powered blog (in this case: blog on GitHub Pages), or in more generic term for blog aware static site generator powered blog (which includes beside Jekyll also for example ikiwiki or xfire's growl)? Because a blog without comments is not a blog :-).

    Read the article

  • Can I disable comments by default on my YouTube videos?

    - by Philip Durbin
    Comments are unfortunately always automatically enabled when I upload a video to YouTube either via their website or iPhoto, but more often that not I later manually disable comments for each uploaded video by following the steps from the "comments on my videos" section of YouTube Help. I would much rather have comments automatically disabled, that is to say, disabled by default, for all of my uploaded videos. Is this possible? I couldn't find a setting for it.

    Read the article

  • Correctly encode characters in a PHP mail form ("I'm" turns to be "I\'m")

    - by Peanuts
    Hello guys, I'm testing a PHP mail form, a very barebones one, found here: <?php if(isset($_POST['submit'])) { //The form has been submitted, prep a nice thank you message $output = '<h3>Thanks for your message</h3>'; //Deal with the email $to = '[email protected]'; $subject = 'you have a mail'; $contactname = strip_tags($_POST['contactname']); $adress = strip_tags($_POST['adress']); $contactemail = strip_tags($_POST['contactemail']); $textmessage = strip_tags($_POST['textmessage']); $boundary =md5(date('r', time())); $headers = "From: My Site\r\nReply-To: [email protected]"; $message = "Name: ".$contactname."\n"; $message .= "Adress: ".$adress."\n"; $message .= "E-mail: ".$contactemail."\n"; $message .= "Message: ".$textmessage."\n"; mail($to, $subject, $message, $headers); } ?> The problem is I'm receiving an unwanted slash "\" everytime I write a single or a double quote in my message, so "I'm" appear as "I\'m" in my mailbox. I know it have to do with the way PHP distinguishes code quotes from only lecture quotes, but I wouldn't know what to add in my form to get it properly running. Any help is appreciated,

    Read the article

  • Encrypt correctly caracters in a PHP mail form ("I'm" turns to be "I\'m")

    - by Peanuts
    Hello guys, I'm testing a PHP mail form, a very barebones one, found here: <?php if(isset($_POST['submit'])) { //The form has been submitted, prep a nice thank you message $output = '<h3>Thanks for your message</h3>'; //Deal with the email $to = '[email protected]'; $subject = 'you have a mail'; $contactname = strip_tags($_POST['contactname']); $adress = strip_tags($_POST['adress']); $contactemail = strip_tags($_POST['contactemail']); $textmessage = strip_tags($_POST['textmessage']); $boundary =md5(date('r', time())); $headers = "From: My Site\r\nReply-To: [email protected]"; $message = "Name: ".$contactname."\n"; $message .= "Adress: ".$adress."\n"; $message .= "E-mail: ".$contactemail."\n"; $message .= "Message: ".$textmessage."\n"; mail($to, $subject, $message, $headers); } ?> The problem is I'm receiving an unwanted slash "\" everytime I write a single or a double quote in my message, so "I'm" appear as "I\'m" in my mailbox. I know it have to do with the way PHP distinguishes code quotes from only lecture quotes, but I wouldn't know what to add in my form to get it properly running. Any help is appreciated,

    Read the article

  • Why does Java automatically decode %2F in URI encoded filenames?

    - by Lucas
    I have a java servlet that needs to write out files that have a user-configurable name. I am trying to use URI encoding to properly escape special characters, but the JRE appears to automatically convert encoded forward slashes (%2F) into path separators. Example: File dir = new File("C:\Documents and Setting\username\temp"); String fn = "Top 1/2.pdf"; URI uri = new URI( dir.toURI().toASCIIString() + URLEncoder.encoder( fn, "UTF-8" ).toString() ); File out = new File( uri ); System.out.println( dir.toURI().toASCIIString() ); System.out.println( URLEncoder.encoder( fn, "UTF-8" ).toString() ); System.out.println( uri.toASCIIString() ); System.out.println( output.toURI().toASCIIString() ); The output is: file:/C:/Documents%20and%20Settings/username/temp/ Top+1%2F2.pdf file:/C:/Documents%20and%20Settings/username/temp/Top+1%2F2.pdf file:/C:/Documents%20and%20Settings/username/temp/Top+1/2.pdf After the new File object is instantiated, the %2F sequence is automatically converted to a forward slash and I end up with an incorrect path. Does anybody know the proper way to approach this issue? The core of the problem seems to be that uri.equals( new File(uri).toURI() ) == FALSE when there is a '%2F' in the URI. I'm planning to just use the URLEncoded string verbatim rather than trying to use the File(uri) constructor.

    Read the article

  • [C++] std::string manipulation: whitespace, "newline escapes '\'" and comments #

    - by rubenvb
    Kind of looking for affirmation here. I have some hand-written code, which I'm not shy to say I'm proud of, which reads a file, removes leading whitespace, processes newline escapes '\' and removes comments starting with #. It also removes all empty lines (also whitespace-only ones). Any thoughts/recommendations? I could probably replace some std::cout's with std::runtime_errors... but that's not a priority here :) const int RecipeReader::readRecipe() { ifstream is_recipe(s_buffer.c_str()); if (!is_recipe) cout << "unable to open file" << endl; while (getline(is_recipe, s_buffer)) { // whitespace+comment removeLeadingWhitespace(s_buffer); processComment(s_buffer); // newline escapes + append all subsequent lines with '\' processNewlineEscapes(s_buffer, is_recipe); // store the real text line if (!s_buffer.empty()) v_s_recipe.push_back(s_buffer); s_buffer.clear(); } is_recipe.close(); return 0; } void RecipeReader::processNewlineEscapes(string &s_string, ifstream &is_stream) { string s_temp; size_t sz_index = s_string.find_first_of("\\"); while (sz_index <= s_string.length()) { if (getline(is_stream,s_temp)) { removeLeadingWhitespace(s_temp); processComment(s_temp); s_string = s_string.substr(0,sz_index-1) + " " + s_temp; } else cout << "Error: newline escape '\' found at EOF" << endl; sz_index = s_string.find_first_of("\\"); } } void RecipeReader::processComment(string &s_string) { size_t sz_index = s_string.find_first_of("#"); s_string = s_string.substr(0,sz_index); } void RecipeReader::removeLeadingWhitespace(string &s_string) { const size_t sz_length = s_string.size(); size_t sz_index = s_string.find_first_not_of(" \t"); if (sz_index <= sz_length) s_string = s_string.substr(sz_index); else if ((sz_index > sz_length) && (sz_length != 0)) // "empty" lines with only whitespace s_string.clear(); } Some extra info: the first s_buffer passed to the ifstream contains the filename, std::string s_buffer is a class data member, so is std::vector v_s_recipe. Any comment is welcome :)

    Read the article

  • [C++] std::tring manipulation: whitespace, "newline escapes '\'" and comments #

    - by rubenvb
    Kind of looking for affirmation here. I have some hand-written code, which I'm not shy to say I'm proud of, which reads a file, removes leading whitespace, processes newline escapes '\' and removes comments starting with #. It also removes all empty lines (also whitespace-only ones). Any thoughts/recommendations? I could probably replace some std::cout's with std::runtime_errors... but that's not a priority here :) const int RecipeReader::readRecipe() { ifstream is_recipe(s_buffer.c_str()); if (!is_recipe) cout << "unable to open file" << endl; while (getline(is_recipe, s_buffer)) { // whitespace+comment removeLeadingWhitespace(s_buffer); processComment(s_buffer); // newline escapes + append all subsequent lines with '\' processNewlineEscapes(s_buffer, is_recipe); // store the real text line if (!s_buffer.empty()) v_s_recipe.push_back(s_buffer); s_buffer.clear(); } is_recipe.close(); return 0; } void RecipeReader::processNewlineEscapes(string &s_string, ifstream &is_stream) { string s_temp; size_t sz_index = s_string.find_first_of("\\"); while (sz_index <= s_string.length()) { if (getline(is_stream,s_temp)) { removeLeadingWhitespace(s_temp); processComment(s_temp); s_string = s_string.substr(0,sz_index-1) + " " + s_temp; } else cout << "Error: newline escape '\' found at EOF" << endl; sz_index = s_string.find_first_of("\\"); } } void RecipeReader::processComment(string &s_string) { size_t sz_index = s_string.find_first_of("#"); s_string = s_string.substr(0,sz_index); } void RecipeReader::removeLeadingWhitespace(string &s_string) { const size_t sz_length = s_string.size(); size_t sz_index = s_string.find_first_not_of(" \t"); if (sz_index <= sz_length) s_string = s_string.substr(sz_index); else if ((sz_index > sz_length) && (sz_length != 0)) // "empty" lines with only whitespace s_string.clear(); } Some extra info: std::string s_buffer is a class data member, so is std::vector v_s_recipe. Any comment is welcome :)

    Read the article

  • Django "comment_was_flagged" signal

    - by tsoporan
    Hello, This is my first time working with django signals and I would like to hook the "comment_was_flagged" signal provided by the comments app to notify me when a comment is flagged. This is my code, but it doesn't seem to work, am I missing something? from django.contrib.comments.signals import comment_was_flagged from django.core.mail import send_mail def comment_flagged_notification(sender, **kwargs): send_mail('testing moderation', 'testing', 'test@localhost', ['[email protected]',]) comment_was_flagged.connect(comment_flagged_notification) (I am just testing the email for now, but I have assured the email is sending properly.) Thanks!

    Read the article

  • Java Class comment

    - by sarah xia
    Hi, The developer guide in my company says class comments should go before Package statements, i.e it sould be the very first thing in a java file. I just find it a bit old. Isn't it normal practice to put class comments after import and above class declaration? Puzzled Sarah

    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

  • MySQL Table structure of thumb UP & DOWN for comments system ?

    - by Axel
    Hello, i already created a table for comments but i want to add the feature of thumb Up and Down for comments like Digg and Youtube, i use php & mysql and i'm wondering What's the best table scheme to implement that so comments with many likes will be on the top. This is my current comments table : comments(id,user,article,comment,stamp) Note: Only registred will be able to vote, so there isn't need to restrict the votes by IP Thanks

    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

  • Auto comment all public members in a file

    - by ooo
    I have turned on warnings as errors and now i need to XML comment all of my public methods. just to get my program compiling, i just want to put placeholders for now. Is there anyway to automatically add XML comments to all of the public members in a class or a file. I see ghost doc which gives you good autogenerated XML comments but it still looks like it only does one member at a time.

    Read the article

  • How to prevent yourself from commenting on websites?

    - by MHH
    There is a bunch of browser add ons to either block particular websites (i.e. leechblock, chrome nanny or various OS specific solutions) or block the comment section of a website (i.e. commentBlocker). However, what if you want to be able to read the comment section of all websites, but want to never be able to add comments yourself, on particular sites? Is there anything that will allow this? I'm particularly interested in answers that will work for both windows and mac, and will also work for google chrome, firefox, and safari (note they can be different solutions for each browser/operating system)

    Read the article

  • How does one view the "inline docs" of a .cpp file?

    - by Mala
    I have cpp files peppered with comments such as the following before every function: /** * @brief Set the normal and expansion handshake timeouts. * * @param wm Array of wiimote_t structures. * @param wiimotes Number of objects in the wm array. * @param normal_timeout The timeout in milliseconds for a normal read. * @param exp_timeout The timeout in millisecondsd to wait for an expansion handshake. */ I assume from the format that there has to be some way of exporting this into a "friendly" format, perhaps html, which can then be read in a manner similar to the Java API. How would I do this? (I'm on Windows 7, running MS Visual Studio 2010)

    Read the article

  • What are the common character animation techniques used in tile based hack&slash games?

    - by Gorky
    I wonder what kind of animation techniques are used for creature and character animation in modern hack&slash type tile based games? Keyframing for different actions may be one option. Skeletal framing may be another. But how about the physics? Or do they use a totally hybrid system of inverse kinematics supported with a skeleton,physics and mixed with interpolated keyframing for more realistic animations? If so, how and for what reasons? I can think of many different solutions for the issues below but I wonder what's used and best suited for issues like: Walking or moving on an uneven terrain Combat interaction, combat physics and collisions Attaching rigid items to character and their iteractions ih physics world Soft body dynamics like hair, vegetation, clothes and fabric in line with animations and iteractions.

    Read the article

  • Google Chrome triple sa part de marché en un an et aide Firefox à devenir numéro un en Europe au détriment d'Internet Explorer

    Google Chrome triple sa part de marché en un an Et aide Firefox à devenir numéro un en Europe au détriment d'Internet Explorer Internet Explorer est détrôné en Europe, une première sur un telle zone géographique. La faute à Firefox, bien sûr. Mais aussi et surtout à Chrome de Google. Le titre du navigateur le plus utilisé en Europe revient donc à Mozilla Firefox (d'après les chiffres du mois de décembre publiés par StatCounter, spécialiste des statistiques web). Mais en analysant ces résultats de plus prêt, on remarque que la part de marché de Firefox n'a absolument pas augmenté entre les mois de novembre et de décembre. Le navigateur a même perdu 0.4 point ...

    Read the article

  • Graphics and USB devices freezing soon after OS loads

    - by Andrew
    I run Ubuntu/Windows dual boot. Last night I started the upgrade to Ubuntu 12.04, and my computer has not worked since in either Windows or Ubuntu. Here's what I got when I rebooted after the upgrade, and continue to get every time I boot: Gets to GRUB screen OK. Choose Ubuntu - black screen or crazy purple lines. At first I assumed something went wrong with the upgrade (often happens). Choose Windows - works fine, I log in, but soon after that the graphics freeze (sometimes with purple artifacts). The keyboard and mouse (both USB) also lose power at the same instant, and none of the USB ports have power to them. This happens sooner or later every time I boot. Update: the HDD also appears to lose power at the same point. I have tried a live CD, but my computer refuses to boot any CD even after disabling all other boot options in the BIOS. I have disconnected everything except keyboard, mouse, graphics card with one monitor, one RAM sick and HDD; no change. I also took the little battery out to reset CMOS. I am pretty sure no matter how wrong the Ubuntu upgrade went, it wouldn't cause the above symptoms in Windows. So the only explanation I can think of is that a hardware failure occurred at the same time. Some possible causes of this I can think of are: A couple of days before this, I added a third screen (which worked fine). About a week before, my house lost power in a storm (no ill effects over the past few days though). What can I do, other than buy a new motherboard/CPU and hope it works? Unfortunately I don't have another box to swap parts into to test at the moment.

    Read the article

  • Multi monitor setup with a tv as well?

    - by jasondavis
    I have always had a dual monitor setup for my pc's for years now. I am now in the market to build a new PC and get some new stuff. I need some help or advice on how to run 3 monitors WITH a 4th display which will be a lcd/plasma tv. So I am thinking I can get 2 video cards and that will give me all the hookups to run 3 monitors instead of 2. I will mount all 3 monitors in a row side by side and above them on the wall I would like to mount a larger 30-40+ inch lcd or plasma tv. I would then like to hook up my atelite/cable to this tv just as I would normally hook up a tv but I would like to also be able to have an option to view my PC o this tv as well. I know that is possible but would it be possible to view my PC on that tv and also still view my 3 other monitors and have the TV be a 4th display, where I could dock a different app/window in windows in all 4 displays (3 monitors + tv) ?? Please tell me any tips/advice on how to do this including what cables/software if any/converters/ you name it. Thanks for any help

    Read the article

  • USB to DVI adapter to get around two monitor limit of my graphics card?

    - by JavaJosh94
    My graphics card is an nVidia GTS 450 which will only run two monitors at a time, but I'd like to add a third one. Will I be able to do that using a USB to DVI adapter or would the limit still be there? Also I've been told the video quality is really bad with these adapters, so is the quality of the video output by these adapters okay for things like web browsing and working on office thing? And is it worth the $60 or would I be better off just buying a cheep second card?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >