Rashakil Fol 978 Super Senior Demiposter Team Colleague

Just write it in Python and then replace "range(1,16):" with "1..15" and voilà: pseudocode.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Try a textbook on the theory of computation. They explain these quite clearly.

As for your first question, the answer is yes (from what I remember).

As for your second question, the answer is no, yours is not fine. In particular, the string 1 would pass your NFA, while it wouldn't pass the above language since every non-empty string in that language ends with 0.

Edit: Er, what was I thinking.

To make an NFA, note that essentially each node in the NFA corresponds to a point in between characters (the 0s and 1s) in the regular expression string. * corresponds to a lambda connection pointing back to the beginning of whatever it's starring (and at the beginning you have a choice of entering the subexpression or moving on) and | corresponds to a pair of lamba connections pointing to two different starting points.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Criss Angel is fake. He's a bad magician; he's bad at being a magician. He's a fake magician, because to call him a magician would denigrate magicians who are good at what they do.

EnderX commented: Nicely put. +3
Rashakil Fol 978 Super Senior Demiposter Team Colleague

There you might want to consider the best and worst case complexities. Ask yourself what shape of array will cause really poor behavior and what shape of array will cause the fastest behavior.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

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

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It really depends. I have a hard enough time of reading without accidentally reading through several pages only to realize I have no idea what happened that listening to music makes things just impossible for me.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What you've just described is selection sort, where you select the minimum element from an array and append that onto an array that you're growing.

Insertion sort takes out the first element of the remaining elements and inserts it into the right place. To sort [2 7 3 9 4], you'd sort in the following fashion, where the list on the left is the sorted list that we're building, and the list on the right is the unsorted list we're taking elements from:

[] [2 7 3 9 4]
-- take the 2 and insert it 'in the right place'
[2] [7 3 9 4]
-- take the 7 and insert it 'in the right place'
[2 7] [3 9 4]
-- take the 3 and insert it 'in the right place'
[2 3 7] [9 4]
-- take the 9 and insert it...
[2 3 7 9] [4]
-- take the 4 and insert it...
[2 3 4 7 9] []
-- we're done!

And the sorted list becomes [2 3 4 7 9].

Now, I've been using the word 'list' instead of array, but that's only because I'm speaking abstractly. You can do an insertion sort on an array, in the fashion described above, in-place. Instead of changing the sizes of two 'lists' (whatever that means in the context of programming), you can simply walk an index through the array, from 0 to …

Killer_Typo commented: a superb job man! +5
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hmm.. what kind of carrying bag and keyboard/mouse would yall recommend? My laptop doesn't come with bluetooth.. so maybe some usb wireless keyboard/mouse. What kind of carrying bag do most people get when going to college? Like a backpack one? I heard samsonite was the best manufacturer..

Carrying bag? Don't go all technosexual on us.

For a keyboard, I recommend something from Unicomp. Especially if you want your roommate to hate you.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Who are participants.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

you have to rember though that there was not as many people who could read when books like lord of the rings and chronicles of narnia as well as books cost alot more for their day as well which would cause people to share books rather then everyone buying a copy of the same book and people just not buying it because they could not read. Which could have greatly reduced the sales of such books in their time.

No, people were more literate back then than they are now. I give the above-quoted text as evidence.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

A laptop is just fine, no desktop needed, as long as it has a good keyboard and, of course, a nipplemouse. However, a desktop has the advantage of... um... in the case of Dell, not exploding. Also, it takes up less desk space, when using an external (i.e. good) keyboard.

Why did I just write this? Does anybody care? What drives somebody to spout his opinions on a POS choice between POS hardware?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

... they don't choose to inhale smoke, and they do not enjoy the atmosphere. But, hell.. if every restaurant is like that what can you do? Who doesn't enjoy the occasional trip to a restaurant for good food?

So if you don't have any chinese restaurants in town but a bunch of people want to eat chinese food, it's okay for them to force restaurants to make chinese food?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

AGAIN, something like sunbathing doesn't harm the people around you that choose not to participate whereas smoking does. I thought we at least agreed on that.

Smoking in restaurants only harms people that choose to participate.........

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> It is the smoker's right to smoke, and my right to enjoy a restaurant without having to endure smoke.

No it is not! You don't have this right. This is a completely made up right. I thought that's what we've been arguing about. Your logic is fully circular.

