Home Blog Page 3775

swift – The best way to lock orientation of 1 view controller to portrait mode solely?


As of iOS 10 and 11, iPad helps Slide Over and Break up View. To allow an app in Slide Over and Break up View, Requires full display screen should be unchecked. Meaning the accepted reply can’t be used if the app desires to help Slide Over and Break up View. See extra from Apple’s Adopting Multitasking Enhancements on iPad right here.

I’ve an answer that enables (1) unchecking Requires full display screen, (2) only one perform to be applied in appDelegate (particularly if you happen to do not need to / cannot modify the goal view controllers), and (3) keep away from recursive calls. No want of helper class nor extensions.

appDelegate.swift (Swift 4)

func software(_ software: UIApplication,
                 supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
    // Seek for the seen view controller
    var vc = window?.rootViewController
    // Dig by means of tab bar and navigation, regardless their order 
    whereas (vc is UITabBarController) || (vc is UINavigationController) {
        if let c = vc as? UINavigationController {
            vc = c.topViewController
        } else if let c = vc as? UITabBarController {
            vc = c.selectedViewController
        }
    }
    // Search for mannequin view controller
    whereas (vc?.presentedViewController) != nil {
        vc = vc!.presentedViewController
    }
    print("vc = " + (vc != nil ? String(describing: sort(of: vc!)) : "nil"))
    // Closing test if it is our goal class.  Additionally ensure that it is not exiting.
    // In any other case, system will mistakenly rotate the presentingViewController.
    if (vc is TargetViewController) && !(vc!.isBeingDismissed) {
        return [.portrait]
    }
    return [.all]
}

Edit

@bmjohns identified that this perform will not be referred to as on iPad. I verified and sure it was not referred to as. So, I did a bit extra testing and came upon some information:

  1. I unchecked Requires full display screen as a result of I need to allow Slide Over and Slide View on iPad. That requires the app to help all 4 orientation for iPad, in Information.plist: Supported interface orientations (iPad).

My app works similar approach as Fb: on iPhone, more often than not it’s locked to portrait. When viewing picture in full display screen, permits customers to rotate panorama for higher view. On iPad, customers can rotate to any orientation in any view controllers. So, the app seems to be good when iPad is stand on Sensible Cowl (panorama left).

  1. For iPad to name software(_:supportedInterfaceOrientationsFor), in Information.plist, solely maintain portrait for iPad. The app will lose Slide Over + Break up View capacity. However you may lock or unlock the orientation for any view controller, in only one place and no want to change ViewController class.

  2. Lastly, this perform get referred to as on view controller’s life cycle, when view is displayed/eliminated. In case your app have to lock/unlock/change orientation in different time, it won’t work

May decrease Medicare drug costs cease a remedy for most cancers or Alzheimer’s?

0


For the primary time, the federal authorities has negotiated instantly with pharmaceutical firms over the costs for a handful of medicine. The brand new costs, which had been introduced mid-August, take impact in January 2026, and they’re going to assist the Medicare program cap what particular person sufferers spend out of pocket on their prescriptions in a 12 months at $2,000.

The historic coverage, which has been floating round for many years, was lengthy opposed by “Massive Pharma” till Democrats in Congress handed and President Joe Biden signed the Inflation Discount Act in 2022.

Pharma tried to cease the negotiation coverage in courts after it turned legislation. Their issues — particularly, that these “value controls” will stifle innovation — have been echoed by Republicans and coverage commentators with the current finalization of the negotiated costs. With much less revenue, firms like Pfizer and Merck argue, it is going to be more durable to rent scientists, put money into laboratory area, and arrange scientific trials to check the drugs of the longer term.

Join right here to discover the large, sophisticated issues the world faces and essentially the most environment friendly methods to unravel them. Despatched twice per week.

It’s a harrowing proposition: that in attempting to manage drug costs for 67 million Medicare sufferers now, we would inadvertently stop the event of future medicine that might save lives. Implied, if not acknowledged outright, is that we’re placing a remedy for most cancers or Alzheimer’s or another intractable illness in jeopardy.

