问:
It is too late to set sourceCompatibility :react-native-navigation
I am installing react-native-navigation I get this error when compiling. do you know how to solve it?

```<code>* Where:
Build file '/Users/userprueba/Documents/project-react-native/node_modules/react-native-navigation/lib/android/app/build.gradle' line: 151

* What went wrong:
A problem occurred configuring project ':react-native-navigation'.
> It is too late to set sourceCompatibility
  It has already been read to configure this project.
  Consider either moving this call to be during evaluation,
  or using the variant API.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 34s
</code>```

this is enviroment

```<code>"react": "18.1.0",
"react-native": "0.70.6",
"react-native-navigation": "^6.4.0",
</code>```

android/build.gradle

```<code>// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        RNNKotlinVersion = "1.3.61"
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        //playServicesVersion = "17.0.0"1

        if (System.properties['os.arch'] == "aarch64") {
            // For M1 Users we need to use the NDK 24 which added support for aarch64
            ndkVersion = "24.0.8215888"
        } else {
            // Otherwise we default to the side-by-side NDK version from AGP.
            ndkVersion = "21.4.7075529"
        }
    }
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61")
        //classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
        classpath("com.android.tools.build:gradle:7.2.1")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath 'com.google.gms:google-services:4.3.3'
        classpath("de.undercouch:gradle-download-task:5.0.1")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
    }
}

</code>```

android/app/build.gradle

```<code>apply plugin: "com.android.application"

import com.android.build.OutputFile
import org.apache.tools.ant.taskdefs.condition.Os

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation. If none specified and
 *   // "index.android.js" exists, it will be used. Otherwise "index.js" is
 *   // default. Can be overridden with ENTRY_FILE environment variable.
 *   entryFile: "index.android.js",
 *
 *   // https://reactnative.dev/docs/performance#enable-the-ram-format
 *   bundleCommand: "ram-bundle",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

/**
 * The preferred build flavor of JavaScriptCore.
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US.  Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+'

/**
 * Whether to enable the Hermes VM.
 *
 * This should be set on project.ext.react and that value will be read here. If it is not set
 * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
 * and the benefits of using Hermes will therefore be sharply reduced.
 */
def enableHermes = project.ext.react.get("enableHermes", false);

/**
 * Architectures to build native code for.
 */
def reactNativeArchitectures() {
    def value = project.getProperties().get("reactNativeArchitectures")
    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
    ndkVersion rootProject.ext.ndkVersion

    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.xxxxxxx"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

        if (isNewArchitectureEnabled()) {
            // We configure the CMake build only if you decide to opt-in for the New Architecture.
            externalNativeBuild {
                cmake {
                    arguments "-DPROJECT_BUILD_DIR=$buildDir",
                        "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
                        "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
                        "-DNODE_MODULES_DIR=$rootDir/../node_modules",
                        "-DANDROID_STL=c++_shared"
                }
            }
            if (!enableSeparateBuildPerCPUArchitecture) {
                ndk {
                    abiFilters (*reactNativeArchitectures())
                }
            }
        }
    }

    if (isNewArchitectureEnabled()) {
        // We configure the NDK build only if you decide to opt-in for the New Architecture.
        externalNativeBuild {
            cmake {
                path "$projectDir/src/main/jni/CMakeLists.txt"
            }
        }
        def reactAndroidProjectDir = project(':ReactAndroid').projectDir
        def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        afterEvaluate {
            // If you wish to add a custom TurboModule or component locally,
            // you should uncomment this line.
            // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
            preDebugBuild.dependsOn(packageReactNdkDebugLibs)
            preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

            // Due to a bug inside AGP, we have to explicitly set a dependency
            // between configureCMakeDebug* tasks and the preBuild tasks.
            // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
            configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
            configureCMakeDebug.dependsOn(preDebugBuild)
            reactNativeArchitectures().each { architecture ->
                tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
                    dependsOn("preDebugBuild")
                }
                tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
                    dependsOn("preReleaseBuild")
                }
            }
        }
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include (*reactNativeArchitectures())
        }
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        defaultConfig.versionCode * 1000 + versionCodes.get(abi)
            }

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])

    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        //noinspection GradleDynamicVersion
        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
            exclude group:'com.facebook.fbjni'
        }
    } else {
        implementation jscFlavor
    }
}

if (isNewArchitectureEnabled()) {
    // If new architecture is enabled, we let you build RN from source
    // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
    // This will be applied to all the imported transtitive dependency.
    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute(module("com.facebook.react:react-native"))
                    .using(project(":ReactAndroid"))
                    .because("On New Architecture we're building React Native from source")
            substitute(module("com.facebook.react:hermes-engine"))
                    .using(project(":ReactAndroid:hermes-engine"))
                    .because("On New Architecture we're building Hermes from source")
        }
    }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.implementation
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

def isNewArchitectureEnabled() {
    // To opt-in for the New Architecture, you can either:
    // - Set `newArchEnabled` to true inside the `gradle.properties` file
    // - Invoke gradle with `-newArchEnabled=true`
    // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
    return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

</code>```

tried this but it did not work:

1-. rm -rf ~/Library/Developer/Xcode/DerivedData 2-. rm -rf Podfile.lock 3-. pod install

and

npx rnn-link

and

validate the configuration in android

```<code>https://wix.github.io/react-native-navigation/docs/installing/#android
</code>```

Body:
I am installing react-native-navigation I get this error when compiling. do you know how to solve it?

* Where:
Build file '/Users/userprueba/Documents/project-react-native/node_modules/react-native-navigation/lib/android/app/build.gradle' line: 151

* What went wrong:
A problem occurred configuring project ':react-native-navigation'.
> It is too late to set sourceCompatibility
  It has already been read to configure this project.
  Consider either moving this call to be during evaluation,
  or using the variant API.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 34s

this is enviroment

"react": "18.1.0",
"react-native": "0.70.6",
"react-native-navigation": "^6.4.0",

android/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        RNNKotlinVersion = "1.3.61"
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        //playServicesVersion = "17.0.0"1

        if (System.properties['os.arch'] == "aarch64") {
            // For M1 Users we need to use the NDK 24 which added support for aarch64
            ndkVersion = "24.0.8215888"
        } else {
            // Otherwise we default to the side-by-side NDK version from AGP.
            ndkVersion = "21.4.7075529"
        }
    }
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61")
        //classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
        classpath("com.android.tools.build:gradle:7.2.1")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath 'com.google.gms:google-services:4.3.3'
        classpath("de.undercouch:gradle-download-task:5.0.1")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
    }
}

android/app/build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile
import org.apache.tools.ant.taskdefs.condition.Os

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation. If none specified and
 *   // "index.android.js" exists, it will be used. Otherwise "index.js" is
 *   // default. Can be overridden with ENTRY_FILE environment variable.
 *   entryFile: "index.android.js",
 *
 *   // https://reactnative.dev/docs/performance#enable-the-ram-format
 *   bundleCommand: "ram-bundle",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

/**
 * The preferred build flavor of JavaScriptCore.
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US.  Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+'

/**
 * Whether to enable the Hermes VM.
 *
 * This should be set on project.ext.react and that value will be read here. If it is not set
 * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
 * and the benefits of using Hermes will therefore be sharply reduced.
 */
def enableHermes = project.ext.react.get("enableHermes", false);

/**
 * Architectures to build native code for.
 */
def reactNativeArchitectures() {
    def value = project.getProperties().get("reactNativeArchitectures")
    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
    ndkVersion rootProject.ext.ndkVersion

    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.xxxxxxx"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

        if (isNewArchitectureEnabled()) {
            // We configure the CMake build only if you decide to opt-in for the New Architecture.
            externalNativeBuild {
                cmake {
                    arguments "-DPROJECT_BUILD_DIR=$buildDir",
                        "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
                        "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
                        "-DNODE_MODULES_DIR=$rootDir/../node_modules",
                        "-DANDROID_STL=c++_shared"
                }
            }
            if (!enableSeparateBuildPerCPUArchitecture) {
                ndk {
                    abiFilters (*reactNativeArchitectures())
                }
            }
        }
    }

    if (isNewArchitectureEnabled()) {
        // We configure the NDK build only if you decide to opt-in for the New Architecture.
        externalNativeBuild {
            cmake {
                path "$projectDir/src/main/jni/CMakeLists.txt"
            }
        }
        def reactAndroidProjectDir = project(':ReactAndroid').projectDir
        def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        afterEvaluate {
            // If you wish to add a custom TurboModule or component locally,
            // you should uncomment this line.
            // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
            preDebugBuild.dependsOn(packageReactNdkDebugLibs)
            preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

            // Due to a bug inside AGP, we have to explicitly set a dependency
            // between configureCMakeDebug* tasks and the preBuild tasks.
            // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
            configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
            configureCMakeDebug.dependsOn(preDebugBuild)
            reactNativeArchitectures().each { architecture ->
                tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
                    dependsOn("preDebugBuild")
                }
                tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
                    dependsOn("preReleaseBuild")
                }
            }
        }
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include (*reactNativeArchitectures())
        }
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        defaultConfig.versionCode * 1000 + versionCodes.get(abi)
            }

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])

    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        //noinspection GradleDynamicVersion
        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
            exclude group:'com.facebook.fbjni'
        }
    } else {
        implementation jscFlavor
    }
}

