11.4 C
New York
Friday, March 28, 2025
Home Blog Page 13

ios – Why do many @State Variables freeze System, however not Simulator?


I had this downside for a really very long time and even requested about it earlier than. However now I’ve rather more proof and even a workaround, however the underlying downside just isn’t clear to me. The issue is:
I’ve two views with many State Variables (as they’ve to carry many data, as soon as for creating DataModels from that Enter and one other one is a fancy timer with many choices). They run nice, till I attempt to add a @State Date Variable. After I try this, they nonetheless run within the Simulator on my MacBook, however on my iPhone 11Pro they freeze as quickly as that View tries to load.

After quite a lot of analysis it appeared that the System will get overwhelmed attempting to initialise all these State Variables. Because the MacBook has extra sources it will not freeze.

Throughout that analysis I additionally discovered a workaround, which apparently takes the init of the Date out of the preliminary pipeline and abruptly it really works flawlessly.

class TimerManager: ObservableObject {
    var endDate: Date = Date.now 
}

I additionally did some exams to actually get on the bottom of this behaviour. It took quite a lot of effort and time to rename all variables within the Code. All of them nonetheless froze, which appears that regardless of what number of State Variables I take advantage of, the issue is simply the @State Date. Whereas testing a standard easy view may maintain a State Date Var, however not my extra complicated views.

Right here is the related Code and the exams:

Working Code:

import SwiftUI
import SwiftData
import AVFoundation     /// For enjoying again the Audio
import AVKit            /// For the AirPlay Button
import MediaPlayer      /// For getting the Quantity Slider hooked up to the units quantity.
import CoreHaptics      /// For making vibrations as soon as the timer is run out


/// Light-weight class to carry endDate
class TimerManager: ObservableObject {
    var endDate: Date = Date.now
}

struct TapasTimerView: View {
    
    /// Atmosphere Objects
    @EnvironmentObject var userStat: StatisticsObject       /// Var to maintain observe of seconds utilizing the Timer
    @EnvironmentObject var envObject: EnvObject             /// For getting FullDarkness, vibrateTimer
    @Atmosphere(.dismiss) var dismiss                     /// To have the ability to dismiss the view
    @Atmosphere(.scenePhase) var scenePhase               /// Var to maintain observe of state of app, to restart HapticEngine and others
    
    /// Binding vars getting from the View Calling this View
    @State var strategies: [TapasAsana]
    @State var sort: timerType
    @State var recoupExecutions: Int
    
    /// Variables for the Timer
    @State personal var timerSeconds = 0                 /// The precise seconds of the timer
    //@State personal var endDate = Date.now                 /// The dates used for having the timer
    @StateObject personal var timerManager = TimerManager()
    
    @State personal var countUp = 0                      /// For counting up executions of Technique
    @State personal var countGoal = 100000               /// The Objective of Executions is together with the Recoups
    @State personal var timerRunning = true              /// Var to set and see if timer is working
    
    /// All Sound associated Variables
    @State personal var gongSound: AVAudioPlayer?        /// The Sound of the timer
    @State personal var silentPlayer: AVAudioPlayer?     /// The silent sound holding the machine lively
    @State personal var methodSound: AVAudioPlayer?      /// The Technique Voice
    @State personal var musicSound: AVAudioPlayer?       /// The Sound of the Music
    @State personal var randomMusicIndex = 0             /// For selecting our random music
    @State personal var musicName = "Loading..."
    
    @State personal var yin = false              /// Are we in Yin execution of polar Asana?
    @State personal var yang = false             /// Are we in Yang execution of polar Asana?
    
    /// Variables for the Vibration
    @State personal var engine: CHHapticEngine?  /// The article creating the vibrations afterward
    
    /// For exhibiting the TabBar in time
    @State personal var showNavigationBar = false
    
    /// Storing our Activity of shutting display screen off
    @State personal var idleTimerTask: Activity?
    
    /// Animation variables
    @State personal var executedButtonColor: Shade = .clear

Then I attempted to place the endDate Var in a easy struct and it nonetheless froze:

struct TimerManager {
    var endDate: Date = Date.now
}

And the ultimate take a look at was to place many State Varsity into an Observable Object and attempting to place the endDate Var immediately as a State Var, the App nonetheless froze on machine:

class TestManager: ObservableObject {
    var timerSeconds: Int = 0
    var countUp: Int = 0
    var countGoal: Int = 100000
    var timerRunning: Bool = true
    var gongSound: AVAudioPlayer?
    var silentPlayer: AVAudioPlayer?
    var methodSound: AVAudioPlayer?
    var musicSound: AVAudioPlayer?
    var yin: Bool = false
    var yang: Bool = false
}

struct TapasTimerView: View {
    
