Yes... especially since we don't get that in new york.
Do you like killing people?
Yes... especially since we don't get that in new york.
Do you like killing people?
It seems like everytime Josh says something, he bashes every word!
You first got this idea from the physics thread. I do not see what's wrong with correcting factual inaccuracies or disagreeing with the notion of proudly writing down wrong answers.
Edit: you weren't taking me seriously that post, were you? And I hope you weren't taking my profile literally.
Interests:
Making fun of people,
Hurting people's feelings,
Now let's have some decent reporting standards here; you're taking only the interests you find that can demean me. If you quoted all of my interests, you would have included the third:
Sneaking up on people and scaring them, causing them to slip on the ice.
Did you seriously think you'd get away with misrepresenting my personality? To imply that I'm only a fan of verbal assault, not physical assault, too, is downright disrespectful and falsificative!!!
And when I type those exclamation marks, I mean them!
That is very nice; thank you for posting it. And thanks for putting it in the code snippets section already.
If I may criticize one aspect of your code, your line if( ( rand() % ++num_nodes ) == 0 ) selected = pn ;
does a bit too much in one line: there's really no reason not to write it like the following:
#include <stdlib.h>
typedef struct node node ;
struct node { int value ; node* next ; };
node* choose_random_node( node* first )
{
int num_nodes = 0 ; // nodes seen so far
node* selected = NULL ; // selected node
node* pn = NULL ;
for( pn = first ; pn != NULL ; pn = pn->next ) {
num_nodes += 1 ;
if( ( rand() % num_nodes ) == 0 )
selected = pn ;
}
return selected ;
}
Furthermore, you're using the default random number generator a bit uncarefully. The low-significance bits of the numbers produced by many default pseudo-random implementations tend to be a bit less reliably random than the high-significance bits; see the random number tutorials floating around.
I'd recommend forgetting everything and starting with this:
(define (parse-words chars current-word)
...)
In this case, 'chars' is your string and 'current-word' is the current word you're reading off the string.
For example, if you're converting the string "hello doctor foobar!", you'll end up recursing as in the following. (Note that where I draw strings, I really mean for there to be a list of chars. That would be a pain to write though.)
(parse-words "hello doctor foobar!" '()) ; "hello doctor foobar!" is really a list of chars
->
(parse-words "ello doctor foobar!" '(#\h))
->
(parse-words "llo doctor foobar!" '(#\e #\h))
(parse-words "lo doctor foobar!" '(#\l #\e #\h))
(parse-words "o doctor foobar!" '(#\l #\l #\e #\h))
(parse-words " doctor foobar!" '(#\o #\l #\l #\e #\h))
(cons (reverse '(#\o #\l #\l #\e #\h)) (parse-words (skip-leading-spaces " doctor foobar!") '()))
Now, this will have to be a helper-function. You'll want to have a function that converts the string to a list of chars and skips leading spaces before passing it to parse-words, and then recombines the words, represented as lists of chars, into string form.
And you'll need to write skip-leading-spaces. Maybe you should call it skip-leading-spaces-and-punctuation, or perhaps skip-leading-non-alphanumeric-chars. Or maybe 'drop-...' instead of 'skip-...'.
Oh, and this language is Scheme.
Doesn't look like the way he types.
How do you know I didn't deliberately type that way to throw people off?
:-)
Wait a second... you're calling somebody you don't know a moron and a dumbass, after they gave you a rep that didn't insult you or demean you in any way. I know you've called me a retard (or was it "RETARD"?) the first post you saw me make -- in fact, you made a post telling everybody how much you were going to call me a retard before your post that called me a retard, over and over again.
I've got to say, you must have brass balls... or you would if you acted this way in face-to-face conversation. I don't know what makes you think it's reasonable to go around assuming that people are dumber than you, and I don't know what gave you the assumption that calling people names is acceptable behavior.
What is this "first-word" function? You haven't said anything about that. It seems to me like you meant to be calling chars->list-of-chars for that...
What you need to do is the following strategy: Make a function that does the following:
" Hello, world foobar captcha"
->
("Hello" . " world foobar captcha")
only instead of strings, have them be lists of characters... and if the input string has no more words, have it return #f or '(), or whatever suits you.
That's pretty similar to what you have, only instead of looking for space-characters, use char-alphabetic? or perhaps that in combination with char-numeric? to recognize word characters. It looks like your words aren't supposed to include punctuation, after all.
Once you have a function that returns the first word and the rest of the words in a cons pair, it's fairly simple to go from that to returning a list of words.
See EBCDIC for an example of a character set that doesn't have consecutive A..Z.
No. I prefer Vi. Not as clumsy or random as Emacs. An elegant text editor for a more civilized time.
Are you serious?
This is certainly a non-trivial problem for somebody with your amount of experience.
Here's one tool I recommend using in the function, to make your time easier. Make an array or a vector which contains the numbers in string form, from "one" to "nineteen". I'm not sure what experience you have with C++, and whether you know how to use arrays or vectors, or about your knowledge of the string class, so I'll balk at a code example.
Make another array (or vector) that contains the names "twenty" through "ninety", too. With these, you won't need so many case statements. You won't need any, in fact.
Generally speaking, the strategy for this should be something like the following:
1. print out thousands part of the number
2. print out the hundreds part of the number
3. If the two-digit part is less than twenty, print out the name of the number. Otherwise, print out the name of the tens part, and then, if the units digit is nonzero, print out the hyphen and the units part name.
I don't understand your actual question, though. What don't you understand about switches and the case syntax?
No
Are you answering no to this question?
Oh, 10 m/s^2. Thanks for pointing that out.
I'm trying to convey to you what your posts look like, lemurexplosion.
cat five yarn dandy croznik yeltsinov... bufafu why captialization captialization. Punctuiton not is capituiton... but (aaah sunshiners) bartholemeu dancer.
Hafnium microspecules banfarfamate splarkingtonial satchezes.... (Zhoom baby, zhoom!)
None of the programs compile, so I would guess O(1).
Why?
Do your own homework.
There's no way to answer that question with guaranteed accuracy. Also, write 2 to the n as 2^n, definitely not as 2n.
What do you think big O notation means?
No. Gently caress you. Do your own homework.
Negative Reputation appears to be a way for juvenile, immature members without the courage or wit to address someone in public to scrawl anonymous graffiti.
This is definitely my experience.
Why? The only thing noobs need to know is how to write in complete sentences and use code tags. A little humility would be nice, too -- some people just expect a free homework service. The last thing we need is people measuring their self-worth based on how many posting games they play in.
fork
spoon fied slummer kanting?
A cylindrical colony is orbiting the Moon 700 kilometers above the Moon's surface. Its interior radius is 500 meters, and its inhabitants live under Earth-like gravity (10 N).
The air has been sucked out of the colony due to a political emergency, and Brian wants Daniel to receive a message, delivered in the form of a ten-pound brick that smashes through Dan's skylight.
Dan lives 1000 meters away (measuring along the surface of the ground) from Brian's projectile launcher, and the shortest walking path from Brian's projectile launcher to the point underneath Dan's skylight is the arc of a circle, in the direction contrary to the colony's rotation. Dan's skylight is 20 meters above the ground, and Brian's projectile launcher releases projectiles from ground level. His launcher works by imparting a constant force for two seconds on an object, along a magnetic track that can be pointed in any direction.
Brian has a five second window during which the projectile can be in the air before it is detected by the colony's projectile detection system and zapped out of the sky.
If Brian wants to fire the projectile thirty minutes from now, what should the magnitude of the force be, and in which direction should the launcher be pointed, assuming Brian wants to waste as little energy as possible?
P.S. The colony itself weighs 1.00*10^16 kg, not including the projectile.
And Rashakil Fol- No complaining about the question or saying that the answer isn't a true value.. b/c my professor actually wrote this question himself.. And yes, he has his master's, and doctoral degrees... And he used to be head of the physics department at a large D1 University.. So I think he knows what hes doing when he writes up exams.
Why? He would agree that the kinetic energy of the falling disk is not being taken into account.
Read the algorithm's instructions itself and follow them. If you can't understand, ask yourself why you can't understand the written instructions, and fix the holes in your knowledge so that you do understand.
Really, you should write that as * + - + 4 3 6 2 8. And do it yourself, for crying out loud.
Send the money to me instead; I actually need it.
In a tree, every node has an edge 'pointing' to it, except for one root node.
You're trying to use Prim's Algorithm, not some "prism" algorithm. Read what Prim's Algorithm is, and follow the instructions the algorithm gives you.
Why is that page named ReversePolishNotation.htm? That's not reverse Polish notation; it's Polish notation.
Unsigned is no more optimized than signed; they're the exact same instructions for addition, multiplication, and division.
If you really want to optimize numerical code, use Fortran.
And before you optimize your code, ask if you really need to optimize anything.
And what are you optimizing for? Memory usage? Speed?
Or worse, a person gets repped for solving the problem using incorrect coding techniques (eg. using
gets()
).
IMO, recommending gets()
should be an autoban.
This is actually part of a free response question from a recent exam:
A disk with moment of inertia 3.00 kg*m^2 is rotating with a speed of 7.00 rad/s. A second identical disk that is not rotating is dropped onto the first disk. After 2.00 s, friction forces (assumed to be constant) between the two disks give rise to a torque that causes the two disks to come to a single common final speed.
Calculate the change in kinetic energy of each of the two disks. (Note: this will be two numbers)
Would it not be 36.25 J? Assuming no heat or sound is generated...
That's a fake answer if it is right, since the two disks have non-rotational energy relative to one another, too.
Edit: it's a wrong answer too; that's just impossible -- the disks would glance off one another, with one disk ejecting the other in the direction of its spin at the point of contact. So something's got to be holding the disks in place, stealing their kinetic energy. In that case the second disk will steal half the first's velocity, and the kinetic energy will thus divide in half, since 2*(1/2)^2 = 1/2. So 18.125 J increase for the first disk, -54.375 J for the second. The apparatus that is apparently holding the disks in place acquires the angular momentum of the entire system (which is rotating in the first disk's direction a little bit). So Earth's rotation changes slightly.
Red is for infractions. All my best posts are orange.
The person who first inserted her politicking about guns on this thread was jbennet, on the first page. The first person to mention the NRA was joshSHC, on page 9. The first person to lose control of her mind upon seeing the letters "NRA" was christina>you, on page 13. I don't see how dcc could be blamed for any of this.
In 1997 Congress voted 94-0 to add an amendment to a Department of Defense spending bill to prohibit the distribution of bomb-making instructions, but there are still copies of books such as The Anarchist Cookbook to be found.
That law's unconstitutional anyway. Or would be, since the provision was later removed before the bill's passage.
If you want compassion, talk to George W. Bush.
Software Engineering is the practice of carefully making software that works correctly. Programming is the practice of making software.
I'm getting some javascript that's causing slowdowns. It's stuck in an infinite loop or something. This is on Konqueror. Never happened before.
It's about power. Who has the right to own weaponry? If ordinary people are not allowed, then the state owns the people. And christina>you, I don't see you making a fuss about all the people that died in car accidents today. What gives? If cars weren't around, that wouldn't happen. Let's ban cars. Wait -- cars don't kill people, people kill people. Let's ban people.
You, by which I mean Duki now, didn't even link to the per-capita table, where the U.S. is eighth. And yes, we're high up there in gun crime because guns are legal. A more relevant statistic would be murders per capita: http://www.nationmaster.com/graph/cri_mur_percap-crime-murders-per-capita
in which case we are 24th.
Here's a graph of murders per capita in the U.S. over the years. http://www.benbest.com/lifeext/execute.jpg
Were the changes caused by changes in death penalty law? I don't think so (that website does, but meh). Were handguns invented in 1960? Um, no. Did it increase just as the baby boomer generation became adults? Hmmm.....
If you really want to reduce violence in the U.S. -- and I mean the copious amounts of violence we have on a regular basis, not these one-off events, you'd be better off eliminating the one thing that perpetuates that violence today, not tittering around with whatever happens to be the weapon of choice. If you want to reduce crime, end Prohibition. Of drugs, I mean. I.e. legalization of heroin and cocaine. And marijuana, of course. …
Guns should be illegal. The End.
Who are you to tell others what they can and can't own? You think people should be arrested and fined and jailed for doing things you disagree with, without harming any other people? Gun control is violence; gun ownership is not. Your desire to impose your utopianism on the world by controlling the peaceful behaviors of others is pure selfishness.
You're just being full of yourself if
Also, don't think I'm trying to insult you or call you names; I'm just a bit flamboyant in my metaphors, that's all.
Don't turn this into a gun control thread.
No, you have the wrong answer. If you said "pretend that people and the cart are point-masses 13 m from the center of the circle," you'd have the answer, but the effective radius of the cart and people would be approximately 14 m.
The level of zero potential is always and is always assumed to be the lowest possibility in the situation.
Now that's just not true. I don't think you've seen every physics problem in the world. You're just being full of yourself if you think that everybody automatically follows the same implicit rules as your high school physics teacher uses. Zero is often the highest potential in a situation and can also be something arbitrary.
And since the effective radius of the cart's center of mass is really more like 14 m, your choice of zero is about a meter below what you supposed it to be.
In theaters? Grindhouse.
Otherwise, Blade Runner.
My answer is zero.
There's not enough information to do the problem. We need to know where is the center of mass of the cart-person system, relative to the point at which the metal arm connects to the cart. We also need to know the distance from the metal arm's connection point to the motor and the center of the axis of rotation. We also need to know what you consider to be the level of zero potential, relative to some part of the system you've described.
The font size changed? I never noticed. What's the big deal?
That equation comes from adding the time from liftoff to firing the bullet (t1), to the time it takes the sound to reach the ground (the distance the helicopter's traveled divided by 320 m/s).
2 dimensions? This is a one dimensional problem. What's 'x'? I can't understand what you're doing. But I guess you do...
The way I did it was to solve
t1 + (3 m/s/s) / 2 * t1^2 / (320 m/s) = 30 s
for t1.