if (isNewArchitectureEnabled()) {
    // If new architecture is enabled, we let you build RN from source
    // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
    // This will be applied to all the imported transtitive dependency.
    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute(module("com.facebook.react:react-native"))
                    .using(project(":ReactAndroid"))
                    .because("On New Architecture we're building React Native from source")
            substitute(module("com.facebook.react:hermes-engine"))
                    .using(project(":ReactAndroid:hermes-engine"))
                    .because("On New Architecture we're building Hermes from source")
        }
    }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.implementation
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

def isNewArchitectureEnabled() {
    // To opt-in for the New Architecture, you can either:
    // - Set `newArchEnabled` to true inside the `gradle.properties` file
    // - Invoke gradle with `-newArchEnabled=true`
    // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
    return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

tried this but it did not work:

1-. rm -rf ~/Library/Developer/Xcode/DerivedData 2-. rm -rf Podfile.lock 3-. pod install

and

npx rnn-link

and

validate the configuration in android

https://wix.github.io/react-native-navigation/docs/installing/#android


来源: stackexchange

问:
Error in Julia_setup() : Julia is not found
I am trying to use the JuliaCall package to work with Julia in R. When I want to setup Julia using julia_setup I get an error. Here is the code:

install.packages("JuliaCall")
library(JuliaCall)
install_julia()
#> [1] "Installed Julia to /Users/quinten/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.8.4/Julia-1.8.app/Contents/Resources/julia"

julia <- julia_setup()
#> Error in julia_setup(): Julia is not found.
```
<p><sup>Created on 2022-12-28 with reprex v2.0.2</sup></p>
<p>So I was wondering if anyone knows how to fix this error?</p>
<hr />
<p><strong>Edit: Trying julia_setup(rebuild = TRUE)</strong></p>
<p>When I try to use <code>julia_setup(rebuild = TRUE)</code> I get a warning message that Julia-1.8 is damaged and can't be opened. If I want to move it to the trash bin it says:</p>
```JuliaCall::julia_setup(rebuild = TRUE)
sh: /Users/quinten/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.8.4/Julia-1.8.app/Contents/Resources/julia/bin/julia: No such file or directory
Error in JuliaCall::julia_setup(rebuild = TRUE) : Julia is not found.
```

ContentLicense: CC BY-SA 4.0

Body:
I am trying to use the JuliaCall package to work with Julia in R. When I want to setup Julia using julia_setup I get an error. Here is the code:

install.packages("JuliaCall")
library(JuliaCall)
install_julia()
#> [1] "Installed Julia to /Users/quinten/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.8.4/Julia-1.8.app/Contents/Resources/julia"

julia <- julia_setup()
#> Error in julia_setup(): Julia is not found.

Created on 2022-12-28 with reprex v2.0.2

So I was wondering if anyone knows how to fix this error?

Edit: Trying julia_setup(rebuild = TRUE)

When I try to use julia_setup(rebuild = TRUE) I get a warning message that Julia-1.8 is damaged and can't be opened. If I want to move it to the trash bin it says:

JuliaCall::julia_setup(rebuild = TRUE)
sh: /Users/quinten/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.8.4/Julia-1.8.app/Contents/Resources/julia/bin/julia: No such file or directory
Error in JuliaCall::julia_setup(rebuild = TRUE) : Julia is not found.


问:
react native allowing users to apply color using different svg paths with animation and blend on top of a background image
I have an original svg image (like an interior of a room) and different svg paths (walls,ceiling in a room)  which are positioned on top of the original image. OnPress of different svg paths color is applied.
Challenge is it does not get blend with the backgroung image.
Second while the color is applied on the path not able to animate the color fill something like starting from center and then applying to the entire path withTiming.

Packages used are react-native-svg and react-native-reanimated

Is there any other way to approach this in react native? Is such animation possible , if yes how can it be achieved.


问:
Listening on a certain key press and react to it with C# on Windows system
Hi, i want to write a farming bot for a certain game.

What i want to achieve is while playing the game, when i press for example F1 then the service (console program or a .Net Core Worker Service) should press the button for example A,B,C for me. And pressing ESC then the service will stop writing ABC...

This should be happened on a event driven approach.

At the moment i just turn off the console Programm..

Pressing A,B,C is already realized with the "User32.Dll" wrapper. But how can i listen to the F1 or ESC event?

How can i do this with C# on Windows?


问:
SOLUTION: Error: “http://localhost:3000/style.css” was blocked due to MIME type (“text/html”) using Express
I'm learning Express and I had a problem with the stylesheet. The console was printing an error related to X-Content-Type-Options: nosniff. After a long search through MDN, I came to an efficient(simple and useful) solution   here on Stack Overflow given by Zahid.

You would need to explicitly tell your express app to consider the folder as static to retain the mime type of the file.

Something like:

```<code>app.use(express.static("./"));
</code>```

I hope it helps everyone who is starting out in this world, like me. ✌

Body:
I'm learning Express and I had a problem with the stylesheet. The console was printing an error related to X-Content-Type-Options: nosniff. After a long search through MDN, I came to an efficient(simple and useful) solution   here on Stack Overflow given by Zahid.

You would need to explicitly tell your express app to consider the folder as static to retain the mime type of the file.

Something like:

app.use(express.static("./"));

I hope it helps everyone who is starting out in this world, like me. ✌


问:
Service provider has to support IUserPromptServive
I Open a multi-dimension cube from an SSAS Server
Go to the Attribute Relationships tab for the Cube
Select an attribute, click the “New Attribute Relationship” button in the toolbar.

I get an error:
Service provider has to support IUserPromptServive!

How can i fix it?
I have Visual Studio 2019 in version 16.11.22


问:
Sent (null) Correlation Id is not same as received (null)
I have a Spring Boot (2.7.6) / Java (8) application that's creating a SQL Server JDBC data source, that gets a valid connection. But, whenever I get the connection from the data source to select some data I get the following lines in my log file:

```<code>Attempting to get a test connection.
c.microsoft.aad.msal4j.WSTrustResponse   : Found token of type: urn:oasis:names:tc:SAML:1.0:assertion
com.microsoft.aad.msal4j.HttpHelper      : [Correlation ID: null] Sent (null) Correlation Id is not same as received (null).
com.microsoft.aad.msal4j.HttpHelper      : [Correlation ID: null] Sent (null) Correlation Id is not same as received (cb6846d3-895e-4693-87e0-f72ef3262fd1)
Got a connection!!!!
</code>```

I'm running the code locally, and connecting to a PAAS SQL Server DB running in a cloud. Here are the pertinent lines of code used to create the data source:

```<code>com.microsoft.sqlserver.jdbc.SQLServerDataSource ss = new com.microsoft.sqlserver.jdbc.SQLServerDataSource();
ss.setUser(dbUser);
ss.setPassword(AESUtility.decrypt(dbPassword));
ss.setServerName(dbServername);
ss.setDatabaseName(dbDatabasename);
ss.setPortNumber(Integer.parseInt(dbPortNumber));
ss.setAuthentication("ActiveDirectoryPassword");
ss.setEncrypt("true");
ss.setTrustServerCertificate(true);

System.out.println("Attempting to get a test connection.");
connection = ss.getConnection();
System.out.println("Got a connection!!!!");

</code>```

The JDBC driver is version:

```<code>        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>11.2.1.jre8</version>
        </dependency>
</code>```

Body:
I have a Spring Boot (2.7.6) / Java (8) application that's creating a SQL Server JDBC data source, that gets a valid connection. But, whenever I get the connection from the data source to select some data I get the following lines in my log file:

Attempting to get a test connection.
c.microsoft.aad.msal4j.WSTrustResponse   : Found token of type: urn:oasis:names:tc:SAML:1.0:assertion
com.microsoft.aad.msal4j.HttpHelper      : [Correlation ID: null] Sent (null) Correlation Id is not same as received (null).
com.microsoft.aad.msal4j.HttpHelper      : [Correlation ID: null] Sent (null) Correlation Id is not same as received (cb6846d3-895e-4693-87e0-f72ef3262fd1)
Got a connection!!!!

I'm running the code locally, and connecting to a PAAS SQL Server DB running in a cloud. Here are the pertinent lines of code used to create the data source:

com.microsoft.sqlserver.jdbc.SQLServerDataSource ss = new com.microsoft.sqlserver.jdbc.SQLServerDataSource();
ss.setUser(dbUser);
ss.setPassword(AESUtility.decrypt(dbPassword));
ss.setServerName(dbServername);
ss.setDatabaseName(dbDatabasename);
ss.setPortNumber(Integer.parseInt(dbPortNumber));
ss.setAuthentication("ActiveDirectoryPassword");
ss.setEncrypt("true");
ss.setTrustServerCertificate(true);

System.out.println("Attempting to get a test connection.");
connection = ss.getConnection();
System.out.println("Got a connection!!!!");

The JDBC driver is version:

        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>11.2.1.jre8</version>
        </dependency>


问:
Argument of type '(req: Request, res: IResponse, next: NextFunction) => void' is not assignable to parameter of type 'PathParams' with express.js
I tried 2 solutions. One is to use module augmentation. Two is to import ExpressRequest and extend it.

First Solution:

```<code>   id?: Types.ObjectId | undefined;
    media?: string;
    username?: string;
    user?: User | null | undefined;
    path: string;
    cookies: any;
    body: RequestBody;
    params: RequestParams;
    file: RequestFile;
    files: object[] | [];
    following: {username: string, following: string[], _id}[];
    query: any;
</code>```

but I get Errors:

Subsequent property declarations must have the same type.  Property 'body' must be of type 'ReqBody', but here has type 'RequestBody'.ts(2717)
*Subsequent property declarations must have the same type.  Property 'params' must be of type 'P', but here has type 'RequestParams'.ts(2717)
*Subsequent property declarations must have the same type.  Property 'query' must be of type 'ReqQuery', but here has type 'any'.ts(2717)

when I change the types as it said I should do, I get Errors:

type ReqBody = /unresolved/ any
Cannot find name 'ReqBody'.ts(2304)
type P = /unresolved/ any
Cannot find name 'P'.ts(2304)
type ReqQuery = /unresolved/ any
Cannot find name 'ReqQuery'.ts(2304)

Second solution:

when I change this types to my own types TS tell me it has to be the ReqBody, 'P' and 'ReqQuery' types.
import { Request as ExpressRequest } from 'exess';

```<code>  export interface Request extends ExpressRequest {
    id?: Types.ObjectId | undefined;
    media?: string;
    username?: string;
    user?: User | null | undefined;
    path: string;
    cookies: string[];
    body: ReqBody;
    params: P;
    file: RequestFile;
    files: object[] | [];
    following: {username: string, following: string[], _id}[];
    query: ReqQuery;
  }
</code>```

but I get the error:

Interface 'Request' incorrectly extends interface 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Types of property 'params' are incompatible. Type 'RequestParams' is not assignable to type 'ParamsDictionary'. Index signature for type 'string' is missing in type 'RequestParams'.

Body:
I tried 2 solutions. One is to use module augmentation. Two is to import ExpressRequest and extend it.

First Solution:

   id?: Types.ObjectId | undefined;
    media?: string;
    username?: string;
    user?: User | null | undefined;
    path: string;
    cookies: any;
    body: RequestBody;
    params: RequestParams;
    file: RequestFile;
    files: object[] | [];
    following: {username: string, following: string[], _id}[];
    query: any;

but I get Errors:

Subsequent property declarations must have the same type.  Property 'body' must be of type 'ReqBody', but here has type 'RequestBody'.ts(2717)
*Subsequent property declarations must have the same type.  Property 'params' must be of type 'P', but here has type 'RequestParams'.ts(2717)
*Subsequent property declarations must have the same type.  Property 'query' must be of type 'ReqQuery', but here has type 'any'.ts(2717)

when I change the types as it said I should do, I get Errors:

type ReqBody = /unresolved/ any
Cannot find name 'ReqBody'.ts(2304)
type P = /unresolved/ any
Cannot find name 'P'.ts(2304)
type ReqQuery = /unresolved/ any
Cannot find name 'ReqQuery'.ts(2304)

Second solution:

when I change this types to my own types TS tell me it has to be the ReqBody, 'P' and 'ReqQuery' types.
import { Request as ExpressRequest } from 'exess';

  export interface Request extends ExpressRequest {
    id?: Types.ObjectId | undefined;
    media?: string;
    username?: string;
    user?: User | null | undefined;
    path: string;
    cookies: string[];
    body: ReqBody;
    params: P;
    file: RequestFile;
    files: object[] | [];
    following: {username: string, following: string[], _id}[];
    query: ReqQuery;
  }

but I get the error:

Interface 'Request' incorrectly extends interface 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Types of property 'params' are incompatible. Type 'RequestParams' is not assignable to type 'ParamsDictionary'. Index signature for type 'string' is missing in type 'RequestParams'.


问:
How to add an event to Calendar.app with applescript(js)
I'd like to add new schedule to Calender app on iMac with applescript(javascript).

I wrote like below. But I still can't get how it works.

```<code>var app = Application("カレンダー")
app.activate()

var today1 = new Date()

var event = app.Event({
    description: "test",
    startDate: today1,
    alldayEvent: true
})
</code>```

the inside of event is like this

```<code>app.Event({"description":"test", "startDate":Wed Dec 28 2022 17:03:03 GMT+0900 (JST), "alldayEvent":true, "make":[function anonymous]})
</code>```

So does this mean that I could made event object?

From this on, I can't add event to the calender.

Is there any idea?

Thank you!

Body:
I'd like to add new schedule to Calender app on iMac with applescript(javascript).

I wrote like below. But I still can't get how it works.

var app = Application("カレンダー")
app.activate()

var today1 = new Date()

var event = app.Event({
    description: "test",
    startDate: today1,
    alldayEvent: true
})

the inside of event is like this

app.Event({"description":"test", "startDate":Wed Dec 28 2022 17:03:03 GMT+0900 (JST), "alldayEvent":true, "make":[function anonymous]})

So does this mean that I could made event object?

From this on, I can't add event to the calender.

Is there any idea?

Thank you!


问:
how to get sphericity from pingouin.mixed_anova?
so according to the docu
https://pingouin-stats.org/generated/pingouin.mixed_anova.html#pingouin.mixed_anova
mixed_anova returns a DataFrame object including sphericity.

```<code>aov = mixed_anova(...)
display(aov)
</code>```

this doesnt show the sphericity.

and things like:

```<code>aov.sphericity()
aov['Sphericity']
</code>```

dont work for me.

What would be the correct way to get this output?

Body:
so according to the docu
https://pingouin-stats.org/generated/pingouin.mixed_anova.html#pingouin.mixed_anova
mixed_anova returns a DataFrame object including sphericity.

aov = mixed_anova(...)
display(aov)

this doesnt show the sphericity.

and things like:

aov.sphericity()
aov['Sphericity']

dont work for me.

What would be the correct way to get this output?


问:
How to Make a HTTP REST call from HTTPS node server?
My React application with backend NodeJs is running on HTTPS connection. However, I have some requirement to call another API (running on HTTP) from by NodeJS backend.

How to make a http call over https?


问:
Setting up a blog on AWS Cloud9
I'm new to programming, and i've been following the upskill course for about 2 weeks now. Everything was going great untill yesterday. I started the Deep Dive: Build a Blog section that uses Cloud9 and Ruby to build a blog. I have tried many times to follow the exact same path as the instructor but i keep on having the same problem.

The commands that I input in the terminal are the following (I do this on a new environment with the default settings).

$ rails new blog
Then the instructor ask us to change the 'sqlite3' line in the file called "gemfile" into gem 'sqlite3', '1.3.13'. To use the same version as him.

I then inpunt :

cd

cd environment

cd blog

bundle install

bundle update

rails generate scaffold Post title:string body:text

rake db:migrate

rails server
It is at this point that the problem occurs. The instructor terminal's response 3 more lines that i don't have .  In my case the output stops at Ctrl c to shut down.

Plus after that the instructor click preview running application and is sent to the "ruby welcome page". He then get rid of a part of the URL to go to the blog. In my case the URL is completely different from his, it looks like that https://c187d78accd944209c8f91023e991d71.vfs.cloud9.us-east-2.amazonaws.com/ (actual URL). and his like that

Please help to solve this i can not see anything in preview page.

Do you guys know what I've been doing wrong ?

Thank you for reading all of these it's my first time posting so i hope it's kind of understandable.

Have a great day

I am trying to solve this problem but i can't solve this.
please help me why i am not see anything in preview page ?

Title: Setting up a blog on AWS Cloud9


问:
URL is not openning in cypress, its open when i tried to open in chrome browser
I have written the below code in my test file but it will not open the URL in the cypress test runner.

```<code>describe("Failing tests", function () {
  it("Verify user can access home page", () => {
    cy.visit('https://npr--e2e.sandbox.my.site.com/contact/s/');
    cy.get('contentCaption.contentCaption').should("be.visible");
  });
});
</code>```

This URL is open when I try to open it manually in normal browser.

Body:
I have written the below code in my test file but it will not open the URL in the cypress test runner.

describe("Failing tests", function () {
  it("Verify user can access home page", () => {
    cy.visit('https://npr--e2e.sandbox.my.site.com/contact/s/');
    cy.get('contentCaption.contentCaption').should("be.visible");
  });
});

This URL is open when I try to open it manually in normal browser.


问:
Efficient data storage for large matrix of tabular data
I have a large matrix of RNA expression data (~5gb uncompressed). Patient id's across the columns, each row is a particular gene, and values are relative log expression (floats, can be positive or negative).

gene
patient-1
patient-2
patient-3
...

tp53
1.3483
3.2842
-1.8482
...

brca
4.3483
2.2842
-3.83282
...

...
...
...
...
...

Matrix size is ~ 60k rows x 20k columns. I would like to find an efficient storage & partitioning scheme to allow for on-demand retrieval of n rows x m columns. For example, use cases such as

fetch [gene-1, gene-53, gene-833] for [patient-32, patient-1888, patient-2039] (9 datum).

fetch [gene-1, gene-53, gene-833] for ALL patients (~60k datum).

Unstacking the frame and writing to relational DB results in ~1 billion rows with many repetitive values. Partitioning in parquet is attractive too, but partitioning by either patient or gene results in too many partitions and inflates the files with schema overhead.

Either object storage or relational / non-relational database storage is feasible.

The data will be written once, and not updated. Priority is read-speed, maintenance effort & cost, in that order.

Deployment will be within AWS, reads mostly coming from kubernetes deployed microservices written in python or java.

The precise float values are not important, i.e., open to rounding off to 4 sig figs if it helps compress the data.

What are some considerations when persisting this type of data?


问:
why is this giving a syntax error ? resolve.fallback: { "http": require.resolve("stream-http") }
I am using a pdf-parse library. When i execute my code it gave the following error

Module not found: Error: Can't resolve 'url' in 'D:\FYP material\website tutorial\newone\fem-2\node_modules\pdf-parse\lib\pdf.js\v1.10.100\build'

```<code>BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }

webpack compiled with 9 errors
</code>```

After some research i found to include resolve.fallback: { "http": require.resolve("stream-http") } in my web.config.js which is located in nodemodules/reactscripts/config/web.config.js but when i put this in my web.config.js it gave a sytax error "; expected". Please help or devise an alternative solution

I tried resolve.fallback: { "http": require.resolve("stream-http") }

and
resolve: {
fallback: {
"http": require.resolve("stream-http")
}
}
in my module.exports in web.config.js but gave a syntax error

Body:
I am using a pdf-parse library. When i execute my code it gave the following error

Module not found: Error: Can't resolve 'url' in 'D:\FYP material\website tutorial\newone\fem-2\node_modules\pdf-parse\lib\pdf.js\v1.10.100\build'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }

webpack compiled with 9 errors

After some research i found to include resolve.fallback: { "http": require.resolve("stream-http") } in my web.config.js which is located in nodemodules/reactscripts/config/web.config.js but when i put this in my web.config.js it gave a sytax error "; expected". Please help or devise an alternative solution

I tried resolve.fallback: { "http": require.resolve("stream-http") }

and
resolve: {
fallback: {
"http": require.resolve("stream-http")
}
}
in my module.exports in web.config.js but gave a syntax error


问:
Why is wikipedia.summary(string) removing letters from my string?
I am working on a program that can search wikipedia given an input like: "Who is Elon Musk" - however, with his specific example (and others), when the variable is placed into wikipedia.summary(string), it removes the "l" in "Elon Musk". Attached is my function:

```<code>import wikipedia
import spacy
def search_wiki(self, search):
    nlp = spacy.load('en_core_web_sm')
    doc = nlp(search)
    subject_phrase = get_subject_phrase(doc)
    try:
        results = wikipedia.page(str(subject_phrase)) #removes here
        final = results
        print(wikipedia.summary(final, sentences=1))
    except wikipedia.exceptions.PageError:
        results = wikipedia.search(str(subject_phrase))
        print("\nDid you mean " + results[0] + "?\n")
        possible = results[0]
        if input() == "yes":
            final = possible
            print(final) #prints "Elon Musk"
            print(wikipedia.summary(final, sentences=1)) #removes here too
        else:
            print("\nThese are the other searches that came up for " + str(subject_phrase) + ":\n")
            for r in results:
                print(r)
            print("\nPlease type the result you want me to search for:\n")
            final = input()
            print(wikipedia.summary(final, sentences=1))
    except wikipedia.exceptions.DisambiguationError as e:
        print("I couldn't find anything for " + str(subject_phrase) + ". Here are some related results:")
        for o in e.options:
            print(o)
        print("\nWhich of these did you mean?")
        final = input()
        print(wikipedia.summary(final, sentences=2))
    print("\nWould you like to hear more about " + final + "?\n")
    if input() == "yes":
        print("\nYou can read more about " + final + " at " + wikipedia.page(final).url + "\n")
        entry = wikipedia.summary(final, sentences=3)
        return lambda: entry, True
    else:
        entry = wikipedia.summary(final, sentences=1)
        return lambda: entry, False`
</code>```

