问:
MSVC/VS is not detecting any Windows SDK related things - includes, libraries etc
I installed Visual Studio Build Tools 2022 from the official website, checking the "C++ desktop development" box. It installed successfully. However, when I try to use it to compile some Python library, various errors thrown by the compiler shows that MSVC is not aware of any Windows SDK related files on my system, although they are all there and I used default location to install them. To trouble shoot, I uninstalled Windows SDK from VS installer and installed it separately using https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/. Same issue still persists. Most online solutions suggest for a reinstall of the Windows SDK, but I have done it over 5 times, switching around different versions (Windows 10, Windows 11 two each), and nothing changed. I have also checked and confirmed the following registry values indeed points to my installation folder:

```<code>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\
HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots
</code>```

Some of the errors I met were header files cannot be found errors where the header files exist in the Windows SDK directory, e.g. C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt and C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared. Manually adding these folders in using setup.py works as a workaround, but definitely not a solution.

However, there is another issue where it cannot find certain .lib files too, and those files also belong in Windows SDK installation, for example, kernel32.lib which exists on my system in C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64. Sure, I can also edit this in setup.py, but if I have to do this for every single setup.py I get, it would be very tiring.

When I try to run set include in VS x64 native developer command prompt, it only shows my VS code related paths: INCLUDE=E:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include;E:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include. However from online sources, it should also include windows SDK related paths.

I do not have a "cpp properties" file to set like many online solutions suggest because I am not using VS/VS code. I am just doing a python setup.py build.

Windows SDK can be seen with the correct version in control panel.

The Python library I am trying to build is https://github.com/facebookresearch/xformers, and it seems like I am the only one having this issue building, and it should not be any issue from the python library side.

Body:
I installed Visual Studio Build Tools 2022 from the official website, checking the "C++ desktop development" box. It installed successfully. However, when I try to use it to compile some Python library, various errors thrown by the compiler shows that MSVC is not aware of any Windows SDK related files on my system, although they are all there and I used default location to install them. To trouble shoot, I uninstalled Windows SDK from VS installer and installed it separately using https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/. Same issue still persists. Most online solutions suggest for a reinstall of the Windows SDK, but I have done it over 5 times, switching around different versions (Windows 10, Windows 11 two each), and nothing changed. I have also checked and confirmed the following registry values indeed points to my installation folder:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\
HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots

Some of the errors I met were header files cannot be found errors where the header files exist in the Windows SDK directory, e.g. C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt and C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared. Manually adding these folders in using setup.py works as a workaround, but definitely not a solution.

However, there is another issue where it cannot find certain .lib files too, and those files also belong in Windows SDK installation, for example, kernel32.lib which exists on my system in C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64. Sure, I can also edit this in setup.py, but if I have to do this for every single setup.py I get, it would be very tiring.

When I try to run set include in VS x64 native developer command prompt, it only shows my VS code related paths: INCLUDE=E:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include;E:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include. However from online sources, it should also include windows SDK related paths.

I do not have a "cpp properties" file to set like many online solutions suggest because I am not using VS/VS code. I am just doing a python setup.py build.

Windows SDK can be seen with the correct version in control panel.

The Python library I am trying to build is https://github.com/facebookresearch/xformers, and it seems like I am the only one having this issue building, and it should not be any issue from the python library side.


来源: stackexchange

问:
How to not refresh a variable constantly to prevent UI lag (game/renpy)
Hello I'm having trouble with a slider/bar in a game I'm developing. Basically, that bar is used to set the value of gold and depending on how much gold, a list of random chances to get a better item will come out (kinda like gacha). The problem is whenever I slide the bar to quickly, the list of random chances become faulty and show the incorrect values.

The video below might help showcase what my problem is:
https://youtu.be/fGTomapSFk0

Here is the code of the bar. Please note that this is made with the renpy game engine.

```<code>screen tailor_hud():

    tag second

    add "gui/main_hud/tailor_hud.jpg" xoffset glist_posX yoffset glist_posY+62

    bar:
        xoffset glist_posX+32
        yoffset glist_posY+560
        base_bar "gui/bar/shop_price.png"
        thumb "gui/bar/mini_thumb.png"
        thumb_offset 7
        xysize (380, 30)
        left_gutter 10
        right_gutter 22
        value VariableValue("INVESTMENT", 4650, offset=350, action=(Function(update_custom)), step=50, force_step=True)

    text str(INVESTMENT) xoffset glist_posX+178 yoffset glist_posY+528 size 21 font "font/maian.ttf" color gold_color

    vbox:
        for txt in DISPLAY_PERCENTAGES:
            textbutton str(txt):
                action NullAction()
        xalign 0.3
        yalign 0.5
</code>```

And here is the code underlying the gold or INVESTMENT:

```<code>    def update_custom():

        avail_qualities = []

        for key, value in APPAREL_MIN_MAX.items():
            min_value = value[0]
            max_value = value[1]
            if INVESTMENT >= min_value and INVESTMENT <= max_value:
                avail_qualities.append(key)

        custom_order_weights = []

        min_val_list = [tup[0] for tup in APPAREL_MIN_MAX.values()]
        max_val_list = [tup[1] for tup in APPAREL_MIN_MAX.values()]

        idx = QUALITY_TO_INDEX[avail_qualities[0]]
        count = 0
        while count < len(avail_qualities):
            qual_min_weight = INVESTMENT - min_val_list[idx]
            qual_max_weight = INVESTMENT - max_val_list[idx]
            idx += 1
            count += 1

            qweight = min([qual_min_weight, abs(qual_max_weight)])
            custom_order_weights.append(qweight)

        possible_percentages = []

        for weight in custom_order_weights:
            percent = (weight/(sum(custom_order_weights)))*100
            possible_percentages.append(percent)

        idx = 0
        for quality in avail_qualities:
            DISPLAY_PERCENTAGES[QUALITY_TO_INDEX.get(quality)] = round(possible_percentages[idx], 2)
            idx += 1
</code>```

I'm kind of new to programming so any advice is appreciated.

ContentLicense: CC BY-SA 4.0

Body:
Hello I'm having trouble with a slider/bar in a game I'm developing. Basically, that bar is used to set the value of gold and depending on how much gold, a list of random chances to get a better item will come out (kinda like gacha). The problem is whenever I slide the bar to quickly, the list of random chances become faulty and show the incorrect values.

The video below might help showcase what my problem is:
https://youtu.be/fGTomapSFk0

Here is the code of the bar. Please note that this is made with the renpy game engine.

screen tailor_hud():

    tag second

    add "gui/main_hud/tailor_hud.jpg" xoffset glist_posX yoffset glist_posY+62

    bar:
        xoffset glist_posX+32
        yoffset glist_posY+560
        base_bar "gui/bar/shop_price.png"
        thumb "gui/bar/mini_thumb.png"
        thumb_offset 7
        xysize (380, 30)
        left_gutter 10
        right_gutter 22
        value VariableValue("INVESTMENT", 4650, offset=350, action=(Function(update_custom)), step=50, force_step=True)

    text str(INVESTMENT) xoffset glist_posX+178 yoffset glist_posY+528 size 21 font "font/maian.ttf" color gold_color

    vbox:
        for txt in DISPLAY_PERCENTAGES:
            textbutton str(txt):
                action NullAction()
        xalign 0.3
        yalign 0.5

And here is the code underlying the gold or INVESTMENT:

    def update_custom():

        avail_qualities = []

        for key, value in APPAREL_MIN_MAX.items():
            min_value = value[0]
            max_value = value[1]
            if INVESTMENT >= min_value and INVESTMENT <= max_value:
                avail_qualities.append(key)

        custom_order_weights = []

        min_val_list = [tup[0] for tup in APPAREL_MIN_MAX.values()]
        max_val_list = [tup[1] for tup in APPAREL_MIN_MAX.values()]

        idx = QUALITY_TO_INDEX[avail_qualities[0]]
        count = 0
        while count < len(avail_qualities):
            qual_min_weight = INVESTMENT - min_val_list[idx]
            qual_max_weight = INVESTMENT - max_val_list[idx]
            idx += 1
            count += 1

            qweight = min([qual_min_weight, abs(qual_max_weight)])
            custom_order_weights.append(qweight)

        possible_percentages = []

        for weight in custom_order_weights:
            percent = (weight/(sum(custom_order_weights)))*100
            possible_percentages.append(percent)

        idx = 0
        for quality in avail_qualities:
            DISPLAY_PERCENTAGES[QUALITY_TO_INDEX.get(quality)] = round(possible_percentages[idx], 2)
            idx += 1

I'm kind of new to programming so any advice is appreciated.


问:
Granted Authority List is Empty after Migration to Spring Security 6
After the migration to spring boot 3 and spring security 6, I have issues to authorize my anonymous authentification properly. Iam using an oath2 resource server and azure active directory. The granted authority list is always empty. do i have to tweak my web security configuration somehow?

snippet from WebSecurityConfig class after migration:

```<code>  @Bean
  public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    log.debug("Configuring HTTP Security");
    http
        .csrf().disable()
        .cors()
        .and()
        .headers()
        .frameOptions().disable()
        .and()
        .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
        .and()
        .exceptionHandling()
        .and()
        .authorizeRequests((authorize) ->
            authorize.requestMatchers(HttpMethod.GET, "/sf/**", "/assets/**", "/resources/**", "/built/**", "/ui/**").permitAll()
                .and()
                .addFilterBefore(new RolesToRightsConverterFilter(s3RSpringConfig), BasicAuthenticationFilter.class)
                .addFilterAfter(new Slf4jMDCFilter(authService, tracingService), RolesToRightsConverterFilter.class))
        .oauth2ResourceServer().jwt().jwtAuthenticationConverter(new JwtBearerTokenAuthenticationConverter());

    return http.build();
  }
</code>```

and the relevant part of application.yml:

```<code>  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri: 'https://login.microsoftonline.com/${add_tenant_id}/v2.0'
          audiences: '${add_client_id:xxx}'

  cloud:
    azure:
      active-directory:
        credential:
          client-id: ${add_client_id:xxx}
          client-secret: xxx
        profile:
          tenant-id: ${add_tenant_id:xxx}
        jwk-set-cache-lifespan: 10m
        jwk-set-cache-refresh-time: 10m
        enabled: true
</code>```

the xxx is just a placeholder for the actual ID.

Body:
After the migration to spring boot 3 and spring security 6, I have issues to authorize my anonymous authentification properly. Iam using an oath2 resource server and azure active directory. The granted authority list is always empty. do i have to tweak my web security configuration somehow?

snippet from WebSecurityConfig class after migration:

  @Bean
  public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    log.debug("Configuring HTTP Security");
    http
        .csrf().disable()
        .cors()
        .and()
        .headers()
        .frameOptions().disable()
        .and()
        .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
        .and()
        .exceptionHandling()
        .and()
        .authorizeRequests((authorize) ->
            authorize.requestMatchers(HttpMethod.GET, "/sf/**", "/assets/**", "/resources/**", "/built/**", "/ui/**").permitAll()
                .and()
                .addFilterBefore(new RolesToRightsConverterFilter(s3RSpringConfig), BasicAuthenticationFilter.class)
                .addFilterAfter(new Slf4jMDCFilter(authService, tracingService), RolesToRightsConverterFilter.class))
        .oauth2ResourceServer().jwt().jwtAuthenticationConverter(new JwtBearerTokenAuthenticationConverter());

    return http.build();
  }

and the relevant part of application.yml:

  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri: 'https://login.microsoftonline.com/${add_tenant_id}/v2.0'
          audiences: '${add_client_id:xxx}'

  cloud:
    azure:
      active-directory:
        credential:
          client-id: ${add_client_id:xxx}
          client-secret: xxx
        profile:
          tenant-id: ${add_tenant_id:xxx}
        jwk-set-cache-lifespan: 10m
        jwk-set-cache-refresh-time: 10m
        enabled: true

the xxx is just a placeholder for the actual ID.


问:
How to work with multiple `item_id`'s of varying length for timeseries prediction in autogluon?
I'm currently building a model to predict daily stock price based on daily data for thousands of stocks. In the data, I've got the daily data for all stocks, however they are for different lengths. Eg: for some stocks I have daily data from 2000 to 2022, and for others I have data from 2010 to 2022.

Many dates are also obviously repeated for all stocks.

While I was learning autogluon, I used the following function to format timeseries data so it can work with .fit():

```<code>def forward_fill_missing(ts_dataframe: TimeSeriesDataFrame, freq="D") -> TimeSeriesDataFrame:
    original_index = ts_dataframe.index.get_level_values("timestamp")
    start = original_index[0]
    end = original_index[-1]
    filled_index = pd.date_range(start=start, end=end, freq=freq, name="timestamp")
    return ts_dataframe.droplevel("item_id").reindex(filled_index, method="ffill")

ts_dataframe = ts_dataframe.groupby("item_id").apply(forward_fill_missing)
</code>```

This worked, however I was trying this for data for just one item_id and now I have thousands.

When I use this now, I get the following error: ValueError: cannot reindex from a duplicate axis

It's important to note that I have already foreward filled my data with pandas, and the ts_dataframe shouldn't have any missing dates or values, but when I try to use it with .fit() I get the following error:

ValueError: Frequency not provided and cannot be inferred. This is often due to the time index of the data being irregularly sampled. Please ensure that the data set used has a uniform time index, or create the TimeSeriesPredictorsettingignore_time_index=True.

I assume that this is because I have only filled in missing data and dates, but not taken into account the varying number of days available for every stock individually.

For reference, here's how I have formatted the data with pandas:

```<code>df = pd.read_csv(
    "/content/drive/MyDrive/stock_data/training_data.csv",
    parse_dates=["Date"],
)
df["Date"] = pd.to_datetime(df["Date"], errors="coerce", dayfirst=True)
df.fillna(method='ffill', inplace=True)
df = df.drop("Unnamed: 0", axis=1)
df[:11]
</code>```

How can I format the data so I can use it with .fit()?

Thanks!

Body:
I'm currently building a model to predict daily stock price based on daily data for thousands of stocks. In the data, I've got the daily data for all stocks, however they are for different lengths. Eg: for some stocks I have daily data from 2000 to 2022, and for others I have data from 2010 to 2022.

Many dates are also obviously repeated for all stocks.

While I was learning autogluon, I used the following function to format timeseries data so it can work with .fit():

def forward_fill_missing(ts_dataframe: TimeSeriesDataFrame, freq="D") -> TimeSeriesDataFrame:
    original_index = ts_dataframe.index.get_level_values("timestamp")
    start = original_index[0]
    end = original_index[-1]
    filled_index = pd.date_range(start=start, end=end, freq=freq, name="timestamp")
    return ts_dataframe.droplevel("item_id").reindex(filled_index, method="ffill")

ts_dataframe = ts_dataframe.groupby("item_id").apply(forward_fill_missing)

This worked, however I was trying this for data for just one item_id and now I have thousands.

When I use this now, I get the following error: ValueError: cannot reindex from a duplicate axis

It's important to note that I have already foreward filled my data with pandas, and the ts_dataframe shouldn't have any missing dates or values, but when I try to use it with .fit() I get the following error:

ValueError: Frequency not provided and cannot be inferred. This is often due to the time index of the data being irregularly sampled. Please ensure that the data set used has a uniform time index, or create the TimeSeriesPredictorsettingignore_time_index=True.

I assume that this is because I have only filled in missing data and dates, but not taken into account the varying number of days available for every stock individually.

For reference, here's how I have formatted the data with pandas:

df = pd.read_csv(
    "/content/drive/MyDrive/stock_data/training_data.csv",
    parse_dates=["Date"],
)
df["Date"] = pd.to_datetime(df["Date"], errors="coerce", dayfirst=True)
df.fillna(method='ffill', inplace=True)
df = df.drop("Unnamed: 0", axis=1)
df[:11]

How can I format the data so I can use it with .fit()?

Thanks!


问:
No Firebase App - using firebase in react application
I am new to react and I am trying to connect to firebase in a class component and I get an error

Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app-compat/no-app)

how to fix this?

code:

```<code>import React, { useRef, useState, Component } from 'react'
import { useAuthState } from 'react-firebase-hooks/auth';
import { useCollectionData } from 'react-firebase-hooks/firestore';
import { signOut } from 'firebase/auth';
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';
import 'firebase/compat/analytics';

const auth = firebase.auth();
const firestore = firebase.firestore();

class InfoLgn extends Component {
  render() {

      this.state = {
        user: null
      }

    firebase.initializeApp({
      apiKey: "xxxxxxxxxx",
      authDomain: "sssdsdsd.firapp.com",
      databaseURL: "https://xx-xx-default-rtdb.fireio.com",
      projectId: "xxx-d7287",
      storageBucket: "xxx-d7287.appspot.com",
      messagingSenderId: "xxxx",
      appId: "1:xxx:web:xxxx",
      measurementId: "G-xxxx"
    })

    return (
      <div>
         <div className="App">
        <header>
          <h1>⚛</h1>
          <SignOut />
        </header>
       </div>
      </div>
    )
  }
}

function SignOut() {
  return auth.currentUser && (
    <button className="sign-out" onClick={() => auth.signOut()}>Sign Out</button>
  )
}

export default InfoLgn
</code>```

Body:
I am new to react and I am trying to connect to firebase in a class component and I get an error

Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app-compat/no-app)

how to fix this?

code:

import React, { useRef, useState, Component } from 'react'
import { useAuthState } from 'react-firebase-hooks/auth';
import { useCollectionData } from 'react-firebase-hooks/firestore';
import { signOut } from 'firebase/auth';
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';
import 'firebase/compat/analytics';

const auth = firebase.auth();
const firestore = firebase.firestore();

class InfoLgn extends Component {
  render() {

      this.state = {
        user: null
      }

    firebase.initializeApp({
      apiKey: "xxxxxxxxxx",
      authDomain: "sssdsdsd.firapp.com",
      databaseURL: "https://xx-xx-default-rtdb.fireio.com",
      projectId: "xxx-d7287",
      storageBucket: "xxx-d7287.appspot.com",
      messagingSenderId: "xxxx",
      appId: "1:xxx:web:xxxx",
      measurementId: "G-xxxx"
    })

    return (

⚛

          <SignOut />

    )
  }
}

function SignOut() {
  return auth.currentUser && (
    <button className="sign-out" onClick={() => auth.signOut()}>Sign Out</button>
  )
}

export default InfoLgn


问:
React/Tailwind Modal: scroll doesn't work on IOS
I use the code Tailwind provides for modals.

