1,684 Posted Topics
Re: First you should try a basic hill-climbing algorithm and see how well that converges to reasonable solutions. | |
| |
Re: What ideas have you considered and why did you discard them? | |
Re: Here's a branch prediction algorithm: 1. Assume the conditional jump [i]won't[/i] jump. That's it. Here's another. 1. Assume it will do what it did last time. | |
Re: [QUOTE=moni94;1248916]I just don't want to be limited by the pre-defined types.[/QUOTE] You can define your own types easily enough, no? [QUOTE=moni]For example, I want to make a 1kb integer or one that is dynamic and has no limits.[/QUOTE] You're contradicting yourself. A 1kB integer has limits. An integer that is … | |
Re: It makes no sense to check if mid != 0. How could mid be 0? Well, in most cases, mid could not be 0, except at the very left edge of the tree. So your checks for the base case are bad. Basically your hard job is to consider the … | |
Re: The quality and content of CS programs varies significantly from school to school. Go read the course descriptions of your school to see what the programs have to offer, and go read what other people think of the quality the programs. IT programs train people to be computer janitors. | |
Re: [QUOTE=TotoTitus;1088367]Never mind, someone helped me figure out the problem - it seems the second IF was never evaluated, and i should have instead used the ELSE part of the first IF.[/QUOTE] No, both IFs were evaluated. The result of the first was discarded. [QUOTE=Ghost_Buster;1237550]I would have suggested the following: [code=lisp] … | |
Re: A great first post! The key here is to notice that during the first C timesteps, a Turing machine's behavior can only be affected by the first C elements of input. | |
Re: You could try reading the algorithm for AVL tree insertion. If you can't read an algorithm and then manually interpret its steps out on paper, you should study something other than computer science. | |
Re: When I use the term, it means what aspire1 said, except that you can shift the elements N places, for some value of N. Either way, "many rotations" gets the same meaning, and the combined effect of many rotations is the same as that of one of rotation, or a … | |
Re: It's not apt-get or aptitude that are good, it's the underlying package management system that they use. And as far as the overlying interface is concerned, I recommend using Synaptic, unless it's too slow for you. I personally prefer Synaptic except when I already know what I'm getting -- then … | |
Re: Write your own code, how do you expect to learn without training? | |
Re: I don't understand very much of programming. I have this and I still can't do the program. The bold places are tips for what I have to do but I can't. It's a project for school and I really need help. Then read your fucking textbook and learn something; you … | |
Re: You can solve it in two balances for as many as nine balls. As long as you have more more than two. | |
Re: Message box? In Mac OS X you generally don't use a message box, or when you do, they fold down from the top of the window. Assuming you have a window already, this is the way you should do things. You'll probably have better luck looking in that direction. Maybe … | |
| |
Re: I am very confused. How in the world are you going to implement a stack using function pointers? | |
Re: Why would employers care? It's not like they're going to ask you for your transcript. | |
Re: [QUOTE=Sodabread;1211503]An example: I made a replied to a post in the C++ forum and let the OP know that the reason for their error was that the variable they were trying to use (and was coming up with a random number) was uninitialized and/or unassigned. The next reply was "I'm … | |
| |
Re: Just compute the following integral. [tex]\int_0^n \int_0^{i^2} \int_0^j 1 dk dj di[/tex] | |
Re: What, do you expect somebody to figure out what needs to be done? Why don't you explain the problem you're having? | |
Re: -2 Rep lotrgandalf. Why are you talking about repping? | |
Re: Just show that you can simulate a TM on a URM. That means a URM can run anything a TM can run, because it can just pass the input through the TM. Then show that you can simulate a URM with a TM. This shows the same thing in the … | |
Re: [QUOTE=yanw;1193929]Hello all, my name is Corey, I am new to DaniWeb, and new to programming. I am very interested in software and java programming, to eventually make it into my profession. I am starting college in the Fall, and want to get a head start.[/quote] The best way to get … | |
Re: Save it for FOX News. | |
Re: So it's not reading from a string, it's just taking an sexpr? Okay then. Have parse-exp either return its input, unmodified, or report an error. Make sure it precisely checks for valid or invalid code. Have unparse-exp just be [icode](lambda (x) x)[/icode]. Write your own comprehensive test cases and see … | |
Re: [QUOTE=firstPerson]You are trying to measure BigO(), Big ) measures the growth rate of an algorithm. For example say there is a function f(n) , and that it follows the following inequality : O( log(n) ) < f(n) < O(n) the above inequality says that the function f(n) is bounded on … | |
Re: I used INTERCAL because it's the most flexible general-use business language. | |
Re: [QUOTE=0x69;1194706]Actually C is mid-level language, not low-level.[/quote] You're arguing over the definition of a subjective term whose meaning is relative to one's yardstick. Oh, I'm sorry, you're not arguing, you're merely contradicting. It's all about the supremacy of your opinion over others' opinions, isn't it. Or what is it? C … | |
Re: How many times does it run through the inner loop? | |
Re: Of course they print nothing. That's not what the questions are asking, is it. | |
Re: [code]4c4,5 < x = x + M[i][i] --- > for j in range(3): > x = x + M[i][j][/code] [code]4c4 < for j in range(3): --- > for j in range(i): 6c6 < print x --- > print x \ No newline at end of file[/code] [code]4,6c4,5 < for j … | |
Re: [QUOTE=mahela007;1188695]How is this connection achieved?[/QUOTE] On Unix systems, when you launch a program from a shell, the shell forks off a process and the process inherits the shell's open standard input and standard output streams. When you run a command like [icode]./foo > outfile[/icode], the shell forks, opens the file … | |
Re: Making variables non-private is only an issue for public APIs. | |
I continue to nag about making the Post a New Thread button more visually obvious. I remember having a hard time finding it, and now some newbie is on IRC chat trying to find out how to post a new thread. Usability-wise, I keep getting the impression that this forum … | |
Re: You don't have to write mouse move code for each. You just have to write it once. | |
Re: Or how about 1.00... But WaltP's colors are all wrong. Yours are better. (Mine are the best. No you can't have them :P) I know! Let's through obscure languages at the feature! [code=haskell] factorial 0 = 1 factorial n = n * factorial (n - 1) [/code] It doesn't look … | |
Re: [QUOTE=firstPerson;1185588]i would guess yes.[/QUOTE] You would guess wrong. If you consider computing 2^x to be a constant time operation, it's faster than log(n), but if you consider the actual cost of computing 2^x, it's slower than log(n). | |
Re: This is clearly (n choose 0) + (n-1 choose 1) + (n-2 choose 2) + ... which is well known to be the fibonacci function. | |
Re: Haskell's the right language to learn functional programming. Well, maybe SML is a good baby step. The lisps aren't really functional languages, and, other than R6RS Scheme and Clojure, are not particularly modern. (At least not by lispy standards. They're more modern than most newer languages, certainly.) They are good … | |
Re: What's the powerset of the empty set? Given x and given the powerset of xs, what's the powerset of (x :: xs)? Bam, use recursion. | |
Re: Use a server-side script. | |
The End.