Multiple Attendees for Automated Calendar Invite via Sheets

I hitting an error when I try to add multiple attendees via my spreadsheet. It works with one but when I try comma-separate to include multiple attendees it throws an error:

Error GoogleJsonResponseException: API call to calendar.events.insert failed with error: Invalid attendee email.
createNewEventWithMeet @ Code.gs:34

Link

function createNewEventWithMeet() {

  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName("Calendar_Events");
  var last_row = sheet.getLastRow();
  var data = sheet.getRange("A2:E" + last_row).getValues();
  var cal = CalendarApp.getCalendarById("[email protected]");

  for(var i = 0;i< data.length;i++){

    var event_name = data[i][0];
    var start_time = data[i][1];
    var end_time = data[i][2];
    var event_description = data[i][3];
    var attendees_event = data[i][4];

//.setVisibility(CalendarApp.Visibility.PRIVATE);

  const mst = "-06:00";
  const calendarId = "[email protected]";
  const resource = {
    start: { dateTime: start_time+mst },
    end: { dateTime: end_time+mst },
    attendees: [{ email: attendees_event }],
    conferenceData: {
      createRequest: {
        requestId: "[email protected]",
        conferenceSolutionKey: { type: "hangoutsMeet" },
      },
    },
    summary: event_name,
    description: event_description,
  };
  const res = Calendar.Events.insert(resource, calendarId, {
    
    conferenceDataVersion: 1,
  });

  
  var googleMeet_Link = res.hangoutLink;
  
  console.log(res);
  }
}

I’ve tried to create multiple columns to split it out but I cannot seem to make it work.

Ammo.js body of the character-controller undesirable penetrate deep into static and dynamic objects

The problem is that the character’s controller does not stand on the surface of a static object, but rather sinks into it. This has undesirable side effects. But at the same time, going up the steps works!

enter image description here

I noticed that if I set upAxis == -1, then the element appears on the surface, and it looks like it should, but the climbing the stairs stops working…

enter image description here

Code clippings:

Character controller set:
CC riggid body:

let body = new AMMO.btPairCachingGhostObject();
body.setWorldTransform(transform);
body.setCollisionShape(colShape);
//  DISABLE_DEACTIVATION == 4
body.setActivationState(4);
body.activate(true);
this.world.getBroadphase().getOverlappingPairCache().setInternalGhostPairCallback(new AMMO.btGhostPairCallback());  
body.setCollisionFlags(body.getCollisionFlags() | btCollisionObjectCollisionFlags.CF_CHARACTER_OBJECT); // 16
this.world.addCollisionObject(body);

CC collider:

let collider = new AMMO.btCylinderShape ( new AMMO.btVector3(metadata.params.radius, metadata.params.halfHeight, metadata.params.radius) );

CC btKinematicCharacterController:

let characterController = new AMMO.btKinematicCharacterController(
    body, 
    collider, 
    0.35, //stepHeight
    1 //upAxis
);
characterController .setUseGhostSweepTest(true);
characterController .setGravity(9.8 * 3); // default 9.8*3
characterController .setMaxSlope(Math.PI / 3); // default Math.PI / 4

this.world.addAction(characterController );

Floor set:
Floor riggid body:

let mass = 0;
let motionState = new AMMO.btDefaultMotionState( transform );
let rbInfo = new AMMO.btRigidBodyConstructionInfo( mass, motionState, colShape, localInertia );
body = new AMMO.btRigidBody( rbInfo);
this.world.addRigidBody(body);
body.setCollisionFlags(body.getCollisionFlags() | btCollisionObjectCollisionFlags.CF_STATIC_OBJECT); // 1

Moreover, this penetration occurs precisely in the lower part of the character’s controller. From the side, everything touches as it should.

In this example, dynamic bodies are scattered. They can be pushed by pressing on them from the side. But if you stand on top of them, penetration occurs..
enter image description here

P.S. If my question seemed inappropriate or bad, please do not immediately put a negative in my reputation, it is better to write, and I will correct, clarify the statement.