It works great on desktop, but the y scroll gets disabled on iPhone and iPad when the content is larger than the screen. It works fine when I test phone/table screen sizes on desktop. What is causing this behaviour?

Here is the code for the Modal (if you want to reproduce you just insert more dummy p-tags until the content is higher than the screen, I removed them for readability):

```<code>import { Fragment, useState } from 'react'
import { Dialog, Transition } from '@headlessui/react'
import { CheckIcon } from '@heroicons/react/24/outline'

export default function Example() {
  const [open, setOpen] = useState(true)

  return (
    <Transition.Root show={open} as={Fragment}>
      <Dialog as="div" className="relative z-10" onClose={setOpen}>
        <Transition.Child
          as={Fragment}
          enter="ease-out duration-300"
          enterFrom="opacity-0"
          enterTo="opacity-100"
          leave="ease-in duration-200"
          leaveFrom="opacity-100"
          leaveTo="opacity-0"
        >
          <div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" />
        </Transition.Child>

        <div className="fixed inset-0 z-10 overflow-y-auto">
          <div className="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
            <Transition.Child
              as={Fragment}
              enter="ease-out duration-300"
              enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
              enterTo="opacity-100 translate-y-0 sm:scale-100"
              leave="ease-in duration-200"
              leaveFrom="opacity-100 translate-y-0 sm:scale-100"
              leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
            >
              <Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6">
                <div>
                  <div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100">
                    <CheckIcon className="h-6 w-6 text-green-600" aria-hidden="true" />
                  </div>
                  <div className="mt-3 text-center sm:mt-5">
                    <Dialog.Title as="h3" className="text-lg font-medium leading-6 text-gray-900">
                      Payment successful
                    </Dialog.Title>
                    <div className="mt-2">
                      <p className="text-sm text-gray-500">
                        Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequatur amet labore.
                      </p>
                    // Insert more of these to make the
                    // content higher than screen
                    </div>
                  </div>
                </div>
                <div className="mt-5 sm:mt-6">
                  <button
                    type="button"
                    className="inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 sm:text-sm"
                    onClick={() => setOpen(false)}
                  >
                    Go back to dashboard
                  </button>
                </div>
              </Dialog.Panel>
            </Transition.Child>
          </div>
        </div>
      </Dialog>
    </Transition.Root>
  )
}
</code>```

Body:
I use the code Tailwind provides for modals.

It works great on desktop, but the y scroll gets disabled on iPhone and iPad when the content is larger than the screen. It works fine when I test phone/table screen sizes on desktop. What is causing this behaviour?

Here is the code for the Modal (if you want to reproduce you just insert more dummy p-tags until the content is higher than the screen, I removed them for readability):

import { Fragment, useState } from 'react'
import { Dialog, Transition } from '@headlessui/react'
import { CheckIcon } from '@heroicons/react/24/outline'

export default function Example() {
  const [open, setOpen] = useState(true)

  return (
    <Transition.Root show={open} as={Fragment}>
      <Dialog as="div" className="relative z-10" onClose={setOpen}>
        <Transition.Child
          as={Fragment}
          enter="ease-out duration-300"
          enterFrom="opacity-0"
          enterTo="opacity-100"
          leave="ease-in duration-200"
          leaveFrom="opacity-100"
          leaveTo="opacity-0"
        >

        </Transition.Child>

            <Transition.Child
              as={Fragment}
              enter="ease-out duration-300"
              enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
              enterTo="opacity-100 translate-y-0 sm:scale-100"
              leave="ease-in duration-200"
              leaveFrom="opacity-100 translate-y-0 sm:scale-100"
              leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
            >
              <Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6">

                    <CheckIcon className="h-6 w-6 text-green-600" aria-hidden="true" />

                    <Dialog.Title as="h3" className="text-lg font-medium leading-6 text-gray-900">
                      Payment successful
                    </Dialog.Title>

                        Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequatur amet labore.

                    // Insert more of these to make the
                    // content higher than screen

                  <button
                    type="button"
                    className="inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 sm:text-sm"
                    onClick={() => setOpen(false)}
                  >
                    Go back to dashboard
                  </button>

              </Dialog.Panel>
            </Transition.Child>

      </Dialog>
    </Transition.Root>
  )
}


问:
Attribute Error when transforming a Pyspark dataframe into a Pandas dataframe
I am trying to implement a page rank using pyspark. In one step I need to pass a pyspark dataframe into a normal pandas one, but when I try to run it I get the following error:

An exception was thrown from a UDF: 'AttributeError: 'DataFrame' object has no attribute 'Id''

The code I am using is the following

```<code>n = 0
change = 1
while n <= max_iterations and change > t:
    print("Iteration", n)

    #We create a new function, as we will be changing the pagerankPDF
    new_pagerank_udf = udf (lambda x,y: new_pagerank(x,pageRankPDF,y), DoubleType())
    #We create a new pagerankPDF with the updated page rank value
    NewPageRankDF=ReverseDF.select(ReverseDF["id"],new_pagerank_udf(ReverseDF["links"],ReverseDF["n_out"]).alias("PR"))
    #We transform the NewPageRankDF to pandas in order to be able to operate with it
    NewPageRankPDF=NewPageRankDF.toPandas()

    #We update the exit conditions
    n += 1
    change = np.linalg.norm(pageRankPDF["PR"] - NewPageRankDF["PR"])

    #We transform the NewPageRankPDF into the pageRankPDF
    pageRankPDF=NewPageRankPDF
</code>```

With the error being in the line

```<code>NewPageRankPDF=NewPageRankDF.toPandas()
</code>```

If you can share any inshigh about what might be causing the error, I would greatly appreciate it

Body:
I am trying to implement a page rank using pyspark. In one step I need to pass a pyspark dataframe into a normal pandas one, but when I try to run it I get the following error:

An exception was thrown from a UDF: 'AttributeError: 'DataFrame' object has no attribute 'Id''

The code I am using is the following

n = 0
change = 1
while n <= max_iterations and change > t:
    print("Iteration", n)

    #We create a new function, as we will be changing the pagerankPDF
    new_pagerank_udf = udf (lambda x,y: new_pagerank(x,pageRankPDF,y), DoubleType())
    #We create a new pagerankPDF with the updated page rank value
    NewPageRankDF=ReverseDF.select(ReverseDF["id"],new_pagerank_udf(ReverseDF["links"],ReverseDF["n_out"]).alias("PR"))
    #We transform the NewPageRankDF to pandas in order to be able to operate with it
    NewPageRankPDF=NewPageRankDF.toPandas()

    #We update the exit conditions
    n += 1
    change = np.linalg.norm(pageRankPDF["PR"] - NewPageRankDF["PR"])

    #We transform the NewPageRankPDF into the pageRankPDF
    pageRankPDF=NewPageRankPDF

With the error being in the line

NewPageRankPDF=NewPageRankDF.toPandas()

If you can share any inshigh about what might be causing the error, I would greatly appreciate it


问:
Failed to instantiate Hooks class in Appium Cucumber
This question is my first on stackoverflow. I don't know English so I use translate. Sorry if I did something wrong. I want to work with Appium in Cucumber framework. I have a ready-made framework. However, when I want to run my tests, it gives an error in the Hooks class. It shows the error on the following line in the Hooks class:

```<code>private AppiumDriverLocalService appiumServer = AppiumDriverLocalService.buildDefaultService();
</code>```

I couldn't figure it out. Could you please help?
Thank you from now.

Error message in console:

```<code>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Step failed
io.cucumber.core.exception.CucumberException: Failed to instantiate class stepDefinitions.Hooks
    at io.cucumber.core.runtime.ObjectFactoryServiceLoader$DefaultJavaObjectFactory.cacheNewInstance(ObjectFactoryServiceLoader.java:140)
    at io.cucumber.core.runtime.ObjectFactoryServiceLoader$DefaultJavaObjectFactory.getInstance(ObjectFactoryServiceLoader.java:124)
    at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
    at io.cucumber.java.JavaHookDefinition.execute(JavaHookDefinition.java:59)
    at io.cucumber.core.runner.CoreHookDefinition.execute(CoreHookDefinition.java:46)
    at io.cucumber.core.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:21)
    at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
    at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92)
    at io.cucumber.core.runner.TestStep.run(TestStep.java:64)
    at io.cucumber.core.runner.TestCase.run(TestCase.java:98)
    at io.cucumber.core.runner.Runner.runPickle(Runner.java:71)
    at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110)
    at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117)
    at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204)
    at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
    at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
    at io.cucumber.core.cli.Main.run(Main.java:92)
    at io.cucumber.core.cli.Main.main(Main.java:34)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at io.cucumber.core.runtime.ObjectFactoryServiceLoader$DefaultJavaObjectFactory.cacheNewInstance(ObjectFactoryServiceLoader.java:132)
    ... 31 more
Caused by: io.appium.java_client.service.local.InvalidServerInstanceException: NodeJS is either not installed or its executable not present in PATH
    at io.appium.java_client.service.local.AppiumServiceBuilder.validatePath(AppiumServiceBuilder.java:127)
    at io.appium.java_client.service.local.AppiumServiceBuilder.findBinary(AppiumServiceBuilder.java:137)
    at io.appium.java_client.service.local.AppiumServiceBuilder.findDefaultExecutable(AppiumServiceBuilder.java:180)
    at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355)
    at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:87)
    at io.appium.java_client.service.local.AppiumDriverLocalService.buildDefaultService(AppiumDriverLocalService.java:83)
    at stepDefinitions.Hooks.<init>(Hooks.java:16)
    ... 36 more
</code>```

