Features of 4.1-inch Powerful Slow Cold Press Juicer with Large Feed Chute?

Shop Now: https://amzn.to/3WoNZIk

Feed Chute Size Compatibility: Some consumers find that despite the advertised 4.1-inch (104mm) feed chute, certain fruits and vegetables still need to be chopped into smaller pieces to fit, which diminishes the promised convenience of a large chute.

Juicing Speed: While marketed as a slow cold press juicer, some users have reported that the juicing process is slower than expected, especially when juicing larger quantities of produce, which may not align with busy lifestyles.

Pulp Extraction Efficiency: There are mixed reviews regarding the efficiency of pulp extraction. Some users find that the machine leaves relatively wet pulp, suggesting that it might not be extracting all the juice possible from the produce.

Cleaning Process: Despite claims of being easy to clean, some consumers find that the masticating juicer’s design makes it challenging to disassemble and clean thoroughly, particularly in hard-to-reach areas.

Durability: While the machine is marketed as powerful, some users have experienced issues with durability over time, such as motor burnout or parts breaking, which raises concerns about the long-term reliability of the product.

Noise Level: Although it’s a masticating juicer, some users have found the machine to be noisier than expected, which can be bothersome, especially when juicing early in the morning or late at night.

Juice Quality: While slow juicers are known for preserving nutrients better than high-speed centrifugal juicers, some consumers question whether the juice quality justifies the higher price tag of this machine compared to other juicers on the market.

Warranty and Customer Service: There have been reports of issues with customer service and warranty claims, with some users experiencing delays or difficulties in getting support or replacement parts for faulty machines.

I tried to provide a range of potential issues or concerns that consumers might encounter with the specific product you mentioned: the Masticating Juicer Machine with a 4.1-inch feed chute. These issues are based on common complaints or observations from users of similar products in the market.

I aimed to cover various aspects such as performance, ease of use, durability, maintenance, and customer service, anticipating that these are areas where consumers might have expectations or encounter challenges when using such a product.

linhttps://amzn.to/3WoNZIk

What is the correct way to link to the internal pages of static built application?

What is the accepted way to link to an internal page of a Static Built, Single Page Application (SPA), from outside the application.

Lets say you have a Next.js static build hosted at example.com/path/index.html
Currently there is a .htaccess file that rewrites /path/* to /path/index.html

Links in the SPA from react router look like example.com/path/internal/page

example:

// example.com/path/login
<Link to={`${this.settings.getClientBaseUrl()}login`}>


// /path/login
// The url in the browser looks like example.com/path/login
<Route exact path={`${this.settings.getClientBasePath()}login`} element={<LoginForm parent={this.parent} />} />

However /path/internal/page is not an actual file on the server only /path/index.html

What is the correct way to link directly to example.com/path/internal/page?

HTML 5 Canvas Animation messed up while changing resolution and not working on mobile

This is my canvas code, it’s just a simple circle animation with some mousemove effect, but when i try to change my resolution it will make it bigger and messy. Also not working on mobile. IT usually hapens when we scroll down a bit fast, I have added an image you can check dowm below. here’s my code.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<body>
    
    <div id="main">
        <div class="hp-hands-wrapper" data-scroll-section="" style="z-index: initial; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; pointer-events: all;" data-scroll-section-inview="">   
            <div class="object3d-anchor is-inview" data-scroll="" data-scroll-repeat="" data-scroll-call="3dObject" data-scroll-offset="20%"></div>   
            <div class="bg-circle">
              <div class="mobile-circle-wrapper">
                <div class="inner">
                  <div class="mobile-pink-circle"></div>        
                  <div class="mobile-circle mc-01"></div>
                  <div class="mobile-circle mc-02"></div>
                </div>        
              </div>
            </div>
            <h1 class="hands-hdl show is-inview" data-scroll-speed="2" data-scroll="" style="transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1.2, 0, 1);">
              <span id="trigger" class="hands-hdl-01 hands-hdl thinkers txt show">predicting the</span> <br>
              <span class="hands-hdl-03 hands-hdl doers txt show">next trend</span>
            </h1>
            <canvas class="scene show is-inview" id="bubble" data-scroll="" width="1920" height="919" style="width: 1920px; height: 919px;"></canvas>
            <h3 class="hands-subhdl el-fade-in is-inview" data-scroll="" data-scroll-speed="1.5" style="transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 14.475, 0, 1);">
              with 10 years of experience we already know what today’s trends mean for tomorrow’s world.    </h3>    
            <a href="#" class="btn-scroll-down mlink"></a>
        
            <div class="el-plax el-plax--00 is-inview" data-scroll="" data-scroll-speed="4" style="transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 23.35, 0, 1);"></div>
          </div>


    </div>
        <!-- three.js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/97/three.min.js"></script>
    <script src="https://cdn.rawgit.com/josephg/noisejs/master/perlin.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/TweenMax.min.js"></script>         
    <script>
        /*--------------------
Setup
--------------------*/
let isMobile = window.matchMedia("only screen and (max-width: 649px)").matches;
let isTablet = window.matchMedia("only screen and (min-width: 650px) and (max-width: 990px)").matches;
let isTabletProAndDesktop = window.matchMedia("only screen and (min-width: 830px)").matches;
let isDesktop = window.matchMedia("only screen and (min-width: 1113px)").matches;
let isTouchDevice = window.matchMedia("only screen and (hover: none) and (pointer: coarse)").matches;

console.clear();
const canvas = document.querySelector('#bubble');
let pixelRatio = window.devicePixelRatio
let AA = true
if (pixelRatio > 1) {
  AA = false
}
let width = canvas.offsetWidth,
    height = canvas.offsetHeight;
const renderer = new THREE.WebGLRenderer({
    canvas: canvas,
    antialias: AA,
    powerPreference: "high-performance",
    alpha: true
});
const scene = new THREE.Scene();

const setup = () => {
    renderer.setPixelRatio(window.devicePixelRatio);
    renderer.setSize(width, height);
    renderer.setClearColor(0xebebeb, 0);
    renderer.shadowMap.enabled = true;
    renderer.shadowMapSoft = true;

    // scene.fog = new THREE.Fog(0x4814B8, 20, 950);

    const aspectRatio = width / height;
    const fieldOfView = 100;
    const nearPlane = 0.1;
    const farPlane = 10000;
    camera = new THREE.PerspectiveCamera(
        fieldOfView,
        aspectRatio,
        nearPlane,
        farPlane
    );
    camera.position.x = 0;
    if(isMobile){
        camera.position.y = -60;    
    }else{
        camera.position.y = -10;
    }
    // camera.position.y = -100;
    camera.position.z = 270;
}
setup();


/*--------------------
Lights
--------------------*/
let hemispshereLight, shadowLight, light2;
const createLights = () => {
    hemisphereLight = new THREE.HemisphereLight(0xFCDCEF, 0x4A7DFF, .3),

        shadowLight = new THREE.DirectionalLight(0xE4C8FF, .1);
    shadowLight.position.set(0, 1650, 450);
    shadowLight.castShadow = true;
    shadowLight.shadow.radius = 18;
    shadowLight.shadow.camera.left = -950;
    shadowLight.shadow.camera.right = 950;
    shadowLight.shadow.camera.top = 950;
    shadowLight.shadow.camera.bottom = -950;
    shadowLight.shadow.camera.near = 1;
    shadowLight.shadow.camera.far = 4000;
 

    shadowLight.shadow.mapSize.width = 4096;
    shadowLight.shadow.mapSize.height = 4096;
    
    light2 = new THREE.DirectionalLight(0xFBD44B, .25);
    light2.position.set(-600, 350, 350);

    light3 = new THREE.DirectionalLight(0x8EBBFF, .45);
    light3.position.set(0, -250, 300);

    scene.add(hemisphereLight);
    scene.add(shadowLight);
    scene.add(light2);
    scene.add(light3);
}
createLights();
initGui();

/*--------------------
Bubble
--------------------*/
const vertex = width > 575 ? 80 : 40;
const bubbleGeometry = new THREE.SphereGeometry(120, vertex, vertex);
let bubble, bubbleMaterial;
const createBubble = () => {
    for (let i = 0; i < bubbleGeometry.vertices.length; i++) {
        let vector = bubbleGeometry.vertices[i];
        vector.original = vector.clone();
    }
    bubbleMaterial = new THREE.MeshStandardMaterial({
        emissive: 0xAA8CFF,   //change color code here
        emissiveIntensity: 0.7,
        roughness: 0.8,
        metalness: 0.5,
        side: THREE.FrontSide
    });
    bubble = new THREE.Mesh(bubbleGeometry, bubbleMaterial);
    bubble.castShadow = true;
    bubble.receiveShadow = false;
    scene.add(bubble);
}
createBubble();


/*--------------------
Plane
--------------------*/
const createPlane = () => {
    // const planeGeometry = new THREE.PlaneBufferGeometry(2000, 2000);
    const planeGeometry = new THREE.PlaneBufferGeometry(2500, 2500);
    const planeMaterial = new THREE.ShadowMaterial({
        opacity: 0.1
    });
    const plane = new THREE.Mesh(planeGeometry, planeMaterial);
    plane.position.y = -200;
    plane.position.x = 0;
    plane.position.z = 0;
    plane.rotation.x = Math.PI / 180 * -90;
    plane.receiveShadow = true;
    scene.add(plane);
}
createPlane();


/*--------------------
Map
--------------------*/
const map = (num, in_min, in_max, out_min, out_max) => {
    return (num - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}


/*--------------------
Distance
--------------------*/
const distance = (a, b) => {
    const dx = a.x - b.x;
    const dy = a.y - b.y;
    const d = Math.sqrt(dx * dx + dy * dy);
    return d;
}


/*--------------------
Mouse
--------------------*/
let mouse = new THREE.Vector2(0, 0);
const onMouseMove = (e) => {
    TweenMax.to(mouse, 0.8, {
        x: e.clientX || e.pageX || e.touches[0].pageX || 0,
        y: e.clientY || e.pageY || e.touches[0].pageY || 0,
        ease: Power2.easeOut
    });
};
if(!isTouchDevice){
    ['mousemove', 'touchmove'].forEach(event => {
        window.addEventListener(event, onMouseMove);
    });
}



/*--------------------
Spring
--------------------*/
let spring = {
    scale: 1
};
const clicking = {
    down: () => {
        TweenMax.to(spring, 1.1, {
            scale: 1.0,
            ease: Power3.easeOut
        });
    },
    up: () => {
        TweenMax.to(spring, .9, {
            scale: 1,
            ease: Elastic.easeOut
        });
    }
};
if(!isTouchDevice){
    ['mousedown', 'touchstart'].forEach(event => {
        window.addEventListener(event, clicking.down);
    });
    ['mouseup', 'touchend'].forEach(event => {
        window.addEventListener(event, clicking.up);
    });
}


/*--------------------
Resize
--------------------*/
const onResize = () => {
    canvas.style.width = '';
    canvas.style.height = '';
    width = canvas.offsetWidth;
    height = canvas.offsetHeight;
    camera.aspect = width / height;
    camera.updateProjectionMatrix();
    maxDist = distance(mouse, {
        x: width / 2,
        y: height / 2
    });
    renderer.setSize(width, height);
}
let resizeTm;
window.addEventListener('resize', function () {
    resizeTm = clearTimeout(resizeTm);
    resizeTm = setTimeout(onResize, 200);
});


/*--------------------
Noise
--------------------*/
let dist = new THREE.Vector2(0, 0);
let maxDist = distance(mouse, {
    x: width / 2,
    y: height / 2
});
const updateVertices = (time) => {
    dist = distance(mouse, {
        x: width / 2,
        y: height / 2
    });
    dist /= maxDist;
    dist = map(dist, 1, 0, 0, 1);
    for (let i = 0; i < bubbleGeometry.vertices.length; i++) {
        let vector = bubbleGeometry.vertices[i];
        vector.copy(vector.original);
        let perlin = noise.simplex3(
            (vector.x * 0.005) + (time * 0.0005), // Adjust the time multiplier for faster animation
            (vector.y * 0.005) + (time * 0.0005), // Adjust the time multiplier for faster animation
            (vector.z * 0.005)
        );
        let ratio = ((perlin * 0.35 * (dist + 0.3)) + 0.8);  //scale the animation
        vector.multiplyScalar(ratio);
    }
    bubbleGeometry.verticesNeedUpdate = true;
}

function initGui() {
    const trigger = document.getElementById('trigger');

    trigger.addEventListener('mouseenter', e => {
        changeColors();
    });
    trigger.addEventListener('mouseleave', e => {
        revertColors();
    });
}

function revertColors() {
    
    light2.color.setHex(0xAA8CFF); // Change color here
    bubbleMaterial.emissive.setHex(0xAA8CFF); // Change color here
    conf.light1Color = chroma.random().hex();
    conf.light2Color = chroma.random().hex();
    conf.light3Color = chroma.random().hex();
    light1.color = new THREE.Color(conf.light1Color);
    light2.color = new THREE.Color(conf.light2Color);
    light3.color = new THREE.Color(conf.light3Color);
    console.log(conf);
}


function changeColors() {
    light2.color.setHex(0xAA8CFF); // Change color here
    bubbleMaterial.emissive.setHex(0xAA8CFF); // Change color here
    conf.light1Color = chroma.random().hex();
    conf.light2Color = chroma.random().hex();
    conf.light3Color = chroma.random().hex();
    light1.color = new THREE.Color(conf.light1Color);
    light2.color = new THREE.Color(conf.light2Color);
    light3.color = new THREE.Color(conf.light3Color);
    console.log(conf);
}

/*--------------------
Animate
--------------------*/
var stopRender = false;
const render = (a) => {
    if(stopRender){
        return true;
    }
    requestAnimationFrame(render);
    bubble.rotation.y = -4 + map(mouse.x, 0, width, 0, 4);
    bubble.rotation.z = 4 + map(mouse.y, 0, height, 0, -4);
    // bubble.rotation.y = -4 + map(mouse.x, 0, width, 0, 4);
    // bubble.rotation.z = 4 + map(mouse.y, 0, height, 0, -4);
    bubble.scale.set(spring.scale, spring.scale, spring.scale);
    updateVertices(a);
    renderer.clear();
    renderer.render(scene, camera);
}

function frameThrottle(original) {
    let pending = false;

    function wrap() {
        pending = false;
        original();
    }

    function proxy() {
        if (!pending) {
            pending = true;
            requestAnimationFrame(wrap);
        }
    }

    return proxy;
}

if(isTabletProAndDesktop){
    frameThrottle(requestAnimationFrame(render));
    renderer.render(scene, camera);    
}




if(isTabletProAndDesktop){
    function stopRendering(){
        stopRender = true;
    }
    function resumeRendering(){
        stopRender = false;
       requestAnimationFrame(render);
    }
}



        
    </script>
</body>
</html>

I have tried couple of things like resizing, time reduce, but it does’nt work for me.

In Sinon, how do you assert a property/accessor was used before/after another test double?

Note: I will answer my own question, but if you have a better answer, I’ll accept it over mine.

I have a function that looks like this:

  function systemUnderTest(func, param) {
    param.firstProperty = !param.firstProperty;
    func();
    param.secondProperty = !param.secondProperty;
  }

I would like to stub param and assert that param.firstProperty is assigned before func(). I would also like to check that func() is called before param.secondProperty is set.

Sinon comes with spy.calledBefore(anotherSpy) and this seems like the right tool for the job, but I’m not sure how to set up param, an object literal, to record the order in which its properties/accessors are used.

How do I set up param so I can call x.calledBefore(y) on its properties?

nodejs sequelize default to uuid

I am using a nodejs backend with sequelize.

Right now when I make a model like

import { sequelize } from "../db/sequelize.mjs";
import { DataTypes } from "sequelize";

const User = sequelize.define(
  "User",
  {
    username: {
      type: DataTypes.STRING,
      allowNull: false,
      unique: true,
    },
    email: {
      type: DataTypes.STRING,
      allowNull: false,
      unique: true,
    },
  },
  {
    tableName: "users", // Specify the actual table name
  }
);
export { User };

the id comes through like 1 or 2 but I want sequelize to default all models to use uuid

instead of typing that in each model I want to type that as the default value in the sequelize config here

import { Sequelize } from "sequelize";

// the config for the sequelize connection to the psql db
const sequelize = new Sequelize({
  dialect: "postgres",
  username: "user",
  host: "postgresql",
  database: "mydatabase",
  password: "password",
  port: 5432,
  define: {
    timestamps: true,
    // by default sequelize is camelcase (i.e. 'createdAt') and psql cant handle camelcase
    //   we want to default all db names to use underscores as well (i.e. 'created_at')
    underscored: true,
  },
});

export { sequelize };

I am struggling to find documentation on this

whilst trying to make a language select for a web im making i get an error that reads [Cannot read properties of null (reading ‘addEventListener’)]

java code (the error code is placed at addEventListener)

const translations = {
    en: {
        text1: "testing"
    },
    no: {
        text1: "testing"
    },
    gm: {
        text1: "testen"
    }
}


const languageSelectop = document.querySelector("LS");

problem being around here

languageSelectop.addEventListener("change", (event) => {
    setLanguage(event.target.value)
})
const setLanguage = (language) => {
    if(language == "no"){
        console.log(language);
    }else if(language == "en"){
        console.log(language)
    }else if(language == "gm"){
        console.log(language)
    }
}

html code (no aperent isues as far as i know)

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Arctic Fox Web - WIP</title>
        <script type="text/javascript" src="js/Language.js"></script>
        
    </head>
    <body>

        <div>
            <select name="" id="LS">
                <option value="en">English</option>
                <option value="no">Norsk</option>
                <option value="gm">Deutsch</option>
            </select>

        </div>

        <div>
            testing
        </div>
        <div>
            testing
        </div>
    
    </body>
</html>

im following a tutorial on yt thus i dont quite know whats wrong if it is needed here is the video Youtube

API doesn’t return the data i posted from another api

I practice frontend using react framework. I’m facing a small problem with the restaurant website i am creating. when i use axios.post to post an item of the menu in the database;supposedly, the item is stored with its parameteres in the destination api.I am sure that the post request works correctly. The thing is when i go to checkout i find that the get request of the cart using axios.get returns and empty json object like this {}. So, it doesn’t return anything i posted from the items. Anyone have a solution?

i’ve tried to check the api links on postman and it works efficiently

Trying to reach a status functions (edit status) by evenlistner. those are called succesfully but still won’t do any action

I have a social system which has an option to edit the statuses. it’s includes additional option like deleting images that belongs to that status. now, those status entries are generated by a PHP file called by AJAX, so i’m well aware of possibly scope issues.

The problem itself: nothing happens when trying to click on the edit button. it doesn’t give any console error, rather an indication that this button was clicked and indeed called the function.

There is the whole JavaScript/AJAX for it:

    document.addEventListener('DOMContentLoaded', function() {
    function setupCancelButton() {
        document.getElementById('edit_cancel').addEventListener('click', function () {
            document.getElementById('editWindow').style.display = 'none';
            document.getElementById('edit_overlay').style.display = 'none';
        });
    }


    function handleEditIconClick(statusContainer) {
        console.log("Clicked status container:", statusContainer); // Debug: log the status container

        // Find the .status_itself within the status container correctly
        var statusContentElement = statusContainer.querySelector('.status_itself');
        if (!statusContentElement) {
            console.error('No .status_itself found within the status container:', statusContainer);
            return; // Error handling if no status content element is found
        }

        var currentText = statusContentElement.textContent.trim(); // Get all text, trimming whitespace

        if (!currentText) {
            console.error('No text content found within status container:', statusContainer);
            return; // Error handling if no text content is found
        }

        // Set the textarea value and show the editing interface
        document.getElementById('status_edit_textarea').value = currentText;
        document.getElementById('editWindow').style.display = 'block';
        document.getElementById('edit_overlay').style.display = 'flex';

        var statusId = statusContainer.getAttribute('data-status-id');
        fetchAndDisplayImages(statusId);
    }




    function fetchAndDisplayImages(statusId) {
        var xhrImages = new XMLHttpRequest();
        xhrImages.open('POST', 'functions/fetch_status_images.php', true);
        xhrImages.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        xhrImages.onload = function() {
            if (xhrImages.status === 200) {
                var images = JSON.parse(xhrImages.responseText);
                var imagesContainer = document.getElementById('status_images_container');
                var imageDeletionPrompt = document.getElementById('image_deletion_prompt');

                imagesContainer.innerHTML = '';
                if (images.length > 0) {
                    imageDeletionPrompt.style.display = 'block';
                    images.forEach(function (image) {
                        var imgElement = document.createElement('img');
                        imgElement.src = 'images/upload/' + image;
                        imgElement.className = 'editable-status-image';
                        imgElement.style.margin = '5px';
                        imgElement.style.width = '100px';
                        imgElement.style.height = '100px';
                        imgElement.style.objectFit = 'cover';
                        imgElement.style.borderRadius = '15px';
                        imgElement.onclick = function () {
                            this.classList.toggle('selected');
                        };
                        imagesContainer.appendChild(imgElement);
                    });
                } else {
                    imageDeletionPrompt.style.display = 'none';
                }
            }
        };
        xhrImages.send('status_id=' + encodeURIComponent(statusId));
    }


    function handleConfirmButtonClick(currentStatusElement) {
        var statusId = currentStatusElement.getAttribute('data-status-id');
        var newText = document.getElementById('status_edit_textarea').value;
        var selectedImages = Array.from(document.querySelectorAll('.editable-status-image.selected')).map(img => img.src.split('/').pop());

        var xhr = new XMLHttpRequest();
        xhr.open('POST', 'functions/edit_status.php', true);
        xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        xhr.onload = function() {
            if (xhr.status === 200) {
                var response = JSON.parse(xhr.responseText);
                if (response.status === 'success') {
                    currentStatusElement.nextElementSibling.querySelector('.status_text').textContent = newText;
                    document.querySelectorAll('.editable-status-image.selected').forEach(function(img) {
                        img.remove();
                        document.querySelectorAll('.status_img_layout img').forEach(function(mainImg) {
                            if (mainImg.src === img.src) {
                                mainImg.parentNode.remove();
                            }
                        });
                    });
                    document.getElementById('editWindow').style.display = 'none';
                    document.getElementById('edit_overlay').style.display = 'none';
                } else {
                    alert('Failed to save changes: ' + response.message);
                }
            } else {
                console.error('Error updating status:', xhr.status);
            }
        };
        xhr.send('id=' + encodeURIComponent(statusId) + '&text=' + encodeURIComponent(newText) + '&deleteImages=' + JSON.stringify(selectedImages));
    }

        setupCancelButton();

    });

Also, the stracture as follows (inside the other PHP file called by AJAX):

    $sendback = "
<div id='statusesContainer2'>
    <div class='profile_status_layout' id='profile_status_layout_{$stat_id}'>
        <div class='status_top status' id='status_{$stat_id}' data-status-id='{$stat_id}'>
            <div class='status_meta'>
                <div class='status_avatar'>
                    <img alt='profile' src='images/upload/{$userAvatar}'>
                </div>
                <div class='status_author'>
                    <strong><a href='?go=profile&profileid={$yoohoo_id}'>{$yoohoo_name}</a></strong>
                    <span class='status_time'>{$statusDate}</span>
                </div>
            </div>
            <div class='status_meta'>
            ";

    if ($yoohoo_id == $yoohoo_oid) {
        $sendback .= "<div class='st_edit_Icon' onClick='handleEditIconClick(this.closest(&apos;.status&apos;))'></div>&nbsp;
                  <div id='stDelete' class='st_delete_Icon' onclick='confirmDelete(this)'></div>";
    }

    $sendback .= "
        </div>
        </div>
        <div class='status_itself'>
            <div class='status_content'>{$statusContent}</div>
            <div class='status_img_layout'>
                <!--  PICTURES HERE-->
            </div>
        </div>
        <div class='status_actions'>
            <div class='status_tooltip'>
                <div class='status_tooltip_button'>
                    <div id='status_reactions_{$stat_id}' class='status_reactions'>
                        <a id='like_{$stat_id}' href='#'><div class='like_icon'></div></a>
                        <a id='dislike_{$stat_id}' href='#'><div class='like_dislike'></div></a>
                        <a id='love_{$stat_id}' href='#'><div class='like_love'></div></a>
                    </div>
                </div>
            </div>
            <div class='reactions_area'>
                <div class='reacters_overlay' data-status-id='{$stat_id}' style='display:none;'></div>
                <div class='reacters_windowOn' data-status-id='{$stat_id}' style='display:none;'>
                    <div class='reacters_closeButton' data-status-id='{$stat_id}'>CLOSE</div>
                    <ul><!--  NAMELIST HERE--></ul>
                </div>
                <div class='show_icon'></div> <a class='reactLink' href='#' data-status-id='{$stat_id}'>{$like_react_count}</a>
                <div class='show_dislike'></div> <a id='disreactLink_{$stat_id}' href='#'>{$dislike_react_count}</a>
                <div class='show_love'></div> <a id='loveLink_{$stat_id}' href='#'>{$love_react_count}</a>
            </div>
        </div>
    </div>
</div>";
    return $sendback;
}

I tried to debug on multiple levels, and as I said the event listens to that click, it happens. I also checked using ChatGPT-4 which could not find the cause for the issue.

Help will be appricated.

How do I setup ESlint + Prettier with Airbnb style guide for a React Native / JavaScript Project (Expo) using VS Code?

So I scouted almost every tutorial regarding this but I could not make it work.
In the tutorials when you npm install eslint it asks you in the command line if you wanna use a popular style guide, but this is not the case anymore. They all seem outdated and I did not find guides regarding the newest version for eslint.

I am not a pro regarding packages, npm, npx or react development. But I wanna learn and understand. I would appreciat it, if you could explain the commands and steps to use Airbnbs style guide in my own react native project.

Someone stole my crypto from a page that looks like Kraken [closed]

I have the source code from the page. I’d like to know if anyone can look at the .js and .css file to help me figure out if there’s any way of figuring out who this person is? Or if there’s a clue in there, as to any connections that might help out.

I’m not a programmer. But what I’m looking at in these two files, 1 .js and 1 .css, looks very random. Is it possible, likely, that they’re encrypted? They’re very big files, 1 is 77 pages and the other is 61 pages.

Vue3 defineEmits is a compiler macro and no longer needs to be imported

I’m getting this warning in the terminal from my Vue 3.4 app

[@vue/compiler-sfc] defineEmits is a compiler macro and no longer needs to be imported.

The problem is, if I remove defineEmits then the logic breaks and a emit is not defined error pops up.

Question:

How do I remove defineEmits from the import since that’s deprecated, and not have my app break due to an undefined emit?

My SearchHeader.vue component

<script setup lang="ts">
import { ref, watch, defineEmits } from 'vue'
import coins_to_search from '../constants/coins-to-search'
import type { Coin } from '../constants/coins-to-search'

const emit = defineEmits(['coinSelected'])
const inputValue = ref('')
const filteredCoins = ref<Coin[]>([])

watch(inputValue, (newValue: string) => {
  if (newValue.length === 0) {
    filterCoins('  ')
  }

  if (newValue.length > 1) {
    filterCoins(newValue)
  }
  console.log('filteredCoins', filteredCoins.value)
})

const filterCoins = (input: string) => {
  filteredCoins.value = coins_to_search.filter(
    coin =>
      coin.name.toLowerCase().includes(input.toLowerCase()) ||
      coin.id.toLowerCase().includes(input.toLowerCase())
  )
}

const selectCoin = (value: string) => {
  console.log(value)
  filterCoins('  ')
  if (value) {
    emit('coinSelected', value)
  }
}

// Initialize filteredCoins with an empty array
filterCoins('  ')
</script>

<template>
  <div id="search-container">
    <header class="flex items-center justify-between">
      <div class="flex w-full flex-wrap md:flex-nowrap gap-4">
        <input
          type="text"
          color="default"
          label="Coin Search"
          placeholder="Search Coins"
          v-model="inputValue"
        />
        <div v-if="filteredCoins.length > 0" class="search-selection">
          <ul>
            <li
              v-for="coin in filteredCoins"
              :key="coin.id"
              @click="selectCoin(coin.name)"
            >
              {{ coin.name }}
            </li>
          </ul>
        </div>
      </div>
    </header>
  </div>
</template>

If I remove the defineEmit import, and just use emit('coinSelected', value)

I get no warnings in the terminal, but when I search and select a coin the app is now broken:

Uncaught ReferenceError: emit is not defined
at Proxy.selectCoin (SearchHeader.vue:33:5)

enter image description here

How can I call a private method from a public method in javascript?

class myClass
{
   myPublicMethod(e)
   {
      console.log(this);
      myPrivateMethod(); //does not work
   }

   #myPrivateMethod()
   {
      console.log('in myPrivateMethod');
   }
}

I’ve confirmed that this is myClass via console.log. I get the error myPrivateMethod is not defined. If I try this.myPrivateMethod(); then I get the error myPrivateMethod is not a function. The only thing that works is removing the # from myPrivateMethod making it public and calling it via this.my(formerly)PrivateMethod();

Is it possible to call this function while keeping it private?

Error generating chart too many pixels using sentinel 1

I am generating a plot but I have an error for generating a chart, my script is like below:

var cor = [[105.81352993964532, -5.657379634654876],
          [105.81352993964532, -6.012584749422468],
          [106.18706509589532, -6.012584749422468],
          [106.18706509589532, -5.657379634654876]
          ]

var roi = ee.Geometry.Polygon(cor)
Map.centerObject(roi);

var sen1 = ee.ImageCollection("COPERNICUS/S1_GRD")
.select('VV')
.filterDate('2020','2021')
.filterBounds(roi)
.filter(ee.Filter.calendarRange(10, 10, 'month'))
.filter(ee.Filter.calendarRange(4, 4, 'day_of_month'))
.filter(ee.Filter.listContains('transmitterReceiverPolarisation','VV'))
.filter(ee.Filter.eq('instrumentMode','IW')).mosaic()

//print(sen1.aggregate_array('orbitProperties_pass'))

Map.addLayer(sen1.clip(roi),[],'sen1',false)

print(
  ui.Chart.image.histogram(sen1,roi,10)
  )

var despeckel = sen1.focalMean(100, 'square', 'meters');

Map.addLayer(despeckel.clip(roi),[],'sen_despeckel',false);

print(
  ui.Chart.image.histogram(despeckel,roi,30)
  )
  
var thr = despeckel.lt(-22);

Map.addLayer(thr.clip(roi),[],'oil_spill',false);
  
  
var mask = thr.updateMask(thr);

Map.addLayer(mask.clip(roi),[],'mask',false)

var area = mask.multiply(ee.Image.pixelArea().divide(1e6));

var oil_spill_area = ee.Number(area.reduceRegion({
  reducer: ee.Reducer.sum(), geometry: roi, scale: 100
  }).values().get(0));
  
print(oil_spill_area)

var oil_spill_vector  = mask.reduceToVectors({
  geometry: roi, scale: 100
  });
  
Map.addLayer(oil_spill_vector)

Export.table.toDrive({
  collection: oil_spill_vector, description: 'oil_spill', fileFormat: 'SHP', folder: 'oil_spill2'
  })

Error generating chart: Image.reduceRegion: Too many pixels in the region. Found 16441942, but maxPixels allows only 10000000. Ensure that you are not aggregating at a higher resolution than you intended; that is a frequent cause of this error. If not, then you may set the ‘maxPixels’ argument to a limit suitable for your computation; set ‘bestEffort’ to true to aggregate at whatever scale results in ‘maxPixels’ total pixels; or both.

Grouping consecutive elements with a specific property in an array of objects

I would like help solving this exercise.
I have this array of objects and I would like the elements with the property ‘inCard= true’ consecutive to all be within a single ‘card’.

interface elementType {
  inCard: boolean;
  description: string;
}

const elements: elementType[] = [
  {
    inCard: true,
    description: "Should be inside a card 1.",
  },
  {
    inCard: true,
    description: "Should be inside a card 2.",
  },
  {
    inCard: true,
    description: "Should be inside a card 3.",
  },
  {
    inCard: false,
    description: "NOT IN 4",
  },
  {
    inCard: true,
    description: "Should be inside a card 5.",
  },
  {
    inCard: false,
    description: "NOT IN 6",
  },
];

Thanks for the help

Based on the given array then, I would like the first 3 elements to be inside a single card, then a break where the 4^ element is printed outside the card, then again a card with the 5^ element and last, the 6^ element outside the card.

more or less I want:

<div className='card'>
element1
element2
element3
</div>

element4

<div className='card'> element5 </div>

element6