问:
ControlsFX runtime error when trying to instantiate SpreadsheetView
Here is the error message, it occurs when trying to create a new SpreadsheetView():

```<code>Caused by: java.lang.IllegalAccessError: class org.controlsfx.control.spreadsheet.GridBase (in module org.controlsfx.controls) cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event to module org.controlsfx.controls
</code>```

I looked at another stack overflow post here, but it does not solve the problem.

I am using maven as the build tool, so would like to be able to add something to the pom.xml file.
I'm using java 17, javaFx 17, controlsFx 11.1.1. To create the project I used IntelliJ's generator for a javafx project.

Does anyone have a working example of SpreadsheetView? or a way to make this work?

Body:
Here is the error message, it occurs when trying to create a new SpreadsheetView():

Caused by: java.lang.IllegalAccessError: class org.controlsfx.control.spreadsheet.GridBase (in module org.controlsfx.controls) cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event to module org.controlsfx.controls

I looked at another stack overflow post here, but it does not solve the problem.

I am using maven as the build tool, so would like to be able to add something to the pom.xml file.
I'm using java 17, javaFx 17, controlsFx 11.1.1. To create the project I used IntelliJ's generator for a javafx project.

Does anyone have a working example of SpreadsheetView? or a way to make this work?


来源: stackexchange

问:
using multiple conditions in iam policy
I am trying to give two conditions StringEquals and ArnEquals. The StringEquals block is working whereas ArnEquals block is failing. Even after i gave the correct federated user of mine. I am unable to start build. here is what i am trying. I am getting the error the user with xxxx arn is not allowed to stratbuild action.</p>
```<code>- Effect: Allow
            Action:
              - codebuild:StartBuild
              - codebuild:StopBuild
              - codeBuild:RetryBuild
            Resource:
              - !Sub arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/*
            Condition:
              StringEquals:
                aws:ResourceTag/Application:
                  - yyy
                  - xxx
                aws:ResourceTag/TargetEnvironmentType:
                  - dev
              ArnEquals:
                aws:SourceArn:
                  - !Sub arn:aws:sts::${AWS::AccountId}:federated-user/Builder-role/xxx@gmial.com
</code>```

ContentLicense: CC BY-SA 4.0

Title: using multiple conditions in iam policy

Body:
I am trying to give two conditions StringEquals and ArnEquals. The StringEquals block is working whereas ArnEquals block is failing. Even after i gave the correct federated user of mine. I am unable to start build. here is what i am trying. I am getting the error the user with xxxx arn is not allowed to stratbuild action.

