1,684 Posted Topics
Re: What do you mean by 'algorithms'? Do you just want to memorize a bunch of algorithms? (Pretty useless; you can just look them up in a book.) Or do you want to be good at picking the right algorithm for your task? (Pretty useful.) Or do you want to be … | |
Re: Microsoft will either split into smaller companies, or it will spend 50 years dying. | |
Re: 1. It is a way of thinking, especially organizationally. Different tasks are the responsibilities of different objects. For example, in C++, it's the responsibility of the vector to reallocate its own memory as needed, not some that of some procedure that uses the vector. 2. It's a way to create … | |
Re: What do you mean by 'search engine'? What are you searching? | |
Re: I'd guess a good starting place is [url]http://en.wikipedia.org/wiki/IDNA[/url] | |
Re: Here is the solution to the GIF posted before. 4 8 1 5 6 7 3 9 2 1 6 3 2 7 8 4 5 9 8 5 6 1 2 9 7 4 3 9 4 5 8 1 3 2 7 6 3 7 4 9 8 … | |
Re: [QUOTE=iamthwee] A 3D line can be represented by:- [CODE]x + y + z = <number>[/CODE] [/QUOTE] No, that's a plane. A 3D line can be represented with two points on the line. For example, (0,3,4) and (3,2,1). Alternately, you can represent a 3D line with a point on the line … | |
Re: There is pretty much no reason to use shell scripting if you're guaranteed that your environment will have perl, unless that's what you happen to prefer. Except for maybe some really small stuff. | |
Re: a) Who are you to tell people what to do on the Internet? b) You think he wouldn't be out to 'solicit sex' from children if MySpace didn't exist? Should they also ban Yahoo! from having user accounts? I got a 'sexual solicitation' from somebody in my area, reading my … | |
| |
Re: [QUOTE=iamthwee]Hmm, but what separates perl from c++? The fact that the regex utilities are built in as opposed to the boost libraries in c++ that are not?[/QUOTE] It's quite simple. You can get a lot more done in Perl in a given amount of time than you can with C++. … | |
Re: [QUOTE=cocojim]Rookie Disclaimer. I am confused about what is the difference between: A: char *p="string"; [/QUOTE] "string" in this case is an array stored in some global location, and only seven bytes have been allocated for that string. (One is for the character with integer value zero that marks the end … | |
Re: He did use srand actually... The problem, Woobag, is that you're only supposed to seed the random number generator once. If you seed it every time you run rand, then you're resetting the random number generator back to its original state each time! So use srand once - as Ancient … | |
Re: If you want to write CGI programs in C or C++, and want to know how it works, read this tutorial: [url]http://www.cs.tut.fi/~jkorpela/forms/cgic.html[/url] This is not how Google does things, though. What do you think web servers like Apache are written in? C and C++. Google has its own software that … ![]() | |
Re: [QUOTE=freemind]As for delete[] - this belongs to the last actions I have to do. My primary concern at the moment is that the code starts running as it is supposed to do :-) Optimization belongs to the last stage before giving up the ready code and will be done, I … | |
Re: [QUOTE=duckmurder]Attempt to run the program after restarting your computer, if that does not work then make sure that your opperating system supports the program that you're attempting to run[/QUOTE] Could you, um, please explain your reasoning? | |
Re: What separates students in college is not their preexisting knowledge of a particular language, it's their problem solving ability (which is called creativity). Therefore, I recommend solving some problems with a language that doesn't have as much to come out and bite you. This will give you more experience trying … | |
Re: [quote]You could insult someone. And we don't want that, do we?[/quote] Insulting people is a good thing. People feel insulted when you tell them things that they know are true, but are denying to themselves or are afraid of being true. Many insults are used to deflate others' sense of … | |
Re: [QUOTE=aarya]i have gon through w3school about xml. i know what it is ext.but still not able to get idea how it is useful and anybody show the website example to show how xml is useful.thanks[/QUOTE] It's useful if you want to store data with ten times the space and three … | |
Re: What do you mean by 'random'? What is the range of these numbers? If they're numbers from 0 to 99, then you can prefill the array, do a random_shuffle on them, and then go through the array looking for numbers at their own indices. Whenever you get them, swap them … | |
Re: Could you be more specific? How do you want it translated? Your post is vague and makes no sense. | |
Re: Yes. Want to know how? It's operating system specific, but one general option is to use the 'system' procedure. Or, if you're using a Unixy operating system and want more control over how things are done, look at execve and its friends ('fork' followed by 'execv' will start a new … | |
Re: So, in this problem, are your distances large enough for the sphericity of the Earth to make a difference? ![]() | |
Re: There are many ways. You could do how you do it on paper. You could use the property x + y = (x-1)+(y+1). ![]() | |
Re: Your syntax for initializers is incorrect. Use only one colon, then separate with commas. [code] class Point { friend void setX( Point &, int ); friend void setY( Point &, int ); public: Point() : xCoordinate( 0 ), yCoordinate( 0 ) { }[/code] | |
| |
Re: if they're evenly distributed random numbers, n1 = n2 = n / 2, and 3 * S1 = S2 = 3*S/4, approximately. I do not feel like calculating the actual probability distributions of these values, though... | |
Create a posting games forum. And don't let that forum's posts contribute to the post count. | |
Re: I think a good solution is to check if you've reached a node the second time only on nodes whose distance from the beginning is a power of two. This lets you find a loop in linear time. From this you can also use divide and conquer to find the … | |
Re: [QUOTE=Lerner]Second, the following doesn't follow a basic tenet that I follow when writing code for myself. That tenet is to write no more than a single function before I compile looking for errors.[/QUOTE] That's not so horrible. On one homework assignment, a sparse matrix implementation, I handed in code with … | |
Re: loller, are you 16 years old? I make an exercise out of guessing people's ages based on their writing style and would like to see how accurate I am. | |
Re: x * y = x + x + ... + x (y times). Just put a zero somewhere and use a loop that runs y times adding x each time. Or in your case, replace x with a, y with b - c. | |
Re: Iraq doesn't cost many American lives, only several thousand. We should stay in there, then invade Iran, followed by Pakistan, India, Sri Lanka, Bangladesh, Burma, Thailand, and so on. After we conquer Australia we'll get two extra soldiers every turn, and that should make rolling through Asia like a walk … | |
Re: Is this in C or C++? What is your definition of 'string'? If you're using an array of characters with a zero at the end, then you can use the procedure [inlinecode]strcmp(x, y)[/inlinecode] to compare the contents of two arrays of characters, whose memory addresses are x and y. For … | |
Re: Beware of the performance costs, though. If you just pass a vector, as in the code below, you'll end up copying the entire vector, which takes an amount of time proportional to the length of the vector. Unless the compiler is unreasonably intelligent, which is never the case. [code]int foo(vector<int> … | |
Re: [QUOTE=Ross Giffard]I'm having trouble getting an overview of data structures. I've read about the different file types and the different ways of indexing but I can't see the whole thing as an overview. I know theres some logic somewhere! for instance, how do I find out the information about all … | |
Re: [tex]Oh this is awesome! Testing...[/tex] Okay, I guess it's stuck in math mode. [tex]Testing...$ testing testing $testing....[/tex] maybe? [tex]Testing...\text{\huge{a text portion}}...testing...[/tex] Some more testing... [tex]\int_1^n \frac1x dx[/tex] And some more... [tex]\frac{\left(\frac{1 + \sqrt 5}{2}\right)^n - \left(\frac{1 - \sqrt 5}{2}\right)^n}{\sqrt 5}[/tex] [tex]\text{\huge{\(\frac{\left(\frac{1 + \sqrt 5}{2}\right)^n - \left(\frac{1 - \sqrt 5}{2}\right)^n}{\sqrt 5}\)}}[/tex] | |
Re: No, that's not what's being asked for. honeybleak, do you know how to do the calculation on paper? | |
Re: If you understand the language you're using, then you should have no problem running through the code by hand or in your head to see what happens, given some particular program. So do that. | |
Re: I'd say the applied math program is as 'good' as the CS program, since it mixes good math classes with what I consider the good CS classes. This is coming from somebody majoring in math or applied math who sneaks around CS classes. If I were in your position I'd … | |
Re: Learn Scheme and Haskell. I don't know what Scheme's best applied to (probably teaching Scheme, really), but I think learning it will make you a better programmer if you let yourself go from any ways of thinking you've acquired with C++ or Java. C++ and Java basically form a subset … | |
Re: 'In'? You're probably thinking the wrong way. Each array element contains the address of a bunch of characters. So strings[3][0] == strings[4][0] compares two characters: the character located at the memory address computed by the expression, 'strings[3]', and the character located at the memory address computed by 'strings[4]'. | |
Re: > Can you please explain me the weakpoints of c++ language? No call-with-current-continuation. No closures. I.e. C++ lacks fundamental features that other programming languages have (but most lack). It takes time and typing to do things that could be completed much more quickly and easily in other languages. No good … |
The End.