Home Blog

ios – Switching tab and pushing to NavigationStack doesn’t present new View


I’ve a TabView with two tabs (FirstTab and SecondTab).

From the primary tab, I need to programmatically swap to the second tab after which instantly push a element display contained in the second tab’s NavigationStack.

I wrote a simplified instance:

struct FirstTab: View {
    var onNavigate: (String) -> Void

    var physique: some View {
        VStack {
            Textual content("FirstTab")

            Button("Go to SecondTab") {
                onNavigate("Whats up from FirstView")
            }
        }
    }
}


class SecondTabViewModel: ObservableObject {
    @Printed var textToShow: String? = nil
}

struct SecondTab: View {
    @ObservedObject var viewModel: SecondTabViewModel
    @State non-public var path = NavigationPath()

    var physique: some View {
        NavigationStack(path: $path) {
            VStack {
                Textual content("SecondTab")
            }
            .navigationDestination(for: String.self) { worth in
                DetailView(textual content: worth)
            }
            .onChange(of: viewModel.textToShow) { oldValue, newValue in
                print("onChange SecondTab textual content: (String(describing: newValue))")
                if let newValue = newValue, newValue != oldValue {
                    print("Pushing DetailView with: (newValue)")
                    path.append(newValue)
                }
            }
        }
    }
}

struct DetailView: View {
    let textual content: String

    var physique: some View {
        VStack {
            Textual content("DetailView")

            Textual content("Textual content: (textual content)")
        }
    }
}

struct ContentView: View {
    @State non-public var selectedTab = 0
    @StateObject non-public var secondVM = SecondTabViewModel()

    var physique: some View {
        TabView(choice: $selectedTab) {
            FirstTab { textual content in
                print("Closure referred to as with textual content: (textual content)")
                selectedTab = 1 // swap tab
                DispatchQueue.foremost.asyncAfter(deadline: .now() + 1) {
                    secondVM.textToShow = textual content
                }
            }
            .tabItem { Label("First", systemImage: "1.circle") }
            .tag(0)

            SecondTab(viewModel: secondVM)
                .tabItem { Label("Second", systemImage: "2.circle") }
                .tag(1)
        }
    }
}

The problem :

  • The closure is appropriately referred to as once I faucet the button in FirstTab.
  • The tab switches to SecondTab.
  • I anticipate the DetailView to mechanically push within the NavigationStack.

However nothing seems – onChange is named, however no push happens.

If I wrap the textToShow inside a DispatchQueue.foremost.asyncAfter (e.g. 0.1 seconds), it really works.

Instance of the workaround:

FirstTab { textual content in
    print("Closure referred to as with textual content: (textual content)")
    selectedTab = 1 // swap tab
    DispatchQueue.foremost.asyncAfter(deadline: .now() + 1) {
        secondVM.textToShow = textual content
    }
}

However this looks like a hack.

Why doesn’t the navigation push (path.append) work when switching tabs instantly?

Is there a beneficial, clear manner in SwiftUI to vary tab after which push a vacation spot in that tab’s NavigationStack?

Ought to I be utilizing a distinct navigation method (e.g. Coordinator, Observable shared state)?

UAE knowledge middle brings enhanced e mail safety to area


In response to speedy buyer progress and growing demand for in-region companies, we’re excited to announce the launch of a brand new Center East area for E-mail Menace Protection with the opening of our United Arab Emirates (UAE) web site. This native presence allows sooner menace detection, lowered latency, and a extra seamless expertise for patrons throughout the area. The UAE web site provides the total vary of e mail safety capabilities out there in our current areas and advantages from our iterative, incremental characteristic supply mannequin—whereas sustaining our rigorous requirements for safety, reliability, and knowledge privateness.

Cisco Secure Email Threat Defense region map. Regions include: North America, Europe, UAE, India, and Australia.Cisco Secure Email Threat Defense region map. Regions include: North America, Europe, UAE, India, and Australia.

As a part of our ongoing dedication to safety and compliance, E-mail Menace Protection is proud to be licensed for ENS Excessive and is actively pursuing extra certifications, together with ISO 27017, ISO 27018, and C5. These efforts construct on our current SOC 2 and ISO 27001 certifications, reinforcing our dedication to the very best requirements of knowledge safety and privateness.

