Home Blog Page 2

ios – Learn how to name an API at precisely 00 and half-hour each hour in Swift?


I’m making an attempt to implement a repeating API name in my iOS app (Swift), and I would like the decision to occur at precisely 00 and half-hour of each hour (e.g., 1:00, 1:30, 2:00, and so on.).

  • On launch (when app is in foreground), I wish to make the primary API name to examine if a slot is offered.
  • Then, I wish to schedule the API to run at each hour and half-hour mark.
  • This must be correct to the clock (not simply each 1800 seconds), so the API ought to hearth precisely at hh:00 and hh:30.

Utilizing this strategy, the API is known as 30–40 occasions per minute inside a single view controller. The API name is triggered from a customized navigation bar (ENavigationBar), which is subclass of UIView.

func scheduleFunctionCall() {
    if UIApplication.shared.applicationState == .background { return }

    // We examine the physician appointment the primary time to see if it is obtainable.
    self.drTimer?.invalidate()
    self.drTimer = nil
    
    if !GlobalConstant.appCONSTANT.isDrAppointmentCheckedFirstTime {
        checkDrAppointmentAvailable()
    } else {
        if GlobalConstant.appCONSTANT.roomName != "" {
            showNeedHelpDrButton()
        } else {
            hideNeedHelpDrView()
        }
    }

    // Get the present time
    let calendar = Calendar.present
    let now = Date()
    let minute = calendar.part(.minute, from: now)
    let second = calendar.part(.second, from: now)
    var fireInSeconds: TimeInterval = 0

    if minute < 1 || (minute >= 31 && minute < 32) {
        // If it is already at :00 or :30, simply look ahead to the subsequent second alignment
        fireInSeconds = TimeInterval(60 - second)
    } else if minute < 31 {
        fireInSeconds = TimeInterval((31 - minute) * 60 - second)
    } else {
        fireInSeconds = TimeInterval((61 - minute) * 60 - second)
    }

    Timer.scheduledTimer(withTimeInterval: fireInSeconds, repeats: false) { _ in
        self.checkDrAppointmentAvailable()
        
        // Now arrange the repeating timer each half-hour
        self.drTimer = Timer.scheduledTimer(withTimeInterval: 1800, repeats: true) { _ in
            self.checkDrAppointmentAvailable()
            let nextMinute = minute < 31 ? "00" : "30"
            print("Operate known as at (calendar.part(.hour, from: Date())):(nextMinute)")
        }
    }
}

Knowledge neutrality: Safeguarding your AI’s aggressive edge



I not too long ago had a dialogue on this matter with Amith Nair, world vp and basic supervisor of AI service supply for TELUS Digital, one of many main, world suppliers of AI infrastructure and providers. Nair reaffirmed the significance of knowledge: “Knowledge is the core of every little thing that occurs in AI, for all foundational mannequin makers and anybody who’s constructing knowledge purposes for AI.”

“With regards to AI, we will give it some thought like a layer cake,” Nair mentioned with regard to infrastructure and the affect on knowledge. “On the backside there’s a computational layer, such because the NVIDIA GPUs, anybody who supplies the infrastructure for working AI. The following few layers are software-oriented, but in addition impacts infrastructure as properly. Then there’s safety and the information that feeds the fashions and those who feeds the purposes. And on high of that, there’s the operational layer, which is the way you allow knowledge operations for AI. Knowledge being so foundational implies that whoever works with that layer is basically holding the keys to the AI asset, so, it’s crucial that something you do round knowledge has to have a degree of belief and knowledge neutrality.”

Knowledge neutrality as a aggressive necessity

Inside this consolidating economic system, neutrality of knowledge has advanced from a fascinating facet to an outright aggressive crucial. For any group engaged within the building of AI fashions, guarding of enterprise pursuits and mannequin independence are vital to establishing and preserving a aggressive edge. The dangers in having widespread knowledge infrastructure, significantly with these which are direct or oblique opponents, are important. When proprietary coaching knowledge is transplanted to a different platform or service of a competitor, there may be at all times an implicit, however regularly refined, threat that proprietary insights, distinctive patterns of knowledge and even the operational knowledge of an enterprise can be unintentionally shared.

This downside is not essentially one of unhealthy intentions however potential for use of such knowledge to gasoline or inform the event of various fashions, even aggregated or anonymized utilization patterns.

The implications of this lengthen all through the complete life cycle of AI:

  • Mannequin creation: Sources of non-neutral knowledge can threat injecting nuance biases into the supply knowledge from which fashions are created and might doubtlessly bias leads to favor of the supplier of knowledge. 
  • Coaching: The high quality and effectivity of coaching fashions may be negatively impacted if entry to the information or processing energy is preferentially granted to sure firms.
  • Deployment methods: The power to deploy fashions with no concern for knowledge provenance or the threat of mental property leak is one of the most important drivers of market belief and acceptance.

Finally, knowledge neutrality ensures a company’s proprietary AI fashions are saved that manner, taking solely their very own knowledge, thereby defending their mental property and long-term market place.