If there are no restaurants in the area, are your rights being violated? That's a simple test which shows you don't have a right to have a nearby restaurant that isn't filled with cigarette smoke.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> And here's an idea. If you think that everyone has a right to smoke and it doesn't hurt anyone then why don't we legalize marijuana too?

Um, we should legalize marijuana. Why should it be banned? You confuse me.

> Why not legalize assault?

You mean battery, right?

It is legalized. You are allowed to get into fights as long as you obey some basic legal requirements. Have you ever heard of boxing? How about football? Ice hockey?

> Smoking has no benefit for anyone.

Unless you're God, it's not your place to decide these things.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> Unfortunately there are four flaws in your little story. One: Sunlight only causes cancer under certain circumstances as in far too much exposure.

One: This is where you lose your mind. Second hand smoke causes cancer only under overexposure, too.

> Two:

Two: You can count!

Three: So can I.

> Sunlight is natural and inevitable (unlike smoking).

Four: No, you can block it with shading technology.

> Three: Smoking is something that is much easier and reasonable to ban than sunlight.

Five: Do you have any justification for this? Or do you justify your moral beliefs by making stuff up?

> Four: Someone that is resistant to sunlight can take precautions of there own such as sunscreen, an umbrella, etc. as they are a minority (such as smokers are a minority as well).

Six: In that case, let's ban rap. Black people are a minority, and their minority music is polluting the neighborhood.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

THE ADVENTURES OF ALYSSA P. HAIRYLEGS: EPISODE 1

A group of people decided to meet together in some building and enjoy some great food made by a neighbor of theirs. They all smoke and they're all happily enjoying a night of food. It's good and they pay their neighbor for the service of cooking it. Their neighbor decides to make this a regular thing, so he renovates his building's kitchen, adds tables, asks a few folks if they'd like to waitress there in exchange for money. They agree. The establishment has great food, lots of cool people, a nice view overlooking the western horizon and such.

Then Alyssa P. Hairylegs happens by and decides that this seems like it might be a nice place to eat. She waltzes in, foxtrots over to a table, tangos into a chair and opens a menu. She looks for any vegetarian entrées but can't find any. Approvingly, she orders a steak and lights up a cigar.

It's getting late, and the sun is setting. The building's interior is bathed in light from the setting sun. Alyssa asks a waitress if the windows could be shaded so that she doesn't have sunlight fall on her. The waitress tells her that there are no shades for the windows. Alyssa stands up and shouts, "I DEMAND TO SEE THE MANAGER! NOW!!!1"

The manager walks out of the manager's closet and asks her what the problem is.

Alyssa replies, "THE SUN IS ON …

Dave Sinkula commented: Can I use that as a bedtime story? :) +13
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Aw.. you didn't reply to my post.. :-/

>I don't recall being forced to go to public places. Do you really choose to hang out in places where people smoke when you clearly don't like it?

haha.. you're funny. So, basically you're saying that we should just not go to places where smoking inside is legal.. Oh, okay. So, if we want to go to our favorite restaurant, or shop at the mall, or go get some ice cream, etc. then too bad for us? Hell, no.. We should NOT be punished simply b/c others choose to smoke. Why should we be forced out of establishments simply b/c others choose to smoke??

Wait a second: if you don't like cigarette smoke so much, why is your favorite restaurant the one that has smoke lingering in the air? Are you retarded, or do you just get off by acting that way around others?

It was his choice to drink and drive, but his choice killed innocent people who did not choose to drink and drive. Is this fair? NO! Which is why it is illegal to drink and drive. What's the difference between this and smoking?

In the interest of giving you the benefit of the doubt, I'm going to pretend that's not a rhetorical question. The difference is the following: the reason drinking and driving is wrong is not that it kills people who did not choose to drink and drive. It's that it kills people who did not …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

i just got the thought that to find the determinant it would be recursive .

Maybe. It depends on how you code the determinant function. You could just go with the method that walks across rows with submatrices, whatever they're called, or you could use row operations.

is it true that the matrix must b square matrix (mxm)?

For there to exist a determinant? Yes.

and 3x3 is the least matrix size?

What? The smallest you can have is a 0x0 matrix, or a 1x1 matrix, depending on what you consider to be a matrix. You can have a 0x5 matrix, too. Seriously. But they're only useful if you're multiplying them by or expecting to get zero-dimensional vectors, which is not useful. Maybe you'll want to disallow 0-dimensional matrices.

