dynamically change the name of the resources in the timeline resources

In the demo of fullCalendar and more specifically in the Resource Timeline demo, it has Rooms (Auditorium A, Auditorium B….and under Auditorium D there is subsection Room D1 et Room D2), so can we retrieve that automatically from a database, is the code flexible so I can do that ? Can we have our own resources names for a data base ?

Is it possible to dynamically change the name of the resources ?

Prove Identity: API Integration Issues – Error Code 8009 Across Multiple Projects

I am currently trying to integrate the trust score of the on boarding user details to make sure a genuine user in prove identity

https://developer.prove.com/reference/quick-start

i signed up and working API portal, i did basic setups, now persistent issues with API integrations across four projects in the UAT environment. Despite following the documentation, I consistently encounter Error Code 8009 with varying messages. Below are the details:

enter image description here

  1. Project: proveMePVU
    Endpoint: POST /v3/verify

Issue:

json
{"code": 8009, "message": "error at prove, try again later"}

Request:

curl
curl --location 'https://platform.uat.proveapis.com/v3/verify' 
--header 'Authorization: Bearer <token>' 
--data '{"firstName": "Addy", "lastName": "Epinay", "possessionType": "mobile", "phoneNumber": "12001004000"}'
  1. Project: proveMePF
    Endpoint: POST /v3/start

Issue:

json
{"code": 8009, "message": "error at prove, try again later"}

Request:

curl
curl --location 'https://platform.uat.proveapis.com/v3/start' 
--header 'Authorization: Bearer <token>' 
--data '{"flowType": "mobile", "phoneNumber": "12001004000"}'
  1. Project: proveMeUnity & proveMe
    Endpoint: POST /v3/unify

Issue:

json
{"code": 8009, "message": "test user cannot be accessed with your current product credentials"}

Request:

curl
curl --location 'https://platform.uat.proveapis.com/v3/unify' 
--header 'Authorization: Bearer <token>' 
--data '{"possessionType": "mobile", "phoneNumber": "2001004011"}'

Key Observations:
All requests include valid auth tokens (truncated here for security).

Test phone numbers (12001004000, 2001004011) are from the documentation.

Error 8009 appears consistently but with different messages.

Request for Assistance:
Are there known issues in the UAT environment?

Are the test numbers restricted for certain products (e.g., proveMeUnity)?

Could this be related to incorrect product configurations or permissions?

Trouble making an array for different variables with same outcome

This code technically works for what I need it to do, which is generate 5 different numbers and display them on the HTML page.

However, I would like help putting them into arrays if possible to condense my code. I have tried using something like let [picker1, picker2, picker3, picker4, picker5] = Math.floor(Math.random() * 10) + 1 but it didn’t work.

function pick5() {
  'use strict';
  {

    let result1 = document.getElementById('result1');
    let result2 = document.getElementById('result2');
    let result3 = document.getElementById('result3');
    let result4 = document.getElementById('result4');
    let result5 = document.getElementById('result5');

    let picker1 = Math.floor(Math.random() * 10) + 1;
    let picker2 = Math.floor(Math.random() * 10) + 1;
    let picker3 = Math.floor(Math.random() * 10) + 1;
    let picker4 = Math.floor(Math.random() * 10) + 1;
    let picker5 = Math.floor(Math.random() * 10) + 1;

    result1.value = picker1;
    result2.value = picker2;
    result3.value = picker3;
    result4.value = picker4;
    result5.value = picker5;

  }

  return false;
}

function init() {
  'use strict';
  document.getElementById('generate').onclick = pick5;
}
window.onload = init;
<div>
  <button type="button" id="generate">Pick 5!</button>
</div>

<div>
  <input type="number" readonly id="result1" aria-label="result1">
  <input type="number" readonly id="result2" aria-label="result2">
  <input type="number" readonly id="result3" aria-label="result3">
  <input type="number" readonly id="result4" aria-label="result4">
  <input type="number" readonly id="result5" aria-label="result5">
</div>
<script src="js/pick5.js"></script>

