|
![]() |
![]() |
#51 | |
for all seasons
|
![]() Quote:
do a post about pointers
__________________
check out my buttspresso
|
|
![]() |
![]() |
![]() |
#52 | |
Niqo Niqo Nii~
Join Date: Mar 2004
Posts: 6,240
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]()
I do essentially, if not exactly, the same thing Tev does. What makes my hum-drum story of work related woe unique is my terrible schedule which is Friday-through-Tuesday 1PM to 10PM.
I should better adapt to my schedule by getting to bed around midnight and waking up bright-eyed at 8am to enjoy the day! But no matter what time I get to bed it is the same story - up at the crack of noon and off to work ![]()
__________________
Quote:
|
|
![]() |
![]() |
![]() |
#53 |
adorable
Join Date: Sep 2007
Posts: 12,950
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]()
Apparently there are some problems with either my background check, or the info I volunteered on the employment form, so I don't get to start work today, probably. But my Supervisor didn't know apparently, so I've got everything here to start hitting up houses. Blergh.
I'm hoping it's just because they're looking into my inattentive driving incident back in 2007, and not because I have some arrest warrant that I have no idea about. I don't really think I'd have one, and I can't really think of what I'd have one for, but that I have a warrant out for my arrest is a personal fear of mine.
__________________
this post is about how to successfully H the Kimmy
|
![]() |
![]() |
![]() |
#54 |
Beard of Leadership
|
![]()
So there's a model on my screen. A model representing some physical object. I do stuff to the model, then click a button and sit and wait while my computer does, as far as it appears, nothing for an hour or more. Even better, it does nothing so hard that it can't do anything else while it's doing nothing. So I sit and wait for it to finish doing nothing, and hope that it'll do nothing successfully, and give me useful information. But more likely, it will completely fail at doing nothing, forcing me to tweek the model in frustratingly minute ways and try again.
What do I do while it's doing nothing? Bend paperclips. Not in any interesting shapes of course, just randomly bend them until they break. Then bend another.
__________________
~Your robot reminds me of you. You tell it to stop, it turns. You tell it to turn, it stops. You tell it to take out the trash, it watches reruns of Firefly.~ |
![]() |
![]() |
![]() |
#55 |
Not 55 years old.
Join Date: Dec 2003
Posts: 2,098
![]() ![]() ![]() ![]() ![]() ![]() |
![]()
So a pointer is a value that holds the address of a different value or of a class, which is a box full of values. Most programming languages have a way of "dereferencing" pointers to get the value of the thing they point at that's really easy, which leads to careless people forgetting that a pointer to a thing is not the thing itself, which leads to FUN TIMES and also memory leaks.
In C and C++, you can have a pointer to anything, including and especially other pointers. When you declare an array, C and C++ just allocate a block of memory on the stack and the name of the array is actually the name of a pointer to the start of that block, so you can actually use any pointer as an array and there is NO CHECKING to make sure that the pointer you are using as an array is actually an array or that you aren't running off the end of the array or anything. C trusts you to know what the hell you are doing! You can also have pointers to functions. The syntax for these is finicky as hell, and pointers to member functions of C++ classes is finicky squared. They're generally used when some library wants to allow you to set a function to be called when something happens, most classically when an operating system allows you to handle signals. The function pointer must have a return type and list of parameters that matches exactly the function it points at, or the code will not compile. A special kind of pointer is the void pointer. Basically, a void pointer could point to anything. It's just an address in memory! You simply can't dereference a void pointer without casting it to some other type of pointer, at which point the bits at the address in the void pointer are assumed to be the bits of whatever type you cast it to, regardless if those bits make any sense. Casting between types is generally dangerous but C will let you do it because C trusts you. Void pointers are most often seen as the return type of malloc and other C heap allocation functions. The second most common use of void pointers is as an argument in function pointers in registered callbacks - the idea being to let the "user code" set a function pointer and a void pointer. The prototype of the function pointer is of a function that takes a void pointer as an argument; when some particular event occurs that function is called with that argument, and if the user code is sensible it can cast that void pointer to the type of the thing it does in fact point at. This allows registered callback functions to take whatever argument the user needs them to at the cost of allowing the user to easily break everything without causing some obvious sign at the source of the problem. If you break the value of a pointer - for example, by adding a value to a pointer to int instead of to the int that is pointed to, or not initializing a pointer before you use it, or dereferencing an array of N elements by N (INDEX FROM ZERO YOU MORON), you can break literally anything. If you're pointing to a value on the stack, you can accidentally overwrite instructions with completely random instructions or plain nonsense. If you're pointing to the heap you can corrupt the heap and crash the program. If you are lucky, your program will segfault and any sensible debugger will tell you which pointer went wrong. If you make a healthy habit of initializing pointers to NULL, this will be your most common pointer problem. |
![]() |
![]() |
![]() |
#56 |
Monty Mole
|
![]()
Dammit ZeroOneDeeFiveFive, you were supposed to make the thread more boring. I found your post interesting and have learned from it.
|
![]() |
![]() |
![]() |
#57 |
...Really?
Join Date: Jun 2007
Location: in Theory. Everything works here
Posts: 3,961
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]()
HA! one of our managers found the bastard that was doing it. Not just any manager ether. It's the Kitchen Manager. Now I know this wont mean much to you without a example but he makes This man look like a saint in comparison
Oh I guess i could talk about them to make things interesting in here My work has One of every type of stereotypical managers. We got the New Fresh upstart one that Follows health code laws to the book (So much that we can't get our free drinks during a shift because we could contaminate something. or push the rolling trashcan into a theater to speed up cleaning because it's a "seating area") We got the Party hard manager, Who jokes and is nice to everyone and doesn't follow any rules at all. (he is the one that usually drags the rolling trashcan in to theaters if we say we can't) We got the Accountant Manager, the guy that constantly thinks in dollars and cents and follows the rules only to avoid penalties. (he also likes to "speed things up" by NOT following the Runners rules (which is always take away empty trays, Deliver what you take in, and man your own costumers requests) We got the Good news bad news Manager that tries not to be mean but also tries not to be nice. so he will complement and tell you to do something. Then there is the Not a manager Manager The one that Is technically a manager but no one (even herself) thinks or acts like she is one The manager behind the manager a guy that isn't a manager but everyone acts like he is one (and other managers go to for advice) Then we have the Kitchen manager...who is Mr.Bad-guy He is hell to deal with during the shift but once the stuff is over and everything is done He is the Nicest man i have ever met
__________________
I have a Pesterchum its DangerousDoc I am ether fading out of Time, Space, or Reality...Or Simply my Typewriter is running out of ink |
![]() |
![]() |
![]() |
#58 |
GHOST BOTTOMED DICK FACE
|
![]()
Y'know, I don't think Gordon Ramsey is such a bad guy. I watch his BBCA shows "The F Word" and the British run of "Kitchen Nightmares" and its usually when he's dealing with cocky, arrogant snots that he's raging and swearing all the time.
ESPECIALLY when he does Hell's Kitchen. I remember the season with the one guy who called himself "the black Gordon Ramsey." The look on Gordon's face while he was on the tour bus disguised was priceless. |
![]() |
![]() |
![]() |
|
|