    /// Atmosphere Objects
    @EnvironmentObject var userStat: StatisticsObject       /// Var to maintain observe of seconds utilizing the Timer
    @EnvironmentObject var envObject: EnvObject             /// For getting FullDarkness, vibrateTimer
    @Atmosphere(.dismiss) var dismiss                     /// To have the ability to dismiss the view
    @Atmosphere(.scenePhase) var scenePhase               /// Var to maintain observe of state of app, to restart HapticEngine and others
    
    /// Binding vars getting from the View Calling this View
    @State var strategies: [TapasAsana]
    @State var sort: timerType
    @State var recoupExecutions: Int
    
    @State personal var endDate = Date.now                 /// The dates used for having the timer

    @StateObject personal var testManager = TestManager()
    
    
    @State personal var randomMusicIndex = 0             /// For selecting our random music
    @State personal var musicName = "Loading..."
    
    
    /// Variables for the Vibration
    @State personal var engine: CHHapticEngine?  /// The article creating the vibrations afterward
    
    /// For exhibiting the TabBar in time
    @State personal var showNavigationBar = false
    
    /// Storing our Activity of shutting display screen off
    @State personal var idleTimerTask: Activity?
    
    /// Animation variables
    @State personal var executedButtonColor: Shade = .clear
    
    var physique: some View {

I’m comfortable for the workaround, however I do not appear to know what’s going on right here. Are we presupposed to not use greater than 10 @State Variables in a view? I do know I ought to make my views extra modular, but it surely nonetheless appears very limiting to not have greater than X State vars. As I perceive it, they’re the one risk to have Variables work in several logic contexts within the code, between completely different views and to be persistent in redraws. So we’ll typically want many, or am I improper?

For those who may enlighten me as to why this occurs, and if my method to State Vars is flawed I’d be very comfortable. Because it stands proper now I’m even not together with extra State Vars on this view, as a result of I do not wish to break it.

Hackers Exploit COM Objects for Fileless Malware and Lateral Motion

0


Safety researchers Dylan Tran and Jimmy Bayne have unveiled a brand new fileless lateral motion method that exploits trapped Part Object Mannequin (COM) objects in Home windows programs.

This technique, based mostly on analysis by James Forshaw of Google Mission Zero, permits attackers to execute .NET managed code within the context of a server-side Distributed COM (DCOM) course of.

The method includes manipulating the Home windows Registry to hijack the StdFont object and redirect it to instantiate System.Object from the .NET Framework.

COM ObjectsCOM Objects
System.Object Class Instantiation Circulation

By leveraging the IDispatch interface and performing .NET reflection over DCOM, attackers can load arbitrary .NET assemblies into the COM server with out leaving any recordsdata on disk.

Implications for Cybersecurity

This new assault vector presents vital challenges for defenders.

The fileless nature of the method makes it troublesome to detect utilizing conventional file-based safety measures.

Moreover, the abuse of reputable Home windows parts like COM and DCOM could permit attackers to bypass sure safety controls.

The researchers demonstrated the method’s effectiveness by making a proof-of-concept device known as ForsHops.exe.

COM ObjectsCOM Objects
ForShops.exe execution

In line with the Report, this device can set up a distant connection to a goal machine, manipulate the mandatory registry keys, and execute malicious code inside a Protected Course of Gentle (PPL) svchost.exe course of.

One limitation of the present implementation is that the malicious payload’s lifetime is tied to the COM consumer course of.

When ForsHops.exe exits or cleans up its COM references, the distant payload additionally terminates.

The researchers tried numerous options to this challenge however famous that additional enhancements may very well be made.

Defensive Suggestions

To mitigate this risk, safety professionals ought to implement a number of defensive measures.

These embrace monitoring for CLR load occasions throughout the WaaSMedicSvc svchost.exe course of, detecting registry manipulations associated to the StandardFont CLSID, and trying to find enabled OnlyUseLatestCLR and AllowDCOMReflection values within the .NETFramework registry key.

Moreover, organizations ought to think about limiting DCOM ephemeral port entry the place attainable utilizing host-based firewalls.

The researchers additionally supplied a YARA rule to detect the usual ForsHops.exe executable, which might be built-in into current safety instruments.

As this method demonstrates, attackers proceed to seek out progressive methods to take advantage of Home windows parts for malicious functions.

Safety groups should keep vigilant and adapt their defenses to handle these evolving threats.

By implementing the advisable controls and sustaining consciousness of such superior methods, organizations can higher shield themselves towards fileless malware and lateral motion assaults.

Are you from SOC/DFIR Groups? – Analyse Malware, Phishing Incidents & get reside Entry with ANY.RUN -> Begin Now for Free.

Flexxbotics updates FlexxCORE to assist robotic firms scale manufacturing

0


Flexxbotics updates FlexxCORE to assist robotic firms scale manufacturing

FlexxCORE has been up to date for longer unattended manufacturing, elevated capability, and improved product high quality. | Supply: Flexxbotics

Flexxbotics as we speak introduced the most recent launch of FlexxCORE, the patent-pending know-how on the heart of its Flexxbotics system. The corporate stated the brand new launch delivers extra highly effective capabilities for machine tending, high quality management, and robotic manufacturing.

FlexCORE does this by enabling each industrial and collaborative robots to run a number of machines with a number of operations for a number of half SKUs, stated Flexxbotics. These new system‘s capabilities allow producers to scale robotic manufacturing throughout the sensible manufacturing facility in a standardized means for higher plant capability, high quality, and EBITDA margins, the corporate claimed.

“FlexxCORE’s totally RESTful utility programming interface (API) now has an expanded knowledge mannequin to allow dynamic definition of the manufacturing robotic atmosphere,” defined Tyler Modelski, co-founder and chief know-how officer of Flexxbotics. “This implies the robots not solely perceive every machine’s capabilities, working traits, and half processing standing; the robots can [also] direct the machines to execute work and know methods to right issues in the event that they happen.”

Flexxbotics stated it gives interoperable communication between the robots and different manufacturing gear. The Boston-based firm famous that its instruments also can join instantly with current enterprise methods within the plant together with the CAD/PLM, QMS, industrial Web of Issues (IIoT), and others for closed-loop high quality compliance.

FlexxCORE updates prolong interoperability

“FlexxCORE is a low-code atmosphere for composing and operating Transformers – highly effective translation driver connectors,” stated Flexxbotics. It features a safe, high-performance runtime framework with knowledge pipelines, protocols, class constructions, technique units, and knowledge fashions for growth.

Transformers allow bi-directional learn/write between robots and all kinds of equipment for many-to-many interoperability, the corporate defined. The system delivers compatibility with greater than 1,000 makes and fashions of robots, manufacturing facility gear, and inspection gadgets, and it allows 22 occasions quicker connector creation than standard automation integration strategies, in keeping with Flexxbotics.

FlexxCORE now contains options to additional prolong the coordination amongst methods, stated the corporate. The system has enhanced consciousness capabilities, enabling robots in superior tending eventualities to interpret every machine’s jobs, processing routines, operational standing, and extra.

In the meantime, parallelized knowledge pipelines use asynchronous, parallel pipelines for hyper-performant real-time “robotic+multi-machine orchestration,” Flexxbotics stated. Better knowledge granularity capabilities allow an expanded knowledge mannequin and occasion knowledge seize for robotic operational context, sample recognition, and machine studying, it added.


SITE AD for the 2025 Robotics Summit registration.
Register now so you do not miss out!


Flexxbotics units its sights on serving to firms scale

“Till now, scaling out superior robotic machine tending throughout the sensible manufacturing facility has concerned limitless customized programming and danger,” stated Flexxbotics. “Failed initiatives happen as a result of the robots have restricted or no connection to plant gear and enterprise methods due to interfacing complexity and incompatibilities.”

Beforehand, robotic implementations lacked course of integration, have been troublesome and expensive to keep up, and weren’t prepared for synthetic intelligence workflows within the “manufacturing facility of the longer term,” The corporate stated its newest model of FlexxCORE permits world firms to roll out automation in a standardized means for superior machine tending. It stated sensible manufacturing facility assist contains:

  • Robotic+multi-machine orchestration: Robots can management a number of machines concurrently to realize longer unattended robotic manufacturing for “lights out” manufacturing.
  • Robotic processing of a number of components: FlexxCORE can coordinate the robotic manufacturing of quite a few half varieties or SKUs inside an element household whereas managing multi-step processes.
  • Robotic multi-job work order staging: Work order changeovers can detect order completion – together with FDA-regulated Line Clear – and replace half properties for the following order in-feed.
  • Autonomous course of management: The up to date system adjusts offset parameters in actual time instantly within the machine controller’s G-code for course of management autonomy, enhancing high quality and digital thread traceability, the corporate stated.
  • Future-ready agility: Flexxbotics asserted that FlexxCORE allows the versatile adoption of latest breakthroughs – resembling AI-driven processes – to rapidly adapt to new market realities and quickly altering circumstances.

“The manufacturing panorama is remodeling quicker than ever, that’s why at Flexxbotics we’ve invested closely within the innovation obligatory for manufacturing robotic digitalization at scale,” stated Tyler Bouchard, co-founder and CEO of Flexxbotics. “We proceed to increase our know-how management with this new FlexxCORE launch so as to equip producers with future-ready capabilities for robot-driven manufacturing which ship measurable outcomes.”

Vital challenges hinder plans to make use of AI to assist the general public sector, says PAC report



Vital challenges hinder plans to make use of AI to assist the general public sector, says PAC report
Picture credit score: Sharaf Maksumov / Shutterstock.com.

In a brand new report on the UK authorities’s use of AI, the Public Accounts Committee warns that whereas AI has the potential to transform public providers, the dimensions of the duty forward in greedy these alternatives is concerningly nice.

The Authorities is looking for to scale up AI adoption within the public sector. For AI for use nicely, it wants top quality knowledge from which to study. The PAC – upon whose suggestions the federal government is usually compelled to report again to parliament – is warning that too usually Authorities knowledge are of poor high quality, and infrequently locked away in out-of-date, or ‘legacy’, IT techniques, that are partially outlined as “an end-of-life product, out of assist from the provider, [and] unattainable to replace…”

An estimated 28% of central authorities techniques met this definition in 2024. Roughly a 3rd of Authorities’s 72 highest-risk legacy techniques nonetheless lack remediation funding. The report warns that there aren’t any fast fixes right here, and requires funding for the remediation of this type of know-how to be prioritised.

The report additional finds sluggish progress in making certain transparency in how AI is utilized by Departments. This jeopardises public belief in its use – key to its profitable adoption. By January 2025, solely a relative handful of data had been printed on a Authorities web site set as much as present better transparency on algorithm-assisted decision-making. The Committee is asking on Authorities to handle public considerations over the sharing of delicate knowledge in AI’s use.

The Authorities additionally has an extended option to go to make sure a thriving marketplace for AI suppliers. The PAC’s inquiry highlights plenty of considerations that the dominance of a small variety of giant know-how suppliers within the AI market dangers stifling competitors and innovation. The Authorities’s strategy to procurement additionally dangers over-reliance on the providers of particular corporations, and an lack of ability to adapt.

One other barrier to the secure and efficient adoption of AI by Authorities are longstanding and protracted digital abilities shortages. Round half of roles marketed in civil service digital and knowledge campaigns went unfilled in 2024, and 70% of Authorities departments report problem recruiting and retaining employees with AI abilities. The PAC has lengthy raised considerations about digital abilities gaps in Authorities, and is sceptical that the Division for Science, Innovation and Know-how’s (DSIT) deliberate digital reforms will tackle the issue.

On DSIT’s position in holding duty for wider AI coverage, whereas the PAC welcomes the current creation of a brand new digital centre of Authorities within the Division, it has severe considerations over whether or not DSIT has enough leverage to drive change throughout the general public sector. The Committee’s report is asking for a senior digital officer to be embedded on the prime desk with senior administration at each division, on the boards at every Division, and their respective companies.

Sir Geoffrey Clifton-Brown MP, Chair of the Committee, stated:

“This Committee’s position is to assist guarantee environment friendly Authorities coverage supply by way of our suggestions. The potential for AI to safe widespread efficiencies is apparent, and the necessity for digital enhancements is a theme that can run by way of all our inquiries as by way of a stick of rock. The AI business wants a Authorities that’s on its aspect, whereas ensuring that any alternatives for enchancment are seized in a secure and moral means. Transparency is essential right here, as public belief that AI will work for them is central to any profitable use of it. We nonetheless have an extended option to go on this space.

“The Authorities has stated it needs to mainline AI into the veins of the nation, however our report raises questions over whether or not the general public sector is prepared for such a process. The ambition to harness the potential of one of the crucial vital technological developments of recent occasions is in fact to be welcomed. Sadly, these aware of our Committee’s previous scrutiny of the Authorities’s frankly sclerotic digital structure will know that any guarantees of sudden transformation are for the birds.

“A metamorphosis of considering in Authorities at senior ranges is required, and the easiest way for this to occur is for digital professionals to be introduced spherical the highest desk in administration and governing boards of each Division and their companies. I’ve severe considerations that DSIT doesn’t have the authority over the remainder of Authorities to carry concerning the scale and tempo of change that’s wanted. We hope the suggestions in our report support the Authorities in succeeding in bringing public sector techniques into the twenty first century for his or her customers, the place different efforts have failed.”

Quantity of Cash Requested In BEC Assaults Almost Doubled in This fall 2024

0


Phishing Attack Steals CryptoThe typical sum of money requested in enterprise e-mail compromise (BEC) assaults spiked to $128,980 within the fourth quarter of 2024, based on the Anti-Phishing Working Group’s (APWG’s) newest report.