Automatic metric / imperial conversion in posts
-
For anyone interested in trying to implement this, don't forget that US/UK fluid measures aren't the same despite the names. The US gallon is the wine gallon, while the UK uses a slightly modified version of the ale gallon (tweaked to give water a density of 10lb/gal). Both gallons were in use at the time of US independence. I've never found anything on why the US settled on the wine gallon.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
For anyone interested in trying to implement this, don't forget that US/UK fluid measures aren't the same despite the names. The US gallon is the wine gallon, while the UK uses a slightly modified version of the ale gallon (tweaked to give water a density of 10lb/gal). Both gallons were in use at the time of US independence. I've never found anything on why the US settled on the wine gallon.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
dan neely wrote:
I've never found anything on why the US settled on the wine gallon.
"We like standards so much, we'll make some of our own". That's aquote from somewhere. Wish I could remember where. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
I think it would be very cool if I could type 10 miles and the cp forum software would automatically enter it as 10 miles (16.09 KM) or -10c and it would post as -10c (14f). I know it seems frivolous but given the global nature of this site and the number of times people post about the weather or the miles per gallon of their car or the price of gas or any number of things I think it would be very cool. Perhaps the core of it could be an engine that was created as part of a contest here for parsing text and reliably finding measurements and converting them.
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
No thanks. I want my messages to appear as I entered them, and I want to be sure what I am reading is what the author has written. :)
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
-
True and the browser supplies the locale so easy peasy. :)
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
Only if you're aware of it in advance. Given the degree of mutual misunderstanding that comes up every time MPG numbers for US/UK cars are discussed it's not widely known here, and before CP I'd never even heard of it.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
No thanks. I want my messages to appear as I entered them, and I want to be sure what I am reading is what the author has written. :)
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
-
Only if you're aware of it in advance. Given the degree of mutual misunderstanding that comes up every time MPG numbers for US/UK cars are discussed it's not widely known here, and before CP I'd never even heard of it.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
dan neely wrote:
Given the degree of mutual misunderstanding that comes up every time MPG numbers for US/UK cars are discussed it's not widely known here, and before CP I'd never even heard of it.
Well that's a bit of an obscure case I'm thinking more about temperatures and other basic units of measurement, but in any case it would certainly alleviate a little misunderstanding don't you think? :)
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
-
I think it would be very cool if I could type 10 miles and the cp forum software would automatically enter it as 10 miles (16.09 KM) or -10c and it would post as -10c (14f). I know it seems frivolous but given the global nature of this site and the number of times people post about the weather or the miles per gallon of their car or the price of gas or any number of things I think it would be very cool. Perhaps the core of it could be an engine that was created as part of a contest here for parsing text and reliably finding measurements and converting them.
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
It shouldn't be automatic. We should have 2 command buttons (like the formatting buttons that are already there) that'd do this C to F and Km to Miles conversion (and their reverse equivalents). Those 2 are the most common here.
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com link -
It shouldn't be automatic. We should have 2 command buttons (like the formatting buttons that are already there) that'd do this C to F and Km to Miles conversion (and their reverse equivalents). Those 2 are the most common here.
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com linkYuck from a UI design perspective. :) If people really can't stand to have their post modified, how about it just converts at display instead and users can turn it on or off as a feature?
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
-
Yuck from a UI design perspective. :) If people really can't stand to have their post modified, how about it just converts at display instead and users can turn it on or off as a feature?
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
IMO an automated footnote providing converted equivalent values and units would probably be acceptable even to people that really can't stand to have their post modified, provided the author of the footnote takes full credit for it :laugh:
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
-
I think it would be very cool if I could type 10 miles and the cp forum software would automatically enter it as 10 miles (16.09 KM) or -10c and it would post as -10c (14f). I know it seems frivolous but given the global nature of this site and the number of times people post about the weather or the miles per gallon of their car or the price of gas or any number of things I think it would be very cool. Perhaps the core of it could be an engine that was created as part of a contest here for parsing text and reliably finding measurements and converting them.
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
Oo, ah. What if I am trying to explain that there are 182-degrees C in a circle :omg:. Did you see that Bruce Willis movie called "The Whole 8.2296 Meters?" Winnie the Pooh sings, "Deep in the 40.4685642 hectares wood where Christoper Robin plays..." :rolleyes: .
-
dan neely wrote:
I've never found anything on why the US settled on the wine gallon.
"We like standards so much, we'll make some of our own". That's aquote from somewhere. Wish I could remember where. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
That's something Bob would say. I mean this Bob[^]. :)
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
-
Oo, ah. What if I am trying to explain that there are 182-degrees C in a circle :omg:. Did you see that Bruce Willis movie called "The Whole 8.2296 Meters?" Winnie the Pooh sings, "Deep in the 40.4685642 hectares wood where Christoper Robin plays..." :rolleyes: .
-
It's better to light a candle than to curse the darkness.
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
This little candle[^] and this one[^] may banish your darkness. :laugh:
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
-
It's better to light a candle than to curse the darkness.
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness and the light.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall