1,038 Posted Topics
Re: case statements are followed by a colon, not a semicolon. [inlinecode]case '82';{[/inlinecode] should be [inlinecode]case '82':{[/inlinecode] The same goes for the others | |
Re: Well it looks like the Vigenere cipher, am I correct? You would need two loops. The outer one monitoring the overall length of the string. The inner loop monitoring the length of the key. [code] Pseudocode string key = "blah" string input = "my string" string cipherstring = "" for(i=0;i<input.length;i+=key.length) … | |
Re: Well aside from the fact that it is syntactically incorrect. You aren't terminating the php blocks when you echo. Remember to end them with ?>. Aside from that, when you get the results find the number of results with mysql_num_rows then do a loop. | |
Re: Well that's more of a PHP thing, not so much with JavaScript. You can't do alot(anything?) in Javascript to interact with a database. | |
Re: Being able to see the page or any of the CSS would help just a bit. | |
Re: You are getting that error because [inlinecode]HFONT hf = CreateFontIndirect(&lf);[/inlinecode] is defined inside of the DoSelectFont function, trying to call it in DrawMessage returns an error because it doesn't exist in that scope. | |
Re: In your second attempt you are using [inlinecode]Serial[/inlinecode] in your WHERE clause which is an ambiguous field. So just pick a table and use that as the parent to the field. IE., tblQuotes.Serial | |
Re: substr() isn't a member function of an int. An int is a primitive, not a class. Also, you can't really call a substring on an integer. | |
Re: Aside from the fact that you dont give the length and boolean variables types, using reserved words and variable names and using an int function to return a boolean? | |
Re: Below the hex codes there should be a file listed as the cause of the error if not, sorry to say but WHEN it happens again and if it like you say it will, try to write down everything on the screen down with exception of the memory dump counter. … | |
Re: You have already output something to the page before you start the session which must come before any headers are sent ie. data sent to the page. I'm not sure where in your file you have that | |
Re: [quote][code]$record = $row['record']; $cat = $row['cat']; $sub = $row['subcat']; $creator = $row['creator']; $mtitle = $row['maintitle']; $murl = $row['mainurl']; $dtitle = $row['directtitle']; $durl = $row['directurl']; $descript = $row['descript']; $requires = $row['requires']; $tech = $row['techniques']; $thumb = $row['thumb']; $large = $row['large']; $ip = $row['ip'];[/code][/quote] --->>> [code]extract($row);[/code] | |
Re: I've never seen any GUI apps that do it but GDB is an extremely powerful debugger, that might have been what he was using. | |
Re: Well, for one you are obfuscating your code to an extreme extent by not giving meaningful variable names. [inlinecode]friend zz operator-(zz z);[/inlinecode] Secondly, the - operator is a binary operator. It accepts two operands, the left and the right. [inlinecode](-a)[/inlinecode] does nothing since you are using a binary operand as … | |
Re: [quote=mypopope;420054]Anyway Ancient dragon I thank you. Here is my code. [code=c++] #include <iostream.h> main() { char pass char word []="pope" // I assumed this is the setted password cout << "Enter Password:"; cin >> pass; if ( pass==word) //I'm stablishing a condition here,but it doesn't work cout << "Password Accepted"; … | |
Re: Well first of all HTML is *completely static and PHP is used to make pages dynamic since PHP is a programming language and HTML is a markup language. You still use HTML when you make websites in PHP since that's how browsers interpret the page. It's extremely easy to incorporate … ![]() | |
Re: Well you can't code a game in HTML since HTML isn't a programming language. You might be thinking of PHP or Javascript both of which there are hundreds if not thousands of tutorials online. | |
OK I've got to the stage of development where I'm balancing out formulas and I was looking for a bit of input. Here are some formulas I've made (typeset with OO.o Formula). (See the attached thumbnail) Just a reminder, << and >> are bitshifts, NOT strictly greater/less than, continue :). … | |
Re: It generates only 0 and 1 because [inlinecode]rand() % 2[/inlinecode] only finds a number between 0 and one. To find a number between one and two you could either do [inlinecode]flips = (rand() % 2) + 1[/inlinecode] or [inlinecode]flips = (rand() % 3);[/inlinecode] Also, this is unneeded [inlinecode]heads = heads … ![]() | |
Re: That's Javascript, not Java. You want this forum [URL="http://www.daniweb.com/forums/forum117.html"]JavaScript / DHTML / AJAX[/URL] | |
Re: Probably the easiest way to go would be to use the mailer from the PEAR package for php, all you do is set isHTML to true and it will write the headers and all that good stuff for you. It makes mail 100 times easier. Here's the link for you … | |
Re: Here's a little hint from your own post [quote][COLOR=red] You might be asked to attend an interview to prove that your submission is your own work.[/COLOR][/quote]Which means, if you don't know how to write it and you just hand in someone else's work they will know. Which is completely aside … | |
Re: It's because [inlinecode]$this[/inlinecode] is a reserved word used with classes to reference the current object. For example [code=php] class TestClass { var $blah; function setBlah($input) { $this->blah = $input; } } [/code] | |
Re: Well if you are using a condition to select the rows to be inserted/updated just reverse the condition and do a delete on those so if you have something like [inlinecode]WHERE name = "bob"[/inlinecode] just do [inlinecode]WHERE name != "bob"[/inlinecode] aside from reversing a condition I'm not sure there is … | |
Re: When you output the time use date_parse which breaks the time up into an associative array so you can display it in any way you would like but it is still stored the same in the database. Quick note: even if you only enter MM:SS the database will add 00 … | |
Re: You sort of left off the printBig function which is what seems to be causing the problem. Just a side note, though you can't use pointers when you pass an array you are technically passing a pointer anyway. | |
Re: I started this a while ago and I have a skeleton of a system on my site with the source and the executable since this was discussed earlier on the forums (search for Several C++ design questions) The game I have written is pretty much identical to what you are … | |
Re: Well the thing that doesn't need to be in there is the while loop. Just have it "default" to no so if they enter anything aside from a Y then don't continue. | |
Re: Use [URL="http://analytics.google.com"]Google Analytics[/URL] it will give you tons of information which you will most likely not need but it generates pretty pictures and it doesn't take up any space on your servers | |
Re: If you look at line 137 it calles the MessageBox function which takes the arguments [inlinecode]MessageBox(<message to show>, <title>, <buttons to show>, <icon to show>)[/inlinecode] [quote=curt22;435605]How can I make this print the text in the edit box when you push the button instead of "You pushed a button." I have … | |
Re: [URL]http://www.daniweb.com/forums/post409233.html[/URL] That's a link to the javascript mp3 player, the same person/team/company (not sure which) makes the JW Media player which plays FLV and it can be controlled just like the mp3 player | |
Re: In the constructor you are trying to initialize the Day, Month and Year variables to variables which do not exist. In that scope theday, themonth and theyear are not accessible. To fix that you would replace it with the parameter names given ie., day, month, year. [code=c++] //constructor initializes month, … | |
Re: What is the error? do this [inlinecode]mysql_query($sql) or die(mysql_error());[/inlinecode] It will tell you the error | |
Re: [quote=spankyg;435673][code=c++] #include "stdafx.h" #include <cstdlib> #include <iostream> usingnamespace std; [/code][/quote] Should be [inlinecode]using namespace std;[/inlinecode] NOT [inlinecode]usingnamespace std;[/inlinecode] [COLOR=red][COLOR=green] [/COLOR][/COLOR] | |
Re: It's sending empty messages because [inlinecode]$comment[/inlinecode] doesn't exist. You can get it by replacing [inlinecode]$comment[/inlinecode] with [inlinecode]$_POST['comment'][/inlinecode]. Also, you $email in sendmail.php should be replaced with [inlinecode]$_POST['email'][/inlinecode] the same for $subject, it should be changed to [inlinecode]$_POST['subject'][/inlinecode] | |
Re: [quote=Pro2000;434713]Peace, I saw a chat Program on the Net... The Messages In it automatically shows itselves without reloading the web-page.. I saw that and I wondered.... Does Any one know how to do that?[/quote] It's not using a database, it's most likely using AJAX or it's Java applet | |
Re: The simplest would be something like this [code=php] <?php function randomImage($numImages = 10) { srand( time(NULL)); $rand = rand()%$numImages; $ranImage = '<div class="thumb"> <a href="image'.$rand.'.html"> <img src="images/image'.$rand.'_thumb.gif" alt="Image'.$rand.'" /> <span><img src="images/pre_image01.gif" alt="Image01" /> <img src="images/pre_image'.$rand.'.gif" alt="Image'.$rand.'" /> <em>Image'.$rand.'</em> </span> </a> </div> '; $echo $ranImage; } ?> [/code] Then wherever you … | |
Re: Have you tried Cprogramming.com, it's a good overall reference and they have a bunch of sample code on there you can use as well. Aside from that cplusplus.com has a fairly robust reference you can use. | |
Re: Firstly, use code tags [code=php] <img src="http://<?php echo $img_url . "/" . $imgpath . $file; ?>" alt="<?php echo $file; ?>" width="250" > <br> //what is this? you don't finish the line <textarea name="textarea2" cols=23 rows=7 onClick="this.focus();this.sel..." <a href="http://<?php echo $site_url; ?>" target="_blank" title="<?php echo $urlpath . $file; ?>"> <img src="http://<?php … | |
Re: Well you wanted C++ but you sort of mashed together non-OO C with OO C++. Also the [inlinecode].h[/inlinecode] antiquates the header and there is no real reason to have stdio.h in there since that is a C header. But if you are going to use printf the way you used … | |
Re: School have filters in place for a reason. The state and/or federal government requires the schools to place filters on the network in order to be given certain grants. I remember when I first started working as an Admin at my old school I asked why they put filters on … | |
For those of you who haven't heard of or used AutoHotKey check it out here [URL="http://www.autohotkey.com/"]http://www.autohotkey.com[/URL] for the rest of you I made a really simple script for Dev-C++ to add some speed to it. (I had more in the script but they were things only I would remember and … | |
Re: [quote=kodiak;414607]I would like to make a MUD in C++. So...=) I need to know how i would program it so that other players could attack, see, and trade with each other. I'm gonna host it on my computer, or maybe a remote shell account, so my friends and i can … | |
I've been trying to decide how to handle saving game data. At first I was using plaintext which is quick and straight forward but also very, very ugly. I wanted to delve into the world of XML to save data since although it is a bit slower since it has … | |
Re: You forgot brackets for the while loop so it's only doing the first if-check [code=c++] while(condition) { //do this stuff } [/code] | |
Re: The easiest way would be to do an ifcheck on the input and then set a variable to a number then switch-block the number, ie. User input's Labrador which makes dog_id equal 1, then in the switch-block for case 1 call the function for the dog object with the type … | |
Re: [quote=tformed;411012]actually that is the actual code, it came with cd in which i opened and copied pasted. :) thanks for editing my post.[/quote] Looks to me like Daniweb parsed the greater and less than into html entities or you accidentally copied and pasted from a html document on the CD. | |
I'm having a slight problem. This particular function is crashing caused by the Loadfile ifstream being opened. [code=c++] void LoadChar(Entity players[], char saveNum) { string filename, saves; saves = saveNum; filename = "save/Save" + saves + ".sav"; char *file; file = const_cast<char*>(filename.c_str()); ifstream Loadfile(file, ios::in); //this little diddy right here … | |
Most likely you've seen a flash MP3 player or two while searching the web but I have a favorite. This is the [URL="http://www.jeroenwijering.com/?item=JW_MP3_Player"]JW MP3 Player[/URL], mainly because it has external JavaScript functions that can be used to access data about the player dynamically. I've written a few things for it … | |
Re: If it's specific to Windows then use the Windows API since that's the purpose of it. Also, are you writing it just to see if you can or because you think there are some things cygwin lacks? I've used cygwin for a while and I find it a pretty decent … |
The End.