englanddg
One Little Spark...
I have this on a shirt, by the by.
And thank you. College will be interesting as usual.
I have this on a shirt, by the by.
And thank you. College will be interesting as usual.
I wouldn't start with Foundation. It's droll at points.I've been meaning to read Asimov. I've been very close to buying the Foundations Trilogy, but I just have too many books to read. I have a thing for 19th century European literature. I also have a thing for continuously buying 19th century European literature.
Sounds interesting. I might have to start looking into this once I make a dent in my book list.Also, the Foundation series is more than 3 books. It's actually closer to 17 (iirc)...
His works can be broken down into 4 eras.
Pre-Robots
Robots
Empire
Foundation
What's amazing to realize is that, later in his career, he took all (most) of his short stories, his novels, etc...and tied them all into this singular timeline with Foundation and Earth (which is VERY hard to find anymore, it had a limited print).
After watching that video and reading this I am really interested in this. So who exactly is this guy?Also, the Foundation series is more than 3 books. It's actually closer to 17 (iirc)...
His works can be broken down into 4 eras.
Pre-Robots
Robots
Empire
Foundation
What's amazing to realize is that, later in his career, he took all (most) of his short stories, his novels, etc...and tied them all into this singular timeline with Foundation and Earth (which is VERY hard to find anymore, it had a limited print).
Sounds interesting. I might have to start looking into this once I make a dent in my book list.
A Russian immigrant.After watching that video and reading this I am really interested in this. So who exactly is this guy?
This made me laugh...in this one comment you embodied everything he predicted in that video.A Russian immigrant.
Google is your friend.
He was the most accurate visionary of our current condition, both socially and technologically.
Yes, yes I did. <grin>This made me laugh...in this one comment you embodied everything he predicted in that video.
You're back with those <grin>'s again...(Cheeky)<grin>Yes, yes I did. <grin>
It's a carryover from IRC and places where there weren't emoticons. <wink>You're back with those <grin>'s again...(Cheeky)<grin>
Well I mean when I got to the age to be able to use the internet people began to invade and 'discover'.It's a carryover from IRC and places where there weren't emoticons. <wink>
You know, that internet that has been around for 30 years but the rest of the world just "discovered" it this last decade or so, and you all are invading our territory.
As long as you all stay with your Twitters and Facebooks, and leave the deep net alone, I'm fine. The MOMENT you all start screwing with the real internet...well, we are all old and tired now. So, we'll shake our walkers at you and spit through our false teeth.
But, while the internet has always had it's share of ignorance, the general community of the "internet" has now come to include those who have literally no idea how it works, technically, much less socially.
Any college students wanna do my homework for me?
double const thinking_to_eating = 0.02;
double const eating_to_thinking = 0.05;
void eat(int phil_id){
fprintf(stdout,"Philosopher %d eats\n", phil_id);
while (rand() / (RAND_MAX + 1.0) >= eating_to_thinking);
}
void think(int phil_id){
fprintf(stdout,"Philosopher %d thinks\n", phil_id);
while (rand() / (RAND_MAX + 1.0) >= thinking_to_eating);
}
pthread_mutex_t servings_mutex;
int servings;
void* philosodine(void* arg){
intptr_t phil_id;
phil_id = (intptr_t) arg;
while(1){
/* Philosopher gets served */
pthread_mutex_lock(&servings_mutex);
if(servings <= 0){
pthread_mutex_unlock(&servings_mutex);
break;
}
else{
servings--;
pthread_mutex_unlock(&servings_mutex);
}
/* Picks up his chopsticks */
pickup_chopsticks(phil_id);
/* Eats */
eat(phil_id);
/* Puts down his chopsticks */
putdown_chopsticks(phil_id);
/* And then thinks. */
think(phil_id);
}
return NULL;
}
int main(){
long i;
pthread_t phil_threads[5];
srand(time(NULL));
pthread_mutex_init(&servings_mutex, NULL);
servings = 1000;
for(i = 0; i < 5; i++)
pthread_mutex_init(&chopstick_mutex[i], NULL);
for(i = 0; i < 5; i++)
pthread_create(&phil_threads[i], NULL, philosodine, (void*) i);
for(i = 0; i < 5; i++)
pthread_join(phil_threads[i], NULL);
for(i = 0; i < 5; i++)
pthread_mutex_destroy(&chopstick_mutex[i]);
return 0;
}
Have fun with that...It's not that hard:
Code:double const thinking_to_eating = 0.02; double const eating_to_thinking = 0.05; void eat(int phil_id){ fprintf(stdout,"Philosopher %d eats\n", phil_id); while (rand() / (RAND_MAX + 1.0) >= eating_to_thinking); } void think(int phil_id){ fprintf(stdout,"Philosopher %d thinks\n", phil_id); while (rand() / (RAND_MAX + 1.0) >= thinking_to_eating); } pthread_mutex_t servings_mutex; int servings; void* philosodine(void* arg){ intptr_t phil_id; phil_id = (intptr_t) arg; while(1){ /* Philosopher gets served */ pthread_mutex_lock(&servings_mutex); if(servings <= 0){ pthread_mutex_unlock(&servings_mutex); break; } else{ servings--; pthread_mutex_unlock(&servings_mutex); } /* Picks up his chopsticks */ pickup_chopsticks(phil_id); /* Eats */ eat(phil_id); /* Puts down his chopsticks */ putdown_chopsticks(phil_id); /* And then thinks. */ think(phil_id); } return NULL; } int main(){ long i; pthread_t phil_threads[5]; srand(time(NULL)); pthread_mutex_init(&servings_mutex, NULL); servings = 1000; for(i = 0; i < 5; i++) pthread_mutex_init(&chopstick_mutex[i], NULL); for(i = 0; i < 5; i++) pthread_create(&phil_threads[i], NULL, philosodine, (void*) i); for(i = 0; i < 5; i++) pthread_join(phil_threads[i], NULL); for(i = 0; i < 5; i++) pthread_mutex_destroy(&chopstick_mutex[i]); return 0; }
Also good luck in College @JokersWild
Register on WDWMAGIC. This sidebar will go away, and you'll see fewer ads.