twomers 408 Posting Virtuoso

Toasted ham and cheese and onion and pepper sandwich with chili on top. Mmmm.

twomers 408 Posting Virtuoso

@ my past post... Incas weren't native to Ireland, were they ;)


My sister's friend was working in a pub and was sharing a dorm or a house or something during college. Her house mate came in late one night and my sister's friend was asleep but was dreaming and asked what drink someone wanted (work dream). Then she went through the hand-maneuvers of pouring a pint for someone and passed it over her dreamed bar.

twomers 408 Posting Virtuoso

>> I love analysing dreams.
Analyse this:

I was (in my dream), in a pub that I go to every now and then. I was chatting to some friends and out of the corner of my eye I spot an elevator I didn't notice before. I tried to point it out to friends of mine but they were distracted by a beautiful lady who just walked in (she had a spotlight on her for some reason). Anyways I walk over to the elevator door and press the button outside it. It opens and I press another button inside. The elevator goes down for ages. Eventually it stops and I get out. I end up in an Inca temple, which is fantastically grand, golden and all. I walk around and then go up stairs (which appeared I guess. Wasn't quite as long as the elevator, guess my subconscious got bored after a few flights!), to tell my friends. I bring them down and a war begins in the temple (not between us, but the Incas which weren't there before), so we panic and want to leave but the elevator door and the stair case have disappeared but a second shaft appears on the opposite side of the room. We reach it easily enough and go up, but we end up in a lab in my building in my university...

twomers 408 Posting Virtuoso

>> Every generation thinks the up and coming generation is declining in morals.
Precisely.
And I don't think that it's really a moral issue. This current generation probably has more exposure to everything than any other previous generation -- with the internet, tv, etc. Sure not all of these things are morally uplifting nor do they set a good example but it's an exposure that previous generatia have not experienced. There's no doubt that the more death, violence, killing, etc that you see on TV or the net the more passive you become to it.
And in relation to progressing generations - each new generation experiences something that others haven't experienced. You can't really do justice to a comparison between two (or any number), without factoring in or out the exposures the kids of that generation have faced.
And yes, this does bring it back to the parents. Kids are really susceptible to ideas, thoughts. They are suggestive and will replicate what others do. This is one method in which they learn - does a parent have to show a kid that you turn a steering wheel to turn a car? By the same token they will replicate what they see on TV, somewhat. I'm not saying that we're going to have to wear Kevlar now, but... I guess it does no harm to be conscious of it.

twomers 408 Posting Virtuoso

>> Wow, 6 foot tall and weighig 133 pounds, that is rather skinny. I am 6 foot 3 inches and weigh close to 200 pounds.
So one inch is about 22 pounds... I am 5 10/11 ish... so I'm 1573 pounds... that's not right.

twomers 408 Posting Virtuoso

>> I think there is a rational fear of clowns - at least it might start out rational
Well... What I meant about a rational fear of heights and snakes (etc), is that if you do not respect them is in the nature (figuratively speaking), of a tall vertical height to hurt or kill you if you fall from it or a snake to bite you if (s)he feels like it. They are real and dangerous if you're not careful. They have a right to induce fear, which I believed to be rational fear. People can have an irrational fear of them too, I guess, but I find it more justified than clowns, say. Clowns are meant to entertain you...
I read recently that clowns were based in the Irish way back. They had stupid grins, rosy noses and cheeks cause they were drunk all the time. Bad cloths cause they were poor, and silly hair cuts because they were Irish... Not sure if it's true or not but amused me.

>> Dang it?! Now I gotta think about how I feel - I'll get back to you when I get it sorted out
Heh. Figured yourself out yet?

>> I actually agree with the excessive F word and vulgar drunks.
I think it comes to excessive use of anything. Be it food, drink, words, violence, anger, speeding, dating, laughing (sore sides :)), crying...

But then again, too much PC can get annoying …

twomers 408 Posting Virtuoso

I'm normally placid. Not sure if any of the above actually offend me ... just annoy me.

>> I think face-sucking in public is offensive
Why?
This reminds me of a quiz I was at before. There was a question about the irrational fear of clowns and I was thinking 'is there a rational fear' of clowns? I came to the conclusion that there wasn't. Heights, yes. Snakes, yes. Clowns... no.
How is face sucking offensive? I just don't see it is all.

twomers 408 Posting Virtuoso

Not too sure how much faster you'll make it...
If you have a pointer to the start of your variable, subtract the current from it and add the difference, perhaps.

twomers 408 Posting Virtuoso

Is there any way you can keep track of the current position? If there is you can multiply that by two because, as you stated, you know you can't multiply the pointer by two. However, one can do multiplication via addition.

twomers 408 Posting Virtuoso

