I’m newbie here please someone explain me Dudu dududu [closed]

Please explain me how to do that

This site, i’m new here and i don’t know how its going.
I just try what i can trys
B

LA BLABla

blaBlabla
BLA blablabla

hAhahahah
I don’t know what im doing
Test test test
Testing testing

Add up to 5 tags to describe what your question is about. Start typing to see suggestions.

javascript

Review questions already on Stack
Heheh
Heheheh
Hehehhee
Hehehhehehehe
Hehhehehe
Ahahha ahahaha ahahah

How can I replace a JavaScript URL with the file data

So I’m trying to port a website 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. 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.

JOLT Transformation – Matching logic

I have this JSON payload.

{
  "firstPayload": {
    "contactNumber": [
      {
        "id": "1",
        "mobileNum": "+447665463628",
        "mobileMask": "+44******628",
        "contactType": "mobile"
      },
      {
        "id": "2",
        "mobileNum": "+447665463111",
        "mobileMask": "+44******111",
        "contactType": "mobile"
      },
      {
        "id": "3",
        "mobileNum": "+447665463333",
        "mobileMask": "+44******333",
        "contactType": "mobile"
      },
      {
        "id": "4",
        "mobileNum": "+440674232123",
        "mobileMask": "+44******123",
        "contactType": "landline"
      }
    ]
  },
  "secondPayload": {
    "contactNumber": [
      {
        "id": "1",
        "mobileMask": "+44******628",
        "contactType": "mobile"
      }
    ]
  }
}

I want the output to be like this –

{"mobileNum" : "+447665463628"}

The match is based on exact match between secondPayload”.contactNumber”.”id” and “id” value present in “firstPayload”

How to achieve this in JOLT.

Is it allowed in javascript to modify the handler after proxy has already been created?

I modify the handler object after proxy’s creation, and obtain intended result. But nowhere in mdn document such pattern, can i rely on this pattern to work consistently across browser/in future?

const tar = {};
const handler = {
  get(target, prop, receiver){
    return 3;
  }
}
const p = new Proxy(tar, handler)
let before = p.x;
handler.get = (target, prop, receiver) => 4;
let after = p.x;
console.log(before, after) // 3, 4

How to download Facebook comment video with broken MP4s?

Please read this carefully as the high complexity of the context of this question negates all answers to supposed “related” questions.

  1. On this FB URL: https://www.facebook.com/watch/?v=1462397605169872
  2. There is a video posted in a comment that I want to download the source for, here is the MP4’s direct URL (as far as I can determine):
    https://video-lax3-2.xx.fbcdn.net/o1/v/t2/f2/m366/AQMU0Ao7LC293XZsDBvu9s5ngryEpEFDpV5nnilYJv61Pb573R1hbdNWEoYgmOewdbY7A0GUPB6x6TgFuUUV8s17lRrVqwbm3WNS_to.mp4
    
  3. In the DOM here is the blob URL that I have not been able to match to any URL requests or ids in the DOM: blob:https://www.facebook.com/7c50854b-0533-4f78-adde-58f634e25c32.

Clarifications:

  1. In the developer network panel the mp4 files requested do not work if directly requested.
  2. In the developer network panel there are NO m3u8 files requested.
  3. In the developer network panel there are NO related media files requested.
  4. Using “download Facebook videos!” website services only work for the videos of dedicated URLs, not when someone uploads a video in a comment.
  5. I am well versed in JavaScript though I am not sure if/how the video files are obscured by the blob URL.

How do I download the video posted in a comment on Facebook?

How can I prevent OBS virtual camera injection on my website?

I have a website that uses navigator.mediaDevices.getUserMedia to access the device’s webcam. Still, I noticed that some users are using a virtual camera (like OBS Virtual Camera) and injecting images and videos into my website through the camera.

I tried some ways to block this, like blocking cameras with ‘virtual’ in their names, but it continues happening because the users change the virtual camera’s name to whatever. How can I prevent this from happening?

Is there a way to open a mobile keyboard that inputs into a canvas in html?