- Effect: Allow
            Action:
              - codebuild:StartBuild
              - codebuild:StopBuild
              - codeBuild:RetryBuild
            Resource:
              - !Sub arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/*
            Condition:
              StringEquals:
                aws:ResourceTag/Application:
                  - yyy
                  - xxx
                aws:ResourceTag/TargetEnvironmentType:
                  - dev
              ArnEquals:
                aws:SourceArn:
                  - !Sub arn:aws:sts::${AWS::AccountId}:federated-user/Builder-role/xxx@gmial.com


问:
setState inside MuiDatable onRowSelectionChange makes selected rows not show
When I update a state inside the onRowSelectionChange, the row is not selected.

I have a state object:
const [selectedRows, setSelectedRows] = useState([])

Then, my MuiDatatable options has onRowSelectionChange:

```<code>const options = {
   filterType: 'dropdown',
   pagination: false,
   onRowSelectionChange: (currentSelect, allSelected) => {
      setSelectedRows([...allSelected]);
   },
}
</code>```

I'm not using selectedRows in my useEffect or anywhere else right now.

Body:
When I update a state inside the onRowSelectionChange, the row is not selected.

I have a state object:
const [selectedRows, setSelectedRows] = useState([])

Then, my MuiDatatable options has onRowSelectionChange:

const options = {
   filterType: 'dropdown',
   pagination: false,
   onRowSelectionChange: (currentSelect, allSelected) => {
      setSelectedRows([...allSelected]);
   },
}

I'm not using selectedRows in my useEffect or anywhere else right now.


问:
Cannot import plottools to zoom in matplotlib graph
I want to zoom in on a part of a matplotlib graph, therefore I tried to import plottools (pip3 install plottools) and use it in this way. However I am unable to do so, getting the following error:

```<code>[myname@fedora P3]$ python mycode.py

Traceback (most recent call last):
File "/home/myname/mycode.py", line 3, in <module>
    import plottools as pt
  File "/home/myname/.local/lib/python3.9/site-packages/plottools/__init__.py", line 30, in <module>
    color = cs.Colorscheme(cs.default.colors,longnames=cs.default.longnames,cycle=cs.default.cycle)
AttributeError: module 'cs' has no attribute 'Colorscheme'
</code>```

Here is my Python version:

```<code>[myname@fedora P3]$ python --version
Python 3.9.13
</code>```

Body:
I want to zoom in on a part of a matplotlib graph, therefore I tried to import plottools (pip3 install plottools) and use it in this way. However I am unable to do so, getting the following error:

[myname@fedora P3]$ python mycode.py

Traceback (most recent call last):
File "/home/myname/mycode.py", line 3, in <module>
    import plottools as pt
  File "/home/myname/.local/lib/python3.9/site-packages/plottools/__init__.py", line 30, in <module>
    color = cs.Colorscheme(cs.default.colors,longnames=cs.default.longnames,cycle=cs.default.cycle)
AttributeError: module 'cs' has no attribute 'Colorscheme'

Here is my Python version:

[myname@fedora P3]$ python --version
Python 3.9.13


问:
How can I listen for click on map if popup is not open with Mapbox?
I have a pretty well functioning Map component that does what I need it to do but with one small issue.

I'm listening for click events on the map. So if you click anywhere on the map, there is an fetch call. Well, I don't want them to happen when a Popup is open.

Unfortunately, I can't seem to figure out how to prevent that.

Have pretty much all of the code as follows:

Map.vue

```<code><template>
    <AVPage>
        <div style="height: 85vh">
            <MapboxMap
                style="height: 100%"
                :accessToken="mapboxToken"
                :mapStyle="mapboxStyle"
                @mb-click="map.getGeocodeData($event)"
                @mb-created="
                    (instance) => map.setInstance(instance, mapboxToken)
                "
            >
                <MapboxGeolocateControl position="bottom-right" />
                <MapboxMarker
                    v-for="(result, index) in map?.locations"
                    :lng-lat="[result.location[0], result.location[1]]"
                    :key="index"
                    popup
                    icon="bar"
                >
                    <template v-slot:popup>
                        <LocationCard :location="result" :map="map" />
                    </template>
                </MapboxMarker>
                <MapboxNavigationControl position="bottom-right" />
                <MapboxPopup
                    v-if="Object.keys(map.poi).length"
                    :lng-lat="[
                        map.poi.geometry.location.lng,
                        map.poi.geometry.location.lat
                    ]"
                    @mb-open="() => map.popupOpen = true"
                    @mb-close="map.clearPoi()"
                >
                    <LocationCard :location="map.poi" :map="map" />
                </MapboxPopup>
            </MapboxMap>
        </div>
    </AVPage>
</template>

<script setup>
import { ref, computed } from "vue"
import "@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css"
import "mapbox-gl/dist/mapbox-gl.css"
import {
    MapboxMap,
    MapboxMarker,
    MapboxPopup,
    MapboxNavigationControl,
    MapboxGeolocateControl
} from "@studiometa/vue-mapbox-gl"
import LocationCard from "./components/LocationCard.vue"
import Map from "src/pinia/models/Map.js"

const map = ref(new Map(0, 0))

const mapboxToken = computed(() => process.env.MAPBOX_TOKEN)
const mapboxStyle = computed(() => process.env.MAPBOX_STYLE)
</script>

<style lang="scss">
.mapboxgl-popup-content {
    border-radius: 5px;
    overflow: hidden;
}
</style>

</code>```

Map.js

```<code>import { api } from "src/boot/axios.js"
import { buildQueryString } from "src/helpers.js"
import Model from "./Model"

class Map extends Model {
    instance = null
    token = null

    lat = null
    lng = null

    locations = []
    poi = {}

    fetching = true
    popupOpen = false

    constructor(lat, lng) {
        super()

        this.lat = lat
        this.lng = lng
    }

    clearPoi() {
        this.poi = {}
    }

    setInstance(instance, token) {
        this.instance = instance
        this.token = token
        navigator.geolocation.getCurrentPosition(
            (data) => this.successCallback(data),
            (error) => this.errorCallback(error)
        )
    }

    async getLocations() {
        const { data } = await api.get(
            `/pet-places?lat=${this.lat}&lng=${this.lng}`
        )

        data.data.forEach((item) => {
            this.locations.push(item)
        })

        this.instance.flyTo({
            center: [this.lng, this.lat],
            zoom: 15
        })

        this.fetching = false
    }

    async postRating(lat, lng, name, rating) {
        const { data } = await api.post("/pet-places", {
            lat,
            lng,
            name,
            rating
        })

        data.data.forEach((location) => {
            this.locations.push(location)
        })
    }

    async successCallback({ coords }) {
        const { latitude, longitude } = coords
        this.lat = latitude
        this.lng = longitude

        this.getLocations()
    }

    errorCallback(err) {
        console.log("error", err)
    }

    async getGeocodeData(e) {
        if (this.fetching || Object?.keys(this?.poi)?.length) return

        try {
            this.fetching = true
            const { lngLat, originalEvent } = e

            if (originalEvent.target.tagName !== "CANVAS") {
                return
            } else {
                if (this.popupOpen) {
                    this.popupOpen = false
                    return
                }
            }

            const { lng, lat } = lngLat

            const queryString = {
                access_token: this.token,
                type: "poi"
            }

            const response = await fetch(
                `https://api.mapbox.com/geocoding/v5/mapbox.places/${lng},${lat}.json${buildQueryString(
                    queryString
                )}`,
                { method: "GET" }
            )

            const results = await response.json()

            const { features } = results

            const poi = features.find(
                (feature) =>
                    feature.id.includes("poi") || feature.id.includes("address")
            )

            if (!poi) {
                return
            }

            const { data } = await api.get(
                `/location/places?coordinates=${lat},${lng}`
            )
            const { results: locations } = data.data

            this.poi = locations[0] ?? {}
        } finally {
            this.fetching = false
        }
    }
}

export default Map

</code>```

EDIT: Got it to work, but I feel that it isn't the best way...

Add a boolean that 'watches' for the state of popup on the page.
If it is true, and the click was on the canvas, then don't perform the API request.

Body:
I have a pretty well functioning Map component that does what I need it to do but with one small issue.

I'm listening for click events on the map. So if you click anywhere on the map, there is an fetch call. Well, I don't want them to happen when a Popup is open.

Unfortunately, I can't seem to figure out how to prevent that.

Have pretty much all of the code as follows:

Map.vue

<template>
    <AVPage>

            <MapboxMap
                style="height: 100%"
                :accessToken="mapboxToken"
                :mapStyle="mapboxStyle"
                @mb-click="map.getGeocodeData($event)"
                @mb-created="
                    (instance) => map.setInstance(instance, mapboxToken)
                "
            >
                <MapboxGeolocateControl position="bottom-right" />
                <MapboxMarker
                    v-for="(result, index) in map?.locations"
                    :lng-lat="[result.location[0], result.location[1]]"
                    :key="index"
                    popup
                    icon="bar"
                >
                    <template v-slot:popup>
                        <LocationCard :location="result" :map="map" />
                    </template>
                </MapboxMarker>
                <MapboxNavigationControl position="bottom-right" />
                <MapboxPopup
                    v-if="Object.keys(map.poi).length"
                    :lng-lat="[
                        map.poi.geometry.location.lng,
                        map.poi.geometry.location.lat
                    ]"
                    @mb-open="() => map.popupOpen = true"
                    @mb-close="map.clearPoi()"
                >
                    <LocationCard :location="map.poi" :map="map" />
                </MapboxPopup>
            </MapboxMap>

    </AVPage>
</template>

Map.js

import { api } from "src/boot/axios.js"
import { buildQueryString } from "src/helpers.js"
import Model from "./Model"

class Map extends Model {
    instance = null
    token = null

    lat = null
    lng = null

    locations = []
    poi = {}

    fetching = true
    popupOpen = false

    constructor(lat, lng) {
        super()

        this.lat = lat
        this.lng = lng
    }

    clearPoi() {
        this.poi = {}
    }

    setInstance(instance, token) {
        this.instance = instance
        this.token = token
        navigator.geolocation.getCurrentPosition(
            (data) => this.successCallback(data),
            (error) => this.errorCallback(error)
        )
    }

    async getLocations() {
        const { data } = await api.get(
            `/pet-places?lat=${this.lat}&lng=${this.lng}`
        )

        data.data.forEach((item) => {
            this.locations.push(item)
        })

        this.instance.flyTo({
            center: [this.lng, this.lat],
            zoom: 15
        })

        this.fetching = false
    }

    async postRating(lat, lng, name, rating) {
        const { data } = await api.post("/pet-places", {
            lat,
            lng,
            name,
            rating
        })

        data.data.forEach((location) => {
            this.locations.push(location)
        })
    }

    async successCallback({ coords }) {
        const { latitude, longitude } = coords
        this.lat = latitude
        this.lng = longitude

        this.getLocations()
    }

    errorCallback(err) {
        console.log("error", err)
    }

    async getGeocodeData(e) {
        if (this.fetching || Object?.keys(this?.poi)?.length) return

        try {
            this.fetching = true
            const { lngLat, originalEvent } = e

            if (originalEvent.target.tagName !== "CANVAS") {
                return
            } else {
                if (this.popupOpen) {
                    this.popupOpen = false
                    return
                }
            }

            const { lng, lat } = lngLat

            const queryString = {
                access_token: this.token,
                type: "poi"
            }

            const response = await fetch(
                `https://api.mapbox.com/geocoding/v5/mapbox.places/${lng},${lat}.json${buildQueryString(
                    queryString
                )}`,
                { method: "GET" }
            )

            const results = await response.json()

            const { features } = results

            const poi = features.find(
                (feature) =>
                    feature.id.includes("poi") || feature.id.includes("address")
            )

            if (!poi) {
                return
            }

            const { data } = await api.get(
                `/location/places?coordinates=${lat},${lng}`
            )
            const { results: locations } = data.data

            this.poi = locations[0] ?? {}
        } finally {
            this.fetching = false
        }
    }
}

export default Map

EDIT: Got it to work, but I feel that it isn't the best way...

Add a boolean that 'watches' for the state of popup on the page.
If it is true, and the click was on the canvas, then don't perform the API request.


问:
Wordpress / WooCommerce SEMRush Crawl Warning: Resources are formatted as page link
When adding an image to a WooCommerce Product, by default it creates a link that SEMRush flags up as a crawl issue, despite this being a default of WordPress.

"We detected that some links to resources are formatted with  HTML element. An  tag with a href attribute is used to link to other webpages and must only contain a page URL. Search engines will crawl your site from page to page by following these HTML page links. When following a page link that contains a resource, for example, an image, the returned page will not contain anything except an image. This may confuse search engines and will indicate that your site has poor architecture."

Their suggestions is this, but of course WP does this by default:

Review your links. Replace  links with tags necessary for specific resources. For example, if you’d like to add an image, use an  tag with an alt attribute describing the contents of your image.

Have you experienced this and if so, how did you get around it?

I have researched the problem and found only a few mentions of this, one suggests an edit of the functions.php file which I did try but it's not worked. Additionally the use of a code snippet, which again has not worked.


问:
Python Session and Cookies
Hello dear Stack users,

I am trying to login to a webservice via json exchange and trying to implement the auth mechanism as you can see here

```<code>import requests
class Testauth(requests.auth.AuthBase):
    """Implements a custom authentication scheme."""

    def __init__(self, email, passwd):
        loginjson = {"Data":{"EMAIL":email,"PASSWORD":passwd}}
        req = requests.post('https://httpbin.org/post', json=loginjson)
        self.token = self.token = req.json()['data'] #orig service has : ['Data'][0]['SESSION_ID']

    def __call__(self, r):
        """Attach an API token to a custom auth header."""
        r.prepare_cookies({'SESSION_ID' : f'{self.token}'})  # Python 3.6+
        return r

curSession = requests.Session()
curSession.auth=Testauth('email','pass')
page = curSession.get('https://httpbin.org/get')
print(curSession.cookies)
print(page.content.decode('utf-8'))
</code>```

My expectation was that since it did authentication while accessing the /get (with the auth method) curSession  should contain cookies

But checking cursession.cookies shows none, only the request contains cookies.

Here shows that session should persist cookies between requests but it does not, where am I doing wrong in here

Tl;Dr:

When using sessions, implementing custom auth doesnt persist cookie in
auth, gets new auth cookie everytime

Title: Python Session and Cookies

Body:
Hello dear Stack users,

I am trying to login to a webservice via json exchange and trying to implement the auth mechanism as you can see here

import requests
class Testauth(requests.auth.AuthBase):
    """Implements a custom authentication scheme."""

    def __init__(self, email, passwd):
        loginjson = {"Data":{"EMAIL":email,"PASSWORD":passwd}}
        req = requests.post('https://httpbin.org/post', json=loginjson)
        self.token = self.token = req.json()['data'] #orig service has : ['Data'][0]['SESSION_ID']

    def __call__(self, r):
        """Attach an API token to a custom auth header."""
        r.prepare_cookies({'SESSION_ID' : f'{self.token}'})  # Python 3.6+
        return r

curSession = requests.Session()
curSession.auth=Testauth('email','pass')
page = curSession.get('https://httpbin.org/get')
print(curSession.cookies)
print(page.content.decode('utf-8'))

My expectation was that since it did authentication while accessing the /get (with the auth method) curSession  should contain cookies

But checking cursession.cookies shows none, only the request contains cookies.

Here shows that session should persist cookies between requests but it does not, where am I doing wrong in here

Tl;Dr:

When using sessions, implementing custom auth doesnt persist cookie in
auth, gets new auth cookie everytime


问:
when navigation pop, `react-native-gesture-handler` touchableopacity in previous screen touchable in android but ios not, why?
Stack pop, convert current screen to previous screen with animation, use navigation.goBack(),

react-native-gesture-handlers touchableopacity in previous screen touchable before current screen unmount in android, but ios no touchable until unmount current screen.

why different?

anything possible touchable in ios before unmount current screen?, help

enter image description here

Home.tsx

import {useNavigation} from '@react-navigation/native';
import React, {useEffect} from 'react';
import {StyleSheet, Text, View} from 'react-native';
import {TouchableHighlight, TouchableWithoutFeedback} from 'react-native-gesture-handler';

const Home = () => {
  const navigation = useNavigation();
  const goUpper = () => {
    console.log('goupper click');
    navigation.navigate('upper');
  };

  return (
    <View style={styles.container}>
      <TouchableWithoutFeedback onPress={() => console.log('clickable')}>
        <Text>Home</Text>
        <TouchableHighlight onPress={goUpper}>
          <Text>goUpper</Text>
        </TouchableHighlight>
      </TouchableWithoutFeedback>
    </View>
  );
};

export default Home;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

```
<p><strong>Upper.tsx</strong></p>
<pre class="lang-js prettyprint-override"><code>import React, { useEffect } from 'react';
import {StyleSheet, View, Text, Button} from 'react-native';
import {useNavigation} from '@react-navigation/native';

const Upper = () => {
  const navigation = useNavigation();
  const goBack = () => {
    console.log('back click');
    navigation.goBack();
  };

  useEffect(() => {
    console.log('upper render');
    return () => console.log('upper unmount');
  }, []);

  return (
    <View style={styles.container}>
      <Text>Upper</Text>
      <Button onPress={goBack} title="goBack" />
    </View>
  );
};

export default Upper;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

</code>```

Navigator.tsx

import React from 'react';
import {createStackNavigator, CardStyleInterpolators} from '@react-navigation/stack';
import {Home, Upper} from './views';

type RootStackParamList = {
  home: undefined;
  upper: undefined;
};
const Stack = createStackNavigator<RootStackParamList>();

function MyStack() {
  return (
    <Stack.Navigator
      screenOptions={{
        cardStyleInterpolator: CardStyleInterpolators.forModalPresentationIOS,
      }}>
      <Stack.Screen name="home" component={Home} />
      <Stack.Screen name="upper" component={Upper} />
    </Stack.Navigator>
  );
}

export default MyStack;
```

ios - not work / android - work

Body:
Stack pop, convert current screen to previous screen with animation, use navigation.goBack(),

react-native-gesture-handlers touchableopacity in previous screen touchable before current screen unmount in android, but ios no touchable until unmount current screen.

why different?

anything possible touchable in ios before unmount current screen?, help

enter image description here

Home.tsx

import {useNavigation} from '@react-navigation/native';
import React, {useEffect} from 'react';
import {StyleSheet, Text, View} from 'react-native';
import {TouchableHighlight, TouchableWithoutFeedback} from 'react-native-gesture-handler';

const Home = () => {
  const navigation = useNavigation();
  const goUpper = () => {
    console.log('goupper click');
    navigation.navigate('upper');
  };

  return (
    <View style={styles.container}>
      <TouchableWithoutFeedback onPress={() => console.log('clickable')}>
        <Text>Home</Text>
        <TouchableHighlight onPress={goUpper}>
          <Text>goUpper</Text>
        </TouchableHighlight>
      </TouchableWithoutFeedback>
    </View>
  );
};

export default Home;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Upper.tsx

import React, { useEffect } from 'react';
import {StyleSheet, View, Text, Button} from 'react-native';
import {useNavigation} from '@react-navigation/native';

const Upper = () => {
  const navigation = useNavigation();
  const goBack = () => {
    console.log('back click');
    navigation.goBack();
  };

  useEffect(() => {
    console.log('upper render');
    return () => console.log('upper unmount');
  }, []);

  return (
    <View style={styles.container}>
      <Text>Upper</Text>
      <Button onPress={goBack} title="goBack" />
    </View>
  );
};

export default Upper;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Navigator.tsx

import React from 'react';
import {createStackNavigator, CardStyleInterpolators} from '@react-navigation/stack';
import {Home, Upper} from './views';

type RootStackParamList = {
  home: undefined;
  upper: undefined;
};
const Stack = createStackNavigator<RootStackParamList>();

function MyStack() {
  return (
    <Stack.Navigator
      screenOptions={{
        cardStyleInterpolator: CardStyleInterpolators.forModalPresentationIOS,
      }}>
      <Stack.Screen name="home" component={Home} />
      <Stack.Screen name="upper" component={Upper} />
    </Stack.Navigator>
  );
}

export default MyStack;

ios - not work / android - work


问:
issue with Next.js 13 <Link> function
I'm making a small news blog app with next.js 13 when i'm using  in any section i'm getting an error like "Cannot read properties of undefined (reading 'call')"

I'm adding the code section below

```<code>function Navlink({category}: Props) {
  return (
      <div>
        <Link
             href={`/${category}`}
            className=""
        >
                {category}
        </Link>
    </div>
  )
}
</code>```

and the error (https://i.stack.imgur.com/Pf9Rp.jpg)

it's a simple  tag and didn't get any issues with next.js 12 version

Title: issue with Next.js 13 <Link> function

Body:
I'm making a small news blog app with next.js 13 when i'm using  in any section i'm getting an error like "Cannot read properties of undefined (reading 'call')"

I'm adding the code section below

function Navlink({category}: Props) {
  return (

        <Link
             href={`/${category}`}
            className=""
        >
                {category}
        </Link>

  )
}

and the error (https://i.stack.imgur.com/Pf9Rp.jpg)

it's a simple  tag and didn't get any issues with next.js 12 version


问:
Redshift SELECT query returns error ActiveStatementsExceededException: Active statements exceeded the allowed quota
I need to query some data from Redshift in my aws lambda code and I do it several times with different parameters, pretty soon I get the error:

ActiveStatementsExceededException: Active statements exceeded the allowed quota (200).

How can I send thousands of queries to Redshift without hitting a limit?

Here is my JS code:

```<code>...

let results = await redshiftQuery(connectionInfo, "SELECT * from db.games where game_id=:game_id", {game_id: 12345})

...

async function redshiftQuery(conInfo, query, params = {}) {
    let rsParams = []
    for(let key in params) {
        rsParams.push( { name: key, value: params[key].toString() })
    }

    const executeStatementInput = {
        ClusterIdentifier: conInfo.clusterId,
        Database: conInfo.database,
        SecretArn: conInfo.secret,
        WithEvent: false,
        Sql: query
    }

    if(rsParams.length) {
        executeStatementInput.Parameters = rsParams
    }

    let results = []
    try {
        let exResponse = await redshiftDataApiClient.executeStatement(executeStatementInput).promise()
        if(!exResponse.Id) return results
        let describeStatementInfo = null
        while(true) {
            let { Status: queryStatus, ...rest } = await redshiftDataApiClient.describeStatement({ Id: exResponse.Id }).promise()
            describeStatementInfo = rest
            if(["FAILED", "FINISHED"].includes(queryStatus)) {
                break
            }
            await sleepMillis(200)
        }
        if (describeStatementInfo && describeStatementInfo.HasResultSet) {
            let result = await redshiftDataApiClient.getStatementResult({ Id: exResponse.Id }).promise()
            convertResult(result, results)
            while(result.NextToken) {
                result = await redshiftDataApiClient.getStatementResult({ Id: exResponse.Id, NextToken: result.NextToken }).promise()
                convertResult(result, results)
            }
        }
    } catch (e) {
        console.error("Redshift Error", e)
    }
    return results
}
</code>```

Body:
I need to query some data from Redshift in my aws lambda code and I do it several times with different parameters, pretty soon I get the error:

ActiveStatementsExceededException: Active statements exceeded the allowed quota (200).

How can I send thousands of queries to Redshift without hitting a limit?

Here is my JS code:

...

let results = await redshiftQuery(connectionInfo, "SELECT * from db.games where game_id=:game_id", {game_id: 12345})

...

async function redshiftQuery(conInfo, query, params = {}) {
    let rsParams = []
    for(let key in params) {
        rsParams.push( { name: key, value: params[key].toString() })
    }

    const executeStatementInput = {
        ClusterIdentifier: conInfo.clusterId,
        Database: conInfo.database,
        SecretArn: conInfo.secret,
        WithEvent: false,
        Sql: query
    }

    if(rsParams.length) {
        executeStatementInput.Parameters = rsParams
    }

    let results = []
    try {
        let exResponse = await redshiftDataApiClient.executeStatement(executeStatementInput).promise()
        if(!exResponse.Id) return results
        let describeStatementInfo = null
        while(true) {
            let { Status: queryStatus, ...rest } = await redshiftDataApiClient.describeStatement({ Id: exResponse.Id }).promise()
            describeStatementInfo = rest
            if(["FAILED", "FINISHED"].includes(queryStatus)) {
                break
            }
            await sleepMillis(200)
        }
        if (describeStatementInfo && describeStatementInfo.HasResultSet) {
            let result = await redshiftDataApiClient.getStatementResult({ Id: exResponse.Id }).promise()
            convertResult(result, results)
            while(result.NextToken) {
                result = await redshiftDataApiClient.getStatementResult({ Id: exResponse.Id, NextToken: result.NextToken }).promise()
                convertResult(result, results)
            }
        }
    } catch (e) {
        console.error("Redshift Error", e)
    }
    return results
}


问:
jsonb_set not working as expected with nested collections, resulting in null value returned
I am trying to update a nested collection in my Postgres table using json_set, however, my approach is resulting in a collection of null values.

id
payload
row_version

fbfd3b9d-bb20-4c1b-985f-0979890472ec
{  "slots": [    {      "bannerXCreatorSettings": {        "additionalFields": [          {            "label": "test-label",            "enabled": true,            "mandatory": false,            "additionalFieldId": "label",            "maxCharacterLimit": 22,            "additionalFieldType": "TEXT",            "colorHexOptionsList": []          },          {            "label": "test-label-2",            "enabled": true,            "mandatory": false,            "additionalFieldId": "label2",            "maxCharacterLimit": 55,            "additionalFieldType": "TEXT",            "colorHexOptionsList": []          }        ]      }    }  ]}
1

I have the following json payload stored in my table:

{
  "slots": [
    {
      "bannerXCreatorSettings": {
        "additionalFields": [
          {
            "label": "test-label",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label",
            "maxCharacterLimit": 22,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": []
          },
          {
            "label": "test-label-2",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label2",
            "maxCharacterLimit": 55,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": []
          }
        ]
      }
    }
  ]
}

```
<p>Within the <code>additionalFields</code> collections, I want to add <code>selectOptions</code>. Like this:</p>
<pre class="lang-json prettyprint-override"><code>{
  "slots": [
    {
      "bannerXCreatorSettings": {
        "additionalFields": [
          {
            "label": "test-label",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label",
            "maxCharacterLimit": 22,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": [],
            "selectOptions": [] <-- new field
          },
          {
            "label": "test-label-2",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label2",
            "maxCharacterLimit": 55,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": [],
            "selectOptions": [] <-- new field
          }
        ]
      }
    }
  ]
}

</code>```

I have written the following SQL to try update the JSON payload within my table:

select
    id,
    payload,
    row_version,
    jsonb_set(
        payload,
        '{slots}',
        (select
            jsonb_agg(
                jsonb_set(
                    slot_elem,
                     '{bannerXCreatorSettings}',
                    jsonb_set(
                        slot_elem -> 'bannerXCreatorSettings',
                        '{additionalFields}',
                        (
                           select
                              jsonb_agg(
                                jsonb_set(
                                   field_element,
                                   '{selectOptions}',
                                      jsonb_build_array()))
                                    from jsonb_array_elements(
                                        slot_elem -> '{bannerXCreatorSettings}' #>'{additionalFields}') WITH ORDINALITY a_t(field_element, idx_1))
                                    )
                            )
                        )
                        FROM
                            jsonb_array_elements(
                                payload #> '{slots}') WITH ORDINALITY t(slot_elem, idx))) as payload_update
```
<p>My understanding of SQL is limited, however, I feel as though this should work. Unfortunally the above query results in the following:</p>
<pre class="lang-json prettyprint-override"><code>{
  "slots": [
    null,
    null
  ]
}
</code>```

Body:
I am trying to update a nested collection in my Postgres table using json_set, however, my approach is resulting in a collection of null values.

id
payload
row_version

fbfd3b9d-bb20-4c1b-985f-0979890472ec
{  "slots": [    {      "bannerXCreatorSettings": {        "additionalFields": [          {            "label": "test-label",            "enabled": true,            "mandatory": false,            "additionalFieldId": "label",            "maxCharacterLimit": 22,            "additionalFieldType": "TEXT",            "colorHexOptionsList": []          },          {            "label": "test-label-2",            "enabled": true,            "mandatory": false,            "additionalFieldId": "label2",            "maxCharacterLimit": 55,            "additionalFieldType": "TEXT",            "colorHexOptionsList": []          }        ]      }    }  ]}
1

I have the following json payload stored in my table:

{
  "slots": [
    {
      "bannerXCreatorSettings": {
        "additionalFields": [
          {
            "label": "test-label",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label",
            "maxCharacterLimit": 22,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": []
          },
          {
            "label": "test-label-2",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label2",
            "maxCharacterLimit": 55,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": []
          }
        ]
      }
    }
  ]
}

Within the additionalFields collections, I want to add selectOptions. Like this:

{
  "slots": [
    {
      "bannerXCreatorSettings": {
        "additionalFields": [
          {
            "label": "test-label",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label",
            "maxCharacterLimit": 22,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": [],
            "selectOptions": [] <-- new field
          },
          {
            "label": "test-label-2",
            "enabled": true,
            "mandatory": false,
            "additionalFieldId": "label2",
            "maxCharacterLimit": 55,
            "additionalFieldType": "TEXT",
            "colorHexOptionsList": [],
            "selectOptions": [] <-- new field
          }
        ]
      }
    }
  ]
}

I have written the following SQL to try update the JSON payload within my table:

select
    id,
    payload,
    row_version,
    jsonb_set(
        payload,
        '{slots}',
        (select
            jsonb_agg(
                jsonb_set(
                    slot_elem,
                     '{bannerXCreatorSettings}',
                    jsonb_set(
                        slot_elem -> 'bannerXCreatorSettings',
                        '{additionalFields}',
                        (
                           select
                              jsonb_agg(
                                jsonb_set(
                                   field_element,
                                   '{selectOptions}',
                                      jsonb_build_array()))
                                    from jsonb_array_elements(
                                        slot_elem -> '{bannerXCreatorSettings}' #>'{additionalFields}') WITH ORDINALITY a_t(field_element, idx_1))
                                    )
                            )
                        )
                        FROM
                            jsonb_array_elements(
                                payload #> '{slots}') WITH ORDINALITY t(slot_elem, idx))) as payload_update

My understanding of SQL is limited, however, I feel as though this should work. Unfortunally the above query results in the following:

{
  "slots": [
    null,
    null
  ]
}


问:
Spring Security: OAuth2AuthorizationRequest is null
I'm using Keycloak as the authorization server

Trying to create an authorization endpoint, and redirect that endpoint to the user

Snippet of SecurityConfig.class

```<code>@Override
protected void configure( HttpSecurity http ) throws Exception {
    http.authorizeRequests()
            .antMatchers("/login").permitAll()
            .anyRequest().authenticated()
            .and()
            .oauth2Login()
            .authorizationEndpoint()
            .authorizationRequestResolver(
                    new CustomAuthorizationRequestResolver(
                            clientRegistrationRepository,
                            "/oauth2/authorization/"
                    )
            );
}
</code>```

CustomAuthorizationRequestResolver.class

```<code>public class CustomAuthorizationRequestResolver implements OAuth2AuthorizationRequestResolver {

    private OAuth2AuthorizationRequestResolver defaultResolver;
    private final StringKeyGenerator secureKeyGenerator =
            new Base64StringKeyGenerator(Base64.getUrlEncoder().withoutPadding(), 96);

    public CustomAuthorizationRequestResolver(ClientRegistrationRepository repo, String authorizationRequestBaseUri) {
        defaultResolver = new DefaultOAuth2AuthorizationRequestResolver(repo, authorizationRequestBaseUri);
    }

    @Override
    public OAuth2AuthorizationRequest resolve(HttpServletRequest servletRequest) {
        OAuth2AuthorizationRequest req = defaultResolver.resolve(servletRequest);
        log.info("OAuth2AuthorizationRequest: "+req);
        return customizeAuthorizationRequest(req);
    }

    @Override
    public OAuth2AuthorizationRequest resolve(HttpServletRequest servletRequest, String clientRegistrationId) {
        OAuth2AuthorizationRequest req = defaultResolver.resolve(servletRequest, clientRegistrationId);
        return customizeAuthorizationRequest(req);
    }

    private OAuth2AuthorizationRequest customizeAuthorizationRequest(OAuth2AuthorizationRequest req) {
        if (req == null) { return null; }

        Map<String, Object> attributes = new HashMap<>(req.getAttributes());
        Map<String, Object> additionalParameters = new HashMap<>(req.getAdditionalParameters());
        addPkceParameters(attributes, additionalParameters);
        return OAuth2AuthorizationRequest.from(req)
                .attributes(attributes)
                .additionalParameters(additionalParameters)
                .build();
    }
</code>```

From this class, in the method resolve, defaultResolver.resolve returns as null

@Override
public OAuth2AuthorizationRequest resolve(HttpServletRequest servletRequest) {
OAuth2AuthorizationRequest req = defaultResolver.resolve(servletRequest);
log.info("OAuth2AuthorizationRequest: "+req);
return customizeAuthorizationRequest(req);
}

Not sure why?
Maybe it has to do with authorizationRequestBaseUri

I'm not sure what exactly this authorizationRequestBaseUri indicates
Here you can see, I'm initializing it as "/oauth2/authorization/", I also tried "/oauth2/authorization/test-id", where test-id is the client registration id

Can anyone help me where I'm wrong

Body:
I'm using Keycloak as the authorization server

Trying to create an authorization endpoint, and redirect that endpoint to the user

Snippet of SecurityConfig.class

@Override
protected void configure( HttpSecurity http ) throws Exception {
    http.authorizeRequests()
            .antMatchers("/login").permitAll()
            .anyRequest().authenticated()
            .and()
            .oauth2Login()
            .authorizationEndpoint()
            .authorizationRequestResolver(
                    new CustomAuthorizationRequestResolver(
                            clientRegistrationRepository,
                            "/oauth2/authorization/"
                    )
            );
}

CustomAuthorizationRequestResolver.class

public class CustomAuthorizationRequestResolver implements OAuth2AuthorizationRequestResolver {

    private OAuth2AuthorizationRequestResolver defaultResolver;
    private final StringKeyGenerator secureKeyGenerator =
            new Base64StringKeyGenerator(Base64.getUrlEncoder().withoutPadding(), 96);

    public CustomAuthorizationRequestResolver(ClientRegistrationRepository repo, String authorizationRequestBaseUri) {
        defaultResolver = new DefaultOAuth2AuthorizationRequestResolver(repo, authorizationRequestBaseUri);
    }

    @Override
    public OAuth2AuthorizationRequest resolve(HttpServletRequest servletRequest) {
        OAuth2AuthorizationRequest req = defaultResolver.resolve(servletRequest);
        log.info("OAuth2AuthorizationRequest: "+req);
        return customizeAuthorizationRequest(req);
    }

    @Override
    public OAuth2AuthorizationRequest resolve(HttpServletRequest servletRequest, String clientRegistrationId) {
        OAuth2AuthorizationRequest req = defaultResolver.resolve(servletRequest, clientRegistrationId);
        return customizeAuthorizationRequest(req);
    }

    private OAuth2AuthorizationRequest customizeAuthorizationRequest(OAuth2AuthorizationRequest req) {
        if (req == null) { return null; }

        Map<String, Object> attributes = new HashMap<>(req.getAttributes());
        Map<String, Object> additionalParameters = new HashMap<>(req.getAdditionalParameters());
        addPkceParameters(attributes, additionalParameters);
        return OAuth2AuthorizationRequest.from(req)
                .attributes(attributes)
                .additionalParameters(additionalParameters)
                .build();
    }

From this class, in the method resolve, defaultResolver.resolve returns as null

@Override
public OAuth2AuthorizationRequest resolve(HttpServletRequest servletRequest) {
OAuth2AuthorizationRequest req = defaultResolver.resolve(servletRequest);
log.info("OAuth2AuthorizationRequest: "+req);
return customizeAuthorizationRequest(req);
}

Not sure why?
Maybe it has to do with authorizationRequestBaseUri

I'm not sure what exactly this authorizationRequestBaseUri indicates
Here you can see, I'm initializing it as "/oauth2/authorization/", I also tried "/oauth2/authorization/test-id", where test-id is the client registration id

Can anyone help me where I'm wrong


问:
How to prevent outside JavaScript event handlers from being triggered from a Shadow DOM?
I am trying to create a Chrome extension that is toggled via keyboard shortcut. The keyboard shortcut brings up a ShadowDOM that contains a search bar (similar to spotlight search). The problem I am getting is some key presses (e.g. the key 's' on GitHub) will trigger a javascript action on the native webpage (in this case, selecting GitHub's own search bar).

Does anyone know of a way to disable outside JavaScript events, and/or a way to do this via Chrome Extension?


问:
How do I integrate a Telegram GitHub (t.me/GitHubBot) bot with Telegram channels to get repository commit notifications?
I tried to do it with integrately.com but this website can't integrate bot with channel or Maybe I can't. Searched in google and find this video

But it sends only private and group messages.

How Can I create bot like t.me/GitHubBot but working with channels?


问:
How to test with Google Sign In for local development?
I'm using Google's Java Client for server-side JWT authentication, along with their HTML snippet for the frontend. I'd like to do some testing locally to make sure my user flow works - but I'm not able to get my JWT from the frontend sign-in steps.

https://developers.google.com/identity/gsi/web/guides/display-button

I've entered my correct client ID, but I think it's upset that I used localhost:3000/login as the redirect route. Does anyone know how to set this up for local development?

[GSI_LOGGER]: The given origin is not allowed for the given client ID.

I tried to fetch my actual JWT using the Google Sign In HTML snippet. I expected this to work fine, since it's my actual google account and a legitimate client ID.


问:
How would I be able to assign a variable to itself plus a certain number in replit python
I want to set a variable to itself by clicking enter, and I have most of that code down. I can't understand why I can't set a variable to itself plus 1.

I tried doing this script:

```<code>score = score + 1
</code>```

It just gave me this error

```<code>Traceback (most recent call last):
  File "main.py", line 72, in <module>
    cmdRun()
  File "main.py", line 67, in cmdRun
    score = score + 1
UnboundLocalError: local variable 'score' referenced before assignment
</code>```

Body:
I want to set a variable to itself by clicking enter, and I have most of that code down. I can't understand why I can't set a variable to itself plus 1.

I tried doing this script:

score = score + 1

It just gave me this error

Traceback (most recent call last):
  File "main.py", line 72, in <module>
    cmdRun()
  File "main.py", line 67, in cmdRun
    score = score + 1
UnboundLocalError: local variable 'score' referenced before assignment


问:
Flink SQL not rolling iceberg files to hdfs while flink sql streaming job running
I am working in project using flink and iceberg to write data from kafka to iceberg hive table or hdfs using hadoop catalog when i publish message to kafka i can see message in kafka table but there is no file added in hdfs or row added in hive table
files added only if i canceled job i can see files in hdfs. what is reason ?                 why i can not see one file per kafka message in hdfs ? also i can not see data in sink table(flink_iceberg_tbl3).

************************* code i used below ********************************

```<code>CREATE CATALOG hadoop_iceberg WITH (
         'type'='iceberg',
         'catalog-type'='hadoop',
         'warehouse'='hdfs://localhost:9000/flink_iceberg_warehouse'
);

create table hadoop_iceberg.iceberg_db.flink_iceberg_tbl3
(id int
,name string
,age int
,loc string
) partitioned by(loc);

create table kafka_input_table(
                 id int,
                 name varchar,
                 age int,
                loc varchar
                ) with (
                'connector' = 'kafka',
                'topic' = 'test_topic',
                 'properties.bootstrap.servers'='localhost:9092',
                 'scan.startup.mode'='latest-offset',
                'properties.group.id' = 'my-group-id',
                 'format' = 'csv'
                 );

ALTER TABLE kafka_input_table SET ('scan.startup.mode'='earliest-offset');

set table.dynamic-table-options.enabled = true

insert into hadoop_iceberg.iceberg_db.flink_iceberg_tbl3 select id,name,age,loc from kafka_input_table

select * from hadoop_iceberg.iceberg_db.flink_iceberg_tbl3 /*+ OPTIONS('streaming'='true', 'monitor-interval'='1s')*/

</code>```

i tried with many blogs but same issue

Body:
I am working in project using flink and iceberg to write data from kafka to iceberg hive table or hdfs using hadoop catalog when i publish message to kafka i can see message in kafka table but there is no file added in hdfs or row added in hive table
files added only if i canceled job i can see files in hdfs. what is reason ?                 why i can not see one file per kafka message in hdfs ? also i can not see data in sink table(flink_iceberg_tbl3).

************************* code i used below ********************************

CREATE CATALOG hadoop_iceberg WITH (
         'type'='iceberg',
         'catalog-type'='hadoop',
         'warehouse'='hdfs://localhost:9000/flink_iceberg_warehouse'
);

create table hadoop_iceberg.iceberg_db.flink_iceberg_tbl3
(id int
,name string
,age int
,loc string
) partitioned by(loc);

create table kafka_input_table(
                 id int,
                 name varchar,
                 age int,
                loc varchar
                ) with (
                'connector' = 'kafka',
                'topic' = 'test_topic',
                 'properties.bootstrap.servers'='localhost:9092',
                 'scan.startup.mode'='latest-offset',
                'properties.group.id' = 'my-group-id',
                 'format' = 'csv'
                 );

ALTER TABLE kafka_input_table SET ('scan.startup.mode'='earliest-offset');

set table.dynamic-table-options.enabled = true

insert into hadoop_iceberg.iceberg_db.flink_iceberg_tbl3 select id,name,age,loc from kafka_input_table

select * from hadoop_iceberg.iceberg_db.flink_iceberg_tbl3 /*+ OPTIONS('streaming'='true', 'monitor-interval'='1s')*/

i tried with many blogs but same issue


问:
One Signal Notification Delivered but not receiving notification
I have set up one signal SDK in my application to receive push notifications , i have gone through the documentation and made everything , when i go on dashbord , i push a new notification , it says delivered but not receiving any notification , any reason why , thank you .

Init One Signal

```<code>   OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.INFO);
        OneSignal.initWithContext(this);
        OneSignal.setAppId(ONE_SIGNAL_ID);
</code>```

Body:
I have set up one signal SDK in my application to receive push notifications , i have gone through the documentation and made everything , when i go on dashbord , i push a new notification , it says delivered but not receiving any notification , any reason why , thank you .

Init One Signal

   OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.INFO);
        OneSignal.initWithContext(this);
        OneSignal.setAppId(ONE_SIGNAL_ID);


问:
How do I change the colours on my 3d categorical data plot?
I have categorical data on 3 axes (X1, X2, X3) in df mapping whether something is Y = "Red" or Y = "Green".

R 3d plot with categorical colors

```<code>> df
# A tibble: 6 x 7
  Obs.     X1    X2    X3 Y      dist    Y1
  <chr> <dbl> <dbl> <dbl> <chr> <dbl> <dbl>
1 1         0     3     0 R      3        0
2 2         2     0     0 R      2        0
3 3         0     1     3 R      3.16     0
4 4         0     1     2 G      2.24     1
5 5        -1     0     1 G      1.41     1
6 6         1     1     1 R      1.73     0
</code>```

I followed the procedure here, but I am getting a white spot (presumably when Y1 = 0). I would like to change the colours to red and green.

```<code>library(scatterplot3d)
s3d = with(df, scatterplot3d(X1, X2, X3, colour = as.numeric(Y1), pch = 19))
</code>```

Body:
I have categorical data on 3 axes (X1, X2, X3) in df mapping whether something is Y = "Red" or Y = "Green".

R 3d plot with categorical colors

> df
# A tibble: 6 x 7
  Obs.     X1    X2    X3 Y      dist    Y1
  <chr> <dbl> <dbl> <dbl> <chr> <dbl> <dbl>
1 1         0     3     0 R      3        0
2 2         2     0     0 R      2        0
3 3         0     1     3 R      3.16     0
4 4         0     1     2 G      2.24     1
5 5        -1     0     1 G      1.41     1
6 6         1     1     1 R      1.73     0

I followed the procedure here, but I am getting a white spot (presumably when Y1 = 0). I would like to change the colours to red and green.

library(scatterplot3d)
s3d = with(df, scatterplot3d(X1, X2, X3, colour = as.numeric(Y1), pch = 19))


问:
Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
I face the following problem after migration Spring Boot 2.5 => 2.7 => 3.0 (with Java 17.0.1)

When running the app within eclipse the application run failed:

Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer

I replaced the 'protected void configure' method with 'SecurityFilterChain web' method.
I have solved all errors and warnings by replacing javax with jakarta. I removed .m2 folder and then Update Maven Project. I can build the application with all modules without errors and warnings.

When I run the application, the following error message appears on the console:

`

