4.8 C
New York
Friday, March 21, 2025
Home Blog Page 3776

Intrusive purposes | The suspect record


In right now’s digital age, cellular purposes have turn out to be an integral a part of our private {and professional} lives, providing comfort and performance. Nonetheless, not all purposes are created equal, and a few pose a big risk to our privateness and safety. One such risk comes from intrusive purposes.

Check-Driving HTML Templates


foo

Let’s examine easy methods to do it in phases: we begin with the next check that
tries to compile the template. In Go we use the usual html/template package deal.

Go

  func Test_wellFormedHtml(t *testing.T) {
    templ := template.Should(template.ParseFiles("index.tmpl"))
    _ = templ
  }

In Java, we use jmustache
as a result of it is quite simple to make use of; Freemarker or
Velocity are different widespread selections.

Java

  @Check
  void indexIsSoundHtml() {
      var template = Mustache.compiler().compile(
              new InputStreamReader(
                      getClass().getResourceAsStream("/index.tmpl")));
  }

If we run this check, it would fail, as a result of the index.tmpl file does
not exist. So we create it, with the above damaged HTML. Now the check ought to cross.

Then we create a mannequin for the template to make use of. The applying manages a todo-list, and
we will create a minimal mannequin for demonstration functions.

Go

  func Test_wellFormedHtml(t *testing.T) {
    templ := template.Should(template.ParseFiles("index.tmpl"))
    mannequin := todo.NewList()
    _ = templ
    _ = mannequin
  }

Java

  @Check
  void indexIsSoundHtml() {
      var template = Mustache.compiler().compile(
              new InputStreamReader(
                      getClass().getResourceAsStream("/index.tmpl")));
      var mannequin = new TodoList();
  }

Now we render the template, saving the ends in a bytes buffer (Go) or as a String (Java).

Go

  func Test_wellFormedHtml(t *testing.T) {
    templ := template.Should(template.ParseFiles("index.tmpl"))
    mannequin := todo.NewList()
    var buf bytes.Buffer
    err := templ.Execute(&buf, mannequin)
    if err != nil {
      panic(err)
    }
  }

Java

  @Check
  void indexIsSoundHtml() {
      var template = Mustache.compiler().compile(
              new InputStreamReader(
                      getClass().getResourceAsStream("/index.tmpl")));
      var mannequin = new TodoList();
  
      var html = template.execute(mannequin);
  }

At this level, we wish to parse the HTML and we anticipate to see an
error, as a result of in our damaged HTML there’s a div factor that
is closed by a p factor. There may be an HTML parser within the Go
normal library, however it’s too lenient: if we run it on our damaged HTML, we do not get an
error. Fortunately, the Go normal library additionally has an XML parser that may be
configured to parse HTML (due to this Stack Overflow reply)

Go

  func Test_wellFormedHtml(t *testing.T) {
    templ := template.Should(template.ParseFiles("index.tmpl"))
    mannequin := todo.NewList()
    
    // render the template right into a buffer
    var buf bytes.Buffer
    err := templ.Execute(&buf, mannequin)
    if err != nil {
      panic(err)
    }
  
    // test that the template may be parsed as (lenient) XML
    decoder := xml.NewDecoder(bytes.NewReader(buf.Bytes()))
    decoder.Strict = false
    decoder.AutoClose = xml.HTMLAutoClose
    decoder.Entity = xml.HTMLEntity
    for {
      _, err := decoder.Token()
      change err {
      case io.EOF:
        return // We're completed, it is legitimate!
      case nil:
        // do nothing
      default:
        t.Fatalf("Error parsing html: %s", err)
      }
    }
  }

supply

This code configures the HTML parser to have the appropriate stage of leniency
for HTML, after which parses the HTML token by token. Certainly, we see the error
message we wished:

--- FAIL: Test_wellFormedHtml (0.00s)
    index_template_test.go:61: Error parsing html: XML syntax error on line 4: surprising finish factor 

In Java, a flexible library to make use of is jsoup:

Java

  @Check
  void indexIsSoundHtml() {
      var template = Mustache.compiler().compile(
              new InputStreamReader(
                      getClass().getResourceAsStream("/index.tmpl")));
      var mannequin = new TodoList();
  
      var html = template.execute(mannequin);
  
      var parser = Parser.htmlParser().setTrackErrors(10);
      Jsoup.parse(html, "", parser);
      assertThat(parser.getErrors()).isEmpty();
  }

supply

And we see it fail:

java.lang.AssertionError: 
Anticipating empty however was:<[<1:13>: Unexpected EndTag token [] when in state [InBody],

Success! Now if we copy over the contents of the TodoMVC
template
to our index.tmpl file, the check passes.

The check, nonetheless, is just too verbose: we extract two helper features, in
order to make the intention of the check clearer, and we get

Go

  func Test_wellFormedHtml(t *testing.T) {
    mannequin := todo.NewList()
  
    buf := renderTemplate("index.tmpl", mannequin)
  
    assertWellFormedHtml(t, buf)
  }

supply

Java

  @Check
  void indexIsSoundHtml() {
      var mannequin = new TodoList();
  
      var html = renderTemplate("/index.tmpl", mannequin);
  
      assertSoundHtml(html);
  }

supply

Stage 2: testing HTML construction

What else ought to we check?

We all know that the appears of a web page can solely be examined, finally, by a
human taking a look at how it’s rendered in a browser. Nonetheless, there may be usually
logic in templates, and we would like to have the ability to check that logic.

One may be tempted to check the rendered HTML with string equality,
however this method fails in apply, as a result of templates comprise plenty of
particulars that make string equality assertions impractical. The assertions
develop into very verbose, and when studying the assertion, it turns into troublesome
to know what it’s that we’re attempting to show.

What we want
is a way to claim that some components of the rendered HTML
correspond to what we anticipate, and to ignore all the small print we do not
care about.
A method to do that is by operating queries with the CSS selector language:
it’s a highly effective language that enables us to pick the
parts that we care about from the entire HTML doc. As soon as we’ve
chosen these parts, we (1) rely that the variety of factor returned
is what we anticipate, and (2) that they comprise the textual content or different content material
that we anticipate.

The UI that we’re purported to generate appears like this:

Check-Driving HTML Templates

There are a number of particulars which might be rendered dynamically:

  1. The variety of gadgets and their textual content content material change, clearly
  2. The type of the todo-item adjustments when it is accomplished (e.g., the
    second)
  3. The “2 gadgets left” textual content will change with the variety of non-completed
    gadgets
  4. One of many three buttons “All”, “Lively”, “Accomplished” will probably be
    highlighted, relying on the present url; as an illustration if we determine that the
    url that reveals solely the “Lively” gadgets is /energetic, then when the present url
    is /energetic, the “Lively” button ought to be surrounded by a skinny purple
    rectangle
  5. The “Clear accomplished” button ought to solely be seen if any merchandise is
    accomplished

Every of this issues may be examined with the assistance of CSS selectors.

This can be a snippet from the TodoMVC template (barely simplified). I
haven’t but added the dynamic bits, so what we see right here is static
content material, supplied for example:

index.tmpl

  

supply

Text2BIM: An LLM-based Multi-Agent Framework Facilitating the Expression of Design Intentions extra Intuitively


Constructing Info Modeling (BIM) is an all-encompassing technique of representing constructed belongings utilizing geometric and semantic knowledge. This knowledge can be utilized all through a constructing’s lifetime and shared in devoted types all through challenge stakeholders. Present constructing data modeling (BIM) authoring software program considers numerous design wants. Due to this unified technique, the software program now consists of many options and instruments, which has elevated the complexity of the consumer interface. Translating design intents into difficult command flows to generate constructing fashions within the software program could also be difficult for designers, who usually want substantial coaching to beat the steep studying curve.

Current analysis suggests that giant language fashions (LLMs) can be utilized to provide wall options routinely. Superior 3D generative fashions, similar to Magic3D and DreamFusion, allow designers to convey their design intent in pure language quite than via laborious modeling instructions; that is significantly helpful in fields like digital actuality and recreation improvement. Nonetheless, these Textual content-to-3D strategies often use implicit representations like Neural Radiance Fields (NeRFs) or voxels, which solely have surface-level geometric knowledge and don’t embrace semantic data or mannequin what the 3D objects may very well be inside. It’s tough to include these fully geometric 3D shapes into BIM-based architectural design processes because of the discrepancies between native BIM fashions and these. It’s tough to make use of these fashions in downstream constructing simulation, evaluation, and upkeep jobs due to the shortage of semantic data and since designers can not immediately change and amend the created contents in BIM authoring instruments.

A brand new research by researchers on the Technical College of Munich introduces Text2BIM, a multi-agent structure primarily based on LLM. The group employs 4 LLM-based brokers with particular jobs and talents that talk with each other by way of textual content to make the aforementioned central thought a actuality. The Product Proprietor writes complete necessities papers and improves consumer directions, the skilled architect develops textual building plans primarily based on architectural information, the programmer analyzes necessities and codes for modeling, and the reviewer fixes issues with the mannequin by suggesting methods to optimize the code. This collaborative strategy ensures that the central thought of Text2BIM is realized successfully and effectively. 

LLMs might naturally consider the manually created device capabilities as transient, high-level API interfaces. Because of the sometimes low-level and fine-grained nature of BIM authoring software program’s native APIs, every device encapsulates the logic of merging numerous callable API capabilities to perform its job. The device can sort out modeling jobs exactly whereas avoiding low-level API calls’ complexity and tediousness by incorporating exact design standards and engineering logic. Nonetheless, it isn’t straightforward to assemble generic device functionalities to deal with totally different constructing conditions.

The researchers used quantitative and qualitative evaluation approaches to find out which device capabilities to include to beat this problem. They began by consumer log information to know which instructions (instruments) human designers use most frequently when working with BIM authoring software program. They used a single day’s log knowledge gathered from 1,000 nameless customers of the design program Vectorworks worldwide, which included about 25 million data in seven languages. The highest fifty most used instructions are retrieved as soon as the uncooked knowledge was cleaned and filtered, guaranteeing that the Text2BIM framework is designed with the consumer’s wants and preferences in thoughts.

To facilitate the event of agent-specific device functionalities, they omitted instructions primarily managed by the mouse and, in orange, emphasised the chart’s generic modeling instructions which might be implementable by way of APIs. The researchers examined Vectorworks’ in-built graphical programming device Marionette, akin to Dynamo/Grasshopper. These visible scripting programs usually provide encapsulated variations of the underlying APIs which might be tuned to sure circumstances. The nodes or batteries that designers work with present a extra intuitive and higher-level programming interface. Software program suppliers classify the default nodes in accordance with their capabilities to facilitate designers’ comprehension and utilization. Having comparable aim, the group used these nodes beneath the “BIM” class as a result of the use case produces standard BIM fashions. 

The researchers might create an interactive software program prototype primarily based on the structure by incorporating the instructed framework into Vectorworks, a BIM authoring device. The open-source internet palette plugin template from Vectorworks was the muse for his or her implementation. Utilizing Vue.js and an online atmosphere constructed on Chromium Embedded Framework (CEF), a dynamic internet interface was embedded in Vectorworks utilizing fashionable frontend applied sciences. This allowed them to create an online palette that’s straightforward to make use of and perceive. Net palette logic is constructed utilizing C++ capabilities, and the backend is a C++ utility that permits asynchronous JavaScript capabilities to be outlined and uncovered inside an online body.

The analysis is carried out utilizing take a look at consumer prompts (directions) and evaluating the output of various LLMs, similar to GPT-4o, Mistral-Massive-2, and Gemini-1.5-Professional. Moreover, the framework’s capability is examined to provide designs in open-ended contexts by purposefully omitting some building constraints from the take a look at prompts. To account for the random nature of generative fashions, they ran every take a look at query via every LLM 5 instances, yielding 391 IFC fashions (together with optimization intermediate outcomes). The findings present that the strategy efficiently creates constructing fashions which might be well-structured and logically in keeping with the user-specified summary concepts.

This paper’s sole focus is producing common constructing fashions through the early design stage. The produced fashions merely incorporate vital structural parts like partitions, slabs, roofs, doorways, and home windows and indicative semantic knowledge similar to narratives, places, and materials descriptions. This work facilitates an intuitive expression of design intent by releasing designers from the monotony of recurring modeling instructions. The group believes the consumer might all the time return into the BIM authoring device and alter the generated fashions, placing a stability between automation and technical autonomy.  


Try the Paper. All credit score for this analysis goes to the researchers of this challenge. Additionally, don’t neglect to comply with us on Twitter and be part of our Telegram Channel and LinkedIn Group. In case you like our work, you’ll love our publication..

Don’t Neglect to hitch our 48k+ ML SubReddit

Discover Upcoming AI Webinars right here


Dhanshree Shenwai is a Pc Science Engineer and has a very good expertise in FinTech corporations overlaying Monetary, Playing cards & Funds and Banking area with eager curiosity in purposes of AI. She is obsessed with exploring new applied sciences and developments in as we speak’s evolving world making everybody’s life straightforward.



Congress threatens to floor U.S. agriculture with DJI drone ban

0


Hearken to this text

Voiced by Amazon Polly
Congress threatens to floor U.S. agriculture with DJI drone ban

An agricultural trade group is preventing to maintain DJI as a vendor as a result of ease of use of its software program. | Credit score: DJI

A coalition of agriculture-specific drone operators and repair suppliers has shaped to foyer towards the proposed Countering CCP Drones Act (H.R.6572) at present working its approach by Congress. This invoice would ban the sale of drones from Shenzhen Da-Jiang Improvements Sciences and Applied sciences Co., or DJI, within the U.S.

This coalition consists of Agri Spray Drones, Bestway Ag, Drone Nerds, HSE-UAV, Pegasus Robotics, and Rantizo. It stated it intends to signify, shield, and advocate for the pursuits of the agricultural trade in using spray drone know-how.

The group warned that if the U.S. authorities bans Chinese language-made drones like these of DJI, commercially accessible choices for high-capacity spray drones can be restricted. This might result in result in a monopoly state of affairs with just one supplier — Hylio. This would scale back innovation, enhance costs, and restrict choices for farmers and repair suppliers

In April, Anzu Robotics, a brand new U.S.-based drone provider launched a substitute for the DJI Mavic digital camera drone. Its technique is to license and manufacture a clone of the firm‘s Mavic outdoors of China and supply a brand new software program answer for the drones.

This technique would have circumvented the intent of the Countering CCP Drones Act, however amendments to the invoice now embrace Anzu Robotics’ method.


SITE AD for the 2024 RoboBusiness registration now open.
Register now.


Banning DJI might set again the agriculture trade

“The development of my bipartisan payments, the Countering CCP Drones Act and the FACT Act, is a win for America’s nationwide safety and a win for Individuals whose knowledge and significant infrastructure has been collected and monitored by our adversary Communist China,” said Congresswoman Elise Stefanik (R-N.Y.). “Congress should use each device at our disposal to cease Communist China’s monopolistic management over the drone market and telecommunications infrastructure and construct up America’s industrial capability.”

In response, the trade coalition stated that there at present aren’t any inexpensive and viable alternate options to Chinese language-manufactured drones to be used in agriculture spraying operations. On a latest name with the group, The Robotic Report discovered extra element about how vital DJI drones are for the trade.

The first use instances in danger are the appliance of chemical pesticides, herbicides, and fertilizers utilizing aerial sprayers, stated the group members. The usage of semi-autonomous and totally autonomous drones has advanced over the previous decade. The alternate options to drone-based software of chemical compounds are ground-based tractors and manned planes (crop dusters).

Throughout the U.S., native service suppliers have emerged to offer aerial-based providers for farmers.

The drone that sparked the preliminary progress of this market was the DJI MG1P. The eight-rotor mannequin had a 10L (2.6 gal.) liquid storage capability and an inventory value of $15K. The corporate now sells a number of fashions at completely different value factors together with the T30L, T40, and AGRAS T50L, with 30, 70, and 75 L (7.9, 18.4, and 19.8 gal.) capability, respectively.

The group asserted that there isn’t any different agricultural spraying drone with the identical capabilities on the similar value factors. The service suppliers within the group additionally stated the convenience of use and options of DJI’s software program are at present unmatched within the trade.

Trade group raises a number of issues

  • Selection and competitors: The group stated that banning Chinese language-made drones would restrict commercially accessible choices for high-capacity spray drones. This might stifle innovation and enhance prices for farmers and repair suppliers, they stated.
  • Knowledge safety and privateness: The trade is trying to develop requirements and options, equivalent to Rantizo’s AcreConnect app, to make sure knowledge safety and privateness with out counting on cloud-based storage with drone producers.
  • Regulatory uncertainty: The proposed Countering CCP Drones Act has created uncertainty and concern inside the trade in regards to the future availability and use of drones.
  • Lack of expertise of trade impression: The coalition members expressed concern that policymakers could not perceive the implications of a DJI drone ban on the agricultural trade.
  • Alternatives for rural financial growth: Drones have created new income streams and job alternatives in rural communities, particularly for youthful generations, stated the drone service suppliers. Sustaining entry to inexpensive and modern drone know-how is seen as essential for sustaining this progress, they stated.

The group stated its backside line is preserving selection, competitors, and innovation within the drone trade to assist the wants of farmers, service suppliers, and rural financial growth.

Representatives on the decision included:

  • Jeremy Schneiderman, CEO, Drone Nerds
  • Bryan Sanders, president, HSE-UAV
  • Jeff Dickens, area lead, Higher Southeast, Rantizo
  • Jeff Clack, Bestway Ag
  • Taylor Moreland, CEO, Agri Spray Drones
  • Eric Ringer, vice chairman of technique and partnerships, Rantizo
  • Jeff Clack, drone division supervisor, Bestway Ag

Two-Dimensional Meta-Supplies | Nanotechnology Weblog


The time period meta-materials refers to supplies which can be created by producing materials buildings that don’t happen in nature and in addition will be created with structural complexity that additionally wouldn’t happen in nature. Graphene has lengthy been a cloth of curiosity. For a very long time, the difficulty with graphene has been the flexibility to supply it in massive areas with none defects. The work finished in Reference 1 was centered on evaluating a nano electronics platform based mostly on graphene. The curiosity is as a result of the know-how is appropriate with standard semiconductor manufacturing. This work was based mostly on the outcomes of analysis that discovered a layer of graphene shaped on the highest of silicon carbide crystal. It was found that electrical currents circulate with out resistance alongside the perimeters of this materials plus the graphene gadgets might be interconnected with out metallic wires. The researchers noticed that the electrons might journey over massive distances, microns, with out scattering. Earlier applied sciences might solely acquire 10 nm earlier than scattering. Their estimates are that will probably be as much as 10 years earlier than the graphene-based electronics might be realized in quantity manufacturing.

A barely totally different class of two-dimensional meta-materials is known as MXenes. These MXenes are half of a giant household of nitrides and carbides of transition supplies constructed in two dimensional layers the place two or extra of the metallic layers are interspersed by a carbon or nitrogen layer. This floor is completed off with a termination layer. In response to the researchers [Reference 2], these MXenes will be fabricated as nanometer skinny flakes that may be higher dispersed in water and inked onto any floor. They will also be made as movies, fibers and even powders analysis areas utilizing these supplies consists of optoelectronics, electromagnetic interference shielding, wi-fi antennas, whole catalyst, water purification, biosensing, and plenty of extra. There’s additionally the opportunity of utilizing these supplies as options to lithium-ion batteries. The difficulty proper now could be that this materials tends to oxidize and degrade rapidly in ambient working situations. Eradicating the oxidation would require some extra innovations. Work finished in Australia has discovered one methodology to work to take away the oxidation, which focuses a ten MHz frequency beam, which breaks the bond of the oxidation. Some work in China has use this materials as an electrochemical biosensor that’s coupled with gold nano arrays to try to have a noninvasive most cancers detection system. One of many challenges utilizing this materials is that there are a particularly massive variety of attainable configurations. Discovering one of the best ones to work with would require vital computational evaluation.

Reference 3 appears to be like at a brand new layering method for 2 dimensional supplies with the opportunity of having the ability to tune the supplies for various functions. One of many findings was that sandwiching atomic layers of a transition metallic like titanium between monoatomic layers of one other metallic, like molybdenum, and utilizing carbon atoms to carry them collectively.  The researchers found {that a} steady materials will be produced. A key results of their work which might be useful sooner or later is that they’ve discovered a strategy to mix elemental supplies right into a steady compound, which is able to exhibit new properties. This explicit association of atomic buildings opens up the likelihood to high quality tune the ensuing molecular construction and its associated bodily properties to fulfill sure stringent functions that nowadays can’t be thought of.

The event of the atomic layer supplies and the flexibility to control them into ways in which produce totally different traits is opening up a wholly new world for researchers to create new, and beforehand unknown, materials properties. This isn’t one thing that may occur instantly however the effort is offering a complete new department of scientific experimentation. It is going to be fascinating to see what the longer term brings.

References:

  1. https://www.graphene-info.com/researchers-take-step-towards-graphene-electronics
  2. https://spectrum.ieee.org/why-mxenese-matter
  3. https://spectrum.ieee.org/new-method-for-layering-2nd-materials-offers-breakthrough-in-energy-storage

Two-Dimensional Meta-Supplies | Nanotechnology Weblog

About Walt

I’ve been concerned in numerous points of nanotechnology because the late Seventies. My curiosity in selling nano-safety started in 2006 and produced a white paper in 2007 explaining the 4 pillars of nano-safety. I’m a know-how futurist and is at present centered on nanoelectronics, single digit nanomaterials, and 3D printing on the nanoscale. My expertise consists of three startups, two of which I based, 13 years at SEMATECH, the place I used to be a Senior Fellow of the technical employees once I left, and 12 years at Normal Electrical with 9 of them on company employees. I’ve a Ph.D. from the College of Texas at Austin, an MBA from James Madison College, and a B.S. in Physics from the Illinois Institute of Know-how.


Nanotechnology, Semiconductor Know-how