If you want to be able to compute a determinant, you need at least a 1x1 matrix. Maybe the determinant of a 0x0 matrix is defined or definable as 1; I don't know. It's up to you whether you want to allow 0xN or Nx0 matrices; that's a bit of an abstract notion.

plz gimme some help/idea how to implement those functions

Use the algorithms you already know. The process of converting algorithms you can do on paper into computer code is called programming. If you don't know how to do some of these things, look on Wikipedia.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

They just passed a law in Ohio making it illegal to smoke in indoor public places. I'm glad. If you can't go one meal in a restaurant without smoking you need to start backing off of it some.

Are you so full of yourself that you think it's your place to dictate how other people live their lives?

Aia commented: I don't have any doubt that's the case. +5
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Ok, I'll play.

What are the rules? How much time goes on the clock?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It just takes a careful second glance. And English is the only language I know, besides some pidgin French.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

His posts made perfect sense to me.

WolfPack commented: Yes. Makes sense for me too. +10
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why did I read this?

joshSCH commented: ... and you don't need sensitivity training? ASS -2
Rashakil Fol 978 Super Senior Demiposter Team Colleague
joshSCH commented: F*** is a bad word.. -2
WolfPack commented: No need to have bad rep for typing 4 asteriks +10
Aia commented: I see a F and some asteriks. No word. +5
Rashakil Fol 978 Super Senior Demiposter Team Colleague

I've given up though. It's too addicting.

Haw haw.

maravich12 commented: that was funny. +1
Rashakil Fol 978 Super Senior Demiposter Team Colleague

All of you are postulating without evidence or understanding.

... I do not believe there are multiple universes or infinite regression.. Nothing is truly infinite :)

"Believe"? What does that have to do with reality, religious man?

existed

Neither you nor anybody understands what it means for something to exist.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Do you want to change the internal machinations of the ode45 solver, or do you just want to look at the results of the ode45 solver at particularly-intervaled timesteps? If the former, the answer seems to be no.

http://www.mathworks.com/support/tech-notes/1500/1503.html

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hey jbennet, your PM box is full.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

how about you refute the multiple studies done showing that intelligence is inversely related with religion

Being intelligent makes somebody a good person? Er no, intelligence is very unimportant when it comes to evaluating the goodness of a human being.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

what the hell rashakil? Stop giving me negative rep!

You're so adorable <3 <3 <3

joshSCH commented: That's kinda gay.. Here's #4 since you asked for it in IRC -2
Sturm commented: your off topic. Take your rantings some where else +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Chill out and stop hating humanity. The human species evolved this way; deal with it.

Sturm commented: stop giving me bad rep. Oh and your 30 second theory is stupid +0
joshSCH commented: Stop giving me bad rep for no reason,, -2
Aia commented: ...And we are here to stay as long as we can. +5
Rashakil Fol 978 Super Senior Demiposter Team Colleague

I really don't see how raising children could be called child abuse. Some people here seem to have an irrational opposition to religion. Athiests and agnostics tend to behave just as nonsensically as religious people, when it comes to day-to-day life. Plus, they get all uppity when it comes to theological questions.

Personally, I felt like I was forced to go to Sunday school, because I was. I did not see the point of wearing funny shoes on Sunday mornings.

iamthwee commented: Agreed. Plus your funny shoes would have matched your funny face. Snap. +11
Rashakil Fol 978 Super Senior Demiposter Team Colleague

what the fark, how is there 4 holes in a polo?

Um, have you tried counting? They're not counting the button holes...

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> I don't hate Christians, or religious people at all; what I do hate though is people who read religious texts literally (evangelicals, if you will).

Why do you hate?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What experiments?

Quoted for emphasis.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Uh, are you saying that scientists would not get fired for being wrong?

Scientists are always wrong.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

And yea, there have been experiments regarding global warming.. not necessarily proving or disproving it

What experiments?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hmm.. I believe you are forgetting one thing.. Scientists are more intelligent than you.

Are you sure?

The logic you propose is not exactly what scientists are saying.. all you have basically done is state something, and then refute it. You have given no evidence whatsoever that this is what the scientists claim. Sure, some of it is political.. and some people have used faulty logic is in your examples.. However, scientists use science and logic. You are not a scientist. Scientists are professionals.. they have performed many experiments before, and will continue to do so.. If any scientist was caught claiming some of the illogical points that you have made, do you not think they would have been fired?

Naive, naive, naive. There is a long history of mainstream opinion holders regarding a minority of disagreers as wrong, only to be shot down later. Take continental drift for example, or the crazy theory that diseases are caused by microscopic organisms.

