82 Posted Topics
Re: The easiest way to see if the derivative changes sign when considering time derivatives would of course be to see if the difference between the last and 2nd to last Z changes sign. This would mean something like [b]if((deltaZ[lcv] - deltaZ[lcv - 1]) * (deltaZ[lcv - 1] - deltaZ[lcv - … | |
Re: Obvious question: do you have a mail server running? | |
Re: Quote from cpp reference: 'Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.' | |
Re: [QUOTE=makman99;1542345][code]$result = str_replace ("--","-",$string);[/code] Should remove all if there's 3 in a row: --- It would find the first two [--]- and replace with one: [-]- leaving -- which is then replaced by -[/QUOTE] Neither has the desired behaviour. str_replace doesn't rescan already replaced input and so --- will be … | |
Re: You've misplaced the parenthesis in this line: [code] if(strcmp($line,$name == 0)) {[/code] Should of course be: [code] if(strcmp($line,$name) == 0) {[/code] | |
Re: Do you mean that this effect has to happen in real time or are you trying to 'render' the images with GD? Because if you're aiming for real time, GD wouldn't be my tool of choice since you'd have to use for instance AJAX to get every next image from … | |
Hello there forum, After a pretty thorough C++ course I've tried my hands at coding an actual project but have stumbled on a pretty big problem and here I am asking for your help. What I'm trying to make right now is a class which communicates with a gameserver through … | |
Re: You're missing an ending double-quote here. [code]$servicesoffered="<br/>"."$edit_servicearea_str<br/>\n$detailedmsg<br/>;[/code] | |
Re: [CODE]<option value="cashout">Refinance-Cashout</option>[/CODE] [CODE]$buysell=="Refinance - Cashout"[/CODE] That doesn't match. Should be [CODE]$buysell=="cashout"[/CODE] | |
Re: Is reversing the vector an option? I guess this should work: [code]reverse(foo.begin(), foo.end()); long some_long = *(long *)&foo[0];[/code] | |
Re: That's because an array is nothing but a pointer to the start of a memory block, so [code]cout << array << endl;[/code] will print the memory address of the start of your array. To print the whole array you should iterate over the 'rows' (first index) and print each array … | |
Re: [QUOTE]I am a 22 year old college gal[/QUOTE] I see what you did there.. :P This is the short solution I came up with, but I wouldn't know if it's valid for your exercise. [code]#include <iostream> using namespace std; int posInteger(int sum){ int number, revSum = 0; cout << "Enter … | |
Re: What rubberman said is actually wrong. In a multiset an element's key is itself so you need to specify only one type. Now I'll try to explain to you why you get this error: When you use a function that's defined from a template, your compiler will at compile-time create … | |
Re: This simply means that the [b]$var[/b] you're trying to split doesn't contain any [b]|[/b] at all, therefore the resulting array ([b]$tmp[/b]) is only 1 element long and [b]$tmp[1][/b] doesn't exist. | |
Re: The [b]dereference (*)[/b] operator has lower priority than the [b]member (.)[/b] operator so you need to add brackets: [code=C++](*str).length()[/code] | |
Re: [B]strpbrk[/B] effectively returns the part of the string starting at the first occurence until the end of the string. If you pass such a string to [b]atoi[/b] it will return the first numeral and ignore everything after that. Note that this numeral doesn't have to be 1 digit long but … | |
Re: If in your while loop you know which one is the one you want to display add 'selected' to the <option> like so: [code=html]<option value="..." selected>[/code] For which you can use the short if-else: [code=php]<option value="..."<?php echo ($selected) ? " selected" : ""; ?>>[/code] | |
Re: Maybe you can post a little more about the structure of your table, maybe some sample data? I can't really visualize what you're trying to accomplish right now. | |
Re: [url]http://php.net/manual/en/function.header.php[/url] This lets you change the HTTP headers which is probably the best way to redirect someone. Something like: [CODE=php]Header("Location: /$directory");[/CODE] Be sure to put it early in your document, before any output is generated, or you will get an error because you can't change the headers anymore. | |
Re: Maybe this? [CODE=c++]testPF(std::move(a), std::move(b))[/CODE] |