82 Posted Topics

Member Avatar for hawita

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 - …

Member Avatar for jonsca
0
189
Member Avatar for xiiopao
Member Avatar for IndianaRonaldo

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.'

Member Avatar for IndianaRonaldo
0
213
Member Avatar for rajeesh_rsn

[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 …

Member Avatar for chrishea
0
178
Member Avatar for McLaren

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]

Member Avatar for McLaren
0
112
Member Avatar for Leo_london

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 …

Member Avatar for tomato.pgn
0
77
Member Avatar for Insensus

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 …

Member Avatar for Insensus
0
146
Member Avatar for mbarandao

You're missing an ending double-quote here. [code]$servicesoffered="<br/>"."$edit_servicearea_str<br/>\n$detailedmsg<br/>;[/code]

Member Avatar for mbarandao
0
93
Member Avatar for d4n1s
Member Avatar for RazorRamon

[CODE]<option value="cashout">Refinance-Cashout</option>[/CODE] [CODE]$buysell=="Refinance - Cashout"[/CODE] That doesn't match. Should be [CODE]$buysell=="cashout"[/CODE]

Member Avatar for Insensus
0
180
Member Avatar for jnewing

Is reversing the vector an option? I guess this should work: [code]reverse(foo.begin(), foo.end()); long some_long = *(long *)&foo[0];[/code]

Member Avatar for Insensus
0
211
Member Avatar for Gernicha

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 …

Member Avatar for Gernicha
0
185
Member Avatar for dunderMiflin

[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 …

Member Avatar for Insensus
0
233
Member Avatar for luislupe

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 …

Member Avatar for mike_2000_17
0
327
Member Avatar for xxreenaxx1

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.

Member Avatar for xxreenaxx1
0
109
Member Avatar for globberbob

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]

Member Avatar for globberbob
0
7K
Member Avatar for dalip_007
Member Avatar for zyberb

[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 …

Member Avatar for Insensus
0
287
Member Avatar for rootseire

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]

Member Avatar for rootseire
0
186
Member Avatar for xxreenaxx1

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.

Member Avatar for Insensus
0
125
Member Avatar for mbarandao

[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.

Member Avatar for mbarandao
0
1K
Member Avatar for stereomatching
Member Avatar for stereomatching
0
106