问:
How to get related rows in MySQL with objection.js and knex
I have two tables: notes and tags, related by note_tags

```<code>        .createTable('notes', function (table) {
            table.increments('id').primary()
            table.string('title', 100).notNullable()
            table.string('content', 300).notNullable()
            table.boolean('archived').notNullable().defaultTo(false)
            table.timestamp('updated_at').defaultTo(knex.raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));
        })
        .createTable('tags', function (table) {
            table.increments('id').primary()
            table.string('name', 20).notNullable()
        })
        .createTable('note_tags', function (table) {
            table.increments('id').primary()
            table.integer('note_id').unsigned().notNullable()
            table.integer('tag_id').unsigned().notNullable()
            table.foreign('note_id').references('notes.id')
            table.foreign('tag_id').references('tags.id')
        })
</code>```

I want to get all the "used" tags, the ones that have at least one relation with any note

I don't know much about SQL, and with help of copilot i tried with:

```<code>    async getUsedTags() {
        return await Tag.query()
            .select('tags.*')
            .join('notes_tags', 'tags.id', 'notes_tags.tag_id')
            .join('notes', 'notes.id', 'notes_tags.note_id')
            .where('notes.archived', false)
    }
</code>```

but it returns "ER_NO_SUCH_TABLE: Table 'ensolvers-challenge.notes_tags' doesn't exist"

Body:
I have two tables: notes and tags, related by note_tags

        .createTable('notes', function (table) {
            table.increments('id').primary()
            table.string('title', 100).notNullable()
            table.string('content', 300).notNullable()
            table.boolean('archived').notNullable().defaultTo(false)
            table.timestamp('updated_at').defaultTo(knex.raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));
        })
        .createTable('tags', function (table) {
            table.increments('id').primary()
            table.string('name', 20).notNullable()
        })
        .createTable('note_tags', function (table) {
            table.increments('id').primary()
            table.integer('note_id').unsigned().notNullable()
            table.integer('tag_id').unsigned().notNullable()
            table.foreign('note_id').references('notes.id')
            table.foreign('tag_id').references('tags.id')
        })

I want to get all the "used" tags, the ones that have at least one relation with any note

I don't know much about SQL, and with help of copilot i tried with:

    async getUsedTags() {
        return await Tag.query()
            .select('tags.*')
            .join('notes_tags', 'tags.id', 'notes_tags.tag_id')
            .join('notes', 'notes.id', 'notes_tags.note_id')
            .where('notes.archived', false)
    }

but it returns "ER_NO_SUCH_TABLE: Table 'ensolvers-challenge.notes_tags' doesn't exist"


来源: stackexchange

问:
error during running drush for drupal 9.4.8 on docker linux
am trying to run a drupal project using drush on  linux docker ,this is a backend project we use json api to connect to frontend nextjs. once i use any drush comman it give me this error :

```<code>[warning] include_once(/var/www/html/docroot/modules/contrib/rest_menu_items/rest_menu_items.module): failed to open stream: No such file or directory Extension.php:147
 [warning] include_once(): Failed opening '/var/www/html/docroot/modules/contrib/rest_menu_items/rest_menu_items.module' for inclusion (include_path='/var/www/html/vendor/pear/archive_tar:/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/pear_exception:.:/usr/local/lib/php') Extension.php:147
 [error]  ArgumentCountError: Too few arguments to function Drush\Drupal\Commands\config\ConfigExportCommands::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in Drush\Drupal\Commands\config\ConfigExportCommands->__construct() (line 86 of /var/www/html/vendor/drush/drush/src/Drupal/Commands/config/ConfigExportCommands.php) #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drush\Drupal\Commands\config\ConfigExportCommands->__construct(Object(Drupal\Core\Config\ConfigManager), Object(Drupal\Core\Config\CachedStorage))
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'config.export.c...')
#2 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('config.export.c...', 3)
#3 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#4 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'drush.command.s...')
#5 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(280): Drupal\Component\DependencyInjection\Container->get('drush.command.s...')
#6 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(246): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#7 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(293): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), NULL)
#8 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(493): Drush\Boot\BootstrapManager->doBootstrap(5, 6, NULL)
#9 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(427): Drush\Boot\BootstrapManager->bootstrapMax(6)
#10 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(396): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(-2, Object(Consolidation\AnnotatedCommand\AnnotationData))
#11 /var/www/html/vendor/drush/drush/src/Boot/BootstrapHook.php(28): Drush\Boot\BootstrapManager->bootstrapToPhase('max', Object(Consolidation\AnnotatedCommand\AnnotationData))
#12 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#13 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#14 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#15 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#16 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(375): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook(Object(Drush\Symfony\DrushArgvInput), Array, Object(Consolidation\AnnotatedCommand\AnnotationData))
#17 /var/www/html/vendor/symfony/console/Command/Command.php(221): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#24 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#25 {main}.
ArgumentCountError: Too few arguments to function Drush\Drupal\Commands\config\ConfigExportCommands::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in /var/www/html/vendor/drush/drush/src/Drupal/Commands/config/ConfigExportCommands.php on line 86 #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drush\Drupal\Commands\config\ConfigExportCommands->__construct(Object(Drupal\Core\Config\ConfigManager), Object(Drupal\Core\Config\CachedStorage))
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'config.export.c...')
#2 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('config.export.c...', 3)
#3 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#4 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'drush.command.s...')
#5 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(280): Drupal\Component\DependencyInjection\Container->get('drush.command.s...')
#6 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(246): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#7 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(293): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), NULL)
#8 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(493): Drush\Boot\BootstrapManager->doBootstrap(5, 6, NULL)
#9 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(427): Drush\Boot\BootstrapManager->bootstrapMax(6)
#10 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(396): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(-2, Object(Consolidation\AnnotatedCommand\AnnotationData))
#11 /var/www/html/vendor/drush/drush/src/Boot/BootstrapHook.php(28): Drush\Boot\BootstrapManager->bootstrapToPhase('max', Object(Consolidation\AnnotatedCommand\AnnotationData))
#12 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#13 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#14 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#15 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#16 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(375): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook(Object(Drush\Symfony\DrushArgvInput), Array, Object(Consolidation\AnnotatedCommand\AnnotationData))
#17 /var/www/html/vendor/symfony/console/Command/Command.php(221): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#24 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#25 {main}
ArgumentCountError: Too few arguments to function Drush\Drupal\Commands\config\ConfigExportCommands::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in Drush\Drupal\Commands\config\ConfigExportCommands->__construct() (line 86 of /var/www/html/vendor/drush/drush/src/Drupal/Commands/config/ConfigExportCommands.php).
 [warning] Drush command terminated abnormally.
</code>```

this is composer.json file:

```<code>"name": "drupal",
    "description": "Project for Drupal 9 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "^1.7",
        "drupal/acquia_connector": "^4.0",
        "drupal/acquia_search": "^3.1",
        "drupal/admin_toolbar": "^3.2.0",
        "drupal/adminimal_theme": "^1.4",
        "drupal/config_split": "^1.7",
        "drupal/core": "^9.4",
        "drupal/core-composer-scaffold": "^9.4.8",
        "drupal/core-project-message": "^9.4.8",
        "drupal/core-recommended": "^9.4.8",
        "drupal/decoupled_router": "^2.0",
        "drupal/editor_advanced_link": "^1.8",
        "drupal/field_group": "^3.1",
        "drupal/health_check": "^1.3",
        "drupal/improve_line_breaks_filter": "^1.3",
        "drupal/jsonapi_extras": "^3.16",
        "drupal/jsonapi_search_api": "^1.0@RC",
        "drupal/link_attributes": "^1.11",
        "drupal/link_field_autocomplete_filter": "^1.14",
        "drupal/linkit": "^5.0@beta",
        "drupal/menu_link_attributes": "^1.2",
        "drupal/metatag": "^1.15",
        "drupal/miniorange_saml": "^2.21",
        "drupal/mysql56": "^1.0@beta",
        "drupal/onlyone": "^1.10",
        "drupal/openid_connect": "^1.0",
        "drupal/paragraphs": "^1.12",
        "drupal/pathauto": "^1.8",
        "drupal/redirect": "^1.7",
        "drupal/rest_menu_items": "^3.0",
        "drupal/restui": "^1.21",
        "drupal/scheduler": "^1.3",
        "drupal/search_api": "^1.19",
        "drupal/search_api_solr": "^4.1",
        "drupal/simple_menu_icons": "^2.2",
        "drupal/subrequests": "^3.0",
        "drupal/svg_image": "^1.14",
        "drupal/url_redirect": "^2.62",
        "drush/drush": "~10"
    },
    "require-dev": {
        "drupal/core-dev": "^9.4.8"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "beta",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "composer/installers": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "cweagans/composer-patches": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true
        }
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "docroot/"
            }
        },
        "installer-paths": {
            "docroot/core": [
                "type:drupal-core"
            ],
            "docroot/libraries/{$name}": [
                "type:drupal-library"
            ],
            "docroot/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "docroot/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "docroot/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "docroot/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "docroot/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "docroot/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/8/install",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        },
        "patches": {
            "drupal/subrequests": {
                "Fix issue which give same result for multiple subrequests": "https://www.drupal.org/files/issues/2019-07-18/change_request_type-63049395-09.patch",
                "JSON validator issue": "https://www.drupal.org/files/issues/2019-05-27/3029570-array-not-object.patch",
                "Fix the no candidate token replacement": "patches/token-replacement-issue.patch.txt"
            },
            "drupal/metatag": {
                "Expose metatag through JSON:API": "https://www.drupal.org/files/issues/2020-02-29/2945817-93.patch"
            }
        }
    }
}
</code>```

this project is hosted on acquia hosting , online the project run but we have error on login :

"Drupal\acquia_connector\AuthService" not found in /mnt/www/html/website/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 #0 /mnt/www/html/website/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'acquia_connecto...')
#1

ContentLicense: CC BY-SA 4.0

Body:
am trying to run a drupal project using drush on  linux docker ,this is a backend project we use json api to connect to frontend nextjs. once i use any drush comman it give me this error :

[warning] include_once(/var/www/html/docroot/modules/contrib/rest_menu_items/rest_menu_items.module): failed to open stream: No such file or directory Extension.php:147
 [warning] include_once(): Failed opening '/var/www/html/docroot/modules/contrib/rest_menu_items/rest_menu_items.module' for inclusion (include_path='/var/www/html/vendor/pear/archive_tar:/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/pear_exception:.:/usr/local/lib/php') Extension.php:147
 [error]  ArgumentCountError: Too few arguments to function Drush\Drupal\Commands\config\ConfigExportCommands::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in Drush\Drupal\Commands\config\ConfigExportCommands->__construct() (line 86 of /var/www/html/vendor/drush/drush/src/Drupal/Commands/config/ConfigExportCommands.php) #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drush\Drupal\Commands\config\ConfigExportCommands->__construct(Object(Drupal\Core\Config\ConfigManager), Object(Drupal\Core\Config\CachedStorage))
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'config.export.c...')
#2 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('config.export.c...', 3)
#3 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#4 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'drush.command.s...')
#5 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(280): Drupal\Component\DependencyInjection\Container->get('drush.command.s...')
#6 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(246): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#7 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(293): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), NULL)
#8 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(493): Drush\Boot\BootstrapManager->doBootstrap(5, 6, NULL)
#9 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(427): Drush\Boot\BootstrapManager->bootstrapMax(6)
#10 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(396): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(-2, Object(Consolidation\AnnotatedCommand\AnnotationData))
#11 /var/www/html/vendor/drush/drush/src/Boot/BootstrapHook.php(28): Drush\Boot\BootstrapManager->bootstrapToPhase('max', Object(Consolidation\AnnotatedCommand\AnnotationData))
#12 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#13 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#14 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#15 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#16 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(375): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook(Object(Drush\Symfony\DrushArgvInput), Array, Object(Consolidation\AnnotatedCommand\AnnotationData))
#17 /var/www/html/vendor/symfony/console/Command/Command.php(221): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#24 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#25 {main}.
ArgumentCountError: Too few arguments to function Drush\Drupal\Commands\config\ConfigExportCommands::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in /var/www/html/vendor/drush/drush/src/Drupal/Commands/config/ConfigExportCommands.php on line 86 #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drush\Drupal\Commands\config\ConfigExportCommands->__construct(Object(Drupal\Core\Config\ConfigManager), Object(Drupal\Core\Config\CachedStorage))
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'config.export.c...')
#2 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('config.export.c...', 3)
#3 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#4 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'drush.command.s...')
#5 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(280): Drupal\Component\DependencyInjection\Container->get('drush.command.s...')
#6 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(246): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#7 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(293): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), NULL)
#8 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(493): Drush\Boot\BootstrapManager->doBootstrap(5, 6, NULL)
#9 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(427): Drush\Boot\BootstrapManager->bootstrapMax(6)
#10 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(396): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(-2, Object(Consolidation\AnnotatedCommand\AnnotationData))
#11 /var/www/html/vendor/drush/drush/src/Boot/BootstrapHook.php(28): Drush\Boot\BootstrapManager->bootstrapToPhase('max', Object(Consolidation\AnnotatedCommand\AnnotationData))
#12 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#13 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#14 /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#15 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#16 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(375): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook(Object(Drush\Symfony\DrushArgvInput), Array, Object(Consolidation\AnnotatedCommand\AnnotationData))
#17 /var/www/html/vendor/symfony/console/Command/Command.php(221): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#24 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#25 {main}
ArgumentCountError: Too few arguments to function Drush\Drupal\Commands\config\ConfigExportCommands::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in Drush\Drupal\Commands\config\ConfigExportCommands->__construct() (line 86 of /var/www/html/vendor/drush/drush/src/Drupal/Commands/config/ConfigExportCommands.php).
 [warning] Drush command terminated abnormally.

this is composer.json file:

"name": "drupal",
    "description": "Project for Drupal 9 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "^1.7",
        "drupal/acquia_connector": "^4.0",
        "drupal/acquia_search": "^3.1",
        "drupal/admin_toolbar": "^3.2.0",
        "drupal/adminimal_theme": "^1.4",
        "drupal/config_split": "^1.7",
        "drupal/core": "^9.4",
        "drupal/core-composer-scaffold": "^9.4.8",
        "drupal/core-project-message": "^9.4.8",
        "drupal/core-recommended": "^9.4.8",
        "drupal/decoupled_router": "^2.0",
        "drupal/editor_advanced_link": "^1.8",
        "drupal/field_group": "^3.1",
        "drupal/health_check": "^1.3",
        "drupal/improve_line_breaks_filter": "^1.3",
        "drupal/jsonapi_extras": "^3.16",
        "drupal/jsonapi_search_api": "^1.0@RC",
        "drupal/link_attributes": "^1.11",
        "drupal/link_field_autocomplete_filter": "^1.14",
        "drupal/linkit": "^5.0@beta",
        "drupal/menu_link_attributes": "^1.2",
        "drupal/metatag": "^1.15",
        "drupal/miniorange_saml": "^2.21",
        "drupal/mysql56": "^1.0@beta",
        "drupal/onlyone": "^1.10",
        "drupal/openid_connect": "^1.0",
        "drupal/paragraphs": "^1.12",
        "drupal/pathauto": "^1.8",
        "drupal/redirect": "^1.7",
        "drupal/rest_menu_items": "^3.0",
        "drupal/restui": "^1.21",
        "drupal/scheduler": "^1.3",
        "drupal/search_api": "^1.19",
        "drupal/search_api_solr": "^4.1",
        "drupal/simple_menu_icons": "^2.2",
        "drupal/subrequests": "^3.0",
        "drupal/svg_image": "^1.14",
        "drupal/url_redirect": "^2.62",
        "drush/drush": "~10"
    },
    "require-dev": {
        "drupal/core-dev": "^9.4.8"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "beta",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "composer/installers": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "cweagans/composer-patches": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true
        }
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "docroot/"
            }
        },
        "installer-paths": {
            "docroot/core": [
                "type:drupal-core"
            ],
            "docroot/libraries/{$name}": [
                "type:drupal-library"
            ],
            "docroot/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "docroot/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "docroot/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "docroot/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "docroot/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "docroot/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/8/install",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        },
        "patches": {
            "drupal/subrequests": {
                "Fix issue which give same result for multiple subrequests": "https://www.drupal.org/files/issues/2019-07-18/change_request_type-63049395-09.patch",
                "JSON validator issue": "https://www.drupal.org/files/issues/2019-05-27/3029570-array-not-object.patch",
                "Fix the no candidate token replacement": "patches/token-replacement-issue.patch.txt"
            },
            "drupal/metatag": {
                "Expose metatag through JSON:API": "https://www.drupal.org/files/issues/2020-02-29/2945817-93.patch"
            }
        }
    }
}