However we now have good causes to imagine that the present coverage gained’t have such a trade-off any time quickly. For one, pharma is massively worthwhile, and these negotiated costs, whereas doubtlessly chipping away at revenue margins, ought to hardly completely dampen the motivation to innovate, in keeping with a few key research of the trade. Two, if we’re frightened about future innovation, we must be targeted on making it cheaper to develop medicine – and that is truly one space the place AI is exhibiting promise. By figuring out the perfect candidates for potential therapies early within the analysis course of, we might velocity up improvement and proceed to cut back prices — with out shedding out on tomorrow’s breakthroughs.

We will afford to decrease drug costs

The argument in opposition to decreasing income often goes like this: The drug firms spend some huge cash creating medicine, together with some medicine that by no means make it to market as a result of they don’t show to be efficient. Once they do have a brand new, efficient drug to promote, they should make some huge cash to cowl their improvement prices after which some, to allow them to take the income and make investments more cash into analysis and improvement for the subsequent technology of medicines.

Most different rich international locations, like Australia and the UK, use the federal government’s central position of their well being care system to barter decrease costs whereas additionally fostering their very own medical innovation sectors. However within the US, earlier than the IRA’s provisions turned legislation, costs had been left extra to the free market and the person negotiating positions of producers, personal insurers, the federal government, and pharmacy profit managers. Varied rebates, kickbacks, and different financing mechanisms typically obfuscated and elevated People’ drug costs. Consequently, the US pays by far the very best prices for drugs on this planet.

On account of how a lot we pay, People usually get first dibs on new cures. However that early entry is just helpful if sufferers can afford the medicine. Too typically, they will’t.

However right here’s the factor: This entire premise is defective. When the Congressional Finances Workplace evaluated the invoice earlier than it handed, its analysts mentioned they didn’t anticipate a serious impact on future drug improvement. The necessity to cowl R&D prices doesn’t truly clarify, a minimum of not completely, the excessive prices for drugs charged in America, in keeping with a 2017 evaluation printed by Well being Affairs, a well being care analysis journal.

The analysis — from Memorial Sloan Kettering Most cancers Heart’s Nancy Yu, Zachary Helms, and Peter Bach — decided the surplus value paid within the US in comparison with different rich nations. They known as this value the American R&D “premium.” They then calculated how a lot income mentioned premium generated for the highest 15 drug producers on this planet and in contrast it to the businesses’ respective R&D spending.

A chart showing how much more Americans pay for prescription drugs than people in other countries do, from 25 percent to 75 percent more, varying by manufacturer.

Dylan Scott/Vox

They concluded different international locations had common drug record costs that had been 41 % of the online costs paid within the US. Massive Pharma reaped $116 billion in income in a single 12 months from these extra American costs. In the identical 12 months, drug makers spent $76 billion on R&D. These numbers counsel drug firms can afford avoiding such a premium. “There are billions of {dollars} left over even after worldwide analysis budgets are lined,” the authors wrote.

At a sure level, the expectation of decrease revenues might begin to cut back the trade’s willingness to put money into new medicine and make riskier bets with doubtlessly huge payoffs. However are we wherever close to that time? No matter objections these firms is perhaps elevating, it might be extra telling to look at what they do moderately than what they are saying.

Final 12 months, Richard Frank and Ro Huang on the Brookings Establishment appeared on the enterprise selections drug makers had made since negotiation provisions turned legislation. The researchers particularly thought-about mergers and acquisitions, the opposite means by which huge drug firms uncover new medicine (often by shopping for a promising start-up that has already carried out R&D).

Frank and Huang detected little proof that the drug firms had been anticipating an enormous blow to their revenues due to adjustments to the negotiation course of. If something, they discovered elevated transactions for medicine at each the early and late trial levels. Total M&A spending was not noticeably altered and a few current earnings studies had expressed optimism concerning the future.