```<code>java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:183) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:409) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:283) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:344) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:115) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:745) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:565) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.0.jar:3.0.0]
    at de.sqsoft.ep.EnterprisePortalApplication.main(EnterprisePortalApplication.java:82) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [de.sqsoft.ep.config.ConfigWebMVC] from ClassLoader [org.springframework.boot.devtools.restart.classloader.RestartClassLoader@5eae746c]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:360) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:417) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$1(AbstractAutowireCapableBeanFactory.java:749) ~[spring-beans-6.0.2.jar:6.0.2]
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:748) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:681) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:652) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1632) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:559) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:531) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:250) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:243) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:233) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:181) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:156) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    ... 22 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/handler/HandlerInterceptorAdapter
    at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[na:na]
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:467) ~[na:na]
    at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:121) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-6.0.2.jar:6.0.2]
    ... 38 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.handler.HandlerInterceptorAdapter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    ... 55 common frames omitted

[2m2022-12-21T01:20:43.213+01:00[0;39m [33m WARN[0;39m [35m16004[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [36mo.s.boot.SpringApplication              [0;39m [2m:[0;39m Unable to close ApplicationContext

java.lang.IllegalStateException: Failed to introspect Class [de.sqsoft.ep.config.ConfigWebMVC] from ClassLoader [org.springframework.boot.devtools.restart.classloader.RestartClassLoader@5eae746c]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:360) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:417) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$1(AbstractAutowireCapableBeanFactory.java:749) ~[spring-beans-6.0.2.jar:6.0.2]
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:748) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:681) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:652) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1632) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:559) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:531) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:658) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:650) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1276) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:863) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:851) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:838) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:778) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.0.jar:3.0.0]
    at de.sqsoft.ep.EnterprisePortalApplication.main(EnterprisePortalApplication.java:82) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/handler/HandlerInterceptorAdapter
    at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[na:na]
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:467) ~[na:na]
    at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:121) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-6.0.2.jar:6.0.2]
    ... 26 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.handler.HandlerInterceptorAdapter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    ... 43 common frames omitted

</code>```

