问:
country-state-city tools in React
I'm in trouble again.

I am a complete beginner and sometimes I have difficulties. I'm asking for help.
I am using the react tool: country-state-city.
I want to show the states and then the respective cities, but again I'm having difficulty with the wording.
I'm asking for some help how it should be done.
Here is my code.

```<code>import FormControl from '@mui/material/FormControl';
import InputLabel from '@mui/material/InputLabel';
import Select from '@mui/material/Select';
import TextField from '@mui/material/TextField';
import MenuItem from '@mui/material/MenuItem';
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import PriceSidebar from './PriceSidebar';
import Stepper from './Stepper';
import { useSnackbar } from 'notistack';
import { saveShippingInfo } from '../../actions/cartAction';
import { useNavigate } from 'react-router-dom';
import MetaData from '../Layouts/MetaData';

import { Country, State, City }  from 'country-state-city';
import { ICountry, IState, ICity } from 'country-state-city'

const Shipping = () => {

    const countryCode = 'BG';
    const countries = Country.getCountryByCode(countryCode);
    const states = State.getStatesOfCountry(countries.isoCode);

    const cities = states.forEach((state) => {
       const cities_of_state  = City.getCitiesOfState(countryCode, state.isoCode)
        console.log(cities_of_state)

    }, )

    //console.log(states)
    const dispatch = useDispatch();
    const navigate = useNavigate();
    const { enqueueSnackbar } = useSnackbar();

    const { cartItems } = useSelector((state) => state.cart);
    const { shippingInfo } = useSelector((state) => state.cart);

    const [address, setAddress] = useState(shippingInfo.address);

    const [state, setState] = useState(countries.isoCode);
    const [city, setCity] = useState(states.isoCode);

    const [pincode, setPincode] = useState(shippingInfo.pincode);
    const [phoneNo, setPhoneNo] = useState(shippingInfo.phoneNo);

    const shippingSubmit = (e) => {
        e.preventDefault();

        if (phoneNo.length < 10 || phoneNo.length > 10) {
            enqueueSnackbar("Invalid Phone Number", { variant: "error" });
            return;
        }
        dispatch(saveShippingInfo({ address, city,  state, pincode, phoneNo }));
        navigate("/order/confirm");
    }

    return (
        <>
            <MetaData title="Flipkart: Shipping Details" />
            <main className="w-full mt-20">

                {/* <!-- row --> */}
                <div className="flex flex-col sm:flex-row gap-3.5 w-full sm:w-11/12 mt-0 sm:mt-4 m-auto sm:mb-7 overflow-hidden">

                    {/* <!-- cart column --> */}
                    <div className="flex-1">

                        <Stepper activeStep={1}>
                            <div className="w-full bg-white">

                                <form onSubmit={shippingSubmit} autoComplete="off" className="flex flex-col justify-start gap-3 w-full sm:w-3/4 mx-1 sm:mx-8 my-4">

                                    <TextField
                                        value={address}
                                        onChange={(e) => setAddress(e.target.value)}
                                        fullWidth
                                        label="Address"
                                        variant="outlined"
                                        required
                                    />

                                    <div className="flex gap-6">
                                        <TextField
                                            value={pincode}
                                            onChange={(e) => setPincode(e.target.value)}
                                            type="number"
                                            label="Pincode"
                                            fullWidth
                                            variant="outlined"
                                            required
                                        />
                                        <TextField
                                            value={phoneNo}
                                            onChange={(e) => setPhoneNo(e.target.value)}
                                            type="number"
                                            label="Phone No"
                                            fullWidth
                                            variant="outlined"
                                            required
                                        />
                                    </div>

                                    <div className="flex gap-6">
                                    <FormControl fullWidth >
                                            <InputLabel id="state-select">State</InputLabel>
                                            <Select
                                                labelId="state-select"
                                                id="state-select"
                                                value={state}
                                                label="State"
                                                onChange={(e) => setState(e.target.value)}
                                                required
                                            >
                                                {states.map((state) => (
                                                    <MenuItem key={state.name} value={state.name}>{state.name}</MenuItem>
                                                ))}
                                            </Select>
                                        </FormControl>

                                        <FormControl fullWidth >
                                            <InputLabel id="city-select">City</InputLabel>
                                            <Select
                                                labelId="city-select"
                                                id="city-select"
                                                value={city}
                                                label="City"
                                                onChange={(e) => setCity(e.target.value)}
                                                required
                                            >
                                                { cities && cities.map((city) => (
                                                    <MenuItem key={city.name} value={city.name}>{city.name}</MenuItem>
                                                ))}
                                            </Select>
                                        </FormControl>

                                    </div>

                                    <button type="submit" className="bg-primary-orange w-full sm:w-1/3 my-2 py-3.5 text-sm font-medium text-white shadow hover:shadow-lg rounded-sm uppercase outline-none">save and deliver here</button>
                                </form>
                            </div>
                        </Stepper>
                    </div>

                    <PriceSidebar cartItems={cartItems} />
                </div>
            </main>
        </>
    );
};

export default Shipping;

</code>```

"Optional"

Can you also help with API with cities and municipalities in Bulgarian language.

Title: country-state-city tools in React

Body:
I'm in trouble again.

I am a complete beginner and sometimes I have difficulties. I'm asking for help.
I am using the react tool: country-state-city.
I want to show the states and then the respective cities, but again I'm having difficulty with the wording.
I'm asking for some help how it should be done.
Here is my code.

import FormControl from '@mui/material/FormControl';
import InputLabel from '@mui/material/InputLabel';
import Select from '@mui/material/Select';
import TextField from '@mui/material/TextField';
import MenuItem from '@mui/material/MenuItem';
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import PriceSidebar from './PriceSidebar';
import Stepper from './Stepper';
import { useSnackbar } from 'notistack';
import { saveShippingInfo } from '../../actions/cartAction';
import { useNavigate } from 'react-router-dom';
import MetaData from '../Layouts/MetaData';

import { Country, State, City }  from 'country-state-city';
import { ICountry, IState, ICity } from 'country-state-city'

const Shipping = () => {

    const countryCode = 'BG';
    const countries = Country.getCountryByCode(countryCode);
    const states = State.getStatesOfCountry(countries.isoCode);

    const cities = states.forEach((state) => {
       const cities_of_state  = City.getCitiesOfState(countryCode, state.isoCode)
        console.log(cities_of_state)

    }, )

    //console.log(states)
    const dispatch = useDispatch();
    const navigate = useNavigate();
    const { enqueueSnackbar } = useSnackbar();

    const { cartItems } = useSelector((state) => state.cart);
    const { shippingInfo } = useSelector((state) => state.cart);

    const [address, setAddress] = useState(shippingInfo.address);

    const [state, setState] = useState(countries.isoCode);
    const [city, setCity] = useState(states.isoCode);

    const [pincode, setPincode] = useState(shippingInfo.pincode);
    const [phoneNo, setPhoneNo] = useState(shippingInfo.phoneNo);

    const shippingSubmit = (e) => {
        e.preventDefault();

        if (phoneNo.length < 10 || phoneNo.length > 10) {
            enqueueSnackbar("Invalid Phone Number", { variant: "error" });
            return;
        }
        dispatch(saveShippingInfo({ address, city,  state, pincode, phoneNo }));
        navigate("/order/confirm");
    }

    return (
        <>
            <MetaData title="Flipkart: Shipping Details" />

                {/*  */}

                    {/*  */}

                        <Stepper activeStep={1}>

                                <form onSubmit={shippingSubmit} autoComplete="off" className="flex flex-col justify-start gap-3 w-full sm:w-3/4 mx-1 sm:mx-8 my-4">

                                    <TextField
                                        value={address}
                                        onChange={(e) => setAddress(e.target.value)}
                                        fullWidth
                                        label="Address"
                                        variant="outlined"
                                        required
                                    />

                                        <TextField
                                            value={pincode}
                                            onChange={(e) => setPincode(e.target.value)}
                                            type="number"
                                            label="Pincode"
                                            fullWidth
                                            variant="outlined"
                                            required
                                        />
                                        <TextField
                                            value={phoneNo}
                                            onChange={(e) => setPhoneNo(e.target.value)}
                                            type="number"
                                            label="Phone No"
                                            fullWidth
                                            variant="outlined"
                                            required
                                        />

                                    <FormControl fullWidth >
                                            <InputLabel id="state-select">State</InputLabel>
                                            <Select
                                                labelId="state-select"
                                                id="state-select"
                                                value={state}
                                                label="State"
                                                onChange={(e) => setState(e.target.value)}
                                                required
                                            >
                                                {states.map((state) => (
                                                    <MenuItem key={state.name} value={state.name}>{state.name}</MenuItem>
                                                ))}
                                            </Select>
                                        </FormControl>

                                        <FormControl fullWidth >
                                            <InputLabel id="city-select">City</InputLabel>
                                            <Select
                                                labelId="city-select"
                                                id="city-select"
                                                value={city}
                                                label="City"
                                                onChange={(e) => setCity(e.target.value)}
                                                required
                                            >
                                                { cities && cities.map((city) => (
                                                    <MenuItem key={city.name} value={city.name}>{city.name}</MenuItem>
                                                ))}
                                            </Select>
                                        </FormControl>

                                    <button type="submit" className="bg-primary-orange w-full sm:w-1/3 my-2 py-3.5 text-sm font-medium text-white shadow hover:shadow-lg rounded-sm uppercase outline-none">save and deliver here</button>
                                </form>

                        </Stepper>

                    <PriceSidebar cartItems={cartItems} />

        </>
    );
};

export default Shipping;