I am pretty stuck, I have the variable printing right before the call to wikipedia.summary(string), so I know that the variable is not changing on my end (or at least I think).

Body:
I am working on a program that can search wikipedia given an input like: "Who is Elon Musk" - however, with his specific example (and others), when the variable is placed into wikipedia.summary(string), it removes the "l" in "Elon Musk". Attached is my function:

import wikipedia
import spacy
def search_wiki(self, search):
    nlp = spacy.load('en_core_web_sm')
    doc = nlp(search)
    subject_phrase = get_subject_phrase(doc)
    try:
        results = wikipedia.page(str(subject_phrase)) #removes here
        final = results
        print(wikipedia.summary(final, sentences=1))
    except wikipedia.exceptions.PageError:
        results = wikipedia.search(str(subject_phrase))
        print("\nDid you mean " + results[0] + "?\n")
        possible = results[0]
        if input() == "yes":
            final = possible
            print(final) #prints "Elon Musk"
            print(wikipedia.summary(final, sentences=1)) #removes here too
        else:
            print("\nThese are the other searches that came up for " + str(subject_phrase) + ":\n")
            for r in results:
                print(r)
            print("\nPlease type the result you want me to search for:\n")
            final = input()
            print(wikipedia.summary(final, sentences=1))
    except wikipedia.exceptions.DisambiguationError as e:
        print("I couldn't find anything for " + str(subject_phrase) + ". Here are some related results:")
        for o in e.options:
            print(o)
        print("\nWhich of these did you mean?")
        final = input()
        print(wikipedia.summary(final, sentences=2))
    print("\nWould you like to hear more about " + final + "?\n")
    if input() == "yes":
        print("\nYou can read more about " + final + " at " + wikipedia.page(final).url + "\n")
        entry = wikipedia.summary(final, sentences=3)
        return lambda: entry, True
    else:
        entry = wikipedia.summary(final, sentences=1)
        return lambda: entry, False`

I am pretty stuck, I have the variable printing right before the call to wikipedia.summary(string), so I know that the variable is not changing on my end (or at least I think).


问:
Can't close position with ccxt bybit create_order
Can't close my position. Exemple here with an actual 'side': 'long' on bybit.
ccxt version:  2.4.70
PAIR use 'ETH/USDT:USDT'

```<code>def place_market_order(self, symbol, side, amount, reduce=False):
        try:
            return self._session.create_order(
                symbol,
                'market',
                side,
                self.convert_amount_to_precision(symbol, amount),
                None,
                params={'reduceOnly': reduce},
            )

        except BaseException as err:
            raise Exception(err)

bybit.place_market_order(pair, "sell", close_long_quantity, reduce=True)

</code>```
```<code>TypeError: PerpBybit.authentication_required.<locals>.wrapped() got an unexpected keyword argument 'reduce'
</code>```

I am not sure i am using the good function on ccxt.bybit. But i am confused of which one use so.

In the ccxt/bybit.py create_order has not 'reduceOnly' param. But other has it like

```<code>.create_contract_v3_order()
.create_unified_margin_order()
.create_usdc_order()
.create_spot_order()
</code>```

Body:
Can't close my position. Exemple here with an actual 'side': 'long' on bybit.
ccxt version:  2.4.70
PAIR use 'ETH/USDT:USDT'

def place_market_order(self, symbol, side, amount, reduce=False):
        try:
            return self._session.create_order(
                symbol,
                'market',
                side,
                self.convert_amount_to_precision(symbol, amount),
                None,
                params={'reduceOnly': reduce},
            )

        except BaseException as err:
            raise Exception(err)

bybit.place_market_order(pair, "sell", close_long_quantity, reduce=True)

TypeError: PerpBybit.authentication_required.<locals>.wrapped() got an unexpected keyword argument 'reduce'

I am not sure i am using the good function on ccxt.bybit. But i am confused of which one use so.

In the ccxt/bybit.py create_order has not 'reduceOnly' param. But other has it like

.create_contract_v3_order()
.create_unified_margin_order()
.create_usdc_order()
.create_spot_order()


问:
Rocket chat upgrade Error: Can't find migration version XXX
I'm using old Rocketchat version 3.2.1 instance with external mongodb version 4.2.23
My desire is to upgrade it by using newer version insatnce, tried connecting new rocketchat version 5.3.1 instance to the external mongodb, result rocketchat service failing on "Error: Can't find migration version 123
Any advice what am I missing or how to achieve it?

Database Migration 123 is the current on old, working instance.

Connecting external mongodb 4.2.23 from old rocketchat version instance 3.2.1 to newer rocketchat version 5.3.0 instance


问:
How to add buttons (links) to Geonode Menu bar using geonode-project 4.1.x?
I just install Geonode-project 4.1.x and try to follow the official documentation (https://docs.geonode.org/en/4.x/devel/workshops/index.html#customize-the-look-and-feel) to customize the look and add some Links (buttons) to the navigarion bar.
So far I have created the templatetags folder and create the "get_menu_json.py" file with the following content

```<code>from django import template

register = template.Library()

@register.simple_tag(takes_context=True)
def get_base_right_topbar_menu(context):

    #is_mobile = _is_mobile_device(context)

    #if is_mobile:
    #    return []

    return [
        {
            "type": "link",
            "href": "/",
            "label": "Custom 3"
        },
        {
            "type": "link",
            "href": "/",
            "label": "Custom 4"
        },
    ]
@register.simple_tag(takes_context=True)
def get_base_left_topbar_menu(context):

    #is_mobile = _is_mobile_device(context)

    return [
        {
            "type": "link",
            "href": "/",
            "label": "Custom 1"
        },
        {
            "type": "link",
            "href": "/",
            "label": "Custom 2"
        },
    ]
</code>```

I have also modified the settings.py to add the templatetags

```<code>TEMPLATES[0]['OPTIONS']['libraries']={
                'my_template_tag_menu': 'templatetags.get_menu_json',
            }
</code>```

But this is not working. Geonode is still showing the same buttons (Dataset, Maps, etc). My intention is to add (I am saying add, not override) buttons to the Navigation Bar, so i can access the new views I have created for geonode project. I am using geonode-project 4.1.x. Documentations appears to be outdated.

Body:
I just install Geonode-project 4.1.x and try to follow the official documentation (https://docs.geonode.org/en/4.x/devel/workshops/index.html#customize-the-look-and-feel) to customize the look and add some Links (buttons) to the navigarion bar.
So far I have created the templatetags folder and create the "get_menu_json.py" file with the following content

from django import template

register = template.Library()

@register.simple_tag(takes_context=True)
def get_base_right_topbar_menu(context):

    #is_mobile = _is_mobile_device(context)

    #if is_mobile:
    #    return []

    return [
        {
            "type": "link",
            "href": "/",
            "label": "Custom 3"
        },
        {
            "type": "link",
            "href": "/",
            "label": "Custom 4"
        },
    ]
@register.simple_tag(takes_context=True)
def get_base_left_topbar_menu(context):

    #is_mobile = _is_mobile_device(context)

    return [
        {
            "type": "link",
            "href": "/",
            "label": "Custom 1"
        },
        {
            "type": "link",
            "href": "/",
            "label": "Custom 2"
        },
    ]

I have also modified the settings.py to add the templatetags

TEMPLATES[0]['OPTIONS']['libraries']={
                'my_template_tag_menu': 'templatetags.get_menu_json',
            }

But this is not working. Geonode is still showing the same buttons (Dataset, Maps, etc). My intention is to add (I am saying add, not override) buttons to the Navigation Bar, so i can access the new views I have created for geonode project. I am using geonode-project 4.1.x. Documentations appears to be outdated.


问:
WinApi window is not displayed
I have a simple code that converts a written number into binary format. But when trying to run the project, the window just doesn't show up. I don't know what the problem is, so hopefully you can help me. I use Visual Studio 2022

Code:

#include "App.h"

CApp::CApp()
{
    using std::wstring;
    using std::string;

    try
    {
        this->init_native_window_obj();
        this->create_native_controls();
    }
    catch (const std::exception& e)
    {
        string expt_data = e.what();

        MessageBox(nullptr, wstring(begin(expt_data), end(expt_data)).c_str(), L"Помилка", MB_ICONERROR | MB_OK);
        ExitProcess(EXIT_FAILURE);
    }
}

void CApp::init_native_window_obj()
{
    using std::runtime_error;
    using namespace std::string_literals;

    WNDCLASSEX _wc{ sizeof(WNDCLASSEX) };
    _wc.cbClsExtra = 0;
    _wc.cbWndExtra = 0;
    _wc.hbrBackground = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
    _wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
    _wc.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
    _wc.hIconSm = LoadIcon(nullptr, IDI_APPLICATION);
    _wc.hInstance = GetModuleHandle(nullptr);
    _wc.lpfnWndProc = CApp::application_proc;
    _wc.lpszClassName = this->m_szClassName.c_str();
    _wc.lpszMenuName = nullptr;
    _wc.style = CS_HREDRAW | CS_VREDRAW;

    if (!RegisterClassEx(&_wc))
        throw runtime_error("Error, can't register main window class!"s);

    RECT _windowRC{ 0, 0, this->m_AppWidth, this->m_AppHeight };
    AdjustWindowRect(&_windowRC, WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZE, false);

    if (this->m_hWnd = CreateWindowEx(
        0,
        this->m_szClassName.c_str(),
        this->m_szAppName.c_str(),
        WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZE,
        (GetSystemMetrics(SM_CXSCREEN) - _windowRC.right) / 2,
        (GetSystemMetrics(SM_CYSCREEN) - _windowRC.bottom) / 2,
        _windowRC.right, _windowRC.bottom, nullptr, nullptr, nullptr, this
    ), !this->m_hWnd)
        throw runtime_error("Error, can't create main window");
}

void CApp::create_native_controls()
{
    using std::runtime_error;
    using namespace::std::string_literals;

    if (this->m_hWndButton = CreateWindowEx(
        0,
        L"BUTTON",
        L"Перевести",
        WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
        56, 108, 238, 37, this->m_hWnd, reinterpret_cast<HMENU>(CApp::CTL_ID::CALCBUTTON_ID), nullptr, nullptr
    ), !this->m_hWndButton)
        throw runtime_error("Error, can't create button!"s);

    if (this->m_hWndEdit = CreateWindowEx(
        WS_EX_CLIENTEDGE,
        L"EDIT",
        L"256",
        WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL,
        56, 66, 238, 24, this->m_hWnd, reinterpret_cast<HMENU>(CApp::CTL_ID::RESULTEDIT_ID), nullptr, nullptr
    ), !this->m_hWndEdit)
        throw runtime_error("Error, can't create edit!"s);

    HFONT hFont = CreateFont(18, 0, 0, 0, FW_REGULAR, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, DEFAULT_PITCH, L"Roboto");
    SendMessage(this->m_hWndEdit, WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);
    SendMessage(this->m_hWndButton, WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);
}

int CApp::Run()
{
    MSG _msg{};
    ShowWindow(this->m_hWnd, SW_SHOWDEFAULT);
    UpdateWindow(this->m_hWnd);
    while (GetMessage(&_msg, nullptr, 0, 0))
    {
        TranslateMessage(&_msg);
        DispatchMessage(&_msg);
    }
    return static_cast<int>(_msg.wParam);
}

LRESULT CApp::application_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    CApp* pApp;

    if (uMsg == WM_NCCREATE)
    {
        pApp = static_cast<CApp*>(reinterpret_cast<CREATESTRUCT*>(lParam)->lpCreateParams);
        SetLastError(0);
        if (!SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pApp)))
        {
            if (GetLastError() != 0)
            {
                return false;
            }
        }
    }
    else
    {
        pApp = reinterpret_cast<CApp*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
    }

    if (pApp)
    {
        pApp->m_hWnd = hWnd;
        return pApp->window_proc(hWnd, uMsg, wParam, lParam);
    }
    return DefWindowProc(hWnd, uMsg, wParam, lParam);
}

LRESULT CApp::window_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
        case WM_DESTROY:
        {
            PostQuitMessage(EXIT_SUCCESS);
        }
        return 0;
        case WM_COMMAND:
        {
            switch (static_cast<CApp::CTL_ID>(LOWORD(wParam)))
            {
                case CApp::CTL_ID::CALCBUTTON_ID:
                {
                    try
                    {
                        std::wstring text{};
                        text.resize(MAX_PATH);
                        GetWindowText(this->m_hWndEdit, &text[0], MAX_PATH);
                        text.erase(remove(begin(text), end(text), 0), end(text));

                        if (text.empty())
                        {
                            MessageBox(this->m_hWnd, L"Введіть число!", L"Інформація", MB_ICONINFORMATION | MB_OK);
                            break;
                        }
                        std::string binary = std::bitset<16>(std::stoi(text)).to_string();
                        text = std::wstring(begin(binary), end(binary));

                        SetWindowText(this->m_hWndEdit, text.c_str());
                    }
                    catch(...)
                    {
                        MessageBox(this->m_hWnd, L"error", MB_ICONINFORMATION | MB_OK);
                    }
                }
                break;
            }
        }
        return 0;
    }
}

CApp::~CApp() {}
```

I tried changing window styles, changing the location when the window refreshes, but nothing has helped.

Title: WinApi window is not displayed

Body:
I have a simple code that converts a written number into binary format. But when trying to run the project, the window just doesn't show up. I don't know what the problem is, so hopefully you can help me. I use Visual Studio 2022

Code:

#include "App.h"

CApp::CApp()
{
    using std::wstring;
    using std::string;

    try
    {
        this->init_native_window_obj();
        this->create_native_controls();
    }
    catch (const std::exception& e)
    {
        string expt_data = e.what();

        MessageBox(nullptr, wstring(begin(expt_data), end(expt_data)).c_str(), L"Помилка", MB_ICONERROR | MB_OK);
        ExitProcess(EXIT_FAILURE);
    }
}

void CApp::init_native_window_obj()
{
    using std::runtime_error;
    using namespace std::string_literals;

    WNDCLASSEX _wc{ sizeof(WNDCLASSEX) };
    _wc.cbClsExtra = 0;
    _wc.cbWndExtra = 0;
    _wc.hbrBackground = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
    _wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
    _wc.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
    _wc.hIconSm = LoadIcon(nullptr, IDI_APPLICATION);
    _wc.hInstance = GetModuleHandle(nullptr);
    _wc.lpfnWndProc = CApp::application_proc;
    _wc.lpszClassName = this->m_szClassName.c_str();
    _wc.lpszMenuName = nullptr;
    _wc.style = CS_HREDRAW | CS_VREDRAW;

    if (!RegisterClassEx(&_wc))
        throw runtime_error("Error, can't register main window class!"s);

    RECT _windowRC{ 0, 0, this->m_AppWidth, this->m_AppHeight };
    AdjustWindowRect(&_windowRC, WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZE, false);

    if (this->m_hWnd = CreateWindowEx(
        0,
        this->m_szClassName.c_str(),
        this->m_szAppName.c_str(),
        WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZE,
        (GetSystemMetrics(SM_CXSCREEN) - _windowRC.right) / 2,
        (GetSystemMetrics(SM_CYSCREEN) - _windowRC.bottom) / 2,
        _windowRC.right, _windowRC.bottom, nullptr, nullptr, nullptr, this
    ), !this->m_hWnd)
        throw runtime_error("Error, can't create main window");
}

void CApp::create_native_controls()
{
    using std::runtime_error;
    using namespace::std::string_literals;

    if (this->m_hWndButton = CreateWindowEx(
        0,
        L"BUTTON",
        L"Перевести",
        WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
        56, 108, 238, 37, this->m_hWnd, reinterpret_cast<HMENU>(CApp::CTL_ID::CALCBUTTON_ID), nullptr, nullptr
    ), !this->m_hWndButton)
        throw runtime_error("Error, can't create button!"s);

    if (this->m_hWndEdit = CreateWindowEx(
        WS_EX_CLIENTEDGE,
        L"EDIT",
        L"256",
        WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL,
        56, 66, 238, 24, this->m_hWnd, reinterpret_cast<HMENU>(CApp::CTL_ID::RESULTEDIT_ID), nullptr, nullptr
    ), !this->m_hWndEdit)
        throw runtime_error("Error, can't create edit!"s);

    HFONT hFont = CreateFont(18, 0, 0, 0, FW_REGULAR, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, DEFAULT_PITCH, L"Roboto");
    SendMessage(this->m_hWndEdit, WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);
    SendMessage(this->m_hWndButton, WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);
}

int CApp::Run()
{
    MSG _msg{};
    ShowWindow(this->m_hWnd, SW_SHOWDEFAULT);
    UpdateWindow(this->m_hWnd);
    while (GetMessage(&_msg, nullptr, 0, 0))
    {
        TranslateMessage(&_msg);
        DispatchMessage(&_msg);
    }
    return static_cast<int>(_msg.wParam);
}

LRESULT CApp::application_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    CApp* pApp;

    if (uMsg == WM_NCCREATE)
    {
        pApp = static_cast<CApp*>(reinterpret_cast<CREATESTRUCT*>(lParam)->lpCreateParams);
        SetLastError(0);
        if (!SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pApp)))
        {
            if (GetLastError() != 0)
            {
                return false;
            }
        }
    }
    else
    {
        pApp = reinterpret_cast<CApp*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
    }

    if (pApp)
    {
        pApp->m_hWnd = hWnd;
        return pApp->window_proc(hWnd, uMsg, wParam, lParam);
    }
    return DefWindowProc(hWnd, uMsg, wParam, lParam);
}

LRESULT CApp::window_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
        case WM_DESTROY:
        {
            PostQuitMessage(EXIT_SUCCESS);
        }
        return 0;
        case WM_COMMAND:
        {
            switch (static_cast<CApp::CTL_ID>(LOWORD(wParam)))
            {
                case CApp::CTL_ID::CALCBUTTON_ID:
                {
                    try
                    {
                        std::wstring text{};
                        text.resize(MAX_PATH);
                        GetWindowText(this->m_hWndEdit, &text[0], MAX_PATH);
                        text.erase(remove(begin(text), end(text), 0), end(text));

                        if (text.empty())
                        {
                            MessageBox(this->m_hWnd, L"Введіть число!", L"Інформація", MB_ICONINFORMATION | MB_OK);
                            break;
                        }
                        std::string binary = std::bitset<16>(std::stoi(text)).to_string();
                        text = std::wstring(begin(binary), end(binary));

                        SetWindowText(this->m_hWndEdit, text.c_str());
                    }
                    catch(...)
                    {
                        MessageBox(this->m_hWnd, L"error", MB_ICONINFORMATION | MB_OK);
                    }
                }
                break;
            }
        }
        return 0;
    }
}