E-mail Menace Protection analyzes practically 100 million emails daily, leveraging AI to guard 1000’s of consumers from the newest threats. Backed by over 20 years of expertise within the e mail gateway house, we’re bringing the following wave of innovation to e mail safety. Launching later this 12 months, our enhanced E-mail Menace Protection platform unifies a number of deployment modes right into a single, versatile answer providing pre-delivery menace prevention, post-delivery remediation by way of APIs, and full visibility throughout all instructions of e mail, multi function streamlined console, out there globally.

With the addition of our new UAE area, E-mail Menace Protection now operates in 5 areas globally increasing our attain whereas sustaining trusted, enterprise-grade safety in all places we serve. Along with offering in-region protection, we’re enhancing our detection capabilities to account for the distinctive linguistic nuances of the Center East. These refinements are actively being developed as we observe and reply to extra region-specific focused threats.

This launch within the UAE highlights Cisco’s dedication to empowering organizations with sturdy, scalable, and good e mail safety options that stand as much as the ever-changing menace panorama. By utilizing Cisco Safe E-mail Menace Protection, companies within the UAE can shield their communications, safeguard delicate knowledge, and preserve their operations operating easily with confidence.

Are you a buyer? Entry the UAE web site portal.

Wish to study extra about being an E-mail Menace Protection buyer? Begin your free trial immediately!


We’d love to listen to what you assume! Ask a query and keep linked with Cisco Safety on social media.

Cisco Safety Social Media

LinkedIn
Fb
Instagram
X

Share:



Understanding the code modernization conundrum


Like many giant enterprises, we should navigate the wonder and chaos of legacy code. In our case, a long time of SQL procedures and enterprise logic that underpin a platform able to dealing with over 3 million concurrent customers and a whole lot of micro code deployments per week. It’s a posh machine. Contact one half, and also you danger breaking 10 others. That’s why modernizing the codebase is each a technical problem and a human one. It requires empathy, belief, and the power to make knowledgeable guesses.

Contained in the Innovation Engine

At bet365, the platform innovation perform was established to impress risk. We’re a small, specialised group charged with exploring rising and future applied sciences. Our intention is to determine the place they will have the best influence, and assist the broader group perceive find out how to use them meaningfully.

We’re enablers and ambassadors for change. Our work spans the whole lot from product improvement and cybersecurity to the way forward for the workforce. Our guiding mannequin is McKinsey’s Three Horizons of Development reimagined for innovation. Horizon 1 focuses on what we are able to implement in the present day. Horizon 2 explores what’s coming subsequent. Horizon 3 dares us to think about the longer term nobody is speaking about but.

This framework helps us steadiness ambition with pragmatism. It creates area to experiment with out shedding sight of operational worth, and it ensures our builders, architects, and stakeholders are all a part of the identical dialog.

When GenAI Met Builders

When GPT-4 dropped in 2023, the whole lot modified. Like most within the tech world, we have been fascinated. Generative AI supplied a tantalizing imaginative and prescient of the longer term crammed with quicker insights, on the spot summaries, and automatic refactoring. However the pleasure shortly gave strategy to doubt. We handed very succesful builders a robust LLM and stated, “Go for it.” The outcomes have been combined at finest.

They inserted code into the immediate home windows, stripped out context to save lots of area, and hoped the AI would perceive. It didn’t. Builders have been confused, pissed off, and, understandably, skeptical. They noticed the AI as a shortcut, not a associate, and when the output didn’t match expectations, frustration adopted. Many requested the identical query: “Why am I asking a machine to write down code I may simply write myself?”

What we realized was profound. The issue wasn’t the AI. It was the connection between the AI and the individual utilizing it. We had assumed that talent in software program engineering would robotically translate to talent in immediate engineering. It didn’t. Did we miss one thing? The purpose we couldn’t overlook was through the train, our builders have been finishing the duties persistently round 80% of estimated time. There was positively one thing right here. We simply weren’t positive what it was.  So, we went again to fundamentals.

