-
8 votes
-
Conversion therapy group founder comes out as gay, apologizes
21 votes -
Exxon Mobil has agreed to sell its Norwegian oil and gas assets for up to $4 billion – ending its production in a country where it started operations more than a century ago
5 votes -
Yield curve and predicted GDP growth
9 votes -
Mun Py: A Fully Automated Mission to the Mun
5 votes -
Nintendo Direct - September 4, 2019
16 votes -
Swedish mountain loses highest peak title due to global heating – glacier at Kebnekaise's summit has shrunk amid soaring Arctic temperatures
4 votes -
The Finnish FA announced it will begin paying its men's and women's national teams equally
3 votes -
How to do a code review
10 votes -
The reason our streets switched to cul-de-sacs
4 votes -
Apple Change Causes Scramble Among Private Messaging App Makers
7 votes -
Pride flags greet Mike Pence on arrival in Iceland – Guðni Jóhannesson also pictured wearing rainbow bracelet to meet US vice-president
9 votes -
Emily Atkin's summary of and thoughts about CNN's 7-hour Climate Crisis Town Hall
10 votes -
Green Threads Explained in 200 Lines of Rust
3 votes -
Steve and The Don: Smith entering the rarest of air as records mount
3 votes -
Robert Mugabe, Zimbabwe's longtime strong man, dead at 95
8 votes -
Celeste's free DLC "Chapter 9: Farewell" will be released on September 9, and Matt Makes Games is now Extremely OK Games
11 votes -
Cattle Decapitation - One Day Closer to the End of the World (2019)
3 votes -
Any motorcyclists?
I'm about to do my full motorbike licence here in the UK (direct access course) and currently looking at my first big bike, thinking about a 600cc Triumph at the moment. Wondered if there are any...
I'm about to do my full motorbike licence here in the UK (direct access course) and currently looking at my first big bike, thinking about a 600cc Triumph at the moment. Wondered if there are any other riders here on tildes, what do you ride, what's your history with bikes etc.?
16 votes -
‘Lord of the Rings’ series at Amazon casts Will Poulter in lead role
10 votes -
Magic: the Gathering - Throne of Eldraine mechanics
8 votes -
Our past on the internet is disappearing before we can make it history
12 votes -
Bank of Canada maintains overnight rate target at 1.75%
7 votes -
First look at a new Wii Fit-like "exercise ring" for Nintendo Switch, more info coming September 12
6 votes -
New Zealand has launched its first big boat of the 2021 America's Cup
5 votes -
When can I retire? Early retirement calculator.
7 votes -
Consequences of using the Copy-Paste method in C++ programming and how to deal with it
4 votes -
How Matthew Lopez transformed “Howards End” into an epic play about gay life
6 votes -
Can satellite megaconstellations be responsible users of space?
5 votes -
Grimes & i_o - Violence (2020)
4 votes -
Who really cares about literary prizes? And what can they tell us about reading, publishing, and canon making today?
4 votes -
The why of the world
2 votes -
Outlaw Country - Klamath County, Oregon, Is The Perfect Place To Go If You Don’t Want To Be Found—And The Worst Place To Be If Someone Threatens Your Life.
7 votes -
Jeremy Renner’s app is shutting down because of trolls
13 votes -
A web and popular mobile app based manga reading service, Mangarock is shutting down its service
4 votes -
SpaceX refused to move their Starlink satellite when they were alerted to the risk of collision with European Space Agency's Aeolus satellite
16 votes -
Developers and industry legends on the games that defined the last 20 years
2 votes -
SpaceX acquires new photos of Starship landing sites with Mars-orbiting NASA satellite
8 votes -
Sally Floyd, who helped things run smoothly online, dies at 69
7 votes -
Andrew Yang gets media cold shoulder
19 votes -
Dolly Parton's ‘Books From Birth’ has now delivered one million free children's books to DC kids
8 votes -
How do people learn to cook a poisonous plant safely?
13 votes -
IKEA has committed to becoming a circular business by 2030 – by eliminating waste and reusing resources
8 votes -
Making new elements doesn’t pay. Just ask this Berkeley scientist.
5 votes -
Former Arsenal forward Nicklas Bendtner has joined Danish champions FC Copenhagen until the end of December
4 votes -
Stockholm to stage Avicii tribute concert to benefit mental health awareness
4 votes -
Steam Library overhaul coming to open beta on September 17, will focus on organization and events
9 votes -
Tesla’s autopilot found partly to blame for 2018 Los Angeles Freeway crash
7 votes -
Programming Challenge: Convert between units
Hi everyone! It's been a long time since last programming challenge list, and here's a nice one I've encountered. If you search for something like 7km to AU, you'll get your answer. But how is it...
Hi everyone! It's been a long time since last programming challenge list, and here's a nice one I've encountered.
If you search for something like 7km to AU, you'll get your answer. But how is it done? I don't think they hardcoded all 23 units of distance and every conversion factor between them.
If you were programming a conversion system - how would you do it?
First of all, you have input in format that you can specify, for example something like this:
meter kilometer 1000 mile kilometer 1.609344 second minute 60 ...Then you should be able answer queries. For example
7 mile metershould convert 7 miles to meters, which is11265.41.Can you design an algorithm that will convert any unit into any other unit?
Edit: Some conversion rates I extracted from wikipedia:
ångström 0.1nm astronomical unit 149597870700m attometre 0.000000000000000001m barleycorn 8.4m bohr 0.00846 cable length (imperial) 185.3184m cable length 185.2m cable length (US) 219.456m chain (Gunters) 20.11684m cubit 0.5m ell 1.143m fathom 1.8288m femtometre 0.00000000000001m fermi 0.00000000000001m finger 0.022225m finger (cloth) 0.1143m foot (Benoit) 0.304799735m foot (Cape) (H) 0.314858m foot (Clarke's) (H) 0.3047972654m foot (Indian) (H) 0.304799514m foot,metric 0.31622776602m foot,metric (long) 0.3m foot,metric (short) 0.30m foot (International) 0.3048m foot (Sear's) (H) 0.30479947m foot (US Survey) 0.304800610 french 0.0003m furlong 201.168m hand 0.1016m inch 0.0254m league 4828m light-day 25902068371200m light-hour 107925284880m light-minute 17987547480 light-second 299792458m light-year 31557600light-second line 0.002116m link (Gunter's) 0.2011684m link (Ramsden's; Engineer's) 0.3048m metre 1m m 1metre km 1000m mickey 0.000127 micrometre 0.000001 mil; thou 0.0000254 mil 10km mile (geographical) 6082foot (International) quarter 0.2286m rod 5.0292m rope 6.096m shaku 0.303 0303m span (H) 0.2286m stick (H) 0.0508m toise 1.949 0363m twip 1.76310 yard 0.9144m17 votes -
New Zealand streams teeming with pesticides
3 votes