home.social

Search

879 results for “data_bene”

  1. I continue to be very impressed with the free version of Affinity Studio for RAW image development and photo post-processing. Powerful, polished, plentiful features, and easy to use.

    I upgraded my desktop computer last month and now can use their Machine Learning tools, such as object selection in the RAW develop studio. Wow! Everything stays local to your machine and no training is done with your data.

    Yes, it's not open source, but it is free and you only need an email address to register. Looks like the free version includes everything except advanced AI tools.

    #PhotoEditing #PostProcessing

  2. Epstein Files
    I filed another FOIA

    DOJ says they have released all the Epstein files except for ones that are duplicative, exempt from disclosure or protected by privilege. OK, let’s test that assertion with a FOIA request.

    Here is the list of non-testifying witnesses from Ghislaine Maxwell’s criminal trial.
    justice.gov/epstein/files/Data 0095751.pdf

    Starting on the second page each blue line is a different person. Under each blue line are documents for that person. A number of those documents are FD-302 interviews. These are documents prepared by the FBI after interviewing someone.

    It is *easy* for anyone to determine if a document has been released. Simply search DOJ’s Epstein website on the 3-part document identifier in the first column of the Maxwell list. I did that. For each FD-302 on the Maxwell list I searched DOJ’s website. By doing that I determined which people were victims or likely victims and which FD-302s have been released.

    Keep in mind that only about 100 of the 1,000+ victims were involved in any way in Maxwell’s trial.

    Now about that FOIA...

    My recent FOIA request listed the 3-part document identifiers from the Maxwell list that were FD-302s for victims or likely victims and which I have not been able to find on DOJ’s website. I specifically asked for copies that **include the EFTA number** stamped in the lower right corner of each page.

    If those FD-302 victim interviews have actually been released as claimed by DOJ, then it would be a simple matter for DOJ to produce copies in response to my FOIA, right? On the other hand, if those 302s have not been released then the FOIA statutes require DOJ to tell me there are no responsive documents - which would be an admission that they never released the 302s listed in my FOIA.

    In reply to my FOIA I received the exact same goofy letter that I have received several times in reply to earlier FOIAs. Here is one of those earlier letters that I put on Google drive:
    drive.google.com/uc?export=dow

    Bottomline: DOJ refuses to provide any proof that these FD-302 victim interviews have been released and also refuses to admit that they have not been released. That is not a defensible position.

    For anyone interested in my analysis of the Maxwell list of non-testifying witnesses it is a PDF on Google drive.
    drive.google.com/uc?export=dow

    But wait, there’s more...

    I also filed a different FOIA that is also based on the Maxwell list of non-testifying witnesses. This time DOJ replied and basically asked for clarification which I provided. Now I am waiting for DOJ to reply again.

    If you look at my report (see link above) then you will see multiple examples of where DOJ released some FD-302 interviews but not all interviews for the **same victim**. Obviously DOJ was using some criteria to decide which interviews to release and which interviews to not release. This FOIA asked for a copy of those criteria. I will report back when I get a reply.

    BTW, victim 045 in the Maxwell list was interviewed four times. Initially DOJ only released the first FD-302 interview report. That report does not mention Trump. Later, after widespread coverage in the media, DOJ released the other three FD-302 interviews for this same victim. Each of those interviews includes the word Trump.

    Sure would like to see the criteria DOJ used to hide many FD-302 victim interviews from the public. Stay tuned...
    #Epstein #ReleaseTheEpsteinFiles

  3. ⚠️ CRITICAL: BlackX UEFI Bootkit Bypasses Secure Boot on Patched Windows Systems Missing Revocations

    BlackX UEFI bootkit is actively targeting diplomatic entities in Central Asia and bypassing Secure Boot on fully patched Windows systems lacking firmware revocations. APT41 is suspected as the threat actor. Compromised systems achieve pre-OS persistence with kernel-level access, enabling data exfil…

    threatnoir.com/focus

    🤖 AI generated summary

  4. 🐍📰 Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 2

    Build a Flask REST API backed by a SQLite database. In part two of this series, you'll use SQLAlchemy and Marshmallow to persist and serialize data

    realpython.com/flask-connexion

  5. A wave of AI-powered wearable devices is entering the market, designed to integrate artificial intelligence into daily routines as productivity tools or personal companions.

    Devices range from the $49.99 audio-recording Bee pendant and Amazon's recent personal AI hardware to continuous listeners like Friend and meeting transcribers like Limitless, raising ongoing questions about daily personal data recording and har…

    en.hacks.gr/ta-nea-forita-gkat

    #ArtificialIntelligence #Wearables #Hardware #Amazon

  6. 🥕 PantryPulse — Your Kitchen, Organized

    This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

    What I Built

    PantryPulse is a kitchen companion that helps you cook with what you already have and throw away less food. It aims to:

    📸 Scan ingredients and keep a running inventory of your fridge
    ⏰ Watch expiry dates and flag items that should be used first
    🍳 Suggest recipes based on what’s in stock
    🛒 Build grocery lists so you only buy what you need
    🌱 Cut food waste with smarter day-to-day planning

    The idea is to spend less time managing your kitchen and more time enjoying what comes out of it.

    Demo

    💻 GitHub: MohdOves/Dev-Weekeend-Challenge-3

    How I Built It

    PantryPulse pairs a cross-platform mobile front end with a Python backend and AI-assisted food features.

    React Native + Expo for the mobile and web app
    TypeScript for safer, easier-to-maintain code
    FastAPI (Python) for the backend API and logic
    Expo SQLite for local storage of inventory and grocery data
    Docker to containerize the backend
    Gemma 3 4B (planned) for on-device ingredient recognition and recipe help, not yet implemented

    A key goal is privacy-friendly, offline-first AI that works across devices.

    Why Does Open Innovation Matter?

    Open-source tools let me inspect, adapt, and improve what I build on. For PantryPulse, that means I can try running AI locally instead of relying on closed services, and other developers can contribute features, fixes, and new ideas.#devchallenge #hf26challenge #software #coding #development #engineering #inclusive #community
    PantryPulse — Your Kitchen, Organized

  7. #Grauniad actually do a reasonable job here of reporting on the #cocaine problem in #Britain - not concentrating on mere possession or low level use (which like any other #drugs isn't that much of an issue in itself) but genuine #crimes that harm others as well as the user such as #violence (especially #DomesticViolence ), #'stalking and dangerous #driving under the influence (or due to sleep deprivation after chronic use).

    And this is without data from Metpol, who weren't able to provide it (probably because they are overwhelmed with dealing with such incidents)

    theguardian.com/uk-news/2026/o

  8. #AI is helping landlords collude to raise rent, causing layoffs, driving personalized pricing that means things cost us more, facilitating the government disappearing people off the street, destroying the social connections that social media was pitched to nurture, and determining who lives and who dies. So it’s not a coincidence that there’s unifying, global, bipartisan opposition to data centers, particularly AI data centers, happening at the same time.
    newsletter.mattdragon.com/arch

    #ai
  9. @badrihippo @Sans_Google

    I can imagine, that a #Jabber client with focus on #privacy would attract some users. Probably not me, as I care more about #convenience and #digitalSovereignty 😉

    Such a client would have to do the same things as Parakeet, but also needs to have #OMEMO2 to encrypt more data, mandate use of #proxy for HTTP Upload and Jingle, and probably more.

    #XMPP is designed in a way that you have to trust your own server to a certain degree, but not other servers or contacts.

  10. @brib i had similar issues with exercism, i think it is kind of by design. (i think it means for users to go away and discover how to do stuff, for better or worse.)

    there is clojure for the brave and true (free online book) and there are various tutorials on the official clojure site (functions, data structures), also lots of usage examples on clojuredocs dot something.

    #clojure #lisp

  11. Cybersecurity bounty hunter says Samsung TVs use AI to record audio and screenshots for ads

    A hacker reverse-engineered his own Samsung TV and found alarming spying activity, including code that used connected devices' microphones to listen to users.
    #hardware
    tomshardware.com/tech-industry

  12. 🏆 New Achievement! Big Four, Small Firewall!

    PHASE ONE INCOMING. The Everest ransomware group has engaged PwC, and they are not here to audit your quarterly returns. The group claims to have ripped 590 GB from PwC's internal systems. PwC confirmed a hit — but it's a third-party learning platform, not the crown jewels. Sensitive client and financial data, they say, stayed clean. Everest disagrees with this narrative. The raid is not over. Adds are still spawning. (1/2)

  13. "The first-ever award for artificial intelligence went to the city of Bamberg. Its BaKIM project analyzes drone images, identifies tree species, and is intended to make it possible to spot weakened trees early. Since April 2026, other municipalities have also been able to have their own images analyzed through a web application. The software, models, and training data are freely available, according to the OSBA."

    heise.de/en/news/When-agencies

  14. query: hypothetically, if I were to take the box of our old Pokémon cards home from my parents' house later today, is there any easy way* to, like, assess if there's anything of value in there

    *for a definition of easy that includes me being perfectly happy to do a bunch of manual data entry

    #pokemon #pokemontcg

  15. The first week after launch is not about ranking. It is about confirming three things: crawlers can reach the site, they are actually fetching it, and the contact path works end to end. Everything else can wait until there is data.

    Day 0, before you tell anyone: four things that block indexing silently


    1. A coming-soon or maintenance mode that is still switched on.
    2. A noindex left over from staging. There are two places: a meta tag in the head, and an X-Robots-Tag response header. Check both. Open the page source and search for noindex, then request the page headers with curl -I. The header is the one people forget.
    3. HTTP auth or a site-wide password still enabled.
    4. The same page reachable on more than one hostname (with and without www, or both protocols) with no redirect between them. Pick one, 301 the other.

    One more, before launch rather than after: put the measurement tag on the site. Analytics installed on day 3 means day 1 and 2 have no data at all.

    Test all of this from a phone on mobile data, not from the office wifi, and not while logged in as an administrator. Logged-in views hide caching and coming-soon behaviour.

    Day 1: verification and submission


    • Add a domain property, verified by a DNS TXT record. It covers every subdomain and both protocols in one property, which matters when you are not yet sure whether the canonical host is www or not.
    • Add a URL-prefix property as well if you want per-protocol reporting. It is a second view of the same data, verified separately.
    • Submit the sitemap once.

    Before submitting, open the sitemap in a browser. It has to load, return 200, be valid XML, and contain only canonical URLs that themselves return 200. No redirects, no 404s, no noindexed pages inside it. A sitemap full of redirects teaches the crawler to distrust the whole file.

    Then URL inspection on a handful of pages, not hundreds: home page, one category or service page, one product page, the contact page. "Request indexing" is a queue entry, not a switch. There is a daily quota and no way to buy more.

    Bing: import from Search Console or verify directly, then submit the sitemap there too. Ten minutes, and it feeds the results that are not Google.

    What not to do in week one: resubmitting the sitemap every morning, requesting indexing for every URL, or deleting and recreating the property because nothing shows on day 2.

    Day 2-4: crawl your own site before the crawlers do


    Check that every key URL returns the status you expect. One line per URL, status code first:

    while read -r u; do
    printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' -L "$u")" "$u"
    done < urls.txt

    urls.txt is one URL per line in a plain text file: home, top landing pages, contact, the sitemap, robots.txt.

    Then check, on each page:

    • the canonical tag points at that page itself, not at the home page and not at the other hostname
    • internal links use the canonical hostname; one mixed link is enough to create a duplicate
    • the main text is in the HTML source, not injected by JavaScript. View source, not the rendered DOM.

    Fix these now. Crawlers come back, but they come back on their own schedule, not yours.

    Day 3-7: read the access log


    This is the step people skip, and it is the place that shows what actually happened rather than what you submitted.

    Where the file is. On a managed host, the control panel, usually under access logs or raw logs, rotated daily. On your own server, /var/log/nginx/access.log or /var/log/apache2/access.log. Behind a CDN, the origin log shows the CDN's IP addresses, so you need the CDN's own log or an origin header that carries the real client IP.

    Download a couple of days and work on the copy.

    # Who is hitting the site at all
    awk '{print $1}' access.log | sort | uniq -c | sort -rn | head -20

    # How many requests claim to be a crawler
    grep -Eic 'googlebot|bingbot' access.log

    # Which paths the crawler actually fetched, busiest first
    grep -Ei 'googlebot' access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head -20

    # What we served it
    grep -Ei 'googlebot' access.log | awk '{print $9}' | sort | uniq -c | sort -rn

    The field numbers ($1, $7, $9) assume the combined log format: client IP, identity, user, timestamp, request, status, bytes, referrer, user agent. Check the first line of the file and the server config before trusting them.

    A user agent proves nothing. Anyone can send the word Googlebot. Verify the IP by reverse lookup, then forward-resolve the name it returns and confirm it comes back to the same IP:

    host 66.249.66.1
    # the returned name should sit under googlebot.com or google.com
    host <the-name-it-returned>

    If either lookup fails, or the forward lookup does not return the original IP, that hit was somebody else. Usually a scraper or a monitoring service.

    What real crawling looks like: more than one hit, spread over several days; requests for HTML pages rather than only images and CSS; 200 responses; and a spread of URLs that includes internal pages, not just the home page.

    What it does not look like: a single hit on the home page, a run of hits on the login path, or hits only on assets. Those are fetchers and scanners, not indexing.

    The self-inflicted block. If you switched on a firewall bot rule, a rate limit, or a security feature that blocks suspicious traffic during launch week, check it before concluding anything about the index. The log will show 403s or 429s served to a crawler. That is your own rule, not a search engine decision.

    Inquiries: prove the path works end to end


    Submit the form yourself on launch day, from a network that is not yours, using a mailbox you control. Confirm four separate things:

    1. the thank-you message appears
    2. the notification email arrives
    3. the entry is stored somewhere you can query
    4. the sender address passes SPF, DKIM and DMARC for your domain

    The email is the fragile part. It can fail while the form still looks fine to the visitor. Check the spam folder, then check the host's mail log for the message ID. If the mail path turns out to be unreliable, at least store every submission so nothing is lost.

    Server-side proof that a submission reached you, even when the email did not:

    grep 'POST ' access.log | awk '{print $7, $9}' | sort | uniq -c | sort -rn | head

    A 200 on the form handler means the data arrived somewhere. A 500 means the handler is failing and the visitor saw an error or a blank page. A 429 means your own rate limit ate a real inquiry.

    Separating noise from a real inquiry. Noise usually looks like this: the same IP hitting the handler several times in a few minutes, fields that are empty or obviously generated, a message body that is only a link, a referrer from a directory site. A real one usually has a company name you can look up, a reply-to address that matches the domain in the message, and a specific question about a specific thing.

    That is a set of heuristics, not a rule. Read the message.

    The week-one sheet


    One place, filled in daily. Five minutes a day.

    WhatWhereNormal in week onePages known / indexedSearch Console pages reporta small number, growing slowlyCrawl requestsaccess log, filtered by verified crawler IPsa handful per day, spread across URLs4xx / 5xx on canonical URLsaccess logclose to zeroForm POSTsaccess logequals the number of inquiries you receivedInquiriesinbox or a shared sheetany number, including zeroTop referrersanalyticsmostly direct and your own links early on


    The form POST count and the inquiry count should match. If they do not, you have a delivery problem, not a traffic problem.

    What not to conclude in week one


    • Zero indexed pages on day 3 is not a penalty.
    • Zero inquiries from fifteen visitors is not a conversion problem. It is a traffic problem, and it is too early to see either.
    • Do not rewrite the site on five days of data.
    • Do not resubmit anything twice. Once is the instruction; the second time is noise in your own process.

    The whole first week is a verification exercise: is the door open, is anyone walking through it, and does the contact path actually deliver. Everything after that is content, which runs on a much slower clock.#seo #startup #webdev #software #coding #development #engineering #inclusive #community
    Launch week: what to submit, what the logs should show, and how to tell a real inquiry from noise

  16. IC Brief Morning — 2026-10-25

    Russian intelligence operations are diversifying across orbital, proxy, and embedded-agent vectors as Iranian lethal plotting drives embassy drawdowns, stretching Western services across domains. A repeat Russian satellite approach within 10 km of a Western spacecraft by November 30 is unlikely, and a US military strike on Iranian territory by the same date is unlikely. High confidence in both reflects consistent multi-source reporting. Moscow retains orbital geometry to close again; the DNI memo backs drawdowns, not strikes.

    Russia's human-intelligence infrastructure includes a registered Israeli think tank linked to a Russian presidential directorate that placed paid journalists near Knesset access, and a Ukrainian citizen arrested in Germany for collecting armored-vehicle data from defense industry contacts. German prosecutors are unlikely to charge the suspect within 90 days. NATO supplier firms face a vetting gap that expulsions do not close, absent a shift from Russian non-traditional cover.

    A halt to US intelligence sharing with Ukraine by late November is unlikely, as CIA operational tempo constrains a cutoff, though a Ukrainian strike on Russian energy infrastructure remains the strongest trigger for a presidential order. Moderate confidence rests on anonymous sourcing. Convicted Brazilian intelligence chief Ramagem is very unlikely to face US custody by November 30; ICE's release and the expelled police liaison signal political protection.

    icbrief.org/icbrief/

  17. It is currently clear in #Tshwane, with a temperature of 27°C (Feels like 26°C).

    Over the next 8 hours, the forecast is for a maximum of 34°C, with a 0% chance of precipitation.

    #Gauteng #SouthAfrica #Weather

    * Data provided by @openmeteo

  18. PipeWire 1.6.10 Is Out to Improve JACK, Bluetooth, Pulse Server, and ALSA Plugin:
    9to5linux.com/pipewire-1-6-10-

    Linux Kernel 7.3 Release is Good News For Gamers Short on VRAM:
    itsfoss.com/news/linux-kernel-

    Linux 7.4 Block Updates Range From Floppy Disk Driver Fixes To Apple M4 NVMe Support:
    phoronix.com/news/Linux-7.4-Bl

    GNU Linux-Libre 7.3 Kernel Released for Those Seeking 100% Freedom for Their PCs:
    9to5linux.com/gnu-linux-libre-

    Fwupd 2.1.9 Linux Firmware Updater Released with New Features:
    9to5linux.com/fwupd-2-1-9-linu

    Fwupd Working Toward Proper Android Integration:
    phoronix.com/news/Fwupd-To-And

    Several Linux Kernel Vulnerabilities Accidentally Posted To Public Kernel Mailing List:
    phoronix.com/news/LKML-New-Tre

    This Newly Proposed Linux Filesystem Can Fix Corrupted Data:
    itsfoss.com/news/beamfs-linux-

    BFS Removed With Linux 7.4 As Old UnixWare File-System:
    phoronix.com/news/BFS-Removed-

    HPFS Is The Latest File-System Facing Possible Removal On Linux:
    phoronix.com/news/HPFS-For-Lin

    Borealis: Asahi Linux's Apple Silicon Mesa Vulkan Driver Forked For Vibe Coding:
    phoronix.com/news/Borealis-Vul

    systemd Merges Support For Rust Programs:
    phoronix.com/news/systemd-Merg

    XanMod Releases Linux 7.2.12 and 6.18.58 Kernels for x86-64:
    linuxcompatible.org/story/xanm

    XanMod 7.3.0-xanmod1 Kernel Released on Linux 7.3:
    linuxcompatible.org/story/xanm

    Liquorix Linux Kernel 7.2-21 Lands with Swap Rework, Steps Back from Experimental Memory Code:
    linuxcompatible.org/story/liqu

    Samba 4.25.1 Release: CVE Fixed Without Security Advisory:
    linuxcompatible.org/story/samb

    Mesa Loosens Rules Around AI Agents For Code Comments / Commit Messages:
    phoronix.com/news/Mesa-Loosens

    (Post 4/7)

    #WeeklyNews #News #Linux #LinuxNews #PipeWire #LinuxKernel #LinuxLibre #Fwupd #BFS #HPFS #BeamFS #Borealis #Systemd #XanMod #Liquorix #LiquorixKernel #Samba #Mesa #FosseryTech

  19. 🚀 How to Deploy #Directus on #Ubuntu #VPS

    This guide details the steps required to deploy Directus on Ubuntu VPS server. Our guide walks through deploying Directus on a fresh Ubuntu VPS with PostgreSQL, PM2, and Nginx.
    What is Directus?
    Directus is an open-source headless CMS and data platform that sits on top of a SQL database (like #PostgreSQL or ...
    Continued 👉 blog.radwebhosting.com/deploy- #contentmanagement #letsencrypt #ufw #selfhosted #selfhosting #opensource #nodejs #cmsapps #headlesscms

  20. Building an e-commerce application with React involves much more than displaying products and adding a shopping cart. A production-ready storefront needs predictable state management, responsive product listings, reliable cart calculations, accessible interfaces, and a checkout flow that customers can trust.

    In my experience, the biggest challenge is keeping the shopping experience consistent as users browse products, change quantities, apply discounts, and move toward checkout. React makes this easier by breaking the interface into reusable components and allowing the UI to respond automatically to changes in application state.

    In this guide, we will build a small e-commerce storefront using modern JavaScript and React-inspired component architecture. We will explore product data, cart operations, inventory validation, discount calculations, and order summaries while keeping the example simple enough to run directly in Node.js.

    Designing a Maintainable React E-commerce Application


    A maintainable e-commerce application starts with clear separation of responsibilities. Product data should remain independent of UI components, cart operations should follow predictable rules, and pricing calculations should live in reusable functions rather than being duplicated across screens. This structure makes features easier to test and reduces the risk of inconsistent totals.

    React components work particularly well for product cards, product grids, cart items, quantity controls, and checkout summaries. Each component receives the data it needs through props, while shared cart state can be managed with useState, useReducer, or a dedicated state management library as the application grows. For a larger storefront, Context or Redux Toolkit can help coordinate state across routes without passing props through every intermediate component.

    The following runnable JavaScript example implements the core business logic behind a storefront. It uses an in-memory product catalog, validates inventory, supports adding and removing products, calculates discounts and shipping, and generates a final order summary. The example runs in Node.js without external dependencies; its functions can later be connected to React components and backend APIs.

    One important production consideration is that the browser must never be the authority for prices, inventory, or payments. A real checkout should send product identifiers and quantities to a trusted backend, which retrieves current prices, validates stock, recalculates totals, and creates a payment session through a payment provider. The frontend should display the resulting server-confirmed order state rather than treating client-side calculations as proof of payment.

    /*
    * Minimal e-commerce business logic.
    * Run with: node ecommerce.js
    * This example uses in-memory data and no external packages.
    */

    console.log("STEP 1: Initialize the product catalog");

    const products = [
    { id: "p101", name: "Wireless Headphones", price: 2499, stock: 8 },
    { id: "p102", name: "Mechanical Keyboard", price: 3999, stock: 5 },
    { id: "p103", name: "USB-C Hub", price: 1499, stock: 12 }
    ];

    // Keep cart entries small: product ID and selected quantity.
    const cart = new Map();

    function findProduct(productId) {
    return products.find((product) => product.id === productId);
    }

    console.log("Available products:");
    products.forEach((product) => {
    console.log(`- ${product.name}: ₹${product.price}`);
    });

    console.log("\nSTEP 2: Add products to the cart");

    function addToCart(productId, quantity = 1) {
    const product = findProduct(productId);

    if (!product) {
    throw new Error(`Product ${productId} does not exist.`);
    }

    if (!Number.isInteger(quantity) || quantity < 1) {
    throw new Error("Quantity must be a positive integer.");
    }

    const currentQuantity = cart.get(productId) || 0;
    const requestedQuantity = currentQuantity + quantity;

    // Validate the requested quantity against available stock.
    if (requestedQuantity > product.stock) {
    throw new Error(`Only ${product.stock} units of ${product.name} are available.`);
    }

    cart.set(productId, requestedQuantity);
    console.log(`Added ${quantity} x ${product.name} to the cart.`);
    }

    addToCart("p101", 2);
    addToCart("p103", 1);

    console.log("\nSTEP 3: Update a cart quantity");

    function updateQuantity(productId, quantity) {
    if (!cart.has(productId)) {
    throw new Error("This product is not in the cart.");
    }

    if (!Number.isInteger(quantity) || quantity < 0) {
    throw new Error("Quantity must be a non-negative integer.");
    }

    const product = findProduct(productId);

    if (quantity > product.stock) {
    throw new Error("Requested quantity exceeds available inventory.");
    }

    // A quantity of zero removes the product entirely.
    if (quantity === 0) {
    cart.delete(productId);
    console.log(`Removed ${product.name} from the cart.`);
    return;
    }

    cart.set(productId, quantity);
    console.log(`Updated ${product.name} quantity to ${quantity}.`);
    }

    updateQuantity("p103", 2);

    console.log("\nSTEP 4: Calculate the subtotal");

    function calculateSubtotal() {
    let subtotal = 0;

    for (const [productId, quantity] of cart.entries()) {
    const product = findProduct(productId);
    subtotal += product.price * quantity;
    }

    return subtotal;
    }

    const subtotal = calculateSubtotal();
    console.log(`Cart subtotal: ₹${subtotal.toFixed(2)}`);

    console.log("\nSTEP 5: Apply a discount code");

    function calculateDiscount(subtotal, code) {
    const discountCodes = {
    SAVE10: { percentage: 10, minimumSpend: 1000 },
    SAVE20: { percentage: 20, minimumSpend: 5000 }
    };

    const discount = discountCodes[code];

    if (!discount || subtotal < discount.minimumSpend) {
    console.log("No discount applied.");
    return 0;
    }

    // Round currency to two decimal places.
    const amount = subtotal * discount.percentage / 100;
    console.log(`${code} applied: ${discount.percentage}% off.`);
    return Math.round(amount * 100) / 100;
    }

    const discount = calculateDiscount(subtotal, "SAVE10");
    console.log(`Discount: ₹${discount.toFixed(2)}`);

    console.log("\nSTEP 6: Calculate shipping and the final total");

    function calculateShipping(subtotalAfterDiscount) {
    // Example business rule: free shipping on orders of ₹3,000 or more.
    return subtotalAfterDiscount >= 3000 ? 0 : 99;
    }

    const taxableAmount = Math.max(0, subtotal - discount);
    const shipping = calculateShipping(taxableAmount);
    const total = taxableAmount + shipping;

    console.log(`Amount after discount: ₹${taxableAmount.toFixed(2)}`);
    console.log(`Shipping: ₹${shipping.toFixed(2)}`);
    console.log(`Order total: ₹${total.toFixed(2)}`);

    console.log("\nSTEP 7: Generate an order summary");

    function createOrderSummary() {
    const items = Array.from(cart.entries()).map(([productId, quantity]) => {
    const product = findProduct(productId);

    return {
    productId,
    name: product.name,
    quantity,
    unitPrice: product.price,
    lineTotal: product.price * quantity
    };
    });

    return {
    items,
    subtotal,
    discount,
    shipping,
    total,
    currency: "INR"
    };
    }

    const order = createOrderSummary();
    console.log(JSON.stringify(order, null, 2));

    console.log("\nSTEP 8: Prepare for a backend checkout");

    function createCheckoutPayload() {
    // Send IDs and quantities, not trusted client-calculated prices.
    return {
    items: Array.from(cart.entries()).map(([productId, quantity]) => ({
    productId,
    quantity
    }))
    };
    }

    console.log("Checkout request payload:");
    console.log(JSON.stringify(createCheckoutPayload(), null, 2));
    console.log("The backend must validate prices, inventory, and payment status.");

    Conclusion


    React provides a strong foundation for building e-commerce applications because its component model encourages reusable interfaces and predictable UI updates. When product data, cart operations, and pricing rules are separated into focused modules, developers can introduce features without turning the storefront into a difficult-to-maintain codebase.

    The example demonstrates the fundamentals, but production applications need additional safeguards, including server-side price validation, secure payment processing, persistent carts, authentication where appropriate, error handling, and automated tests. Inventory should be reserved and orders should be created through carefully designed backend workflows, especially when multiple customers can purchase the same product simultaneously.

    My recommendation is to start with a small, working storefront and introduce complexity only when the requirements justify it. Build reusable React components, keep business rules testable, measure performance on real devices, and treat checkout security as a core requirement from the beginning.

    What has been the biggest challenge in your React e-commerce projects: cart state management, performance, or integrating a reliable checkout flow?#javascript #react #webdev #ecommerce #software #coding #development #engineering #inclusive #community
    Building E-commerce Applications with React: A Practical Guide

  21. 🚨 EUVD-2026-109323

    📊 Score: 5.3/10 (CVSS v3.1)
    📦 Product: Pig, Pig
    🏢 Vendor: pig-mesh
    📅 Updated: 2026-10-24

    📝 A flaw has been found in pig-mesh pig up to 4.1.0. This impacts the function orderItem.getColumn of the file pig-common/pig-common-data/src/main/java/com/pig4cloud/pig/common/data/resolver/SqlFilterArgumentResolver.java. Executing a manipulation of the a...

    🔗 euvd.enisa.europa.eu/vulnerabi

    #cybersecurity #infosec #euvd #cve #vulnerability

  22. #MapQuest lets you track #Flock cameras
    Want to avoid Flock cameras on your commute? MapQuest can help.
    Users can now track nearby Flock cameras and other #surveillance systems using the platform's new Surveillance Layer, released. The layer includes location data for #APLR and other cameras from almost a dozen companies: Flock, #MotorolaSolutions (#Vigilant), #Genetec, #AxisCommunications, #Axon, #Leonardo (#ELSAG), #Neology, #Rekor, #PlateSmart, #Ubicquia, and #Verkada.
    mashable.com/tech/mapquest-fus

  23. 'When wildfire smoke drifts over a city or a heat wave blankets a community, doctors and nurses see the results firsthand. Asthma attacks, heart attacks, strokes, and heat-related illnesses surge.

    Dr. Cynthia Mahoney, a retired California internist and nephrologist, helps lead Climate Health • Civic Health, an all-volunteer alliance of health professionals and organizations, alongside colleagues Margie Chen and Karina Maher.

    Yale Climate Connections spoke with Mahoney about how climate change affects our health, why data centers have galvanized action, and what readers can do leading into Election Day.''

    yaleclimateconnections.org/202

    #ClimateChange

  24. 🚨 Exploit published for a critical Adobe Commerce and Magento Open Source account takeover vulnerability; CVE-2026-71362

    Exploit: github.com/mahumadad/cve-2026-

    The flaw is an incorrect authorization issue that can allow an attacker to manipulate customer-session identity state and gain access to another customer's account without knowing their password.

    Adobe rates the issue as critical and says exploitation requires no authentication or user interaction.

    CVSS: 9.1 Critical
    Affected: Adobe Commerce and Magento Open Source through the July 2026 isolated-patch level
    Fixed: August 2026 isolated-patch level

    Successful exploitation can expose customer PII, orders, addresses, and stored payment-related data associated with the compromised account.

  25. It is currently clear in #Tshwane, with a temperature of 22°C (Feels like 21°C).

    Over the next 8 hours, the forecast is for a maximum of 26°C, with a 0% chance of precipitation.

    #Gauteng #SouthAfrica #Weather

    * Data provided by @openmeteo

  26. I run the WooCommerce store behind a small online clothing shop. Most of the orders are made to order and ship from print partners in several countries, so the delivery promise differs by destination. Google's merchant listings can show that promise, and the return window, right in search results, but only if the product markup says so. WooCommerce's built-in Product schema does not.

    This post walks through adding hasMerchantReturnPolicy and shippingDetails to the offer that WooCommerce already prints, without a plugin.

    What WooCommerce outputs by default


    WooCommerce prints JSON-LD for each product through the WC_Structured_Data class. The offer part comes from generate_product_data(), and before it is added to the markup it passes through a filter:

    apply_filters( 'woocommerce_structured_data_product_offer', $markup_offer, $product );

    That filter is the cleanest place to hook in. It receives one offer array and the WC_Product, and whatever you return becomes the offer in the final JSON-LD.

    The return policy


    Schema.org models returns as a MerchantReturnPolicy. For a fixed return window, Google wants the country it applies to, the category of the policy and the number of days. The shop in this example accepts returns for 30 days.

    function shop_return_policy() {
    return array(
    '@type' => 'MerchantReturnPolicy',
    'applicableCountry' => 'US',
    'returnPolicyCategory' => 'https://schema.org/MerchantReturnFiniteReturnWindow',
    'merchantReturnDays' => 30,
    'returnMethod' => 'https://schema.org/ReturnByMail',
    );
    }

    Add returnFees only if you can state it truthfully for every product. Leaving out a property is better than guessing.

    Shipping details per destination


    Delivery time is split into handling time (the days before the parcel leaves) and transit time. Here processing takes 1 to 5 business days, and transit depends on the region, so the code builds one OfferShippingDetails entry per country:

    function shop_shipping_details() {
    $transit = array(
    'US' => array( 8, 15 ),
    'CA' => array( 8, 15 ),
    'GB' => array( 8, 15 ),
    'AU' => array( 10, 20 ),
    );

    $details = array();
    foreach ( $transit as $country => $days ) {
    $details[] = array(
    '@type' => 'OfferShippingDetails',
    'shippingDestination' => array(
    '@type' => 'DefinedRegion',
    'addressCountry' => $country,
    ),
    'shippingRate' => array(
    '@type' => 'MonetaryAmount',
    'value' => SHOP_SHIPPING_RATE, // your real rate for this destination
    'currency' => 'USD',
    ),
    'deliveryTime' => array(
    '@type' => 'ShippingDeliveryTime',
    'handlingTime' => array(
    '@type' => 'QuantitativeValue',
    'minValue' => 1,
    'maxValue' => 5,
    'unitCode' => 'DAY',
    ),
    'transitTime' => array(
    '@type' => 'QuantitativeValue',
    'minValue' => $days[0],
    'maxValue' => $days[1],
    'unitCode' => 'DAY',
    ),
    ),
    );
    }
    return $details;
    }

    The rate is a constant here on purpose. If the rate differs by country or by cart total, read it from your shipping zones instead of hard-coding one number for everything.

    Hooking it in


    add_filter( 'woocommerce_structured_data_product_offer', function ( $offer, $product ) {
    if ( ! $product instanceof WC_Product || ! $product->is_purchasable() ) {
    return $offer;
    }
    $offer['hasMerchantReturnPolicy'] = shop_return_policy();
    $offer['shippingDetails'] = shop_shipping_details();
    return $offer;
    }, 10, 2 );

    Put this in a small site plugin or in the child theme's functions.php. A site plugin survives a theme switch, which is why I prefer it.

    Checking the result


    View the page source of a product and search for application/ld+json. WooCommerce prints the block near the end of the page. Then paste the product URL into Google's Rich Results Test and into the Schema Markup Validator at validator.schema.org. The first tells you whether the page is eligible for merchant listing features, and the second catches typos in types and property names.

    After a few days, the Merchant listings report in Search Console shows whether Google has picked the fields up across the catalog, along with any products that are missing a required property.#woocommerce #wordpress #php #seo #software #coding #development #engineering #inclusive #community
    Adding return and shipping details to WooCommerce product schema

Share on Mastodon

Enter the server where you have an account.