CApp::~CApp() {}

I tried changing window styles, changing the location when the window refreshes, but nothing has helped.


问:
How can I get rid of these vertical lines in VSCode?
How can I remove these vertical lines? - macOS

Edit: Not the best screenshot (the vertical line on the far right)

I've added in settings.json:

```<code>"editor.rulers": [],
</code>```

But doesn't change anything.

Body:
How can I remove these vertical lines? - macOS

Edit: Not the best screenshot (the vertical line on the far right)

I've added in settings.json:

"editor.rulers": [],

But doesn't change anything.


问:
Selenium doesn't find my chromium driver downloaded with webdriver_manager
I'm trying to make a project J4F (Just for Fun) and I've decided to start learning Selenium. but I've a problem after webdriver_manager download the correct drivere the selinium's Service doesn't find it.

This is my code, a direct copy-paste from the pypi's page

```<code>from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromiumService
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.utils import ChromeType

driver = webdriver.Chrome(service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))

</code>```

If I go into /Users/<my_username>/.wdm/drivers/chromedriver/mac64/108.0.5359 there are the two file needed chromedriver and drivers.zip,

If I print 'ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()' it's the correct path and right now i'm lost...

I'm on a MacOS Monterey with PyCharm (I've already tried reboot of pycharm, reinstall pacakges with pip/pip3 update pip)

I don't have chriumium installed I use Brave, but, even if I try with the webdriver_manager of Brave nothing new happen. This is the error's Traceback:

```<code>Traceback (most recent call last):
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/downloader.py", line 6, in <module>
    driver = webdriver.Chrome(service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    super().__init__(
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 106, in __init__
    super().__init__(
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 288, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 381, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
    self.error_handler.check_response(response)
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
Stacktrace:
0   chromedriver                        0x00000001065bcf38 chromedriver + 4910904
1   chromedriver                        0x000000010653ca03 chromedriver + 4385283
2   chromedriver                        0x0000000106181747 chromedriver + 472903
3   chromedriver                        0x00000001061ac87a chromedriver + 649338
4   chromedriver                        0x00000001061aa4a2 chromedriver + 640162
5   chromedriver                        0x00000001061f5460 chromedriver + 947296
6   chromedriver                        0x00000001061f4cbf chromedriver + 945343
7   chromedriver                        0x00000001061ebee3 chromedriver + 909027
8   chromedriver                        0x00000001061b630c chromedriver + 688908
9   chromedriver                        0x00000001061b788e chromedriver + 694414
10  chromedriver                        0x000000010658a1de chromedriver + 4702686
11  chromedriver                        0x000000010658eb19 chromedriver + 4721433
12  chromedriver                        0x000000010659628e chromedriver + 4752014
13  chromedriver                        0x000000010658f91a chromedriver + 4725018
14  chromedriver                        0x0000000106563b02 chromedriver + 4545282
15  chromedriver                        0x00000001065ae888 chromedriver + 4851848
16  chromedriver                        0x00000001065aea05 chromedriver + 4852229
17  chromedriver                        0x00000001065c4e5f chromedriver + 4943455
18  libsystem_pthread.dylib             0x00007ff8089184e1 _pthread_start + 125
19  libsystem_pthread.dylib             0x00007ff808913f6b thread_start + 15
</code>```

As you have gussed my "objective" is to have a chromium window open

Body:
I'm trying to make a project J4F (Just for Fun) and I've decided to start learning Selenium. but I've a problem after webdriver_manager download the correct drivere the selinium's Service doesn't find it.

This is my code, a direct copy-paste from the pypi's page

from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromiumService
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.utils import ChromeType

driver = webdriver.Chrome(service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))

If I go into /Users/<my_username>/.wdm/drivers/chromedriver/mac64/108.0.5359 there are the two file needed chromedriver and drivers.zip,

If I print 'ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()' it's the correct path and right now i'm lost...

I'm on a MacOS Monterey with PyCharm (I've already tried reboot of pycharm, reinstall pacakges with pip/pip3 update pip)

I don't have chriumium installed I use Brave, but, even if I try with the webdriver_manager of Brave nothing new happen. This is the error's Traceback:

Traceback (most recent call last):
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/downloader.py", line 6, in <module>
    driver = webdriver.Chrome(service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    super().__init__(
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 106, in __init__
    super().__init__(
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 288, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 381, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
    self.error_handler.check_response(response)
  File "/Users/<my_username>/PycharmProjects/<my_projectname>/venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
Stacktrace:
0   chromedriver                        0x00000001065bcf38 chromedriver + 4910904
1   chromedriver                        0x000000010653ca03 chromedriver + 4385283
2   chromedriver                        0x0000000106181747 chromedriver + 472903
3   chromedriver                        0x00000001061ac87a chromedriver + 649338
4   chromedriver                        0x00000001061aa4a2 chromedriver + 640162
5   chromedriver                        0x00000001061f5460 chromedriver + 947296
6   chromedriver                        0x00000001061f4cbf chromedriver + 945343
7   chromedriver                        0x00000001061ebee3 chromedriver + 909027
8   chromedriver                        0x00000001061b630c chromedriver + 688908
9   chromedriver                        0x00000001061b788e chromedriver + 694414
10  chromedriver                        0x000000010658a1de chromedriver + 4702686
11  chromedriver                        0x000000010658eb19 chromedriver + 4721433
12  chromedriver                        0x000000010659628e chromedriver + 4752014
13  chromedriver                        0x000000010658f91a chromedriver + 4725018
14  chromedriver                        0x0000000106563b02 chromedriver + 4545282
15  chromedriver                        0x00000001065ae888 chromedriver + 4851848
16  chromedriver                        0x00000001065aea05 chromedriver + 4852229
17  chromedriver                        0x00000001065c4e5f chromedriver + 4943455
18  libsystem_pthread.dylib             0x00007ff8089184e1 _pthread_start + 125
19  libsystem_pthread.dylib             0x00007ff808913f6b thread_start + 15

As you have gussed my "objective" is to have a chromium window open


问:
Event with DAC SMEmail
Impossible to do this event when we receive email.
this event works when you create the email manually

```<code>  protected void SMEmail_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
  {
  var row = (SMEmail)e.Row;
  cache.SetValueExt<SMEmail.subject>(row, row.Subject+"/INS");
  Base.Actions.PressSave();
  }
</code>```

or

```<code>  protected void SMEmail_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
  {
  var row = (SMEmail)e.Row;
  row.subject+=row.Subject+"/INS";
  }
</code>```

What even we can use when acumatica receipt automatic email.
Xavier

Title: Event with DAC SMEmail

Body:
Impossible to do this event when we receive email.
this event works when you create the email manually

  protected void SMEmail_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
  {
  var row = (SMEmail)e.Row;
  cache.SetValueExt<SMEmail.subject>(row, row.Subject+"/INS");
  Base.Actions.PressSave();
  }

or

  protected void SMEmail_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
  {
  var row = (SMEmail)e.Row;
  row.subject+=row.Subject+"/INS";
  }

What even we can use when acumatica receipt automatic email.
Xavier


问:
Not getting plain text response using Cronet Engine with Brotli enabled
I am using CronetEngine for making a network request as below

```<code>val engine: CronetEngine = CronetEngine.Builder(context).enableQuic(false)
                            .enableBrotli(true)
                            .enableHttp2(false).build()
val callFactory: Call.Factory = CronetCallFactory.newBuilder(engine).build()
</code>```

And calling the result as

```<code>request = Request.Builder()
                    .url(url)
                    .post(formBody.build())
                    .headers(headers)
                    .build()
callFactory.newCall(request).enqueue(object : Callback {
                override fun onFailure(call: Call, e: IOException) {

                }

                override fun onResponse(call: Call, response: Response) {
                    result = response.body?.string()
                    mResponseCode = response.code
                    mResponseHeader = response.headers.toMultimap()
                }
            })
</code>```

I am getting the response in compressed format.

Where as I want it in plain text or decompressed format.

Any configuration I am missing here?

Body:
I am using CronetEngine for making a network request as below

val engine: CronetEngine = CronetEngine.Builder(context).enableQuic(false)
                            .enableBrotli(true)
                            .enableHttp2(false).build()
val callFactory: Call.Factory = CronetCallFactory.newBuilder(engine).build()

And calling the result as

request = Request.Builder()
                    .url(url)
                    .post(formBody.build())
                    .headers(headers)
                    .build()
callFactory.newCall(request).enqueue(object : Callback {
                override fun onFailure(call: Call, e: IOException) {

                }

                override fun onResponse(call: Call, response: Response) {
                    result = response.body?.string()
                    mResponseCode = response.code
                    mResponseHeader = response.headers.toMultimap()
                }
            })

I am getting the response in compressed format.

Where as I want it in plain text or decompressed format.

Any configuration I am missing here?


问:
How to add Classes: True setting to Vee Validate on Nuxt 3?
I'm looking to use Vee Validate on Nuxt 3. I've got it set up and functional, with two files for plugins. One as components.ts and the other rules.ts.

I have read in the documentation that you can use:

import Vue from 'vue';
import VeeValidate from 'vee-validate';

Vue.use(VeeValidate, {
  classes: true
});
```

But I am not exactly sure where I can use this with the Nuxt setup as it is a little different and I suspect needs to be modified a bit.

I have tried using this in my plugin files, and on individual pages, but with no luck.

Body:
I'm looking to use Vee Validate on Nuxt 3. I've got it set up and functional, with two files for plugins. One as components.ts and the other rules.ts.

I have read in the documentation that you can use:

import Vue from 'vue';
import VeeValidate from 'vee-validate';

Vue.use(VeeValidate, {
  classes: true
});

But I am not exactly sure where I can use this with the Nuxt setup as it is a little different and I suspect needs to be modified a bit.

I have tried using this in my plugin files, and on individual pages, but with no luck.


问:
How can I change tkinter app pystray icon on specific case?
I have App class and I want to call "change_icon" definition from inside App class. In current situation it is only can be triggered with menu item of pystray.

Below is my code:

```<code>from pystray import MenuItem as item
import pystray
from PIL import Image
import tkinter as tk

class App:
    def __init__(self, window):
        self.window = window
        self.window.title("Welcome")

def quit_window(icon, item):
    icon.stop()
    window.destroy()

def change_icon(icon, item):
    icon.icon = Image.open("icon_notification.ico")

def show_window(icon, item):
    icon.stop()
    window.after(0,window.deiconify)

def withdraw_window():
    window.withdraw()
    image = Image.open("icon.ico")
    menu = (item('Quit', quit_window), item('Show', show_window), item("Change Icon", change_icon))
    icon = pystray.Icon("name", image, "title", menu)
    icon.run()

if __name__ == "__main__":
    window = tk.Tk()
    App(window)
    window.protocol('WM_DELETE_WINDOW', withdraw_window)
    window.mainloop()
</code>```

Body:
I have App class and I want to call "change_icon" definition from inside App class. In current situation it is only can be triggered with menu item of pystray.

Below is my code:

from pystray import MenuItem as item
import pystray
from PIL import Image
import tkinter as tk

class App:
    def __init__(self, window):
        self.window = window
        self.window.title("Welcome")

def quit_window(icon, item):
    icon.stop()
    window.destroy()

def change_icon(icon, item):
    icon.icon = Image.open("icon_notification.ico")

def show_window(icon, item):
    icon.stop()
    window.after(0,window.deiconify)

def withdraw_window():
    window.withdraw()
    image = Image.open("icon.ico")
    menu = (item('Quit', quit_window), item('Show', show_window), item("Change Icon", change_icon))
    icon = pystray.Icon("name", image, "title", menu)
    icon.run()

if __name__ == "__main__":
    window = tk.Tk()
    App(window)
    window.protocol('WM_DELETE_WINDOW', withdraw_window)
    window.mainloop()


问:
custom modal pop-up when blocking navigation with typescript and react
I am trying to block a user from navigation away with unsaved changes. Using onbeforeunload pops up the standard window alert. I have functionality that triggers the custom pop up when a part of the page is in edit view. I am struggling to find a way to get the custom modal to trigger during the unload process instead of as soon as the view changes to edit, and in place of the standard window alert. the project is using typescript and react.

```<code>const handleEditClick = () => {
  setDisplay(DISPLAY_MODE.EDIT);
  setShowLeavePageWarning(true);
}

const handleConfirmNav = () => {
  setDisplay(DISPLAY_MODE.VIEW);
  setShowLeavePageWarning(false);
}

const inintBeforeUnload = (showLeavePageWarning: boolean) => {
  window.onbeforeunload = (useNavigate) => {
    if (showLeavePageWarning) {
      const e = useNavigate;
      e.preventDefault();
      if (e) {
        e.returnValue = "";
      }
      return "";
    }
  };
};

function useLeavePageModal() {
  if (DISPLAY_MODE.EDIT) {
    setShowLeavePageWarning(true);
  }
  window.onbeforeunload = function = () {
    initbeforeunload(showLeavePageWarning);
  };

  useEffect(() => {
    initBeforeUnload(showLeavePageWarning);
  } [showLeavePageWarning]);
  return LeavePageModal;
}
</code>```

This is currently triggering the modal as soon as the view changes. I'm not sure what I'm missing to have it wait until unload happen

Body:
I am trying to block a user from navigation away with unsaved changes. Using onbeforeunload pops up the standard window alert. I have functionality that triggers the custom pop up when a part of the page is in edit view. I am struggling to find a way to get the custom modal to trigger during the unload process instead of as soon as the view changes to edit, and in place of the standard window alert. the project is using typescript and react.

const handleEditClick = () => {
  setDisplay(DISPLAY_MODE.EDIT);
  setShowLeavePageWarning(true);
}

const handleConfirmNav = () => {
  setDisplay(DISPLAY_MODE.VIEW);
  setShowLeavePageWarning(false);
}

const inintBeforeUnload = (showLeavePageWarning: boolean) => {
  window.onbeforeunload = (useNavigate) => {
    if (showLeavePageWarning) {
      const e = useNavigate;
      e.preventDefault();
      if (e) {
        e.returnValue = "";
      }
      return "";
    }
  };
};

function useLeavePageModal() {
  if (DISPLAY_MODE.EDIT) {
    setShowLeavePageWarning(true);
  }
  window.onbeforeunload = function = () {
    initbeforeunload(showLeavePageWarning);
  };

  useEffect(() => {
    initBeforeUnload(showLeavePageWarning);
  } [showLeavePageWarning]);
  return LeavePageModal;
}

This is currently triggering the modal as soon as the view changes. I'm not sure what I'm missing to have it wait until unload happen


问:
problem when i add data on datasets to line chart (chatjs with vue-chatjs)
I have a problem with vue-chartjs.
I have updated vuejs v2 to v3 and vue-chartjs v3 to v5

Error is: InternalError: too much recursion

I have tried to add computed, modify many line of code, i don't remember all my modify, but that don't work.
I have found this topic: Adding data to line chart (chart.js with Vue.js) results in 'too much recursion' error but, He used composition api and me option api, but I have to make ref and shallowRef that make no difference.

My component actual code:

    <template>

Statistiques

 CPU (en %)

 RAM (en Mo)

 Disque (en Mo)

          <Line :data="chartData"
                :options="options" ref="stats"/>

    </template>

```

How to solve the recursion problem ?
It is because the object is so complex ?

I use vue-js 3.2.45 and vue-chartjs 5.1.0
Thanks for your help !

Body:
I have a problem with vue-chartjs.
I have updated vuejs v2 to v3 and vue-chartjs v3 to v5

Error is: InternalError: too much recursion

I have tried to add computed, modify many line of code, i don't remember all my modify, but that don't work.
I have found this topic: Adding data to line chart (chart.js with Vue.js) results in 'too much recursion' error but, He used composition api and me option api, but I have to make ref and shallowRef that make no difference.

My component actual code:

    <template>

Statistiques

 CPU (en %)

 RAM (en Mo)

 Disque (en Mo)

          <Line :data="chartData"
                :options="options" ref="stats"/>

    </template>

How to solve the recursion problem ?
It is because the object is so complex ?

I use vue-js 3.2.45 and vue-chartjs 5.1.0
Thanks for your help !