Rashakil Fol 978 Super Senior Demiposter Team Colleague

Actually, I answered the OP's question. Something you didn't care to do when you felt the compulsion to share that chip on your shoulder.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Huh?

Your post is off topic.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Goddamnit just use jQuery.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why don't you look up the answer in the solutions manual? Oh snap.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Basically Visual Studio 2008 is a buggy piece of shit. It or your version control system could have put your project file into a buggy state, though.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You have select correct version from the iis options. I cant tell you the steps as i dont have iis installed now, but right click on it basically and in the properties pane you will see that you are able to choose from versions.

Oh just ENABLE it, that's useful!

Oh wait, I was being sarcastic.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That is the bad side of free software, it is always hard to find answers, when you stuck nobody takes care of you.

That is a completely retarded thing to say. Nobody at Microsoft cares about you either.

People at Firefox care more because they realize the privacy implications of sending a full file path to the browser. Firefox and other browsers will only send the file name.

You could try actually posting a useful answer instead of a completely wrong, idiotic one.

nav33n commented: Totally agree! +10
John A commented: I like how you cleverly disguised the answer in your post. No one can figure out where it is! +18
Rashakil Fol 978 Super Senior Demiposter Team Colleague

No. There is no way to convert between voltages.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

i started to wonder your age.. how old are you?

95 years old

serkan sendur commented: very beneficial +3
Rashakil Fol 978 Super Senior Demiposter Team Colleague

It is so polymorphism. The derived class can override the base class's behavior in other ways than just virtual functions.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

For fuck's sake, pride is retarded.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What are you asking? Are you confused about the operational semantics of C++, or are you asking about terminology?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What part don't you understand?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You want a struct with a double and a bool.

You should never use inheritance except as a mechanism for polymorphism -- one reason being that 'putting stuff into structs' or classes (a.k.a. composition) is sufficient, another being that using inheritance leads to a complete clusterfuck of disorganization, when you're using it for things that composition is good for. Basically when you have a type T inheriting from U, you should ask, "is T a U"? Well, is [something that is either a double or invalid] a double? No, because invalids aren't really doubles.

It might be helpful to see how other languages handle this problem.

C# has a type Nullable<double> that lets you create values that are either a double or invalid -- and it has special syntax for it, too:

double? x = 3.0;
double? y = null; // i.e. invalid

That's equivalent to using a pointer to a double, where the pointer could be null.

The reason I don't recommend using that kind of solution for C++ is because C++ doesn't have automatic garbage collection, and allocating stuff is a bit more expensive than in garbage collected languages.

A lot of times in C# or Java, people just represent 'invalid' values with null references. In languages without null references, they create a polymorphic type that is either 'just a value of type t' or 'nothing'.

And in C++ you can't inherit from double anyway. So a struct containing a double …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

This isn't a computer science question.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

There's some other code generated that refers to the button1_Click method -- look around for it, it's probably folded up somewhere. I can guarantee that simply adding that method is unsufficient to put an event handler in place.

Edit:
Right click the method when it's auto-generated, and click "Find All References" -- that'll show you where the method is getting used.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I typed up a long reply to you before but decided to save it. One thing I think that is horrible with your notation is your use of functions like isnz, ife, etc etc. Ultimately they're insufficient for representing branching, because multiplication by zero doesn't save you from infinite recursion.

I wrote the following reply several days ago but decided not to send it. One problem with it is that it treats things at a high level -- it is treating entire if blocks as if they were single statements converted straight into some kind of mathematical notation. There is only one example of using an expression, which can modify state _and_ needs to return a value. Another is that it kind of glosses over the construction of a for loop.

One problem you have is that you just kind of throw the plus operator in there, all magically.

Really, your scheme for converting C++ functions into "mathematics" is nothing more than devising a programming language and poorly specifying a compiler from C++ to that language.

Here is my original reply, which might affect your perspective on this problem somewhat.


----

For example, I'd do it as follows. Quoting your code for convenience:

int F( int n )
{
    int r=0;                    // A
    int mid=n/2;                // B
    for( int i=0 ; i<n ; i++)   // C
    {
        if( i<mid) r+=1 ;
        if( i==mid) r*=2 ;
        if( i>mid) r=pow(r,3) ;
    }
    return …
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Tell us what the exception is.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why would anybody want to be an IT guy? What is wrong with this species?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

And by "respectable to whom," I meant "respectable to which employer."

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Respectable to whom? I wouldn't care about your degree at all -- I'd look for interesting projects, demonstrating intelligence, that you did during your time in school. Employers aren't going to say "oh, he has a respectable degree, he must be good" -- unless they're bad employers. Ultimately the question is whether you're good at programming or not.

But, generally speaking, a degree with a name like "Computer Science" rings better than "Computer Science and Information Systems."

Rashakil Fol 978 Super Senior Demiposter Team Colleague

calloc initializes the memory with zero. calloc = clear + alloc

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Oh, it's just looking for a main function to run.

http://codepad.org/teq2fuVp

It seems to work fine. You have an implementation of Vector, right?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The ironic thing is that your first pasting _was_ indented, if you look at when you quote it.

And I do want to help, I just identified for you the main thing you need to do to implement split right now. What is stopping you from doing that?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

No, the answer is not that you're designing anything wrong. There is nothing wrong at all about mutually recursive data datatype definitions. There are inconveniences involved with circular data structures. And there were problems in your case.

thingstealer, a forward declaration doesn't work? Could you paste the exact code at http://codepad.org/, set it to C++ mode, and give the link? I'd like to see the error message.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Well, if you want to implement a split function, the first step would be for your code to handle all the possible cases.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What the fuck. Do you realize how bad the indentation is?

Aghh.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Use code tags please.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You can't do it with just ternary operators. You also need to use comparison operators.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Yeah, um, I would say that shouldn't be necessary; you want an array of textboxes instead.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

you want an array of textboxes.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Figure it out yourself.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

http://edufire.com
http://www.programmingtutorials.com/

Both these links suck horribly. On the former, you can't find anything, and it holds no promise of having anything any good for C#, and the latter is just a site that links to other sites' tutorials, without any discrimination as to the other sites' quality.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Thanks Rashakil Fol , would you mind to explain me how did you find it ?

Just by reading the code and looking at what it does.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Might want to use an arraylist instead, if its not a fixed length

No, you'd want to use a List<int> . If you wanted it to be variable length. Which for most people in most situations is wrong.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Don't ask us, ask your teacher.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It is possible to convert C++ code to mathematical expressions. And it's basically straightforward. I think your scheme for this is fairly straightforward, except that you seem to write the + operator somehow in ways that don't seem derived from common sense.

If you were to ask for a mathematical expression equivalent to the function, you'd say F(n) = (2*floor(n/2))^(3^floor((n-1)/2)) , but that's not what you want, I'm sure.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If you're asking which is better, C# is inarguably better. There might be JVM languages like Scala or Clojure that are better than C#, though.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why would a polynomial class contain a string member?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Who cares.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You input the regex the same way you input the file name. What is the confusion here?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Haskell. It's not object oriented -- it's better than object oriented. I "recommend" this because it's my language of choice, but there's a huge learning curve, so it's not ideal.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Who do you think cares quality in todays world? Almost everything is about producing fast and consuming fast, you are American, you know what i mean..

I'm going to haunt all your posts and make your existence on this forum a miserable one.

iamthwee commented: brrrrrrrrilliant. +18
stephen84s commented: You got one recruit on that crusade in me. +7
Rashakil Fol 978 Super Senior Demiposter Team Colleague

All you need to do to fix your problem is look at your code and imagine what a prolog interpreter would do when interpreting it.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Um, write it yourself.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Check out this:

string dateString;
DateTime dateValue;

Why do you do this? This is not C. Predeclaration makes code less readable.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

We can always only please the majority.

Huh? You could also please a minority.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Well you have more problems than just that.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Your second predicate is going to match and override whatever you do in your third predicate. You need to handle nested lists before you handle non-nested lists.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Well in your case, the number of times you call rev is equal to the number of leaves and non-leaf nodes in your tree. And each call to rev results in a constant amount of work, independent of child calls.

So the running time here is going to be proportional to the number of 'nodes' and leaves in your tree.