How to have React Router reload the current page when the user clicks refresh in the browser?

I have a React Route structure like this in my App.js:

<Router>
    
    <Routes>
    
        <Route path="/" element={<Homepage/>}/>
        <Route path="/page0/*" element={<Page0/>}/>
        <Route path="/page1/*" element={<Page1/>}/>
        <Route path="/page2/*" element={<Page2/>}/>
    
    </Routes>
    
</Router>

And in the Page0.js for example it continues like this:

<Routes>

        <Route path={subpage0}  element={Subpage0}/>
        <Route path={subpage1}  element={Subpage1}/>
        <Route path={subpage2}  element={Subpage2}/>
        <Route path={subpage3}  element={Subpage3}/>
        <Route path={subpage4}  element={Subpage4}/>
        <Route path={subpage5}  element={Subpage5}/>

</Routes>

My problem is, that if I click refresh (or F5) on any of the subpages, it always loads in the subpage0 of the given page. Is it possible to always have React load in the same subpage the user was currently on, when refreshed?

How can I replace a JavaScript URL with the file data [duplicate]

So I’m trying to port a website (Minecraft web-based NBT editor) to a .html, and I think I’m almost there, but I’m just lost on this one step. In a JavaScript portion of the file, it referenced a file called

+new URL(./manifest.webmanifest)

which is blocked by the CORS policy with the error

index.html:1 Access to fetch at ‘file:///C:/Users/[redacted]/Downloads/Dovetail/manifest.webmanifest’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: brave, chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.

index.html:69

And this seems to be caused by the CORS policy not allowing external files to be referenced from another file. Hence my workaround, just putting the code in the file. But I have no clue how to do this in JavaScript. This is not what I expected, as I would expect it to just work (but it never does, does it?) Thankfully, I have the data for manifest.webmanifest, so how can I write the manifest file right into the JavaScript part? (TLDR; How can I replace a URL() argument with the file’s code)

I tried writing the file URL but it still got blocked by the CORS policy. And because this is a local file, I don’t think I can bypass that

The URL() part is in this part of the code

