audio adm javascript and ear usage

I developed a javascript function to save the audio objects of my application in ADM format but when defining dynamic objects ear does not render the movement of the object width ear-render -s 0+5+0.

ear-utils dump-axml :

<?xml version="1.0" encoding="UTF-8"?><ebuCoreMain xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="urn:ebu:metadata-schema:ebuCore" xml:lang="en">
  <coreMetadata>
    <title typeLabel="FileTitle">
      <dc:title xml:lang="en">projet2</dc:title>
    </title>
    <creator>
      <organisationDetails>
        <organisationName>KandiskyScore</organisationName>
      </organisationDetails>
    </creator>
    <description typeLabel="Description" typeLink="http://www.ebu.ch/metadata/cs/ebu_DescriptionTypeCodeCS.xml#1">
      <dc:description>comment: projet2 (1 stereo tracks    1 objets)
    </dc:description>
    </description>
    <date>
      <created startDate="24082024"/>
    </date>
    <format>
            <audioFormatExtended>
 <audioObject audioObjectID="AO_1001" audioObjectName="Object 1" start="00:00:03.16667" duration="00:00:02.35433">
                                  <audioPackFormatIDRef>AP_00031001</audioPackFormatIDRef>
                                  <audioTrackUIDRef>ATU_00000001</audioTrackUIDRef>
                                </audioObject>
 <audioObject audioObjectID="AO_1002" audioObjectName="Object 2" start="00:00:03.16667" duration="00:00:02.35433">
                                  <audioPackFormatIDRef>AP_00031002</audioPackFormatIDRef>
                                  <audioTrackUIDRef>ATU_00000002</audioTrackUIDRef>
                                </audioObject>
<audioPackFormat audioPackFormatID="AP_00031001" audioPackFormatName="objet 1" typeLabel="0003" typeDefinition="Objects">
          <audioChannelFormatIDRef>AC_00031001</audioChannelFormatIDRef>
        </audioPackFormat>
<audioPackFormat audioPackFormatID="AP_00031002" audioPackFormatName="objet 2" typeLabel="0003" typeDefinition="Objects">
          <audioChannelFormatIDRef>AC_00031002</audioChannelFormatIDRef>
        </audioPackFormat>
<audioChannelFormat audioChannelFormatID="AC_00031001" audioChannelFormatName="objet 1" typeDefinition="Objects">
<audioBlockFormat audioBlockFormatID="AB_00031001_00000001"> rtime="00:00:00.00000" duration="00:00.00000"
                                              <position coordinate="X">-1</position>
                                              <position coordinate="Y">-0.0335</position>
                                              <position coordinate="Z">0</position>
                                              <cartesian>1</cartesian>
                                                    </audioBlockFormat>
<audioBlockFormat audioBlockFormatID="AB_00031001_00000002"> rtime="00:00:00.00000" duration="00:01.03157"
                                              <position coordinate="X">-0.0272</position>
                                              <position coordinate="Y">0.9313</position>
                                              <position coordinate="Z">0</position>
                                              <cartesian>1</cartesian>
                                                    </audioBlockFormat>
<audioBlockFormat audioBlockFormatID="AB_00031001_00000003"> rtime="00:00:01.03157" duration="00:00.64326"
                                              <position coordinate="X">1</position>
                                              <position coordinate="Y">-0.067</position>
                                              <position coordinate="Z">0</position>
                                              <cartesian>1</cartesian>
                                                    </audioBlockFormat>
</audioChannelFormat>
<audioChannelFormat audioChannelFormatID="AC_00031002" audioChannelFormatName="objet 2" typeDefinition="Objects">
<audioBlockFormat audioBlockFormatID="AB_00031002_00000001"> rtime="00:00:00.00000" duration="00:00.00000"
                                              <position coordinate="X">-1</position>
                                              <position coordinate="Y">-0.0335</position>
                                              <position coordinate="Z">0</position>
                                              <cartesian>1</cartesian>
                                                    </audioBlockFormat>
