How can I apply hover to one bar only in a series created by Highcharts?

Code

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    xAxis: {
        categories: ['Jan', 'Feb', 'Mar']
    },
    plotOptions: {
        series: {
            grouping: true
        }
    },
    series: [
        {
            "name": "Anna",
            "data": [
                {
                    "y": 100
                },
                {
                    "y": 100
                },
                {
                    "y": 100
                }
            ],
            "color": "#5B5BD7",
            "borderWidth": 1
        },
        {
            "name": "Billy",
            "data": [
                {
                    "y": 125
                },
                {
                    "y": 125
                },
                {
                    "y": 125
                }
            ],
            "color": "#FD8D62",
            "borderWidth": 1
        }
    ]
});

Expected
Only the leftmost bar in January has the hover effect applied.

Actual
The leftmost bars in each of the months have the hover effect applied.
enter image description here

I have tried a number of variations to configure this correctly, all to no avail.

JSFiddle

TypeError: Can not read property ‘store’ of undefined, react-native 0.79.2

I’m encountering the following issue on Android after upgrading my React Native project to version 0.79.2. This error does not occur on iOS, which makes it harder to trace since the same codebase behaves differently across platforms.

TypeError: Can not read property ‘store’ of undefined, react-native 0.79.2
more details are given in screenshots.

Package.json has,

“react-redux”: “9.2.0”,
“redux-mock-store”: “1.5.4”,
“redux-saga”: “1.3.0”,
“redux-saga-test-plan”: “4.0.6”,
“@reduxjs/toolkit”: “2.8.2”,

Error Screenshots
enter image description here
enter image description here

App.tsx

import React, { useEffect } from 'react';
import { Provider } from 'react-redux';
import AppHelperComponent from './appHelperComponent/index';
import { store } from '@store';
import { StatusBar } from 'react-native';
import { Core, readColor } from '@colors/core';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { initializeSSLCertification } from './appHelperComponent/helper';

const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      retry: 0,
    },
  },
});

function App(): React.JSX.Element {
  
  useEffect(() => {  
    initializeSSLCertification();  
  }, []);         

  return (
    <>
      <StatusBar
        barStyle="dark-content" // setting status bar font color dark for both Dark and light theme
        backgroundColor={readColor(Core.white)}
      />
      <QueryClientProvider client={queryClient}>
        <Provider store={store}>
            <AppHelperComponent />
        </Provider>
      </QueryClientProvider>
    </>
  );
}

export default App;

store/index.ts



/*
 *Store Configurations will be here
 *The file from where all redux related stuff will be fetched
 */

//Redux
import {configureStore} from '@reduxjs/toolkit';

// Local Imports
import {onboardingContentReducer} from '../slices/onboarding/onboarding';

import {watcherSaga} from '../sagas';

import { errorReducer } from '@slices/error';
import createSagaMiddleware from 'redux-saga';

//Setup sagas
// eslint-disable-next-line @typescript-eslint/no-require-imports
//const createSagaMiddleware = require('redux-saga');
const sagaMiddleWare = createSagaMiddleware();

//const sagaMiddleWare = createSagaMiddleware.default();
const middleWares = [sagaMiddleWare];

// Store configurations
const store = configureStore({
  reducer: {
    onboardingContentReducer,
    errorReducer
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({serializableCheck: false}).concat(middleWares),
});
//starting saga and it will go to sagas
sagaMiddleWare.run(watcherSaga);

export {store};

accordion only working as button inside container class but working as expected outside

I have created a accordion from w3school example. It is working as expected when I keet it separate. But when I place it with other inputs it is working as button only. The content of the accordion are just flashed when I click the accordion button.
My complete code::

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
  <link rel="stylesheet" href="https://www.w3schools.com/w3css/5/w3.css">
  
  <style>
  .advance-search {
  background: #fff;
  padding: 40px 15px 25px 15px;
  border-radius: 3px;
  margin-bottom: -50px;
  box-shadow: -1px 3px 6px rgba(0, 0, 0, 0.12);
}


@media (min-width: 1200px) {
  .container {
    max-width: 1140px;

  }
}

.row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}


.align-content-center {
  -ms-flex-line-pack: center !important;

  align-content: center !important;

}
@media (min-width: 992px) {
  .col-lg-12 {
    -ms-flex: 0 0 100%;

    flex: 0 0 100%;

    max-width: 100%;

  }
}

.form-row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-right: -5px;
  margin-left: -5px;
}

.form-row > .col, .form-row > [class*="col-"] {
  padding-right: 5px;
  padding-left: 5px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-control {
  border-radius: 2px;
  height: 50px;
  background-color: transparent;
  color: #666;
  box-shadow: none;
  font-size: 15px;
}

.btn {
  font-size: 15px;
  letter-spacing: 1px;
 display: inline-block;
  padding: 15px 30px;
  border-radius: 4px;
}
.w-100 {
  width: 100% !important;
}
.accordion {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
  transition: 0.4s;
}

.active, .accordion:hover {
  background-color: #ccc; 
}

.panel {
  padding: 0 18px;
  display: none;
  background-color: white;
  overflow: hidden;
}
  </style>
</head>
<body>

<div class="container mt-3">
  <h2>Basic Card</h2>
    
    <div class="advance-search">
                    <div class="container">
                        <div class="row justify-content-center">
                            <div class="col-lg-12 col-md-12 align-content-center">
                                <form>
                                    <div class="form-row">
                                        <div class="form-group col-xl-4 col-lg-3 col-md-6">
                                            <input type="text" class="form-control my-2 my-lg-1" id="inputtext4" placeholder="What are you looking for">
                                        </div>
                                        <div class="form-group col-lg-3 col-md-6">
                                            <select class="w-100 form-control mt-lg-1 mt-md-2">
                                                <option>Category</option>
                                                <option value="1">Top rated</option>
                                                <option value="2">Lowest Price</option>
                                                <option value="4">Highest Price</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-3 col-md-6">
                                            <button class="accordion ">Section 1</button>
                                            <div class="panel">
                                              <p>Lorem ipsum</p>
                                            </div>
                                        </div>
                                        <div class="form-group col-lg-3 col-md-6">
                                            <input type="text" class="form-control my-2 my-lg-1" id="inputLocation4" placeholder="Location">
                                        </div>
                                        <div class="form-group col-xl-2 col-lg-3 col-md-6 align-self-center">
                                            <button type="submit" class="btn btn-primary active w-100">Search Now</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
    
</div>
<br><br><br>
<div class="container mt-3">
<br>
<div class="form-group col-lg-3 col-md-6">
                                            <button class="accordion form-control">Section 1</button>
                                            <div class="panel">
                                              <p>Lorem ipsum </p>
                                            </div>
                                        </div>
</div>


    <script type="text/javascript">
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}
    </script>
</body>
</html>

Please help with this issue. Thank You!!!

DateTimePicker and React Native Picker not working on TestFlight build but ok on simulator

"@react-native-community/datetimepicker": "8.4.1",
"@react-native-picker/picker": "2.11.1",
"expo": "53.0.18",

When running the build and testing with Testflight, both my types of pickers (@react-native-community/datetimepicker and @react-native-picker/picker) show up as the attached image. They are, however, interactive (somehow) although I’m not sure what their hotarea is.

Anyone has any idea on how to solve this? I’ve went ahead and removed their styling, thinking that that was the issue, but that didn’t solve the problem.

I’m using the components as they are from the dependencies, like so

 <Picker
  selectedValue={value}
  onValueChange={onValueChange}
  style={[styles.picker, { fontSize: 16, fontFamily: 'System' }]}
>
  {items.map((item) => (
    <Picker.Item
      key={item.value}
      label={item.label}
      value={item.value}
     />
    ))}
</Picker>

and the date time picker

<DateTimePicker
  value={dateOfBirth || new Date()}
  mode="date"
  display="spinner"
  onChange={onDateChange}
  maximumDate={new Date()}
  style={{ height: 200, width: '100%' }}
/>

common amongst all pickers on how they look like on the testflight build

Please how can I fix this error “TypeError: Cannot set properties of undefined (setting ‘userId’)”?

I want to display the various food orders in the customers food basket.

This is my “server.js” file.

import express from "express";
import cors from "cors";
import { connectDB } from "./config/db.js";
import foodRouter from "./routes/foodRoute.js";
import userRouter from "./routes/userRoute.js";
import foodbasketRouter from "./routes/foodbasketRoute.js";
import "dotenv/config";

// app config
const app = express();
const port = process.env.PORT || 4000;

// middleware
app.use(express.json());
app.use(cors());

// db connection
connectDB();

// api endpoints
app.use("/api/food", foodRouter);
app.use("/images", express.static("uploads/foods") ); // image path
app.use("/api/user", userRouter);
app.use("/api/foodbasket", foodbasketRouter);

app.get( "/", ( request, response ) => {
    response.send("All Good!");
} );

app.listen( port, () => {
    console.log(`Server Started on http://localhost:${port}`);
} );

This is my “foodbasketRoute.js” file.

import express from "express";
import { addTofoodbasket, removeFromfoodbasket, showFoodbasket } from "../controllers/foodbasketController.js";
import authMiddleware from "../middleware/auth.js";

const foodbasketRouter = express.Router();

foodbasketRouter.post("/addtofoodbasket", authMiddleware, addTofoodbasket);
foodbasketRouter.post("/removefromfoodbasket", authMiddleware, removeFromfoodbasket);
foodbasketRouter.post("/showfoodbasket", authMiddleware, showFoodbasket);

export default foodbasketRouter;

This is my “foodbasketController.js” file.

import User from "../models/User.js";

//! show customer foodbasket
const showFoodbasket = async (request, response) => {
    try {
        let userData = await User.findById(request.body.userId);

        let foodbasket = await userData.foodbasket;

        response.json({success: true, foodbasket});
    } catch (error) {
        console.log(error);
        response.json({success: false, message: "Error Occured!"});
    }
};

export { addTofoodbasket, removeFromfoodbasket, showFoodbasket};

This is my “auth.js” file.

import jwt from "jsonwebtoken";

const authMiddleware = async (request, response, next) => {
    const {token} = request.headers;

    if (!token) {
        return response.json( {success: false, message: "Not Authorized! Please Login"} );
    }

    try {
        const tokenDecode = jwt.verify(token, process.env.JWT_SECRET);
        request.body.userId = tokenDecode.id;
        next();
    } catch (error) {
        console.log(error);
        response.json( {success: false, message: "Error! Authentication Failed!"} );
    }
};

export default authMiddleware;

This is the url: “http://localhost:4000/api/foodbasket/showfoodbasket”.

I can successfully addTofoodbasket and successfully removeFromfoodbasket but when I want to showFoodbasket, it throws this error “TypeError: Cannot set properties of undefined (setting ‘userId’) at authMiddleware”.

How to scroll the last message from user to the top of chat container

Automatically scroll a fixed-height chat viewport so that each new user message is positioned flush at the top—pushing earlier messages upward and out of view (only visible by scrolling)—just like ChatGPT.
Messages remain in chronological order (top-to-bottom) in the DOM, but when an assistant reply is added and causes overflow, the container should scroll to the bottom to reveal that latest content.
How can I implement this behavior using JavaScript and CSS

