- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
90 Posted Topics
Alright, I've been curious about making a code that can send a text message. I figure if it's possible to send emails with php, there's probably a way to do the same with a text message. I did come across this [URL="http://www.daniweb.com/web-development/php/threads/382740"]thread[/URL] which seems to be using a gateway to … | |
I have a program that reads in a file and extracts the front of a tag and the end and puts them on their own line, but for some reason it's missing some tags. If this is my file: <tag>something</tag><tag>something2</tag><tag>something3</tag><tag>something4</tag><tag>something5</tag> It would output should look like this: <tag>something</tag> <tag>something2</tag> <tag>something3</tag> … | |
I've been working on this paper for a while now, thinking I'm going down the right path only to find out it's wrong the night before it's due. Can someone tell me what I/O management is exactly? I was told I should be looking up the I/O architecture and figure … | |
This is my first java code so needless to say I don't know a lot about this. I think I have it all coded correctly but I don't know how to test to verify that it works. The assignment (found [URL="http://media.pearsoncmg.com/aw/aw_kurose_network_3/labs/lab2/lab2.html"]here[/URL]) wants us to actually send a message once we're … | |
Alright, I'm working on my own signature rotator. At the moment the image only updates when the page is refreshed, which I'm fine with for now. However, is it possible to force the script to grab a new image after X minutes if the page hasn't already been reloaded? I'd … | |
Re: If I'm understanding your correctly, you basically want to use the words inside the string to define what int's are sent to the function. IE. [code]string one= "Height = 5'9"; string two = "Age = 20"; functionCall(x, y); // where x and y equal the values (5'9 and 20)...[/code] | |
Alright, I found this code online which basically solved my issues. [code]<?php header ('Content-type:image/gif'); include('GIFEncoder.class.php'); $text = "Hello World"; // Open the first source image and add the text. $image = imagecreatefrompng('source01.png'); $text_color = imagecolorallocate($image, 200, 200, 200); imagestring($image, 5, 5, 5, $text, $text_color); // Generate GIF from the $image … | |
Re: First, you declare a stack like [icode]stack<char> u;[/icode]. Second, with the code your provided, you will never know if the word is almost a palindrome. The code relies on true means it is a palindrome and false means it isn't. There is no option for it being one letter off. … | |
Re: A simple cout tag will produce a line on the screen. What exactly are you having an issue with? Post the code you have so far and then I can help. | |
Re: Check out this applet. It will help show how the red/black nodes are determined. [URL="http://webpages.ull.es/users/jriera/Docencia/AVL/AVL%20tree%20applet.htm"]http://webpages.ull.es/users/jriera/Docencia/AVL/AVL%20tree%20applet.htm[/URL] I agree with Tom. It would be much easier to write the rules for making sure the red/black is correct then converting afterwards. | |
I've been working on this code to get data from a website and bring it back to my page so that I can use it. I've got that and I have another script to create an image from the line I got from the site so I'm good so far. … | |
Re: I'm not sure what you mean. Can you explain what you're trying to accomplish again? What contains what? Do you have an array that contains the threads, and each thread contains messagebox()'s? | |
Re: From what you have there, show is a one item, not an array, meaning that every time you add a show, you're overwriting the data previously placed there. Are you stuck using an array of structs, cause a vector would be much easier. [icode]vector <showType> list;[/icode] will declare it. This … | |
Re: I assume that each suit has a specific numbers associated to them; i.e. Diamonds are 0 - 12, Hearts are 15 - 27, etc. With that in mind, you can do some things to help. Like check if the cards are in the same suit by dividing the card number … | |
Re: Let me see if I understand you here. You want the user to input a bunch of numbers, but only take the ones that are even in account right? | |
Re: Show us what code you have done at the moment and then we can find where your mistakes are. | |
Re: By using [icode]infile >> temp;[/icode] you are striping the whitespace. A work around is [icode]document += temp + ' ';[/icode] but you will lose the returns. If you want to preserve the returns, I would suggest the below code, but basically all that does is copy each line into document. … | |
Alright, I'm trying to get a script to visit a website and copy the contents. The problem is that I must fill out a form before I can get to the page I want, but that's not the issue really. The url basically does this. [url]www.mysite.com/page.php[/url] // form is submitted … | |
Re: I believe their pop up is done using Javascript. That's at least how I was taught. Been a while though. | |
I was just testing out a code and I found something rather pathetic. This code does not produce anything. [CODE]<?php $source = file_get_contents("http://mysite.com/random/page.html"); echo $source; ?> [/CODE] But this code does [code]<?php $source = file_get_contents("page.html"); echo $source; ?> [/code] The php script and page.html are in the same folder, so … | |
I've had this laptop for a while, and recently two keys popped off. I wasn't worried about the first, but the second is the Z key and not exactly something I can just work around. The one of the retainer clips prongs broke off and so I'm trying to figure … | |
Re: Ok, first off, code tags are helpful. Most people won't look at your post if it's not formatted properly. Secondly, I'm not sure what you're trying to do with your code, but it's not going to create output like was in the example. Your for loops are odd. [icode]for (counter … | |
I've never done anything involving GUI before, but wanted to try it. I figured I'd start with something small at first like a simple calculation program before I try to do it with something more complicated. Where should I start and what kind of programs might be needed to do … | |
Re: It's printing the address of where it was stored in the computer. Say you had an array called x, and you wanted to print out x[0]. Right now, you are telling it to print out the address of where x[0] was stored on your computer. What you really want is … | |
Alright, I need to create an N-ary tree that contains a list of words all of the same length so that we can create a word ladder from it. Given a word (like cat), we are suppose to put that as the root and from a dictionary we are given, … | |
Re: I had to do a program like this (and am actually doing another like this now) so hopefully I can be of some help. When I did this program, I started out with an example and used that to help build my code. Perhaps you should start there and come … | |
Re: Here is my suggestion for how to handle this. Regardless of if you are checking a column, row, or minigrid, you will always have 9 chars/ints/whatever to compare. I would make a char/int/whatever array of size 9, copy the contents of whatever I'm checking into that array, and then run … | |
Re: Okay, wow... I'll be honest, not entirely sure what you are trying to do with this program. I sorta got lost in all the numbers, but, regardless, here's what I see. All your cout lines at the end need to be on their own line right. Thus meaning they should … | |
Re: It's because you are doing another comparison. What you need is to add an if before the () like [code=c++] else if (*type == 'C' || *type == 'c')[/code] That should take care of the issue and avoid a few more that could have resulted. Make sure you do that … | |
Re: What exactly are you trying to do? What do you understand and what are you failing to comprehend? Do you have an example of what you want to happen and aren't getting the results you expect or are you just trying to get information about how to handle such a … | |
Re: I don't believe there is a built in type to do such a thing (I've never come across anything like that anyway), but you should be able to write your own function to make sure they are equal anyway. [code=c++]bool equal ( /* pair p1 and p2 */) { /*check … | |
I'm writing the code for a friends webpage and they asked that I use frames. Now I've heard people complain that frames are a pain for many different reasons but I've never really seen an issue with them if they are used correctly. I actually enjoy that a single frame … | |
![]() | Re: Perhaps instead of doing [icode]aHand[cardNum] = aDeckOfCards[cardNum];[/icode], make a function in Deck that returns the top card on the deck. Here's what I would do. Make a function player.begin() (or use the constructor perhaps), which shuffles and displays the cards in Deck d (which is part of class Player) and … |
Re: My assumption is that you are using getline wrong. If should be from a buffer and to a variable. What you need is [icode]getline(cin, colour);[/icode] I believe. | |
Ok, apparently my destructor isn't done yet and I'm not sure how to handle this. I have an n-ary tree that contains nodes that are built of data and a vector of pointers. Each pointer was initialized with new, so I need to delete them obviously. One friend said I … | |
Re: My assumption (since I've been up all night that's all I'm going to do now) is that it's in print, it's in saving. Your initializations of con and bd should simply be [icode]contacts con[2];[/icode] and [icode]bday bd[2];[/icode]. Also, you are trying to save 3 contacts yet you only initialize your … | |
Re: Where is the error exactly, cause at the moment I don't see any issue with the code. One thing to help determine if there is an issue is to add a cout line inside the if else in the while and see what it is doing. Question, are the two … | |
I'm dealing with a map of vectors, and I'm making sure I clean up all the memory used. So, what exactly is the best way to handle this? One person said to use clear() on each vector in the map and then use clear() on the map, but I don't … | |
Re: You need to pass [icode]EmpRec payroll[NUMEMPS];[/icode] to your display function and you should be fine. It didn't have any info stored in "display's EmpRec payroll[NUMEMPS]", so it just spit out whatever was stored when you initiated payroll again. If you use a variable in a function and use the same … | |
Re: I'm assuming there was an extra T that didn't make it in there. I had to do something similar to this, so if you want to find the code I posted on here, feel free to go look. Anyway, are you traversing the maze yourself by telling it to go … | |
I'm writing the class for the N-ary tree and I need to finish it with a destructor. For my tree, all I do is insert, traverse, print, and destruct it basically. The part of the code dealing with it will be something like: [code]while (/*not at end of input*/) { … | |
Re: @ jencas - They are probably required to make their own list, otherwise I don't see why anyone would design their own class for such a thing. @ XpL0d3r A few questions I had when looking through your code: Why are all your functions bool? Normally when I have an … | |
Re: [QUOTE=VernonDozier;816840]Code tags please and please post the code with the array declaration so we know what the type is (is it an array of characters?). Regardless, you are overwriting everything you read in every trip through the loop. [code] while (! myfile.eof() ) { getline (myfile,truck_data2); } [/code][/QUOTE] They're right. … | |
Alright, I had to design an N-ary tree so later I could use it to produce a word ladder. I got the tree to insert and print perfectly. Now what I need to do is add pointers so that everything points to the correct item. Here's the example: Connect cat … | |
Re: What I would suggest doing, if you are reading in lines like you gave, is what Ancient Dragon said but then using stringstream to break up the lines into characters. It would look something like this. [code] stringstream ss; while (getline (inFile, line)) { ss << line; while (ss >> … | |
I was writing up my NTree class that I need for a program that I'm working on. My function order() takes in a vector and a string and sorts the vector according to that string so the words closest to the string (one letter off) are at the beginning of … | |
Re: Just a question, but does it have to be recursive? I had to write something similar to this, and what I did was use a while that kept going until they hit the end of the maze. It is on this site somewhere if you feel like searching for it... … | |
Re: The output should be pretty simple, the hardest part will be if you want to make it so it's a simple loop instead of a line per each thing What I would do is set up the table how you want it, and then write the output function so that … | |
Re: I think it would be easier to diagnose if we saw the actual code you were using. It's hard to tell what the problem is when the only part of the code given is a loop that doesn't contain what you're asking about. It doesn't really matter, but you can … | |
Ok, it's a little weird, but I'm basically trying to write a piece of code that would determine how many letters are different between two words, like cat and cot are off by one yet cat and dog are off by three. So, I have a vector that contains all … |
The End.