1,684 Posted Topics

Member Avatar for hazeeel

First you should try a basic hill-climbing algorithm and see how well that converges to reasonable solutions.

Member Avatar for Rashakil Fol
0
56
Member Avatar for SJP99
Member Avatar for 0x69
0
139
Member Avatar for newtonsri
Member Avatar for rahul8590
0
94
Member Avatar for mr_s70

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.

Member Avatar for mr_s70
0
83
Member Avatar for moni94

[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 …

Member Avatar for Rashakil Fol
0
132
Member Avatar for Mike bruce geek
Member Avatar for RingmasterTJ

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 …

Member Avatar for wieczorek1990
0
252
Member Avatar for tungnk1993

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.

Member Avatar for Rashakil Fol
0
56
Member Avatar for TotoTitus

[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] …

Member Avatar for Ghost_Buster
0
117
Member Avatar for GoatHunter

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.

Member Avatar for Rashakil Fol
0
174
Member Avatar for The 1

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.

Member Avatar for The 1
0
337
Member Avatar for ChPravin

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 …

Member Avatar for ChPravin
0
136
Member Avatar for wraph

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 …

Member Avatar for jwenting
0
635
Member Avatar for vanitha vadivel
Member Avatar for JohnSmith12
0
54
Member Avatar for ca_eric
Member Avatar for gremreeper1967
Member Avatar for eXceed69
Member Avatar for jl_7

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 …

Member Avatar for murdokk
0
229
Member Avatar for ayan2587

You can solve it in two balances for as many as nine balls. As long as you have more more than two.

Member Avatar for printrobin
0
108
Member Avatar for John A

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 …

Member Avatar for jarimany
0
1K
Member Avatar for Rashakil Fol

So, Avatar is an awesome movie. You need to see it in 3D. It is mandatory.

Member Avatar for Diamonddrake
1
323
Member Avatar for coolguy_003

I am very confused. How in the world are you going to implement a stack using function pointers?

Member Avatar for anonymous alias
0
269
Member Avatar for ihatestarch
Member Avatar for Rashakil Fol
0
84
Member Avatar for Sodabread

[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 …

Member Avatar for jwenting
1
162
Member Avatar for laehc
Member Avatar for corby

Just compute the following integral. [tex]\int_0^n \int_0^{i^2} \int_0^j 1 dk dj di[/tex]

Member Avatar for corby
0
108
Member Avatar for moman1981

What, do you expect somebody to figure out what needs to be done? Why don't you explain the problem you're having?

Member Avatar for Rashakil Fol
0
108
Member Avatar for lotrgandalf
Member Avatar for jwenting
0
127
Member Avatar for alireza1989

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 …

Member Avatar for Rashakil Fol
0
92
Member Avatar for blackmagic01021
Member Avatar for yanw

[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 …

Member Avatar for BanneyHill
0
310
Member Avatar for happygeek
Member Avatar for benasour

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 …

Member Avatar for Rashakil Fol
0
489
Member Avatar for bobmckinely

[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 …

Member Avatar for prime1999
0
417
Member Avatar for dawn.visp

I used INTERCAL because it's the most flexible general-use business language.

Member Avatar for Johnsmith1
0
96
Member Avatar for setmenull

[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 …

Member Avatar for Nick Evan
0
432
Member Avatar for seven11
Member Avatar for Tops

Of course they print nothing. That's not what the questions are asking, is it.

Member Avatar for BestJewSinceJC
0
193
Member Avatar for Tops

[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 …

Member Avatar for Rashakil Fol
0
60
Member Avatar for mahela007

[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 …

Member Avatar for Rashakil Fol
0
125
Member Avatar for kevintse
Member Avatar for Rashakil Fol

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 …

Member Avatar for Ancient Dragon
0
318
Member Avatar for suranga_kas
Member Avatar for Geekitygeek
0
158
Member Avatar for Dani

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 …

Member Avatar for Soren Werk
0
617
Member Avatar for ashkash

[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).

Member Avatar for invisal
0
95
Member Avatar for ChPravin

This is clearly (n choose 0) + (n-1 choose 1) + (n-2 choose 2) + ... which is well known to be the fibonacci function.

Member Avatar for ChPravin
0
90
Member Avatar for drjay1627
Re: SML

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 …

Member Avatar for Rashakil Fol
-1
106
Member Avatar for lotrsimp12345

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.

Member Avatar for lotrsimp12345
0
80
Member Avatar for Famous16
Member Avatar for mister-fett

The End.