`

Any hints to solve this problem?

Body:
I face the following problem after migration Spring Boot 2.5 => 2.7 => 3.0 (with Java 17.0.1)

When running the app within eclipse the application run failed:

Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer

I replaced the 'protected void configure' method with 'SecurityFilterChain web' method.
I have solved all errors and warnings by replacing javax with jakarta. I removed .m2 folder and then Update Maven Project. I can build the application with all modules without errors and warnings.

When I run the application, the following error message appears on the console:

`

java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:183) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:409) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:283) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:344) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:115) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:745) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:565) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.0.jar:3.0.0]
    at de.sqsoft.ep.EnterprisePortalApplication.main(EnterprisePortalApplication.java:82) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [de.sqsoft.ep.config.ConfigWebMVC] from ClassLoader [org.springframework.boot.devtools.restart.classloader.RestartClassLoader@5eae746c]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:360) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:417) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$1(AbstractAutowireCapableBeanFactory.java:749) ~[spring-beans-6.0.2.jar:6.0.2]
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:748) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:681) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:652) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1632) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:559) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:531) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:250) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:243) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:233) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:181) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:156) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-3.0.0.jar:3.0.0]
    ... 22 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/handler/HandlerInterceptorAdapter
    at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[na:na]
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:467) ~[na:na]
    at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:121) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-6.0.2.jar:6.0.2]
    ... 38 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.handler.HandlerInterceptorAdapter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    ... 55 common frames omitted

