Feed aggregator
Google's Exclusive Reddit Access
Read more of this story at Slashdot.
Microsoft: Our Licensing Terms Do Not Meaningfully Raise Cloud Rivals' Costs
Read more of this story at Slashdot.
OpenAI Could Lose $5 Billion This Year
Read more of this story at Slashdot.
T-Mobile Expands Fiber Footprint With Metronet Acquisition
Read more of this story at Slashdot.
CrowdStrike Offers a $10 Apology Gift Card To Say Sorry For Outage
Read more of this story at Slashdot.
US Urges Vigilance By Tech Startups, VC Firms on Foreign Funds
Read more of this story at Slashdot.
Wealthy Western Countries Lead in Global Oil and Gas Expansion
Read more of this story at Slashdot.
AI Adoption Creeps as Enterprises Wrestle With Costs and Use Cases
Read more of this story at Slashdot.
Mark Zuckerberg Imagines Content Creators Making AI Clones of Themselves
Read more of this story at Slashdot.
Digital Tax Talks In G20 Spotlight As US Tariff Threat Looms
Read more of this story at Slashdot.
Sunday Was the Hottest Day Ever Recorded On Earth, Scientists Say
Read more of this story at Slashdot.
CodeSOD: How to Validate an IP Address
Andy has some concerns about future proofing. In this case, he sends us some C# code that's supposed to validate an IP address.
string[] address = StringTools.splitStr(IP, '.'); if (address.length < 4) { throw new Exception("Bad IP format : " + IP); }Andy writes: "IPv6 will never be a thing!"
It's not just IPv6, of course. There are plenty of ways one might choose to represent an IP address that don't use dot decimal notation- any 32 bit integer is potentially an IP address. But we usually represent the IP address this way. No, there's another problem with this particular parser: it checks in address.length < 4.
Now, this is actually genius. You see, our choices are IPv4 (32 bits of addresses), or IPv6 (128 bits of addresses), but what if we only want, oh, I don't know, 40 bits? Well, this code will think 555.192.168.0.1 is a perfectly valid IP address, and frankly, why shouldn't it be? A perfect bridge between IPv4 and IPv6. I'd call it IPv5, except for the fact that we had to skip 5 because of weird reasons.
Also, C# already has a function for parsing IP addresses which also has the benefit of doing it correctly.
[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!DHS Has a DoS Robot To Disable Internet of Things 'Booby Traps' Inside Homes
Read more of this story at Slashdot.
Hackers Leak Documents From Pentagon IT Services Provider Leidos
Read more of this story at Slashdot.
Alphabet To Invest Another $5 Billion Into Waymo
Read more of this story at Slashdot.
Indie Game Publisher Humble Games Reportedly Lays Off All Staff
Read more of this story at Slashdot.
The Kremlin Jails the Father of Russia's Internet
Read more of this story at Slashdot.
House Committee Calls On CrowdStrike CEO To Testify On Global Outage
Read more of this story at Slashdot.
Switzerland Now Requires All Government Software To Be Open Source
Read more of this story at Slashdot.
EU To Investigate Delivery Hero, Glovo Over Food Delivery Cartel Concerns
Read more of this story at Slashdot.