This is smart: the IRA stipulated that Medicare’s negotiating authority be restricted and regularly phased in. For the primary 12 months, Medicare was permitted to choose 10 medicine for negotiations. Subsequent 12 months, this system can add one other 15 and one other 15 the 12 months after that.

Methods to make extra medicine shortly

We’ve a sound foundation to assume we are able to afford decrease costs for extra medicine. However nonetheless, it might be good if we might develop medicine extra shortly and subsequently extra cheaply. That would naturally decrease costs whereas nonetheless delivering new medicines to folks in want. Win-win.

There could also be methods to simplify the approval course of and the approval standards for extra medicine. Author Matt Yglesias lined some choices for Congress and the FDA to contemplate in his e-newsletter, together with being extra receptive to information from scientific trials performed in different international locations (the place trials can typically be carried out at much less expense).

However science is essentially the most daunting impediment to new medicine. It will probably take years for researchers to even determine how illnesses work, their organic foundation, and thereby hypothesize potential candidates for interventions. Transferring from the fundamental analysis that reveals these constructing blocks to the scientific trials that safe FDA approval can take a long time. The FDA solely components in when you’ve discovered one thing that truly works. That’s why huge drug firms do spend a lot on acquisitions; even with all their assets, there’s no assure the in-house scientists will discover a promising therapy candidate earlier than an out of doors researcher does.

One of the best ways to maximise our R&D assets, to get essentially the most bang for our buck after we arrange costly human trials, is to determine essentially the most promising candidates firstly. However we’re coping with an infinite quantity of knowledge: the library of genetics that each human being carries. Because of this drug builders are turning to AI for assist in sorting via it.

Main researchers on antibiotic resistance have educated computer systems to hunt in every single place, even in extinct animal DNA, for molecules that might be promising in treating micro organism which have develop into tough for standard medicines to deal with. Longevity proponents put an analogous religion in synthetic intelligence. New start-ups, resembling Recursion Prescribed drugs, profiled by STAT, have primarily based their whole enterprise on utilizing AI to search out potential drug candidates, together with amongst these sitting on the cabinets of Massive Pharma that might be repurposed for brand spanking new situations.

Whether or not these AI aspirations will repay remains to be unknown. However they supply one more reason for optimism.

Too typically, the drug pricing dialog is framed as an both/or. Both decrease costs or new cures, however not each. It’s a false selection.

Prime Tales: September 10 iPhone Occasion Anticipated, 2024 Mac Updates, and Extra

0


Apple’s annual iPhone occasion is developing shortly, and issues are beginning to agency up relating to what we would see and when.

top stories 24aug2024
Past the iPhone and different updates anticipated subsequent month, we’re additionally trying towards some Mac updates later within the yr whereas Apple seems to be shifting ahead on its tabletop robotic venture, so learn on under for all the small print!

Apple Anticipated to Debut iPhone 16, Apple Watch 10, and AirPods 4 on September 10

Apple plans to carry an occasion to introduce the iPhone 16 fashions, the next-generation Apple Watch fashions, and new AirPods on Tuesday, September 10, in response to Bloomberg‘s Mark Gurman.

iPhone 16 Camera Lozenge 2iPhone 16 Camera Lozenge 2
After the September 10 unveiling, the units will launch on Friday, September 20. With that timeline, we are able to anticipate new software program like iOS 18 and macOS Sequoia to come back out a couple of days forward of the September 20 {hardware} launch.

iPhone 16 Launch Is Subsequent Month – This is All the pieces We Know

With the iPhone 16 lineup being formally unveiled in just some weeks, we have recapped most of the rumors we have heard concerning the units, so test it out for a refresher as Apple’s large occasion approaches.

iPhone 16 Pro Sizes FeatureiPhone 16 Pro Sizes Feature
We’re anticipating larger sizes for the Professional fashions, a brand new Seize button, and an array of different enhancements. On the colour entrance, we’re anticipating a brand new bronze or gold shade probably referred to as Desert Titanium to exchange the Blue Titanium choice from the iPhone 15 Professional lineup.

Apple’s September Occasion: New Merchandise to Count on Past the iPhone 16