Hooks class:

```<code>package stepDefinitions;

import io.appium.java_client.service.local.AppiumDriverLocalService;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import utils.Driver;

import java.io.IOException;
import java.util.logging.Logger;

public class Hooks {

    private AppiumDriverLocalService appiumServer = AppiumDriverLocalService.buildDefaultService();
    final Runtime runtime = Runtime.getRuntime();

    @Before
    public void setUp() {

        forceStopAppiumServer();

        appiumServer.start();

    }

    @After
    public void tearDown(Scenario scenario) {
        final byte[] screenshot = ((TakesScreenshot) Driver.getAppiumDriver()).getScreenshotAs(OutputType.BYTES);
        if (scenario.isFailed()) {
            scenario.attach(screenshot, "image/png", "screenshots");
        }
        Driver.quitAppiumDriver();
        appiumServer.stop();
    }

    public void forceStopAppiumServer() {
        try {
            runtime.exec("killall node");
            runtime.exec("pkill  -i xcodebuild");
            System.out.println("Kill all nodes");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
</code>```

pom.xml file :

```<code>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jvm.options>--add-opens java.base/java.lang=ALL-UNNAMED</jvm.options>
    </properties>
    <dependencies>

        <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>6.9.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>6.9.0</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.59</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.appium/java-client -->
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>7.3.0</version>
        </dependency>
    </dependencies>

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <skipTests>false</skipTests>
                    <includes>
                        <include>**/runners/*TestRunner*.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <parallel>classes</parallel>
                    <forkMode>perthread</forkMode>
                    <threadCount>4</threadCount>
                    <reuseForks>false</reuseForks>
                    <argLine>-Duser.language=en</argLine>
                    <argLine>-Xmx1024m</argLine>
                    <argLine>-XX:MaxPermSize=256m</argLine>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <useFile>false</useFile>
                    <includes>
                        <include>**/runners/*Runner*.java</include>
                    </includes>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.masterthought</groupId>
                <artifactId>maven-cucumber-reporting</artifactId>
                <version>5.0.0</version>
                <executions>
                    <execution>
                        <id>execution</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <projectName>cucumber-jvm-example</projectName>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <inputDirectory>${project.build.directory}</inputDirectory>
                            <jsonFiles>
                                <param>**/json-reports/*.json</param>
                            </jsonFiles><classificationFiles>->
                            <param>sample.properties</param>
                            <param>other.properties</param>
                        </classificationFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

</project>
</code>```

JDK version on my computer 11 :

enter image description here

JDK version in project 1.8 :

enter image description here

I changed the JDK versions, I changed the versions of the dependencies in the pom.xml file, I even formatted the computer but I could not solve the problem.

Body:
This question is my first on stackoverflow. I don't know English so I use translate. Sorry if I did something wrong. I want to work with Appium in Cucumber framework. I have a ready-made framework. However, when I want to run my tests, it gives an error in the Hooks class. It shows the error on the following line in the Hooks class:

private AppiumDriverLocalService appiumServer = AppiumDriverLocalService.buildDefaultService();

I couldn't figure it out. Could you please help?
Thank you from now.

Error message in console:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Step failed
io.cucumber.core.exception.CucumberException: Failed to instantiate class stepDefinitions.Hooks
    at io.cucumber.core.runtime.ObjectFactoryServiceLoader$DefaultJavaObjectFactory.cacheNewInstance(ObjectFactoryServiceLoader.java:140)
    at io.cucumber.core.runtime.ObjectFactoryServiceLoader$DefaultJavaObjectFactory.getInstance(ObjectFactoryServiceLoader.java:124)
    at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
    at io.cucumber.java.JavaHookDefinition.execute(JavaHookDefinition.java:59)
    at io.cucumber.core.runner.CoreHookDefinition.execute(CoreHookDefinition.java:46)
    at io.cucumber.core.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:21)
    at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
    at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92)
    at io.cucumber.core.runner.TestStep.run(TestStep.java:64)
    at io.cucumber.core.runner.TestCase.run(TestCase.java:98)
    at io.cucumber.core.runner.Runner.runPickle(Runner.java:71)
    at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110)
    at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117)
    at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204)
    at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
    at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
    at io.cucumber.core.cli.Main.run(Main.java:92)
    at io.cucumber.core.cli.Main.main(Main.java:34)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at io.cucumber.core.runtime.ObjectFactoryServiceLoader$DefaultJavaObjectFactory.cacheNewInstance(ObjectFactoryServiceLoader.java:132)
    ... 31 more
Caused by: io.appium.java_client.service.local.InvalidServerInstanceException: NodeJS is either not installed or its executable not present in PATH
    at io.appium.java_client.service.local.AppiumServiceBuilder.validatePath(AppiumServiceBuilder.java:127)
    at io.appium.java_client.service.local.AppiumServiceBuilder.findBinary(AppiumServiceBuilder.java:137)
    at io.appium.java_client.service.local.AppiumServiceBuilder.findDefaultExecutable(AppiumServiceBuilder.java:180)
    at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355)
    at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:87)
    at io.appium.java_client.service.local.AppiumDriverLocalService.buildDefaultService(AppiumDriverLocalService.java:83)
    at stepDefinitions.Hooks.<init>(Hooks.java:16)
    ... 36 more

Hooks class:

package stepDefinitions;

import io.appium.java_client.service.local.AppiumDriverLocalService;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import utils.Driver;

import java.io.IOException;
import java.util.logging.Logger;

public class Hooks {

    private AppiumDriverLocalService appiumServer = AppiumDriverLocalService.buildDefaultService();
    final Runtime runtime = Runtime.getRuntime();

    @Before
    public void setUp() {

        forceStopAppiumServer();

        appiumServer.start();

    }

    @After
    public void tearDown(Scenario scenario) {
        final byte[] screenshot = ((TakesScreenshot) Driver.getAppiumDriver()).getScreenshotAs(OutputType.BYTES);
        if (scenario.isFailed()) {
            scenario.attach(screenshot, "image/png", "screenshots");
        }
        Driver.quitAppiumDriver();
        appiumServer.stop();
    }

