Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "class"


Lufthansa Will Tap Kegs on Its Flights for Oktoberfest

  • Oktoberfest officially kicks off this week, and if you’re flying on Lufthansa it can actually kick off while you’re still in the air on your way to the main event, as long as you’re flying from Germany to a few specific airports.
  • The airline announced plans to bring actual kegs onboard flights from Munich to New York/Newark (September 19), to Singapore (September 25), and to Shanghai (October 6).
  • Business class customers on those flights can chow down on some Oktoberfest-specific foods, such as ox tartare with truffle, Arctic char with Riesling sauce, and pistachio pesto.
  • Passengers who land in Munich during the first weekend of Oktoberfest, will get an “Oktoberfest treat box” with snacks and a vitamin drink to get them ready for all the festivities on the ground.
  • The airline is also serving an Oktoberfest menu in its lounges for grabbing a quick snack when you land, or keeping that party going right until takeoff.

save | comments | report | share on


Show HN: Panther – A browser testing and web crawling library for PHP

  • Panther is very easy to use, because it implements the popular Symfony's BrowserKit and DomCrawler APIs, and contains all features you need to test your apps.
  • In test mode, Panther automatically starts your application using the PHP built-in web-server.
  • It automatically starts your app using the built-in PHP web server and let you crawl it using Panther.
  • Alternatively (and even for non-Symfony apps), Panther can also leverage the Goutte web scraping library, which is an intermediate between the Symfony's and the Panther's test clients.
  • The fun part is that the 3 libraries implement the exact same API, so you can switch from one to another just by calling the appropriate factory method, and find the good trade off for every single test case (do I need JavaScript, do I need to authenticate to an external SSO server, do I want to access the kernel of the current request...).

save | comments | report | share on