I play a good chunk of the aforementioned instruments. I love atmospheric, solo, non-pretentious piano jazz though. I could listen to that aaaawwll day.

twomers 408 Posting Virtuoso

So you get a star with every k?

twomers 408 Posting Virtuoso

>> It was from an old NOAA joke
I know that. But I was wondering which would be tastier. Apparently penguins smell bad but so do cows and they are quite tasty.

twomers 408 Posting Virtuoso

>> Good time to go to the pub with friends!
Yeah. Cause in Ireland we don't actually work :) Pubs 24/7, heh.

twomers 408 Posting Virtuoso

Or in your dad's lathe when you were 19 two years ago...

twomers 408 Posting Virtuoso

One thing you could do is map out a directory. The structure could have the name of the directory, an array of sub-directories (which would possibly be a pointer to a new instance of the structure itself), and an array of file names as members. You can search through it for a file, directory etc. Sort by date, size, name, etc.

twomers 408 Posting Virtuoso

I'm fairly sure I am... I mean no Irish living in Ireland do it. The ones living away clearly have to go the extra mile to boast their patriotism, I guess. Either that or it's cheap... is it subsidised?

twomers 408 Posting Virtuoso

You want a user to enter the number of employees and an array with that number of elements? That should be easy enough.
There are a number of options. You could use traditional dynamic memory allocation or alternatively a container class like vector. I'm going to assume you've not learnt the latter so you know anything about dynamic memory allocation (new/delete)? If the size of an array is not determinable when writing the program you can use new to allocate memory. The only thing is (unless you're using a pointer class like auto_ptr or something), you're going to have to delete the memory at the end of your program:

int *employee_numbers;
int num_employees;

std::cout<< "How many employees? ";
std::cin >> num_employees;

employee_numbers = new int[num_employees];

// fill the array

delete [] employee_numbers;

Or did I completely misinterpret your question?
>> Could I put that user entered number into an array? If so how?
I think I might have.

int nums[5];
int num;
std::cout<< "Enter num: ";
std::cin >> num;

nums[0] = num;
nums[1] = 42;
// etc

std::cout<< nums[0];
twomers 408 Posting Virtuoso

>> green beer
And you started off so well with you talk of the stew, albeit a weak stew (:)), green beer... not an Irish thing. Frankly it looks not nice, IMO.

twomers 408 Posting Virtuoso

>> I love it when people try to analyze me.
You're a crazy b...., erm ... lady. ;)

twomers 408 Posting Virtuoso

Ah you just want in on the avatar psychoanalysis.

twomers 408 Posting Virtuoso

>> how many could you eat?
Put it this way -- if I could eat either a polar bear or a penguin I'd get a penguin and feed it to the bear, wait till he's eaten the penguin and eat the bear. That answer your question?

twomers 408 Posting Virtuoso

When in doubt listen to Naure :)
Makes sense. I asked the question without thinking. Cheers.

twomers 408 Posting Virtuoso

Irish stew, mmm.
Traditionally it's alcoholic, heh.

twomers 408 Posting Virtuoso

So it's better to have base-protected-getters than protected variables?

twomers 408 Posting Virtuoso

>> but I though with parent/child classes they could use each others private variables.
I think that's only with private inheritance, but you did public inheritance. I never really messed with the former, so I'm not certain if what I said is accurate, but I think it is.
Protected guards the regular variables with the public identifier unless the class is inherited in which case the inherited object can access those variables.

twomers 408 Posting Virtuoso

protected:
string firstName;
string lastName;
string employeeID;

That's probably all you need to change.

I edited my first post if you didn't see it.

twomers 408 Posting Virtuoso

It should be protected rather than public. The Employee members. That's all I can guess here. If that doesn't work post some code.

Pour example:

class thing {
private:
  int priv_int;

protected:
  int prot_int
};

class inh_thing : public thing {
public:
  void display( void ) {
    // std::cout<< priv_int << "\n"; // ERROR! It's private so you don't have permission to access it. 
    std::cout<< prot_int << "\n"; // OK
  }
};

int main( ) {
  inh_thing th;
  th.display();

  return 0;
}

Didn't test this so it might be buggy...

twomers 408 Posting Virtuoso

Number 12 looks like a dude!

twomers 408 Posting Virtuoso

I have a small one on my keychain in case I get bored in a bus or something.

twomers 408 Posting Virtuoso

See, it's not just popups, Dragon. It's those adverts that are on main webpages, those annoying animated smileys etc. You know the ones. All gone!

twomers 408 Posting Virtuoso

I'm sure some of you guys have this already, but I downloaded this the other day and it's made my life (pretty much), so I thought I'd share. It's an addon for FireFox which blocks those annoying adds you see all over the place. Deffo worth the download, IMO.
https://addons.mozilla.org/en-US/firefox/addon/1865

