Rashakil Fol 978 Super Senior Demiposter Team Colleague

Ah, you should try http://reddit.com/ for posting random links.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

All this requires is some thinking. I don't see what prevents you from doing that.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That's a hard question. Has technology improved between the 1980s and 2000s? I'll have to think hard about that one.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I don't see why you would need any help for this. The reason is that I can't read your mind. Unless you can explain what you don't understand how to do, you won't be able to get aid with this problem. And if you can figure out what you don't understand, you can solve this conundrum on your own.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

i am a final yr student and in next sem i ahve to do my project ....but till now i have got no idea abt on wat application i have to work on!!!!!........... well i have interest on working on web based applications ........... but still can i go for better ones rather than web applications.............well i am interested in robotics and as well as game development these are the areas where i am very much interested to work on .so plz can u give me the idea of how to get started with my project

Make up random, silly project ideas, until a few of them accidentally seem like they might be good, then edit those until they're better, and then choose the one you want to do. This is the usual way ideas are generated.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

f is O(g) if and only if for some positive C, for some value m, for all n > m, f(n) <= C * g(n).

Good luck.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

And you won't get it until you adequately explain what you want to do.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

This code only works on one column, that's why you see the radix function called four times.

And it's not working on the ones, tens, hundreds columns, it's working on the first, second, third, and fourth bytes.

0xff is the number 255, and & does a bitwise 'and' operation. Look at the number 255 in binary and you'll see what bitwise anding with 255 does.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why is everyone making a joke about this??

Sometimes using NATURAL ELEMENTS produces MUCH BETTER RESULTS than anything man made!!

Because it's retarded.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It depends on where the holes are and how much of the 8 GB half is taken up by files.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If you want to send files without using the Internet, it's going to be terribly inconvenient.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Try make use brain.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

~~words~~

I'd add

4. Caller makes a char*, passes a pointer to the char** to the callee, and the callee sets the caller's char* to point to some freshly allocated memory, with the caller's responsibilty to clean up. Maybe return the string length or something useful as the return value. I prefer this to option 3.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Government mandate on matters the citizens are not versed enough to have an open say in

Doesn't sound like a democracy to me.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Sorry, I assumed that since you were posting a software design question in a thread about time complexity, it was some kind of joke, so I played along.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Isn't this an open problem? The question of whether NC = P or not is unsolved. See http://en.wikipedia.org/wiki/P-complete for more details.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Don't worry, I have time to browse. I'll go spend a couple of hours doing your research for you.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I think about what additional knowledge I need in order to understand.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Should take something n^3 * log(n) given integers represented as products of primes.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It depends on your numeric representation.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

We have to design a simple process by which we could use this coin to generate perfectly unbiased sequence of random bits...?

We do? I'll get right on it.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

>How can I determine the programming language of an .exe file?
You can disassemble the executable and reconstruct the design of the program. From that it's sometimes possible to infer the original language that it was written in. However, this requires a great deal of experience and talent in reverse engineering, as well as intimacy with assembly language and any of the possible languages that the program could have been written in.

It's not that hard. First you can just grep the compiler name. For Haskell you can grep '.lhs'. If that fails, then for any compiled gc'd language you can just look at the garbage collector. That's, um, harder. But before that: If you see printf format strings, it's probably in C or C++. For example, you can know Firefox uses some amount of C++ by looking in its executable and searching for the string "::" until you come across a few error message strings, and by noting that it has a few format strings too.

Error message strings are your greatest friend.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The C++ standard says main is supposed to return int, right? I think that's the case, anyway.

So why would g++ support a main function with a return type of void? That makes no sense.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It's saying you haven't initialized your variables, but you're trying to access their value.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

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 apt-get is more convenient.

Linux and UNIX are written in C and there the most stable operating systems around IMHO so your point is invalid. Windows is only unstable as it is badly written.

Not to reply to something you wrote in April, but Linux and UNIX are absolutely not the most stable operating systems around.

C is the best language in terms of speed (apart from maybe assembley, but thats very cryptic so c is better for writing large apps like whole oses in - i do believe that small parts of windows are in assembler though.)

While I'm replying to this old post, I'd like to point out that Fortran is faster.

any modern languages (Python, Java, All of .NET) are all slower than C as they require some sort of framework or interpreter which must be made in a language such as C anyway.

You're talking about interpreted languages, so don't forget about compiled modern languages (I'd like to point out that Python, Java, and C# aren't really modern, as far as their design goes.) Some push against C, others don't. How fast "C" is of course depends on the C compiler you're using.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What imaginary plane? I know what imaginary numbers are, I have just never heard of them on the imaginary plane.

There is no imaginary plane. There's an imaginary axis, and the real and imaginary axes make up the axes of the complex plane.

I still don't understand what the spiritual plane is.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

spiritual plane

What's that?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I don't feel that I really got comfortable with C++ until I ditched visual studio and used a text editor.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Ugly is not necessarily bad.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That's the intended behaviour of the [search]TeX language[/search].

Search tags!

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm not believing, I'm observing.

If you've read A Wrinkle in Time, did you find yourself siding with IT?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Efficient? Numerical measurements of government are irrelevant; what matters are the morality of the actions government does. Generally speaking, the success of a government depends on how its policies promote a competitive market with incentives to produce, not on the internal structure. Compare, for example, Stalin, whose dictatorship was an economic failure (unless you're comparing it to what existed before Lenin), versus Hong Kong, which under British dictatorship and despite constant influx of completely broke refugees is a moderate economic success.

I don't.

That's because you're evil.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You're defining abc in two places, and they're getting put into the same source file. I don't know what you expected to happen.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The best extension is the Google toolbar, with its features like... reporting every site you visit to Google, wasting screen space, ...