Whereas the iPhone is all the time the spotlight of Apple’s annual September occasions, the corporate usually makes quite a few different introductions and bulletins.

Apple Event October 2023Apple Event October 2023
We have rounded up what else we would see at subsequent month’s occasion, starting from new Apple Watch fashions to up to date AirPods and extra, so try our full checklist!

These New Macs Are Coming in 2024

With September anticipated to see the same old iPhone and Apple Watch focus, that does not imply Apple is ignoring the Mac lineup.

M4 Mac mini Silver Ortho CoolerM4 Mac mini Silver Ortho Cooler
In truth, Apple is anticipated to maneuver its whole Mac lineup to the M4 household of chips over the following ~12 months, with a number of fashions anticipated to see updates earlier than the top of this yr.

5 New Options within the iOS 18 Cellphone App

iOS 18 will see its public launch in nearly a month, and we’re persevering with our collection of articles taking a look at updates coming for particular person apps.

iOS 18 Phone App Feature 2iOS 18 Phone App Feature 2
One of many apps seeing vital updates is the Cellphone app, which can enable customers to report and transcribe calls, with units supporting Apple Intelligence additionally in a position to summarize transcriptions. You will additionally be capable to search your name historical past, see contact ideas whenever you begin typing numbers on the keypad, and extra.

First Plans for Apple’s Tabletop Robotic Noticed in Provide Chain

We have been listening to for a while about Apple’s work on a tabletop robotic, and it seems the venture is shifting ahead with a concentrate on sensible residence management, videoconferencing, and residential safety monitoring.

Apple Robot Thumb 3Apple Robot Thumb 3
Rumors have recommended the gadget might launch as quickly as 2026, and we’re already getting phrase about Apple’s provide chain gearing up to offer elements for it.

MacRumors E-newsletter

Every week, we publish an e-mail e-newsletter like this highlighting the highest Apple tales, making it an effective way to get a bite-sized recap of the week hitting the entire main matters we have coated and tying collectively associated tales for a big-picture view.

So if you wish to have high tales just like the above recap delivered to your e-mail inbox every week, subscribe to our e-newsletter!

How Protected Am I On-line?


“How protected am I on-line?”

Prospects typically ask us some model of this query. It’s a superb query, and within the previous, there was no direct reply — solely suggestions. For instance, we really useful on-line safety that goes past antivirus to incorporate id and privateness safety. We additionally promoted security greatest practices like utilizing multi-factor authentication. We questioned if there was a less complicated and simpler option to give individuals the perfect safety recommendation.

We adopted that up by asking our clients what was essential to them about on-line safety. We discovered that 74% of you have considerations about maintaining non-public on-line. One other 57% stated that they need extra management of their private data on-line. And extra broadly, 47% stated they need they felt safer basically. Merely put, clients are extra aware of their security on-line than ever earlier than, and desirous to play an lively position of their safety.

It’s time for a brand new method — meet the McAfee Safety Rating.

What is the McAfee Safety Rating?

Should you’re considering this appears to be like like a credit score, health, sleep, or any of the opposite scores we now use to visualize and quantify features of our life, you’re heading in the right direction.

Your personalised McAfee Safety Rating is a measure of your safety on-line. The upper your rating, the safer you’re on-line. Your rating highlights any weaknesses in your safety and helps you repair them with simple step-by-step directions. We’ll additionally let you realize which options haven’t been arrange so you will get essentially the most out of your safety.

McAfee Safety Rating is the straightforward option to perceive and act in your on-line safety.

Once we developed McAfee Safety Rating the concept was to give clients a easy resolution to higher defend themselves and get essentially the most from their subscription. That features providing safety tricks to defend their identities, privateness, and units, whereas additionally bettering their on-line habits. We needed it to be simple for anybody to:

  • Defend any weak spots – Personalised suggestions helps you enhance your safety and tackle any information breaches.
  • See how protected you’re on-line — Measure the energy of your on-line safety with a real-time analysis.
  • Make safety simple – Easy directions make it simple to arrange your safety so you will get essentially the most out of your subscription.
  • Get essentially the most out of your subscription — Ensure you’re absolutely using your McAfee on-line safety subscription — we’ll let you realize which options haven’t been arrange.