On appel devices when playing a sound while on zoom call the bilateral sound is gone (bad sound quality) [closed]

I have a web app that plays sounds for some special purposes.
The issue occurs when playing a sound that plays tons on left and right speakers and when on a zoom meet the effect of left and right sound is gone and the sound becomes bad quality.

Is there a solution on the web platform ?

If no then can we implement a solution on android and ios platforms that overrides zoom phone mode and plays the sound with the bilateral quality sound.

SVG rewind works in Firefox, not in Chrome

Here’s a snippet where the user controls the progress of SVG <animate> using a slider. It works in Firefox. But in Chrome, after sliding it to the very end, it stops working.

const input = document.querySelector('input');
const animate = document.querySelector('animate');
const svg = document.querySelector('svg');

animate.beginElement();
svg.pauseAnimations();
const duration = animate.getSimpleDuration();

input.addEventListener('input', function() {
  svg.setCurrentTime(this.value / 100 * duration);
});
<svg>
  <rect x="50" y="50" width="100" height="100" fill="blue">
    <animate id="anim" attributeName="x" from="50" to="200" dur="5s" begin="indefinite" fill="freeze"/>
  </rect>
</svg>

<input type="range" value="0">

The problem can be solved by removing begin="indefinite". But that may limit other use cases or require hacky workarounds.

What are other solutions?
And what’s causing the problem, is it in accordance to spec or likely a bug in Chrome?

Refused to frame ‘https://localhost:5001/’ an ancestor violates Content Security Policy directive: “frame-ancestors ‘self’ https://localhost:5001/”

I set the following CSP: frame-ancestors 'self' https://localhost:5001/

I get an error:

Refused to frame 'https://localhost:5001/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' https://localhost:5001/".

I’ve tried with and without the / and it has not helped.

How to create a two line ellipsis text with some suffix?

I want to create a small card like this with html & css & js, pleas see the picture in the link to see the effect I want to make:

card image sample

You can see in the picture, a card will show ellipsis when text is over two lines. Moreover, an small button is followed after the text and will not create new line.

How can I realize this card?

current code:
html:

<div class="card">
  <p>lost all your money, choose and select a rare card<button>good</button></p>
  <button>good</button>
</div>
.card{
  width: 120px;
  height: 80px;
  border: 1px solid black;
  border-radius: 8px;
  padding: 0px 4px;
  background: white;
}

.card p{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;  
  overflow: hidden;
}

and here is the code sample in codepen: https://codepen.io/Roll-Romam/pen/VYvmvyg

In codepen sample you can see I first put button in p element, it just disappears, and when I put a button outside p element, it just creates a new line.

So maybe using javascript is the only way to realize such card? Or pure css & html can also solve this problem?

frame-ancestors CSP not being observed

I’m getting the following error: Refused to frame '<URL>' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'"

I’m using an Azure Static Web App. I’ve included the following in my staticwebapp.config.json:

"globalHeaders": {
    "Content-Security-Policy": "frame-ancestors 'self' https://alpha.sso.###.com https://sso.###.com;"
  }

And in the response headers I do see:

content-security-policy
frame-ancestors 'self' https://alpha.sso.###.com https://sso.###.com

So why does it think my frame-ancestors policy is none?

Replace leading minus with trailing BCE

I’m not able to use the date module in my CMS because of the historic dates (many are before the common era), I want to use numbers (this provides me with a correct sorting of the items); so when I mean to write 3600 BCE, I can only write -3600. Is there a way to replace the leading minus with a trailing text?

How to integrate Metamask Wallet with Solana DApp?

I tried all AI agents and went through a lot of documentation, but nothing helped so far.

I try to integrate Metamask wallet to my DApp similar way this app does it:
https://app.solayer.org/

I want to:

  1. Connect Metamask Wallet
  2. Request SignMessage
  3. Request SOL Transaction

How to achieve it?
AI agents points me to Metamask Snaps, but all advices reach dead end.
Did anyone manage to integrate this feature?

Custom infinite carousel animation starts to jitter and slow down after running smoothly for a bit