    public void forceStopAppiumServer() {
        try {
            runtime.exec("killall node");
            runtime.exec("pkill  -i xcodebuild");
            System.out.println("Kill all nodes");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

pom.xml file :

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jvm.options>--add-opens java.base/java.lang=ALL-UNNAMED</jvm.options>
    </properties>
    <dependencies>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>6.9.1</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>6.9.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.59</version>
        </dependency>

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>7.3.0</version>
        </dependency>
    </dependencies>

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <skipTests>false</skipTests>
                    <includes>
                        <include>**/runners/*TestRunner*.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <parallel>classes</parallel>
                    <forkMode>perthread</forkMode>
                    <threadCount>4</threadCount>
                    <reuseForks>false</reuseForks>
                    <argLine>-Duser.language=en</argLine>
                    <argLine>-Xmx1024m</argLine>
                    <argLine>-XX:MaxPermSize=256m</argLine>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <useFile>false</useFile>
                    <includes>
                        <include>**/runners/*Runner*.java</include>
                    </includes>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.masterthought</groupId>
                <artifactId>maven-cucumber-reporting</artifactId>
                <version>5.0.0</version>
                <executions>
                    <execution>
                        <id>execution</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <projectName>cucumber-jvm-example</projectName>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <inputDirectory>${project.build.directory}</inputDirectory>
                            <jsonFiles>
                                <param>**/json-reports/*.json</param>
                            </jsonFiles><classificationFiles>->
                            <param>sample.properties</param>
                            <param>other.properties</param>
                        </classificationFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

</project>

JDK version on my computer 11 :

enter image description here

JDK version in project 1.8 :

enter image description here

I changed the JDK versions, I changed the versions of the dependencies in the pom.xml file, I even formatted the computer but I could not solve the problem.


问:
Drupal 9 only homepage
I'm very new to drupal and don't know anything about it. I'm, using OpenServer witha PHP 7.4, Apache 2.4, MySQL 5.7. I'v estracted everything into c/OsPanel/domains/cms/Drupal/freshmart/ (I have installed wordpress in c/OsPanel/domains/cms/WP/restaurant and everything works as it should. When I go to cms/drupal/freshmart, I have login page, I login and go to welcome page. When I try to acces anything else like structure, appearance and etc, I get "Page not found" and url is cms/drupal/freshmart/admin/content. In folders, there is no such folder as admin, but from what I know there shouldn't be it.

If you are using a temporary URL such as 192.168.0.42/~username because the domain has not been transferred yet or has not propagated yet, you would have the problem described above until the domain name is transferred over.

To be able to use Drupal before the domain name points over, you will need to change something in the .htaccess file:

```<code>Modify the RewriteBase if you are using Drupal in a subdirectory or in a
VirtualDocumentRoot and the rewrite rules are not working properly.
For example if your site is at http://example.com/drupal uncomment and
modify the following line:
RewriteBase /drupal
</code>```

If your temporary URL is something like 192.168.0.42/~username then you will need to add the following line in .htaccess:

RewriteBase /~username
Once you point the domain name over to the website, be sure to comment out or delete that line.

I saw this on one of the forums, and I think it could be my problem. But I don't understand what should I write in RewriteBase/.

On server mod_rewrite is enabled, there is a .htaccess. What should I do?

Title: Drupal 9 only homepage

Body:
I'm very new to drupal and don't know anything about it. I'm, using OpenServer witha PHP 7.4, Apache 2.4, MySQL 5.7. I'v estracted everything into c/OsPanel/domains/cms/Drupal/freshmart/ (I have installed wordpress in c/OsPanel/domains/cms/WP/restaurant and everything works as it should. When I go to cms/drupal/freshmart, I have login page, I login and go to welcome page. When I try to acces anything else like structure, appearance and etc, I get "Page not found" and url is cms/drupal/freshmart/admin/content. In folders, there is no such folder as admin, but from what I know there shouldn't be it.

If you are using a temporary URL such as 192.168.0.42/~username because the domain has not been transferred yet or has not propagated yet, you would have the problem described above until the domain name is transferred over.

To be able to use Drupal before the domain name points over, you will need to change something in the .htaccess file:

Modify the RewriteBase if you are using Drupal in a subdirectory or in a
VirtualDocumentRoot and the rewrite rules are not working properly.
For example if your site is at http://example.com/drupal uncomment and
modify the following line:
RewriteBase /drupal

If your temporary URL is something like 192.168.0.42/~username then you will need to add the following line in .htaccess:

RewriteBase /~username
Once you point the domain name over to the website, be sure to comment out or delete that line.

I saw this on one of the forums, and I think it could be my problem. But I don't understand what should I write in RewriteBase/.

On server mod_rewrite is enabled, there is a .htaccess. What should I do?


问:
You don't have permission to access this resource. nuxt npm run generate
In nuxt project, when you refer to an address other than the main address, you will see this message.
(Keep in mind that this does not happen when you are in the app and move to other pages, and only happens when you directly enter the address in the url of the browser!
Can it be from standalone method?)

For example:

cpalizade.ir  | is ok

cpalizade.ir/login | not ok(forbidden)

It should be noted that this happens in projects where we use

run generate

and upload dist file in public_html.

but it will not happen when we use

run build

my nuxt.config.js:

```<code>import colors from 'vuetify/es5/util/colors'

export default {

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    titleTemplate: 'Cp Alizade',
    title: 'Cp Alizade',
    meta: [{
      charset: 'utf-8'
    },
      {name: "msapplication-TileColor", content: "#da532c"},
      {name: "theme-color", content: "#ffffff"},
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
      },
      {
        name: 'apple-mobile-web-app-capable',
        content: 'yes'
      },
      {
        name: 'apple-mobile-web-app-status-bar-style',
        content: 'default'
      },
      {
        hid: 'description',
        name: 'description',
        content: ''
      },
    ],
    link: [
      {rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.jpg"},
      {rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon.png"},
      {rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon.png"},
      {rel: "manifest", href: "/site.webmanifest"},
      {rel:"mask-icon", href: "/safari-pinned-tab.svg", color: "#5bbad5"},

    ],

  },

  // Global CSS (https://go.nuxtjs.dev/config-css)
  css: [
    '@/assets/css/main.scss',
    '@mdi/font/css/materialdesignicons.min.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
  //     {
  //   src: '@/plugins/swiper.js',
  //   mode: 'client'
  // },
    // {src: '~/plugins/chart.js', mode: 'client'},
    {
      src: '@/plugins/vuelidate.js'
    },
    {
      src: '@/plugins/pouchdb.js',
      mode: 'client'
    },

  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/vuetify
    ['@nuxtjs/vuetify', {
      rtl: true,
      iconfont: 'mdi'
    }],
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
    // https://go.nuxtjs.dev/pwa
    '@nuxtjs/pwa',
    '@nuxtjs/auth-next',
    'nuxt-leaflet',
  ],

  auth: {
    redirect: {
      login: '/login',
      logout: '/login',
      callback: '/login',
      home: '/'
    },
    strategies: {
      local: {
        scheme: 'local',
        token: {
          property: 'access_token',
          required: true,
          type: 'Bearer'
        },
        user: {
          property: false, // <--- Default "user"
          autoFetch: true
        },
        endpoints: {
          login: {
            url: 'https://api.cpalizade.ir/api/' + 'users/login',
            method: 'post'
          },
          logout: {
            url: 'https://api.cpalizade.ir/api/' + 'users/logout',
            method: 'post'
          },
          user: {
            url: 'https://api.cpalizade.ir/api/' + 'user',
            method: 'get'
          }
        }
      },
      phone: {
        scheme: 'local',
        token: {
          property: 'access_token',
          required: true,
          type: 'Bearer'
        },
        user: {
          property: false, // <--- Default "user"
          autoFetch: true
        },
        endpoints: {
          login: {
            url: 'https://api.cpalizade.ir/api/' + 'users/login-w-otp',
            method: 'post'
          },
          logout: {
            url: 'https://api.cpalizade.ir/api/' + 'users/logout',
            method: 'post'
          },
          user: {
            url: 'https://api.cpalizade.ir/api/' + 'user',
            method: 'get'
          }
        }

      }
    }
  },
  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {
    // See https://github.com/nuxt-community/axios-module#options
    baseURL: 'https://api.cpalizade.ir/api/',
    credentials: false,
    proxy: false,
    debug: true,
    retry: {
      retries: 0
    },
    requestInterceptor: (config, {
      store
    }) => {
      config.headers.common['Content-Type'] = 'application/x-www-form-urlencoded;application/json';
      config.headers.common['Access-Control-Allow-Origin'] = '*';
      return config
    }
  },
  // PWA module configuration: https://go.nuxtjs.dev/pwa
  pwa: {
    manifest: {
      name: 'Cp Alizade',
      short_name: 'Cp Alizade',
      lang: 'fa',
      theme_color: '#222',
      background_color: '#222',
      start_url: `/`,
      prefer_related_applications: true,
    },
    icon: {
      fileName: 'favicon.png'
    },
  },

  // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
  vuetify: {
    customVariables: ['~/assets/variables.scss'],
    defaultAssets: false,
    theme: {
      dark: false,
      themes: {
        light: {
          primary: '#1938d3',
          secondary: '#ff2626',
          info:'#1867c0',
          jozi: '#45c235'
        },

        dark: {
          primary: '#1938d3',
          accent: colors.grey.darken3,
          secondary: colors.amber.darken3,
          info: colors.teal.lighten1,
          warning: colors.amber.base,
          error: '#DF382C',
          success: colors.green.accent3
        }
      }
    }
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    extend(config, ctx) {
    } // blah blah
  }
}
</code>```

.htaccess file:

```<code>RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
DirectoryIndex 200.html
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /200.html [L]
</code>```

Body:
In nuxt project, when you refer to an address other than the main address, you will see this message.
(Keep in mind that this does not happen when you are in the app and move to other pages, and only happens when you directly enter the address in the url of the browser!
Can it be from standalone method?)

For example:

cpalizade.ir  | is ok

cpalizade.ir/login | not ok(forbidden)

It should be noted that this happens in projects where we use

run generate

and upload dist file in public_html.

but it will not happen when we use

run build

my nuxt.config.js:

import colors from 'vuetify/es5/util/colors'

export default {

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    titleTemplate: 'Cp Alizade',
    title: 'Cp Alizade',
    meta: [{
      charset: 'utf-8'
    },
      {name: "msapplication-TileColor", content: "#da532c"},
      {name: "theme-color", content: "#ffffff"},
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
      },
      {
        name: 'apple-mobile-web-app-capable',
        content: 'yes'
      },
      {
        name: 'apple-mobile-web-app-status-bar-style',
        content: 'default'
      },
      {
        hid: 'description',
        name: 'description',
        content: ''
      },
    ],
    link: [
      {rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.jpg"},
      {rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon.png"},
      {rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon.png"},
      {rel: "manifest", href: "/site.webmanifest"},
      {rel:"mask-icon", href: "/safari-pinned-tab.svg", color: "#5bbad5"},

    ],

  },

  // Global CSS (https://go.nuxtjs.dev/config-css)
  css: [
    '@/assets/css/main.scss',
    '@mdi/font/css/materialdesignicons.min.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
  //     {
  //   src: '@/plugins/swiper.js',
  //   mode: 'client'
  // },
    // {src: '~/plugins/chart.js', mode: 'client'},
    {
      src: '@/plugins/vuelidate.js'
    },
    {
      src: '@/plugins/pouchdb.js',
      mode: 'client'
    },

  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/vuetify
    ['@nuxtjs/vuetify', {
      rtl: true,
      iconfont: 'mdi'
    }],
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
    // https://go.nuxtjs.dev/pwa
    '@nuxtjs/pwa',
    '@nuxtjs/auth-next',
    'nuxt-leaflet',
  ],

  auth: {
    redirect: {
      login: '/login',
      logout: '/login',
      callback: '/login',
      home: '/'
    },
    strategies: {
      local: {
        scheme: 'local',
        token: {
          property: 'access_token',
          required: true,
          type: 'Bearer'
        },
        user: {
          property: false, // <--- Default "user"
          autoFetch: true
        },
        endpoints: {
          login: {
            url: 'https://api.cpalizade.ir/api/' + 'users/login',
            method: 'post'
          },
          logout: {
            url: 'https://api.cpalizade.ir/api/' + 'users/logout',
            method: 'post'
          },
          user: {
            url: 'https://api.cpalizade.ir/api/' + 'user',
            method: 'get'
          }
        }
      },
      phone: {
        scheme: 'local',
        token: {
          property: 'access_token',
          required: true,
          type: 'Bearer'
        },
        user: {
          property: false, // <--- Default "user"
          autoFetch: true
        },
        endpoints: {
          login: {
            url: 'https://api.cpalizade.ir/api/' + 'users/login-w-otp',
            method: 'post'
          },
          logout: {
            url: 'https://api.cpalizade.ir/api/' + 'users/logout',
            method: 'post'
          },
          user: {
            url: 'https://api.cpalizade.ir/api/' + 'user',
            method: 'get'
          }
        }

      }
    }
  },
  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {
    // See https://github.com/nuxt-community/axios-module#options
    baseURL: 'https://api.cpalizade.ir/api/',
    credentials: false,
    proxy: false,
    debug: true,
    retry: {
      retries: 0
    },
    requestInterceptor: (config, {
      store
    }) => {
      config.headers.common['Content-Type'] = 'application/x-www-form-urlencoded;application/json';
      config.headers.common['Access-Control-Allow-Origin'] = '*';
      return config
    }
  },
  // PWA module configuration: https://go.nuxtjs.dev/pwa
  pwa: {
    manifest: {
      name: 'Cp Alizade',
      short_name: 'Cp Alizade',
      lang: 'fa',
      theme_color: '#222',
      background_color: '#222',
      start_url: `/`,
      prefer_related_applications: true,
    },
    icon: {
      fileName: 'favicon.png'
    },
  },

  // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
  vuetify: {
    customVariables: ['~/assets/variables.scss'],
    defaultAssets: false,
    theme: {
      dark: false,
      themes: {
        light: {
          primary: '#1938d3',
          secondary: '#ff2626',
          info:'#1867c0',
          jozi: '#45c235'
        },

        dark: {
          primary: '#1938d3',
          accent: colors.grey.darken3,
          secondary: colors.amber.darken3,
          info: colors.teal.lighten1,
          warning: colors.amber.base,
          error: '#DF382C',
          success: colors.green.accent3
        }
      }
    }
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    extend(config, ctx) {
    } // blah blah
  }
}

.htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
DirectoryIndex 200.html
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /200.html [L]


问:
pnpm not installing dev dependencies correctly(?)
I'm trying to migrate some all projects to a monorepo with pnpm.

Here's the structure of my repo:

```<code>project1/
project2/
package.json
pnpm-workspace.yaml
...
</code>```

Here's the content of project1/package.json

...
"devDependencies": {
  "grunt": "^1.5.3",
  "grunt-babel": "^8.0.0",
  "grunt-cli": "^1.4.3",
  "grunt-contrib-watch": "^1.1.0",
  "grunt-exec": "^3.0.0",
  "grunt-karma": "^4.0.2",
  "istanbul-combine": "^0.3.0",
  "jasmine": "^4.5.0",
  "karma": "^6.4.1",
  "karma-chrome-launcher": "^3.1.1",
  "karma-cli": "^2.0.0",
  "karma-coverage": "^2.2.0",
  "karma-jasmine": "^5.1.0",
  "karma-replacer-preprocessor": "0.0.2",
  "karma-spec-reporter": "0.0.36"
}
```
<p><code>project1/karma.conf.js</code></p>
<pre class="lang-js prettyprint-override"><code>module.exports = function (config) {
  config.set({
    frameworks: ['jasmine'],

    // list of files / patterns to load in the browser
    files: ['*/*.js'],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      './*.js': ['replacer', 'coverage'],
    },

    replacerPreprocessor: {
      replacer (file, content) { /* ... */ },
    },

    // ...
  });
};
</code>```

If I run cd project1 && npm i, I can run the tests from the root with npm --prefix project1 run test.

However, if I remove the node_modules and use pnpm i instead of npm i, when i run the tests, I get a few errors:

Cannot load "replacer", it is not registered!

and

Server start failed on port 9876: Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)

I tried pnpm i --shamefully-hoist and adding auto-install-peers=true to ./npmrc but in vain... How can I fix this?

Body:
I'm trying to migrate some all projects to a monorepo with pnpm.

Here's the structure of my repo:

project1/
project2/
package.json
pnpm-workspace.yaml
...

Here's the content of project1/package.json

...
"devDependencies": {
  "grunt": "^1.5.3",
  "grunt-babel": "^8.0.0",
  "grunt-cli": "^1.4.3",
  "grunt-contrib-watch": "^1.1.0",
  "grunt-exec": "^3.0.0",
  "grunt-karma": "^4.0.2",
  "istanbul-combine": "^0.3.0",
  "jasmine": "^4.5.0",
  "karma": "^6.4.1",
  "karma-chrome-launcher": "^3.1.1",
  "karma-cli": "^2.0.0",
  "karma-coverage": "^2.2.0",
  "karma-jasmine": "^5.1.0",
  "karma-replacer-preprocessor": "0.0.2",
  "karma-spec-reporter": "0.0.36"
}

project1/karma.conf.js

module.exports = function (config) {
  config.set({
    frameworks: ['jasmine'],

    // list of files / patterns to load in the browser
    files: ['*/*.js'],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      './*.js': ['replacer', 'coverage'],
    },

    replacerPreprocessor: {
      replacer (file, content) { /* ... */ },
    },

    // ...
  });
};

If I run cd project1 && npm i, I can run the tests from the root with npm --prefix project1 run test.

However, if I remove the node_modules and use pnpm i instead of npm i, when i run the tests, I get a few errors:

Cannot load "replacer", it is not registered!

and

Server start failed on port 9876: Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)

I tried pnpm i --shamefully-hoist and adding auto-install-peers=true to ./npmrc but in vain... How can I fix this?


问:
Execute 2 commands on bind in bashrc
I want to expand aliases automatically, when press Space key. In .bashrc I have following line

bind '" ": alias-expand-line'
```
<p>it changes alias with actual command(f.e. opbashrc changes with vim ~/.bashrc), but if I write for example 'cp', press Space, nothing happens = Space doesn't apper. I found, that there is also command "self-insert". But I don't know how to run 2 commands at once, something like this doesn't work</p>
<pre class="lang-bash prettyprint-override"><code>bind '" ": self-insert && alias-expand-line'
</code>```

Title: Execute 2 commands on bind in bashrc

Body:
I want to expand aliases automatically, when press Space key. In .bashrc I have following line

bind '" ": alias-expand-line'

it changes alias with actual command(f.e. opbashrc changes with vim ~/.bashrc), but if I write for example 'cp', press Space, nothing happens = Space doesn't apper. I found, that there is also command "self-insert". But I don't know how to run 2 commands at once, something like this doesn't work

bind '" ": self-insert && alias-expand-line'


问:
Ticket history handling

Ticket Handling using python

I am struggling in a situation.

Here is an example of a ticket history. I want to get the data from the date and shift range.

for eg:

I'd like to request the date ="2023-01-01" and the shift = "morning" . It should return ID 37 , but if the shift is changed to afternoon, night and day after, like date = "2023-01-03" and shift = "morning" , it should also return ID 37.

Then, if ID 38 should return, begin with the date "2023-01-03" and shift = "afternoon," and continue until the date "2023-01-05", with shift = "afternoon".

Then, if ID 39 should return, begin with the date ="2023-01-05" and shift = "night" and continue until the date = "2023-01-07 " with shift = "morning".

Finally, if ID 40 should return, start with the date = "2023-01-07" and shift = "afternoon" instead of continuing to the next shift because this data status is resolved, so we don't show if the request calls from the date = "2023-01-07" and shift = "night."
Please see this example data and Request](https://i.stack.imgur.com/JBzWw.png)

Title: Ticket history handling


问:
My vb.NET project input doesn't in my primepairs function . how can I fix them?

Sub PrimePair()
        Dim n As Integer
        Dim count As Integer = 0
        Console.WriteLine(count)
    End Sub
    Public Function PrimePairs(ByVal n As Integer, ByVal n2 As Long) As Integer
        Dim count As Integer = 0
        Console.ReadLine()
        If n Mod 2 = 0 Then
            For i = 1 To (n / 2) + 1
                n2 = CLng(n - i)
                If IsPrime(CLng(i)) And IsPrime(n2) = True Then
                    count += 1
                End If
            Next
        Else
            n2 = n - 2
            If IsPrime(n2) = True Then
                count = +1
            End If
        End If
        Console.WriteLine(count)
        Return n
    End Function
End Module>
```

I can't run my code without sub. I created two functions, but the inputs I entered do not return in functions and do not print on the screen, I hope I can solve it, thanks for your attention. My project calculates how many different ways it prints the entered input value as a sum of prime numbers. About the Goldbach conjecture

Body:
Sub PrimePair()
        Dim n As Integer
        Dim count As Integer = 0
        Console.WriteLine(count)
    End Sub
    Public Function PrimePairs(ByVal n As Integer, ByVal n2 As Long) As Integer
        Dim count As Integer = 0
        Console.ReadLine()
        If n Mod 2 = 0 Then
            For i = 1 To (n / 2) + 1
                n2 = CLng(n - i)
                If IsPrime(CLng(i)) And IsPrime(n2) = True Then
                    count += 1
                End If
            Next
        Else
            n2 = n - 2
            If IsPrime(n2) = True Then
                count = +1
            End If
        End If
        Console.WriteLine(count)
        Return n
    End Function
