StackOverflow.com

VN:F [1.9.22_1171]
Rating: 9.4/10 (10 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Partitioned Queues with Service Bus Azure Functions

4 October 2023 @ 5:56 pm

Has anyone had any experience with Service Bus partitioned queues with Azure Functions? Im struggling to find any examples for how to use them and also how to enforce that partitions can be processed in parallel but each partition can only have 1 message processed at a time Paul

This expression is not callable. Type 'typeof import("stripe")' has no call signatures

4 October 2023 @ 5:55 pm

I’m attempting to integrate Stripe with Strapi. I have this line of code in my project: const stripe = require(“stripe”)(“secret-key”); However, I’m encountering an error message that says, ‘This expression is not callable. Type ‘typeof import(“stripe”)’ has no call signatures.’ Can you please help me identify and fix the issue to resolve this error?" *I’m using javaScript not TypeScript

How can I update my sui CLI to solve Client/Server api version mismatch" error?

4 October 2023 @ 5:55 pm

I've installed sui a while back. How can I update sui and the Sui CLI that is the terminal client to the latest version? I'm receiving the following error when I try to publish code to the Sui chain. [warn] Client/Server api version mismatch, client api version : 1.9.0, server api version : 1.10.0

What is the best practice for using `secrets` in Symfony 6?

4 October 2023 @ 5:55 pm

In Symfony 6, bin/console secrets:set MY_VAR seems super handy, especially to create environment specific variables - but if you have to upload the generated private decryption key to the server anyway, and the variable values are easily accessible via bin/console secrets:list --reveal , what are the advantages of using secrets via the cli vs simply defining MY_VAR in an environment-specific .env file?

the notification mark shows only if i am inside notification page

4 October 2023 @ 5:55 pm

this code is for navigation bar in my website. when a new notification comes the var has_new_notification will be true then the notification-mark should show in notification element in the navbar. also there is class called active that makes the element color in navbar change when i click on the element. the problem: i can only see the notification-mark on notification element when i am inside notification page. `{% load static %} .header__menuItem.active a{ background-color: #51546e; color: #fff; padding: 10px 20px; margin: -10px -20px; border-radius: 10px; } .header__menuItem.notification { position: relative; } .notification-mark { position: absolute; top: 0; right: 0; width: 10px; height: 10px; background-color: red; border-radius: 50%; } DevSearch Logo Menu <li class="header__menuItem {% if request.path == '/accounts/notofications/' %}active{% endif %} notification"> <a href="{% url 'notofications' %}">Notificat

Append XML element with Python by xPath and condition

4 October 2023 @ 5:55 pm

first time writing down a problem in public. Ich want to append a ET.fromstring element to a XML file, but only if a special condition is fullfilld. I want to append a new <>price<> element to the block, if the .//tariff/name == 'H-AT'. Here ist my XML exmaple: <tariffimport> <tariff> <tariffFormula> <name>K-Watt</name> </tariffFormula> <status>1</status> <parentTariffId /> <priority>10</priority> <i18n> <lang> <locale>de_DE</locale> <shortDescription /> </lang> </i18n> **<name>H-AT</name>** <signatureRequired>false</signatureRequired> <termExtension>1</termExtension> <termExtensionUnit>5</termExtensionUnit> <canc

CKEDITOR 4 - Text extending beyond right margin

4 October 2023 @ 5:55 pm

I'm having this problem only on Google Chrome (any version). This piece of text is not breaking the line. Firefox and others are OK. I followed a tip which was to adjust the margins via CSS, but without success Chrome (https://i.stack.imgur.com/Et5tq.png) Firefox (https://i.stack.imgur.com/ZCKpD.png)

Auth0 SAML IDP-initiated returns the error “Unsupported response mode: auth0_pq_openid” when logging in

4 October 2023 @ 5:54 pm

We have our our auth0 stack set up from terraform. It currently consists of a regular web app and a SAML connection pointing to SAMLING ( Samling 1 ). Our goal is to implement IDP-initiated login (according to client requirements). Another point; we have a post login action that will attach two claims to the id_token. When the response is posted back from SAMLING, the user is created perfectly, the action is triggered perfectly but then we get redirected to auth0 error page saying " unsupported_response_mode : Unsupported response mode: auth0_pq_openid" It is absolutely frustrating the lack of resources related to auth0_pq_openid response_mode we find no helpful information at all. We have tried setting “front_channel” and “back_channel” on the SAML connection with no luck (it seem this config is associated with response_modes). We have previously set up everything by hand on another account and it worked just fine and when

Domino Basic authentication fails when username contains special characters

4 October 2023 @ 5:54 pm

I have angular application which receives data from domino. In the angular code, i access domino url via basic authentication. URL: apidata.nsf/doLoginSuccessAuth?OpenPage UserName:Vijay Superuser2ö Authorization: Basic VmlqYXkgU3VwZXJ1c2VyMjpJbml0UGFzczIwMjM= When the username contains the special characters, the authentication is not working. I can login with the same username and password via browser. If i remove the special character, basic authentication works just fine. I have checked below article and the configuration is done as mentioned in the article. https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0082364. I am using Domino 12.0.1.

In ant colony optimization algorithms, will ant select other nodes when the destination node is selectable?

4 October 2023 @ 5:54 pm

I'm new to the computational intelligence. Now I a doubt when learning the ant colony optimization (ACO) algorithm. Will ant select other nodes when the destination node is selectable? And will the ants return to the source node? For this example, Ant 1 start from source (node 1) in the 1st iteration and move to node 5 and then node 6. Is it possible that this ant select node 4 instead of choosing destination node 7? In addition, what if pheromone dissipation is not considered. Do ants release pheromones multiple times on the same edge?