I am working on an an infinite carousel animation – animating the scroll of the parent element instead of the position of the elements. But after running smoothly for a bit the animation slows down and jitters a bit. I’m using anime.js.

The code is called on window.addEventListener("load", () => {...})

The image is duplicated so that I can make the infinitely repeated animation. Also, the image, for most screen sizes, is bigger than the width of the viewport.

I’be been looking at the code, which is not very complicated, but have no idea what could cause this?

const scrollContainer = document.querySelector('#clients-inner');

let scrollAnime; // store the Anime.js animation instance

function createScrollAnimation() {
  const clientImg = scrollContainer.querySelector('.client-item:first-child');
  const maxScrollLeft = scrollContainer.scrollWidth - scrollContainer.clientWidth;
  const scrollBackToSeam = scrollContainer.scrollWidth - scrollContainer.clientWidth - clientImg.clientWidth;
  const duration = maxScrollLeft * 20; // Adjust multiplier for speed (e.g., 20ms per pixel)

  scrollAnime = anime({
    targets: scrollContainer,
    scrollLeft: [{
        value: maxScrollLeft,
        duration: duration,
        easing: 'linear'
      }, // Scroll to end
    ],
    loop: false, // Loop the entire animation timeline
    autoplay: false, // Don't start automatically
    round: 1, // Round scrollLeft values to nearest pixel for smoother results
    complete: function(anim) {
      // When animation reaches the end of the original content,
      // instantly jump back to the beginning, which now looks seamless
      scrollContainer.scrollLeft = scrollBackToSeam;

      anime.remove(scrollContainer); // Remove the previous animation instance
      // Restart the animation for a continuous loop
      init();
    }
  });
}

function startScroll() {
  if (scrollAnime) {
    scrollAnime.play();
  }
}

function stopScroll() {
  if (scrollAnime) {
    scrollAnime.pause();
  }
}

function init() {
  createScrollAnimation();
  startScroll(); // Start scrolling automatically on load
}

// Optional: Pause on hover, resume on mouse leave
scrollContainer.addEventListener('mouseenter', stopScroll);
scrollContainer.addEventListener('mouseleave', startScroll);

// Recalculate animation if container size changes (e.g., window resize)
window.addEventListener('resize', () => {
  stopScroll();
  anime.remove(scrollContainer); // Remove previous animation
  init();
});

init();
<div id="clients-inner" class="inner w-full overflow-x-scroll no-scrollbar text-center">
  <!-- important next div is without spaces for smoother animations -->
  <div id="clients-wrapper"><img class="client-item p-0" src="/assets/images/homepage/clients-5.jpg"><img class="client-item p-0" src="/assets/images/homepage/clients-5.jpg"></div>
</div>

String Escape slect with options

I have items, which are rendered into a dropdown via Javascript (local script). A button to add a new line works locally on my dev web server but doesnt work on production.

I have the impression that it fail due to the things being redendered on production as options have double quotes e.g.
Screw 3″

So this has to be converted to: 3″
if my hypothesis is right.

Is there something out of the box I can use in Javascript or Ruby on Rails to do the conversion? Like <% name = item.name.gsub(""", """) %> or so?

The Script which doesnt work on production:
item.name is rendered as an option names. The name include double quotes.

<script>
    document.getElementById("IncreaseItemPositions").addEventListener("click",
        function(){
            event.preventDefault();
            var table = document.getElementById("StockTable");
            amountPositions = parseInt(table.getAttribute("positions"));
            var row = table.insertRow();
            // count is index already (starting count at 0) hence increase Positions doesnt have to be changed
            // before updating attribute & adding new row to table
            table.setAttribute("positions", amountPositions)
            // 1
            var cell = row.insertCell();
            cell.innerHTML = "<select " +
                "name="warehouse[stocks_attributes]["+amountPositions+"][item_id]" id="warehouse_stocks_attributes_"+amountPositions+"_item_id">" +
                "<option value=""\></option>"+
                <% @items.each do |item| %>
                  "<option value="<%= item.id %>"><%= item.name%></option>"+
                <% end %>
              "</select>";
            // 2
            cell = row.insertCell();
            cell.innerHTML = "0";
            //3
            cell = row.insertCell();
            cell.innerHTML = "+ <input type="text" name="warehouse[stocks_attributes]["+amountPositions+"][added_quantity]" id="warehouse_stocks_attributes_"+amountPositions+"_added_quantity">";
            console.log("Stock positions increased");
        }
    );
