1,684 Posted Topics
Re: [QUOTE=BestJewSinceJC;1013830]And another note - on a real project, you use a code management system such as CVS or SVN where everyone can share code, but without working on the same code at once or interfering with each other.[/QUOTE] Never use CVS. Don't even mention CVS. Usually, don't use SVN either; … | |
| |
Re: [i]Purely Functional Data Structures[/i] by Okasaki is [i]excellent[/i] and you should read it. It might blow your mind unless that has already blown in a functional-programming-related manner. | |
Re: See if you can use "if", "and", or "or". | |
Re: All these methods just call procedures that use the comparison operators. | |
Re: How many steps does it take for i*2^k to be greater than n? | |
Re: When it scans, the object will be one color and the background will be another, right? Count the number of pixels that are the object's color. And multiply that by the area of a pixel. | |
Re: A Brainfucck interpreter. (I misspelled the name of the language btw.) | |
Re: [QUOTE=xueyingkoo;1013803]Finally find one real world applications that use this technology,[/QUOTE] You've received an impossible assignment. | |
Re: [QUOTE=tryongliph;1013200][code] //load client details prevData = getFormData.DisplayData(); for (int i = 1; i <= 3; i++) { switch (i) { case 1: C_name = prevData[i].ToString(); break; case 2: D_name = prevData[i].ToString(); break; case 3: B_type = prevData[i].ToString(); break; } }[/code][/quote] First of all, again, you should be iterating i from … | |
Re: What is the ctr? What are you talking about. You should regard this as a problem of approaching the list from one of three cases: the previous element having been a list, having been an atom, or none of the above. If you face the problem by writing three separate … | |
Re: Yes, read through the Time Complexity of Algorithm thread. It's a very old thread and has practical and theoretical answers. | |
Re: You can compile and run the program if you want to see if it works. | |
| |
Re: If you want to become a programmer, you have to know how to code. Nothing else really matters, as long as you can talk to people like a normal human being and can get to work before 1:00 PM. You're going to be a complete noob, coming out of college, … | |
Re: [QUOTE=indianscorpion2] [CODE]if(n==1) return(1);[/CODE][/QUOTE] Also, this should be [code]if (n == 0) return 1;[/code] | |
Re: You should use [font=monospace]#include <iostream>[/font], not [font=monospace]#include <iostream.h>[/font]. You should use [font=monospace]int main()[/font], not [font=monospace]void main(void)[/font]. Judging by your style of code, it seems that for whatever reason, you're not using the standard library. (You could use the std::sort function.) In that case, you'll want to write a subroutine that, … | |
Re: Use [i]private [b]static[/b] Random random = new Random();[/i] so that the same random number generator is used across different instances of Coin. | |
Re: For this specific mechanism, you could make a function that converts your ArrayList to a byte[] and then passes that through an MD5 or SHA1 algorithm or whatnot. See [url=http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1.aspx]System.Security.Cryptography.SHA1[/url], for example. You should not rely on the behavior of GetHashCode being consistent on different computers unless you can find … | |
Re: [QUOTE=neithan;1008468]I'm new to C++, and i've seen some C and C++ code. I tried array[] and vector<> so i see i can use both, why should i use what way to work with vectors? Furthermore, i've seen a lot of "array[]" in this forum... so, any lead?[/QUOTE] Just use vector<>. … | |
Re: [QUOTE=dhaval_shah;1008318]I've created the following generic method [CODE] protected int GetSpecifiedIndexByName<T>(T collection, string itemName) { int count = 0; foreach (MyElement claim in collection) { if (itemName.Equals(claim.Name)) { return count; } count++; } } [/CODE][/QUOTE] You have two problems with this method. One is that there is no proof that T … | |
Re: OOP is the use of interfaces (as they're called in C# and Java) and the creation of things that obey those interfaces. This is [i]the[/i] necessary and sufficient condition. Some languages with support for object oriented programming are better than others (for example, Scala is better than Java), but there's … | |
Re: Q. How can 3/2 be 1? I thought it was 1.5. A. Lookup "quotient" and "remainder" on the Internet. | |
Re: [icode]atoi(text[0])[/icode] will not work because atoi expects a char*, not a char. That half of NeoKyrgyz's answer was basically useless and dumb. If you want to convert the character "c" representing the decimal digit n to the integer n, you can do so with [icode](c - '0')[/icode]. That's the same … | |
Re: [QUOTE=hbk619;391524]what the fark, how is there 4 holes in a polo?[/QUOTE] Um, have you tried counting? They're not counting the button holes... | |
Re: [QUOTE=jlew;1006109]i have no idea where to even start any help would be greatly appreciated.[/QUOTE] Look at the behavior of the division and modulo operators. [QUOTE=jlew]i would really appreciate a hand here!?[/QUOTE] Learn how to take substrings and how to append strings to one another. | |
Re: [QUOTE=jbennet;1004682]Okay, all a pointer is is a number (indeed to see it in C use the & operator).[/QUOTE] What the are you talking about? You don't use the & operator to see the memory address. [QUOTE=jbennet]Its a number standing for a memory address (like a co-ordinate). You use -> to … | |
Re: You can't calculate precise values of T(3) without knowing the precise value of T(1). | |
Re: On x86 systems you can do a locked add in one instruction. | |
Re: I'm getting started myself and bought [i]FPGA Prototypeing by VHDL Examples[/i], the Xilinx Spartan-3 Version, by Pong P. Chu, and I ordered a Spartan 3E from Diligent, which should come Monday. I have only seen good reviews of the book, and if you wait a few weeks, I'll tell you … ![]() | |
Re: [QUOTE=Ezzaral;1001557]I would recommend reading [URL="http://cc2e.com/"]Code Complete, 2nd Edition[/URL].[/QUOTE] This is like the most useless book I've ever purchased. | |
Re: When you store something in B, that means the predefined value will be overwritten. | |
Re: The happy police strike again. It was good knowing you serkan -- I will make it very dry for you. | |
Re: Ask yourself how user threads are implemented, and the answer reveals itself... | |
Re: I would use a List<> instead of an array, because you can create a List<> and then add new elements to it. [code] string[] someArray = new[] { "Alpha", "Bacta", "Cata", "Dooku", "Ephem" }; List<string> xs = new List<string>(); foreach (string s in someArray) { if (xs.Length < 3) { … | |
Re: Do you want to be a programmer or do you want to be a computer janitor? If you want to be a code janitor, go for CS. If you want to be a computer janitor, go for IT. | |
Re: You can't be helped with such a vague request; ask friends and coworkers, or just fiddle around. | |
Re: What courses are available and which ones are good depends on which school you're going to. There is a lot of variety in the ways various computer science departments teach. | |
Re: Why don't you keep track of how many values the user has entered, and use some mechanism to see if that number's 10? | |
Re: Maybe you should learn how to code. [url]http://htdp.org/[/url] [url]http://docs.python.org/tutorial/[/url] | |
Re: Huh? MSBuild, NAnt, .... | |
Re: Regarding question #2: Programming is one of the easiest professions to get into without a formal degree in anything. You have a bachelor's in chemistry, and job descriptions tend to ask for "a bachelor's in computer science or some related degree." So if you're like "I have a bachelor's in … | |
Re: Just use [icode]path.Split('\', StringSplitOptions.RemoveEmptyEntries)[/icode]. | |
Re: All the fields of a class are allocated in the same place, right next to one another. That means variables whose type is some value type are allocated in the same place as variables whose type is some reference type. Of course, the amount of space needed per variable might … | |
Re: [quote]Does any one have ideas of creating useful 'softwares' in C [/quote] Make a GUI application using GTK+ 2. [quote]Can you give me any guide - how to improve my coding skill as soon as possible?[/quote] Use your coding skill to make stuff. ![]() | |
Re: It should work for [icode]List<Microsoft.Xna.Framework.Rectangle>[/icode], which implements [icode]IEquatable<Microsoft.Xna.Framework.Rectangle>[/icode]. Maybe you're expecting the code to modify the original list object. It doesn't do this; it instead creates a copy that lacks duplicates. |
The End.