How do I enhance my McAfee Safety Rating?

Now that we’ve talked about McAfee Safety Rating typically, let’s have a look at the way it works in apply. Your rating relies on just a few issues, together with organising your McAfee safety, strengthening your safety with our security suggestions, and guaranteeing your private data is safely monitored with Id Safety.

For instance, in case your data is uncovered in a knowledge breach your rating may drop, however you may enhance it by following our easy-to-follow remediation steps. After you’ve accomplished these steps, your rating will return up and you’ll be assured realizing you’re higher protected on-line.

An ideal rating doesn’t imply you’re completely protected, however it does imply that you’re doing a superb job of stopping and managing dangers.

The place can I discover my McAfee Safety Rating?

You’ll find your McAfee Safety Rating in your browser on any system. There, you may assessment our steerage and enhance your rating from wherever you’re. McAfee Safety Rating marked a primary in on-line safety once we launched it. Since then, we’ve improved upon it by including extra personalization and accessibility — so you may take pleasure in your life on-line realizing precisely how protected you’re.

Introducing McAfee+

Id theft safety and privateness on your digital life



Saying the Generative AI World Cup: A World Hackathon by Databricks

0


Welcome to the Generative AI World Cup, a worldwide hackathon inviting contributors to develop modern Generative AI functions that remedy real-world issues. Members will compete for a pool of over 50,000 USD in complete money prizes, trophies, and passes for Information and AI Summit 2025.  Members will even get supplies to assist skill-up on Generative AI as a part of the hackathon course of. Learn on to study how one can take part and win!

Who Can Take part?

 The Generative AI World Cup has the next eligibility standards:

  • Members should maintain a knowledge or AI position of their group
  • Registration requires a company e-mail deal with
  • Groups should consist of two to 4 members
  • Databricks employees, companions, consultants, and college students usually are not eligible.
  • Members have to be 20 years outdated or above and reside in one of many eligible international locations (listed right here)

What to Create

Members are tasked with constructing a Generative AI utility that addresses a real-world drawback. Whether or not you might be an AI novice or a seasoned Python professional, this hackathon welcomes all talent ranges. Databricks will present studying content material, advisable datasets, and the place wanted, restricted free credit score (as much as 500$ per staff) in Databricks utilization.

Submission Necessities

To enter the competitors, groups should submit:

  • A demo video (3-5 minutes) showcasing their utility and answering key questions concerning the business use case, dataset, mannequin, and strategies used
  • A challenge description on Angelhacks, together with the hosted video and names of all teammates

The submission deadline is 5 PM PT on October 18, 2024.

Getting Began

To assist contributors succeed, Databricks gives a number of enablement periods:

  • Digital Onboarding Session: Out there on-demand, this session covers find out how to get began with Generative AI on Databricks 
  • Enablement/Workplace Hours (September 5, 2024 – October 11, 2024): These periods present ongoing help and sources
  • GenAI Coaching (valued at $750) to study from specialists on find out how to get your GenAI apps prepared

Judging Standards

Submissions will probably be evaluated primarily based on the next standards:

  • Creativity: Is the thought new and unique?
  • Enterprise Applicability: Does it remedy an actual enterprise drawback?
  • Information Relevance: Are related and fascinating datasets and instruments mixed successfully?
  • Thoroughness: Is the applying user-friendly and insightful?
  • Nicely-Architected: Can the applying scale effectively and accommodate extra options? Does it use superior GenAI strategies that customise basis fashions with enterprise knowledge (for instance RAG or Brokers)?

So that you assume you may hack?

Do not miss this chance to be a part of this world occasion! Register now and begin constructing your staff to tackle the Databricks Generative AI World Cup. We won’t wait to see your concepts in motion!

 

For extra data and to register, go to the official Generative AI World Cup web page.