• chevron_right

      Java persistence with JPA and Hibernate: Persisting data to a database

      pubsub.slavino.sk / infoworldcom · Wednesday, 27 December - 10:00 edit

    In this second half of the Java persistence with JPA and Hibernate tutorial, we move past concepts and start writing code that persists data to and from a relational database using JPA with Hibernate. We'll start by configuring an example application to use Hibernate as the JPA provider, then quickly configure the EntityManager and write two classes that we want to persist to the database: Book and Author . Finally, we'll write a simple application that pulls together all the application components and successfully persists our two entities to the database.

    To read this article in full, please click here


    Značky: #Java, #Rozne, #APIs

    • chevron_right

      Mazda’s DMCA takedown kills a hobbyist’s smart car API tool

      news.movim.eu / ArsTechnica · Tuesday, 17 October, 2023 - 19:47

    Mazda MX-30

    Enlarge (credit: Jonathan Gitlin)

    Before last week, owners of certain Mazda vehicles who also had a Home Assistant setup could set up some handy connections for their car.

    One CX60 driver had a charger that would only power on when it confirmed his car was plugged in and would alert him if he left the trunk open. Another used Home Assistant to control their charger based on the dynamic prices of an Agile Octopus energy plan . Yet another had really thought it through, using Home Assistant to check the gas before their morning commute, alert them if their windows were down before rain was forecast, and remotely unlock and start the car in cold conditions. The possibilities were vast , and purportedly beyond what Mazda's official app offered.

    Mazda, however, had issues with the project, which was largely the free-time work of one software developer, Brandon Rothweiler . In a Digital Millennium Copyright Act (DMCA) notice sent to GitHub , Mazda (or an authorized agent) alleges that Rothweiler's integration:

    Read 9 remaining paragraphs | Comments

    • chevron_right

      Meta develops an AI language bot that can use external software tools

      news.movim.eu / ArsTechnica · Wednesday, 15 February, 2023 - 23:56 · 1 minute

    An artist's impression of a robot hand using a desktop calculator.

    Enlarge / An artist's impression of a robot hand using a desktop calculator. (credit: Aurich Lawson | Getty Images )

    Language models like ChatGPT have revolutionized the field of natural language processing, but they still struggle with some basic tasks such as arithmetic and fact-checking. Last Thursday, researchers from Meta revealed Toolformer , an AI language model that can teach itself to use external tools such as search engines, calculators, and calendars without sacrificing its core language modeling abilities.

    The key to Toolformer is that it can use APIs (application programming interfaces), which are a set of protocols that allow different applications to communicate with one another, often in a seamless and automated manner. During training, researchers gave Toolformer a small set of human-written examples demonstrating how each API is used and then allowed it to annotate a large language modeling dataset with potential API calls. It did this in a "self-supervised" way, meaning that it could learn without needing explicit human guidance.

    The model learned to predict each text-based API call as if they were any other form of text. When in operation—generating text as the result of a human input—it can insert the calls when needed. Moreover, Toolformer can "decide" for itself which tool to use for the proper context and how to use it.

    Read 4 remaining paragraphs | Comments

    • chevron_right

      One of 5G’s biggest features is a security minefield

      news.movim.eu / ArsTechnica · Thursday, 11 August, 2022 - 14:41 · 1 minute

    One of 5G’s biggest features is a security minefield

    Enlarge (credit: Anton Petrus | Getty )

    True 5G wireless data, with its ultrafast speeds and enhanced security protections , has been slow to roll out around the world. As the mobile technology proliferates—combining expanded speed and bandwidth with low-latency connections—one of its most touted features is starting to come in to focus. But the upgrade comes with its own raft of potential security exposures.

    A massive new population of 5G-capable devices, from smart-city sensors to agriculture robots and beyond, are gaining the ability to connect to the Internet in places where Wi-Fi isn't practical or available. Individuals may even elect to trade their fiber-optic Internet connection for a home 5G receiver. But the interfaces that carriers have set up to manage Internet-of-things data are riddled with security vulnerabilities, according to research presented this week at the Black Hat security conference in Las Vegas. And those vulnerabilities could dog the industry long-term.

    After years of examining potential security and privacy issues in mobile-data radio frequency standards, Technical University of Berlin researcher Altaf Shaik says he was curious to investigate the application programming interfaces (APIs) that carriers are offering to make IoT data accessible to developers. These are the conduits that applications can use to pull, say, real-time bus-tracking data or information about stock in a warehouse. Such APIs are ubiquitous in web services, but Shaik points out that they haven't been widely used in core telecommunications offerings. Looking at the 5G IoT APIs of 10 mobile carriers around the world, Shaik and his colleague Shinjo Park found common but serious API vulnerabilities in all of them, and some could be exploited to gain authorized access to data or even direct access to IoT devices on the network.

    Read 7 remaining paragraphs | Comments

    • chevron_right

      Get started with FastAPI

      pubsub.slavino.sk / infoworldcom · Wednesday, 18 August, 2021 - 10:00 edit

    When Python web frameworks like Flask and Django first rose in popularity and prominence, Python was a somewhat different language than it was today. Many elements of modern Python, like asynchronous execution and the ASGI (Asynchronous Server Gateway Interface) standard, were either in their infancy or didn’t exist yet.

    To read this article in full, please click here


    Značky: #APIs, #Rozne, #Python