Considering that Firefox already has spell check, a search bar, and autofill, I'd say... sigh.

Adblock is the best extension, of course.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

For the toppings, I figured the easiest way is to do a loop of some sort until they're finished inputting toppings (maximum of 7). The reason I'm using an array is because I have to include a function that outputs the object data, including each topping.

My question is this: How can I allow the user to input the toppings they want in main(), and then put that data into the array in my object without creating a temp array for user input?

Make a member function void add_topping(int topping_number), that adds a topping. Or make an extra array. It's not like it's a big deal, to make an extra array.

And what is 'outputDesc' for? You're having a pizza class that can output its information? That violates the principle you've described. (And what is 'set', too?)

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It's hard to understand your problem then. If you know how to compute a Maclaurin series by hand, out to the point where the error is less than some tolerance level, why can't you write it in a program?

Of course, that's the whole point of this programming exercise, to convert the ability to do algorithms by hand to the ability to write computer programs that can perform the same algorithms.

You've got sin(x) = x - x^3/3! + x^5/5! - ... + (-1)^n*x^(2n+1)/(2n+1)! + ..., and there's some formula that tells you the error as well, when you've calculated to N terms.

Use a while loop, or a for loop, and calculate as many terms as you need.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Write over the file with random data, at least seven times.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

UML has a time complexity of O(n^n) while OOAD has a time complexity of O(n!).

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Fred Thompson is another crazy person who's decided he'll replace McCain in the trifecta of insanity.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Give any physical thing a mysterious sounding name and the religious people will hop all over it.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Looks pretty straightforward. Just because an absurd compendium of redundant types and brackets is what you're used to looking at doesn't mean Smalltalk has a flawed syntax.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What do you mean, 'divide two matrices'? You multiply matrices, or multiply by matrix inverses.

So which do you want to do? Should x/y be (y^-1)x or should it be x(y^-1)?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Looks like Smalltalk's syntax is nicer looking and more elegant.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What does fork = fork (f,g) x = (f x,g x) mean? Did you mean to type just fork (f,g) x = (f x,g x) for that line? I'll assume you did.

We have fork (f,g) x = (f x, g x) . So we see that f and g are functions, so f :: a -> b and g :: c -> d for some types a,b,c,d. We see that f and g both receive the argument x , which means they take an argument of the same type. So a = c .

So fork :: (a -> b, a -> d) -> a -> (b,d) Then fork (fork,fork) (fork,fork) = (fork (fork,fork)) (fork,fork) . So let's look at the first part, fork (fork,fork) .

Look at the first argument: fork :: (a1 -> b1, a1 -> d1) -> (a1 -> (b1,d1)) . Look at the second argument: (fork,fork) :: ((a2 -> b2, a2 -> d2) -> (a2 -> (b2,d2)), (a3 -> b3, a3 -> d3) -> (a3 -> (b3,d3))) . Okay. Now see what types are equal by overlapping the type variables. We see that

a1 = (a2 -> b2, a2 -> d2) = (a3 -> b3, a3 -> d3)
b1 = a2 -> (b2,d2)
d1 = a3 -> (b3,d3)

It follows that

a2 = a3
b2 = b3
d2 = d3
and d1 = b1

So we have

fork (fork,fork) :: a1 -> (b1,d1)
                  = (a2 -> b2, a2 -> d2) -> (a2 …
Rashakil Fol 978 Super Senior Demiposter Team Colleague

What could go wrong with creating one bureaucracy whose job it is to tell other bureaucracies what to do?

Question: If the curriculum is set to a national standard, should the Department of Education be renamed to the Ministry of Truth?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

iamthwee has a good point. Just make a multivariate polynomial class that describes polynomials as a list of terms, then implement addition and multiplication on them. That's a better way of describing it.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Awesome. Haskell is the best programming language.

I'm not sure how complicated the expressions you're getting are, but there is only one way in which expressions get combined in Haskell: by function application. A good way to organize your thinking is to first get rid of all infix operators -- convert a + b to the form (+) a b, for example.

Have you ever solved geometry problems? A big part of solving geometry problems is what I've heard described as "angle chasing". You just try to find out all the information you can about the angles and lengths you have. It's not an organized process.

To figure out the types of Haskell expressions, what you do is more like "type chasing": to find out everything you can about the type of a Haskell expression. There is certainly some way of putting this into a dull algorithm, but that's not something you want to do when programming. Your real goal needs to be to be able to do this fast. Really fast.

But when they get complicated, it gets kind of hard. When it gets complicated and they've got a type error, Haskellers don't do it in their head, they litter their code with type signatures until they can see exactly where the type error is.

A lot of times, though, there's extraneous parts of the expression that you can ignore, for the purposes of looking at the whole expression's type. For example, in the function definition

nqueens n = …
Rashakil Fol 978 Super Senior Demiposter Team Colleague

First, you have to formally define reduced form. Does this mean converted to a polynomial?

Okay. Then convert all divisions by a real number to multiplications by the real number's reciprocal.

Then, to simplify an expression tree, do the following:

1. If combined by addition, simplify the subtrees, and then check for similar polynomial terms (with the same combination of variables) and combine them.

2. If combined by multiplication, simplify the subtrees, then use the distributive property if necessary and resimplify all the children of your addition operations, then recombine like terms. If the distributive property can't be exploited, combine whatever constants/variables you have in the multiplication.

It might be worthwhile to have (while simplifying) a direct representation for associative chained additions and multiplications.

This version's not necessarily the most efficient way...

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Like when you said programming in the nude helps concentration, and how you do it during those hot New York nights, often with frannie the turtle on your lap.

Wait... what?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Error probabilities? Codes? Why are you asking this in a C++ forum.