Vibe Coding and the Limits of Belief

There’s a brand new time period in developer tradition: “vibe coding.” It’s the place you throw a bit of code at an LLM, get a response, tweak it, throw it again. Iterate quick. Ship quicker. It’s fashionable. It’s seductive. But it surely isn’t danger free.

With out a clear understanding of intention or context, vibe coding can shortly change into a recreation of trial and error. And when your system is as advanced as ours – many databases processing 500,000 transactions a second – “trial and error” isn’t adequate. We would have liked greater than vibes. We would have liked imaginative and prescient.

Context Over Content material

The turning level got here once we realized the true job wasn’t instructing AI find out how to write higher code. It was instructing people find out how to talk with AI. We realized a brand new mantra: intention + context + element. That’s what the AI wants. Not simply content material. Not simply “repair this perform.” However: “Right here’s what this code does, right here’s why it issues, and right here’s what I want it to change into.” This perception is essential.

Our builders, particularly these tackling essentially the most advanced, interdependent issues, tailored shortly. They have been used to considering deeply, offering rationale, and navigating ambiguity. They obtained it. They fed the AI what it wanted. They flourished. The distinction was mindset. We got here to name this phenomenon “the unreliable narrator.” Not simply the AI, however the developer. As a result of usually, the issue wasn’t that the machine obtained it unsuitable. It was at instances that we weren’t clear on what we have been asking.

RAG, GraphRAG, and the Energy of Grounded Context

To construct dependable, human-aligned AI assist we wanted a strategy to floor what the AI was seeing in truth. That’s the place we noticed the facility of Retrieval-Augmented Technology (RAG). RAG permits an AI mannequin to retrieve related context from an exterior supply – like documentation, system metadata, or a data base – earlier than producing a response. It’s quicker to implement and extra versatile than fine-tuning, making it excellent for dynamic, domain-intensive environments like ours. Builders can replace the data base with out retraining the mannequin, preserving outputs present and grounded.

However RAG has its limits. When a query spans a number of methods or requires reasoning throughout disconnected items of knowledge, conventional RAG, which is predicated on textual content similarity, begins to falter. That’s why we turned to GraphRAG, a extra superior strategy that makes use of a data graph to reinforce LLM outputs.

A data graph doesn’t simply maintain info, it encodes relationships. It captures how elements work together, the place dependencies lie, and what may break for those who change one thing. GraphRAG makes use of this construction to reinforce prompts at question time, giving the AI the relational context it must reply with precision. That is very true in environments the place accuracy is essential, and hallucinations are unacceptable.

As a real-world train, we checked out our SQL server property. We wished to construct a system that we may use to realize worthwhile perception on how the system works.

To construct it, we began by parsing all our database objects together with tables, views, procedures, capabilities, and many others. into summary syntax timber (ASTs). Utilizing Microsoft’s ScriptDOM, we extracted key info and used them to assemble the preliminary data graph. We overlaid this with pure language descriptions to additional clarify what every aspect did, and added runtime statistics like execution frequency, CPU time, and skim volumes.

The consequence was a wealthy, relational illustration of our SQL property, full with contextual insights about how objects are consumed and the way they work together. Then we surfaced this intelligence to builders via three core instruments:

  1. A chatbot that lets customers question the system in plain language
  2. A visualiser that renders a 3D map of dependencies and relationships
  3. A Cypher executor for superior graph querying and evaluation

What’s vital to notice is that many of the system’s worth lies within the graph, not the mannequin. The AI doesn’t must know the whole lot. It simply must know the place to look, and find out how to ask the precise questions. That’s the facility of grounding.

For us, GraphRAG wasn’t only a nice-to-have, it turned important. It helped us transfer from generic code help to one thing way more worthwhile: a system that understands what our code means, the way it behaves, and what it impacts.

We’re not simply writing code anymore. We’re curating it. We’re shaping the intentions behind it. Our builders now have tooling to realize additional perception to change into code reviewers, system designers, and transformation brokers at an skilled stage throughout large division spanning architectures. All from a easy interface permitting pure language inquiries That’s the true shift. The long run isn’t about AI doing our jobs. It’s about reimagining what the job is.