<!DOCTYPE html>
<html>
<head>
  <style>
    .chat-container { display: flex; flex-direction: column; height: 100vh; }
    .chat-header  { padding: 1rem; background: #444; color: white; }
    .chat-messages {
      flex: 1 1 auto;
      min-height: 0;               
      overflow-y: auto;
      border: 1px solid #ccc;
      padding: 1rem;
      display: flex;
      flex-direction: column;      
      gap: 0.5rem;
    }
    .message { max-width: 70%; padding: 0.5rem; border-radius: 1rem; }
    .user    { background: #007aff; color: white; align-self: flex-end; }
    .bot     { background: #ddd;     color: #333;  align-self: flex-start; }
    .composer { padding: 0.5rem; border-top: 1px solid #ccc; }
    .input    { width: 80%; padding: 0.5rem; }
    .send-btn { padding: 0.5rem 1rem; }
  </style>
</head>
<body>
  <div class="chat-container">
    <div class="chat-header">Chat Demo</div>
    <div class="chat-messages" id="msgs">
      <div class="message bot">Welcome!</div>
    </div>
    <div class="composer">
      <div id="input" class="input" contenteditable="true"></div>
      <button id="send" class="send-btn">Send</button>
    </div>
  </div>

  <script>
    const msgs    = document.getElementById('msgs');
    const inputEl = document.getElementById('input');
    const sendBtn = document.getElementById('send');

    function addMessage(text, cls) {
      const m = document.createElement('div');
      m.className = `message ${cls}`;
      m.textContent = text;

      // I append chronologically:
      msgs.appendChild(m);

      // then try to scroll the new message into view at the top:
      m.scrollIntoView({ behavior: 'smooth', block: 'start' });
    }

    sendBtn.addEventListener('click', () => {
      const txt = inputEl.textContent.trim();
      if (!txt) return;
      addMessage(txt, 'user');
      inputEl.textContent = '';
      setTimeout(() => addMessage('Echo: ' + txt, 'bot'), 200);
    });
  </script>
</body>
</html>

How to intercept a form submit in websocket connection?

I have “inherited” a piece of code from a chat application. I would like to add some custom checks on the user input upon submission, allowing the submit to be aborted on client side if necessary.
I have created a submit handler javascript function in order to execute the checks and transformations, including preventDefault as first instruction:

async handleSubmit(event) {

    event.preventDefault(); // Prevent default form submission
...

I have linked the handler to the form:

<form
    class="pg-chat-input-bar"
    ws-send
    @submit="handleSubmit($event)"
    enctype="multipart/form-data"
>

Yet, no matter what, the form is submitted immediately when the submit button is pressed. The server receives the form in parallel to / before the handler being executed. I can assess that the handler is triggered and does what it is supposed to do but unfortunately the form has already been submitted.
I tried @submit.prevent, @submit.stop
and even combined both but it doesn’t change the outcome. I found many posts asking to capture/intercept/interrupt a form submit but the solutions are as simple as what I tried. What am I doing wrong?

As I am not starting from scratch I would prefer modify the code as little as possible and use what is already there.
Could it be related to the way the WebSocket functions? I am not too familiar with it.

Im trying to write parser, that will be parse steam inventories for users from input file

Parser must can process a big count of users (about 1500) in a short time (about 2-3 minutes) with 429 or 403 errors not more than 10-15% of all users. I dont know ho to write parsers and i actually tried write it on python, but its too slow. There is some stupid ideas like, but i dont know how to do it without blocking by steam:/

import axios from 'axios';
import fs from 'fs/promises';
import { SocksProxyAgent } from 'socks-proxy-agent';

async function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

async function main() {
  // reading configs
  const config = JSON.parse(await fs.readFile('config/inventories.json', 'utf-8'));
  const players = JSON.parse(await fs.readFile('output/players_output.json', 'utf-8'));

  const appid = config.game;
  const contextid = config.contextid;
  const proxies = config.PROXIES; // SOCKS5

  // Reqest parameters
  const country = config.country || 'US';
  const language = config.language || 'english';
  const currency = config.currency || '1'; // USD
  const two_factor = config.two_factor || '0';

  const bannedProxies = new Set();

  for (let i = 0; i < players.length; i++) {
    const player = players[i];
    const steamid = player.steamid64;
    const name = player.name;

    //forming url
    const baseUrl = `https://steamcommunity.com/inventory/${steamid}/${appid}/${contextid}`;
    const url = `${baseUrl}?country=${country}&language=${language}&currency=${currency}&two_factor=${two_factor}`;

    const proxy = proxies[i % proxies.length];

    if (bannedProxies.has(proxy)) {
      console.log(`Proxy banned, skip: ${proxy}`);
      continue;
    }

    // New socks agent
    const agent = new SocksProxyAgent(proxy);

    // Browser-like headers
    const headers = {
      'Accept': 'application/json, text/javascript, */*; q=0.01',
      'Accept-Language': 'en-US,en;q=0.9',
      'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
      'Referer': baseUrl,
      'Origin': 'https://steamcommunity.com',
      'Host': 'steamcommunity.com',
      'X-Requested-With': 'XMLHttpRequest',
      'Connection': 'keep-alive',
      'Cache-Control': 'no-cache',
    };

    try {
      console.log(`Steam Inventory reqesest for ${name} with proxy: ${proxy}`);

      const response = await axios.get(url, {
        httpsAgent: agent,
        headers,
        timeout: 10000,
      });

      console.log(`Status: ${response.status}`);

      if (response.status === 429 || response.status === 403) {
        console.log(`Proxy has been banned: ${proxy}`);
        bannedProxies.add(proxy);
        continue;
      }

      // Working with response data

    } catch (err) {
      console.log(`Proxy error ${proxy}: ${err.message}`);
      bannedProxies.add(proxy);
      continue;
    }

    // Pause
    await sleep(500);
  }
}

main().catch(console.error);

And my JSON configs like after nuclear war (There is a huge count of trash)

{
  "steam_api_key": "KEY",
  "database": {
    "filename": "data/data.db"
  },
  "PLAYERS": "output/players_output.json",
  "URL": "https://steamcommunity/inventory",
  "DELAY": 0.5,
  "TIMEOUT": 1.5,
  "game": 730,
  "contextid": 2,
  "mode": "scrape",
  "searchFor": null,
  "outputFile": "./output/inventories.json",

  "USE_PROXY": true,
  "PROXY_CHANGERATE": 2,
  "PROXIES": [
      there is 10 proxies
    ]
}

Output must be like this in future (its not full code, because im stuck on steam blocking)

[
  {
    "name": "",
    "steamid64": "",
    "address": ""
  }, ...
]

And input looks like

[
  {
    "nickname": "",
    "steamid": "",
    "server": "its frome another script, nothing to do there, only for next",
    "inventory": [
      {
        "id": "45072097998",
        "market_hash_name": "Dreams & Nightmares Case",
        "type": "Container, base class"
      }, ...
    ]
  }, ...
]

How to dynamically create a Likert-scale matrix based on user-defined input rows in LimeSurvey

I’m building a questionnaire in LimeSurvey (v6.x) and need to implement a two-part question with the following logic:

Goal:

  • In Question 1, the respondent should be able to enter the name of as many organizations as they work with, one per row.

    • Ideally, the respondent can add as many rows as needed, dynamically.
    • Each row contains just a text field for the name of the organization.
  • In Question 2, I want to display a matrix where:

    • Each row corresponds to one organization entered in the previous question
    • There are three columns, each representing a Likert-type scale from 1 to 7, to assess different aspects (e.g. importance, influence, current collaboration).

What I tried:

  • I used a “Multiple short text” question type in Question 1, with predefined subquestions and JavaScript to reveal more fields with a button (e.g. up to 10 rows).
  • In Question 2, I created an “Array (Numbers)” question and used {question1_SQ001} to {question1_SQ010} as subquestion texts.
  • I used JavaScript in Question 2 to hide rows where the corresponding input was empty.

Limitations:

  • This approach works only for a fixed number of possible rows (e.g. 10).
  • It doesn’t truly allow for dynamic row creation — I have to guess the maximum number of rows in advance.

What I want to know:

  • Is there a way in LimeSurvey to:
    • Allow the user to freely enter N rows (organizations),
    • And then automatically populate a matrix question with exactly those N inputs as subquestions?
    • Ideally without needing to predefine or cap the number of entries?

If not possible natively, are there known workarounds or plugins (e.g. using JavaScript or custom question themes) that allow this functionality?

Thanks in advance!

How to build and use a local, forked version of @kitware/vtk.js?

I need to make custom modifications to the @kitware/vtk.js library for my project. I have forked the official repository, cloned it to my local machine, and made my changes.
Now, I’m struggling to use this modified local version in my main application.

I have my project structure set up like this: /my-dev-folder
|– /my-vtk-clone (The forked and modified vtk.js repo)
|– /my-app (The project where I want to use the modified vtk.js)

In my my-app project, I modified my package.json to point to my local clone:

“@kitware/vtk.js”: “file:../my-vtk-clone”

Then I ran npm install. The installation completed without errors, and the my-vtk-clone folder was linked into node_modules. However, when I try to run my application, I get module resolution errors, for example:

Method 2: npm pack
I went into my my-vtk-clone directory and ran npm pack. This generated a kitware-vtk.js-29.10.2.tgz file (version may vary).
Then, in my my-app project, I tried installing from this packed file:

npm install ../my-vtk-clone/kitware-vtk.js-29.10.2.tgz

This also seemed to install correctly, but I ran into the same module resolution errors at runtime.

After inspecting the node_modules directory, I noticed a major difference between the official package and my local version.

When I install the official package (npm install @kitware/vtk.js):

The directory structure inside node_modules/@kitware/vtk.js looks something like this (simplified):
|– /Common
|– /Filters

When I use my local version (via npm install file:… or npm pack):

|– /Sources
| |– /Common
| |– /Filters
| |– …etc

My local version has the raw Sources directory, and it seems my application’s bundler (Webpack/Vite) doesn’t know how to resolve imports from it. The official package on NPM is clearly a built or published version, not the raw source code.

My Question:
What is the correct process to build my forked vtk.js repository so that it generates the same distributable file structure (dist/, esm/, etc.) as the official NPM package? Is there a specific npm run command I am missing?

Custom widget for visualizing dynamic table data

While creating a custom widget for visualizing dynamic table data, I encountered some issues and would like to share a minimal working example to illustrate the problem.

JS:

self.ctx.$scope.showAlert = function() {
window.alert("my device");
};

self.ctx.$scope.var = [
"id: 1, name: 'Batch A'",
"id: 2, name: 'Batch B'"
];

self.ctx.$scope.datasourceData = [];

self.ctx.detectChanges();
};

HTML:

<div class="mainCard">
<h3>Hello World</h3>
<button mat-raised-button color="primary" (click)="showAlert()">Click me</button>

<p>{{ctx.$scope.var}}</p>

<ul>
<li ng-repeat="item in ctx.$scope.var">
Wert: {{item}}
</li>
</ul>

<h3>Einzelne Werte</h3>
<p>Erster Wert: {{ctx.$scope.var}}</p>
</div>

What works:

  • The alert button (showAlert) works correctly.
  • Displaying the entire array ({{ctx.$scope.var}}) also works.

Problems:

  • Accessing array items directly (e.g. {{ctx.$scope.var[1]}}) throws an error:
    “Widget Error: can’t access property 1, ctx.ctx.$scope.var is undefined”
    -ng-repeat does not render any list items, although the array is initialized as expected in onInit.

Is there a recommended way to bind and access dynamic arrays within ThingsBoard widgets—especially when aiming to use ng-repeat or direct indexing?

WASD controls on my three JS section not working properly making the screen glitch when moving foward

I am working in react, with a section in three.js where you can move forward with WASD and not the arrow because the arrows affect the scroll, to turn the camera, you have to drag the mouse, I have tried adding code, removing it for the WASD part but the same glitch is repeating itself. Would you have an idea why?

import React, { useEffect, useRef, useState } from "react";
import * as THREE from "three";
import { GLTFLoader }      from "three/examples/jsm/loaders/GLTFLoader.js";
import { Water }           from "three/examples/jsm/objects/Water.js";
import { OrbitControls }   from "three/examples/jsm/controls/OrbitControls.js";

export default function ExhibitionSection() {
  const mount   = useRef(null);
  const [showUI, setShowUI] = useState(true);       // overlay flag

  useEffect(() => {
    /* ---------- renderer / scene / camera ---------- */
    const { innerWidth: W, innerHeight: H } = window;
    const scene = new THREE.Scene();
    scene.fog   = new THREE.FogExp2(0x8a5000, 0.0005);   // lighter fog

    const cam = new THREE.PerspectiveCamera(75, W / H, 0.1, 1e6);
    cam.position.set(0, 400, 400);   // eye-level = 400, looking straight

    const renderer = new THREE.WebGLRenderer({ antialias: true });
    renderer.setSize(W, H);
    renderer.outputEncoding = THREE.sRGBEncoding;
    mount.current.appendChild(renderer.domElement);

    /* ---------- orbit controls ---------- */
    const controls = new OrbitControls(cam, renderer.domElement);
    controls.enableZoom   = false;
    controls.enablePan    = false;
    controls.dampingFactor = 0.05;
    controls.enableDamping = true;
    controls.target.set(0, 400, 0);      // same Y as camera → level view
    controls.update();
    renderer.domElement.addEventListener("wheel", e => e.preventDefault(), { passive:false });

    /* ---------- skybox ---------- */
    scene.background = new THREE.CubeTextureLoader().load([
      "/images/yellowcloud_ft.jpg","/images/yellowcloud_bk.jpg",
      "/images/yellowcloud_up.jpg","/images/yellowcloud_dn.jpg",
      "/images/yellowcloud_rt.jpg","/images/yellowcloud_lf.jpg",
    ]);

    /* ---------- water ---------- */
    const water = new Water(
      new THREE.PlaneGeometry(50000, 50000),
      {
        textureWidth:512, textureHeight:1024,
        waterNormals: new THREE.TextureLoader().load("/images/waterNormals.jpg", t=>{
          t.wrapS = t.wrapT = THREE.RepeatWrapping;
        }),
        sunDirection:new THREE.Vector3(), sunColor:0xffffff,
        waterColor:0x001e0f, distortionScale:3.7, fog:true,
      }
    );
    water.rotation.x = -Math.PI/2;
    water.rotation.z = -Math.PI/2;
    scene.add(water);

    /* ---------- model ---------- */
    new GLTFLoader().setPath("/models/")
      .load("photography-museum.glb", gltf=>{
        const m = gltf.scene;
        m.scale.set(10,10,10);
        m.position.set(0,-200,0);
        scene.add(m);
      });

    /* ---------- lights ---------- */
    scene.add(new THREE.AmbientLight(0x8a5000,2.5));
    const dir = new THREE.DirectionalLight(0x8a5000,1);
    dir.position.set(1300,1000,1000);
    scene.add(dir);

    /* ---------- keyboard / physics ---------- */
const keys = {};
let   vy   = 0;           // vertical velocity
const GRAVITY  = 2000;    // world-units / s²
const WALK     = 350;     // walk speed
const EYE_Y    = 400;     // ground level (eye height)

window.addEventListener("keydown", e => { keys[e.code] = true; });
window.addEventListener("keyup",   e => { keys[e.code] = false; });

// jump
window.addEventListener("keydown", e => {
  if (e.code === "Space") {
    e.preventDefault();
    if (Math.abs(cam.position.y - EYE_Y) < 1) vy = 700;   // only if on ground
  }
});


   /* ---------- main loop ---------- */
const clock = new THREE.Clock();
(function animate() {
  requestAnimationFrame(animate);
  const dt = clock.getDelta();

  /* WASD movement */
  const dir = new THREE.Vector3(
    (keys.KeyD ? 1 : 0) - (keys.KeyA ? 1 : 0), // x
    0,
    (keys.KeyS ? 1 : 0) - (keys.KeyW ? 1 : 0)  // z
  );
  if (dir.lengthSq() > 0) {
    dir.normalize()
       .applyQuaternion(cam.quaternion)  // local → world
       .setY(0)                          // stay horizontal
       .normalize();

    const speed = (keys.ShiftLeft || keys.ShiftRight) ? WALK * 2 : WALK;
    cam.position.addScaledVector(dir, speed * dt);
  }

  /* jump / gravity */
  vy -= GRAVITY * dt;
  cam.position.y += vy * dt;
  if (cam.position.y < EYE_Y) { cam.position.y = EYE_Y; vy = 0; }

  /* keep the look-at target at eye level */
  controls.target.y = cam.position.y;

  controls.update();
  water.material.uniforms.time.value += dt;
  renderer.render(scene, cam);
})();


    /* ---------- resize ---------- */
    function onResize(){
      cam.aspect = window.innerWidth/window.innerHeight;
      cam.updateProjectionMatrix();
      renderer.setSize(window.innerWidth,window.innerHeight);
    }
    window.addEventListener("resize", onResize);

    return ()=> {
      window.removeEventListener("resize", onResize);
      controls.dispose(); renderer.dispose();
      mount.current.removeChild(renderer.domElement);
    };
  }, []);

  return (
    <div ref={mount} className="relative w-full h-screen">
      {showUI && (
        <div className="absolute inset-0 z-50 flex flex-col items-center justify-center bg-black/70 text-white px-6 text-center space-y-6">
          <h2 className="text-3xl md:text-4xl font-bold tracking-wide">
            Explore&nbsp;LA&nbsp;DISCONNECT&nbsp;1.0
          </h2>
          <p className="max-w-md text-sm opacity-80 leading-relaxed">
            Click + drag to look around.<br/>
            Move with&nbsp;W&nbsp;A&nbsp;S&nbsp;D, hold&nbsp;Shift&nbsp;to run,
            press&nbsp;Space&nbsp;to jump.
          </p>
          <button
            onClick={() => {
              setShowUI(false);
              // ensure canvas gets keyboard focus after overlay closes
              setTimeout(()=> mount.current?.focus(), 50);
            }}
            className="border border-white px-6 py-3 uppercase text-sm hover:bg-white hover:text-black transition"
          >
            Visit the exhibition
          </button>
        </div>
      )}
    </div>
  );
}

I need web developer collaborators as a beginner to teach me some frontend process

https://github.com/mosescompworld/TRAVEL-AGENCY-PROJECT-CODECAMP/pull/1

I’m currently learning web development and Git.
I need help from experienced developers with the following:

Making the site mobile responsive
helping me in detailed process completing frontend
testing and also the backend of this project
To make this travel agency website a functioning
Improving design (modern layout, animations)
Adding JavaScript interactivity (e.g., sliders, contact forms)
General code review and folder structure tips
Looking for Collaborators

How to set use the 100% of vacant space

My page has two blocks

<div class=texts"></div>
<div class="tablewrapper"></div>

What I want to do is

  • no scroll bar on whole page.
  • div class="texts" height is not fixed.
  • use scroll bar for div class="tablewrapper" if it overflow.

However the code below doesn’t work.

Does anyone help?

.pagewrapper{
  height:100vh;
  overflow:hidden;
}
.tablewrapper{
overflow-y:scroll;
/*height:calc(100vh-textsheight)*/
}

.table{
width:"100vh";
}
<div class="pagewrapper">
<div class="texts">
Thse texts are chanable.<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
</div>
<div class="tablewrapper">
<table class="table" border>
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
<tr><td>4</td></tr>
<tr><td>5</td></tr>
<tr><td>6</td></tr>
<tr><td>7</td></tr>
<tr><td>8</td></tr>
</table>
</div>
</div>

[iOS][v0.73] JS run result not expected when return value in catch

    const loading = [1];
    console.log('====before catch', loading);
    try {
      await Promise.reject(new Error('error'));
    } catch (e) {
      return false;
    } finally {
      console.log('====finally', loading);
    }

Why the console result of the above code snippets is error not [1] ?

const loading = [1];
try {
  await Promise.reject(new Error('error'));
} catch (e) {
  return false;
} finally {
  console.log('====finally', loading);
}
const loading = [1];
try {
  await Promise.reject(new Error('error'));
} catch (e) {
  // return false;
} finally {
  console.log('====finally', loading);
}

But these code snippets consoles correct!
It only happens in iOS. RN version 0.7x, it ok in 0.6x

see the details above