"Optional"

Can you also help with API with cities and municipalities in Bulgarian language.


来源: stackexchange

问:
Getting error with spread() when using get _nrc_sentiment()
```<code>bing_vector <-get_sentiment(textdata, method = "bing")

afinn_vector <- get_sentiment(textdata, method = "afinn")`
</code>```

these two are ok, but in:

```<code>textvector.nrc <- get_nrc_sentiment(textdata)
</code>```

I have error

```<code>spread_() was deprecated in tidyr 1.2.0.
Please use `spread()` instead.
</code>```

how to fix it?

ContentLicense: CC BY-SA 4.0

Body:
bing_vector <-get_sentiment(textdata, method = "bing")

afinn_vector <- get_sentiment(textdata, method = "afinn")`

these two are ok, but in:

textvector.nrc <- get_nrc_sentiment(textdata)

I have error

spread_() was deprecated in tidyr 1.2.0.
Please use `spread()` instead.

how to fix it?


问:
what happen in rocketchat service
when I run the command

```<code>sudo systemctl enable --now rocketchat
sudo systemctl status --now rocketchat
</code>```
```<code>
● rocketchat.service - The Rocket.Chat server
     Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2022-12-18 16:48:30 CST; 9s ago
    Process: 30676 ExecStart=/root/.nvm/versions/node/v19.3.0/bin/node /opt/Rocket.Chat/main.js (code=exited, status=203/EXEC)
   Main PID: 30676 (code=exited, status=203/EXEC)

Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[1]: Started The Rocket.Chat server.
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[30676]: rocketchat.service: Failed to execute command: Permission denied
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[30676]: rocketchat.service: Failed at step EXEC spawning /root/.nvm/versions/node/v19.3.0/bin/node: Permission denied
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[1]: rocketchat.service: Main process exited, code=exited, status=203/EXEC
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[1]: rocketchat.service: Failed with result 'exit-code'.
</code>```

I don't kown which command is denieded

-rwxrwxrwx 1 admin admin 92571400 Dec 14 19:22 /root/.nvm/versions/node/v19.3.0/bin/node*

Can you tell me how to solve this problem?

Title: what happen in rocketchat service

Body:
when I run the command

sudo systemctl enable --now rocketchat
sudo systemctl status --now rocketchat

● rocketchat.service - The Rocket.Chat server
     Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2022-12-18 16:48:30 CST; 9s ago
    Process: 30676 ExecStart=/root/.nvm/versions/node/v19.3.0/bin/node /opt/Rocket.Chat/main.js (code=exited, status=203/EXEC)
   Main PID: 30676 (code=exited, status=203/EXEC)

Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[1]: Started The Rocket.Chat server.
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[30676]: rocketchat.service: Failed to execute command: Permission denied
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[30676]: rocketchat.service: Failed at step EXEC spawning /root/.nvm/versions/node/v19.3.0/bin/node: Permission denied
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[1]: rocketchat.service: Main process exited, code=exited, status=203/EXEC
Dec 18 16:48:30 iZbp10iedgidvzsp3ltox5Z systemd[1]: rocketchat.service: Failed with result 'exit-code'.

I don't kown which command is denieded

-rwxrwxrwx 1 admin admin 92571400 Dec 14 19:22 /root/.nvm/versions/node/v19.3.0/bin/node*

Can you tell me how to solve this problem?


问:
Python sort() prints correct value but array isn't sorted
input is

```<code>[1,2,3,0,0,0]
3
[2,5,6]
3
</code>```

Code is

```<code>def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
    nums1 = nums1[0:m] + nums2[0:n]
    nums1.sort()
    print(nums1)
</code>```

stdout is

```<code>[1, 2, 2, 3, 5, 6]
</code>```

But, array is

```<code>[1,2,3,0,0,0]
</code>```

Why is this the case?

I thought the array would be [1, 2, 2, 3, 5, 6] as well

Body:
input is

[1,2,3,0,0,0]
3
[2,5,6]
3

Code is

def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
    nums1 = nums1[0:m] + nums2[0:n]
    nums1.sort()
    print(nums1)

stdout is

[1, 2, 2, 3, 5, 6]

But, array is

[1,2,3,0,0,0]

Why is this the case?

I thought the array would be [1, 2, 2, 3, 5, 6] as well


问:
Access rendering settings in DevTools programmatically from a Chrome extension
here is my problem :

What I want :
I'm wondering if it's possible to have access (to change them) to renderings settings from an extension in Chrome. I know some APIs exist like DevTools API but I cannot find a way to change any of these rendering settings from my extension.

Rendering tab in DevTools

What I want more specifically :
I made a Chrome extension and I want it to make a specific tab think it's focused, even if it's not.
I know I can do it manually by opening Chrome DevTools panel and enabling "Emulate a focused page" but I really want my extension to do it programmatically.

Why I want to do this :
Some websites don't behave the same when the page is not focused, so I want my extension to make their behavior consistent.

Do you think it is possible ? Thx :)

I've been searching online for a week now and I really can't find any solution to my problem...


问:
Routing in Leaflet
At the Moment I'm working on a simulation that should generate a route on leaflet an lets an Icon drive along it. The routing is performed via the Leaflet Routing Machine. I´m getting the waypoints of the route and update the marker position in an interval. The problem is: A curve has more waypoints than a straight road so the simulated Car slows down in roundabouts and goes VERY fast on straight Highways.

Here is the Code described above. It would be really nice if someone could help me out.

```<code>        //assigning an object for the start
        // can be looped in further development
        var EO = {
            'lat' : 47.408478097049354,
            'lng' : 13.215466182754234
        };

        //assigning an object for the destination
        var ZO = {
            'lat' : 47.434806991283295,
            'lng' : 13.25299679959033
        };

        //assigning an Icon for the car
        var NefIcon = L.icon({
            iconUrl: "{% static '\img\map\icon_vhcle\Car.png' %}",
            iconSize: [99, 50]
        })

        var marker = L.marker([ZO.lat, ZO.lng], { icon: NefIcon }).addTo(map);

        L.Routing.control({
            //defining the Waypoints
            waypoints: [
                L.latLng(EO.lat, EO.lng ),
                L.latLng(ZO.lat, ZO.lng)
            ],
            //settings
                routeWhileDragging: true,
                draggableWaypoints: false,
                addWaypoints: false
        }).on('routesfound', function (e) {
                var routes = e.routes;
                console.log(routes);

                for (let index = 0; index < e.routes[0].coordinates.length; index++) {

                    setTimeout(function () {
                    var latIcon = e.routes[0].coordinates[index].lat
                    var lngIcon = e.routes[0].coordinates[index].lng
                    console.log(latIcon);
                    marker.setLatLng([ latIcon, lngIcon]);

                },300*index)

                }
                /*e.routes[0].coordinates.forEach(function (coord) {
                    setTimeout(function () {
                        marker.setLatLng([coord.lat, coord.lng]);
                    }, 1000 * index)
                })*/

            }).addTo(map);
</code>```

Title: Routing in Leaflet

Body:
At the Moment I'm working on a simulation that should generate a route on leaflet an lets an Icon drive along it. The routing is performed via the Leaflet Routing Machine. I´m getting the waypoints of the route and update the marker position in an interval. The problem is: A curve has more waypoints than a straight road so the simulated Car slows down in roundabouts and goes VERY fast on straight Highways.

Here is the Code described above. It would be really nice if someone could help me out.

        //assigning an object for the start
        // can be looped in further development
        var EO = {
            'lat' : 47.408478097049354,
            'lng' : 13.215466182754234
        };

        //assigning an object for the destination
        var ZO = {
            'lat' : 47.434806991283295,
            'lng' : 13.25299679959033
        };

        //assigning an Icon for the car
        var NefIcon = L.icon({
            iconUrl: "{% static '\img\map\icon_vhcle\Car.png' %}",
            iconSize: [99, 50]
        })

        var marker = L.marker([ZO.lat, ZO.lng], { icon: NefIcon }).addTo(map);

        L.Routing.control({
            //defining the Waypoints
            waypoints: [
                L.latLng(EO.lat, EO.lng ),
                L.latLng(ZO.lat, ZO.lng)
            ],
            //settings
                routeWhileDragging: true,
                draggableWaypoints: false,
                addWaypoints: false
        }).on('routesfound', function (e) {
                var routes = e.routes;
                console.log(routes);

                for (let index = 0; index < e.routes[0].coordinates.length; index++) {

                    setTimeout(function () {
                    var latIcon = e.routes[0].coordinates[index].lat
                    var lngIcon = e.routes[0].coordinates[index].lng
                    console.log(latIcon);
                    marker.setLatLng([ latIcon, lngIcon]);

                },300*index)

                }
                /*e.routes[0].coordinates.forEach(function (coord) {
                    setTimeout(function () {
                        marker.setLatLng([coord.lat, coord.lng]);
                    }, 1000 * index)
                })*/

            }).addTo(map);


问:
Matplotlib 3D Scatter Plot
I would like to ask a question regarding Matplotlib 3D Scatter Plots

I have a data frame, consists of 3 columns and 55 rows.

I formatted it to a numpy array with

```<code>dataframe.to_numpy()
</code>```

I have also some subset of my dataframe  which should be coloured differently on the plot.

For example:
subset1
subset2

I would like plot my data frame with 3D Scatter Plots while coloring the points of different subsets differently.

I have tried bunch of methods but always getting error because of the shape of the subsets. Is there any more efficient way to do it?

I would appreciate for your suggestions.

Title: Matplotlib 3D Scatter Plot

Body:
I would like to ask a question regarding Matplotlib 3D Scatter Plots