[2m2022-12-21T01:20:43.213+01:00[0;39m [33m WARN[0;39m [35m16004[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [36mo.s.boot.SpringApplication              [0;39m [2m:[0;39m Unable to close ApplicationContext

java.lang.IllegalStateException: Failed to introspect Class [de.sqsoft.ep.config.ConfigWebMVC] from ClassLoader [org.springframework.boot.devtools.restart.classloader.RestartClassLoader@5eae746c]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:360) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:417) ~[spring-core-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$1(AbstractAutowireCapableBeanFactory.java:749) ~[spring-beans-6.0.2.jar:6.0.2]
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:748) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:681) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:652) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1632) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:559) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:531) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:658) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:650) ~[spring-beans-6.0.2.jar:6.0.2]
    at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1276) ~[spring-context-6.0.2.jar:6.0.2]
    at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:863) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:851) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:838) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:778) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.0.jar:3.0.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.0.jar:3.0.0]
    at de.sqsoft.ep.EnterprisePortalApplication.main(EnterprisePortalApplication.java:82) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/handler/HandlerInterceptorAdapter
    at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[na:na]
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) ~[na:na]
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:467) ~[na:na]
    at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:121) ~[spring-boot-devtools-3.0.0.jar:3.0.0]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-6.0.2.jar:6.0.2]
    ... 26 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.handler.HandlerInterceptorAdapter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    ... 43 common frames omitted

`

Any hints to solve this problem?


问:
DefaultInstance.RootReference returning null
As seen below, when I want to assign RootReference to my dbreferance variable, dbrefarence becomes null. In the editor, this value is not null, but on my android device its null.</p>
```<code>private void InitializeFirebase()
{
    Debug.Log("Setting Up Firebase");
    firebaseAuth = FirebaseAuth.DefaultInstance;
    databaseReference = FirebaseDatabase.DefaultInstance.RootReference;
}
</code>```

Body:
As seen below, when I want to assign RootReference to my dbreferance variable, dbrefarence becomes null. In the editor, this value is not null, but on my android device its null.

private void InitializeFirebase()
{
    Debug.Log("Setting Up Firebase");
    firebaseAuth = FirebaseAuth.DefaultInstance;
    databaseReference = FirebaseDatabase.DefaultInstance.RootReference;
}


问:
Model using ForeignKey giving conflicting errors in views.py. Code will work in one function, but not another. Not able to filter data
I have been working on the watchlist function for this project and am really struggling to understand what is happening. I seem to get the error str returned non-string (type tuple)  with the.

```<code>item_exists = Watchlists.objects.filter(user=request.user, item=item).exists()
</code>```

in function watchlist_remove; however, I do not receive this error in function watchlist_add function.

Additionally, when I try to loop over the items in function watchlist, I am getting this error 'WSGIRequest' object has no attribute 'item'

```<code> listings = Watchlists.objects.filter(item=request.item)
</code>```

when I very clearly have an item field in my model as well as a related_name"item" and I am returning self.item and saved it into the db with the variable name item.

Here is my model

```<code>class Watchlists(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True,
           related_name="user")
    item = models.ForeignKey(Listings, on_delete=models.CASCADE, null=True, blank=True,
           related_name="item")

def __str__(self):
    return f"{self.item}", self.item, str(self.item), str(self.user)
</code>```

I figure there has to be an issue with my model as other people seem to be able to use these lines of code without issue, but I am hesitant to make any changes to the model until I know what the problem is.

That said, I realize that it is returning both the item and the user and thus a tuple; however, I am unsure as to why the filter function and the return statements in my model aren't fixing this when these recommendations have worked in other posts.

Please advise.

```<code>@login_required
def watchlist(request):
    listings = Watchlists.objects.filter(item=request.item)
    return render(request, 'auctions/watchlist.html', {
        "listings" : listings,
    })

@login_required
def watchlist_add(request, listing_id):
    if request.method == "POST":
        listing = Listings.objects.get(pk=listing_id)
        item = Listings.objects.get(pk=listing_id)
        item_exists = Watchlists.objects.filter(user=request.user, item=item).exists()
        if item_exists:

            return render(request, "auctions/listing.html",   {
                "listing" : listing,
                'item_exists': item_exists
                })
        else:
            Watchlists.objects.create(user=request.user, item=item)
            return render(request, "auctions/listing.html",   {
                "listing" : listing,
                'item_exists': item_exists
                })