The success of our code modernization program has little to do with algorithms and the whole lot to do with perspective. We needed to unlearn previous habits, rethink our relationship with code, and embrace a tradition of curiosity. We needed to cease asking AI for solutions and begin giving it the precise questions. The expertise was the straightforward half. The individuals half, now that was the true breakthrough.

Globally, over 2.5 million COVID deaths prevented worldwide because of vaccines – NanoApps Medical – Official web site


Due to vaccinations towards SARS-CoV-2 within the interval 2020–2024, 2.533 million deaths have been prevented on the international degree; one dying was prevented for each 5,400 doses of vaccine administered.

Some 82% of the lives saved by vaccines concerned folks vaccinated earlier than encountering the virus, 57% through the omicron interval, and 90% concerned folks aged 60 years and older. In all, vaccines have saved 14.8 million years of life (one 12 months of life saved for 900 doses of vaccine administered).

These are a few of the knowledge launched in an unprecedented research printed within the journal Jama Well being Discussion board and coordinated by Prof. Stefania Boccia, Professor of Basic and Utilized Hygiene at Università Cattolica, with contributions from Dr. Angelo Maria Pezzullo, researcher generally and utilized hygiene, and Dr. Antonio Cristiano, a medical resident in hygiene and preventive medication.

The 2 researchers spent a interval at Stanford College, collaborating straight with the group of Professor John P.A. Ioannidis, director of the Meta-Analysis Innovation Heart (METRICS), within the context of the mission “European community employees eXchange for integrAting precision well being within the well being Care sysTems- ExACT.”

Professor Boccia and Dr. Pezzullo clarify, “Earlier than ours, a number of research tried to estimate lives saved by vaccines with totally different fashions and in numerous durations or components of the world, however this one is essentially the most complete as a result of it’s based mostly on worldwide knowledge, it additionally covers the omicron interval, it additionally calculates the variety of years of life that was saved, and it’s based mostly on fewer assumptions concerning the pandemic development.”

The consultants studied worldwide inhabitants knowledge, making use of a collection of statistical strategies to determine who among the many individuals who grew to become sick with COVID did both earlier than or after getting vaccinated, earlier than or after the omicron interval, and what number of of them died (and at what age).

“We in contrast this knowledge with the estimated knowledge modeled within the absence of COVID vaccination and have been then in a position to calculate the numbers of people that have been saved by COVID vaccines and the years of life gained on account of them,” Dr. Pezzullo explains.

It additionally turned out that a lot of the saved years of life (76%) concerned folks over 60 years of age, however residents in long-term care amenities contributed solely 2% of the whole quantity. Kids and adolescents (0.01% of lives saved and 0.1% of life years saved) and younger adults aged 20–29 (0.07% of lives saved and 0.3% of life years saved) contributed little or no to the whole profit.

Professor Boccia concludes, “These estimates are considerably extra conservative than earlier calculations that targeted primarily on the primary 12 months of vaccination, however clearly display an necessary total profit from COVID-19 vaccination over the interval 2020–2024.

“Many of the advantages, by way of lives and life-years saved, have been secured for a portion of the worldwide inhabitants who’re usually extra fragile, the aged.”

Extra info: International Estimates of Lives and Life-Years Saved by COVID-19 Vaccination Throughout 2020-2024, JAMA Well being Discussion board (2025).

Handle knowledge middle power consumption with good options


As AI, cryptocurrencies, and different resource-intensive applied sciences develop into mainstream, knowledge facilities are reaching unprecedented ranges of power consumption. With knowledge middle electrical energy consumption anticipated to greater than double by 2030, in keeping with the Worldwide Power Company, clever power effectivity has develop into a prime precedence for knowledge middle operators.

Clever power administration is about measuring, monitoring, and optimizing power consumption to unlock value financial savings, improve operational effectivity, and help vital scalability for AI and crypto workloads. It’s additionally very important for compliance with evolving laws and for demonstrating enterprise resilience via sustainable practices.

Let’s check out how investing in scalable, high-performance digital infrastructure and clever knowledge middle power administration may also help knowledge facilities meet efficiency calls for and power consumption objectives.