Why JavaScript is an OOP Language (Even Though It Doesn't Have Classes)

  • The style of OOP where there is no difference between classes and objects is called prototype-based programming (to make our lives easier, we'll call it PBP).
  • I mentioned earlier that in PBP an object contains all of its methods and properties, as well as their actual state.
  • Like everything in programming, PBP and class-based OOP fall in a spectrum of tradeoffs.
  • Regardless of a developers OOP language of choice, the onus is still upon the developer to use the language well to achieve encapsulation (or modularity), to appropriately use polymorphism, and to judiciously apply inheritance (class-based or prototype-based, depending on language).
  • Inheritance is sometimes abused to achieve reuse of the parent (or prototype) functionality rather than used as a polymorphism facility by the caller of methods of a family of objects who provide the same interface (the same contract of behavior).

save | comments | report | share on


Most people don't realize this Delta credit card comes with an annual companion plane ticket — it can be an incredible value if you use it right

  • The two main Delta credit cards — the Gold Delta SkyMiles credit card from American Express and the Platinum version — come with a lot of perks for Delta flyers, like free checked bags, priority boarding, discounted lounge access, and in-flight discounts.
  • The flight up was easy — we got the airport with time to spare before boarding, and popped into the Delta Sky Club for breakfast — we had access through a different credit card, the regular Platinum Card from American Express.
  • We went to the check-in counter to get our boarding passes and pay Delta's in-cabin pet fee — although I had to call reservations ahead of time to add a pet to our trip, I had to pay the associated fee in-person so the agents could confirm that Murray was in an approved carrier.

save | comments | report | share on


Visa and Mastercard Will Pay $6 Billion to End a Massive Price-Fixing Lawsuit

  • Visa and Mastercard agreed to pay as much as $6.2 billion to end a long-running price-fixing case brought by merchants over card fees, the largest-ever class action settlement of an antitrust case.
  • In 2013, the parties struck a then-record $5.7 billion deal that was approved by U.S. District Judge John Gleeson, only to have a federal appeals court reject it three years later, ruling that a provision that barred merchants from suing over fees was unfair.
  • After tossing out the earlier settlement, the court divided the merchants’ claims into two separate classes, one that focused on monetary damages and the other on making changes to Visa and Mastercard’s business practices.
  • The case is In re Payment Card Interchange Fee and Merchant Discount Antitrust Litigation, 05-md-01720, U.S. District Court, Eastern District of New York (Brooklyn).

save | comments | report | share on


Ruby’s Hashes and Perl’s Autovivification, in JavaScript

  • Interestingly, Ruby hashes also have the notion of programmatically determine a default value to be returned when accessing keys that have not been set.
  • In essence, we’re deciding that at some point we will use Hash again, and at that time we can benefit from a single class multiple pieces of code can share, but we’d like to pay that cost now.
  • If we have to write our own Hash or HashMap class, fine, but we need good reasons to add the abstraction and maintenance cost to our code.
  • So whether we’re building a brand new Hash/HashMap class, or using the lightweight, idiomatic approach, we’re taking two steps forward with autovivifying hashes, we’re promoting the idea of a dictionary generating default values, and also promoting the idea that the entire process is recursive.

save | comments | report | share on


Scale API raises $18M to build the AWS for AI

  • Our suite of managed labeling services such as Sensor Fusion Annotation, 2D Box Annotation, 3D Cuboid Annotation, Semantic Segmentation, and Categorization combine manual labeling with best in class tools and machine driven checks to yield stunningly accurate training data.
  • Scale is committed to continual innovation in combining humans with AI to prepare intelligent data, passing on these improvements to our customers and powering a growing future of AI applications.
  • Help us bring human intelligence to software.
  • We're a world-class team that's changing how companies function.
  • Our team has built the simplest API for training data.
  • AWS changed the game by removing the need to run your own infrastructure, which enabled a new generation of software companies.
  • We want to do the same by removing the need for you to run your own operations team.
  • Human-powered data for AI applications.

save | comments | report | share on


Emerging markets instability won't strike US stocks, PNC top market watcher says

  • Investors may want to spend less time worrying about the emerging markets ruining the U.S. stock market rally.
  • According to PNC Financial's Jeffrey Mills, Wall Street has been overplaying the risk of the asset class wrecking this year's record run in the U.S., because bear markets aren't normally contagious.
  • His thoughts came as the troubled MSCI Emerging Markets Index registered its first positive week in three, an encouraging sign that some of the pain may be abating.
  • Still, the index is down almost 8 percent over the past 12 week on instability in countries such as Turkey, Brazil and China.
  • However, he expects a market rally post-midterms regardless of the outcome.
  • Plus, Mills contended earnings forecasts will remain intact through next year, and that bodes well for stock market gains no matter what's going on overseas.

save | comments | report | share on


Dataclasses In Python

  • Dataclasses a standard library module (that added in Python 3.7) for code generation with given type annotataed specs.
  • It simplifies process of writing a class as a mutable data holder with automatically generated ordering methods (similar to functools.total_ordering class decorator).
  • We created annotated 3 fields with PEP 526's variable annotation syntax and we assigned a default value to job field.
  • Dataclasses uses normal class definition syntax, allows you to inheritance, using metaclasses and other Python class features.
  • When we need to unpack a dataclass we can use astuple for generating a tuple and unpacking it.
  • The dataclass class decorator can take several parameters for better code generation.
  • Generated code includes everything from the original so that the default value shows-up as a class variable, and the type declarations show-up in the class annotations.
  • Instead of fixed default values we can use factories with field().

save | comments | report | share on


Java Map keys should always be Comparable

  • This article is inspired by the discovery years ago that an attacker could manipulate query parameters to turn the map data structure in many web servers into a linked list, by making all the parameter names end up in the same hash bucket, which CVE-2018-0875 reminded me of.
  • In Java, for example, the strings "fg", "gH" and "h)" all have a hash code of 3265, so an attacker can build query strings like fgfg=0&fggH=0&fgh)=0&gHfg=0 and so on to waste the server’s time and mount an effective denial of service.
  • This is obviously the case for strings (and is special-cased in HashMap), but it should also be the case for every class used as a map key, especially if the data is potentially supplied by a hostile user.

save | comments | report | share on