I have an html file with a with a canvas (whose js and wasm comes from trunk-compiled rust code, which has text input boxes based in notan and egui). The canvas has rust-based text input boxes. On desktop, I can input into these boxes perfectly using my keyboard, however on mobile, no mobile keyboard appears, so I cannot input into my canvas. How can I make some form of mobile keyboard appear, preferably only by changing the html and js in my index.html?

I tried to use the canvas input on my phone, and expected the mobile keyboard to appear, but it did not.

Visual Studio Professional & Community 2022 – CodeLens – JavaScript – Not showing on async Functions

I am seeing an issue with Visual Studio 2022 Pro and Community Version 17.14.0

See screen shot, CodeLens is showing that there is “1 references” for the “Testing” function, but for the “Testing_Async” function, it is not showing any references. This only appears to be a problem when you use the async key word in front of the function

I am sure people will say there is a better way to do it, but I still think this is an issue with Visual Studio

Async function not showing references

How can I set a javascript const to a value in a form element that could be either a dropdown select or a checked radio button?

I have an html form in a django site that is used for both add and update. If the form is for a new entry, I want the field estimateType to be radio buttons with three choices, one of which is checked by default. If the form is for an edit to an existing entry, I want the form widget to change to a select dropdown with additional choices to pick from.

In the javascript in the onchange event, I need to know what the value of the estimateType field is. I can get it to work for select, or radio input, but not both. For example, what I have right now is:

const estimateType = document.querySelector(input[name=estimateType]:checked).value;

That works for a radio button but not the select dropdown. How can I use the same const declaration but account for heterogeneous form input types?

Angular PrimeNG. Drag n drop prevents all scrolls on page

I encountered a problem that when using the PrimeNG drag n drop module, when dragging an element, all scrolls on the page are completely broken. The mousewheel event does not work, although there is a scroll on the page.

Simple example: in their documentation, using the example
https://primeng.org/dragdrop#datatable try to drag an element and start scrolling the page – the page cannot be scrolled

I don’t know what workarounds can be thought up?

PrimeNG version: 19.1.2

MiHoYo Resume Auto-fill: Strange Ant Design DatePicker Behavior: Different Results with and without Breakpoint

Problem Description

I’m developing an auto-fill feature for MiHoYo’s resume system enter link description here and need to programmatically trigger the Ant Design DatePicker. I’ve encountered a peculiar issue:

Phenomenon:

  1. Without Breakpoint: The DatePicker dropdown appears, but there’s no blue selection bar

enter image description here

  1. With Breakpoint: When setting a breakpoint at inputs[0].dispatchEvent(mousedownEvent);, not only does the dropdown appear, but a blue selection bar also appears, indicating proper selection

enter image description here

This blue selection bar is crucial for subsequent operations as it signifies a true “selection” state. Without it, further date selection operations cannot proceed normally.

Relevant Code

// Initialization
const rangePickerContainer = findAncestorWithClass(inputElement, "ant-picker-range");
const inputs = rangePickerContainer.querySelectorAll("input");

// Trigger events
const focusEvent = new FocusEvent("focus", {
  bubbles: true,
  cancelable: true,
  view: window
});
inputs[0].dispatchEvent(focusEvent);

const mousedownEvent = new MouseEvent("mousedown", {
  bubbles: true,
  cancelable: true,
  view: window
});

// When a breakpoint is set here, the blue selection bar appears and everything works
inputs[0].dispatchEvent(mousedownEvent);
inputs[0].click();

Analysis

It seems that setting a breakpoint changes the timing of event processing, giving the Ant Design component enough time to complete its internal state updates. This might be related to React’s event system or the specific implementation of Ant Design components.

Questions

  1. Why does the component behave differently with and without a breakpoint?
  2. How can I achieve the same effect as with a breakpoint, but in normal code execution?
  3. Is there a more reliable method to programmatically trigger the true selection state of the Ant Design DatePicker?

Move files based on size in Pentaho

Within Pentaho, how do I move files from a particular local directory that are 1 KB in size to another folder? Ideally, I’d like to move all 1 KB files at once and not go one by one (we’re talking hundreds of files that will need to be moved daily).