I have a data frame, consists of 3 columns and 55 rows.

I formatted it to a numpy array with

dataframe.to_numpy()

I have also some subset of my dataframe  which should be coloured differently on the plot.

For example:
subset1
subset2

I would like plot my data frame with 3D Scatter Plots while coloring the points of different subsets differently.

I have tried bunch of methods but always getting error because of the shape of the subsets. Is there any more efficient way to do it?

I would appreciate for your suggestions.


问:
React/NextJS: How to deploy every commit locally?
Say, we've a scenario with project of 10 commits. To be able to show changes over time, we can use "Github Desktop" too see LineChanges but can we also do it visually?

Manually, you can go back to each commit,

show all commit with "git log --oneline"

navigate to a commit with "git checkout COMMIT_ID"

make a production example with "yarn build", - create a new folder.

save that folder in a production folder ".prod", as "build-1"

go into directory .prod "cd .prod"

serve the folder "npx serve -s build-1 -p 3001"

But you have to repeat this process for every commit.

You could write a Script - to create & move build folder for each commit.

But before I make this Script, is there an easier way of handle this request?

Attempting to create a build folder for each commit - so I can serve them all at once and get a visual feedback over the progression of the project.


问:
CrispImage draws empty area when using VS image service and catalog
I wanted to use the MS Visual Studio 2022 Image library for my project and do it in the recommended way using the image service. Therefore I followed the cook book on https://learn.microsoft.com/en-us/visualstudio/extensibility/image-service-and-catalog?view=vs-2022

The code compiles without errors, but the buttons don't show any icons. Only an empty area.

I have installed the Visual Studio SDK (not sure if needed) and added the dependencies via Nuget to my project:

```<code>    <PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="17.4.33103.184" />
    <PackageReference Include="Microsoft.VisualStudio.Imaging" Version="17.4.33103.184" />
    <PackageReference Include="Microsoft.VisualStudio.Utilities.Internal" Version="16.3.38" />
</code>```

My XAML code is here:

```<code><Window x:Name="MainWindow1" x:Class="Script_Builder.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
        xmlns:theming="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Imaging"
        xmlns:utilities="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Utilities"
        xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
        mc:Ignorable="d"
        Title="Script Builder" Height="600" Width="800" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <utilities:BrushToColorConverter x:Key="BrushToColorConverter"/>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="200"/>
            <RowDefinition Height="3"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Menu Grid.Row="0" Grid.ColumnSpan="2" Background="{x:Null}">
            <MenuItem  Name="menuFile" Header="File">
                <MenuItem Header="Exit"/>
            </MenuItem>
            <MenuItem Name="menuHelp" Header="Help">
                <MenuItem Header="About"/>
            </MenuItem>
        </Menu>
        <ToolBarTray Grid.Row="1" Grid.ColumnSpan="2">
            <ToolBar>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.NewScript}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Open}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Save}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Run}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Save}"/>
                </Button>
            </ToolBar>
        </ToolBarTray>
        <DataGrid Grid.Row="2" d:ItemsSource="{d:SampleData ItemCount=10}" Grid.ColumnSpan="2" Background="Gray" BorderThickness="0"/>
        <GridSplitter Grid.Row="3" ResizeBehavior="BasedOnAlignment" ResizeDirection="Auto" Background="DarkGray" Height="11" HorizontalAlignment="Stretch" Grid.ColumnSpan="2" BorderThickness="0"/>
        <TreeView Grid.Row="4"/>
        <RichTextBox Grid.Row="4" Grid.Column="1">
            <FlowDocument>
                <Paragraph>
                    <Run Text="RichTextBox"/>
                </Paragraph>
            </FlowDocument>
        </RichTextBox>
        <StatusBar Grid.Row="5" Grid.ColumnSpan="2" Height="20"></StatusBar>
    </Grid>
</Window>
</code>```

I have found other posts with a similar problem here or here but without solution.
I'm not sure if I need to generate my own .imagemanifest file out of the zip package Microsoft offers to download (https://www.microsoft.com/en-us/download/details.aspx?id=35825) or if I have to extract the images somewhere in my project folder or the VS installation directory of if they are already installed via the VS SDK.
The extension "KnownMonikers Explorer" shows me all the icons inside VS.

I'm using Visual Studio 2022 Community Edition. Target framework: net6.0-windows10.0.18362.0

Body:
I wanted to use the MS Visual Studio 2022 Image library for my project and do it in the recommended way using the image service. Therefore I followed the cook book on https://learn.microsoft.com/en-us/visualstudio/extensibility/image-service-and-catalog?view=vs-2022

The code compiles without errors, but the buttons don't show any icons. Only an empty area.

I have installed the Visual Studio SDK (not sure if needed) and added the dependencies via Nuget to my project:

    <PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="17.4.33103.184" />
    <PackageReference Include="Microsoft.VisualStudio.Imaging" Version="17.4.33103.184" />
    <PackageReference Include="Microsoft.VisualStudio.Utilities.Internal" Version="16.3.38" />

My XAML code is here:

<Window x:Name="MainWindow1" x:Class="Script_Builder.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
        xmlns:theming="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Imaging"
        xmlns:utilities="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Utilities"
        xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
        mc:Ignorable="d"
        Title="Script Builder" Height="600" Width="800" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <utilities:BrushToColorConverter x:Key="BrushToColorConverter"/>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="200"/>
            <RowDefinition Height="3"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Menu Grid.Row="0" Grid.ColumnSpan="2" Background="{x:Null}">
            <MenuItem  Name="menuFile" Header="File">
                <MenuItem Header="Exit"/>
            </MenuItem>
            <MenuItem Name="menuHelp" Header="Help">
                <MenuItem Header="About"/>
            </MenuItem>
        </Menu>
        <ToolBarTray Grid.Row="1" Grid.ColumnSpan="2">
            <ToolBar>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.NewScript}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Open}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Save}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Run}"/>
                </Button>
                <Button>
                    <imaging:CrispImage Width="24" Height="24" Moniker="{x:Static catalog:KnownMonikers.Save}"/>
                </Button>
            </ToolBar>
        </ToolBarTray>
        <DataGrid Grid.Row="2" d:ItemsSource="{d:SampleData ItemCount=10}" Grid.ColumnSpan="2" Background="Gray" BorderThickness="0"/>
        <GridSplitter Grid.Row="3" ResizeBehavior="BasedOnAlignment" ResizeDirection="Auto" Background="DarkGray" Height="11" HorizontalAlignment="Stretch" Grid.ColumnSpan="2" BorderThickness="0"/>
        <TreeView Grid.Row="4"/>
        <RichTextBox Grid.Row="4" Grid.Column="1">
            <FlowDocument>
                <Paragraph>
                    <Run Text="RichTextBox"/>
                </Paragraph>
            </FlowDocument>
        </RichTextBox>
        <StatusBar Grid.Row="5" Grid.ColumnSpan="2" Height="20"></StatusBar>
    </Grid>
</Window>

I have found other posts with a similar problem here or here but without solution.
I'm not sure if I need to generate my own .imagemanifest file out of the zip package Microsoft offers to download (https://www.microsoft.com/en-us/download/details.aspx?id=35825) or if I have to extract the images somewhere in my project folder or the VS installation directory of if they are already installed via the VS SDK.
The extension "KnownMonikers Explorer" shows me all the icons inside VS.

I'm using Visual Studio 2022 Community Edition. Target framework: net6.0-windows10.0.18362.0


问:
How to use twitter ads api for twitter ads campaign's performance in react native
I want to use the Twitter Ads API in my React Native project to track the performance of my Twitter advertising campaign, but I couldn't find many resources on the internet. Do you know of any documentation or YouTube video that can help me with this? Or can you explain it to me?</p>


问:
How to get the selected item in a ComboBox?
I am trying to extract the selected value from a ComboBox with combo_box.selected_text() through the win32 backend, with no success as each time my mouse is hovering on another not selected item, this function returns the hovered item's text and not my selected item's text.

Am I missing something or is this intentional behavior on onHover event?

I've tried numerous ways to extract the selected value + tried to understand if the combo box list is visible (which means the user might hover over some items) but with no success at all.

I noticed (through Accessibility Insights) that there is a certain property in ComboBox item indicating the selectedValue, how do I extract it?


问:
how do I perform healthchecks on clamav using docker
I am deploying on AWS  clamav

whos Dockerfile is :

```<code>FROM alpine:3.14
LABEL maintainer="Markus Kosmal <code@m-ko.de>"

RUN apk add --no-cache bash clamav clamav-daemon clamav-libunrar

COPY conf /etc/clamav
COPY bootstrap.sh /
COPY envconfig.sh /
COPY check.sh /

RUN mkdir /var/run/clamav && \
    chown clamav:clamav /var/run/clamav && \
    chmod 750 /var/run/clamav && \
    chown -R clamav:clamav bootstrap.sh check.sh /etc/clamav && \
    chmod u+x bootstrap.sh check.sh

EXPOSE 3310/tcp

USER clamav

CMD ["/bootstrap.sh"]
</code>```

and since I am using a mirror I am testing locally using a docker-compose file

```<code>version: "3.7"

services:
   mirror:
     build:
       context: .
       dockerfile: mirror/Dockerfile

     ports:
        - "8080:8080"

  clamav:
    build:
      context: ../clamav
    environment:

      CLAMAVDATABASEMIRROR: "http://0.0.0.0:8080"

    depends_on:
       - mirror
    ports:
     - "3310:3310"
</code>```

services work fine and when I run docker-compose up --build I can see from the logs that the services is pulling the daily update and stuff.

if I run docker container ls

I get that clamav has ports: 3310/tcp wheras the mirror has a mapped port on my local host

0.0.0.0:8080->8080/tcp

and I can run curl localhost:8080

But If I try and curl localhost on 3310 I get

curl: (52) Empty reply from server

now: how do I perform a healthcheck on the clamav service?

Body:
I am deploying on AWS  clamav

whos Dockerfile is :

FROM alpine:3.14
LABEL maintainer="Markus Kosmal "

RUN apk add --no-cache bash clamav clamav-daemon clamav-libunrar

COPY conf /etc/clamav
COPY bootstrap.sh /
COPY envconfig.sh /
COPY check.sh /

RUN mkdir /var/run/clamav && \
    chown clamav:clamav /var/run/clamav && \
    chmod 750 /var/run/clamav && \
    chown -R clamav:clamav bootstrap.sh check.sh /etc/clamav && \
    chmod u+x bootstrap.sh check.sh

EXPOSE 3310/tcp

USER clamav

CMD ["/bootstrap.sh"]

and since I am using a mirror I am testing locally using a docker-compose file

version: "3.7"

services:
   mirror:
     build:
       context: .
       dockerfile: mirror/Dockerfile

     ports:
        - "8080:8080"

  clamav:
    build:
      context: ../clamav
    environment:

      CLAMAVDATABASEMIRROR: "http://0.0.0.0:8080"

    depends_on:
       - mirror
    ports:
     - "3310:3310"

services work fine and when I run docker-compose up --build I can see from the logs that the services is pulling the daily update and stuff.

if I run docker container ls

I get that clamav has ports: 3310/tcp wheras the mirror has a mapped port on my local host

0.0.0.0:8080->8080/tcp

and I can run curl localhost:8080

But If I try and curl localhost on 3310 I get

curl: (52) Empty reply from server

now: how do I perform a healthcheck on the clamav service?


问:
What is the meaning of concatenation in the case of the cm operator in PDF?
I understand that "cm" concatenates two CTMs, however, it's not obvious to me what the specific definition of concatenation is. Reading through to "graphics state operators", in the specification, has not helped me.

Thus far I've looked at a whole bunch of different resources about matrix concatenation. There seems to be a number of different ways concatenation is defined for matrices: some examples seem to show it as:

```<code>[1,2;  concat [5,6;  = [1,2,5,6;
 3,4]          7,8].    3,4,7,8]
</code>```

... however that would seem to break the transform matrices, so I assume that's not it.

Another option is that they just mean matrix addition:

```<code>[1,2; + [5,6;  = [6 ,8 ;
 3,4]    7,8].    10,12]
</code>```

but I feel, if it were just a matrix addition, they would just call it addition/matrix addition.

my last idea is:

```<code>[1,2; + [5,6;  = [15,26 ;
 3,4]    7,8].    37,48]
</code>```

but that seems like a bizarre approach, not least because it would have numbers behaving like text.

Thanks in advance

Body:
I understand that "cm" concatenates two CTMs, however, it's not obvious to me what the specific definition of concatenation is. Reading through to "graphics state operators", in the specification, has not helped me.

Thus far I've looked at a whole bunch of different resources about matrix concatenation. There seems to be a number of different ways concatenation is defined for matrices: some examples seem to show it as:

[1,2;  concat [5,6;  = [1,2,5,6;
 3,4]          7,8].    3,4,7,8]

... however that would seem to break the transform matrices, so I assume that's not it.

Another option is that they just mean matrix addition:

[1,2; + [5,6;  = [6 ,8 ;
 3,4]    7,8].    10,12]

but I feel, if it were just a matrix addition, they would just call it addition/matrix addition.

my last idea is:

[1,2; + [5,6;  = [15,26 ;
 3,4]    7,8].    37,48]

but that seems like a bizarre approach, not least because it would have numbers behaving like text.

Thanks in advance


问:
Specifying the columns using strings is only supported for pandas DataFrames
The code is fine and running for train & test data, but for the sample input it's showing an error while predicting data:

test1 = pd.DataFrame(data=np.array(['MBBS', 'Psychiatrist', 8, 'Dadar', 'Mumbai', 10, 1],dtype=object).reshape(1,7))

pipe.predict(test1)
```
<p>Traceback:</p>
```---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-327-fbf961ba00a2> in <module>
----> 1 pipe.predict(test1)

2 frames
/usr/local/lib/python3.8/dist-packages/sklearn/compose/_column_transformer.py in transform(self, X)
    740             diff = all_names - set(X.columns)
    741             if diff:
--> 742                 raise ValueError(f"columns are missing: {diff}")
    743         else:
    744             # ndarray was used for fitting or transforming, thus we only

ValueError: **columns are missing: {'Recommendation', 'Feedback', 'Experience'}**
```

Body:
The code is fine and running for train & test data, but for the sample input it's showing an error while predicting data:

test1 = pd.DataFrame(data=np.array(['MBBS', 'Psychiatrist', 8, 'Dadar', 'Mumbai', 10, 1],dtype=object).reshape(1,7))

pipe.predict(test1)

Traceback:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-327-fbf961ba00a2> in <module>
----> 1 pipe.predict(test1)

2 frames
/usr/local/lib/python3.8/dist-packages/sklearn/compose/_column_transformer.py in transform(self, X)
    740             diff = all_names - set(X.columns)
    741             if diff:
--> 742                 raise ValueError(f"columns are missing: {diff}")
    743         else:
    744             # ndarray was used for fitting or transforming, thus we only

ValueError: **columns are missing: {'Recommendation', 'Feedback', 'Experience'}**


问:
Why can't code::block build file everytime every time after I restart my computer?
The code::block can't build file everytime after I restart my computer. It will show that there is error like this:
enter image description here

or "A debugging checking in this application has failed" like this and sometime it even can't allow me to open a new project:
enter image description here

But the strange thing is that when I first download the app and before I turn off the computer, it can build and run the same programe. This situation only appears when I turn off and turn on the computer again. However, when I reinstall the app, it can build and run the programe.

Can anyone please help me, I need the code::block tomorrow and it is impossible that every time after I turn off the computer I need to reinstall it.

I have tried to reinstall it, and open project in different way.


问:
GPUDirect RDMA out of range pin address by Quadro p620
I want to implement FPGA-GPU RDMA by nvidia quadro p620.

Also, I used common PCIe BAR resources(BAR0 - BAR1 - BAR2) for FPGA registers and other chunk controllers handling which is independent from RDMA in my custom driver.

PCIe managements are OK but direct memory access to GPU ram which is pinned are always wrong. Precisely, i always get 64KB pinned addresses starting from 2955739136 (~2.7GB) by using nvidia_p2p_get_pages() API without any errors but the point is that quadro p620 ram capacity is just 2GB!.

The virtual address obtained by cuMemAlloc() change every time (which is correct) and i pass this address, together the allocated size, to my driver by ioctl sys-call. Also, i linked my custom driver to nvidia driver as the nvidia GPUDirect RDMA document is said.

Well, every things sounds OK, but the physical addresses are out of range!. Why? Does it requirement to have the qudro GPU equal or over 4GB ram address?

I expect to find the right solution to get the correct physical addresses and then DMA data by FPGA bus master.

Thanks

P.S. before this i implemented FPGA direct memory access to system ram over PCIe without any problems.


问:
Swift Vision text recognition
This is the test image

I use the Vision framework for text recognition in photos and it worked on XCode 13 or earlier. Because the text was read like a book. The text was recognized from left to right and read from top to bottom. With XCode 14, Apple changed the framework by reading text the way humans would read text. So size words are read first and stuff like that. So the words from the photo are mixed up. Is there a way to output the text as before, in the order you would read a book? Here is my code:

```<code>import UIKit
import Vision

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        textRecognitionRequestFunction()
    }

    func textRecognitionRequestFunction() {
        let textRecognitionRequest = VNRecognizeTextRequest { (request, error) in
            // Insert code to process the text recognition results here
            guard let observations = request.results as? [VNRecognizedTextObservation] else { return }

            for observation in observations {
                let topCandidate = observation.topCandidates(1).first
                if let recognizedText = topCandidate?.string {
                    print(recognizedText)
                }
            }
        }

        textRecognitionRequest.recognitionLevel = .accurate

        let image = UIImage(named: "TestImage")
        let imageRequestHandler = VNImageRequestHandler(cgImage: (image?.cgImage!)!, options: [:])

        do {
            try imageRequestHandler.perform([textRecognitionRequest])
        } catch {
            print(error)
        }
    }
}
</code>```

Title: Swift Vision text recognition

Body:
This is the test image

I use the Vision framework for text recognition in photos and it worked on XCode 13 or earlier. Because the text was read like a book. The text was recognized from left to right and read from top to bottom. With XCode 14, Apple changed the framework by reading text the way humans would read text. So size words are read first and stuff like that. So the words from the photo are mixed up. Is there a way to output the text as before, in the order you would read a book? Here is my code:

import UIKit
import Vision

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        textRecognitionRequestFunction()
    }

    func textRecognitionRequestFunction() {
        let textRecognitionRequest = VNRecognizeTextRequest { (request, error) in
            // Insert code to process the text recognition results here
            guard let observations = request.results as? [VNRecognizedTextObservation] else { return }

            for observation in observations {
                let topCandidate = observation.topCandidates(1).first
                if let recognizedText = topCandidate?.string {
                    print(recognizedText)
                }
            }
        }

        textRecognitionRequest.recognitionLevel = .accurate

        let image = UIImage(named: "TestImage")
        let imageRequestHandler = VNImageRequestHandler(cgImage: (image?.cgImage!)!, options: [:])

        do {
            try imageRequestHandler.perform([textRecognitionRequest])
        } catch {
            print(error)
        }
    }
}


问:
Display: sticky element do not 'stick' to viewport's top on cypress browser
I have a Web component element with display: sticky which works fine on non cypress browser.
When run on cypress browser, the element being scrolled out of the view port.

my-component.style.ts:`

```<code>:host {
   position: -webkit-sticky;
   position: -moz-sticky;
   position: -o-sticky;
   position: -ms-sticky;
   position: sticky;
   top: -1px;
   z-index: var(--yotpo-z-index-sticky-page-header);
}
</code>```

my-component.display-page.html:
`

```<code><div [style]="{height: '2000px'}">
   <my-element></my-element>
</div>
</code>```

`

I'm expecing the element to be sticky on the top of the view port, as it does on chrome browser

Body:
I have a Web component element with display: sticky which works fine on non cypress browser.
When run on cypress browser, the element being scrolled out of the view port.

my-component.style.ts:`

:host {
   position: -webkit-sticky;
   position: -moz-sticky;
   position: -o-sticky;
   position: -ms-sticky;
   position: sticky;
   top: -1px;
   z-index: var(--yotpo-z-index-sticky-page-header);
}

my-component.display-page.html:
`

   <my-element></my-element>

`

I'm expecing the element to be sticky on the top of the view port, as it does on chrome browser


问:
Python requests and oktaloginwrapper - make post request after okta MFA login
I have a need to make post and get requests to a website behind Okta MFA. This library -https://pypi.org/project/oktaloginwrapper/ - seems to solve the issue of logging in to Okta with MFA so that I am authenticated and everything looks to be working fine there.

But the issue is then I don't see how to use the object my_session to then start doing post and get requests. for example I want to then log into the website by doing:

```<code>longinURL = 'https://login.mywebsite.com/login?login%5Bemail%5D=xxxx%40domain.com'
my_session.post(longinURL)
</code>```

but my_session as it is does not have the post method available

I gather there is some link between the my_session object and the requests.Sessions class but I don't know where to go from there. Could someone help explain what next steps I need to take to be able to start making authenticated requests to my website?

Body:
I have a need to make post and get requests to a website behind Okta MFA. This library -https://pypi.org/project/oktaloginwrapper/ - seems to solve the issue of logging in to Okta with MFA so that I am authenticated and everything looks to be working fine there.

But the issue is then I don't see how to use the object my_session to then start doing post and get requests. for example I want to then log into the website by doing:

longinURL = 'https://login.mywebsite.com/login?login%5Bemail%5D=xxxx%40domain.com'
my_session.post(longinURL)

but my_session as it is does not have the post method available

I gather there is some link between the my_session object and the requests.Sessions class but I don't know where to go from there. Could someone help explain what next steps I need to take to be able to start making authenticated requests to my website?


问:
IPython: Audio: join chords (as lists): inhomogeneous shape after 1 dimensions
This is my first test using IPython, I am sorry if this doesn't make sense.

```<code>import IPython.display as ipd
import scipy
from scipy import signal as sp

import math

import numpy as np

def f_k(f_0, k):
    return f_0*2**((k%12)/12)

def h_k(k, f0, t):
    return math.sin(2*math.pi*f_k(f0, k)*t)

F = 44000
T = 2
f0 = 440
N = F*T

H0 = []
for k in [0,4,7]:
    H0.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])
ipd.Audio(H0, rate=F)

H5 = []
for k in [5,9,12]:
    H5.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])

H7 = []
for k in [7, 11, 14]:
    H7.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])

H9 = []
for k in [5,9,16]:
    H9.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])

appended_sample = []
for h in [H0, H7, H9, H5]:
    print(len(h))               # prints 3 for each h
    appended_sample +=(appended_sample, h)

ipd.Audio(appended_sample, rate=F)
</code>```

h_k returns one single float, H5, H7, H9 hence should contain the same amount of float since the linspace part is equal.
The length of each h is equal to 3. Yet I get the error: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (8,) + inhomogeneous part. for line ipd.Audio(appended_sample, rate=F)
Could someone explain under which circumstances one can join lists and apply ipd.Audio on them? I think my list is just one single list without any inner lists. I was hoping to just 'join the chords' created by H0, H5 etc. append produces a sound yet it's 24 secs long instead of the 4*2secs I expected:(

Body:
This is my first test using IPython, I am sorry if this doesn't make sense.

import IPython.display as ipd
import scipy
from scipy import signal as sp

import math

import numpy as np

def f_k(f_0, k):
    return f_0*2**((k%12)/12)

def h_k(k, f0, t):
    return math.sin(2*math.pi*f_k(f0, k)*t)

F = 44000
T = 2
f0 = 440
N = F*T

H0 = []
for k in [0,4,7]:
    H0.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])
ipd.Audio(H0, rate=F)

H5 = []
for k in [5,9,12]:
    H5.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])

H7 = []
for k in [7, 11, 14]:
    H7.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])

H9 = []
for k in [5,9,16]:
    H9.append([h_k(k, f0, t) for t in np.linspace(0, T, N)])

appended_sample = []
for h in [H0, H7, H9, H5]:
    print(len(h))               # prints 3 for each h
    appended_sample +=(appended_sample, h)

ipd.Audio(appended_sample, rate=F)

h_k returns one single float, H5, H7, H9 hence should contain the same amount of float since the linspace part is equal.
The length of each h is equal to 3. Yet I get the error: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (8,) + inhomogeneous part. for line ipd.Audio(appended_sample, rate=F)
Could someone explain under which circumstances one can join lists and apply ipd.Audio on them? I think my list is just one single list without any inner lists. I was hoping to just 'join the chords' created by H0, H5 etc. append produces a sound yet it's 24 secs long instead of the 4*2secs I expected:(


问:
Merging two scalar plots in TensorBoard 2 with TensorFlow 2 without using two writers
I am aware of the post "Merging 2 plots in TensorBoard 2 with TensorFlow 2" on stackoverflow, but the solution provided there involves using two writers. Is there a way to achieve this without using two writers, specifically for scalar plots created with tf.summary.scalar?

I am trying to create a single TensorBoard 2 summary with TensorFlow 2 that includes two scalar plots on the same figure, but I do not want to use two separate writers for each plot. Is there a way to merge the two plots into a single figure using a single writer in TensorFlow 2? Something similar to add_scalars in PyTorch, but works with Tensorflow.

Any help would be greatly appreciated. Thank you!

Edit:

In PyTorch they do it by manipulating tag, which I don't understand. But in general plots are merged in Tensorboard 2 based on tags
fw_tag = fw_logdir + "/" + main_tag.replace("/", "_") + "_" + tag 2.


问:
Node.js Axios GET request, sometimes return value as undefined
Hello Im trying build own node.js server based on other API but I can't understand why time to time axios return undefined value, when I try use 100x in row postman with same request and it return all time same value, but with my code it push undefined.

```<code>// main.js

const api = require('./balance_test.js');

(async () => {
  let balanceNow = await api.getBalance();
  if (balanceNow.includes("ACCESS_BALANCE:")) {
    console.log(balanceNow);
  } else if (balanceNow.includes("error")) {
    console.log("error mate");
  }

  let activeSession = await api.activeActivations();
  console.log(activeSession);

})();

// balance_test.js

const axios = require('axios');

var myBalance = {
  currentBalance: "none",
  activeActivations_response: "none",
  status: "none",
  newNumber: "none",
  getBalance: async function () {
    try {
      const response = await axios.get('https://api.sms-activate.org/stubs/handler_api.php', {
        params: {
          'api_key': 'here_api',
          'action': 'getBalance'
        }
      });
      myBalance.currentBalance = response.data;
      return myBalance.currentBalance;
    }
    catch (error) {
      console.log("something focked");
      myBalance.currentBalance = "error";
      return myBalance.currentBalance;
    }
  },

  activeActivations: async function () {
    try {
      const response = await axios.get('https://api.sms-activate.org/stubs/handler_api.php', {
        params: {
          'api_key': 'here_api',
          'action': 'getActiveActivations'
        }
      });
      //myBalance.status = response.data.status;
      myBalance.activeActivations_response = response.data;
      return myBalance.activeActivations_response;
    } catch (error) {
      console.log("Error activeActivations")
    }
  },

  requestNumber: async function () {
    try {
      const response = await axios.get('https://api.sms-activate.org/stubs/handler_api.php', {
        params: {
          'api_key': 'here_api',
          'action': 'getNumber',
          'service': 'tw',
          'country': '43',
          'maxPrice': '10'
        }
      });

      myBalance.newNumber = response.data;
      return myBalance.newNumber;
    } catch (error) {

    }
  }

};

module.exports = myBalance;
</code>```

and when trying 10-20x same request it return it in console, and sometimes push error, and sometimes push undefined value from main_test.js, and when push undefined, I check if did request, and it did and should return value correctly:

```<code>PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
ACCESS_BALANCE:620.00
PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
ACCESS_BALANCE:620.00
PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
something focked
error mate
PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
</code>```

Body:
Hello Im trying build own node.js server based on other API but I can't understand why time to time axios return undefined value, when I try use 100x in row postman with same request and it return all time same value, but with my code it push undefined.

// main.js

const api = require('./balance_test.js');

(async () => {
  let balanceNow = await api.getBalance();
  if (balanceNow.includes("ACCESS_BALANCE:")) {
    console.log(balanceNow);
  } else if (balanceNow.includes("error")) {
    console.log("error mate");
  }

  let activeSession = await api.activeActivations();
  console.log(activeSession);

})();

// balance_test.js

const axios = require('axios');

var myBalance = {
  currentBalance: "none",
  activeActivations_response: "none",
  status: "none",
  newNumber: "none",
  getBalance: async function () {
    try {
      const response = await axios.get('https://api.sms-activate.org/stubs/handler_api.php', {
        params: {
          'api_key': 'here_api',
          'action': 'getBalance'
        }
      });
      myBalance.currentBalance = response.data;
      return myBalance.currentBalance;
    }
    catch (error) {
      console.log("something focked");
      myBalance.currentBalance = "error";
      return myBalance.currentBalance;
    }
  },

  activeActivations: async function () {
    try {
      const response = await axios.get('https://api.sms-activate.org/stubs/handler_api.php', {
        params: {
          'api_key': 'here_api',
          'action': 'getActiveActivations'
        }
      });
      //myBalance.status = response.data.status;
      myBalance.activeActivations_response = response.data;
      return myBalance.activeActivations_response;
    } catch (error) {
      console.log("Error activeActivations")
    }
  },

  requestNumber: async function () {
    try {
      const response = await axios.get('https://api.sms-activate.org/stubs/handler_api.php', {
        params: {
          'api_key': 'here_api',
          'action': 'getNumber',
          'service': 'tw',
          'country': '43',
          'maxPrice': '10'
        }
      });

      myBalance.newNumber = response.data;
      return myBalance.newNumber;
    } catch (error) {

    }
  }

};

module.exports = myBalance;

and when trying 10-20x same request it return it in console, and sometimes push error, and sometimes push undefined value from main_test.js, and when push undefined, I check if did request, and it did and should return value correctly:

PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
ACCESS_BALANCE:620.00
PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
ACCESS_BALANCE:620.00
PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js
something focked
error mate
PS C:\Users\NewSystem\OneDrive\Desktop\node.js learning\sms-activate API\test> node main_test.js


问:
Why tmux fails to run a bash script when using a bind-key
The script using the normal command ./

Body: The script using the normal command ./


问:
Wordpress stuck on loading gears after migration to DigitalOcean - Can't access WP-ADMIN
I set up my wordpress site locally, then tried moving it to Digital Ocean today.
I made a zip of the HTML folder
Created a MYSQL database backup
Created a database with same name, user,pw on digital ocean and imported the backup
uploaded the html to /var/www/html (after setting up apache2 and phpmyadmin)

but my website is stuck at the loading gears
and I can't access wp-admin. it says:
Not Found

The requested URL was not found on this server.

I tried checking and chaning the wp_option values. set them to my new url.
I also tried adding :
// Site URLS (override DB settings) define('WP_HOME','http://www.royaltytowing.com.au');     //<-- NO TRAILING / define('WP_SITEURL','http://www.royaltytowing.com.au');  //<-- NO TRAILING /

still no luck


问:
Running APK files directly in the browser
I have seen a way of running Pygame directly with WASM in the browser (link here, files here). The weird thing is that it uses an APK file for the actual Pygame code. So it made me wonder if it was possible to run a mobile game APK file in the browser.

I have searched Google but all I have found is running an Android VM on a server.

Is it possible to actually run the APK file directly in the browser?


问:
Firebase take an exception: RangeError: Maximum call stack size exceeded, js engine: hermes
I make an a realtime databse with users registration:

```<code>set(ref(db, 'users/' + res.data.localId), {
            name: name,
            surname: surname,
            email: email,
            countTrains: 0
          }).then(() => {
             console.log('Made new account');
        })
            .catch((error) => {
                console.log(error);
            });
</code>```

Also i need to update my countTrains. In the other Stack Navigator screen i try:

```<code>function update () {
    update(ref(db, 'users/' + user.localId), {
      countTrains: countTrain,
    }).then(() => {
      // Data saved successfully!
      alert('data updated!');
  })
      .catch((error) => {
          // The write failed...
          alert(error);
      });
  };
</code>```

But take an excetpion: RangeError: Maximum call stack size exceeded, js engine: hermes

Body:
I make an a realtime databse with users registration:

set(ref(db, 'users/' + res.data.localId), {
            name: name,
            surname: surname,
            email: email,
            countTrains: 0
          }).then(() => {
             console.log('Made new account');
        })
            .catch((error) => {
                console.log(error);
            });

Also i need to update my countTrains. In the other Stack Navigator screen i try:

function update () {
    update(ref(db, 'users/' + user.localId), {
      countTrains: countTrain,
    }).then(() => {
      // Data saved successfully!
      alert('data updated!');
  })
      .catch((error) => {
          // The write failed...
          alert(error);
      });
  };

But take an excetpion: RangeError: Maximum call stack size exceeded, js engine: hermes


问:
need to listen socket events in expo background fetch i tried but not working
```<code>const TASK_NAME = "VIDEO_CALL_TASK";

TaskManager.defineTask(TASK_NAME, async () => {
  try {
    let newSocket = io("wss://url");

    newSocket.on("error", (e) => {
      console.log("socket error is ", e);
    });

    newSocket.on("callUser", async (data) => {
      console.log("someone is calling me", data);
      await AsyncStorage.setItem("fromPeer", data.fromPeer);
      await AsyncStorage.setItem("fromSocket", data.fromSocket);
    });

    console.log("new socket", newSocket);

    const jsonValue = JSON.stringify(newSocket);
    await AsyncStorage.setItem("socket", jsonValue);

    return BackgroundFetch.Result.NewData;

  } catch (e) {

    console.log(e);

  }
});

</code>```

the task is start after 5 sec and running the showing the log of socket i created.

but when i call this user from other user it doest not listen the socket event and run the callback.

Body:
const TASK_NAME = "VIDEO_CALL_TASK";

TaskManager.defineTask(TASK_NAME, async () => {
  try {
    let newSocket = io("wss://url");

    newSocket.on("error", (e) => {
      console.log("socket error is ", e);
    });

    newSocket.on("callUser", async (data) => {
      console.log("someone is calling me", data);
      await AsyncStorage.setItem("fromPeer", data.fromPeer);
      await AsyncStorage.setItem("fromSocket", data.fromSocket);
    });

    console.log("new socket", newSocket);

    const jsonValue = JSON.stringify(newSocket);
    await AsyncStorage.setItem("socket", jsonValue);

    return BackgroundFetch.Result.NewData;

  } catch (e) {

    console.log(e);

  }
});

the task is start after 5 sec and running the showing the log of socket i created.

but when i call this user from other user it doest not listen the socket event and run the callback.


问:
How to define an OnClick event handler for a button from within Qt Creator when in the form it is not appear(I cant add it from there....)?
I defined a QPushButton in the MainWindow constructor:

```<code>QPushButton *testFewCommands = new QPushButton("&start testing few commands", this);
</code>```

and now, I want to add OnClick function
In the designer this button doesn't appear,
how can I do it?

Body:
I defined a QPushButton in the MainWindow constructor:

QPushButton *testFewCommands = new QPushButton("&start testing few commands", this);

and now, I want to add OnClick function
In the designer this button doesn't appear,
how can I do it?


问:
supervisorctl restart all > smart-reminder-bot: ERROR (spawn error)

/etc/supervisor/conf.d/bot.conf

[program:smart-reminder-bot]
environment=ROOT="/root",user=root
drectory=/root/smart-reminder-bot
command=python3 app.py
autostart=true
autorestart=true

std_err_logfile=/root/smart-reminder-bot/logfile_err.log
stdout_logfile=/root/smart-reminder-bot/logfile.log

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart all


问:
The pop up "Leave site changes may not be saved" is not getting closed even after accepting it via driver.switchTo().alert().accept()
We have one url in our community where if I try to edit the article and click on cancel then I get a pop up saying "Leave site changes may not be saved" when I accept this alert with code driver.switchTo().alert().accept() the page is redirecting to the correct page but this pop up will still remain on the page and it is blocking further execution.

I am attaching some screenshot for reference.

Pop up:

code:

=>I tried with driver.switchTo().alert().accept() method it is accepting but pop will still remain on the screen. If I try to execute same piece of code again then I'm getting error "No alert Present exception" but I can see the alert present on the web page.

=> I tried using Actions class with below code

```<code>Actions act = new Actions(driver);
act.sendKeys(Keys.ENTER).build().perform();
</code>```

but this gives exception saying "unhandled alert" are present on the web page but after accepting if I try to execute the code nothing is happening.

=> It is javascript alert and let me know if I can use JavaScript executor if yes let me know how can we use to accept this alert

Body:
We have one url in our community where if I try to edit the article and click on cancel then I get a pop up saying "Leave site changes may not be saved" when I accept this alert with code driver.switchTo().alert().accept() the page is redirecting to the correct page but this pop up will still remain on the page and it is blocking further execution.

I am attaching some screenshot for reference.

Pop up:

code:

=>I tried with driver.switchTo().alert().accept() method it is accepting but pop will still remain on the screen. If I try to execute same piece of code again then I'm getting error "No alert Present exception" but I can see the alert present on the web page.

=> I tried using Actions class with below code

Actions act = new Actions(driver);
act.sendKeys(Keys.ENTER).build().perform();

but this gives exception saying "unhandled alert" are present on the web page but after accepting if I try to execute the code nothing is happening.

=> It is javascript alert and let me know if I can use JavaScript executor if yes let me know how can we use to accept this alert


问:
Is there a Vue way of creating a drag ghost image?
I need to create a custom ghost image for a dragged element. And also I need to change it's style a bit. This is my code:

```<code>   const onDragStart = (e) => {
      const ghost = e.target.cloneNode(true);

      ghost.setAttribute("id", "ghost");

      ghost.style.position = "absolute";
      ghost.style.right = "-999px";

      // counter is an element that should not be displayed on a ghost image
      ghost.getElementsByClassName("counter")[0].remove();

      document.body.appendChild(ghost);

      e.dataTransfer.setDragImage(ghost, 20, 20);
    };

    const onDragEnd = () => {
      const ghost = document.getElementById("ghost");

      if (ghost) {
        ghost.remove();
      }
    };
</code>```

Since I use Vue, manipulating DOM directly seems like a bad idea. Is there any way to do the same result, but in a Vue-way?

Body:
I need to create a custom ghost image for a dragged element. And also I need to change it's style a bit. This is my code:

   const onDragStart = (e) => {
      const ghost = e.target.cloneNode(true);

      ghost.setAttribute("id", "ghost");

      ghost.style.position = "absolute";
      ghost.style.right = "-999px";

      // counter is an element that should not be displayed on a ghost image
      ghost.getElementsByClassName("counter")[0].remove();

      document.body.appendChild(ghost);

      e.dataTransfer.setDragImage(ghost, 20, 20);
    };

    const onDragEnd = () => {
      const ghost = document.getElementById("ghost");

      if (ghost) {
        ghost.remove();
      }
    };

Since I use Vue, manipulating DOM directly seems like a bad idea. Is there any way to do the same result, but in a Vue-way?


问:
Atlas with impala 3.2
How do I configure hook when integrating atals with impala 3.2?Could not find the parameters of the configured hook!
Impala 3.3 and higher can be configured query_event_hook_classes=org.apache.atlas.impala.hook.ImpalaLineageHook</p>

Title: Atlas with impala 3.2


问:
Jenkins + surefire plugin: Junit 5 tests are not executed in a multi test provider job
I've been struggling with this for a long time already... :(

I have a test project based on Junit4 for which I decided, innocently, to start using Junit5 for the next tests I write.

For some reason, the Jenkins job refuses to run the JUnit5 tests:

```<code>"No tests were executed!"
</code>```

So, all in all, I got several JUnit4 based tests which execute, and several JUnit5 based tests which do not.

I tried to follow the guidelines here, but nothing worked for me and I got mixed up following it.

I'd appreciate your assistance with this problem.

My current relevant pom configuration is :

```<code>            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
                <testFailureIgnore>false</testFailureIgnore>
                <argLine>
        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                </argLine>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.maven.surefire</groupId>
                    <artifactId>surefire-junit47</artifactId>
                    <version>3.0.0-M5</version>
                </dependency>
            </dependencies>
        </plugin>

    <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-suite-engine</artifactId>
        <version>1.8.1</version>
    </dependency>
            <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
</code>```

Maybe there are some conflicts here, I couldn't tell...

Body:
I've been struggling with this for a long time already... :(

I have a test project based on Junit4 for which I decided, innocently, to start using Junit5 for the next tests I write.

For some reason, the Jenkins job refuses to run the JUnit5 tests:

"No tests were executed!"

So, all in all, I got several JUnit4 based tests which execute, and several JUnit5 based tests which do not.

I tried to follow the guidelines here, but nothing worked for me and I got mixed up following it.

I'd appreciate your assistance with this problem.

My current relevant pom configuration is :

            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
                <testFailureIgnore>false</testFailureIgnore>
                <argLine>
        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                </argLine>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.maven.surefire</groupId>
                    <artifactId>surefire-junit47</artifactId>
                    <version>3.0.0-M5</version>
                </dependency>
            </dependencies>
        </plugin>

    <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-suite-engine</artifactId>
        <version>1.8.1</version>
    </dependency>
            <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>

Maybe there are some conflicts here, I couldn't tell...


问:
Control 2 independent servos. I don't know how to control
I have 2 servo. How to control 2 servos running separately?
Type ctr.servoDay1() has only 1 run, ctr.servoDay2() has only 2 runs. Call ctr.servoDay1(), but both are running.</p>
```<code>servoPIN1 = 21
servoPIN2 = 20
#GPIO.setmode(GPIO.BOARD)
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

#####################
GPIO.setup(servoPIN1, GPIO.OUT)
GPIO.setup(servoPIN2, GPIO.OUT)
n = GPIO.PWM(servoPIN1, 50) # GPIO for PWM with 50Hz
m = GPIO.PWM(servoPIN2, 50)
n.start(10)
sleep(0.1)
n.start(0)
n.stop()

m.start(10)
sleep(0.1)
m.start(0)
m.stop()
##########################################################################################
class control:

    def servoDay1(self):
        n.start(10) # Open
        sleep(0.1)
        n.start(0)
        n.stop()

    def servoDay2(self):
        m.start(10) # Open
        sleep(0.1)
        m.start(0)
        m.stop()

