187 Posted Topics
Re: No you don't. When a vector's destructor gets called, it calls the destructors of all its elements. | |
Re: Use some free database server then, such as PostgreSQL or MySQL. | |
Re: [QUOTE=John A;663631]It depends. Viruses usually don't carry weight, however, Trojans are usually a few ounces each.[/QUOTE] Be careful though: with trojans, the number depends on whether you're using standard ounces or troy ounces as your unit of measurement. The choice has never been standardized. | |
Re: [QUOTE=Duoas;668629]With just a very quick glance, that [b]notOptimized[/b]() function needs some help. A bitvector (or [inlinecode]vector<bool>[/inlinecode]) is not a good choice in such a function. Sad, but it was optimized for space, not speed.[/QUOTE] In fact, a [icode]vector<bool>[/icode] isn't even optimized for space if it's standard-compliant. | |
| |
Re: The phrase "if the country is technologically advanced enough to program the script that I am asking for" is completely nonsensical. What are you even talking about. | |
Re: I'm unsure about the source of your confusion. What does the documentation and other information online say about these products? | |
Re: Don't you use a version control system or have code reviews? | |
Re: Your problem is the same as finding the smallest contiguous subsequence sum in the sequence [n1, n1 + n2, n1 + n2 + n3, n1 + n2 + n3 + n4, ...]. Transform your sequence into this form and then solve the problem I described. Come to think of it, … | |
Re: Accelerated C++ is a good book. I'd recommend learning how to use a language like Scheme, and then maybe later Haskell, because that will make you better aware of the advantages and deficiencies of C++ and Java when it comes to software design. Also, maybe learn the basics of assembly, … | |
Re: [QUOTE=Priya73;657688]Can anybody suggest to me a compelling reason to use any of the programming languages [C,C++ and Java]. Under what circumstances would you use one over the other.[/QUOTE] The main benefit of Java is that it has garbage collection, and for some devices, you have to use Java because that's … | |
Re: [QUOTE=kneel;661531]The purpose of debugging is to find defect. For this one needs a scientific approach to check and verify the code methodology. Discuss this scientific approach with solid comments.[/QUOTE] If you could, please define the word "code methodology." | |
Re: If you have a [i]finite[/i] alternating series, and are asked to find the sum, there's nothing you can do. Say you're given [tex]\sum_{k=0}^n C_k x^k[/tex] (I made that image with [icode][[b][/b]tex]\sum_{k=0}^n C_k x^k[[b][/b]/tex][/icode]) If you're asked to compute the sum, you compute the sum, and that's it. Besides, if all … | |
Re: This question was answered in the IRC channel. | |
Re: [QUOTE=softdev;657707]is automata theory important in computer science?[/QUOTE] Yes. [QUOTE=softdev]what are example of real applications of automata and formal languages?[/QUOTE] Regexes. [QUOTE=softdev]do they have anything to do with software development and verifications?[/QUOTE] Verifications? What is "verifications"? [QUOTE=softdev]i'm jst looking forward to persuing a career in automata and formal languages so i … | |
Re: That doesn't seem very urgent. One already exists, it's called the C preprocessor. | |
Re: Just say NULL, because it is the most clear. People who use anything else are idiots, trying to be clever. | |
Re: NxPublicClass is a preprocessor macro that gets replaced with [icode]__declspec(dllexport)[/icode] on Windows and gets replaced with nothing on other platforms. That is, there is [icode]# define NxPublicClass __declspec(dllexport) [/icode] in NxOgrePlatform.h, which says that, before any code is compiled, replace that token with that replacement text. You could discover this … | |
Re: [QUOTE=CoolGamer48;653923]To address your first issue: void pointers. Google it. It's basically a pointer that has no type bound to it. I haven't used them too much but I think they fit your needs.[/QUOTE] Dumb dumb dumb dumb dumb dumb dumb dumb what the hell are you talking about. klactose, the … | |
Re: You will not know only three languages. There is no way. You will end up accidentally having to write a few SQL queries, then some build scripts, editor customizations, web server configurations, XML transformations, ........... And before you know it, you'll have learned too many languages! Time to bang your … | |
Re: My job isn't like that. Not all of them are. | |
Re: Auxiliary memory is what's used when main memory has been damaged by an enemy attack. It frequently runs on auxiliary power. | |
Re: [QUOTE=Alex Edwards;650095]In my opinion, OOP is the new-school style of programming and would most likely be good practice for you. Doing everything strictly in main is really for people who are just being introduced to programming (in my opinion, once again).[/QUOTE] OOP is old-skool!! What mean you? P.S. sorry for … | |
Re: How large is X? What is the type of your large number? 0.00012354584 is actually quite small :D | |
Re: There is no universal definition of 'module'. Ask your professor for details. | |
Re: There's nothing wrong with gambling. GrimJack said: > boundaries. What boundaries? | |
| |
Re: First, wonder what information would be helpful to people who want to help you. | |
Re: There's no real answer to this question. If I had to restrict myself to three primary languages for the rest of time, they would be C++, Haskell, and Oz. If you're looking for current usefulness, or "applicability," I'd say C#, C++, and Java. But learning Java is trivial once you've … | |
Re: A big advantage of C++ that has undermentioned is that it has a much more flexible type system. Object oriented programming as seen in C++, Java, and C# is extremely restrictive in what you can do -- inheritance is fine for defining plain old polymorphic datatypes but retardedly broken for … | |
Re: Who cares? It's a mistake to write such confusing code anyway. | |
Re: In the first version, a value of type B is returned. And as you can see, in the second version, a value of type B& is returned. | |
What do you think of this? [url]http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml[/url] | |
Re: Here's an example that does directly what you want: [code] template <typename T> int my_func(T& arg) { int count = 0; typename T::iterator end = arg.end(); for (typename T::iterator p = arg.begin(); p != end; ++p) { std::cout << "Key: " << p->first << "\n"; typename T::mapped_type::iterator value_end = p->second.end(); … | |
Re: > Hi, I am relatively new to C#.NET and I was wondering if the garbage collection is similar to Java. Yes. > I am developing a windows form application and I am dynamically making new buttons, will they be deleted by themselves or will I manually need to delete them? … | |
Re: [QUOTE=ShawnCplus;638576]Ruby on Rails isn't exactly Enterprise level, it has horrible scalability.[/QUOTE] I have seen no evidence of this. | |
Re: In C99, the latest C standard, that would be legal. (Well, not the "vector.size()", but the runtime initialization of the array size.) You can use [code]scoped_array<node> nodes_array(new node[vector.size()]);[/code] instead -- if you have the boost libraries installed. | |
Re: That's too easy for a competition. Any idiot could solve that problem. | |
Re: About 8 years on computers, 18 years if you count recreational algorithm invention not conducted on computers. | |
Re: [QUOTE=MidiMagic;630856]Changing the link colors usually doesn't cause trouble, but if the site has the background color set to blue, and the link color set to white, the link totally disappears on a browser with the link colors disabled. So the handicapped person using the site can't see the links.[/QUOTE] If … | |
Re: Make a website with articles that have a creation date on them. Don't change the articles once they're posted. That's a blog. | |
Re: This isn't really a general computer science question, it's more of a language-specific one. The definition of 'macro' and 'constant' varies from language to language. In some, constants aren't constants, and in others, macros aren't macros. And in some, macros must "have a data type" and in some, constants don't … | |
Re: [QUOTE=niek_e;615912]So here's a program to get you started in brainfsck: [code=brainfsck] ++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++.-.---------. [/code] output: [icode]one[/icode] [/QUOTE] Oh please, that is such a lame solution :) Here's a better (partial) solution. [code] ++++[>++++[>+++++++>++++++<<-]<-]>>-.-.>+++++. [/code] And here is an attempt at a real solution. [code] ++++[>++++[>++++++>+++++++>+++<<<-]<-] >>+++++>>>,<[->-<]+> [-[-[-[-[-[-[-[-[-[<->[-]] <[<--.<++++.>.<----.>>-]>] <[<<.++++.--.+.>++++.>-]>] … |
The End.