This topic is locked, you cannot edit posts or make further replies.  [ 3867 posts ]  Go to page Previous  1 ... 157, 158, 159, 160, 161, 162, 163 ... 258  Next
Random $h!t Thread - Part V 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Fri May 15, 2009 3:16 am
Posts: 6146
Location: Middle Earth
Image

_________________
Dive like a fish, drink like a fish!

><(((º>`•.¸¸.•´¯`•.¸><(((º>
•.¸¸.•´¯`•.¸><(((º>`•.¸¸.•´¯`•.¸><(((º>

If one is diving so close to the limits that +/- 1% will make a difference then the error has already been made.


Tue Aug 07, 2012 10:17 am
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 7:26 pm
Posts: 17040
Sir Bernard Lovell dies aged 98


Tue Aug 07, 2012 10:39 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 8:19 pm
Posts: 5071
Location: Manchester
RIP Bernard


Tue Aug 07, 2012 3:05 pm
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 7:26 pm
Posts: 17040
'Fifty Shades of Grey' best selling book ever in the UK.

Oh FFS. I would facepalm my head clean off.

One good thing I suppose, there's pretty much no moral high ground for anyone over the use of porn in this country any more. Let's face it, the difference between 'Fifty Shades of Grey' and "Razzle' is just packaging.

Jon


Tue Aug 07, 2012 6:29 pm
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
jonbwfc wrote:
One good thing I suppose, there's pretty much no moral high ground for anyone over the use of porn in this country any more. Let's face it, the difference between 'Fifty Shades of Grey' and "Razzle' is just packaging.


Razzle probably has better use of adjectives and narrative

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Tue Aug 07, 2012 7:55 pm
Profile
Moderator
User avatar

Joined: Thu Apr 23, 2009 6:11 pm
Posts: 12143
Location: Belfast
I'm sure the recent events on Mars brought a smile to his face, and possibly his heart.

Mark

_________________
okenobi wrote:
All I know so far is that Mark, Jimmy Olsen and Peter Parker use Nikon and everybody else seems to use Canon.
ShockWaffle wrote:
Well you obviously. You're a one man vortex of despair.


Tue Aug 07, 2012 11:17 pm
Profile WWW
What's a life?
User avatar

Joined: Thu Apr 23, 2009 8:46 pm
Posts: 10022
I've been unwell for a couple of days. By last night, I felt the effects were wearing off though still tired so went to bed. Slept until around 2200 and woke up, hungry. Had something to eat. Still felt worn and tired but couldn't sleep. So much so that I was still awake around 0540. Now bear in mind that I'm normally up around 0630, this was verging on dangerous. I ensured three alarms were set on the phone (0630, 0645, 0700) and I managed to sleep through all of them (I think I probably woke up and turned them off but I don't recall this). I suddenly woke up and looked at the clock - 0800! I've normally left the house by then.

No wash. No brushing. No breakfast. Quickly ironed my shirt, dressed and ran out the house.

The entire morning I've been farting, presumably because I've not eaten much over the last few days until last night and the smell is revolting.

_________________
Image
He fights for the users.


Wed Aug 08, 2012 12:29 pm
Profile
Official forum cat lady
User avatar

Joined: Fri Apr 24, 2009 8:04 am
Posts: 11039
Location: London
cloaked_wolf wrote:

The entire morning I've been farting, presumably because I've not eaten much over the last few days until last night and the smell is revolting.


Sounds like you need to go to the loo! lol

Hope you feel better today

_________________
Still the official cheeky one ;)

jonbwfc wrote:
Caz is correct though


Wed Aug 08, 2012 1:20 pm
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 8:46 pm
Posts: 10022
Well thankfully that helped a little. I just smelled myself - a stench of farts, sweat and deoderant. I wonder what my patients thought of me?!?!?

_________________
Image
He fights for the users.


Wed Aug 08, 2012 6:21 pm
Profile
Spends far too much time on here

Joined: Thu Apr 23, 2009 6:12 pm
Posts: 2020
Location: Mute City
just did my first bit of programming in Linux, getting my C++ noughts and crosses program to run on my Raspberry Pi :D the bulk of the program was written in Netbeans on Windows, but a few things had to be changed before it would compile (apparently integer to char conversions are not standard)

now i have shared folders via CIFS, so i can write to and from my desktop with the Pi. should be an easier way of getting things on there than constantly ferrying files around on my pendrive


Thu Aug 09, 2012 12:47 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 8:19 pm
Posts: 5071
Location: Manchester
http://www.youtube.com/watch?v=1Pr8xnNi ... re=related


Thu Aug 09, 2012 3:19 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
soddit112 wrote:
apparently integer to char conversions are not standard

At least in C, the actual sizes of the various datatypes are undefined. The C language spec. simply states that:
Code:
sizeof(long long) >= sizeof(long) >= sizeof(int) >= sizeof(short)

From what I can gather, C++ provides minimum ranges that different datatypes have to be able to store, as follows:

  • signed char: -127 to 127 (note, not -128 to 127; this accommodates 1's-complement platforms)
  • unsigned char: 0 to 255
  • "plain" char: -127 to 127 or 0 to 255 (depends on default char signedness)
  • signed short: -32767 to 32767
  • unsigned short: 0 to 65535
  • signed int: -32767 to 32767
  • unsigned int: 0 to 65535
  • signed long: -2147483647 to 2147483647
  • unsigned long: 0 to 4294967295
  • signed long long: -9223372036854775807 to 9223372036854775807
  • unsigned long long: 0 to 18446744073709551615

You can see how a char can fit into a single byte, whereas an int needs at least two bytes. On a standard 32-bit desktop, it may actually be optimal to use a minimum of 2 or even 4 byte words, whereas on something like a Pi, with its simpler RISC processor, it may make more sense to just use a single byte where possible. Hopefully you can see why casting from int to char (which in C/C++ does not change the data in any way, just the way the data is interpreted) would not work.

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Thu Aug 09, 2012 7:34 am
Profile
Spends far too much time on here

Joined: Thu Apr 23, 2009 6:12 pm
Posts: 2020
Location: Mute City
EddArmitage wrote:
soddit112 wrote:
apparently integer to char conversions are not standard

At least in C, the actual sizes of the various datatypes are undefined. The C language spec. simply states that:
Code:
sizeof(long long) >= sizeof(long) >= sizeof(int) >= sizeof(short)

From what I can gather, C++ provides minimum ranges that different datatypes have to be able to store, as follows:

  • signed char: -127 to 127 (note, not -128 to 127; this accommodates 1's-complement platforms)
  • unsigned char: 0 to 255
  • "plain" char: -127 to 127 or 0 to 255 (depends on default char signedness)
  • signed short: -32767 to 32767
  • unsigned short: 0 to 65535
  • signed int: -32767 to 32767
  • unsigned int: 0 to 65535
  • signed long: -2147483647 to 2147483647
  • unsigned long: 0 to 4294967295
  • signed long long: -9223372036854775807 to 9223372036854775807
  • unsigned long long: 0 to 18446744073709551615

You can see how a char can fit into a single byte, whereas an int needs at least two bytes. On a standard 32-bit desktop, it may actually be optimal to use a minimum of 2 or even 4 byte words, whereas on something like a Pi, with its simpler RISC processor, it may make more sense to just use a single byte where possible. Hopefully you can see why casting from int to char (which in C/C++ does not change the data in any way, just the way the data is interpreted) would not work.


wow, thanks Ed. Since I've been working with C# for the past two years the number of bytes in a variable types escape me sometimes, I'm used to having conversions all done for me :P

my current solution is this for loop:

Code:
for (int i = 0; i > 9; i++) //9 places on the grid, so loop 9 times
{
    squares[i] = i+49; //squares holds the value of each place on the game board. it has 9 entries.
}


the "+49" compensates for the gap between the value and it's place in the ASCII table (0 is 48, so to make address 0 in the array equal an ASCII 1, you have to add 49). this is probably very silly and obviously wont work with values above 9, but its fine for noughts and crosses :)


Thu Aug 09, 2012 11:30 am
Profile
Official forum cat lady
User avatar

Joined: Fri Apr 24, 2009 8:04 am
Posts: 11039
Location: London
They wrap wraps funny here. I'm being a rebel and unwrapping, redistributing the filling then rewrapping :D

_________________
Still the official cheeky one ;)

jonbwfc wrote:
Caz is correct though


Thu Aug 09, 2012 11:34 am
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 8:46 pm
Posts: 10022
Reminds me of the time I was a medical student and chose to have a baguette from the sandwich bar at the hospital. The canteen had just opened for lunch and it was obvious this guy did not have a clue. He cut a slit in the baguette and didn't open it up. Instead, he tried to spread butter into the slit, failing miserably and then tried to stuff filling into it. I ended up with baguette that had a huge blob of butter at one side, rendering that portion inedible.

_________________
Image
He fights for the users.


Thu Aug 09, 2012 12:15 pm
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 3867 posts ]  Go to page Previous  1 ... 157, 158, 159, 160, 161, 162, 163 ... 258  Next

Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.