- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 6
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: I am teaching myself C++ with the very same book and did that very exercise yesterday. One of the 3 'run-time' errors, as opposed to the 5 'compile-time' errors, is that not all of the possible cases are accounted for. The calculator won't recognize a certain digit as a valid … | |
Last week the New York Times semed to skewer Amazon over the stress it places on its workers. I read today that Dustin Mosokvitz confirms such high stress work environments and confesses that his health deteriorated while at Facebook as a result. I don't work in IT but I hope … | |
In my continuing quest to improve my understanding of OPP in PHP, I have developed another project. It is closer to my field and a real life project I hope to develop, than my previous post using geometric shapes. This draft program is the simplest version. I want to increase … | |
I want to increase my knowledge of PHP by learning about classes. I wrote the following very simple test program. It works. But I would like to know improve it. I plan on writing more complex test programs and that won't be the time to iron out smaller issues. Thanks … | |
Hello All, My old computer crashed. I installed XAMMP on my new computer. My old PHP files don't run. I learned that the reason is that register_globals feature has been deprecated and is now permanently Off by default. My old files were written in a 'register_globals=On' environment. I understand that … | |
Re: What Guy said is correct on the surface. Underneath is a different story. I have an ad campaign for the homepage of the small site I manage and ads for 5 other landing pages. The landing pages are more specific than the homepage, as Guy advises. The problem is that … | |
I have a form with several inputs. One has a sub-input based on the condition of the original input. An example is: <input onChange="javascript:addRow()"/> The JS function works. function addRow() { Dynamic HTML code ... } However, if the original input is modified a second time, the JS function executes … | |
I have a problem that includes finding the maximums and minimums of certain variables in sequence. I want to nest the max() and min() functions as follows. $variable5 = min(max(($variable1 - $variable0), 0), $variable3); The PHP manual says/suggests that this type of nesting is possible. However, the code doesn't run … | |
I have a script in which I would like new code to appear based on the response to a question. I am using 'onChange' to trigger the event. The difficulties I am having are that: 1) The format of the form changes after the event. I would like the new … | |
Re: I have AdSense on a small website I manage. I don't understand the large variance in the revenue per click that I am experiencing. I can earn $10 on a total of 10 clicks one day, and yet earn only $5 on a total of 25 clicks another day. I … | |
I have searched for and read through over 50 examples of linked lists. I can barely make heads or tails out of them. Some are in C, some are in Java, some use templates, most only discuss theory and display flowcharts but have few explained examples. I need serious help! … | |
Re: I'm late on this but here is my $0.02 anyway. Moschops is right that this is the same as the Birthday Problem. However, this is NOT a C++ problem, or even a computer programming problem. It is a probability problem. The probability solution involves dividing the 1000 songs into 2 … | |
I am teaching myself C++ and wrote a program that does the queue data structure. It runs corectly. I would like some feedback on how I can improve the program to make it run faster, use fewer lines of code, or be clearer to someone else. I haven't added my … | |
I am teaching myself C++ and amd now trying to simple programs related to data structures. I wrote this code for a simple stack. It is not working. I am frustrated and tired so I cannot think through the issue. There are two main problems with which I need help. … | |
I would like to express a superscript and a subscript in the same vertical space. For example, consider a variable called X with a subscript 1 that is squared. I have searched for examples of what I want to do but cannot find anything close. [code] X<sub>1</sub><sup>2</sup> [/code] The above … | |
I am organizing my site to make it easier and faster to maintain. I keep a small version of my site on my laptop running Apache/PHP. I successfully organized and recoded things to the way I wanted. Upon uploading the file to my live site, I ran into several problems. … | |
Hi. This is not a frequently browsed category, but there is no place else for my question. I am organizing my site to make it easier and faster to maintain. I keep a small version of my site on my laptop running Apache/PHP. I successfully organized and recoded things to … | |
Re: Narue, Thank you very much for your outstanding explanation of pointers. Like the OP, I am also self-learning C++. Your post has raised my understanding of pointers several levels, as the books and tutorials I read were nowhere near as clear. I have a follow-up question. (Not to hi-jack the … | |
| Re: I manage a small website. I participate in forums that are relevant to our business. [B]ALL[/B] these forums prohibit advertising in the posts. That includes links to a site that you reference in your post. They force you to buy advertising on their site. I have also written 2 or … |
Re: I was going to suggest exactly what MrIdul posted above. It may take some effort to write the loops for sine and cosine to the degree of precision you need, unless you have experience with the infinite series topic in advanced calculus. | |
Re: [QUOTE=ShaRp codeR;1674041]Thanks guys, i figured it out how to show "1000" under principal. Thanks for the help.[/QUOTE] That was not your only error. The principal balance at the beginning of a month should be equal to the remaining balance at the end of the prior month. Your output does not … | |
Re: I recently faced a similar issue when I was learning about page layout using CSS. As I understand it, and I may not be understanding it fully or correctly, when you are using relative positioning, you can use negative margins. That is because the margin anchor (top left) will be … | |
I am developing my own project for the practice. I am having a great deal of difficulty conceptualizing the classes I want. The scenario is that of 2 countries, each capable of producing 2 goods, using 2 factors of production. Specifically, Lower Mongolia and Upper Mongolia have certain amounts of … | |
I have made revisions to my program. I gave up on the idea of using functions that return arrays. That was far too complicated for the expected benefit. This latest version compiles and runs correctly with all of the provisions required by the exercise. What remains is feedback on the … | |
This is part of my Wumpus Hunt program. Suggestions were to clean up the main() part of the program by creating functions. I am working on that and ran into this difficulty (for me). The functions that relate to the rooms of the game need to return an array. I … | |
I was already thinking along ARKoenig's suggestion and revised my code to use arrays. It was working pretty well until I made some minor changes. Now it loops non-stop without any prompt for the player to make a play. I am sure it is a small error, but I can't … | |
Is it possible to have an array as a class member? It is part of my Wumpus Hunt exercise. I want to do the following: [code] class Room { blah blah; }; int main() { for (i = 0; i < 3; i++) { Room adjacent[i]; blah blah; } [/code] … | |
Stroustrup has an exercise in which the reader writes a program for the wumpus hunt game. A first draft of my code is below. It compiles and runs partly correctly. If you choose to move to a different room the program runs as expected. If you choose to shoot at … | |
I have a difficulty I need help to overcome. I am developing a program that uses more than 1 class. Variables defined in one class are used in other classes. For example: [code] class X1 { private: int a; int b; public; X1() { a = 10; b = 20; … | |
An exercise that Stroustrup wants the reader to do is understand the output of the following program. [code] #include "../../std_lib_facilities.h" struct X { int val; void out(const string& s, int nv) { cerr << this << "->" << s << ":" << val << "(" << nv << ")\n"; } … |