End Module>

I can't run my code without sub. I created two functions, but the inputs I entered do not return in functions and do not print on the screen, I hope I can solve it, thanks for your attention. My project calculates how many different ways it prints the entered input value as a sum of prime numbers. About the Goldbach conjecture


问:
RecyclerView shows layout and size is correct but the setText is still null and empty
I am doing a vaccine name list which shows the list of vaccine names from a table in a database. Once run, the RecyclerView was multiplied to the correct array size which is 6 but the names were not showing and null.

These are my block of codes for that particular list view

AboutVaccines.java

```<code>private void viewJsonData() {
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(BaseUrl)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        myApi = retrofit.create(MyAPI.class);

        Call<ArrayList<VaccineModel>> modelarraylist = myApi.callArrayList();
        modelarraylist.enqueue(new Callback<ArrayList<VaccineModel>>() {
            @Override
            public void onResponse(Call<ArrayList<VaccineModel>> call, retrofit2.Response<ArrayList<VaccineModel>> response) {
                modelArrayList = response.body();
                int i = 0;

                for(i = 0; i < modelArrayList.size(); i++){
                    vaccineAdapter = new VaccineAdapter(modelArrayList, AboutVaccines.this);

                    LinearLayoutManager manager = new LinearLayoutManager(AboutVaccines.this,
                            RecyclerView.VERTICAL, false);
                    vaccinerecycler.setLayoutManager(manager);
                    vaccinerecycler.setAdapter(vaccineAdapter);
                }
            }

            @Override
            public void onFailure(Call<ArrayList<VaccineModel>> call, Throwable t) {
                Toast.makeText(AboutVaccines.this, "data was not fetched!", Toast.LENGTH_SHORT).show();
            }
        });

    }
</code>```

VaccineAdapter.java

```<code>public class VaccineAdapter extends RecyclerView.Adapter<VaccineAdapter.ViewHolder> {

    private ArrayList<VaccineModel> modelArrayList;
    private Context context;

    public VaccineAdapter(ArrayList<VaccineModel> modelArrayList, Context context) {
        this.modelArrayList = modelArrayList;
        this.context = context;
    }

    @NonNull
    @Override
    public VaccineAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

        LayoutInflater inflater = LayoutInflater.from(context);
        View view = inflater.inflate(R.layout.abtvaccinesrecyclerview, parent, false);
        return new VaccineAdapter.ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull VaccineAdapter.ViewHolder holder, int position) {
        holder.vname.setText(modelArrayList.get(position).getVaccineName());
    }

    @Override
    public int getItemCount() {
        return modelArrayList.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder {

        TextView vname;
        public ViewHolder(@NonNull View itemView) {
            super(itemView);
            vname = itemView.findViewById(R.id.vaccinename);
        }
    }
}
</code>```

MyAPI.java

```<code>public interface MyAPI {
    @GET("vaccinedata.php")
    Call<ArrayList<VaccineModel>> callArrayList();
}
</code>```

RecyclerView shows 6 layouts but the vaccine names is still not shown

The logcat also shows error "No adapter attached; skipping layout" for the RecyclerView

Body:
I am doing a vaccine name list which shows the list of vaccine names from a table in a database. Once run, the RecyclerView was multiplied to the correct array size which is 6 but the names were not showing and null.

These are my block of codes for that particular list view

AboutVaccines.java

private void viewJsonData() {
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(BaseUrl)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        myApi = retrofit.create(MyAPI.class);

        Call<ArrayList<VaccineModel>> modelarraylist = myApi.callArrayList();
        modelarraylist.enqueue(new Callback<ArrayList<VaccineModel>>() {
            @Override
            public void onResponse(Call<ArrayList<VaccineModel>> call, retrofit2.Response<ArrayList<VaccineModel>> response) {
                modelArrayList = response.body();
                int i = 0;

                for(i = 0; i < modelArrayList.size(); i++){
                    vaccineAdapter = new VaccineAdapter(modelArrayList, AboutVaccines.this);

                    LinearLayoutManager manager = new LinearLayoutManager(AboutVaccines.this,
                            RecyclerView.VERTICAL, false);
                    vaccinerecycler.setLayoutManager(manager);
                    vaccinerecycler.setAdapter(vaccineAdapter);
                }
            }

            @Override
            public void onFailure(Call<ArrayList<VaccineModel>> call, Throwable t) {
                Toast.makeText(AboutVaccines.this, "data was not fetched!", Toast.LENGTH_SHORT).show();
            }
        });

    }

VaccineAdapter.java

public class VaccineAdapter extends RecyclerView.Adapter<VaccineAdapter.ViewHolder> {

    private ArrayList<VaccineModel> modelArrayList;
    private Context context;

    public VaccineAdapter(ArrayList<VaccineModel> modelArrayList, Context context) {
        this.modelArrayList = modelArrayList;
        this.context = context;
    }

    @NonNull
    @Override
    public VaccineAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

        LayoutInflater inflater = LayoutInflater.from(context);
        View view = inflater.inflate(R.layout.abtvaccinesrecyclerview, parent, false);
        return new VaccineAdapter.ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull VaccineAdapter.ViewHolder holder, int position) {
        holder.vname.setText(modelArrayList.get(position).getVaccineName());
    }

    @Override
    public int getItemCount() {
        return modelArrayList.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder {

        TextView vname;
        public ViewHolder(@NonNull View itemView) {
            super(itemView);
            vname = itemView.findViewById(R.id.vaccinename);
        }
    }
}

MyAPI.java

public interface MyAPI {
    @GET("vaccinedata.php")
    Call<ArrayList<VaccineModel>> callArrayList();
}

RecyclerView shows 6 layouts but the vaccine names is still not shown

The logcat also shows error "No adapter attached; skipping layout" for the RecyclerView


问:
How to add additional column showing sheet names & row source in query importrange function (google sheet)
I have a query importrange function to combine hundreds of my sheet into 1 new googlesheet file, but i need an additional column which show sheet/tab source name and the row source.

this is my query so far :

```<code>=QUERY(
{IMPORTRANGE("SheetID-1","Sheet1!A5:Y1000");
IMPORTRANGE("SheetID-2","Sheet2!A5:Y1000");
IMPORTRANGE("SheetID-3","Sheet3!A5:Y1000")},
"SELECT * WHERE Col2 IS NOT NULL Order By Col1", 0)

</code>```

my query is like that (but for hundreds different sheet) and now i hope i can added aditional column in column Z that showing the source tab/sheet name with row :

Example :

Column Z : Sheet1 - Row 7

If i using filter i can add the additional column with the source row & sheet name like that, but im have no idea to add the column using query. Need some help here.

Body:
I have a query importrange function to combine hundreds of my sheet into 1 new googlesheet file, but i need an additional column which show sheet/tab source name and the row source.

this is my query so far :

=QUERY(
{IMPORTRANGE("SheetID-1","Sheet1!A5:Y1000");
IMPORTRANGE("SheetID-2","Sheet2!A5:Y1000");
IMPORTRANGE("SheetID-3","Sheet3!A5:Y1000")},
"SELECT * WHERE Col2 IS NOT NULL Order By Col1", 0)

my query is like that (but for hundreds different sheet) and now i hope i can added aditional column in column Z that showing the source tab/sheet name with row :

Example :

Column Z : Sheet1 - Row 7

If i using filter i can add the additional column with the source row & sheet name like that, but im have no idea to add the column using query. Need some help here.


问:
Alternative place to find the atom packages
I have more of a general question. In my experience there was no other text editor which did exactly what I needed as Atom, with its' plugins of Hydrogen, VIM, and many other useful packages and rich community of developers.

After the GitHub graciously shut down the atom.io and basically killed Atom altogether (to create some incentive for the developers who enjoyed Atom to migrate to VSCode, I guess), there is no more way to download packages for Atom.

As this fact makes Atom pretty much useless, I wondered if there's an alternative place where I could download the packages like Hydrogen, 'VIMetc. to make myAtom` more useful.

Thanks in advance.


问:
How to check is PowerShell action has ended
I need to run a PowerShell like this:

```<code>Connect-SomeServer localhost;
Import-SomeTemplate C:\temp\info.zip
</code>```

This action opens a progress bar in PowerShell ISE. Sometimes the action can pass after 30 seconds, and sometimes it can take 7 minutes or even more.

How can I check that the progress bar (action) has ended?

Body:
I need to run a PowerShell like this:

Connect-SomeServer localhost;
Import-SomeTemplate C:\temp\info.zip

This action opens a progress bar in PowerShell ISE. Sometimes the action can pass after 30 seconds, and sometimes it can take 7 minutes or even more.

How can I check that the progress bar (action) has ended?


问:
The html page does not display video list
I'm loading a list of videos from the database into an html page, as per the script below. But the videos are not displayed. I tested part of the script separately, and it works, I think the problem is in the .append(). Could someone suggest me a solution. Grateful</p>
```<code><!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet" />
    <script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
</head>