<audioBlockFormat audioBlockFormatID="AB_00031002_00000002"> rtime="00:00:00.00000" duration="00:01.03157"
                                              <position coordinate="X">-0.0272</position>
                                              <position coordinate="Y">0.9313</position>
                                              <position coordinate="Z">0</position>
                                              <cartesian>1</cartesian>
                                                    </audioBlockFormat>
<audioBlockFormat audioBlockFormatID="AB_00031002_00000003"> rtime="00:00:01.03157" duration="00:00.64326"
                                              <position coordinate="X">1</position>
                                              <position coordinate="Y">-0.067</position>
                                              <position coordinate="Z">0</position>
                                              <cartesian>1</cartesian>
                                                    </audioBlockFormat>
</audioChannelFormat>
<audioStreamFormat audioStreamFormatID="AS_00031001" audioStreamFormatName="objet 1" formatLabel="0001" formatDefinition="PCM">
          <audioChannelFormatIDRef>AC_00031001</audioChannelFormatIDRef>
          <audioTrackFormatIDRef>AT_00031001_01</audioTrackFormatIDRef>
          </audioStreamFormat>
<audioStreamFormat audioStreamFormatID="AS_00031002" audioStreamFormatName="objet 2" formatLabel="0001" formatDefinition="PCM">
          <audioChannelFormatIDRef>AC_00031002</audioChannelFormatIDRef>
          <audioTrackFormatIDRef>AT_00031002_01</audioTrackFormatIDRef>
          </audioStreamFormat>
<audioTrackFormat audioTrackFormatID="AT_00031001_01" audioTrackFormatName="objet 1" formatLabel="0001" formatDefinition="PCM">
                         <audioStreamFormatIDRef>AS_00031001</audioStreamFormatIDRef>
                         </audioTrackFormat>
<audioTrackFormat audioTrackFormatID="AT_00031002_01" audioTrackFormatName="objet 2" formatLabel="0001" formatDefinition="PCM">
                         <audioStreamFormatIDRef>AS_00031002</audioStreamFormatIDRef>
                         </audioTrackFormat>
<audioTrackUID UID="ATU_00000001" sampleRate="48000" bitDepth="16"/>
                    <audioTrackFormatIDRef>AT_00031001_01</audioTrackFormatIDRef>
          <audioPackFormatIDRef>AP_00031001</audioPackFormatIDRef>
<audioTrackUID UID="ATU_00000002" sampleRate="48000" bitDepth="16"/>
                    <audioTrackFormatIDRef>AT_00031002_01</audioTrackFormatIDRef>
          <audioPackFormatIDRef>AP_00031002</audioPackFormatIDRef>
</audioFormatExtended>
    </format>
  </coreMetadata>
</ebuCoreMain>

ear-utils dump chna :

AudioID(trackIndex=1, audioTrackUID='ATU_00000001', audioTrackFormatIDRef='AT_00031001_01', audioPackFormatIDRef='AP_00031001')
AudioID(trackIndex=2, audioTrackUID='ATU_00000002', audioTrackFormatIDRef='AT_00031002_01', audioPackFormatIDRef='AP_00031002')

I do not know if the axml is correct.

I tried everything but I don’t understand why ear doesn’t configure the output correctly to 0+5+0.

How to solve Cannot GET /users/login error on page refresh?

I have deployed a reactjs appplication in Netlify and the backend nodejs in Heroku. I am getting Cannot GET/… error while refresh the page on netlify .

