Embedding a React app externally in another React app via CDN

enter image description here

I need to display a component from one React app within another React app using a CDN. However, I am encountering an error related to the useState hook. The component works fine in its original app, but when imported via CDN, it fails to function properly, and the error specifically points to an issue with useState. How can I resolve this issue and successfully integrate the component?

Error 404 Not Found. Connecting my Nest.js with React via Axios

I’m using Nest.js on my backend and React on my front end.

It seems that I’m having a problem doing a Post request via Axios. Hence, I keep getting this 404 (Not found error).

Why am I still getting this 404 error?

// FrontEnd

import React from "react";
import axios from "axios";

const AddSched: React.FC = () => {
    const handleClick = async () => {


        try{
            const createNapTimeDto = {
                userId: 5, 
                babyId: 5, 
                date: new Date().toISOString()
            }
        
            const response = await axios.post('http://localhost:3000/naptime/create', createNapTimeDto);
            console.log("Created object", response)
        }catch(error){
            console.error("There was an error", error)
        }
    };


    return (
        <div>
            <h2>Ready to log for Baby Axel</h2>
            <button onClick={handleClick}>Nap Time</button>
            <button onClick={handleClick}>Diaper Time</button>
            <button onClick={handleClick}>Tummy Time</button>
            <button onClick={handleClick}>Bath Time</button>
        </div>
    );
};

export default AddSched;


//backend

import { Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { NapTimeEntity } from '../naptime.entity';
import { Repository } from 'typeorm';
import { UserEntity } from 'src/user/user.entity';
import { CreateNapTimeDto } from '../dto/createNaptime.dto';
import { BabyEntity } from 'src/baby/baby.entity';
import { GetOneResponseDto } from '../dto/getOneResponse.dto';

@Injectable()
export class NapTimeService {


    constructor(
        @InjectRepository(NapTimeEntity)
        private readonly napTimeRepo: Repository<NapTimeEntity>,

        @InjectRepository(UserEntity)
        private readonly userRepo : Repository<UserEntity>,

        @InjectRepository(BabyEntity)
        private readonly babyRepo : Repository<BabyEntity>



    ){}


    async create(
        createNapTimeDto: CreateNapTimeDto
    ){

        //checks if user is existing
        const existingUser = await this.userRepo.findOneBy({id: createNapTimeDto.userId})
        if(!existingUser){
            throw new NotFoundException({
                status: "Error", 
                message: "UserID not found!"
            })
        }


        //checks if a babyId matches UserId
        const matchedBaby = await this.babyRepo.findOne({
            where: {
                id: createNapTimeDto.babyId,
                user: existingUser
            }
        })


        if(!matchedBaby){
            throw new NotFoundException({
                status: "error",
                message: "baby does not belong to the specified user"
            })
        }
        // Save to naptime entity
        const newNaptime = new NapTimeEntity;

        newNaptime.date = createNapTimeDto.date;
        newNaptime.babies = matchedBaby;
        newNaptime.user = existingUser; 
        await this.napTimeRepo.save(newNaptime)

        return{
            status: "OK",
            message: "New naptime created successfully", 
            data: {
                date: createNapTimeDto.date,
                babyId: createNapTimeDto.babyId,
                userId: createNapTimeDto.userId

            }
        }
    }

}


import { Controller, Logger, Body, Query} from '@nestjs/common';
import { NapTimeService } from '../service/naptime.service';
import { Post, Get, Patch } from '@nestjs/common';
import { CreateNapTimeDto } from '../dto/createNaptime.dto';
import { UpdateNapTimeResponse } from '../dto/updateNapTimeResponse.dto';

@Controller('naptime')
export class NapTimeController {

    private readonly logger = new Logger(NapTimeController.name);
    constructor(private readonly napTimeService: NapTimeService){}


    @Post('/create')
    async createNapTime(
    
        @Body() createNapTimeDto: CreateNapTimeDto
    ){

        try{

            return this.napTimeService.create(createNapTimeDto)

        }catch(error){
            this.logger.error(NapTimeController.name, error);
            throw error
        }
    }

}

Here are some of the things that I did:

  • Added CORS code on my backend.

  • Verified that the post request is working on the Postman.

  • Verified that my frontend runs at port 3001 and backend at 3000.

Is it possible to handle/read/interpret MediaRecorder video dataavailable event blobs (recorded chunks) in real-time without awaiting the final chunk?

A media element such as a HTML5 video tag can be recorded with the Media Stream Recording API. A straightforward example is provided here by the helpful people at Mozilla:

https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API/Recording_a_media_element

Passing a timeslice argument to MediaRecorder‘s start() method causes the callback function supplied to ondataavailable to be called during recording at (approximately) the requested interval.

You might think this should be perfect for doing something fun with the video stream in real time, right?
Stream those blobs to a server backend and let ffmpeg decode or transcode them in real-time, for example?

Apparently not. Fun, it seems, is not allowed. The only thing the “canonical” examples out there do, including the Mozilla one linked above, is to append the incoming blobs to an array of blobs, and then only do anything with that array after recording has finished. Neither real-time, nor fun at all:

let recordedChunks: blob[] = [];
recorder.ondataavailable = event => recordedChunks.push(event.data);

But I could be wrong of course…

  • Is there any way of making sense of the recorded chunk blobs in a standalone way?
  • And can it be done in a standard-compliant way without relying on the
    internal minutiae of how each browser out there has decided to
    implement this recording API?
  • Or is it maybe better to ignore the Media Stream Recording API
    altogether, and use a different method to upload video in a way that
    can be interpreted in real-time?

BTW, I know it’s possible to capture VideoFrames in real-time and upload those as individual images (WEBP or JPEG) via OffscreenCanvas’ convertToBlob() method, but this seems sub-optimal in terms of overall compression and processing efficiency to me.

(It’s summer 2024 and similar -albeit poorly phrased- questions seem to have been asked on SO for several years now, but none of them have ever seemed to received a real answer that wasn’t handwavey nonsense.)

Search Function in JavaScript to retain item and will not disappear upon erasure

I am creating a simple data table where it shows me the values of tracking from a firebase realtime database I am generating the table via JavaScript. Here is my code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Build a table</title>
    <script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-app.js"></script>
    <script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-analytics.js"></script>
    <script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-auth.js"></script>
    <script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-database.js"></script>    
</head>
<body>
    <div class="container">
        <input id="searchbar" 
               onkeyup="search_animal()" 
               type="text" name="search" 
               placeholder="Search item..">

    </div>


    <script>
            // JavaScript code

            function search_animal() {
            let input = document.getElementById('searchbar').value
            input = input.toLowerCase();
            let x = document.getElementsByClassName('pritem');

            for (i = 0; i < x.length; i++) {
                if (!x[i].innerHTML.toLowerCase().includes(input)) {
                x[i].style.display = "none";
                }
                else {
                x[i].style.display = "xx";
                }
            }
            }

    </script>




    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }


        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 20px;
        }

        #searchbar {
            margin: 10px;
            padding: 10px;
            border-radius: 5px;
            width: 50%;
            box-sizing: border-box;
        }

        #list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .animals {
            font-size: 1.2em;
            padding: 10px;
            border-bottom: 1px solid #ccc;
            animation: fadeIn 0.5s ease-in-out;
        }

        .animals:last-child {
            border-bottom: none;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }        
    </style>

    <button onclick="addData()">CLICK ME</button>

    <style>
        table {
            text-align: center;
        }
    </style>

<table id = "list">

        <tbody id = 'xx'>
            <th width = 200 >Requesting Office</th>
            <th width = 200 >Mayor's Office</th>
            <th width = 200 >Treasury Office</th>
            <th width = 200 >Budget Office</th>
            <th width = 200 >Mayor's Office</th>
        </tbody>
</table>
</body>
<script src="build-table.js"></script>
</html>

For the generation of table here is my code:

  function generateTable(table, data) {
    for (let element of data) {
      let row = table.insertRow();
      
      for (key in element) {
        let cell = row.insertCell();
        row.setAttribute('class', "pritem")
        let text = document.createTextNode(element[key]);
        
        cell.appendChild(text);
      }
    }
  }

I am hauling the files from my realtime database values as follows:

firebase.initializeApp(firebaseConfig);  
  var ltbmofiles = firebase.database().ref("prLTBMO");
 
  
  ltbmofiles.on("value", function(snapshot) {
    var placementObjectrValuesSplit = Object.values(snapshot.val())
    valueMax = placementObjectrValuesSplit
    // will show undefined if not defined or not yet present
    for (var x = 0; x <= placementObjectrValuesSplit.length-1; x++) {
        mountains.push(placementObjectrValuesSplit[x]);
        console.log(placementObjectrValuesSplit[x])

    }
    let table = document.querySelector("table");
    // let data = Object.keys(mountains[0]);
    // generateTableHead(table, data);
    generateTable(table, mountains);

})  

My problem with my code is this:

  1. while it shows my search quite properly when I search “treasury” for example, it shows the treasury row searched. However, when you clear the search bar, it does not show the full table again and whenever you search a word it doesn’t show anything anything anymore. Any ideas why this happens and how can I fix it?

I tried putting the tag properly from the row, while it shows me the item properly, it disappears.

Making a function inside an if statement run until you get a false value for the conditional using JS in Cypress

I am writing a test in Cypress where I enter two values into two separate inputs and then compare them by clicking a button. If the button displays “=”, I need to reset and reenter two new values until I get something other than “=”. It could be “+” or “-“.

I created a function called checkResult() that uses an if statement to check if the conditional is true (text === “=”). If it is true, it then calls another function called reEnterInputs(), which resets the value of the inputs and enters two new values.
The issue I am having is that I thought that by using this.reEnterInputs() in the if statement, it would rerun itself until I got a value other than “=”. It runs once and it stops. Can someone help?

 describe('template spec', () => {        
          const numberArray = [0, 1, 2, 3, 4, 5, 6, 7, 8];
          const  topInput = Math.floor(Math.random() * numberArray.length).toString();
          const  bottomInput = Math.floor(Math.random() * numberArray.length).toString();
           it('Check values inside html element', () => {
            cy.visit('/');
            //Fills out one input
            cy.get('#top').type(topInput);
            //Fills out another input
            cy.get('#bottom').type(bottomInput);
            //clicks button to compare
            cy.get('#compare').click();
            //Runs this function
            checkResult();
          });
        });
        
        **Functions***
    //This function checks the result of the values in the top and bottom inputs
      public checkResult() {
        cy.get('#value')
          .invoke('text')
          .then((text) => {
            if (text === '=') {
              this.reEnterInputs();
              //if the "=" appears again after running reEnterInputs(), I need reEnterInputs() to run again until a value different than "=" is given
            } else {
              cy.log('B');
            }
          });
      }
    
    //This function runs in the if statment
      public reEnterInputs() {
        let numArr = [0, 1, 2, 3, 4, 5, 6, 7, 8];
        let topNumber = Math.floor(Math.random() * numArr.length).toString();
        let bottomNumber = Math.floor(Math.random() * numArr.length).toString();
    
        //Clicks the reset button
        cy.get('#resetValues').click();
        //reenters the number in the inputs
        cy.get('#top').type(topNumber);
        cy.get('#bottom').type(bottomNumber);
        //checks value of inputs
        cy.get('#compare').click();
      }

JS file not executed when coming back to a page in SPA

I’m building an SPA where the router function calls the server and receives JSON response like

{
   "content": ...,
   "css": ...,
   "js": ...
}

and puts everything in the right place while also removing the old content. The problem is with js files (not inline scripts). On first load of the page, they get executed just fine. Then I navigate to page 2, the js of page 1 are removed. I then press the back button, which does trigger the router function and loads the content of page 1 along with js files. The script tags are created but the js never executes. Here’s the code for creating the script tags.

   function loadScript(url, type = null){
        const script = document.createElement('script');
        script.src = url;
        if(type != null)
            script.type = type;
        script.classList.add('page-js');
        document.body.appendChild(script);

        return new Promise((res, rej) => {
          script.onload = () => {
            console.log(script, 'script loaded'); // executes everytime
            res();
          };
          script.onerror = rej;
        });
   }

I tried wrapping my code in a SIAF but that didn’t make a difference. If I make the url unique like this, then the code executes.

script.src = url+'?v='+Math.random();

So most likely its a caching problem but if I do a page refresh (not handled by router), the code executes again without v parameter. What is the appropriate way of handling this in an SPA?

How to Fix ‘Undefined Variable’ Error in JavaScript?

I’m working on a JavaScript project, and I’ve encountered an issue with an “undefined variable” error. Here is the relevant part of my code:

                      function calculateSum(a, b) {
                              return a + b + c;
                              }
                       let result = calculateSum(5, 10);
                       console.log(result);

When I run this code, I get the following error in the console:

                             Uncaught ReferenceError: c is not defined
                             at calculateSum (script.js:2)
                             at script.js:5

I understand that the error is because c is not defined, but I’m not sure how to fix it. Could someone explain what I need to do to resolve this error?

I’ve checked the variable names to make sure there are no typos.
I’ve tried declaring c inside the function, but I need it to be dynamic based on some conditions.
Any help or suggestions would be appreciated. Thanks!

jsstore indexeddb not allowing multiple ! values in regex expression

When we are firing the below query on jsstore DB the multiple ‘!’ values are not executed; ideally the result was expected that it should return data of all countries whose name not brazil & mexico. Any way to achieve this?

select({
from: ‘Customers’,
where: {
country: {
regex: /!mexico|!brazil/i
}
}
})

Multiple not conditions to be added in where clause like notin

Third Person perspective – Three js

I’m working on a Three.js project where I need a third-person camera setup that follows a 3D model as it moves around the scene. I have a basic implementation with animations and controls, but I’m struggling to make the camera follow the model properly. Here’s a summary of what I’m trying to achieve and the current issues I’m facing:

Problem Summary:

I want the camera to follow the model from a third-person perspective. Specifically, as the model moves in different directions (forward, backward, left, right), the camera should always follow the model while maintaining a fixed distance and orientation.

Current Implementation:

<script setup>
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { onMounted, ref } from 'vue';

const container3D = ref(null);

onMounted(() => {
    let object, mixer, walkAction, shutdownAction, CycleBackAction, jumpAction;
    const scene = new THREE.Scene();
    scene.background = new THREE.Color(0xf0f0f0);
    const cameraOffset = new THREE.Vector3(0, 30, -50); 
    const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 1, 5000);

    scene.add(camera);

    const renderer = new THREE.WebGLRenderer();
    renderer.setSize(window.innerWidth, window.innerHeight);
    container3D.value.appendChild(renderer.domElement);

    const loader = new GLTFLoader();
    loader.load(
        '/medium_mech_striker/scene.gltf',
        (gltf) => {
            object = gltf.scene;
            object.scale.set(10, 10, 10);
            object.position.y = -200;
            object.rotateY(Math.PI);
            object.frustumCulled = false;
            scene.add(object);

            // Setup animations
            mixer = new THREE.AnimationMixer(object);
            gltf.animations.forEach((clip) => {
                if (clip.name === 'a5WalkCycle') {
                    walkAction = mixer.clipAction(clip);
                    walkAction.setEffectiveTimeScale(1); // Adjust this value to control the speed of the walk animation
                } else if (clip.name === 'a1ShutdownPose') {
                    shutdownAction = mixer.clipAction(clip);
                } else if (clip.name === 'a6WalkCycleBack') {
                    CycleBackAction = mixer.clipAction(clip);
                } else if (clip.name === 'a8Jump') {
                    jumpAction = mixer.clipAction(clip);
                }
            });

            // Start with shutdown animation
            if (shutdownAction) {
                shutdownAction.play();
            }
        },
        undefined,
        (error) => {
            console.error('An error happened while loading the GLTF model:', error);
        }
    );

    // Create plane mesh
    const planeGeometry = new THREE.PlaneGeometry(10000, 10000);
    planeGeometry.rotateX(-Math.PI / 2);
    const planeMaterial = new THREE.ShadowMaterial({ color: 0x000000, opacity: 0.2 });

    const plane = new THREE.Mesh(planeGeometry, planeMaterial);
    plane.receiveShadow = true;
    scene.add(plane);

    const GridHelper = new THREE.GridHelper(2000, 100);
    GridHelper.position.y = -199;
    GridHelper.material.opacity = 0.25;
    GridHelper.material.transparent = true;
    scene.add(GridHelper);

    // Light
    scene.add(new THREE.AmbientLight(0xf0f0f0, 3));
    const light = new THREE.SpotLight(0xffffff, 4.5);
    light.position.set(0, 1500, 200);
    light.angle = Math.PI * 0.2;
    light.decay = 0;
    light.castShadow = true;
    light.shadow.camera.near = 200;
    light.shadow.camera.far = 2000;
    light.shadow.bias = -0.000222;
    light.shadow.mapSize.width = 1024;
    light.shadow.mapSize.height = 1024;
    scene.add(light);

    // Orbit controls
    const controls = new OrbitControls(camera, renderer.domElement);
    controls.enableDamping = true;
    controls.dampingFactor = 0.25;
    controls.screenSpacePanning = false;

    // Handle keyboard input
    const keys = {};
    window.addEventListener('keydown', (event) => {
        keys[event.key] = true;
    });
    window.addEventListener('keyup', (event) => {
        keys[event.key] = false;
    });

    // Animation function
    function animate() {
        requestAnimationFrame(animate);

        // Update mixer if defined
        if (mixer) {
            mixer.update(0.03); // Adjust this value to control the overall animation update speed
        }

        // Handle animations
        if (object) {
            if (keys['w']) {
                if (shutdownAction && shutdownAction.isRunning()) {
                    shutdownAction.stop();
                }
                if (walkAction && !walkAction.isRunning()) {
                    walkAction.play();
                }

                if (keys['d']) {
                    object.rotation.y += 0.05;
                } else if (keys['a']) {
                    object.rotation.y -= 0.05;
                } else if (keys[' ']) {
                    if (!jumpAction.isRunning()) jumpAction.play();
                } else {
                    if (jumpAction.isRunning()) jumpAction.stop();
                }

                const direction = new THREE.Vector3();
                object.getWorldDirection(direction);
                object.position.addScaledVector(direction, 1);
            } else if (keys['s']) {
                if (walkAction && walkAction.isRunning()) {
                    walkAction.stop();
                }

                if (CycleBackAction && !CycleBackAction.isRunning()) {
                    CycleBackAction.play();
                }

                const direction = new THREE.Vector3();
                object.getWorldDirection(direction);
                object.position.addScaledVector(direction, -1);
            } else {
                if (walkAction && walkAction.isRunning()) {
                    walkAction.stop();
                }
                if (shutdownAction && !shutdownAction.isRunning()) {
                    shutdownAction.play();
                }
                if (CycleBackAction && CycleBackAction.isRunning()) {
                    CycleBackAction.stop();
                }
            }
        }
        // Update camera position to follow the object
        const objectPosition = new THREE.Vector3();
        object.getWorldPosition(objectPosition);

        // Calculate camera position based on object position and offset
        const offset = cameraOffset.clone();
        offset.applyMatrix4(object.matrixWorld);
        camera.position.copy(objectPosition).add(offset);

        // Ensure camera always faces the object
        camera.lookAt(objectPosition);

        controls.update();
        renderer.render(scene, camera);
    }

    // Start animation
    animate();

    // Adjust camera and renderer size when window is resized
    window.addEventListener('resize', () => {
        camera.aspect = window.innerWidth / window.innerHeight;
        camera.updateProjectionMatrix();
        renderer.setSize(window.innerWidth, window.innerHeight);
    });
});
</script>

Issue:

The camera currently doesn’t follow the model’s movements. The camera remains static and doesn’t adjust its position or orientation based on the model’s position or rotation.

What I’ve Tried:

I have set up the camera and renderer properly.
I’ve implemented animation controls for moving and rotating the model.
I’ve used OrbitControls to manage the camera view.

Questions:
How can I modify the camera setup so that it follows the model from a third-person perspective?
What changes are needed in the code to ensure that the camera maintains a fixed distance from the model while it moves around?
Any guidance or suggestions would be greatly appreciated. Thank you!

Dropdown selector in WS Form must select layers in LayerSlider same form

your textNeed that when a customer selects a product from dropdown selector of the my WS Form, he can see an image of the product in the same form using a window with LayerSlider.

your textMy data:
your textDropdown selector ID = 5277
your textProduct1 = DAA1186
your textProduct2 = DAA1187
your textProduct3 = DAA1189
your textProduct4 = DAA1244
your textLayerslider ID = 10
your textLauer = 1
your textLayer = 2
your textLayer = 3
your textLayer = 4

    jQuery(document).ready(function($) {
    $('#5277').change(function() {
    var selectedValue = $(this).val();
    if (selectedValue === 'DAA1186') {
    layersliderInstance.showSlide(1);   
    else if (selectedValue === 'DAA1187') {
    layersliderInstance.showSlide(2);
    else if (selectedValue === 'DAA1189') {
    layersliderInstance.showSlide(3);
    else if (selectedValue === 'DAA1244') {
    layersliderInstance.showSlide(4); }
    var layersliderInstance = $('#10').layerSlider({     
    });
    });
    }); 

your textIt’s don’t work and I don’t see the error, but the console says something else. The specified value “0)” cannot be parsed, or is out of range. jquery.min js?ver=3.7.1:2.

Screen capture popup keeps swapping the applications windows

I’m developing a site that uses the Screen Capture API to capture a game’s windows and check the screenshots taken to notify user of some scenarios.

My problem here is when we open the Screen Capture popup to choose which application window I want to capture, all the applications on the popup keep changing it’s location inside it, so it gets very difficult to select the correct application’s window. I presume that the popup keeps checking if there are new open windows to add on it, and since all the game windows have the same name, the ordenation just don’t take it in mind. Anyway, is there any way to avoid this behavior?

The Screen Capture API is an inbuilt API, so I dont control the popup, nor how the window selection is made. This is how the selection is started:

    const displayMediaOptions = {
        video: {
            displaySurface: "window",
            cursor: "hidden"
        },
        audio: false,
    };

videoElem!.srcObject =
                    await navigator.mediaDevices.getDisplayMedia(displayMediaOptions);

I’ve tested on google chrome, edge and firefox last versions on windows 10. All have this same behavior.

Here a video for better understanding:
https://youtu.be/6QKnYghi-Cc

Thanks

Sửa Tủ Lạnh Gần Đây Limosa

Dịch Vụ Sửa Tủ Lạnh Gần Đây Giá Rẻ, Uy Tín – Sửa Tủ Lạnh Limosa
Bạn đang cần tìm kiếm địa chỉ sửa tủ lạnh gần đây nhưng chưa biết nên lựa chọn trung tâm nào. Sửa Tủ Lạnh Limosa tự tin là một trong số các trung tâm sửa tủ lạnh số một tại Hồ Chí Minh.

  1. Những lỗi thường gặp ở tủ lạnh
    Tủ lạnh không hoạt động được dù đã cắm nguồn, cắm điện.
    Tủ lạnh quá lạnh hoặc làm lạnh kém so với ngày thường.
    Trong lúc hoạt động tủ lạnh phát ra tiếng ồn lớn.
    Đèn tủ lạnh không sáng khi tủ hoạt động
    Cửa tủ lạnh không đóng được, cánh cửa tủ bị xệ.
    Tủ lạnh bị rò rỉ nước ra sàn không rõ nguyên nhân
    Ống dẫn gas của tủ có vấn đề, tủ lạnh hết ga, xì gas
    Board tủ lạnh bị hư hỏng
    Block tủ lạnh không hoạt động
    Thực phẩm trong tủ lạnh không được bảo quản.
    Khi tủ lạnh nhà bạn gặp phải những sự cố trên hãy liên hệ ngay với dịch vụ sửa tủ lạnh Limosa để được giúp đỡ nhé.
  2. Các bước sửa tủ lạnh tại nhà của Trung tâm Sửa Tủ lạnh Limosa

Với nhiều năm kinh nghiệm trong lĩnh vực điện lạnh, Limosa luôn là địa chỉ tin cậy của nhiều khách hàng khi có nhu cầu sửa tủ lạnh. Trung tâm Limosa vẫn luôn nhận được đánh giá cao từ khách hàng là vì quy trình sửa chữa tủ lạnh của chúng tôi được thực hiện rất chuyên nghiệp, an toàn . Cụ thể :
Bước 1: Ghi nhận thông tin
Bộ phận CSKH tiếp nhận thông tin của những khách hàng có nhu cầu sửa chữa tủ lạnh gần đây thông qua số điện thoại 0909.114.796 hoặc trang web Suatulanhlimosa.com
Bước 2: Điều phối kỹ thuật viên
Ngay sau khi xác nhận về thời gian và địa chỉ cụ thể với khách hàng, kỹ thuật viên sẽ được điều phối có mặt tận nơi để tiến hành cung cấp dịch vụ
Bước 3: Kiểm tra hiện trạng của tủ lạnh
Sau khi có mặt nhân viên kỹ thuật tiến hành kiểm tra tình trạng của tủ lạnh để tìm ra lỗi sự cố và nguyên nhân gây ra hư hỏng.
Bước 4: Phân tích nguyên nhân hỏng hóc và giải pháp sửa chữa cho khách hàng
Nắm được lỗi và nguyên nhân dẫn đến sự cố của tủ lạnh, kỹ thuật viên sẽ trình bày để khách hàng hiểu từ đó đưa ra phương pháp sửa chữa tối ưu nhất.
Bước 5: Báo giá cho khách hàng
Căn cứ vào tình trạng hỏng hóc thực tế của tủ cùng với mức giá dịch vụ sửa tủ lạnh đã niêm yết của trung tâm, nhân viên sẽ báo giá chi tiết cho bạn.
Bước 6: Bắt đầu công việc sửa chữa cho tủ lạnh
Sau khi thống nhất với khách hàng về chi phí và phương án sửa chữa, kỹ thuật viên sẽ bắt đầu thực hiện
Bước 7: Bàn giao lại tủ lạnh và thu phí, tư vấn sử dụng.
Sau khi hoàn thành xong việc sửa chữa, nhân viên kỹ thuật sẽ cho khởi động lại tủ để kiểm tra xem có bất cứ vấn đề nào nữa không sau đó mới bàn giao lại thiết bị và tiến hành thu phí dịch vụ.
Bước 8: Sau 03 ngày sửa tủ lạnh, nhân viên chăm sóc khách hàng sẽ chủ động liên lạc lại để nắm được tình hình hoạt động của tủ đồng thời giải đáp những vướng mắc của khách hàng về dịch vụ sửa chữa tủ lạnh.
3. Cam kết khi lựa chọn dịch vụ sửa tủ lạnh của Trung tâm Sửa Tủ Lạnh Limosa
Để đáp lại sự tin tưởng của khách hàng khi đã sử dụng dịch vụ sửa tủ lạnh gần nhất của trung tâm, chúng tôi cam kết rằng :
Cam kết khắc phục triệt để 100% tất cả các lỗi mà tủ lạnh đang gặp phải, chẩn đoán đúng bệnh, đúng lỗi.
Thời gian có mặt nhanh chóng theo đúng lịch hẹn, không để khách hàng phải chờ đợi lâu.
Cam kết quá trình sửa chữa tủ lạnh nhanh gọn, trang thiết bị làm việc hiện đại.
Đảm bảo 100% nhân viên kỹ thuật tham gia quá trình sửa chữa cho tủ lạnh đều có kinh nghiệm và tay nghề cao trong lĩnh vực điện lạnh.
Cam kết trong quá trình sửa chữa tủ lạnh không đánh cắp, đánh tráo bất cứ linh phụ kiện gốc của tủ
Trong trường hợp cần thay thế phụ kiện đảm bảo tất cả đều là hàng chính hãng 100%, có nguồn gốc và xuất xứ rõ ràng. Limosa nói không với những hàng hóa giả, hàng kém chất lượng trôi nổi trên thị trường.
Cam kết thống nhất giá cả với khách hàng ngay từ đầu, không thu thêm bất cứ phụ phí nào khác ngoài mức giá đã thống nhất. Chúng tôi sẽ chỉ tính phí khi khách hàng đồng ý sử dụng dịch vụ, miễn phí hoàn toàn 100% phí kiểm tra, tư vấn sử dụng.
Cam kết hoàn lại 100% tiền sửa tủ lạnh gần đây Limosa cho khách hàng nếu không sửa chữa triệt để các lỗi của tủ
Cam kết cung cấp dịch vụ bảo hành lên đến tận 6 tháng (tùy lỗi) sau khi hoàn thành việc sửa tủ lạnh cho khách.
Trên đây là một số chia sẻ của trung tâm Limosa về dịch vụ sửa tủ lạnh. Gọi ngay cho chúng tôi theo số 0909.114.796 khi cần sử dụng các dịch vụ điện lạnh chuyên nghiệp, uy tín, giá rẻ nhé.

Dịch vụ sửa tủ lạnh Limosa muốn mang đến cho quý khách hàng dịch vụ sửa tủ lạnh giá rẻ, uy tín nhất

How to Hide Product Variants Based on Dependencies Using jQuery?

I am using WooCommerce with the Hello Elementor theme on localhost, and I have several custom fields for product variants. I want to hide a variant when specific dependency conditions are not met. I’m using the following jQuery code to check dependencies and toggle visibility:

$('#product-variants .variant-card').each(function () {
    const $variant = $(this);
    const dependencies = ($variant.data('dependencies') || '').split(',').filter(Boolean);
    const allDependenciesMet = dependencies.every(dependencyIndex => {
        const dependentVariant = $('[data-variant-index="' + dependencyIndex + '"]');
        const quantity = parseInt(dependentVariant.find('input[type="range"]').val(), 10) || 0;
        return quantity > 0; // Check if quantity is more than 0
    });

    if (!allDependenciesMet) {
        $variant.hide(); // Hide variant if dependencies are not met
    } else {
        $variant.show(); // Show variant if all dependencies are met
    }
});

The issue is that the variants hide correctly at first when the page loads, but then the display property quickly changes back to block almost immediately (less than a second), causing the variants to reappear.

I am not using any other plugins that might interfere with this logic only woocommerce is installed in my localhost.

  • Why is the display property reverting to block?
  • and how can I ensure that the variants remain hidden when their dependencies are not met?

Any insights or solutions would be greatly appreciated!

SPA Application become significantly slower when the route is changed repeatedly. Please find attached the firefox performance and memory profile

SPA Application become significantly slower when the route is changed repeatedly. Please find attached the firefox performance and memory profile.This is a Vue Quasar App. Application is quite fast in the beginning. But, when I keep switching the pages to be loaded, it becomes slower and slower. Memory snapshots doesn’t vary much in MB. It decreases also at times.

Firefox Performance profile link: https://profiler.firefox.com/public/yrnk8amaz8dv64qzc55qd2v3f3861fhag2raz48/calltree/?globalTrackOrder=0w2&implementation=js&thread=3&v=10

Memory Profile:
enter image description here

Which webpack hooks can hooking into dynamic import

I write a webpack plugin which collect informations of import. I use parser.hooks.import hooking into import statement like import xxx from 'xxx'. but for dynamic import like const yy = import('yy'). is there a hook can hooking it.

I try parser.hooks.call.for('import') and parser.hooks.expression.for('import'), but they don’t works. which hooks should i use??