Electron and Desktop App Engineering with Shelley Vohr


Electron is a framework for constructing cross-platform desktop functions utilizing internet applied sciences like JavaScript, HTML, and CSS. It permits builders to package deal internet apps with a native-like expertise by bundling them with a Chromium browser and Node.js runtime. Electron is extensively used for apps like VS Code, Discord, and Slack as a result of it permits a single codebase to run on Home windows, macOS, and Linux.

Shelley Vohr is a Principal Software program Engineer at Microsoft the place she works on Electron. She joins the podcast with Josh Goldberg to speak about her work on the Electron mission.

Josh Goldberg is an unbiased full time open supply developer within the TypeScript ecosystem. He works on initiatives that assist builders write higher TypeScript extra simply, most notably on typescript-eslint: the tooling that allows ESLint and Prettier to run on TypeScript code. Josh often contributes to open supply initiatives within the ecosystem reminiscent of ESLint and TypeScript. Josh is a Microsoft MVP for developer applied sciences and the creator of the acclaimed Studying TypeScript (O’Reilly), a cherished useful resource for any developer looking for to be taught TypeScript with none prior expertise exterior of JavaScript. Josh often presents talks and workshops at bootcamps, conferences, and meetups to share information on TypeScript, static evaluation, open supply, and normal frontend and internet improvement.

Sponsors

APIs are the muse of dependable AI – and dependable APIs begin with Postman. Trusted by 98% of the Fortune 500, Postman is the platform that helps over 40 million builders construct and scale the APIs behind their most important enterprise workflows.

With Postman, groups get centralized entry to the most recent LLMs and APIs, MCP help, and no-code workflows, multi function platform. Shortly combine crucial instruments and construct multi-step brokers with out writing a single line of code.

Begin constructing smarter, extra dependable brokers right now. Go to postman.com/sed to be taught extra.

This episode is sponsored by Mailtrap – an E-mail Platform builders love.

Go for quick electronic mail supply, excessive inboxing charges, and dwell 24/7 professional help.

Get 20% off for all plans with our promo code SEDAILY.

Test the small print within the description under.

Ultrasmall optical gadgets rewrite the principles of sunshine manipulation


Ultrasmall optical gadgets rewrite the principles of sunshine manipulation

by Elizabeth A. Thomson | Supplies Analysis Laboratory

Boston MA (SPX) Aug 05, 2025






Within the push to shrink and improve applied sciences that management gentle, MIT researchers have unveiled a brand new platform that pushes the boundaries of contemporary optics by way of nanophotonics, the manipulation of sunshine on the nanoscale, or billionths of a meter.



The result’s a category of ultracompact optical gadgets that aren’t solely smaller and extra environment friendly than present applied sciences, but additionally dynamically tunable, or switchable, from one optical mode to a different. Till now, this has been an elusive mixture in nanophotonics.



“This work marks a major step towards a future by which nanophotonic gadgets will not be solely compact and environment friendly, but additionally reprogrammable and adaptive, able to dynamically responding to exterior inputs. The wedding of rising quantum supplies and established nanophotonics architectures will certainly carry advances to each fields,” says Riccardo Comin, MIT’s Class of 1947 Profession Growth Affiliate Professor of Physics and chief of the work. Comin can also be affiliated with MIT’s Supplies Analysis Laboratory and Analysis Laboratory of Electronics (RLE).



Comin’s colleagues on the work are Ahmet Kemal Demir, an MIT graduate pupil in physics; Luca Nessi, a former MIT postdoc who’s now a postdoc at Politecnico di Milano; Sachin Vaidya, a postdoc in RLE; Connor A. Occhialini PhD ’24, who’s now a postdoc at Columbia College; and Marin Soljacic, the Cecil and Ida Inexperienced Professor of Physics at MIT.



Demir and Nessi are co-first authors of the Nature Photonics paper.

Towards new nanophotonic supplies

Nanophotonics has historically relied on supplies like silicon, silicon nitride, or titanium dioxide. These are the constructing blocks of gadgets that information and confine gentle utilizing constructions akin to waveguides, resonators, and photonic crystals. The latter are periodic preparations of supplies that management how gentle propagates, very similar to how a semiconductor crystal impacts electron movement.



Whereas extremely efficient, these supplies are constrained by two main limitations. The primary includes their refractive indices. These are a measure of how strongly a cloth interacts with gentle; the upper the refractive index, the extra the fabric “grabs” or interacts with the sunshine, bending it extra sharply and slowing it down extra. The refractive indices of silicon and different conventional nanophotonic supplies are sometimes modest, which limits how tightly gentle might be confined and the way small optical gadgets might be made.



A second main limitation of conventional nanophotonic supplies: as soon as a construction is fabricated, its optical conduct is basically fastened. There’s normally no approach to considerably reconfigure the way it responds to gentle with out bodily altering it. “Tunability is important for a lot of next-gen photonics purposes, enabling adaptive imaging, precision sensing, reconfigurable gentle sources, and trainable optical neural networks,” says Vaidya.