Second, what gives you the idea that scientists get fired for being wrong? You think that's how the academic world works? Wrong. Scientists get fired if they don't bring in enough funding for their universities. They might also get fired for raping the department secretary, maybe.

Scientists are not vulcans; they're just some dudes whose job it is to find out stuff about the world.

And what do experiments have to do with the question of global warming? I don't see any experiments being used to …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I challenge anybody here to a game of chess. PM me.

joshSCH commented: Ah, number 3.. Now we're even.. so stop negatively reping people for no reason. -2
jbennet commented: stop it with the repspamming - both of you! ;) +19
Rashakil Fol 978 Super Senior Demiposter Team Colleague

At the very beginning of the main function, insert the line return 0; . Then it will work for zero lines. Problem changed!

HTH HAND

You can't expect serious help on a problem if you don't even explain what the problem is. Unless you need vague, obvious advice, like, "debug the program."

Rashakil Fol 978 Super Senior Demiposter Team Colleague

MinGW, not MiniGW.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

>I encounterred a person who said that C++ is an unsafe language.
It is and it isn't. C++ doesn't do much to protect you from doing something wrong, so in that light it's an unsafe language. However, if you do things right, it's perfectly safe. I'd say that person was wrong for making such an absolute and general statement, but a lot of absolute and general statements have some ring of truth.

The definition of 'safe' and 'unsafe' are usually clearly and precisely defined, or definable, and under all versions I know, C++ is unsafe. It's not type-safe, and it's not safe from memory leaks, and exception-wise, it is unsafe, too (and will always be, if you have exit). To state that doing things right makes it perfectly safe is to annihilate any definition of safety, except the one that has to do with whether the language is practical or not.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm about to start writing a genetic algorithm program which will be able to find the highest/lowest/whatever else values of variables required for an equation, and have come upon a point about which I am uncertain. I do not know whether I should store and work upon the values as binary or decimal. If, for example, I had 10 variables of a value between 0 and 31, would it be better to store this as 50 individual alleles (1 bit per allele) or 10 alleles (5 bits per allele)?

I assume you mean that each 'candidate' is described by 10 variables of a value between 0 and 31. That is, a total of 50 bits of information. If so, you could store the information in two unsigned longs, or one unsigned long long... or a string of 50 ascii characters -- whatever suits you.

I think you're a bit confused, though, because you're questioning whether you should have 1 bit per allele or 5 bits per allele. That doesn't really make any sense to me, because isn't the number of bits used to represent an allele be an application-dependent thing? The number of common alleles is dependent on the particular gene, no?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm confused. I thought a move had to be a pair of alphanumeric designators...starting position and ending position. Am I mistaken?

Depends on the notation. If you're using piece and square number, the piece name is just omitted when it's a pawn, and on pawn captures it's given in the form exf4. To move to f4 with a bishop, it's Bf4. To capture a piece on f4, it's Bxf4. If you've got two rooks which can capture that square and one of them does, you need to specify which one as in Rfxf4 or R5xf4. If you have two bishops which can capture that square, I hope you've got a mating situation and are just being cute about your choice of pawn promotion...

Rashakil Fol 978 Super Senior Demiposter Team Colleague

First off, what's with the green color? And use code tags for code, please.

I am having problems with the following program. We are to create a biary tree that takes words form a text file and then create a link list the the number the word was found on.

You mean the 'line number' the word was found on?

I have the tree created but I am unsure how to incorporate the link list in to the program. I need the node of the word to point to the line number. If any one can help it would be greatly appreciated. Thanks!

Point to 'the' line number? Or just contain the number?

Why do you have #include <list> if you don't actually use it?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I hate anime

Thanks for sharing. :icon_rolleyes:

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> The Confederates did not initially want a war, but illegally succeeded from the Union..

seceded. It's spelled seceded.

And Virginia joined with a clause that it could leave if it likes. So either Virginia had the right to leave, or, it never formally joined the Union in the first place.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

lol, will check out my local bookstore and amazon. the book i use was required by the professor.

If that's the case, then for the duration of your course, you might as well stick with the style of the book; just be aware of the fact that it's deprecated. It's not like it's a big deal; you should be worried about problem solving and algorithm creation rather than specific details of your language.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

icic.. Well, you can't even vote yet.. I was talking more about the older people who are always B****n about the government, but never do anything about it.

What do you recommend, rebellion?