I have already tried including the /* /index.html 200 in the _redirects file ,but when I include it as the first rule of the file then requests for the backend didn’t work.(Gives 404).
At the moment my _redirects file looks like below.

/*  https://hellow-world-e31524g40f51.herokuapp.com/:splat  200
/* /index.html 200

Here the first rule is about the proxy url.

How to fix this issue ?

how to embed reChapta (Im not a robot) to a website with only a checkbox?

Now i want to embed reChapta onto a website, but it is not working. If you need more detail to answer my question(that was the last problem) then here are the excact detail of the type of reChapta I want to embed: the version in just clicking on the box and then checking if you are a robot or not. Basic layout wich doesn’t work:

function robotornot(){
  checkRechapta()
}
<button onclick='robotornot()'>i'm not a robot</button>

jQuery calculate sum of data-attribute value based on the values in all input fields

I’m trying to find the sum of input values within multiple inputs.
My input form is something like below. Here I want to get input’s data-attribute value for this calculation.

<form action="" method="post" id="my-form">
  <input type="text" name="a" value="0" class="number" maxlength="2" data-value="0.10">
  <input type="text" name="b" value="0" class="number" maxlength="2" data-value="0.20">
  <input type="text" name="c" value="0" class="number" maxlength="2" data-value="0.40">
  <input type="text" name="d" value="0" class="number" maxlength="2" data-value="1.00">

  <input type="text" name="total" id="total" value="0.00 m³" readonly="true">
</form>

Eg:

if name=”a” is 1 then name=”total” value should be 0.10 m³

if name=”a” is 2 then name=”total” value should be 0.20 m³

Let say I have input values something like this;

a = 2
b = 1
c = 3
d = 1 

Then total should be;

0.10 + 0.10 + 0.20 + 0.40 + 0.40 + 0.40 + 1.00 = 2.60 m³

This is my jQuery so far;

$(document).ready(function () {
  const $total = $('#total');

  $('.number').blur(function () {
    var sum = 0;
    $('.number').each(function () {
      const data = $(this).data('value'); 
      if (data != "") {
        sum += parseFloat(data);
      }
    });

    $total.val(sum);

  });
});

But it doesn’t work for me. That mean when changing a input I am getting a total of all data-attribute values.

Why is my USDT transfer on the TON blockchain failing? What is the correct contract payload?

I’m trying to programmatically transfer USDT on the TON blockchain using the USDT Jetton smart contract (EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs) through TON SDK, I’ve implemented the transfer logic in Node.js, using a payload i constructed based on my understanding of the jetton transfer function, but the transaction keeps failing, and i’m getting the transaction log in my wallet of the smart contract call, but with failed status, and charges a fee and at the same time they refund the fee.

Could someone provide the correct way to construct the payload for transferring USDT on TON or share a working example of how to make this transfer successfully? any help is appreciated.

The code:

import { getHttpEndpoint } from "@orbs-network/ton-access";
import { WalletContractV4, TonClient, toNano, internal, Address, fromNano, beginCell, SendMode } from "ton";
import { mnemonicToWalletKey } from "ton-crypto";
import dotenv from "dotenv";
dotenv.config();

const mnemonic = process.env.TON_SEED;
const USDT_JETTON_CONTRACT = "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs"; // Replace with actual Jetton wallet address

const transferUSDT = async (recipientAddress, amount) => {
  try {
    // Connect to the TON blockchain
    const endpoint = await getHttpEndpoint({ network: "mainnet" });
    const client = new TonClient({ endpoint });

    // Derive wallet key and open wallet contract
    const key = await mnemonicToWalletKey(mnemonic.split(" "));
    const wallet = WalletContractV4.create({ workchain: 0, publicKey: key.publicKey });
    const walletContract = client.open(wallet);
    const initialSeqno = await walletContract.getSeqno();

    // Parse recipient address and calculate amount in nano
    const recipient = Address.parse(recipientAddress);
    const amountInNano = BigInt(amount) * 10n ** 9n; // Convert Jetton amount to nano

    // Construct the Jetton transfer payload
    const payload = beginCell()
      .storeUint(0xf8a7ea5, 32) // Function ID for internal transfer
      .storeUint(0, 64) // Query ID (can be 0 for simplicity)
      .storeCoins(amountInNano) // Jetton amount
      .storeAddress(recipient) // Recipient address
      .storeAddress(null) // Response address (optional, null for none)
      .storeCoins(0) // Forwarded TON amount (0 if not needed)
      .storeMaybeRef(null) // custom_payload
      .storeCoins(toNano("0.05")) // forward_ton_amount
      .storeMaybeRef(beginCell().storeStringTail("something").endCell()) // forward_payload_amount if receiver is a smart contract
    .endCell();

    console.log("Payload (Hex):", payload.toBoc().toString("hex"));

    // Ensure sufficient attached TON for fees
    const attachedAmount = toNano(0.2); // Adjust as needed based on network conditions

    // Send the Jetton transfer message
    await walletContract.sendTransfer({
      seqno: initialSeqno,
      secretKey: key.secretKey,
      messages: [
        internal({
          to: Address.parse(USDT_JETTON_CONTRACT),
          value: attachedAmount,
          bounce: true,
          body: payload,
          sendMode: SendMode.PAY_GAS_SEPARATELY | SendMode.IGNORE_ERRORS,
        }),
      ],
    });

    console.log(`Successfully transferred ${amount} USDT to ${recipientAddress}`);
  } catch (error) {
    console.error("Error transferring USDT:", error);
  }
};

// Test transfer
const amount = 10; // Adjust amount as needed
transferUSDT("UQBXfk_mSi4VovFHzGS42rLuXk-SKGkirN05t7xQoejSyMwX", amount);

The output when i run the code:

Payload (Hex): b5ee9c724101020100470001710f8a7ea50000000000000000502540be400800aefc9fcc945c2b45e28f98c971b565dcbc9f2450d24559ba736f78a143d1a5900100bebc2030010012736f6d657468696e675770b8a5

Successfully transferred 10 USDT to UQBXfk_mSi4VovFHzGS42rLuXk-SKGkirN05t7xQoejSyMwX

The transaction log in my wallet:
Call contract with amount -0.2 TON
UQCb…4c15
Failed

Recieved +0.198 TON
usdt.minter.ton

Error: “The schema must be one of the following: public” is showing when doing the Quickstart guide of ToolJet

I was trying to fork the Tooljet repo to run it in my local machine and try contribute and fix some issues. This is my first attempt trying to contribute to open source projects.

I ran the docker script in their README.md and was able to make it work in my local machine. Then, I tried to follow their Quickstart Guide to familiarize myself with the tool.

While doing the 2nd step of the guide, which is Create a Database Table, it showed me this error when I tried to create the table:

“The schema must be one of the following: public”

Error in the network tab

Is there anything that I missed while setting up the app in my local machine?

============================================================

I tried searching for similar cases when running Tooljet in the local machine. I found a similar issue here in stackover flow but I’m not sure what upgrade were they pertaining to in the conversation.

Thank in advance for the help and have a wonderful day!

HOW TO KILL THE SESSION FROM APEX_WORKSPACE_SESSIONS

I am using Oracle Apex 24.1. I want to Kill the Session from APEX_WORKSPACE_SESSIONS once user Logouts through the Following ways

  1. when browser closes.
  2. logouts from the logout option provided in the Apex screen.

Problem Statement : Through the above ways when user logouts, the session still continues to be there in the APEX_WORKSPACE_SESSIONS, untill it reaches the SESSION_LIFE_TIMEOUT_ON.

Requirement: I want to Kill these Sessions once the user logouts through any of the above ways from APEX_WORKSPACE_SESSIONS even the session time has not reached SESSION_LIFE_TIMEOUT_ON.

Approach That I Tried : In the Desktop Navigation bar (list) I have changed the signout Target type from URL to _Page in this Application(Redirecting to Page 75) ._In page Pre Rendering(Before Header) I am using below PL SQL code but unable to Kill the Session from APEX_WORKSPACE_SESSIONS.

apex_authentication.logout(:SESSION, :APP_ID); apex_session.delete_session ( p_session_id => :SESSION );

Please assist me with the above issue.
Thank You.

isotop js Not maintane gap one to other perfectly

isotop js no working properly it stay one over one. Not maintane gap perfectly how can i solve? Can anyone have any idea?

`$(‘.masonary-wrapper-activation’).imagesLoaded(function () {
// filter items on button click
$(‘.messonry-button’).on(‘click’, ‘button’, function () {
var filterValue = $(this).attr(‘data-filter’);
$(this).siblings(‘.is-checked’).removeClass(‘is-checked’);
$(this).addClass(‘is-checked’);
$grid.isotope({
filter: filterValue
});
});

            // init Isotope
            var $grid = $('.mesonry-list').isotope({
                percentPosition: true,
                transitionDuration: '0.7s',
                layoutMode: 'masonry',
                masonry: {
                    columnWidth: '.resizer',
                }
            });
        });`

Not maintane gap one to other perfectly how can i solve? Can anyone have any idea?

How to fetch multiple text in the next line without whitespace using app script

I have a channel in slack where automated message is posted. The message looks like this:

A ticket is submitted by: @abc

Request Title test

Requested For @xyz

Requested system? MMM

See here for the ticket.

What i need to do is to fetch the system name ‘MMM’ or there can be multiple system name separated by comma.

I am trying the following appscript code but this is not fetching anything:

function extractData(message) {
  const regexRequestedSystem = /Requested system?n(.*?)$/s;
  const requestedSystemMatch = regexRequestedSystem.exec(message);

  return {
    requestedSystem: requestedSystemMatch ? requestedSystemMatch[1].trim() : null,
    messageLink: `https://slack.com/app_redirect?channel=${channelId}&message_ts=${message.ts}`,
  };
}

Could you please help me with the regex syntax?

Thank you!!

I tried this syntax:

const regexRequestedSystem = /Requested system?n(.*?)$/s;

but this is not fetching anything. I need to fetch the ‘MMM’ only like I said before.

Nested conditions with each loop

I have a loop that receives and displays information from a database,The first loop is for mother or main categories.

 $.each(result.data.getCategory, function (index, value) {
   str += "<li>";
   str += `<img src="..."  />`;
   str += `<span class="spn_main"> ${value.categoryname}</span>`;
    str += "</li>"; 
//In this section, I want to bet that you display the subcategory of each category

  });

Each category has an “ID” or primary key field and a “ParentId” that stores the ID of the parent category.
How can I bet inside the loop to display the subcategory for each category

input field value resets to initial state after it been cleared to empty value

So in my input field let’s say an example, as I fetch details from backend and want to display in front end but also I need to edit the values

const [backendValue, setBEValue] = useState([]); // Fetched backend data
const [editValue, setEditValue] = useState({}); // Holds updated values

function handleChange(e) {
  const { name, value } = e.target;
  setEditValue((prev) => ({
    ...prev,
    [name]: value // Update the specific field's value
  }));
}

return (
  <div>
    {backendValue.map((item, index) => (
      <div key={index}>
        {Object.keys(item).map((key) => (
          <input
            key={key}
            type="text"
            name={key} // Ensure the name attribute matches the key
            onChange={handleChange}
            value={editValue[key] !== undefined ? editValue[key] : item[key] || ''}
          />
        ))}
      </div>
    ))}
  </div>
);

So if the backend value has Hello and it display in input field and if I add extra character it works but my problem is
If I clear hello till e word and now it has h only as I deleted other 4 letter (ello) using backspace , And lastly if I clear the h too it resets to it’s initial value as “hello” so I cant leave an empty field ??

How to find values that do not have duplicates and leave only them

There is a string with values and two delimiters.
873,cyan,magenta,yellow,red,4665,161,7421,W~873,cyan,magenta,yellow,black,161,2427,4665,W.

You need to leave only unique names:
red,7421~2427.
The number of values before and after the ~ simbol may be different.
The simbol ~ can be repeated many times.
xample:
873,cyan,magenta~yellow,black,4665,~161,7421,W~873,cyan,magenta~yellow,black,161,2427,4665,W.

I need to output:
empty~empty~7421~empty~2427

I don’t understand, but I really want to learn.

function remove_duplicates(arr) {
var arr = '873,cyan,magenta,yellow,red,4665,161,7421,W~873,cyan,magenta,yellow,black,161,2427,4665,W'.split('~');
    var seen = {};
    var ret_arr = [];
        for (var i = 0; i < arr.length; i++) {
        if (!(arr[i] in seen)) {
        ret_arr.push(arr[i]);
        seen[arr[i]] = true;
        }
    }
    return ret_arr.join('~').toString();
}
remove_duplicates();