<script>
$(document).ready(function() {
   $.getJSON("today.php", function(dados1) {

     tr = $('<tr/>');
     $('#tbl_post tbody tr').remove();
     $('#tbl_post').append(tr);

     Object.keys(dados1).forEach(function (i) {

        tr = $('<tr/>');
        tr.append("<video id='my-video' class='video-js' controls preload='auto' width='340' height='264' >");
        tr.append("<source src='" + dados1[i].video + "' type='video/mp4'>");
        tr.append("</video>");
    $('#tbl_post').append(tr);

      });
   });
});
</script>

<body>
   <table id="tbl_post" border="0" width="100%" cellpadding="0" cellspacing="0"> </table>
</body>
</html>
</code>```

Body:
I'm loading a list of videos from the database into an html page, as per the script below. But the videos are not displayed. I tested part of the script separately, and it works, I think the problem is in the .append(). Could someone suggest me a solution. Grateful

<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet" />


问:
css select to show white in the top and then continue to black
So what I am trying to do is to show a custom select which should show white as font color and then when options are chosen, it will show black

I have been able to figure out somewhat but the actual thing what i need is still not working.

Can you please, here is my fiddle

https://jsfiddle.net/367x8L1v/

Code:

body {
  margin-top: 80px;
  background-color: #fff;
}

.custom-select {
  position: relative;
  display: block;
  max-width: 400px;
  min-width: 180px;
  margin: 0 auto;
  border: 1px solid #2c3e50;
  background-color: #2c3e50;
  z-index: 10;
}

.custom-select select {
  border: none;
  outline: none;
  background: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  margin: 0;
  display: block;
  width: 100%;
  padding: 12px 55px 15px 15px;
  font-size: 14px;
  color: #000;
}

.custom-select:after {
  position: absolute;
  right: 0;
  top: 0;
  width: 50px;
  height: 100%;
  line-height: 38px;
  content: '\2228';
  text-align: center;
  color: #000;
  font-size: 24px;
  border-left: 1px solid #000;
  z-index: -1;
}

select option {
  color:#000;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><label class="custom-select" for="styledSelect1">
  <select id="styledSelect1" name="options">
    <option value="">
      Select an option
    </option>
    <option value="1">
      Option 1
    </option>
    <option value="2">
      Option 2
    </option>
    <option value="3">
      Option 3
    </option>
    <option value="4">
      Option 4
    </option>
  </select>
</label></code>```

I want to be like this when initially loads

https://prnt.sc/I_eBxebWwrUL

and then when I select something from dropdown, I want it to be like the fiddle

https://prnt.sc/5P-rAjSdPPzP

Body:
So what I am trying to do is to show a custom select which should show white as font color and then when options are chosen, it will show black

I have been able to figure out somewhat but the actual thing what i need is still not working.

Can you please, here is my fiddle

https://jsfiddle.net/367x8L1v/

Code:

body {
  margin-top: 80px;
  background-color: #fff;
}

.custom-select {
  position: relative;
  display: block;
  max-width: 400px;
  min-width: 180px;
  margin: 0 auto;
  border: 1px solid #2c3e50;
  background-color: #2c3e50;
  z-index: 10;
}

.custom-select select {
  border: none;
  outline: none;
  background: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  margin: 0;
  display: block;
  width: 100%;
  padding: 12px 55px 15px 15px;
  font-size: 14px;
  color: #000;
}

.custom-select:after {
  position: absolute;
  right: 0;
  top: 0;
  width: 50px;
  height: 100%;
  line-height: 38px;
  content: '\2228';
  text-align: center;
  color: #000;
  font-size: 24px;
  border-left: 1px solid #000;
  z-index: -1;
}

select option {
  color:#000;
}

  <select id="styledSelect1" name="options">
    <option value="">
      Select an option
    </option>
    <option value="1">
      Option 1
    </option>
    <option value="2">
      Option 2
    </option>
    <option value="3">
      Option 3
    </option>
    <option value="4">
      Option 4
    </option>
  </select>

I want to be like this when initially loads

https://prnt.sc/I_eBxebWwrUL

and then when I select something from dropdown, I want it to be like the fiddle

https://prnt.sc/5P-rAjSdPPzP


问:
Jenkins on Localhost with Gradle Wrapper (Access Denied) Error
Following is my Machine details

Specification
Version

OS
Windows-11

Java
11

Gradle
7.3

I had setup of shell on Jenkins as well.

And Jenkins code snippet is as follows:

```<code>#!/usr/bin/env groovy
/* groovylint-disable CompileStatic, DuplicateStringLiteral, UnnecessaryGString, VariableName */
import java.text.SimpleDateFormat

pipeline {
    agent any

    stages {

        stage('build-and-package') {
            steps {
                script {
                    sh "git update-index --chmod=+x gradlew"
                    sh "chmod +x gradlew"
                    sh "./gradlew clean assemble --stacktrace"
                    //sh "gradle clean build"
                    sh "ls -lrt"
                    sh "ls -lrt ./build/libs/"
                }
            }
        }

        stage('docker-build-and-push') {
            steps {
                //Code Commented
            }
        }

        stage('helm-deploy') {
            steps {
                script {
                    //Code Commented
                }
            }
        }
    }
}

</code>```

I have tried to provide full access rights to Jenkins workspace

Error Screen shot

Body:
Following is my Machine details

Specification
Version

OS
Windows-11

Java
11

Gradle
7.3

I had setup of shell on Jenkins as well.

And Jenkins code snippet is as follows:

#!/usr/bin/env groovy
/* groovylint-disable CompileStatic, DuplicateStringLiteral, UnnecessaryGString, VariableName */
import java.text.SimpleDateFormat

pipeline {
    agent any

    stages {

        stage('build-and-package') {
            steps {
                script {
                    sh "git update-index --chmod=+x gradlew"
                    sh "chmod +x gradlew"
                    sh "./gradlew clean assemble --stacktrace"
                    //sh "gradle clean build"
                    sh "ls -lrt"
                    sh "ls -lrt ./build/libs/"
                }
            }
        }

        stage('docker-build-and-push') {
            steps {
                //Code Commented
            }
        }

        stage('helm-deploy') {
            steps {
                script {
                    //Code Commented
                }
            }
        }
    }
}

I have tried to provide full access rights to Jenkins workspace

Error Screen shot


问:
No signature of method: script.findFiles() is applicable for argument types: (java.util.LinkedHashMap)
Am running the following code in a groovy script inside Jenkins job DSl.

```<code>    List<String> jenkinsfilePaths = findFiles(glob: '**/*/Jenkinsfile').collect { it.path }

    // Provision folder and Multibranch Pipelines.
    jobDsl(
            scriptText: libraryResource('multiPipelines.groovy'),
            additionalParameters: [
                    jenkinsfilePathsStr: jenkinsfilePaths,
                    rootFolderStr      : rootFolderPath,
                    repositoryURL      : env.GIT_URL
            ],
            // The following may be set to 'DELETE'. Note that branches will compete to delete and recreate items
            // unless you only provision items from the default branch.
            removedJobAction: 'IGNORE'
    )
</code>```

I am getting the following error despite having installed the plugin.

No signature of method: script.findFiles() is applicable for argument types: (java.util.LinkedHashMap) values: [[glob:**/*/Jenkinsfile]]

Body:
Am running the following code in a groovy script inside Jenkins job DSl.

    List<String> jenkinsfilePaths = findFiles(glob: '**/*/Jenkinsfile').collect { it.path }

    // Provision folder and Multibranch Pipelines.
    jobDsl(
            scriptText: libraryResource('multiPipelines.groovy'),
            additionalParameters: [
                    jenkinsfilePathsStr: jenkinsfilePaths,
                    rootFolderStr      : rootFolderPath,
                    repositoryURL      : env.GIT_URL
            ],
            // The following may be set to 'DELETE'. Note that branches will compete to delete and recreate items
            // unless you only provision items from the default branch.
            removedJobAction: 'IGNORE'
    )

I am getting the following error despite having installed the plugin.

No signature of method: script.findFiles() is applicable for argument types: (java.util.LinkedHashMap) values: [[glob:**/*/Jenkinsfile]]


问:
How to hide keyboard in iOS app using frida?
I am new to using frida with ios Application, I have a lot of questions regarding that issue, if anyone could provide me with some book or articles to read in order to get better at it.

My current problem is I'm trying to hide the keyboard in an iOS App using frida, I am trying the following code as far I understood how the iOS apps are working:

```<code>var firstResponder = ObjC.classes.UIApplication.sharedApplication().keyWindow().firstResponder();

if (firstResponder.isNull() || !firstResponder.isKindOfClass_(ObjC.classes.UIView)) {
  console.log("Error: first responder is not a UIView");

}

firstResponder.resignFirstResponder();
</code>```

But this code is making the app crash. Can anyone provide me with an explanation and how to achieve my goal ?

Thanks.

Body:
I am new to using frida with ios Application, I have a lot of questions regarding that issue, if anyone could provide me with some book or articles to read in order to get better at it.

My current problem is I'm trying to hide the keyboard in an iOS App using frida, I am trying the following code as far I understood how the iOS apps are working:

var firstResponder = ObjC.classes.UIApplication.sharedApplication().keyWindow().firstResponder();

if (firstResponder.isNull() || !firstResponder.isKindOfClass_(ObjC.classes.UIView)) {
  console.log("Error: first responder is not a UIView");

}

firstResponder.resignFirstResponder();

But this code is making the app crash. Can anyone provide me with an explanation and how to achieve my goal ?

Thanks.