this project is hosted on acquia hosting , online the project run but we have error on login :

"Drupal\acquia_connector\AuthService" not found in /mnt/www/html/website/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 #0 /mnt/www/html/website/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'acquia_connecto...')
#1


问:
How can i modify the data sent by an RTK query?
I'm getting some data back from an RTK query, everything works find, except I need to delete some data from that array

```<code>const [addSuggest, { isLoading:isLoadingSuggest, data:dataSuggest }] = useAddSuggestMutation();
</code>```

From this i'm showing a set of suggestions, that can be added to another dataset by the user. When it's added, I need to remove it from the dataSuggest so it's not shown anymore.

Any idea how i can do that ?
Thanks

Body:
I'm getting some data back from an RTK query, everything works find, except I need to delete some data from that array

const [addSuggest, { isLoading:isLoadingSuggest, data:dataSuggest }] = useAddSuggestMutation();

From this i'm showing a set of suggestions, that can be added to another dataset by the user. When it's added, I need to remove it from the dataSuggest so it's not shown anymore.

Any idea how i can do that ?
Thanks


问:
Can't set bucket policy in minio denying access to move files from bucket to my computer
I have created a bucket to test bucket policy. The goal is to upload a file to the bucket, change bucket policy so that I won't be able to move files from this bucket to my computer using mc mv command.
But after my bucket policy added I'm still able to move files from bucket to my pc.

I have service A which uploads files to minio and service B which moves all files from bucket to pc. B service moves files from bucket every five minutes so I'd like to block bucket for B service when my A service is uploading files so that incomplitely uploaded files won't be moved.

I'm using:
Java 11
Spring Boot 2.6.1
Minio 8.4.5

Bucket name - testingminio

Creating MinioClient:

```<code>MinioClient minioClient = MinioClient.builder().endpoint(endpoint)
   .credentials(ACCESSKEY, SECRETKEY).build();
</code>```

Setting bucket policy:

```<code>minioClient.setBucketPolicy(SetBucketPolicyArgs.builder().bucket("testingminio")
.config(bucketPolicy).build());

</code>```

Bucket Policy:

```<code>{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Sid": "statement1",
         "Effect": "Deny",
         "Principal": "*",
         "Action": [
            "s3:DeleteObject",
            "s3:DeleteObjectVersion",
            "s3:GetObject"
         ],
         "Resource": "arn:aws:s3:::testingminio/*"
      }
   ]
}
</code>```

Uploading a file to testingminio:

```<code>UploadObjectArgs args = UploadObjectArgs.builder().bucket("testingminio").object(fileName)
   .filename(filePath).build();

minioClient.uploadObject(args);
</code>```

But when I run "mc mv  myminio/testingminio D:\minio --recursive" it still works

Here I found that I have to deny actions GetObject and DeleteObject:
If I use AWS CLI S3 'mv' command, what type of request is behind that?

Also on https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html I read this:

```<code>If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions.
</code>```

But when I add s3:PutLifeCycleConfiguration to bucket policy I get this error:

```<code>"unsupported action 's3:PutLifeCycleConfiguration'"
</code>```

What could cause this problem?
I would appreciate your help!

Body:
I have created a bucket to test bucket policy. The goal is to upload a file to the bucket, change bucket policy so that I won't be able to move files from this bucket to my computer using mc mv command.
But after my bucket policy added I'm still able to move files from bucket to my pc.

I have service A which uploads files to minio and service B which moves all files from bucket to pc. B service moves files from bucket every five minutes so I'd like to block bucket for B service when my A service is uploading files so that incomplitely uploaded files won't be moved.

I'm using:
Java 11
Spring Boot 2.6.1
Minio 8.4.5

Bucket name - testingminio

Creating MinioClient:

MinioClient minioClient = MinioClient.builder().endpoint(endpoint)
   .credentials(ACCESSKEY, SECRETKEY).build();

Setting bucket policy:

minioClient.setBucketPolicy(SetBucketPolicyArgs.builder().bucket("testingminio")
.config(bucketPolicy).build());

Bucket Policy:

{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Sid": "statement1",
         "Effect": "Deny",
         "Principal": "*",
         "Action": [
            "s3:DeleteObject",
            "s3:DeleteObjectVersion",
            "s3:GetObject"
         ],
         "Resource": "arn:aws:s3:::testingminio/*"
      }
   ]
}

Uploading a file to testingminio:

UploadObjectArgs args = UploadObjectArgs.builder().bucket("testingminio").object(fileName)
   .filename(filePath).build();

minioClient.uploadObject(args);

But when I run "mc mv  myminio/testingminio D:\minio --recursive" it still works

Here I found that I have to deny actions GetObject and DeleteObject:
If I use AWS CLI S3 'mv' command, what type of request is behind that?

Also on https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html I read this:

If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions.

But when I add s3:PutLifeCycleConfiguration to bucket policy I get this error:

"unsupported action 's3:PutLifeCycleConfiguration'"

What could cause this problem?
I would appreciate your help!


问:
Add image to my PDF with Knp snappy and Symfony
This is my snappy's configuration:

return new PdfResponse(
                    $knpSnappyPdf->getOutputFromHtml($html, [
                        'orientation' => self::PAYSAGE_FORMAT,
                        'encoding' => 'utf-8',
                        'images' => true,
                        'user-style-sheet' => $this->getParameter('path_to_css'),
                        'footer-left' => $translator->trans('admin.export.list_professional.footer_left'),
                        "footer-right" => $translator->trans(
                            'admin.export.list_professional.footer_right',
                            [
                                '%page%' => '[page]',
                                '%date%' => $date->format('d/m/Y')
                            ]
                        ),
                        'footer-font-size' => 10,
                    ]),
```

And how I called my image :

also tried with:

This is what I get : picture

I don't know why the image is not display because i I use   in my template the logo is displaying, any idea ?

Body:
This is my snappy's configuration:

return new PdfResponse(
                    $knpSnappyPdf->getOutputFromHtml($html, [
                        'orientation' => self::PAYSAGE_FORMAT,
                        'encoding' => 'utf-8',
                        'images' => true,
                        'user-style-sheet' => $this->getParameter('path_to_css'),
                        'footer-left' => $translator->trans('admin.export.list_professional.footer_left'),
                        "footer-right" => $translator->trans(
                            'admin.export.list_professional.footer_right',
                            [
                                '%page%' => '[page]',
                                '%date%' => $date->format('d/m/Y')
                            ]
                        ),
                        'footer-font-size' => 10,
                    ]),

And how I called my image :

also tried with:

This is what I get : picture

I don't know why the image is not display because i I use   in my template the logo is displaying, any idea ?


问:
How can we connect to an Azure Database requiring MFA from Oracle SQL Developer
I want to connect an Azure Database from Oracle SQL Developer. I entered the user credentials and server details in the below format.

user name : myusername@myserver.net

host : myserver.net;ssl=request

But when I tried to connect, it throws error as

Status : Failure -Test failed: Login failed for 'myusername'

I can connect to the same using SQL Server Management Studio with below settings.

Authentication : Azure Active Directory - Universal with MFA

Network Protocol : Default

Encrypt Connection : Ticked

What should I do to sort out this?


问:
Jpos iso8583 unpacking the message with the a leading zero
I am new to this ISO8583 message, and working on processing this message. I have received the following message, where field-11 is a numeric value with 9 digits size.

11007E2466490C61A43016353331313938303034303030303136340010000000000001000000000001000000000001002022120110220100005995402607599900323230......

Since, the field has 9 Numeric digits (odd-numbered) the messgae is added with a leading zero.

I am not able to parse this with the following config.

```<code><isofield
        id="11"
        length="9"
        name="TRANSACTION IDENTIFICATION NUMBER"
        pad="true"
        class="org.jpos.iso.IFA_NUMERIC"/>

</code>```

The expected value is 0000599540, but the actual value I am getting is 000059954. ( Ignores the last 0 as it has 10 digits in the original message)

Any suggestion, on what is the config class to use to achieve this?

Body:
I am new to this ISO8583 message, and working on processing this message. I have received the following message, where field-11 is a numeric value with 9 digits size.

11007E2466490C61A43016353331313938303034303030303136340010000000000001000000000001000000000001002022120110220100005995402607599900323230......

Since, the field has 9 Numeric digits (odd-numbered) the messgae is added with a leading zero.

I am not able to parse this with the following config.

<isofield
        id="11"
        length="9"
        name="TRANSACTION IDENTIFICATION NUMBER"
        pad="true"
        class="org.jpos.iso.IFA_NUMERIC"/>

The expected value is 0000599540, but the actual value I am getting is 000059954. ( Ignores the last 0 as it has 10 digits in the original message)

Any suggestion, on what is the config class to use to achieve this?


问:
How to edit an object using a view function and its template in Django
I am having template that I got from one of mu front-end developers who is not familiar with python and Django. In order to keep the design as it is right now, I would liketo use only template and its view for objects modification, instead there is a way to use the same design by using forms.py.
For your information, I was able to use the same desing in the adding function but in the editing function it is not working.
How can I do it without having to change the front-design?

Temlapte.html

```{% extends 'base.html' %}
{% load static %}

{% block title %}
    <title>Liste des employés</title>
{% endblock title %}

{% block content %}

Employé

Tableau de bord

Employé

                                 Ajouter un employé

                                <input type="text" class="form-control floating">
                                ID employé

                                <input type="text" class="form-control floating">
                                Nom employé

                                <select class="select" name="service">
                                    <option value="">Selectionner une grade</option>
                                    {% for grade in listeGrade %}
                                        <option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
                                    {% endfor %}
                                </select>
                                Grade

                                 Rechercher

                        {% for emp in listEmp %}

                                {% if emp.photo %}

                                {% endif %}

                                    more_vert

                                         Modifier
                                         Supprimer

{{ emp.nom}} {{ emp.prenom}}

{{ emp.qualification }}

                    {% endfor %}

Ajouter une employé

                                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                                    ×
                                </button>

                                <form action="" method="post" enctype="multipart/form-data">    {% csrf_token %}

                                                ID employé *
                                                <input class="form-control" type="text" name="id_Personnel">

                                                Prénom *
                                                <input class="form-control" type="text", name="prenom">

                                                Nom
                                                <input class="form-control" type="text" name="nom">

                                                Date de naissance*

<input class="form-control" type="text" name="date_de_naissance" placeholder="YYYY-MM-DD">

                                                Sexe *
                                                <select class="select" name="sexe">
                                                    <option>Selectionner le sexe</option>
                                                    <option value="M">Masculin</option>
                                                    <option value="F">Féminin</option>

                                                </select>

                                                CIN *
                                                <input class="form-control" type="text" name="CIN">

                                                Photo
                                                <input class="form-control" type="file" name="photo">

                                                Téléphone *
                                                <input class="form-control" type="text" name="telephone">

                                                Email
                                                <input class="form-control" type="email" name="email">

                                                Adresse actuelle*
                                                <input class="form-control" type="text" name="adresse_actuelle">

                                                Adresse permanente*
                                                <input type="text" class="form-control" name="adresse_permanente">

                                                Date d'embauche*

<input class="form-control" type="text" name="date_de_recrutement" placeholder="YYYY-MM-DD">

                                                Service *
                                                <select class="select" name="service">
                                                    <option value="">Selectionner un service</option>
                                                    {% for service in listeService %}
                                                        <option value="{{ service.id }}">{{ service.Service }}</option>
                                                    {% endfor %}
                                                </select>

                                                Diplôme obtenu *
                                                <select class="select" name="diplome_obtenu">
                                                    <option>Selectionner un diplôme</option>
                                                    <option value="DEUG">DEUG</option>
                                                    <option value="LICENCE">LICENCE</option>
                                                    <option value="MAITRISE">MAITRISE</option>
                                                    <option value="MASTER">MASTER</option>
                                                    <option value="DOCTORAT">DOCTORAT</option>
                                                    <option value="AUTRE">AUTRE</option>
                                                </select>

                                                Qualification
                                                <input class="form-control" type="text" name="qualification">

                                                Grade
                                                <select class="select" name="grade">
                                                    <option value="">Selectionner une grade</option>
                                                    {% for grade in listeGrade %}
                                                        <option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
                                                    {% endfor %}
                                                </select>

                                        <button class="btn btn-primary submit-btn">Enrégistrer</button>

                                </form>

Modifier un employé

                                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                                    ×
                                </button>

                                <form action="" method="post" enctype="multipart/form-data">
                                    {% csrf_token %}

                                                ID employé *
                                                <input class="form-control" type="text" name="id_Personnel" value="{{ emp_name.id_Personnel }}">

                                                Prénom *
                                                <input class="form-control" type="text", name="prenom" value="{{ emp_name.prenom }}">

                                                Nom
                                                <input class="form-control" type="text" name="nom" value="{{ emp_name.nom }}">

                                                Date de naissance*

<input class="form-control datetimepicker" type="text" name="date_de_naissance" value="{{ emp_name.date_de_naissance }}">

                                                Sexe *
                                                <select class="select" name="sexe">
                                                    <option>Selectionner le sexe</option>
                                                    <option value="M" {% ifequal emp_name.sexe M %} selected="selected"{% endifequal %} >Masculin</option>
                                                    <option value="F" value="M" {% ifequal emp_name.sexe F %} selected="selected"{% endifequal %}>Féminin</option>

                                                </select>

                                                CIN *
                                                <input class="form-control" type="text" name="CIN" value="{{ emp_name.CIN }}">

                                                Photo
                                                <input class="form-control" type="file" name="photo" value="{{ emp_name.photo }}">

                                                Téléphone *
                                                <input class="form-control" type="text" name="telephone">

                                                Email
                                                <input class="form-control" type="email" name="email" value="{{emp_name.email}}">

                                                Adresse actuelle*
                                                <input class="form-control" type="text" name="adresse_actuelle" value="{{emp_name.adresse_actuelle}}">

                                                Adresse permanente*
                                                <input type="text" class="form-control" name="adresse_permanente" value="{{emp_name.adresse_permanente}}">

                                                Date d'embauche*

<input class="form-control datetimepicker" type="text" name="date_de_recrutement" value="date_de_recrutement">

                                                Service *
                                                <select class="select" name="service">
                                                    <option value="">Selectionner un service</option>
                                                    {% for service in listeService %}
                                                        <option value="{{ service.id }}" value="emp_name.service">{{ service.Service }}</option>
                                                    {% endfor %}
                                                </select>

                                                Diplôme obtenu *
                                                <select class="select" name="diplome_obtenu">
                                                    <option>Selectionner un diplôme</option>
                                                    <option value="DEUG">DEUG</option>
                                                    <option value="LICENCE">LICENCE</option>
                                                    <option value="MAITRISE">MAITRISE</option>
                                                    <option value="MASTER">MASTER</option>
                                                    <option value="DOCTORAT">DOCTORAT</option>
                                                    <option value="AUTRE">AUTRE</option>
                                                </select>

                                                Qualification
                                                <input class="form-control" type="text" name="qualification">

                                                Grade
                                                <select class="select" name="grade">
                                                    <option value="">Selectionner une grade</option>
                                                    {% for grade in listeGrade %}
                                                        <option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
                                                    {% endfor %}
                                                </select>

                                        <button class="btn btn-primary submit-btn">Enregistrer les modifications</button>

                                </form>

{% endblock content %}
```
<p>Adding views:</p>
```def ListEmployeeGrid(request):
    template ='employees/employees.html'
    listEmp=Personnel.objects.all()
    listeGrade=Grades.objects.all()
    listeService=Services.objects.all()
    form = EmployeeAddForm(request.POST or None,request.FILES)
    if request.method=='POST':
        # if forms.is_valid():
        Personnel.objects.create(
            id_Personnel=request.POST["id_Personnel"],
            photo = request.FILES["photo"],
            prenom = request.POST["prenom"],
            nom = request.POST["nom"],
            sexe= request.POST["sexe"],
            date_de_naissance= request.POST["date_de_naissance"],
            CIN = request.POST['CIN'],
            telephone =request.POST["telephone"],
            email = request.POST["email"],
            adresse_actuelle = request.POST["adresse_actuelle"],
            adresse_permanente = request.POST["adresse_permanente"],
            diplome_obtenu = request.POST["diplome_obtenu"],
            qualification = request.POST["qualification"],
            grade = Grades.objects.get(id=request.POST["grade"]),
            date_de_recrutement = request.POST["date_de_recrutement"],
            service = Services.objects.get(id=request.POST["service"]),
            create_date = date.today(),
            updateDate = date.today(),

            )
            # return redirect('hr:list_employee')

    context={
        'listEmp':listEmp,
        'listeGrade':listeGrade,
        'listeService':listeService
        }
    return render(request, template, context)
```
<p>Employ edition view</p>
```def Edit_Employee(request, id):
    emp_name=get_object_or_404(Personnel,id=id)
    listEmp=Personnel.objects.all()
    listeGrade=Grades.objects.all()
    listeService=Services.objects.all()
    Personnel.objects.update_or_create(
        id_Personnel=request.POST["id_Personnel"],
        photo = request.FILES["photo"],
        prenom = request.POST["prenom"],
        nom = request.POST["nom"],
        sexe= request.POST["sexe"],
        date_de_naissance= request.POST["date_de_naissance"],
        CIN = request.POST['CIN'],
        telephone =request.POST["telephone"],
        email = request.POST["email"],
        adresse_actuelle = request.POST["adresse_actuelle"],
        adresse_permanente = request.POST["adresse_permanente"],
        diplome_obtenu = request.POST["diplome_obtenu"],
        qualification = request.POST["qualification"],
        grade = Grades.objects.get(id=request.POST["grade"]),
        date_de_recrutement = request.POST["date_de_recrutement"],
        service = Services.objects.get(id=request.POST["service"]),
        create_date = date.today(),
        updateDate = date.today(),)
    return render(request,'employees/employees.html',
        {
            "emp_name": emp_name,
            "listEmp":listEmp,
            "listeService":listeService,
            "listeGrade":listeGrade,
        }
    )
```

Body:
I am having template that I got from one of mu front-end developers who is not familiar with python and Django. In order to keep the design as it is right now, I would liketo use only template and its view for objects modification, instead there is a way to use the same design by using forms.py.
For your information, I was able to use the same desing in the adding function but in the editing function it is not working.
How can I do it without having to change the front-design?

Temlapte.html

{% extends 'base.html' %}
{% load static %}

{% block title %}
    <title>Liste des employés</title>
{% endblock title %}

{% block content %}

Employé

Tableau de bord

Employé

                                 Ajouter un employé

                                <input type="text" class="form-control floating">
                                ID employé

                                <input type="text" class="form-control floating">
                                Nom employé

                                <select class="select" name="service">
                                    <option value="">Selectionner une grade</option>
                                    {% for grade in listeGrade %}
                                        <option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
                                    {% endfor %}
                                </select>
                                Grade

                                 Rechercher

                        {% for emp in listEmp %}

                                {% if emp.photo %}

                                {% endif %}

                                    more_vert

                                         Modifier
                                         Supprimer

{{ emp.nom}} {{ emp.prenom}}

{{ emp.qualification }}

                    {% endfor %}

Ajouter une employé

                                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                                    ×
                                </button>

                                <form action="" method="post" enctype="multipart/form-data">    {% csrf_token %}

                                                ID employé *
                                                <input class="form-control" type="text" name="id_Personnel">

                                                Prénom *
                                                <input class="form-control" type="text", name="prenom">

                                                Nom
                                                <input class="form-control" type="text" name="nom">

                                                Date de naissance*

<input class="form-control" type="text" name="date_de_naissance" placeholder="YYYY-MM-DD">

                                                Sexe *
                                                <select class="select" name="sexe">
                                                    <option>Selectionner le sexe</option>
                                                    <option value="M">Masculin</option>
                                                    <option value="F">Féminin</option>

                                                </select>

                                                CIN *
                                                <input class="form-control" type="text" name="CIN">

                                                Photo
                                                <input class="form-control" type="file" name="photo">

                                                Téléphone *
                                                <input class="form-control" type="text" name="telephone">

                                                Email
                                                <input class="form-control" type="email" name="email">

                                                Adresse actuelle*
                                                <input class="form-control" type="text" name="adresse_actuelle">

                                                Adresse permanente*
                                                <input type="text" class="form-control" name="adresse_permanente">

                                                Date d'embauche*

<input class="form-control" type="text" name="date_de_recrutement" placeholder="YYYY-MM-DD">

                                                Service *
                                                <select class="select" name="service">
                                                    <option value="">Selectionner un service</option>
                                                    {% for service in listeService %}
                                                        <option value="{{ service.id }}">{{ service.Service }}</option>
                                                    {% endfor %}
                                                </select>

                                                Diplôme obtenu *
                                                <select class="select" name="diplome_obtenu">
                                                    <option>Selectionner un diplôme</option>
                                                    <option value="DEUG">DEUG</option>
                                                    <option value="LICENCE">LICENCE</option>
                                                    <option value="MAITRISE">MAITRISE</option>
                                                    <option value="MASTER">MASTER</option>
                                                    <option value="DOCTORAT">DOCTORAT</option>
                                                    <option value="AUTRE">AUTRE</option>
                                                </select>

                                                Qualification
                                                <input class="form-control" type="text" name="qualification">

                                                Grade
                                                <select class="select" name="grade">
                                                    <option value="">Selectionner une grade</option>
                                                    {% for grade in listeGrade %}
                                                        <option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
                                                    {% endfor %}
                                                </select>

                                        <button class="btn btn-primary submit-btn">Enrégistrer</button>

                                </form>

Modifier un employé

                                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                                    ×
                                </button>

                                <form action="" method="post" enctype="multipart/form-data">
                                    {% csrf_token %}

                                                ID employé *
                                                <input class="form-control" type="text" name="id_Personnel" value="{{ emp_name.id_Personnel }}">

                                                Prénom *
                                                <input class="form-control" type="text", name="prenom" value="{{ emp_name.prenom }}">

                                                Nom
                                                <input class="form-control" type="text" name="nom" value="{{ emp_name.nom }}">

                                                Date de naissance*

<input class="form-control datetimepicker" type="text" name="date_de_naissance" value="{{ emp_name.date_de_naissance }}">

                                                Sexe *
                                                <select class="select" name="sexe">
                                                    <option>Selectionner le sexe</option>
                                                    <option value="M" {% ifequal emp_name.sexe M %} selected="selected"{% endifequal %} >Masculin</option>
                                                    <option value="F" value="M" {% ifequal emp_name.sexe F %} selected="selected"{% endifequal %}>Féminin</option>

                                                </select>

                                                CIN *
                                                <input class="form-control" type="text" name="CIN" value="{{ emp_name.CIN }}">

                                                Photo
                                                <input class="form-control" type="file" name="photo" value="{{ emp_name.photo }}">

                                                Téléphone *
                                                <input class="form-control" type="text" name="telephone">

                                                Email
                                                <input class="form-control" type="email" name="email" value="{{emp_name.email}}">

                                                Adresse actuelle*
                                                <input class="form-control" type="text" name="adresse_actuelle" value="{{emp_name.adresse_actuelle}}">

                                                Adresse permanente*
                                                <input type="text" class="form-control" name="adresse_permanente" value="{{emp_name.adresse_permanente}}">

                                                Date d'embauche*

<input class="form-control datetimepicker" type="text" name="date_de_recrutement" value="date_de_recrutement">

                                                Service *
                                                <select class="select" name="service">
                                                    <option value="">Selectionner un service</option>
                                                    {% for service in listeService %}
                                                        <option value="{{ service.id }}" value="emp_name.service">{{ service.Service }}</option>
                                                    {% endfor %}
                                                </select>

                                                Diplôme obtenu *
                                                <select class="select" name="diplome_obtenu">
                                                    <option>Selectionner un diplôme</option>
                                                    <option value="DEUG">DEUG</option>
                                                    <option value="LICENCE">LICENCE</option>
                                                    <option value="MAITRISE">MAITRISE</option>
                                                    <option value="MASTER">MASTER</option>
                                                    <option value="DOCTORAT">DOCTORAT</option>
                                                    <option value="AUTRE">AUTRE</option>
                                                </select>

                                                Qualification
                                                <input class="form-control" type="text" name="qualification">

                                                Grade
                                                <select class="select" name="grade">
                                                    <option value="">Selectionner une grade</option>
                                                    {% for grade in listeGrade %}
                                                        <option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
                                                    {% endfor %}
                                                </select>

                                        <button class="btn btn-primary submit-btn">Enregistrer les modifications</button>

                                </form>

{% endblock content %}

Adding views:

def ListEmployeeGrid(request):
    template ='employees/employees.html'
    listEmp=Personnel.objects.all()
    listeGrade=Grades.objects.all()
    listeService=Services.objects.all()
    form = EmployeeAddForm(request.POST or None,request.FILES)
    if request.method=='POST':
        # if forms.is_valid():
        Personnel.objects.create(
            id_Personnel=request.POST["id_Personnel"],
            photo = request.FILES["photo"],
            prenom = request.POST["prenom"],
            nom = request.POST["nom"],
            sexe= request.POST["sexe"],
            date_de_naissance= request.POST["date_de_naissance"],
            CIN = request.POST['CIN'],
            telephone =request.POST["telephone"],
            email = request.POST["email"],
            adresse_actuelle = request.POST["adresse_actuelle"],
            adresse_permanente = request.POST["adresse_permanente"],
            diplome_obtenu = request.POST["diplome_obtenu"],
            qualification = request.POST["qualification"],
            grade = Grades.objects.get(id=request.POST["grade"]),
            date_de_recrutement = request.POST["date_de_recrutement"],
            service = Services.objects.get(id=request.POST["service"]),
            create_date = date.today(),
            updateDate = date.today(),

            )
            # return redirect('hr:list_employee')

    context={
        'listEmp':listEmp,
        'listeGrade':listeGrade,
        'listeService':listeService
        }
    return render(request, template, context)

Employ edition view

def Edit_Employee(request, id):
    emp_name=get_object_or_404(Personnel,id=id)
    listEmp=Personnel.objects.all()
    listeGrade=Grades.objects.all()
    listeService=Services.objects.all()
    Personnel.objects.update_or_create(
        id_Personnel=request.POST["id_Personnel"],
        photo = request.FILES["photo"],
        prenom = request.POST["prenom"],
        nom = request.POST["nom"],
        sexe= request.POST["sexe"],
        date_de_naissance= request.POST["date_de_naissance"],
        CIN = request.POST['CIN'],
        telephone =request.POST["telephone"],
        email = request.POST["email"],
        adresse_actuelle = request.POST["adresse_actuelle"],
        adresse_permanente = request.POST["adresse_permanente"],
        diplome_obtenu = request.POST["diplome_obtenu"],
        qualification = request.POST["qualification"],
        grade = Grades.objects.get(id=request.POST["grade"]),
        date_de_recrutement = request.POST["date_de_recrutement"],
        service = Services.objects.get(id=request.POST["service"]),
        create_date = date.today(),
        updateDate = date.today(),)
    return render(request,'employees/employees.html',
        {
            "emp_name": emp_name,
            "listEmp":listEmp,
            "listeService":listeService,
            "listeGrade":listeGrade,
        }
    )


问:
Prevent dragging before vertical line React-beautiful-dnd
I want a little help from you. I'm stuck with a problem using react beautiful dnd library.
I want to prevent dropping items before the red line and before the red line all items should not be draggable also. You can say kind of a timeline task. The red vertical bar shows the current time and before the current time no items can be dropped.

Here is a chunk of my code to take a look:
If you have any suggestions or ideas please comment. Thanks


问:
Calling swiftUI View from UIKIt and pass data with or without userdefaults
I have been trying to call SwiftUI view from UIViewController but i dont know the right way to do it.
I have trying using use Userdefaults but SwiftUI view complains that URL passed via userdefaults is nil

this is the view

```<code>import SwiftUI
import QuickLook
import UIKit

struct PreviewController: UIViewControllerRepresentable {
    let url: URL
    var error: Binding<Bool>
    func makeUIViewController(context: Context) -> QLPreviewController {
        let controller = QLPreviewController()
        controller.dataSource = context.coordinator
        controller.isEditing = false
        return controller
    }

    func makeCoordinator() -> Coordinator {
        return Coordinator(parent: self)
    }

    func updateUIViewController(
        _ uiViewController: QLPreviewController, context: Context) {}

    class Coordinator: QLPreviewControllerDataSource {
        var parent: PreviewController

        init(parent: PreviewController) {
            self.parent = parent
        }

        func numberOfPreviewItems(
            in controller: QLPreviewController
        ) -> Int {
            return 1
        }

        func previewController(
            _ controller: QLPreviewController, previewItemAt index: Int
        ) -> QLPreviewItem {

            guard self.parent.url.startAccessingSecurityScopedResource()
            else {
                return NSURL(fileURLWithPath: parent.url.path)
            }
            defer {
                self.parent.url.stopAccessingSecurityScopedResource()
            }

            return NSURL(fileURLWithPath: self.parent.url.path)
        }

    }

}

struct ProjectDocumentOpener: View {
    @Binding var open: Bool
    @State var errorInAccess = false
    var body: some View {
        NavigationView {
            VStack(alignment: .center, spacing: 0) {
                let url = URL(string: UserDefaults.standard.string(forKey: "documentLink")!)
                PreviewController(url: url!, error: $errorInAccess)
            }
        }
        .navigationBarTitleDisplayMode(.inline)
        .navigationBarTitle(
            Text(URL(string: UserDefaults.standard.string(forKey: "documentLink")!)?.lastPathComponent ?? "")
        )
        .toolbar {
            ToolbarItem(placement: .navigationBarLeading) {
                Button("Done") {
                    self.open = false
                }
            }
        }
    }
}
</code>```

This is how i have been calling it in UIViewController

```<code>
UserDefaults.standard.set(docURL, forKey: "documentLink")
self.navigationController?.pushViewController(UIHostingController(rootView: ProjectDocumentOpener(open: .constant(true))), animated: true)
</code>```

I tried to google and find a proper resource which explains how to use a SwiftUI view with UIViewController but cant find any resource suitable for my needs.

Body:
I have been trying to call SwiftUI view from UIViewController but i dont know the right way to do it.
I have trying using use Userdefaults but SwiftUI view complains that URL passed via userdefaults is nil

this is the view

import SwiftUI
import QuickLook
import UIKit

struct PreviewController: UIViewControllerRepresentable {
    let url: URL
    var error: Binding<Bool>
    func makeUIViewController(context: Context) -> QLPreviewController {
        let controller = QLPreviewController()
        controller.dataSource = context.coordinator
        controller.isEditing = false
        return controller
    }

    func makeCoordinator() -> Coordinator {
        return Coordinator(parent: self)
    }

    func updateUIViewController(
        _ uiViewController: QLPreviewController, context: Context) {}

    class Coordinator: QLPreviewControllerDataSource {
        var parent: PreviewController

        init(parent: PreviewController) {
            self.parent = parent
        }

        func numberOfPreviewItems(
            in controller: QLPreviewController
        ) -> Int {
            return 1
        }

        func previewController(
            _ controller: QLPreviewController, previewItemAt index: Int
        ) -> QLPreviewItem {

            guard self.parent.url.startAccessingSecurityScopedResource()
            else {
                return NSURL(fileURLWithPath: parent.url.path)
            }
            defer {
                self.parent.url.stopAccessingSecurityScopedResource()
            }

            return NSURL(fileURLWithPath: self.parent.url.path)
        }

    }

}

struct ProjectDocumentOpener: View {
    @Binding var open: Bool
    @State var errorInAccess = false
    var body: some View {
        NavigationView {
            VStack(alignment: .center, spacing: 0) {
                let url = URL(string: UserDefaults.standard.string(forKey: "documentLink")!)
                PreviewController(url: url!, error: $errorInAccess)
            }
        }
        .navigationBarTitleDisplayMode(.inline)
        .navigationBarTitle(
            Text(URL(string: UserDefaults.standard.string(forKey: "documentLink")!)?.lastPathComponent ?? "")
        )
        .toolbar {
            ToolbarItem(placement: .navigationBarLeading) {
                Button("Done") {
                    self.open = false
                }
            }
        }
    }
}

This is how i have been calling it in UIViewController

UserDefaults.standard.set(docURL, forKey: "documentLink")
self.navigationController?.pushViewController(UIHostingController(rootView: ProjectDocumentOpener(open: .constant(true))), animated: true)

I tried to google and find a proper resource which explains how to use a SwiftUI view with UIViewController but cant find any resource suitable for my needs.


问:
How to install a local conda package file
I'm new to conda. Is there a way I can build the package somewhere, move it to another environment and install it without connect to the internet?

For example we want to have a package specifically for xgboost users. We want have these in the meta.yaml:

```<code>package:
  name: xgboost-test
  version: 1.0

build:
  skip_compile_pyc:
    - "*"

# needs channels: conda-forge
requirements:
  host:
    - python
    - pip
    - conda
  run:
    - python
    - pip
    - git
    - conda
    - nb_conda
    - pandas
    - xgboost==1.1.1
</code>```

After building a new package which contains all above, we have a new package named xgboost-test-1.0.20221206-py37_0.tar.bz2.

Is there any way I can only move this new package to another computer and install it over there, without setting the channel, or not connect to the internew? I don't think it's convenient to setup a channel every time. I thought there is a way which I can simply install the new package file, that's more quick and straight forward.

The best way I know is copy the whole channel folder to the new environment and install over there. The other way I know is to download the package file, use conda index to initialize the channel, and install it by conda install -c file:///path/to/local/channel.
But I'm wondering if there is a way just move the package itself, not the whole channel folder. I thought there is a way which I can simply install the new package file, that's more quick and straight forward.

Body:
I'm new to conda. Is there a way I can build the package somewhere, move it to another environment and install it without connect to the internet?

For example we want to have a package specifically for xgboost users. We want have these in the meta.yaml:

package:
  name: xgboost-test
  version: 1.0

build:
  skip_compile_pyc:
    - "*"

# needs channels: conda-forge
requirements:
  host:
    - python
    - pip
    - conda
  run:
    - python
    - pip
    - git
    - conda
    - nb_conda
    - pandas
    - xgboost==1.1.1

After building a new package which contains all above, we have a new package named xgboost-test-1.0.20221206-py37_0.tar.bz2.

Is there any way I can only move this new package to another computer and install it over there, without setting the channel, or not connect to the internew? I don't think it's convenient to setup a channel every time. I thought there is a way which I can simply install the new package file, that's more quick and straight forward.

The best way I know is copy the whole channel folder to the new environment and install over there. The other way I know is to download the package file, use conda index to initialize the channel, and install it by conda install -c file:///path/to/local/channel.
But I'm wondering if there is a way just move the package itself, not the whole channel folder. I thought there is a way which I can simply install the new package file, that's more quick and straight forward.


问:
Call function in ejs and return mysql data
I have a ejs like this

```<code><!DOCTYPE html>
<html lang="en">
<head>
    <%- include('../partials/head'); %>
</head>
<body class="container">

<header>
    <%- include('../partials/header'); %>
</header>

<main>
    <div class="jumbotron">
        <h1>This is great</h1>
        <p>Welcome to templating using EJS</p>
        <% rows.forEach(function (rows) { %>
            <tr>
                <td><%= rows.tag %>
                <div>
                    <%
                        var contents = egallery.getContents(rows.tag)
                    %>
                    <%= JSON.stringify(contents) %>
                </div>
                </td>
            </tr>
        <% }) %>
    </div>
</main>

<footer>
    <%- include('../partials/footer'); %>
</footer>

</body>
</html>
</code>```

and a custom js calling mysql and return data

```<code>var conn = require('./conn.js');
conn.connect();

function getTags () {

    return new Promise((resolve, reject) => {

        conn.query(
            "Select distinct tag from ray_url",
            (err, result) => {
                if (err) {
                    console.log(err);
                    throw err;
                }
                return err ? reject(err) : resolve(result)
            }
        )
    })

    /*conn.end();*/

}

function getContents (tag) {

    return new Promise((resolve, reject) => {

        conn.query(
            "Select * from ray_url where tag = ?",
            [tag],
            (err, result) => {
                //if (err) {
                    console.log(result);  //i saw data
                    console.log(err);
                    //throw err;
                //}
                return err ? reject(err) : resolve(result)
            }
        )
    })
}

module.exports = {
    getTags : getTags,
    getContents : getContents
};
</code>```

i saw the data was printed, but the line var contents = egallery.getContents(rows.tag) , the contents is blank, any one know what is the problem?

Body:
I have a ejs like this

<!DOCTYPE html>

    <%- include('../partials/head'); %>

    <%- include('../partials/header'); %>

This is great

Welcome to templating using EJS

        <% rows.forEach(function (rows) { %>

                <%= rows.tag %>

                    <%
                        var contents = egallery.getContents(rows.tag)
                    %>
                    <%= JSON.stringify(contents) %>

        <% }) %>

    <%- include('../partials/footer'); %>

and a custom js calling mysql and return data

var conn = require('./conn.js');
conn.connect();

function getTags () {

    return new Promise((resolve, reject) => {

        conn.query(
            "Select distinct tag from ray_url",
            (err, result) => {
                if (err) {
                    console.log(err);
                    throw err;
                }
                return err ? reject(err) : resolve(result)
            }
        )
    })

    /*conn.end();*/

}

function getContents (tag) {

    return new Promise((resolve, reject) => {

        conn.query(
            "Select * from ray_url where tag = ?",
            [tag],
            (err, result) => {
                //if (err) {
                    console.log(result);  //i saw data
                    console.log(err);
                    //throw err;
                //}
                return err ? reject(err) : resolve(result)
            }
        )
    })
}

module.exports = {
    getTags : getTags,
    getContents : getContents
};

i saw the data was printed, but the line var contents = egallery.getContents(rows.tag) , the contents is blank, any one know what is the problem?


问:
Angular - Swiper containing dynamic content
Hello All the Experts,

I am new to angular.
I have created 3 components.

Swiper

YouTube frame

Map display

Now I have to use the swiper component on home page two time. In first swiper, Need to show array of maps. And in second swiper I want to show array of youtube frames.

How can I use the same swiper (reusable) for different types of contents inside without repeating the swiper code/config?

My swiper HTML is

```<code><swiper #swiper [config]="swiperConfig">
  <!-- some HTML content containing map/ youtube iFrame or anything else -->
  <ng-template swiperSlide *ngFor="let a of swiperData; let i=index">

  </ng-template>
</swiper>
</code>```

Thanks in advance.

I am trying to search for the solution but couldn't get any idea how to do it.

Body:
Hello All the Experts,

I am new to angular.
I have created 3 components.

Swiper

YouTube frame

Map display

Now I have to use the swiper component on home page two time. In first swiper, Need to show array of maps. And in second swiper I want to show array of youtube frames.

How can I use the same swiper (reusable) for different types of contents inside without repeating the swiper code/config?

My swiper HTML is

<swiper #swiper [config]="swiperConfig">

  <ng-template swiperSlide *ngFor="let a of swiperData; let i=index">

  </ng-template>
</swiper>

Thanks in advance.

I am trying to search for the solution but couldn't get any idea how to do it.


问:
How to solve lost connection problem in Couchbase UI
We've 4 shared nodes for data, index, query, search, analytics, eventing and 1 shared node for query and index. After a few minutes logged in the ui we are facing "lost connection to server" problem even though nodes are running and healthy.

couchbase operator version -> v2.1.0

couchbase version -> v6.6.0

node type -> m5.xlarge

I logged in couchbase ui but could not get any action because of lost connection error.


问:
get `Error installing libpd-ios` on `pod install`
When pod install I get

```<code>
Analyzing dependencies
Downloading dependencies
Installing libpd-ios (0.11.0)

[!] Error installing libpd-ios
[!] /usr/bin/git -C /var/folders/2w/0wtczkq94c9ch_y6m89gg29m0000jq/T/d20221207-77916-57ccbt submodule update --init --recursive

Submodule 'jni/opensl_stream' (git://github.com/nettoyeurny/opensl_stream.git) registered for path 'jni/opensl_stream'
Submodule 'pure-data' (git://git.code.sf.net/p/pure-data/pure-data) registered for path 'pure-data'
Cloning into '/private/var/folders/2w/0wtczkq94c9ch_y6m89gg29m0000jq/T/d20221207-77916-57ccbt/jni/opensl_stream'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Operation timed out
</code>```

according to fatal: unable to connect to github.com: github.com[0: 140.82.121.3]: errno=Operation timed out this is related to ssh

but how do I fix it?

Body:
When pod install I get

Analyzing dependencies
Downloading dependencies
Installing libpd-ios (0.11.0)

[!] Error installing libpd-ios
[!] /usr/bin/git -C /var/folders/2w/0wtczkq94c9ch_y6m89gg29m0000jq/T/d20221207-77916-57ccbt submodule update --init --recursive

Submodule 'jni/opensl_stream' (git://github.com/nettoyeurny/opensl_stream.git) registered for path 'jni/opensl_stream'
Submodule 'pure-data' (git://git.code.sf.net/p/pure-data/pure-data) registered for path 'pure-data'
Cloning into '/private/var/folders/2w/0wtczkq94c9ch_y6m89gg29m0000jq/T/d20221207-77916-57ccbt/jni/opensl_stream'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Operation timed out

according to fatal: unable to connect to github.com: github.com[0: 140.82.121.3]: errno=Operation timed out this is related to ssh

but how do I fix it?


问:
Calculating dynamic cost from several tables
I'm new to Power BI and struggling a bit with concepts. My simplified problem is this:

I have a table with time-track data (possible multiple entries per day for the same user):

datetime
timeTracked (hours)
user

2022-12-01 14:15
1.5
john

2022-12-01 16:30
0.5
john

2022-12-02 12:00
2.5
tom

I also have second table with yearly wages for each user (irregular dates, wage is applicable from that day forward):

date
user
wage

2021-01-01
john
20000

2021-06-15
tom
25000

2022-02-01
john
22000

I want to somehow calculate the cost for a dynamic period or total time, but using other filters (like client).
For example: total cost for current month - the sum of hours for each user multiplied by hourly cost (let's say yearly wage / 1500 for simplicity). The complication is that there might be multiple applicable wages in the selected period.

I'm not sure if I should create a new table, new column(s) to existing table(s), measure(s) or anything else? I don't know how to deal with this problem in Power BI, any hints, links or examples are very appreciated!


问:
Why do I get same p.adjusted both for Benjamini Hochberg and Bonferroni correlation test
Hello statisticians and R experts,
Why do I get the same results for BH and Bonferroni tests?

my code:

```<code>dpnd<-c(rnorm(25,mean = 0),rnorm(25,mean=1))
indpnd<-c(rep("a",25),rep("b",25))

bonf <- pairwise.t.test(dpnd, indpnd, p.adjust.method="bonferroni")
bonf

BH <- pairwise.t.test(dpnd, indpnd, p.adjust.method="BH")
BH
</code>```

Results:

```<code>> bonf <- pairwise.t.test(dpnd, indpnd, p.adjust.method="bonferroni")
> bonf

    Pairwise comparisons using t tests with pooled SD

data:  dpnd and indpnd

  a
b 2.3e-05

P value adjustment method: bonferroni
>
> BH <- pairwise.t.test(dpnd, indpnd, p.adjust.method="BH")
> BH

    Pairwise comparisons using t tests with pooled SD

data:  dpnd and indpnd

  a
b 2.3e-05

P value adjustment method: BH
</code>```

Do I not understand something?
I would like some help over here!
Thanks in advance!

Body:
Hello statisticians and R experts,
Why do I get the same results for BH and Bonferroni tests?

my code:

dpnd<-c(rnorm(25,mean = 0),rnorm(25,mean=1))
indpnd<-c(rep("a",25),rep("b",25))

bonf <- pairwise.t.test(dpnd, indpnd, p.adjust.method="bonferroni")
bonf

BH <- pairwise.t.test(dpnd, indpnd, p.adjust.method="BH")
BH

Results:

> bonf <- pairwise.t.test(dpnd, indpnd, p.adjust.method="bonferroni")
> bonf

    Pairwise comparisons using t tests with pooled SD

data:  dpnd and indpnd

  a
b 2.3e-05

P value adjustment method: bonferroni
>
> BH <- pairwise.t.test(dpnd, indpnd, p.adjust.method="BH")
> BH

    Pairwise comparisons using t tests with pooled SD

data:  dpnd and indpnd

  a
b 2.3e-05

P value adjustment method: BH

Do I not understand something?
I would like some help over here!
Thanks in advance!


问:
Maven gitflow fails with: release: fatal: refusing to merge unrelated histories
On github actions, am trying to release a version but it fails with error:

release: fatal: refusing to merge unrelated histories

Here is the command run:

```<code>mvn -B gitflow:release -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
</code>```

Thanks

Body:
On github actions, am trying to release a version but it fails with error:

release: fatal: refusing to merge unrelated histories

Here is the command run:

mvn -B gitflow:release -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}

Thanks