Using Flask and Yolov2 to Detect event headers in olympic dataset of 2024 on floating headers and camera tracking with area pointers in uLong32

I am using Yolov2 with embedded CVSS for detecting Floating UI elements within any video object instance; in the example found be*low, I was having the AI watch the Olympics, and detect any floating header box upon execution. Using this system, how would I detect:

“LONG WANG”

on the attached photo? Please keep function calls to a minimum as it creates extra memory on my system because I am using the x86 assembly baseloader for my CPU model.

Here is my code thus far:

import cv2 import numpy as np

net = cv2.dnn.readNet("yolov2.weights", "yolov2.cfg") layer_names = net.getLayerNames() output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]

with open("coco.names", "r") as f:
    classes = [line.strip() for line in f.readlines()]

def detect_ui_elements(frame):
    height, width, channels = frame.shape
    blob = cv2.dnn.blobFromImage(frame, 0.00392, (416, 416), (0, 0, 0), True, crop=False)
    net.setInput(blob)
    outs = net.forward(output_layers)
    class_ids = []
    confidences = []
    boxes = []
    for out in outs:
        for detection in out:
            scores = detection[5:]
            class_id = np.argmax(scores)
            confidence = scores[class_id]
            if confidence > 0.5:
                center_x = int(detection[0] * width)
                center_y = int(detection[1] * height)
                w = int(detection[2] * width)
                h = int(detection[3] * height)
                x = int(center_x - w / 2)
                y = int(center_y - h / 2)
                boxes.append([x, y, w, h])
                confidences.append(float(confidence))
                class_ids.append(class_id)
    indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)
    for i in range(len(boxes)):
        if i in indexes:
            x, y, w, h = boxes[i]
            label = str(classes[class_ids[i]])
            confidence = confidences[i]
            color = (0, 255, 0)
            cv2.rectangle(frame, (x, y), (x + w, y + h), color, 2)
            cv2.putText(frame, f"{label} {confidence:.2f}", (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2)
    return frame



And the #assembly which is the problem:

section .data
    video_file db 'video.mp4', 0
    buffer_size equ 4096
    buffer times buffer_size db 0

section .bss
    fd resb 4
    nread resb 4

section .text
    extern fopen, fread, fclose, puts
    global _start

_start:
    ; Open the video file
    push video_file
    push dword 'r'
    call fopen
    add esp, 8
    mov [fd], eax

    ; Read from the file into the buffer
    mov eax, [fd]
    push dword buffer_size
    push buffer
    push eax
    call fread
    add esp, 12
    mov [nread], eax

    ; Display a message (simplified, no actual frame handling)
    push buffer
    call puts
    add esp, 4

    ; Close the file
    mov eax, [fd]
    push eax
    call fclose
    add esp, 4

    ; Exit the program
    mov eax, 1
    xor ebx, ebx
    int 0x80

Why doesn’t this work?

My computer doesn’t seem to load the yolov2 model.

enter image description here

TypeScript 5.5.4: tsc –extendedDiagnostics not showing JavaScript and TypeScript code lines

I have a problem with TypeScript 5.5.4. When running “tsc –extendedDiagnostics”, the output no longer shows the lines of JavaScript and TypeScript code. I have checked my tsconfig.json file and cannot find any configuration that might be causing this. Has anyone else experienced this issue?

When running tsc –extendedDiagnostics, I expect the report to return the following:

Lines of Definitions: 105992
Lines of TypeScript: 18361
Lines of JavaScript: 13154
Lines of JSON: 50974
Lines of Other: 0

Designing a MongoDB Database for a Spreadsheet-like Application with Mergeable Cells

I’m working on a project to create a web application similar to Excel, where users can edit cells in a spreadsheet. I need help designing the database schema using MongoDB to support the following features:

  1. Editable Cells: Users should be able to edit the content of individual cells.

  2. Merge/Unmerge Cells: Users should be able to merge multiple cells into one and later unmerge them.

  3. Persistent State: The state of the cells (including merged cells) should be saved so that users see the same configuration when they return to the page|

    How can I design a MongoDB schema to handle these requirements effectively? Any advice on best practices or potential pitfalls would be greatly appreciated.

I was thinking about a collection for the spreadsheets and another for the cells, but I’m not sure how to represent merged cells. Here’s a rough idea:

{
  "spreadsheets": [
    {
      "_id": "spreadsheet_id",
      "name": "Spreadsheet 1",
      "cells": [
        {
          "cell_id": "A1",
          "content": "Data",
          "merged_with": ["A2", "A3"]
        },
        {
          "cell_id": "A2",
          "content": "",
          "merged_with": ["A1", "A3"]
        },
        {
          "cell_id": "A3",
          "content": "",
          "merged_with": ["A1", "A2"]
        }
      ]
    }
  ]
}

How to embed a google extension into the browser itself?

Screenshot of example

Currently for my extension I’m developing, I have to inject HTML into the webpage directly but I see this extension Amino and some others are independent from reloading webpages and live inside of the web browser itself. Is there a link to how to accomplish this because I cannot find it no matter how much I have searched.

What exactly is it about my RedirectAttributes object after Object Mapper maps JSON to my Spring model causing things to return status code 400?

My whole HTML/JSP is pretty standard with JSTL tags to help with databinding while I send off JSON via JS. Submit the form data as JSOn via Fetch and off it goes to the controller with @RequestBody annotations and a RedirectAttributes redirect. Every part of my layers within the application is working as it needs to. DTO, Service, Exceptions and so on. Once I actually try to addFlashAttributes to redirect to another URL, I get status code 400.

I’m going to start with my HTML/JSP, JS for the form data, show the configuration I have so far in my Servlet config class, and the controller. Then show the result page and the JS script src.


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<!DOCTYPE html>
    <html lang="en">
        <head>
            <title> Ken </title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
            <meta name="description" content="Kenneth's thingy">
            <meta name="author" content="Kenneth Steven Lee">
            <link rel="stylesheet" type="text/css" href="/untitled2/URLtoResources/css/stuff.css">
            <script type="text/javascript" src="/untitled2/URLtoResources/javascript/stuff.js" defered></script>
        </head>
        <body>
            
    <h2> Please post student here </h2>
    <form:form name="getForm" action="postStudent" modelAttribute="student_guy" id="studentForm" method="post" enctype="multipart/form-data
        <p> 
        <form:input path="id" type="number" autocomplete="off" id="first" /> <form:errors path="id" /> </p>
        <p> 
        <form:input path="name" type="text" autocomplete="off" id="second" /> <form:errors path="name" /></p>
        <p> 
        <form:input path="mobile" type="number" autocomplete="off" id="third" /> <form:errors path="mobile" /></p>
    <p> 
        <form:input path="country" type="text" autocomplete="off" id="fourth" /> <form:errors path="country" /></p>
    <input type="submit" value="submit" id="studentFormThing" />
    </form:form>
        </body>
    </html>
"use script"

window.addEventListener("load", () =>
{
    const form_Issue = document.forms["getForm"];
    
    
    async function postData(form_Issue)
    {
        try 
        {
            const formData = new FormData(form_Issue);
                
            const thing = Object.fromEntries(formData);
            console.log(JSON.stringify(thing));
            
            const response = await fetch("/untitled2/something/postStudent", {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify(thing)
            });
            const result = response.json();
            console.log("the shit is going " + result);
        }
        catch (e)
        {
            console.error(e);
        }
    }
    
    form_Issue.addEventListener("submit", (event) => {
        postData(form_Issue);
    })
    
})
package org.ken;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.ken.Service.StudentServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.List;
import org.hibernate.validator.internal.util.stereotypes.Lazy;
import org.ken.Model.Student;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.validation.Validator;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

@Controller
@RequestMapping("/something")
public class WebController {
    @Autowired
    ObjectMapper objectmapper;
    
    @Autowired
    StudentServiceImpl student_service;
    
    @GetMapping("/studentpost")
    public String getStudent(@ModelAttribute("student_guy") Student student_guy, Model model)
    {
        model.addAttribute("student_guy", student_guy);
        return "index";
    }
    
    @PostMapping(value = "postStudent", consumes = {"application/json", "multipart/form-data"})
    public String postStudent(@RequestBody String student_guy_two, BindingResult error, RedirectAttributes redirect) throws JsonMappingException, JsonProcessingException
    {
        Student student_guy_three = objectmapper.readValue(student_guy_two, Student.class);
        
        if (error.hasErrors())
        {
            return "error";
        }
        
        student_service.insert(student_guy_three);
        
        redirect.addFlashAttribute(student_guy_three);
      
        return "redirect:/something/student";
    }
   
    @GetMapping(value = "/student")
    public String getList(@ModelAttribute("student_guy") Student student_guy, Model model)
    {
        List<Student> test_list = /**/student_service.getStudent();
        model.addAttribute("student", test_list);
        return "result";
    }
}

package org.ken;

import jakarta.servlet.ServletContext;

import jakarta.servlet.annotation.MultipartConfig;
import org.apache.commons.dbcp2.BasicDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.format.FormatterRegistry;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.transaction.TransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.context.annotation.RequestScope;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.resource.VersionResourceResolver;
import org.springframework.web.servlet.view.ContentNegotiatingViewResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

import org.springframework.web.multipart.support.StandardServletMultipartResolver;

import java.util.ArrayList;
import java.util.List;

import javax.sql.DataSource;

@Configuration
@EnableWebMvc
@EnableTransactionManagement(proxyTargetClass = true)
@ComponentScan("org.ken")
public class WebServletInit implements WebMvcConfigurer {
    
    @Override
    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
    configurer.defaultContentType(MediaType.APPLICATION_JSON);
    }
    
    @Bean MappingJackson2JsonView jsonView()
    {
        MappingJackson2JsonView js = new MappingJackson2JsonView();
        js.setPrettyPrint(true);
        return js;
    }
    
    @Bean
    public ViewResolver contentNegotiationViewResolver(ContentNegotiationManager manager)
    {
        ContentNegotiatingViewResolver viewresolver = new ContentNegotiatingViewResolver();
        viewresolver.setContentNegotiationManager(manager);
        List<View> views = new ArrayList<>();
        views.add(new MappingJackson2JsonView());
        viewresolver.setDefaultViews(views);
        return viewresolver;
    }
    
    @Bean
    @Primary
    public ObjectMapper objectMapper() {
        final ObjectMapper mapper = new ObjectMapper();
        return mapper;
      }
    
    @Bean
    public MappingJackson2HttpMessageConverter objectMapper1(){
        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
        Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
        converter.setObjectMapper(builder.build());
        return converter;
    }
    
     @Override
     public void configureDefaultServletHandling(DefaultServletHandlerConfigurer config)
     {
        config.enable();
     }
     
     
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) 
    {
          VersionResourceResolver versionResolver = new VersionResourceResolver().addContentVersionStrategy("/**");
          
          
          ResourceHandlerRegistration resourceRegistration = registry.addResourceHandler("/URLtoResources/**").addResourceLocations("/resources/");
    }
   
    @Bean
    public MultipartResolver multipartResolver() {
        return new StandardServletMultipartResolver();
    }

    @Bean
    public InternalResourceViewResolver getInternalResourceViewResolver(){
        InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
        viewResolver.setPrefix("/WEB-INF/");
        viewResolver.setSuffix(".jsp");
        return viewResolver;
    }
    
    
    
    @Bean
    public DataSource dataSource()
    {
        BasicDataSource dataSource = new BasicDataSource();

        dataSource.setUsername("root");
        dataSource.setPassword("REVOLVEr10101!");
        dataSource.setUrl("jdbc:mysql://localhost:3306/school?allowPublicKeyRetrieval=true&useSSL=false");
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");

        return dataSource;
    }
    
    @Bean(name = "applicationJdbcTemplate")
    public JdbcTemplate applicationDataConnection(){
        return new JdbcTemplate(dataSource());
    }

    @Bean
    public TransactionManager transactionManager(DataSource dataSource)
    {
        return new DataSourceTransactionManager(dataSource);
    }
    
}