</script>

Text not displayed in modal despite the results

I have a function PurgeXYZs in the page’s aspx.cs file and the page is also linked to a JS file for frontend, i am trying to get results of the function “managexyz.aspx/PurgeXYZs” which are boolean properties (allDeleted and someDeleted) of ‘result’ and the text of my modal shown after execution changes accordingly to their values :

    function handlePurgeXyz(data) {
        return new Promise((resolve, reject) => {
            $.ajax({
                type: "POST",
                url: "managexyz.aspx/PurgeXYZs",
                data: JSON.stringify({
                    kmacViewModels: data,
                }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    const result = {
                        errorCode: data.d.ErrorCode,
                        message: data.d.Message,
                        allDeleted: data.d.AllDeleted,
                        someDeleted: data.d.SomeDeleted
                    };
                    resolve(result);
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    reject(new Error(textStatus));
                },
                complete: function (data) {
                    $("spn_modal_close_purge_xyz").removeClass("disabled");
                    $("spn_modal_ok_purge_xyz").removeClass("disabled");
                }
            });
        });
    }

    async function PurgeXyz(data) {
        try {
            const result = await handlePurgeXyz(data);
            let message = "";

            if (result.AllDeleted) {
                message = $("#model_content_xyz_msg_all").text();
            } else if (result.SomeDeleted) {
                message = $("#model_content_xyz_msg_some").text();
            } else {
                message = $("#model_content_xyz_msg_none").text();
            }

            $("#model_body_content_purge_xyz").text(message);
            $("#modal-dialog-purge-xyz").modal('show');

            if (result.AllDeleted || result.SomeDeleted) {
                await reloadDatatable();
            }

        } catch (error) {
            console.error(error);
            $("#model_body_content_purge_xyz").text("An error occurred while purging XYZs.");
            $("#modal-dialog-purge-xyz").modal('show');
        }
    }
    

But I can’t seem to make it work because when debugging result in the section where i check what text to show in modal remains empty… so the modal displays nothing inside. What should i change?

NextJS text input is causing the whole app to freeze

so I am currently building an app using NextJS’s latest version which consists of a filter. The filter inputs are listed below:

<div className="flex mt-3">
    <div className="mr-8">
        <label for="startDate">Start Date</label>
        <br />
        <input name="startDate" id="startDate" className="border-2 rounded-lg px-3 py-2" type="date" onChange={(e) => setStartDate(e.target.value)} placeholder="Start Date" />
    </div>
    <div className="mr-8">
        <label for="endDate">End Date</label>
        <br />
        <input name="endDate" id="endDate" className="border-2 rounded-lg px-3 py-2" type="date" onChange={(e) => setEndDate(e.target.value)} placeholder="Start Date" />
    </div>
    <div className="mr-8">
        <label for="promoCode">Promo Code</label>
        <br />
        <input name="promoCode" id="promoCode" className="border-2 rounded-lg px-3 py-2" type="text" value={promoCode} onChange={handlePromoCodeChange} placeholder="Code goes here" />
    </div>
    <div className="flex items-end">
        <button type="button" onClick={filter} className="border-2 px-3 py-2 text-lg rounded-lg bg-[#52b3d6]">Search</button>
    </div>
</div>

Somehow when I tried to use my cursor to click into the input (focusing the input), the whole application went freezing and I could not do anything anymore, I have to close that specific tab and reopen a new one. Here’s my full code looks like:

import moment from "moment";
import Image from "next/image";
import { useSearchParams } from "next/navigation";
import { useRouter } from "next/router";
import { useState } from "react";