Introducing chromium sulfide bromide

These are the longstanding challenges that chromium sulfide bromide (CrSBr) is poised to unravel. CrSBr is a layered quantum materials with a uncommon mixture of magnetic order and robust optical response. Central to its distinctive optical properties are excitons: quasiparticles shaped when a cloth absorbs gentle and an electron is worked up, abandoning a positively charged “gap.” The electron and gap stay certain collectively by electrostatic attraction, forming a kind of impartial particle that may strongly work together with gentle.



In CrSBr, excitons dominate the optical response and are extremely delicate to magnetic fields, which suggests they are often manipulated utilizing exterior controls.



Due to these excitons, CrSBr displays an exceptionally massive refractive index that permits researchers to sculpt the fabric to manufacture optical constructions like photonic crystals which are as much as an order of magnitude thinner than these constructed from conventional supplies. “We will make optical constructions as skinny as 6 nanometers, or simply seven layers of atoms stacked on prime of one another,” says Demir.



And crucially, by making use of a modest magnetic discipline, the MIT researchers had been capable of repeatedly and reversibly change the optical mode. In different phrases, they demonstrated the power to dynamically change how gentle flows by way of the nanostructure, all with none transferring components or adjustments in temperature. “This diploma of management is enabled by a large, magnetically induced shift within the refractive index, far past what is usually achievable in established photonic supplies,” says Demir.



Actually, the interplay between gentle and excitons in CrSBr is so sturdy that it results in the formation of polaritons, hybrid light-matter particles that inherit properties from each elements. These polaritons allow new types of photonic conduct, akin to enhanced nonlinearities and new regimes of quantum gentle transport. And in contrast to typical programs that require exterior optical cavities to succeed in this regime, CrSBr helps polaritons intrinsically.



Whereas this demonstration makes use of standalone CrSBr flakes, the fabric may also be built-in into present photonic platforms, akin to built-in photonic circuits. This makes CrSBr instantly related to real-world purposes, the place it could function a tunable layer or element in in any other case passive gadgets.



The MIT outcomes had been achieved at very chilly temperatures of as much as 132 kelvins (-222 levels Fahrenheit). Though that is under room temperature, there are compelling use instances, akin to quantum simulation, nonlinear optics, and reconfigurable polaritonic platforms, the place the unparalleled tunability of CrSBr might justify operation in cryogenic environments.



In different phrases, says Demir, “CrSBr is so distinctive with respect to different widespread supplies that even happening to cryogenic temperatures shall be definitely worth the bother, hopefully.”



That mentioned, the crew can also be exploring associated supplies with increased magnetic ordering temperatures to allow comparable performance at extra accessible circumstances.



This work was supported by the U.S. Division of Power, the U.S. Military Analysis Workplace, and a MathWorks Science Fellowship. The work was carried out partially at MIT.nano.



Analysis Report:“Tunable nanophotonic gadgets and cavities primarily based on a two-dimensional magnet”


Associated Hyperlinks

Supplies Analysis Laboratory

Stellar Chemistry, The Universe And All Inside It



Broadcom expands AI networking portfolio with Jericho4 Ethernet cloth router



Based on Broadcom, a single Jericho4 system can scale to 36,000 HyperPorts, every working at 3.2 Tbps, with deep buffering, line-rate MACsec encryption, and RoCE transport over distances larger than 100 kilometers.

HBM powers distributed AI

Bettering on earlier designs, Jericho4’s use of HBM can considerably enhance whole reminiscence capability and scale back the facility consumed by the reminiscence I/O interface, enabling sooner information processing than conventional buffering strategies, in line with Lian Jie Su, chief analyst at Omdia.

Whereas this will likely elevate prices for information heart interconnects, Su stated higher-speed information processing and switch can take away bottlenecks and enhance AI workload distribution, growing utilization of knowledge facilities throughout a number of places.

“Jericho4 could be very completely different from Jericho3,” Su stated. “Jericho4 is designed for long-haul interconnect, whereas Jericho3 focuses on interconnect inside the identical information heart. As enterprises and cloud service suppliers roll out extra AI information facilities throughout completely different places, they want secure interconnects to distribute AI workloads in a extremely versatile and dependable method.”

Others identified that Jericho4, constructed on Taiwan Semiconductor Manufacturing Firm’s (TSMC) 3‑nanometer course of, will increase transistor density to assist extra ports, built-in reminiscence, and larger energy effectivity, options that could be crucial for dealing with giant AI workloads.

“It allows unprecedented scalability, making it supreme for coordinating distributed AI processing throughout expansive GPU farms,” stated Manish Rawat, semiconductor analyst at TechInsights. “Built-in HBM facilitates real-time, localized congestion administration, eradicating the necessity for advanced signaling throughout nodes throughout high-traffic AI operations. Enhanced on-chip encryption ensures safe inter-data heart site visitors with out compromising efficiency.”