<!DOCTYPE html>
    <html lang="en">
        <head>
            <title> Ken </title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
            <meta name="description" content="Kenneth's thingy">
            <meta name="author" content="Kenneth Steven Lee">
            <script type="text/javascript" src="/untitled2/URLtoResources/javascript/stufftwo.js" defered></script>
        </head>
        <body>
            <h1> Big pimpin </h1>
            ${student}
            <br>
            <c:forEach var="guy" items="${student}">
                ${guy}
                <br>
            </c:forEach>
        </body>
    </html>

"use strict"

window.addEventListener("load", () =>
{
    
})

At this point, all I was expecting was just for JSON to data bind with Object Mapper and send off the instance of the class with redirection via addFlashAttribute(student_guy_three). I wanted everything added into the database with a clean redirection with all the list of java object. ALl I get back is status code 400.

React. How to set a column value that depends on another column

I’m new to development. I’m just studying the TS JS reaction. I can’t handle it. I get it from the employee’s database. Columns name, city of residence and city of employment. It is necessary not to display the city of employment if the city of the device coincides with the column of residence. I can’t pull out the data to put in variables for comparison.

I read the documentation, tried useState, useReducer and a lot of other things, but nothing…….

<div className={""}>
            <Table
                className={"settings-table"}
                columns={[{caption: Translate.NAME, accessorKey: 'name'},
                    {caption: Translate.CITYOFRESIDENCE, accessorKey: 'city_residence'},
                    {caption: Translate.CITYOFEMPLOYMENT, accessorKey: 'city_employment'},
                ]}
                data={this.state.clients.data}
                }}/>