export default function Booking() {
    const searchParams = useSearchParams();
    const type = searchParams.get('type');
    const router = useRouter();
    const id = router.query.id;

    const [startDate, setStartDate] = useState(null);
    const [endDate, setEndDate] = useState(null);
    const [promoCode, setPromoCode] = useState('');

    const handlePromoCodeChange = (e) => {
        setPromoCode(e.target.value);
    };

    const filter = async () => {
        console.log("TEST startDate", startDate);
        console.log("TEST endDate", endDate);
        console.log("TEST promoCode", promoCode);
    };

    return (
        <>
            <div className="flex m-10">
                <div className="flex-none">
                    <Image src={`/test.png`} width={200} height={60} alt="logo"></Image>
                </div>
                <div className="grow my-auto text-right">
                    <h1 className="text-3xl">Test</h1>
                </div>
            </div>
            <hr />
            <div className="flex-col mx-10">
                <div className="grow my-8 text-3xl text-center">BOOK NOW</div>
                <div>
                    Enter your holiday date.
                    <div className="flex mt-3">
                        <div className="mr-8">
                            <label for="startDate">Start Date</label>
                            <br />
                            <input name="startDate" id="startDate" className="border-2 rounded-lg px-3 py-2" type="date" onChange={(e) => setStartDate(e.target.value)} placeholder="Start Date" />
                        </div>
                        <div className="mr-8">
                            <label for="endDate">End Date</label>
                            <br />
                            <input name="endDate" id="endDate" className="border-2 rounded-lg px-3 py-2" type="date" onChange={(e) => setEndDate(e.target.value)} placeholder="Start Date" />
                        </div>
                        <div className="mr-8">
                            <label for="promoCode">Promo Code</label>
                            <br />
                            <input name="promoCode" id="promoCode" className="border-2 rounded-lg px-3 py-2" type="text" value={promoCode} onChange={handlePromoCodeChange} placeholder="Code goes here" />
                        </div>
                        <div className="flex items-end">
                            <button type="button" onClick={filter} className="border-2 px-3 py-2 text-lg rounded-lg bg-[#52b3d6]">Search</button>
                        </div>
                    </div>
                </div>
            </div>
        </>
    )
}

For reference, here’s how it looks like after I focused to the text input:
Browser tab freezing
After sometime, it went all white.

I also tried textarea, hoping that I can get a workaround, but the same as well.

Can anyone tell me what’s wrong here? Thankyou!

Sending raw large table to php backend

I am trying to send outer html of the table to php backend. I am able to send little table data like 10 kb but if i try to send 10mb table then network status shows pending and does not get any status code as well. and it gets never resolve. I already maximize the post limit and all but still I am not able to send data to backend. I tried formdata method. formdata blob as well but still same issue. small table able to send to backend but for large table status showing pending and never get resolved.
frontend:

function download_table() {
    const table = document.getElementById("Dtf-table");
    if (!table) {
        alert("Table is not detected");
        return;
    }

    const html = table.outerHTML;

    fetch("factory/generate_excel1.php", {
        method: "POST",
        headers: {
            "Content-Type": "text/plain" // send raw HTML as plain text
        },
        body: html
    })
    .then(response => response.text())
    .then(fileName => {
        const a = document.createElement("a");
        a.href = `factory/${fileName.trim()}`; // path to saved file
        a.download = ""; // let browser pick the filename
        document.body.appendChild(a);
        a.click();
        document.body.removeChild(a);
    })
    .catch(error => {
        console.error("❌ Error:", error);
    });
}

Backend:

require __DIR__ . '/../../php/vendor/autoload.php';

use PhpOfficePhpSpreadsheetReaderHtml;
use PhpOfficePhpSpreadsheetWriterXlsx;
use PhpOfficePhpSpreadsheetCellCoordinate;

try {
    $rawHtml = file_get_contents("php://input");
    if (!$rawHtml) {
        throw new Exception("❌ No HTML content received.");
    }

    // Load HTML into Spreadsheet
    $reader = new Html();
    $spreadsheet = $reader->loadFromString($rawHtml);```