twomers 408 Posting Virtuoso

http://news.nationalgeographic.com/news/2007/11/071119-wild-turkeys.html not quite as cool as I had hoped from the heading, but I'll hopefully be eating one of those.

twomers 408 Posting Virtuoso

We just eat Wiccans :) Plus turkey, ham, and all the other tasty animals. Some of the less-manly tasty veg too from time to time.

twomers 408 Posting Virtuoso

Never timed myself. Don't know any of these systems though. Just did it imprompto. You know they can all be solved in less than 26 moves or something! http://www.guardian.co.uk/science/2007/aug/17/2?gusrc=rss&feed=networkfront

twomers 408 Posting Virtuoso

Aww, I didn't make the list either.

twomers 408 Posting Virtuoso

For the second question you could use \r in a print statement. This goes to the start of the line on the console window. So suppose I had this:

std::cout << "hello, \rworld";

I would get out:

"world, "

Least I think it's \r Only danger with it though is that you have to be certain that what you're writing is longer or the same length as what's there. It's like writing with the insert thing off so it writes over what's in your screen.
Also, if you want to clear the screen totally you can use the last option here -- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1031963460&id=1043284385 Just add the function and call it whenever you want to do the clearin'.

>> is there some way to leave the program listening for user input to stop or reset the time or to exit the program?
Listening for user input... you could use getch() (conio.h, but it's not portable), kbhit() (conio again, I think, either that or windows), or a combination of both:

char ch;
while( !kbhit() ) {
  ch = getch();
  // do something with the timer
  std::cout<< "You hit: " << ch << "\n";
}
twomers 408 Posting Virtuoso

I really don't know what you mean, but you might want to open the files in binary mode...

twomers 408 Posting Virtuoso

You're right. Why bother using code tags.

>> int main();
>> {

Should be

>> int main()
>> {

No ; after main.

twomers 408 Posting Virtuoso

If all you want to do is wait for a while you can use sleep...:

#include <windows.h>
int main() {
  // Do something
  Sleep( 1000 ); // Sleep( miliseconds );
  // Do more somethings
  return 0;
}

You can put the sleep in an infinite loop if you want it to execute every while. Alternatively you could create some kind of time comparison thing... get the current time and wait till it reaches that time plus X... I think this way's better. I've assumed you're using windows... Sleep takes a value of miliseconds. So if you want to work with seconds just do something like:

Sleep( 1 *1000 );

Which will wait one second. Change the first number to modify it.

joshua.tilson commented: A nice simple C++ timer, Thanks a lot! +1
twomers 408 Posting Virtuoso

A kind of curry-soup thing... it's quite good.

twomers 408 Posting Virtuoso

... if by cool you mean cold. It's bloody freezing this time of year!

twomers 408 Posting Virtuoso

I think (though I'm not all that knowledged in history, Irish history to be specific), that they weren't laws just general religious segregation.

twomers 408 Posting Virtuoso

At home, then to a friends for whiskey, then to the sea for a cold swim, and then more hot whiskey... or port.

twomers 408 Posting Virtuoso

>> Can't say i have a wall though.
Damn. Can you throw high?
Also, can you set off a sequence of snapshots? You know once the sound triggers could you take (say), five photos as fast as possible after that?

twomers 408 Posting Virtuoso

>> Do Irish policemen wear helmets suitable for such relieve?
The Gardaí (Irish cops), don't wear helmits normally ... Their role appears to be more symbolic ... don't think they actually do anything.

twomers 408 Posting Virtuoso

>> In Britain a pregnant woman can legally relieve herself into a policeman's helmet.
I believe it's actually anywhere. But I'm not quite certain. It's been a while since I got that email ...

twomers 408 Posting Virtuoso

Got any computer screens you don't need? Or microwaves? Find a high wall and push.

twomers 408 Posting Virtuoso

>> I could hear up to 20K but a few lower I couldn't hear such as 13K and 16K.
That's possibly due to aliasing with your sound card. The sampling theory applies to sound too, right?

twomers 408 Posting Virtuoso

Aye. change struct to class and put private/protected or public access specifiers where appropriate. But I believe (and I may be wrong cause it's from memory and I never did this), that in a class before the final semi colon but after the closing brace if something is typed there it becomes an instance...

class thing{ 
 // ...
} thingy;

thingy is an instance of thing, I belive. I may be wrong.

twomers 408 Posting Virtuoso

I got up to about 16 the other week. I'm 21. I was using some ultrasonic transducers I'm doing work on. It's weird. They're meant to have a narrow bandwidth at about 40 khz with 20dB/dec either way around the peak but you could hear well enough up to your threshold.
Oh, The Dude, it's your soundcard. There's no way you're that deaf. Most things are under that-ish level. Why make a card which can play sounds which can't be heard?