+new URL("./manifest.webmanifest"

NOT COMPLETELY NECESSARY, JUST FOR CLARIFICATION, THIS IS NOT ANOTHER QUESTION

I do not think the manifest file is relevant as this would occur with any file. To simplify my question, the file is blocked by the computer, this is a local downloaded.html file, which the CORS policy (at least in brave) blocks the file:// protocol from accessing outside files, so the local .html file is unable to reference outside files. I have been able to bypass this by putting the code in the .html file

Example:

<script src="script.js"></script>

Becomes

<script>[code goes here]</script>

I just simply do not know how to do this in JavaScript.

I couldn’t try much as I didn’t know what to do.

I want everything on a card to align on a column, except for the image attached, how do I separate the elements correctly?

I’m trying to build a horizontal card, but no matter what I try I can’t align the name, price and button on a column without including the image in it.

This is what I want it to look like:

intended look

However, it ends up looking like one of these two:

outcome one, using “flex-direction: column” |
outcome two, not using flex

The cards are loaded via js from an object var containing multiple things like price, images, and code value:

function mostrarEvento(evento) {
    return `<div class="cartaEvento">
            <div class="imgEvento"><img src='${evento.imagen}'</img></div>
            <div class="evento"><p>${evento.tipo}</p></div>
            <div class="precio"><p>$ ${evento.precio}</p></div>
            <div class="comprar"><button id="${evento.codigo}">Comprar</button></div>
            </div>`;
}

Which are then styled with css:

.cartaEvento {
    min-width: 40em;
    margin: 1em;
    padding: 1em;
    display:flex;
    align-items: center;
    flex-direction: column;
    gap: 10px; 
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: black;
}

I have tried multiple things, changing the display type, searching on any forum and trying to learn more flexbox, but nothing works, I even tried to give the image it’s own properties and it doesn’t work either:

.imgEvento { flex-direction:row; }

Sorry if the formatting is bad, I’m still learning how to use this site.
Any help is appreciated.

Passcode to change display style with JavaScript

I’m very new to JavaScript, but i’m trying to create a kind of faux database for my site, similar to Type Help on itch.io but way fewer options.

What I’m wanting to happen is you input a code (preferably a word) into a search bar (or text box or whatever works), the script determines if it’s correct, then changes a specific HTML div from display:none to block or inline (i’m not picky).

let search = document.getElementById(search);
let buried = document.getElementById(buried);

function checkSearch() {
  if (search.value === "one") {
    buried.style.display = "inline";
  } else {
    buried.style.display = "none"; 
  }
}
<input type="search" onsearch = "checkSearch()" placeholder="search here" id="search"/>
 
  <button type="submit" id="enter" onclick="checkSearch()">&raquo;</button>

  <div id="buried" style="display: none;">test for buried</div>

I’ve done a lot of messing around, but it won’t work and I can’t figure it out.

Also, if there is a cleaner or easier way to get what i’m looking for, that would be great too

How to Programmatically Mention/Tag a User in a Slack Canvas Using the API?

I’m trying to use the Slack API to mention/tag a user in a canvas so others can click the name to reach out (open profile or DM). Manually typing @UserName in the canvas UI works, creating a clickable mention, but I need to create or edit canvases dynamically using conversations.canvases.create or canvases.edit. I’ve tried using <@U1234567890> (the standard format for messages), but it renders as plain text in the canvas (e.g., “<@U1234567890>”). Other formats like @<U1234567890>, @[U1234567890], [@U1234567890], @UserName, ![user:U1234567890], and <user:U1234567890> also render as plain text. I also tried rich_text document_content, but got an invalid_arguments error.

My bot has a valid token with scopes like channels:write, users:read, canvases:write, and can tag users in channel messages without issue. The API accepts my payload, returning { "ok": true }, but the mention isn’t clickable, and is just the user ID in plain text. Here’s my JSON body for canvases.edit (using placeholder IDs):

{
    "canvas_id": "F1234567890",
    "changes": [
        {
            "operation": "replace",
            "document_content": {
                "type": "markdown",
                "markdown": "User: <@U1234567890>"
            }
        }
    ]
}

This is a POST request to https://slack.com/api/canvases.edit with headers: Content-Type: application/json;charset=utf-8. Without charset=utf-8, I get a missing_charset error. I’m using a Node.js app with @slack/[email protected] (latest as of June 2025). The Slack Canvas API docs don’t mention user mention syntax.

Is there a supported format for programmatic user mentions in Slack canvases, or does the Canvas API Markdown parser not recognize mention syntax? Any insights or workarounds?

Nodejs birthtime.getTime() of fs module works locally but not in production

I am trying to the select the most recently created file from an array of files. This works just fine on my local node environment on mac, however when I push to my production server instead of outputting the most recently created it simply grabs the first in the array, which seems to be whichever file is first in alphabetical order.

I’m wondering if this might have something to do with the code and files being rebuilt and deployed each time I commit a change. I’m running Node 17.7.2 in both environments

How can I fix this to retrieve the most recently created file?

I have the following code:

        // Get the file with the most recent uploaded timestamp
        let latestFile = targetFiles
          .map((file) => ({
            file,
            time: fs
              .statSync(path.join(__dirname, "../public/img/lottie", file))
              .birthtime.getTime(),
          }))
          .sort((a, b) => b.time - a.time)[0]?.file;

        return latestFile;
      }

      let theLatestFile = getLatestFile();```

How to prevent the check function from getting called in case the uuid is invalid in zod?

Consider the following code

import z from "zod/v4";

const testSchema = z.object({
    test_id: z.uuid().check((ctx) => {
        console.log('Inside check - value length:', ctx.value)
      
    })
})

console.log(testSchema.parse({test_id: "aaaa"}))

It calls the check function however the uuid is invalid. I don’t want this to happen because in the check I’m making a database call to check whether this uuid exists in the table. How can I resolve this?

Antibot solver blackbox testing fails after 200 runs

My team has designed an antibot for a project and now I am testing its vulnerabilities. I have created a antibot solver bypass using some python and javascript. I am running into a super weird run time dependency issue where my solver ALWAYS fails after 200-210 attempts, BUT it starts working again if I reset the solver server. How it works:

  1. Antibot Solver hosted as python flask server. Doesnt matter if hosted locally or google cloud run.
  2. I run some client side code to request the solver server
  3. Solver server returns signature payload

After my client side code beats the Antibot 200-220 times it ALWAYS starts failing with an error “Signature Validation Error”. I am black box testing so can’t look into it. I have tried many many times and 200-220 is the threshold where it always begins failing.

  • KEYPOINT: After I begin getting the error after 200 success, it does not help to restart the client side code. However, turning off the flask server and restarting it immediately lets me get another 200 success, then I need to restart the flask server again. I think something that gets init at runtime, such as a UUID/hash in some module gets leaked and the solver starts flagging it. Or maybe after 200 tries there’s memory overflow in the heap and the signature calculation starts getting dirty over writes.

Solver server structure:

  • Main.py (flask server)

  • gen.py (antibot solver logic, imports js using pythons javascript module)

  • solve.js (javascript code hosting a decompiled wasm) – I assume it uses the heap by creating a buffer

  • I have tried making sure all random values are truly random (not repeated identical seeds)

  • I have added logs to my JS code to monitor memory usage, memory and heap look fine with no overflow, there is always 1-2 MB available

  • I have tried to use the python garbage collector to clean asyncFun after a solve is done by the server.

  • I have tried to import the modules inside the functions rather than the top of the file.

New idea

  • I want to reload all python modules using importlib every time the server solves

The problem Im running into though is that it doesn’t seem safe to reload 5 python modules in a concurrent environment where requests to the solver server come at random times and high volume (currently testing at 20 threads). Based on my design how can I reload all modules, I am especially interested in reloading the javascript module because that is used to import the JS solver. Maybe reloading the libs won’t fix it, but this is something that happens when the solver turns on, If anyone has a better suggestion I’d appreciate it.

main.py

from flask import Flask, request, jsonify
from google.oauth2 import service_account
from google.cloud import firestore
from gen import *

app = Flask(__name__)
creds = service_account.Credentials.from_service_account_file("service.json")
db = firestore.Client(credentials=creds)

@app.route('/recalculate', methods=['GET', 'POST'])
def recalculate():
    try:
        data = Calculate()
        
        return jsonify(data), 200
    except Exception as e:
        return jsonify({"error": str(e)}), 500

if __name__ == '__main__':
    port = int(os.environ.get('PORT', 8080))
    app.run(host='0.0.0.0', port=port)

gen.py

from javascript import require
import urllib.parse
import requests_go
import importlib
import hashlib
import random
import base64
import mmh3
import json
import math
import time
import gc

def Calculate(...):
    try:
        asyncFun = require("solve.js")
    except Exception as e:
        print(f"Failed to init js: {e}")
        return "", ""

    result = asyncFun['asyncSign'](...)
    
    del asyncFun
    gc.collect()

    return result

solve.js

// 26k lines of decompiled wasm

async function asyncSign() {
  retasmFunc.A();

  var0 = retasmFunc.y(var50["length"] + 1);
  new Uint8Array(retasmFunc.v["buffer"], var0, var51["length"])["set"](var9);
}

module.exports = {
  asyncSign: asyncSign,
};

How to enable multiple selection in data validation dropdown using Google Sheets API?

I’m trying to create a data validation rule that allows multiple selection from a dropdown list using the Google Sheets API. In the Google Sheets UI, there’s an option “Allow multiple selections” when setting up data validation, but I can’t figure out how to enable this via the API.
Here’s my current validation request:

const validationRequest = {
  setDataValidation: {
    range: {
      sheetId: sheetId,
      startRowIndex: nextRowIndex,
      endRowIndex: nextRowIndex + 1,
      startColumnIndex: 4, // Column E
      endColumnIndex: 5,
    },
    rule: {
      condition: {
        type: "ONE_OF_RANGE",
        values: [
          {"userEnteredValue": "='City List'!$A$2:$A"}
        ],
      },
      inputMessage: "Select a city from the list",
      strict: false,
      showCustomUi: true,
    },
  },
};

This code creates a dropdown that allows selecting only one item from the list. However, I need users to be able to select multiple cities from the dropdown.
Questions:

Is there a specific property or parameter in the API that enables multiple selection?
Do I need to change the condition.type from “ONE_OF_RANGE” to something else?
Are there any additional properties required in the rule object?

I’ve looked through the Google Sheets API documentation but couldn’t find clear information about enabling multiple selection.
Any help would be greatly appreciated!
Environment:

Google Sheets API v4
JavaScript/Node.js

For input field, change default invalid email validation message while keeping custom required field message?

I have an email input field that must not be empty and should also have a valid email address. With the actual code, the custom message Email cannot be empty is displayed as expected when the field is empty.

The issue is that when the email is invalid I get the default message Please enter a valid email address. The functionality is fine since the ajax call isn’t triggered due to the invalid email, but I would like to display a custom invalid email message.

Any help is appreciated.

I checked a few solutions, including How to change default “please include an @ in the email address”? , Set custom HTML5 required field validation message, but none of them worked for me.

This is my input field:

<input id="email" type="email" name="email" data-val="true" oninput="this.setCustomValidity('')" oninvalid="this.setCustomValidity('Invalid email address')" data-val-required="Email cannot be empty">&nbsp;<span style="font-size: smaller; color: red" data-valmsg-for="email" data-valmsg-replace="true"></span>

This is all my html:

@page
@model Products.Pages.IndexModel
@{
}
@Html.AntiForgeryToken()
    <form id="myForm">

    <input id="email" type="email" name="email" data-val="true" oninput="this.setCustomValidity('')" oninvalid="this.setCustomValidity('Invalid email address')" data-val-required="Email cannot be empty">&nbsp;<span style="font-size: smaller; color: red" data-valmsg-for="email" data-valmsg-replace="true"></span>
                <button id="btnconfirm" class="button" type="submit">Confirm</button>
    </form>

@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }

    <script>
        document.addEventListener("DOMContentLoaded", function() {
            var elements = document.getElementsByTagName("email");
            for (var i = 0; i < elements.length; i++) {
                elements[i].oninvalid = function(e) {
                    e.target.setCustomValidity("");
                    if (!e.target.validity.valid) {
                        e.target.setCustomValidity("Invalid email address");
                    }
                };
                elements[i].oninput = function(e) {
                    e.target.setCustomValidity("");
                };
            }
            });

           $("#myForm").submit(function (event) {
                event.preventDefault(); // Prevent default form submission

                if ($("#myForm").valid()) {
                    $.ajax({
                        type: "POST",
                        url: "/Index?handler=Send",
                        success: function (response) {
                            alert('success');
                        }
                    });
                }
            });
    </script>
}

how to masquerade as another user with simplesamlauth_php

We are looking to use simplesamlauth_php (4.0.1) with our drupal instance. However we are unable to successfully masquerade as another user. We get the following error message:

Error: Call to undefined method DrupaluserEntityUser::setAccount() in simplesamlphp_auth_user_logout() (line 68 of modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module)

Any suggestions?

How to make a size-fixed sprite with proper scaling in React-fiber-three?

I’m new to R3F and I’m trying to learn some basic fundamentals, basically what I’m trying to do is render a car model from a .glb file and then render a circular button on the door of car which would trigger an click event.

However, I could not render the button no matter what I tried, I tried <mesh>, <Sprite/>, <Geometry/>, and the <Html/> tag from @react-fiber/drei. My requirements are:

  • It must be a circle.
  • It must have a fixed size, even after zooming in and out.
  • It must be positioned correctly. For some reason, when I tried to position <Sprite/> just by 5 pixels, It was moved significantly far from its original position.
  • Optionally, it must appear “in front” of other elements, kinda like having z-index: 9999.