@login_required
def watchlist_remove(request, listing_id):
     item = Watchlists.objects.get(pk=listing_id)
     if request.method == "POST":
         listing = Listings.objects.get(pk=listing_id)
         item_exists = Watchlists.objects.filter(user=request.user, item=item).exists()
         if item_exists:
         return render(request, "auctions/listing.html",   {
            "listing" : listing,
            'item_exists': item_exists
            })
        else:
            item.delete()
            return render(request, "auctions/listing.html",   {
                "listing" : listing,

            })
</code>```

'''

Body:
I have been working on the watchlist function for this project and am really struggling to understand what is happening. I seem to get the error str returned non-string (type tuple)  with the.

item_exists = Watchlists.objects.filter(user=request.user, item=item).exists()

in function watchlist_remove; however, I do not receive this error in function watchlist_add function.

Additionally, when I try to loop over the items in function watchlist, I am getting this error 'WSGIRequest' object has no attribute 'item'

 listings = Watchlists.objects.filter(item=request.item)

when I very clearly have an item field in my model as well as a related_name"item" and I am returning self.item and saved it into the db with the variable name item.

Here is my model

class Watchlists(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True,
           related_name="user")
    item = models.ForeignKey(Listings, on_delete=models.CASCADE, null=True, blank=True,
           related_name="item")

def __str__(self):
    return f"{self.item}", self.item, str(self.item), str(self.user)

I figure there has to be an issue with my model as other people seem to be able to use these lines of code without issue, but I am hesitant to make any changes to the model until I know what the problem is.

That said, I realize that it is returning both the item and the user and thus a tuple; however, I am unsure as to why the filter function and the return statements in my model aren't fixing this when these recommendations have worked in other posts.

Please advise.

@login_required
def watchlist(request):
    listings = Watchlists.objects.filter(item=request.item)
    return render(request, 'auctions/watchlist.html', {
        "listings" : listings,
    })

@login_required
def watchlist_add(request, listing_id):
    if request.method == "POST":
        listing = Listings.objects.get(pk=listing_id)
        item = Listings.objects.get(pk=listing_id)
        item_exists = Watchlists.objects.filter(user=request.user, item=item).exists()
        if item_exists:

            return render(request, "auctions/listing.html",   {
                "listing" : listing,
                'item_exists': item_exists
                })
        else:
            Watchlists.objects.create(user=request.user, item=item)
            return render(request, "auctions/listing.html",   {
                "listing" : listing,
                'item_exists': item_exists
                })

@login_required
def watchlist_remove(request, listing_id):
     item = Watchlists.objects.get(pk=listing_id)
     if request.method == "POST":
         listing = Listings.objects.get(pk=listing_id)
         item_exists = Watchlists.objects.filter(user=request.user, item=item).exists()
         if item_exists:
         return render(request, "auctions/listing.html",   {
            "listing" : listing,
            'item_exists': item_exists
            })
        else:
            item.delete()
            return render(request, "auctions/listing.html",   {
                "listing" : listing,

            })

'''


问:
VBA Row Counting Across Multiple Sheets with Overflow Error
I'm trying to get the message box to display the row counts for my entire workbook (3 Sheets). It will run the first one and then on the second I keep getting an Overflow error. Any tips on how to update this so it will run through?

```<code>Sub StockAnalysis()
Dim total As Double

Dim rowIndex As Long
Dim change As Double
Dim columnIndex As Integer
Dim start As Long
Dim rowCount As Long
Dim percentChange As Double
Dim days As Integer
Dim dailyChange As Single
Dim averageChange As Double
Dim ws As Worksheet

For Each ws In Worksheets

columnIndex = 0
total = o
change = 0
start = 2
dailyChange = 0

ws.Range("I1").Value = "Ticker"
ws.Range("J1").Value = "Yearly Change"
ws.Range("K1").Value = "Percent Change"
ws.Range("L1").Value = "Total Stock Volume"
ws.Range("P1").Value = "Ticker"
ws.Range("Q1").Value = "Value"
ws.Range("O2").Value = "Greatest % Increase"
ws.Range("O3").Value = "Greatest % Decrease"
ws.Range("O4").Value = "Greatest Total Volume"

rowCount = ws.Cells(Rows.Count, "A").End(xlUp).Row
MsgBox (rowCount)

Next ws

End Sub
</code>```

I was expecting to get the counts for the rows in all 3 of my sheets, but on the second message box pop up I get an overflow error.

Body:
I'm trying to get the message box to display the row counts for my entire workbook (3 Sheets). It will run the first one and then on the second I keep getting an Overflow error. Any tips on how to update this so it will run through?

Sub StockAnalysis()
Dim total As Double

Dim rowIndex As Long
Dim change As Double
Dim columnIndex As Integer
Dim start As Long
Dim rowCount As Long
Dim percentChange As Double
Dim days As Integer
Dim dailyChange As Single
Dim averageChange As Double
Dim ws As Worksheet

For Each ws In Worksheets

columnIndex = 0
total = o
change = 0
start = 2
dailyChange = 0

ws.Range("I1").Value = "Ticker"
ws.Range("J1").Value = "Yearly Change"
ws.Range("K1").Value = "Percent Change"
ws.Range("L1").Value = "Total Stock Volume"
ws.Range("P1").Value = "Ticker"
ws.Range("Q1").Value = "Value"
ws.Range("O2").Value = "Greatest % Increase"
ws.Range("O3").Value = "Greatest % Decrease"
ws.Range("O4").Value = "Greatest Total Volume"

rowCount = ws.Cells(Rows.Count, "A").End(xlUp).Row
MsgBox (rowCount)

Next ws

End Sub

I was expecting to get the counts for the rows in all 3 of my sheets, but on the second message box pop up I get an overflow error.


问:
Chart.js v3 x-axis time series labels are not displaying properly
In Chart.js v2 when we have multiple data points for the same month we were able to display only one label month and skip remaining labels .but in v3 it is not supporting for each data point it is displaying label. Is there any capability or method to display only one label per month in v3.

V2:

V3:

I tries to set autoskip property as true but it didn't worked


问:
Send message based off of datetime in a database in discord
I have a discord bot and I am wanting to create a version of the remindme bot on reddit. Essentially users can write some command like !remindme 2 months [call mom], and in 2 months the bot will say "call mom".

What I'm thinking is the bot is listening for the !remindme command, parses the datetime, and saves the message in a database (postgresql/sqlite/etc.)

What are some methods I can use to query the database that once it realizes 2 months is here, to post the message?

Hope my question is clear! Thanks!


问:
i want to intialize number of variables according to number of cases
i want to intialize number of variables according to number of cases in my switch case as i want it to be dynamic any number of cases to work not only 2</p>
```<code>statment=[]
body=[]
switch=[]
cc=[]
case1=[]
case2=[]
cases=[]

for x in range(0,len(cc)):
    if cc[x-1] !="break":
        case1.append(cc[x])  #keda e7na hena 5adna awel statment men el cases of hya dynamic
    else:
        t=x
        break
for x in range(t+1,len(cc)):
    if cc[x-1] !="break":
        case2.append(cc[x]) #keda ana gebt el case el 2
    else:
        d=x # ba3raf ana we2ft feeen 3alshan abda2 el mara ely gaia menha
        break

print(statment)
print(switch)
print(case1)
print(case2)
</code>```

Body:
i want to intialize number of variables according to number of cases in my switch case as i want it to be dynamic any number of cases to work not only 2

statment=[]
body=[]
switch=[]
cc=[]
case1=[]
case2=[]
cases=[]

for x in range(0,len(cc)):
    if cc[x-1] !="break":
        case1.append(cc[x])  #keda e7na hena 5adna awel statment men el cases of hya dynamic
    else:
        t=x
        break
for x in range(t+1,len(cc)):
    if cc[x-1] !="break":
        case2.append(cc[x]) #keda ana gebt el case el 2
    else:
        d=x # ba3raf ana we2ft feeen 3alshan abda2 el mara ely gaia menha
        break

print(statment)
print(switch)
print(case1)
print(case2)