Thanks for any help!

Unable to get TypeScript to recognize file path aliases

I am trying to get file path aliases setup in a project. I’ve setup everything according to this article. Vite is able to resolve the path aliases, so I don’t get any runtime errors. However, TypeScript keeps giving the following error whenever I try to import using a path alias: Cannot find module '@components/AppLayout' or its corresponding type declarations. ts(2307)

I’ve tried several different options for the paths, and have made sure to restart VSCode after each change. Can anyone tell what I am doing wrong?

  • TypeScript v5.7.2
  • Vite v6.2.0
  • Node v22.9.0

tsconfig.json

{
  "files": [],
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"],
      "@assets/*": ["src/assets/*"],
      "@components/*": ["src/components/*"],
      "@hooks/*": ["src/hooks/*"],
      "@pages/*": ["src/pages/*"],
      "@redux/*": ["src/redux/*"],
      "@types/*": ["src/types/*"],
      "@utils/*": ["src/utils/*"],
    },
  },
  "references": [
    { "path": "./tsconfig.app.json" },
    { "path": "./tsconfig.node.json" }
  ]
}

vite.config.js

/* eslint-disable import/no-extraneous-dependencies */
import path from 'path'

import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

// https://vite.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      '@assets': path.resolve(__dirname, './src/assets'),
      '@components': path.resolve(__dirname, './src/components'),
      '@hooks': path.resolve(__dirname, './src/hooks'),
      '@pages': path.resolve(__dirname, './src/pages'),
      '@redux': path.resolve(__dirname, './src/redux'),
      '@types': path.resolve(__dirname, './src/types'),
      '@utils': path.resolve(__dirname, './src/utils'),
    },
  },
  plugins: [react()],
})

Example import with TS errors

import AppLayout from '@components/AppLayout'
import HomePage from '@pages/HomePage'
import LoginPage from '@pages/LoginPage'

Google Maps Directions API doesn’t find certain addresses that seem valid

I’m building a web app that uses the Google Maps Directions API to calculate routes between multiple addresses. The app works fine for most addresses, but for some inputs like:

Dolores 33, Buenos Aires, Argentina
or
Portela 61, C1406FDA Cdad. Autónoma de Buenos Aires, Argentina

…the API does not return an error, but it returns a generic or imprecise result, such as just: Buenos Aires, Argentina

This causes issues when trying to map precise routes — the origin or destination ends up being too vague or completely incorrect.

What I’m doing

  • Users can enter addresses manually or import them from Excel.
  • I use the Geocoder API to validate addresses before routing.
  • Then I pass them to DirectionsService.route().

Here’s how I validate the address first (simplified):

const geocoder = new google.maps.Geocoder();

geocoder.geocode(
  {
    address: "Dolores 33, Buenos Aires, Argentina",
    componentRestrictions: { country: "ar" }
  },
  (results, status) => {
    if (status === google.maps.GeocoderStatus.OK && results.length > 0) {
      console.log("VALID:", results[0].formatted_address);
    } else {
      console.warn("INVALID:", status);
    }
  }
);

Then I use Directions API like this (simplified):

const directionsService = new google.maps.DirectionsService();

directionsService.route(
  {
    origin: "Dolores 33, Buenos Aires, Argentina",
    destination: "Some other address...",
    travelMode: google.maps.TravelMode.DRIVING
  },
  (response, status) => {
    if (status === google.maps.DirectionsStatus.OK) {
      // Success
    } else {
      console.error("Directions error:", status);
    }
  }
);

What I expected

I expected the Directions API to either:

use the full, specific address if it exists, or

return a clear error if it can’t find a match.

What happens instead

It returns an imprecise or vague result, often just “Buenos Aires, Argentina”.

This leads to incorrect routes or routes starting/ending in the wrong place.

My questions

Is this behavior expected?

Why would the Directions API ignore a more specific address and resolve to something vague?

Is there any reliable workaround (e.g., forcing coordinates, refining geocoding before routing, etc.)?

Any help is appreciated — especially from others working with addresses in Argentina or Latin America in general. Thanks!