</div>

page.click() not found – Puppeteer in Docker

I am working on automating a website. My script basically enters a website where you must log in to continue the process.

The problem is that apparently the “click” function does not work when it runs on docker (local and headless works), although it finds the selectors, when it is “clicked” it ends up exiting due to timeout. I have read that sometimes this causes problems. Any ideas??

I share some of the code and the versions of docker and puppeteer that I am using.

const selector = "#loginRegisterTabs > ul > li:nth-child(1)";
await page.waitForSelector(selector, { timeout: 30000 });
await page.focus(selector); // Opt
await page.click(selector);

FROM ghcr.io/puppeteer/puppeteer:22.14.0
> "puppeteer": "^22.14.0"

Thanks! Regards

I have already tried waiting for the selector, clicking directly, even focusing on it.
Locally works include headless mode

JavaScript and CSS: How to make a fixed navigation menu transparent when scrolling?

I’ve been researching how to make the navigation bar transparent but I can’t find which mistakes I’ve done. Currently the menu does not change at all could anyone please give me an example of the code I would need to use in order to make it transparent whenever I scroll down.

I am trying to create a fixed navigation menu that will become transparent when the user scrolls down the page. I used the following code:

I expected the menu to gradually become transparent as the user scrolls down, but it remains the original color. Also I tested my code in different browsers to ensure consistent behavior.
I’ve tried adding the following CSS:

.menu {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(45deg, #f00,#00f);
    padding: 10px 0;
    margin-bottom: 40px;
}
.menu .transparent {
    background: linear-gradient(
        45deg,
        rgba(255,0,0,0.8),
        rgba(0,0,255,0.8)
    );
}

Together, this means that the following styles will only apply to elements within the menu when the transparent class is added to them

and here it is on JavaScript:

document.addEventListener('DOMContentLoaded', function () {
    const menu = document.querySelector('.menu');

    function toggleMenuTransparency() {
        if (window.scrollY > 0) {
           menu.classList.add('tranparent')
        }
        else {
            menu.classList.remove('transparent');
        }
    }
    window.addEventListener('scroll', toggleMenuTransparency);
});

How can I resolve an invalid token in js

I am trying to resolve the error. When I verify my touch it marks it as invalid and my req.user as defined

index.js(this is my file)

const express = require('express');
const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const { expressjwt: expressJwt } = require('express-jwt');
const User = require('./user');

const jwtSecret = 'mi-string-secreto';

mongoose.connect('mongodb+srv://prprueba37:[email protected]/auth?retryWrites=true&w=majority&appName=Cluster0');

const app = express();
app.use(express.json());

// Middleware para validar el JWT
const validateJwt = expressJwt({
  secret: jwtSecret,
  algorithms: ['HS256']
});

// Función para firmar el token
const signToken = _id => jwt.sign({ _id }, jwtSecret, { algorithm: 'HS256' });

app.post('/register', async (req, res) => {
  const { email, password } = req.body;

  try {
    const isUser = await User.findOne({ email });
    if (isUser) {
      return res.status(403).send('Usuario existente');
    }
    const salt = await bcrypt.genSalt();
    const hashed = await bcrypt.hash(password, salt);
    const user = await User.create({ email, password: hashed, salt });
    const token = signToken(user._id);
    res.status(201).send({ token });
  } catch (err) {
    res.status(500).send(err.message);
  }
});

app.post('/login', async (req, res) => {
  const { email, password } = req.body;

  try {
    const user = await User.findOne({ email });
    if (!user) {
      return res.status(403).send('Usuario y/o contraseña inválida');
    }
    const isMatch = await bcrypt.compare(password, user.password);
    if (isMatch) {
      const token = signToken(user._id);
      res.status(200).send({ token });
    } else {
      res.status(403).send('Usuario y/o contraseña incorrecta');
    }
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Ruta protegida que requiere autenticación
app.get('/lele', validateJwt, (req, res) => {
  res.send('ok');
});

app.listen(3000, () => {
  console.log('Listening on port 3000');
});

user.js(this is my schematics file)

const mongoose = require('mongoose')

const User = mongoose.model('User', {
    email: {type: String, required: true},
    password: {type: String, required: true},
    salt: {type: String, required: true},
    
})

module.exports = User

I have tried several things but my token is still invalid,
I have the libraries installed but I get some warnings
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This package is no longer supported.

AppScript Events

Please help me on how to code an events in Appscript manually. When I submit the form. It will log the user information that he fillin from the form.

Registration using forms putting in firstname and lastname. Then onSubmit it will log the data in the spreadsheet. but I want to use the event on this.

“X is assignable to the constraint of type ‘T’, but ‘T’ could be instantiated with a different subtype of constraint” for void function

I have a React Context where a function takes in another function as an argument. A generic hook then uses this.

// Context
export type A = { id: string }

const TestProvider = () => {
  function test(doStuff: (a: A) => void) {...}
  return <TestContext.Provider value={{test}}>{children}</TestContext.Provider>
}

// Hook
export function useThing<T extends A>() {
  const { test } = useContext(TestContext)
  const [stuff, setStuff] = useState<T[]>()

  function doStuff(a: T) {
    setStuff([...stuff, a])
  }

  function doMoreStuff() {
    test(doStuff) // The error occurs here
  }
}

I’ve looked at a lot of posts with this same problem, but they all have some sort of return value. How do I fix this for a function that returns nothing?

If I change the function signature in the hook to doStuff(a: Pick<T, 'id'>), the error disappears. However, this will cause an error in the setter function:

Type ‘T | Pick<T, “id”>’ is not assignable to type ‘T’.
‘T | Pick<T, “id”>’ is assignable to the constraint of type ‘T’, but ‘T’ could be instantiated with a different subtype of constraint ‘A’.

Correctly passing parameters to sinon spy

I have the below code:

import { expect } from 'chai'
import * as sinon from 'sinon'
import { runStripeOnboarding } from '../../src/vetting/helper/stripe-onboarding-helper'
import { API } from '../../src/apis'
import { Register, UUID } from '@boostercloud/framework-types'
import { Provider } from '../../src/entities/provider'
import { faker } from '@faker-js/faker'
import * as Capabilities from '../../src/capabilities'
import Stripe from 'stripe'
import * as entityHelpers from '../../src/helpers/entity-helpers'
import * as dataModelTransformation from '../../src/common/datamodel-transformations'
import * as stripeApiHelper from '../../src/helpers/stripe-api-helper'
import * as logger from '../../src/logger'

describe('Stripe Onboarding Helper', () => {
  let provider: Provider, kycId: UUID, bankVettingWorkflowId: UUID, register: Register

  const LOGGER = sinon.replace(
    logger,
    'getLogger',
    sinon.fake.returns({
      info: () => sinon.stub(),
      warn: () => sinon.stub(),
      error: () => sinon.stub(),
    })
  )

  beforeEach(() => {
    const tin = faker.random.alphaNumeric(9)
    const username = faker.internet.userName()
    const baseCurrentUser = {
      id: faker.datatype.uuid(),
      username,
      roles: [Capabilities.KYCSubmitter.name],
      claims: {
        jti: faker.datatype.uuid(),
        validatedTIN: tin,
        validatedTINForDelegation: true,
        otpGenerationTries: 0,
        otpValidated: false,
        username,
        firstName: faker.name.firstName(),
        lastName: faker.name.lastName(),
        email: faker.internet.email(),
      },
    }
    provider = {
      id: faker.random.alphaNumeric(9),
      providerName: 'Test Provider',
      tin: '123456789',
      stripeAccount: undefined,
      status: 'OnboardingAccountCreated',
      salesforceStatus: {
        updateRequired: false,
      },
      latestKYCOrThrow: () =>
        Promise.resolve({
          id: faker.random.uuid(),
          tin,
          status: 'KYCSubmitted',
          statusTransitions: [],
          hasRelatedAcceptedOffer: false,
          hasKYCApprovalExpired: () => false,
          approvalDate: () => faker.datatype.string(25),
        }),
      latestKYC: () =>
        Promise.resolve({
          id: faker.random.uuid(),
          tin,
          status: 'KYCSubmitted',
          statusTransitions: [],
          hasRelatedAcceptedOffer: false,
          hasKYCApprovalExpired: () => false,
          approvalDate: () => faker.datatype.string(25),
        }),
      latestApprovedKYC: () => Promise.resolve(undefined),
      latestUnexpiredApprovedKYC: () => Promise.resolve(undefined),
    }
    kycId = 'kyc-123'
    bankVettingWorkflowId = 'workflow-123'
    register = new Register(faker.datatype.uuid(), {}, sinon.stub(), baseCurrentUser)
  })

  afterEach(() => {
    sinon.restore()
  })

  it.only('should create a new Stripe account if not already exists', async () => {
    sinon.replace(
      API.Stripe.accounts,
      'create',
      sinon.fake.resolves({ id: 'acct_123', created: Date.now() } as unknown as Stripe.Response<Stripe.Account>)
    )
    sinon.stub(API.Stripe.accounts, 'update')
    sinon.replace(
      API.Stripe.accounts,
      'listPersons',
      sinon.fake.resolves({ data: [], has_more: false } as unknown as Stripe.Response<Stripe.ApiList<Stripe.Person>>)
    )
    sinon.replace(entityHelpers, 'getKYCOrThrow', sinon.fake.returns({ submittedKYC: {} }))
    sinon.replace(dataModelTransformation, 'toUnsafeProviderKYCInfo', sinon.fake.resolves({}))
    sinon.replace(
      stripeApiHelper,
      'getStripeReqParams',
      sinon.fake.returns({ paramsToCreateAccount: {}, paramsToAddPersons: [] })
    )

    await runStripeOnboarding(provider, kycId, bankVettingWorkflowId, register)

    expect(LOGGER).to.have.been.calledWith(
      `Created Stripe connected account for the provider - ${provider.providerName}`
    )
  })
})

I want to compare arguments for my LOGGER.info() which, I create using: const LOGGER: Logger = getLogger('StripeVettingHelper') in the same file where runStripeOnboarding() is defined.

When I am running the test, the call count to LOGGER is 0.

What am I doing wrong?

Invitation to Participate in Research on Open-Source Software Contributions

I hope this message finds you well. My name is Vahid Jafarzadeh, and I am conducting research on the motivations and incentives for contributing to open-source software (OSS) projects as part of my graduate studies at Avans Plus University.
The aim of this research is to understand the diverse motivations and factors that drive individuals to contribute to OSS projects. Your experience and insights as an active OSS contributor would be incredibly valuable in helping us explore these motivations and their impact on the OSS ecosystem.
I would like to invite you to participate by answering a few questions via message at your convenience. Your responses will be kept confidential and used solely for academic purposes. Below are the questions I would appreciate your insights on:
1-Can you tell me about your background and how you first became involved in open-source software projects?
2-How long have you been contributing to OSS, and which projects have you contributed to?
3-What motivates you personally to contribute to open-source software projects?
4-How important is personal satisfaction and enjoyment in your decision to contribute to OSS?
5-Can you describe how contributing to OSS projects has helped you develop your skills or advance your career?
6-How do you perceive the role of community and collaboration in your contributions to OSS projects?
7-Can you share an experience where community support or feedback influenced your work on an OSS project?
8-What challenges or barriers have you faced in contributing to OSS projects, and how have you overcome them?
9-Are there any factors that discourage you from contributing more to OSS projects?
10-What would encourage you to increase your involvement or contributions to open-source projects in the future?
11-Are there any specific types of projects or technologies you are particularly interested in contributing to going forward?
Please feel free to respond directly to this message with your answers. If you have any questions or need further clarification, don’t hesitate to reach out. Thank you very much for considering this request. Your insights will be invaluable to the success of this research.

Kind regards,

Please feel free to respond directly to this message with your answers. If you have any questions or need further clarification, don’t hesitate to reach out. Thank you very much for considering this request. Your insights will be invaluable to the success of this research.

How to use css next sibling selector with cached element

I have a cached element and I wish to use that reference to find the next (sibling) element in the DOM tree. Is this possible?

Initially, I thought this could be a use-case for the new :scope rule, but I was reminded that the scope rule only applies to descendent elements (i.e. desired element must be a descendant of the cached element).

const aa = document.querySelector('div');
const bb = aa.querySelector(':scope + aside');
//const bb = aa.querySelector(':scope > aside');

console.log(bb.classList[0]);
<div>Div<aside class="zoe yip xin"> span</aside></div>
<aside class="abe bob cam">Aside</aside>

So, how would one do this?

I am starting with a cached element – how would I use myEl.querySelector(blah blah) to get the sibling of that cached element?

For those desiring, here is a snippet with which to fiddle.

= – = – = – =

Note: I prefer not to use the parentNode or such, since the cached element is reasonably easy to find (has an ID), whereas its sibling (desired element) would be quite difficult to target from the parentNode.