Police urge public to call 999 if you see missing teenager missing from South Ockendon
Furious parents call in lawyers after refusing to accept 12-year-old daughter's spelling bee loss
Jack Cork reveals the secrets of Burnley's promotion push, his role in producing their next wave of stars and how Scott Parker has taken them to the next level
Michelin star restaurant once dubbed the UK's best pub handed poor hygiene rating
Prince William goes through emotional rollercoaster watching his beloved Aston Villa in Paris as he relishes 'making really important memories' with George
How Trump just made EVERYONE'S iPhone more expensive. The truth about how much more it could cost. And can the most complex supply chain in history really be relocated to America?
Bank of England Says AI Software Could Create Market Crisis For Profit
Read more of this story at Slashdot.
Entitled demands of dad with baby forces American Airlines plane to U-turn FOUR HOURS into Milan flight
FBI profiler who helped catch Ted Bundy says Menendez brothers have 'paid the price' for killing their abusive parents and should be freed
I'm a decluttering expert - these are the worst mistakes you can make while spring cleaning your home
CodeSOD: A Steady Ship
You know what definitely never changes? Shipping prices. Famously static, despite all economic conditions and the same across all shipping providers. It doesn't matter where you're shipping from, or to, you know exactly what the price will be to ship that package at all times.
Wait, what? You don't think that's true? It must be true, because Chris sent us this function, which calculates shipping prices, and it couldn't be wrong, could it?
public double getShippingCharge(String shippingType, bool saturday, double subTot) { double shCharge = 0.00; if(shippingType.Equals("Ground")) { if(subTot <= 29.99 && subTot > 0) { shCharge = 4.95; } else if(subTot <= 99.99 && subTot > 29.99) { shCharge = 7.95; } else if(subTot <= 299.99 && subTot > 99.99) { shCharge = 9.95; } else if(subTot > 299.99) { shCharge = subTot * .05; } } else if(shippingType.Equals("Two-Day")) { if(subTot <= 29.99 && subTot > 0) { shCharge = 14.95; } else if(subTot <= 99.99 && subTot > 29.99) { shCharge = 19.95; } else if(subTot <= 299.99 && subTot > 99.99) { shCharge = 29.95; } else if(subTot > 299.99) { shCharge = subTot * .10; } } else if(shippingType.Equals("Next Day")) { if(subTot <= 29.99 && subTot > 0) { shCharge = 24.95; } else if(subTot <= 99.99 && subTot > 29.99) { shCharge = 34.95; } else if(subTot <= 299.99 && subTot > 99.99) { shCharge = 44.95; } else if(subTot > 299.99) { shCharge = subTot * .15; } } else if(shippingType.Equals("Next Day a.m.")) { if(subTot <= 29.99 && subTot > 0) { shCharge = 29.95; } else if(subTot <= 99.99 && subTot > 29.99) { shCharge = 39.95; } else if(subTot <= 299.99 && subTot > 99.99) { shCharge = 49.95; } else if(subTot > 299.99) { shCharge = subTot * .20; } } return shCharge; }Next you're going to tell me that passing the shipping types around as stringly typed data instead of enums is a mistake, too!
How Titanic COULD have survived: Digital model reveals how a head-on collision with the iceberg would have been less damaging than the glancing blow
<i>The Reg</i> translates the letter in which Oracle kinda-sorta tells customers it was pwned
Oracle's letter to customers about an intrusion into part of its public cloud empire - while insisting Oracle Cloud Infrastructure was untouched - has sparked a mix of ridicule and outrage in the infosec community.…