ctr.servoDay1()
</code>```

Body:
I have 2 servo. How to control 2 servos running separately?
Type ctr.servoDay1() has only 1 run, ctr.servoDay2() has only 2 runs. Call ctr.servoDay1(), but both are running.

servoPIN1 = 21
servoPIN2 = 20
#GPIO.setmode(GPIO.BOARD)
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

#####################
GPIO.setup(servoPIN1, GPIO.OUT)
GPIO.setup(servoPIN2, GPIO.OUT)
n = GPIO.PWM(servoPIN1, 50) # GPIO for PWM with 50Hz
m = GPIO.PWM(servoPIN2, 50)
n.start(10)
sleep(0.1)
n.start(0)
n.stop()

m.start(10)
sleep(0.1)
m.start(0)
m.stop()
##########################################################################################
class control:

    def servoDay1(self):
        n.start(10) # Open
        sleep(0.1)
        n.start(0)
        n.stop()

    def servoDay2(self):
        m.start(10) # Open
        sleep(0.1)
        m.start(0)
        m.stop()

ctr.servoDay1()


问:
Create field that stores multiple doc/img in single filed using react
How to create field that stores multiple document/images in single field using React?</p>
```<code>export const DemoimgUpdate = () => {
  const dispatch = useAppDispatch()
  const demoimgEntity = useAppSelector(state => state.demoimg.entity);
  const loading = useAppSelector(state => state.demoimg.loading);
  const updating = useAppSelector(state => state.demoimg.updating);
  const updateSuccess = useAppSelector(state => state.demoimg.updateSuccess);

  const handleClose = () => {
    navigate('/demoimg' + location.search);
  };

  const defaultValues = () => isNew
    ? {}
    : { ...demoimgEntity };

  return (
    <ValidatedForm defaultValues={defaultValues()} onSubmit={saveEntity}>
      {!isNew
        ? <ValidatedField
            name="id"
            required
            readOnly
            id="demoimg-id"
            label="ID"
            validate={{ required: true }}
          />
        : null
      }
      <ValidatedBlobField
        label="Images"
        id="demoimg-images"
        name="images"
        data-cy="images"
        isImage
        accept="image/*"
        multiple
      />

</code>```

Body:
How to create field that stores multiple document/images in single field using React?

export const DemoimgUpdate = () => {
  const dispatch = useAppDispatch()
  const demoimgEntity = useAppSelector(state => state.demoimg.entity);
  const loading = useAppSelector(state => state.demoimg.loading);
  const updating = useAppSelector(state => state.demoimg.updating);
  const updateSuccess = useAppSelector(state => state.demoimg.updateSuccess);

  const handleClose = () => {
    navigate('/demoimg' + location.search);
  };

  const defaultValues = () => isNew
    ? {}
    : { ...demoimgEntity };

  return (
    <ValidatedForm defaultValues={defaultValues()} onSubmit={saveEntity}>
      {!isNew
        ? <ValidatedField
            name="id"
            required
            readOnly
            id="demoimg-id"
            label="ID"
            validate={{ required: true }}
          />
        : null
      }
      <ValidatedBlobField
        label="Images"
        id="demoimg-images"
        name="images"
        data-cy="images"
        isImage
        accept="image/*"
        multiple
      />


问:
Google Ads conversion tracking on subdomain not working
I am running a Google Ads campaign on www.example.com. The main site links to a sub domain named app.example.com where there is a registration form. The register form over there is not tracking conversions. I believe the issue is related to the form being on the subdomain.

Does anyone know the solution to this?

I tested this manually by doing registrations and also using the troubleshooter provided by Google Ads.


问:
pod's system properties arrange according to limits
In Kubernetes, the system resource of the pods is the system resource of the node. I wonder if I have the possibility to set it as a pod system resource according to the limits I have set? My software calculates system resource and shows CPU/Ram/Disk to dashboard.</p>


问:
Event for value out of range mui select
I am trying to find an event for mui/html out of range value for select.
Couldn't find one, if I need to i would do it manually  but I prefer something more safe.

I tried to find one in the mui documents but didn't find any.

Title: Event for value out of range mui select


问:
How to operate with more than 2 numbers
I'm trying to build a calculator with HTML, CSS and JS but I can't fix how to operate for example 1 + 2 + 3. Right now I'm getting 5 as a result with my actual code and the correct result should be 6. Here you have all my JS. Hope someone can help me. If you need the HTML let me know!

I want to operate with more than 2 numbers.

let operacion1;
let operacion2;
let performance;

const iniciamosCalculadoraPRO = () => {
  let resultado = document.getElementById("resultado");
  let reset = document.getElementById("reset");
  let suma = document.getElementById("suma");
  let minus = document.getElementById("minus");
  let multi = document.getElementById("multi");
  let divi = document.getElementById("divi");
  let equal = document.getElementById("equal");
  let root = document.getElementById("root");
  let one = document.getElementById("one");
  let two = document.getElementById("two");
  let three = document.getElementById("three");
  let four = document.getElementById("four");
  let five = document.getElementById("five");
  let six = document.getElementById("six");
  let seven = document.getElementById("seven");
  let eight = document.getElementById("eight");
  let nine = document.getElementById("nine");
  let cero = document.getElementById("cero");
};

one.onclick = function() {
  resultado.textContent = resultado.textContent + "1";
};
two.onclick = function() {
  resultado.textContent = resultado.textContent + "2";
};
three.onclick = function() {
  resultado.textContent = resultado.textContent + "3";
};
four.onclick = function() {
  resultado.textContent = resultado.textContent + "4";
};
five.onclick = function() {
  resultado.textContent = resultado.textContent + "5";
};
six.onclick = function() {
  resultado.textContent = resultado.textContent + "6";
};
seven.onclick = function() {
  resultado.textContent = resultado.textContent + "7";
};
eight.onclick = function() {
  resultado.textContent = resultado.textContent + "8";
};
nine.onclick = function() {
  resultado.textContent = resultado.textContent + "9";
};
cero.onclick = function() {
  resultado.textContent = resultado.textContent + "0";
};
reset.onclick = function() {
  resCalculator();
};
suma.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "+";
  clearAll();
};
minus.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "-";
  clearAll();
};
multi.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "*";
  clearAll();
};
divi.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "/";
  clearAll();
};
equal.onclick = function() {
  operacion2 = resultado.textContent;
  showingResults();
};

root.onclick = function() {
  operacion1 = resultado.textContent;
  rootOperation();
}

punto.onclick = function() {
  if (!resultado.textContent.includes(".")) {
    resultado.textContent = resultado.textContent + ".";
  }
}

const clearAll = () => {
  resultado.textContent = "";
}

const resCalculator = () => {
  resultado.textContent = "";
  operacion1 = 0;
  operacion2 = 0;
  performance = "";
}

const rootOperation = () => {
  resultado.textContent = Math.sqrt(operacion1).toFixed(3);
}

const showingResults = () => {
  let resultadosGlobales = 0;
  switch (performance) {
    case "+":
      resultadosGlobales = parseFloat(operacion1) + parseFloat(operacion2);
      break;

    case "-":
      resultadosGlobales = parseFloat(operacion1) - parseFloat(operacion2);
      break;

    case "*":
      resultadosGlobales = parseFloat(operacion1) * parseFloat(operacion2);
      break;

    case "/":
      resultadosGlobales = parseFloat(operacion1) / parseFloat(operacion2);
      break;
  }
  resCalculator();
  resultado.textContent = resultadosGlobales;
}
window.addEventListener("DOMContentLoaded", iniciamosCalculadoraPRO);```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body {
  background-color: #7A99B9;
}

.container {
  margin-top: 100px;
  margin-right: 100px;
  margin-left: 100px;
}

.calculadora {
  display: block;
  margin: 0 auto;
  padding: 30px;
  background: linear-gradient(156.9deg, #3E566B 0%, #21384E 100.39%);
  border-radius: 30px;
  width: 365px;
  height: 570px;
  box-shadow: 8px 7px 19px rgba(0, 0, 0, 0.3);
}

.calculadora td button {
  display: block;
  width: 70px;
  height: 70px;
  font-size: 25px;
  color: #D8D8D8;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: bold;
}

#resultado {
  display: block;
  text-align: center;
  font-size: 40px;
  margin-bottom: 30px;
  width: 300px;
  height: 100px;
  line-height: 100px;
  background-color: #BBC4B1;
  border-radius: 15px;
  box-shadow: inset 5px 4px 4px rgba(0, 0, 0, 0.25);
  overflow-y: scroll;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

button {
  background: #536576;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 15px;
  text-decoration: none;
  border-color: #6C849B;
}</code>```

      <button id="reset">C</button>
      <button id="root">√</button>
      <button id="divi">/</button>
      <button id="multi">*</button>

      <button id="seven">7</button>
      <button id="eight">8</button>
      <button id="nine">9</button>
      <button id="minus">-</button>

      <button id="four">4</button>
      <button id="five">5</button>
      <button id="six">6</button>
      <button id="suma">+</button>

      <button id="one">1</button>
      <button id="two">2</button>
      <button id="three">3</button>
      <button id="equal">=</button>

      <button id="cero">0</button>
      <button id="punto">.</button>

```

Title: How to operate with more than 2 numbers

Body:
I'm trying to build a calculator with HTML, CSS and JS but I can't fix how to operate for example 1 + 2 + 3. Right now I'm getting 5 as a result with my actual code and the correct result should be 6. Here you have all my JS. Hope someone can help me. If you need the HTML let me know!

I want to operate with more than 2 numbers.

let operacion1;
let operacion2;
let performance;

const iniciamosCalculadoraPRO = () => {
  let resultado = document.getElementById("resultado");
  let reset = document.getElementById("reset");
  let suma = document.getElementById("suma");
  let minus = document.getElementById("minus");
  let multi = document.getElementById("multi");
  let divi = document.getElementById("divi");
  let equal = document.getElementById("equal");
  let root = document.getElementById("root");
  let one = document.getElementById("one");
  let two = document.getElementById("two");
  let three = document.getElementById("three");
  let four = document.getElementById("four");
  let five = document.getElementById("five");
  let six = document.getElementById("six");
  let seven = document.getElementById("seven");
  let eight = document.getElementById("eight");
  let nine = document.getElementById("nine");
  let cero = document.getElementById("cero");
};

one.onclick = function() {
  resultado.textContent = resultado.textContent + "1";
};
two.onclick = function() {
  resultado.textContent = resultado.textContent + "2";
};
three.onclick = function() {
  resultado.textContent = resultado.textContent + "3";
};
four.onclick = function() {
  resultado.textContent = resultado.textContent + "4";
};
five.onclick = function() {
  resultado.textContent = resultado.textContent + "5";
};
six.onclick = function() {
  resultado.textContent = resultado.textContent + "6";
};
seven.onclick = function() {
  resultado.textContent = resultado.textContent + "7";
};
eight.onclick = function() {
  resultado.textContent = resultado.textContent + "8";
};
nine.onclick = function() {
  resultado.textContent = resultado.textContent + "9";
};
cero.onclick = function() {
  resultado.textContent = resultado.textContent + "0";
};
reset.onclick = function() {
  resCalculator();
};
suma.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "+";
  clearAll();
};
minus.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "-";
  clearAll();
};
multi.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "*";
  clearAll();
};
divi.onclick = function() {
  operacion1 = resultado.textContent;
  performance = "/";
  clearAll();
};
equal.onclick = function() {
  operacion2 = resultado.textContent;
  showingResults();
};

root.onclick = function() {
  operacion1 = resultado.textContent;
  rootOperation();
}

punto.onclick = function() {
  if (!resultado.textContent.includes(".")) {
    resultado.textContent = resultado.textContent + ".";
  }
}

const clearAll = () => {
  resultado.textContent = "";
}

const resCalculator = () => {
  resultado.textContent = "";
  operacion1 = 0;
  operacion2 = 0;
  performance = "";
}

const rootOperation = () => {
  resultado.textContent = Math.sqrt(operacion1).toFixed(3);
}

const showingResults = () => {
  let resultadosGlobales = 0;
  switch (performance) {
    case "+":
      resultadosGlobales = parseFloat(operacion1) + parseFloat(operacion2);
      break;

    case "-":
      resultadosGlobales = parseFloat(operacion1) - parseFloat(operacion2);
      break;

    case "*":
      resultadosGlobales = parseFloat(operacion1) * parseFloat(operacion2);
      break;

    case "/":
      resultadosGlobales = parseFloat(operacion1) / parseFloat(operacion2);
      break;
  }
  resCalculator();
  resultado.textContent = resultadosGlobales;
}
window.addEventListener("DOMContentLoaded", iniciamosCalculadoraPRO);

body {
  background-color: #7A99B9;
}

.container {
  margin-top: 100px;
  margin-right: 100px;
  margin-left: 100px;
}

.calculadora {
  display: block;
  margin: 0 auto;
  padding: 30px;
  background: linear-gradient(156.9deg, #3E566B 0%, #21384E 100.39%);
  border-radius: 30px;
  width: 365px;
  height: 570px;
  box-shadow: 8px 7px 19px rgba(0, 0, 0, 0.3);
}

.calculadora td button {
  display: block;
  width: 70px;
  height: 70px;
  font-size: 25px;
  color: #D8D8D8;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: bold;
}

#resultado {
  display: block;
  text-align: center;
  font-size: 40px;
  margin-bottom: 30px;
  width: 300px;
  height: 100px;
  line-height: 100px;
  background-color: #BBC4B1;
  border-radius: 15px;
  box-shadow: inset 5px 4px 4px rgba(0, 0, 0, 0.25);
  overflow-y: scroll;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

button {
  background: #536576;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 15px;
  text-decoration: none;
  border-color: #6C849B;
}

      <button id="reset">C</button>
      <button id="root">√</button>
      <button id="divi">/</button>
      <button id="multi">*</button>

      <button id="seven">7</button>
      <button id="eight">8</button>
      <button id="nine">9</button>
      <button id="minus">-</button>

      <button id="four">4</button>
      <button id="five">5</button>
      <button id="six">6</button>
      <button id="suma">+</button>

      <button id="one">1</button>
      <button id="two">2</button>
      <button id="three">3</button>
      <button id="equal">=</button>

      <button id="cero">0</button>
      <button id="punto">.</button>