“Cisco presents industry-leading power administration via clever software program, environment friendly {hardware}, and insights all through its product vary, powered by international real-time knowledge concerning the carbon emissions of electrical energy … We’re proud to associate with Cisco to proceed pushing the boundaries for carbon-aware know-how and next-generation power administration.”
Olivier Corradi, Founder, CEO of Electrical energy Maps

1. Actual-time power monitoring and optimization

For knowledge middle operators, gaining granular insights into power consumption is essential for availability, value management, manageability, and compliance. We’re creating pointers with over 4 many years of networking experience to ship a extra complete and correct measurement method—particularly designed for advanced knowledge middle environments.

This enhanced methodology permits knowledge middle operators to ascertain an power administration baseline with visibility and reporting throughout 5 standardized metrics:

  • Power consumption (kWh)
  • Whole greenhouse gasoline (GHG) emissions (metric ton of CO2e)
  • Carbon depth (grams of CO2e per kWh)
  • Power value (USD)
  • Power combine (% from low carbon power sources)

Knowledge middle groups can entry this actionable knowledge via platforms like Cisco Nexus Dashboard, and so they can leverage Cisco Splunk to detect anomalies, lower prices, and plan for a extra energy-efficient digital future.

To simplify buying selections and reinforce our dedication to power optimization, up to date product knowledge sheets will function clear, constant sustainability profiles. Importantly, a few of our knowledge middle switches are actually ENERGY STAR®- and EPEAT-certified, serving to clients drive ROI selections, preserve compliance, and advance sustainability objectives.

2. Actual-time optimization and suggestions with AI

Reliability and efficiency are vital in knowledge facilities. Actual-time monitoring and superior analytics will present actionable insights that may assist cut back power utilization and prices, contributing on to manageability. These insights will embrace alerts for uncommon energy spikes, identification of underutilized (“zombie”) servers, and clever energy-saving suggestions—corresponding to good energy distribution models (PDUs) and server consolidation.

This may assist knowledge middle groups optimize power consumption for scalability and cost-effectiveness as resource-intensive workloads develop in dimension and complexity. With predictive analytics, AI-driven instruments, and state of affairs planning, directors will be capable to take exact, data-driven actions tailor-made to their distinctive power wants—driving steady resilience and availability.

3. Dynamic power effectivity and management

Knowledge middle operators want flexibility and manageability to adapt to evolving calls for, particularly with AI workloads. We’re pioneering efforts to combine power monitoring, power coverage, and associate ecosystem interoperability into an extensible, scalable, and simple resolution for knowledge facilities.

This good energy framework will ship constant energy administration modes throughout Cisco units, together with out-of-box delivery mode, efficiency mode, and low-power mode. This may allow knowledge middle groups to automate workflows and make knowledgeable selections about power efficiency tradeoffs inside their networks, guaranteeing optimum efficiency for vital AI knowledge middle workloads whereas successfully managing power consumption.

“You possibly can’t repair an issue you’ll be able to’t see. Establishing a reputable baseline is the muse to creating any progress. Cisco’s power administration technique empowers clients to handle power consumption by offering visibility, insights, and automation. This development continues to develop extra pressing with the AI revolution.”
Denise Lee, Vice President, Cisco Engineering Sustainability Workplace

Unmatched visibility with clever power administration

Our power administration technique displays a deep dedication to innovation and sustainability within the knowledge middle. With enhanced energy measurement capabilities, actionable insights, and built-in controls, we’re pioneering the best way for a extra sustainable and clever digital future.

This empowers knowledge middle clients to:

  • cut back operational and capital bills
  • improve enterprise resilience
  • enhance safety
  • maximize ROI for AI infrastructure
  • enhance power availability via extra environment friendly utilization

With greater than 40 years of management in safe networking, we’re redefining power administration as a strategic enabler for knowledge middle modernization. By way of unmatched visibility, embedded intelligence, and AI-driven automation, this complete method will contribute to a stronger ROI for knowledge middle investments—supporting our clients’ objectives for effectivity, sustainability, and long-term success.

 

Share: