79110574

Date: 2024-10-21 14:52:48
Score: 1.5
Natty:
Report link

What you can try to redirect stdin for gradle using /dev/null.

#!/bin/bash

echo Hello
gradle clean < /dev/null
echo Bye
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Starts with a question (0.5): What you can
  • Low reputation (0.5):
Posted by: Shelton Liu

79110572

Date: 2024-10-21 14:51:47
Score: 2
Natty:
Report link
<link rel="javascript" href="script.js">

Is the line for you, I hope? (You can put this line in the section) What this does is search the folder that your .html file is inside of or the folders other children folders for "script.js", not the whole system sadly :( But is a good way to do this (and very simple)

I've just noticed before I hit post, that you've used this line already connecting your .css file to your .html file, it might have been different 10 years ago.

Please comment if this doesn't work :)

Reasons:
  • Blacklisted phrase (1): :(
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is the
  • Low reputation (1):
Posted by: therealzakie

79110570

Date: 2024-10-21 14:51:47
Score: 0.5
Natty:
Report link

Made an account to point out you can use a third-party package to handle possessive quantifiers for you. As of 2024, it appears to be regularly updated.
It would apply to the question like this:

    const regex = require("regex");

    const defaultRouteRegex = regex`/\/{1}+/`;
    app.get(defaultRouteRegex, function (req, res) {
        res.render("index"); 
    });
Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: qosqos

79110564

Date: 2024-10-21 14:50:47
Score: 1
Natty:
Report link

Hey hey just a thought since it's kinda fresh in my head. While there isn't a direct "Publish to Web" API endpoint in Notion, you can achieve similar functionality by building a custom solution. Here's how I've implemented something similar:

  1. Without ISR (Manual Updates): When deployed to Vercel without Incremental Static Regeneration (ISR), the site would only update when manually redeployed. This is somewhat similar to Notion's "Publish to Web" feature (in a way, I guess?), where you need to manually trigger an update.

  2. With ISR (Near Real-Time Updates): By implementing ISR with a short revalidation period (e.g., 60 seconds), the website automatically updates with the latest Notion content. This creates a near real-time sync between your Notion database and the published web page.

This method gives you more control over the published output while maintaining a connection to your Notion content. I guess it's not exactly the same as Notion's "Publish to Web", as per your question but it might achieve a similar goal of making your Notion content publicly accessible and regularly updated (am assuming you were wanting to publish Notion content?)

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: 0xAZ

79110563

Date: 2024-10-21 14:50:47
Score: 1.5
Natty:
Report link

For Gemini AI I have seen also issues until I changed the Base URL as following:

https://generativelanguage.googleapis.com/v1beta/models

enter image description here

Now, it is working well

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
Posted by: Schneider Infosystems Ltd

79110558

Date: 2024-10-21 14:48:46
Score: 0.5
Natty:
Report link

This is a modification to @n8jadams' post, in which instead of checking the date every second, it will calculate the number of seconds needed to sleep, rather than checking every minute if it is the correct minute. This will improve the accuracy, and have the container restart at the specified time.

version: "3"
services:

  myservice:
    container_name: myservice
      
  restarter:
    image: docker:cli
    restart: unless-stopped
    volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
    entrypoint: ["/bin/sh","-c"]
    command:
      - |
        while true; do
          current_epoch=$$(date +%s)
          target_epoch=$$(( $$(date -d "05:00" +%s) + 86400 ))
          sleep_seconds=$$(( target_epoch - current_epoch ))
          echo "$$(date) + $$sleep_seconds seconds"
          sleep $$sleep_seconds
          
          docker restart myservice
        done

Note: the echo in the script will allow you to copy/paste into the date command, to see the specified time it will restart (I couldn't seeem to get it to correctly add the time with the date command, provided by docker:cli), eg. date -d "$echo from above"

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @n8jadams'
  • Low reputation (1):
Posted by: Triavanicus

79110552

Date: 2024-10-21 14:46:46
Score: 1
Natty:
Report link

If you wanna change the feature font size,this code works for me:

shap.summary_plot(shap_values, show=False)

Get the current figure and axes objects.

fig, ax = plt.gcf(), plt.gca()

for text in ax.texts: text.set_fontsize( your_font_size_number)

plt.show()

Reasons:
  • Whitelisted phrase (-1): works for me
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Amaury Ribeiro

79110548

Date: 2024-10-21 14:44:43
Score: 8 đźš©
Natty: 5.5
Report link

I'm having the same issue. Was there a resolution?

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm having the same issue
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: evandrunen

79110543

Date: 2024-10-21 14:42:42
Score: 2
Natty:
Report link

The devcontainer extension is not able to call "docker compose" as shown in lines:

[5613 ms] Start: Run: docker-compose version --short

[5702 ms] Docker Compose version:

Try to change "Docker Compose Path" on Dev Containers extension settings

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Valci Oliveira

79110533

Date: 2024-10-21 14:40:42
Score: 1.5
Natty:
Report link

I have published Inno Setup EXE installers on the Windows Store. The notes about the process can be found at:

https://github.com/omarreis/vsop2013/blob/master/PublishInnoSetupOnMSStore.md

My apps are in Delphi Pascal, but it is the same for C++ executables, I suppose..

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Omar Reis

79110532

Date: 2024-10-21 14:39:41
Score: 2
Natty:
Report link

please follow this steps :

first of all => use an other browser and open that html file with the new browser if Nothing cahnge then => create a new document and save it as html before write down any word, then you caan write your html code and open it with different browser

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: ala nsibi

79110526

Date: 2024-10-21 14:38:41
Score: 2
Natty:
Report link

If you´re using WWSmartDevices, you could add an order by CustomerId or the attribute you want to group by and put the property "Break by" on true:

enter image description here

This should generate mini titles on the Grid groupped by Customer. I don´t know if it's posible to collapse this mini titles cause i don´t know the name they have in desing:

enter image description here

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Guido Lorenzatti

79110520

Date: 2024-10-21 14:37:41
Score: 1.5
Natty:
Report link

I resolved the problem, the issues was I was assigning the class on a tag to the grid area instead of assigned the class from div to the grid area

Reasons:
  • Whitelisted phrase (-2): I resolved
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: mcvince Muthoni

79110518

Date: 2024-10-21 14:36:41
Score: 2.5
Natty:
Report link

I encountered this error (unsupported data type: &[]), and this may be the solution if you're facing the same problem. The error occurs because one of the models you're using has a field with a data type that GORM doesn't support for your database (e.g., Postgres, MySQL, etc.).

For example, this issue might happen in Postgres with a field like:

 type Class struct {
   Student []uint64 `gorm:"column:student_ids" json:"studentIds"`
 }

Since Postgres doesn't support the array type []uint64 natively, you can resolve this by changing the field type to something that the database understands better, like text or json types.

Ensure all your model definitions are compatible with the database types to avoid such issues. You can run Migrate each struct to see which table has the problem.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same problem
  • Low reputation (1):
Posted by: SeTQT

79110515

Date: 2024-10-21 14:35:40
Score: 3
Natty:
Report link

Yes you can delete them. In newer versions they are not saved anymore in that table

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Shyim

79110514

Date: 2024-10-21 14:35:40
Score: 3
Natty:
Report link

Maybe you can find the corresponding stack in Google Play Console. Although it cannot be matched, the symbols of the system library are there.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: huqix

79110511

Date: 2024-10-21 14:35:40
Score: 1
Natty:
Report link

Within the callback, you can add remove_action( current_action(), 'custom_title', 10 ), limiting each action to running only once.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
Posted by: Caleb

79110502

Date: 2024-10-21 14:33:40
Score: 1.5
Natty:
Report link

The answer is to use absolute imports in the utils.py file as:

from app.data import *

Then to run main2.py, we need to use:

python main2.py

while being inside the app folder.

and to run main.py, we need to use:

python -m app.main

this way we can run both files without conflicts.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jeet Sensarma

79110501

Date: 2024-10-21 14:33:40
Score: 2
Natty:
Report link

we had the same issue and discovered it in the process of hotfixing. When creating a branch from main to implement a hotfix, merge this branch with main again to deploy the hotfix. Afterwards, do not merge main with dev (in the assumption of dev-preprod-prod setup), but merge the hotfix branch with dev. In this way Azure DevOps will not include all old linked tickets again.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sammy

79110484

Date: 2024-10-21 14:29:38
Score: 1
Natty:
Report link

Android Developers

Yannick App quality

Android Developers

Cette page a été traduite par l'API Cloud Translation. Switch to English Android Developers Conception et planification App quality Qualité technique Ce contenu vous a-t-il été utile ?

Réduire la taille de votre application

bookmark_border

Les utilisateurs évitent souvent de télécharger des applications qui paraissent trop volumineuses, en particulier sur les marchés émergents où les appareils se connectent à des réseaux 2G et 3G instables ou qui utilisent des forfaits avec des limites de données. Cette page explique comment réduire la taille de téléchargement de votre application afin de permettre à davantage d'utilisateurs de la télécharger.

Importer votre application avec Android App Bundle Importez votre application en tant qu'Android App Bundle pour enregistrer immédiatement sa taille lorsque vous la publiez sur Google Play. Android App Bundle est un format d'importation qui inclut l'ensemble du code compilé et les ressources de votre application, mais reporte la génération des APK et leur signature sur Google Play.

Le modèle de diffusion d'application de Google Play utilise ensuite votre app bundle pour générer et diffuser des APK optimisés pour la configuration d'appareil de chaque utilisateur, afin qu'ils téléchargent uniquement le code et les ressources dont ils ont besoin pour exécuter votre application. Vous n'avez pas besoin de créer, de signer ni de gérer plusieurs APK pour prendre en charge différents appareils, et les utilisateurs bénéficient de téléchargements plus petits et plus optimisés.

Google Play impose les téléchargements compressés limite de taille de 200 Mo pour les applications publiées avec des app bundles. Tailles plus grandes sont possibles avec Play Feature Delivery et Play Asset Delivery, mais l'augmentation de la taille de l'application peut avoir un impact négatif sur le succès des installations et augmenter le nombre de désinstallations. C'est pourquoi nous vous recommandons d'appliquer décrites sur cette page pour réduire autant que possible la taille de téléchargement de votre application.

Remarque:Pour les applications que vous publiez sur Google Play en important des APK signés, les téléchargements compressés sont limitées à 100 Mo. Comprendre la structure de l'APK Avant de réduire la taille de votre application, il est utile de comprendre la structure de son APK. Un fichier APK se compose d'une archive ZIP contenant tous les fichiers qui composent votre application. Ces fichiers incluent des fichiers de classe Java, des fichiers de ressources et un fichier contenant des ressources compilées.

Un APK contient les répertoires suivants :

META-INF/ : contient les fichiers de signature CERT.SF et CERT.RSA, ainsi que le fichier manifeste MANIFEST.MF. assets/ : contient les composants de l'application, que celle-ci peut récupérer à l'aide d'un objet AssetManager. res/ : contient les ressources qui ne sont pas compilées dans resources.arsc. lib/ : contient le code compilé spécifique à la couche logicielle d'un outil de traitement. Ce répertoire contient un sous-répertoire pour chaque type de plate-forme, tel que armeabi, armeabi-v7a, arm64-v8a, x86, x86_64 et mips. Un APK contient également les fichiers suivants. Seul AndroidManifest.xml est obligatoire :

resources.arsc : contient les ressources compilées. Ce fichier inclut le contenu XML de toutes les configurations du dossier res/values/. L'outil d'empaquetage extrait ce contenu XML, le compile au format binaire, puis l'archive. Le contenu inclut des chaînes et des styles de langage, ainsi que des chemins d'accès à du contenu qui n'est pas directement inclus dans le fichier resources.arsc, comme des fichiers de mise en page et des images. Remarque : Ne compressez pas ce fichier dans votre APK. classes.dex : contient les classes compilées au format de fichier DEX interprété par la machine virtuelle Dalvik ou ART. AndroidManifest.xml : contient le fichier manifeste Android principal. Ce fichier liste le nom, la version, les droits d'accès et les fichiers de bibliothèque référencés de l'application. Le fichier utilise le format XML binaire d'Android.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Yannick Brown

79110480

Date: 2024-10-21 14:28:38
Score: 2.5
Natty:
Report link

Changing the value in settings.json did not work for me.

What worked is in VS Code, change the setting by navigating to File --> Preferences --> Settings, enter terminal.integrated.rightclickbehavior in the search / filter text box. In the drop down, set the value to default

Reasons:
  • Blacklisted phrase (1): did not work
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: dntrplytch

79110474

Date: 2024-10-21 14:26:37
Score: 1
Natty:
Report link

You can use icacls to display or discretionary access control lists (DACLs) on specified files.

Create a batch file like file_permissions.bat and paste following

@echo off

for /f "tokens=*" %%a in ('dir /b /s /o') do (

    icacls "%%a" >> access_list.txt

)

Does this help?

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Shaan

79110472

Date: 2024-10-21 14:26:37
Score: 1
Natty:
Report link

As of now you have to use the deprecated SchemaParser with ValidationHandlerBuilder. There is an open issue about it: https://github.com/vert-x3/vertx-web/issues/2437

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Jakub Bochenski

79110467

Date: 2024-10-21 14:24:36
Score: 1.5
Natty:
Report link

As mentioned doing a "like" forces the database to scan, also the if statement complicates the query plan solution further

Can you rather select the data and do the contains on the app side?

var linkageData = query
    .SelectMany(p => p.AddressBookLinkage)
    .AsNoTracking()
    .Select(linkage => new 
    {
        MainContactId = linkage.MainContactId,
        Name = linkage.MainContactId == null ? linkage.MainSubject.Name : linkage.MainContact.Name
    })
    .ToList();

var result = linkageData
    .Where(linkage => linkage.Name.Contains(searchedTerm))
    .ToList();
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Ockert

79110466

Date: 2024-10-21 14:24:36
Score: 2
Natty:
Report link

This is a known limitation on Postgresql connector:

Insert row operation requires to provide explicit value for Primary Key column, even though default/autoincrement value is defined.

see https://learn.microsoft.com/en-us/connectors/postgresql/#known-issues-and-limitations for more details

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: jari0

79110463

Date: 2024-10-21 14:24:36
Score: 3.5
Natty:
Report link

The right selector should be #gvDates, not .gvDates.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user1780087

79110448

Date: 2024-10-21 14:19:35
Score: 2.5
Natty:
Report link

It doesn't appear in the latest version, should be fixed now. Test here, where you can check with different versions.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: jsc0218

79110437

Date: 2024-10-21 14:16:34
Score: 2
Natty:
Report link

When I do:

@Override
    public void onTestFailure(ITestResult result) {
        // WebDriver driver = null;
        try {
            Object instance = result.getInstance();
            if (instance instanceof BaseTest) {
            WebDriver driver = ((BaseTest) instance).getDriver();
                if (driver != null) {

                    screenshotUtility = new ScreenshotUtility(driver);
                    String testName = result.getName();
                    screenshotUtility.captureScreenshot(testName);              

                    String errorMessage = result.getThrowable().getMessage();
                    Allure.addAttachment("Error Message", errorMessage);
            ...
        }
    }

the driver is found, and is the same as in Base Test. enter image description here

but there is still no screenshot in Allure

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): When I
  • Low reputation (1):
Posted by: Panek Adamek

79110432

Date: 2024-10-21 14:15:33
Score: 0.5
Natty:
Report link

The problem is that, by some miracle, the maven.home variable disappears from the startup line when you do this in IDEA. In the beginning, I added it with my hands to MAVEN_OPTS and everything worked, but after restarting the computer, IDEA started adding it to the startup line again... It feels like this is some kind of bug, but in any case, you've figured out what to do.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: ulxanxv

79110428

Date: 2024-10-21 14:14:33
Score: 2
Natty:
Report link

In case anyone comes accross this Q, you can do this in Sendgrid's Dynamic Template UI.

In the Dynamic Template source, go Build -> Advanced -> Export.

In the Dynamic Template destination, go Build -> Advanced -> Import Drag & Drop HTML.

I can't find this mentioned in any docs online, but screenshot here:

Screenshot of Advanced Options in Sendgrid's App

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
Posted by: Alex

79110421

Date: 2024-10-21 14:12:32
Score: 2.5
Natty:
Report link

Try putting your .properties file in /www1/config/ folder

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Dr. Rahul Jha

79110418

Date: 2024-10-21 14:11:32
Score: 1.5
Natty:
Report link

I am currently using Hub in my AWS/React application and it works just fine. I imagine you just need to install aws-amplify via 'npm i aws-amplify' without the "/utils". Then, you can you use the same import statement as you are.

import { Hub } from "aws-amplify/utils";

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Jharell Chambers

79110416

Date: 2024-10-21 14:11:32
Score: 4.5
Natty:
Report link

I know this is a super very uber old thread, but I was looking for the same issue. In my case I click "play" on the vba editor, it loads the form and Excel is blocked. There are no hidden/insensive operations running, form is just waiting for me to give an input on combobox, options, textbox, button.... but I can't use any excel. This is because the form is seen as a priority dialog window in front of excel, so it's impossible to use spreadsheet.

This is not a bug or something, it's a standard behavior bacause excel always runs form in a "modal" mode. What does "modal" mean? When a form is displayed in modal mode, it blocks all other Excel activities until it is closed. This happens because the application's focus is completely shifted to the form.

How to solve it? To unblock Excel and allow the user to work on other sheets while the form is open, you need to display the form in non-modal mode.

Here's how to do it: UserForm1.Show vbModeless

Reasons:
  • Blacklisted phrase (1): How to solve
  • RegEx Blacklisted phrase (1.5): How to solve it?
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Walkingfridge

79110413

Date: 2024-10-21 14:10:31
Score: 1.5
Natty:
Report link

Set async_mode explicitly:

socketio = SocketIO(app, async_mode='gevent')
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: UÄźur Eren

79110412

Date: 2024-10-21 14:10:31
Score: 2
Natty:
Report link

The package 'interval_time_picker' allows you to do exactly what you want and has the same look and feel as the default time picker:

https://pub.dev/packages/interval_time_picker

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Nick Hermann

79110399

Date: 2024-10-21 14:07:30
Score: 2.5
Natty:
Report link

Can you switch from InternalAxiosRequestConfig to just AxiosRequestConfig? I mean, it is the same interface, literally InternalAxiosConfig just makes headers required.

https://github.com/axios/axios/blob/cda671af81ca87a00c6bf5a07bffcb07468756d3/index.d.ts#L316

headers are optional there, while InternalAxiosRequestConfig is perhaps used by Axios itself, that's why they made headers required there

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can you
  • Low reputation (0.5):
Posted by: Pavlo Sobchuk

79110394

Date: 2024-10-21 14:06:30
Score: 4.5
Natty: 5
Report link

Had to change IDocumentWriter to IGraphQLSerializer see https://github.com/graphql-dotnet/examples/blob/master/src/AspNetWebApi/WebApi/Controllers/GraphQLController.cs

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Johan Strydom

79110389

Date: 2024-10-21 14:05:29
Score: 2
Natty:
Report link

There is no direct way or CSS property to check if a scrollbar is present with only CSS. We don't write any logic which are conditional in CSS because CSS doesn't have that property. We can try the way which is helpful to style our elements differently on basis of scrollbar visibility by using CSS pseudo elements and media queries. By using this also we can't find the exact solution but it might help.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Dunga sharmila

79110383

Date: 2024-10-21 14:05:29
Score: 2
Natty:
Report link

I ran into this error on AWS Amplify after creating a new model (the model had a custom primary key and I'm not sure if that is the cause or not). However, I was able to fix this issue by deleting the indexedDB via Developer Tools. PLEASE DON'T DELETE YOUR ACTUAL DB. Refresh after deleting.

enter image description here

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Jharell Chambers

79110380

Date: 2024-10-21 14:04:29
Score: 0.5
Natty:
Report link

To make custom links clickable on Android, you need to ensure that your app is set up to handle these links properly. This involves configuring your Android app to recognize and handle the custom URL scheme. Here are the steps you can follow:

  1. Define the Intent Filter in AndroidManifest.xml:

You need to define an intent filter in your AndroidManifest.xml to handle your custom URL scheme. This will allow your app to be opened when a link with your custom scheme is clicked.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.exampleapp">

    <application
        android:label="@string/app_name"
        android:icon="@mipmap/ic_launcher">
        
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|density|uiMode"
            android:launchMode="singleTask"
            android:windowSoftInputMode="adjustResize">
            
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="exampleApp" android:host="feed" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Replace exampleApp with your actual custom scheme and feed with the appropriate host if needed.

  1. Handle the Intent in Your React Native Code:

You need to handle the incoming intent in your React Native code to navigate to the appropriate screen when the link is clicked.

in App.js :

import React, { useEffect } from 'react';
import { Linking } from 'react-native';

const App = () => {
  useEffect(() => {
    const handleDeepLink = (event) => {
      const url = event.url;
      // Parse the URL and navigate to the appropriate screen
      // Example: exampleApp://feed/123
      const route = url.replace(/.*?:\/\//g, '');
      const [feed, feedId] = route.split('/');
      if (feed === 'feed' && feedId) {
        // Navigate to the feed screen with the feedId
        console.log(`Navigate to feed with ID: ${feedId}`);
      }
    };

    // Add event listener for deep links
    Linking.addEventListener('url', handleDeepLink);

    // Check if the app was opened with a deep link
    Linking.getInitialURL().then((url) => {
      if (url) {
        handleDeepLink({ url });
      }
    });

    // Clean up the event listener
    return () => {
      Linking.removeEventListener('url', handleDeepLink);
    };
  }, []);

  return (
    // Your app component
  );
};

export default App;

By following these steps, your custom links should become clickable on Android, allowing users to open your app directly from the link.

good luck ;)

Reasons:
  • Blacklisted phrase (1): these links
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: TheMajidz

79110365

Date: 2024-10-21 14:01:26
Score: 6.5 đźš©
Natty:
Report link

This is the not the actual issue , Due to update in Android Studio SDK this issue is getting. Downgrade the android SDK it may resolve the problem. I am getting the same issue and it help me to fix it.

Reasons:
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (1): help me to fix
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): I am getting the same issue
  • Low reputation (1):
Posted by: shiva reddy

79110358

Date: 2024-10-21 13:59:26
Score: 3.5
Natty:
Report link

I don’t have access to the comment section.

However, the solution below (green tick answer) resolved my issue. Mentioning this so it can help others

Running dockerd gives error "open //./pipe/docker_engine: Access is denied." (Windows Server 1709)

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ravindra Mishra

79110354

Date: 2024-10-21 13:58:26
Score: 1.5
Natty:
Report link

add this line to your TextFormField:

autovalidateMode: AutovalidateMode.onUserInteraction,
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: anass Sanba

79110353

Date: 2024-10-21 13:58:26
Score: 1.5
Natty:
Report link

Disclaimer: I think questions about DDD rarely have answers, but are encouragements for dicussions. So this is my opinion with all possible flaws and biases. This is not an answer. But if you really like my opinion, you can select it as the accepted answer... which would be the pragmatism you need to solve your problem :-)

I'll give you an example from my project: sports competition management. There is this concept of an age group, for example "female under 18". You could say that this is a Value Object because it is defined by its values (gender, maxAge, minAge) and has no life cycle. But I introduced an Id because I need to reference it in foreign keys and I didn't want to have 2 columns (gender and maxAge) in my database for referencing it. And a few years into the project, it was decided that the minimum age would be changed. Until then you had to be at least 16 to participate in this age group, but they lowered it to 15. So we changed that in the age_group table / AgeGroup ValueObject.

... so this was the second indicator (after having an Id) that it might not be a Value Object. And it turns out there is a 3rd one: more than one entity referencing the same instance. When we changed the minimum age, this meant that we also changed the minimum age for some competitions in previous seasons... not good!

There is lots of dicussions if a postal address is a Value Object or an Entity. There is good arguments for both opinions. But if 2 people live in the same house and person.address points to the same instance of Address for both persons, then it is an entity for sure.

An example for ValueObject with Id: a person can have more than one way to contact them. so there is person.contactInfos an array of ContactInfo which has a type ("email", "phone", etc.) and URL. For simplicity's sake, I gave them an Id just to make the ORM easier. But when I update a persons Contact Infos, or change the order, I just delete the old ones and create the new ones. Because that's what Value Objects are: disposable and exchangeable. For every Value Object instance in your application. You should be able to delete it and then create one with the same values, attach it to an entity and things are just the way as before.

To sum it up:

For your problem, I suggest following decision path:

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): not an answer
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
Posted by: EasterBunnyBugSmasher

79110344

Date: 2024-10-21 13:55:25
Score: 2
Natty:
Report link

So up to now BouncyCastle is still one of the best and IMHO the easiest solutions to use EdDSA in C#. But things are moving, like NIST has a current draft FIPS 186-5 (Feb, 2023) where the algorithm is listed. It is still a relatively young algorithm, in crypto terms, but if governments approves it, it may get into the .NET libs.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: 5had0w

79110342

Date: 2024-10-21 13:54:24
Score: 2.5
Natty:
Report link

I have a similar issue now with the System.Text.Json package version, the newer vulnerability CVE-2024-43485, requiring package version 8.0.5 to fix.

Should this package version not be solely determined by the dotnet runtime?

When I search the \bin directories of an app or unit test project (not just library), no System.Text.Json.dll shows up, although many other System./Microsoft. DLLs are there.

I have SDK 8.0.403, runtime versions 8.0.10, where the issue shall be fixed, but the dotnet list command still shows vulnerable package version 8.0.4, instead of fixed 8.0.5.

Yes, I can update the existing "guard version" in Directory.Packages.props, but it shouldn't have any effect, especially in "final" code, which only goes into app/service/unit test. Or will it block execution on an older runtime?

Even where Microsoft itself uses those libraries, any version setting should be irrelevant, as long as runtime libraries are used and no specific package/DLL is delivered with them, to override the runtime version.

BTW: I found DLLs of System.Text.Json in NET 6 builds, although it has been part of the runtime since some 3.x version.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Me too answer (2.5): I have a similar issue
  • Contains question mark (0.5):
Posted by: Erik Hart

79110327

Date: 2024-10-21 13:51:23
Score: 1.5
Natty:
Report link

AWS s3 console has an option of Storage lens.

Inside it has default dashboard of bucket size. Along with different bucket size list, it has plenty of other useful information on the dashboard.

Additionally you can explore the different metrics and can create customised dashboards from those metrics related to s3.

enter image description here

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Harshal

79110321

Date: 2024-10-21 13:48:22
Score: 4
Natty:
Report link

i ulpoaded a chrome extention to generate xpaths, css selectors and the other locators , still it gives me wrong results , is there any way to solve this problem

Reasons:
  • Blacklisted phrase (1): is there any
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sara El otmani

79110315

Date: 2024-10-21 13:47:22
Score: 3.5
Natty:
Report link

Filtering Application Explorer: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/application-explorer#filtering-application-explorer

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: 10p

79110312

Date: 2024-10-21 13:45:21
Score: 1.5
Natty:
Report link

Open Terminal and run below command to check whether the runtime is installed or not.

dotnet --list-runtimes

you can direct download .Net core runtime using below link

.Net Core Runtime Version 8.0.0.0

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tech ATPL

79110304

Date: 2024-10-21 13:43:20
Score: 1
Natty:
Report link

Please remember that the second parameter (the size) is used to allocate the internal buffer, therefore it must allow for the 0-char terminator. Using message.size() might be the cause of your issue and must be replaced by message.size() + 1.

See sample code at eSpeak sample

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Marco Brenco

79110303

Date: 2024-10-21 13:43:20
Score: 3.5
Natty:
Report link

Update on Iphone/Ipad Settings > Profile > Sign In & Security > Sign In with Apple

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: PopLine

79110302

Date: 2024-10-21 13:43:20
Score: 4
Natty:
Report link

For me upgrading to 3.4.2 worked well (3.4.3) did not work.

Reasons:
  • Blacklisted phrase (1): did not work
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Sujeet

79110296

Date: 2024-10-21 13:41:19
Score: 1
Natty:
Report link

What you can try to use a combination of grep and sed in a shell script to get the value of PID from your txt file.

#!/bin/bash

grep -o 'pid: [0-9]\+' /tmp/log.txt | while read -r line; do
  echo "$line"
done
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): What you can
  • Low reputation (0.5):
Posted by: Shelton Liu

79110295

Date: 2024-10-21 13:41:19
Score: 3.5
Natty:
Report link

So the answer to my issue was that I had to use "ThisRecord" instead of Gallery and also reference the items from my column names from sharepoint(the url).

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: unionhp3232

79110291

Date: 2024-10-21 13:40:19
Score: 3
Natty:
Report link

Are you using Spring Boot as well, @SeyedAli? If so, do you have a dependency on the axon-spring-boot-starter?

Having that dependency without any configuration next to it is sufficient for Axon Framework to connect to a default Axon Server set up.

Reasons:
  • RegEx Blacklisted phrase (2.5): do you have a
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @SeyedAli
  • High reputation (-1):
Posted by: Steven

79110280

Date: 2024-10-21 13:35:16
Score: 6 đźš©
Natty: 5
Report link

If I want to convert query results into csv format, and some data fields are objects (not single field), itself has comma separated multiple sections of data?

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Hank

79110272

Date: 2024-10-21 13:34:15
Score: 2
Natty:
Report link

example

If you want to see the object you need to use the correct url, object url is not meant for public view / browser view. Use the public URL provided by AWS, you can click the open button to be able to see it

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: youssef houmazen

79110271

Date: 2024-10-21 13:34:15
Score: 1
Natty:
Report link

/solved

Alas as soon as you ask for help you discover the issue.

If you're using Cloud SQL Proxy locally the hostname is localhost/127.0.0.1, in Cloud run the hostname is /cloudsql/INSTANCE_CONNECTION_NAME.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Eriedor

79110265

Date: 2024-10-21 13:33:15
Score: 5
Natty:
Report link

When I use:

public class TestListener implements ITestListener {
      @Override
         public void onTestFailure(ITestResult result) {
            WebDriver driver = null;
            try {
                 driver = (WebDriver) result.getTestClass()
                                            .getRealClass()
                                            .getDeclaredField("driver")
                                            .get(result.getInstance());
        
                 if (driver != null) {
                     screenshotUtility = new ScreenshotUtility(driver);
                     String testName = result.getName();
                     screenshotUtility.captureScreenshot(testName);
                            
                     String errorMessage = result.getThrowable().getMessage();
                     Allure.addAttachment("Error Message", errorMessage);
                          
             } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
                e.printStackTrace();
                }
            }

driver is null.

I described my other classes here: [https://stackoverflow.com/questions/79102969/allure-doesnt-capture-screenshots-in-listener].

Do you have any idea why it doesn't work? In BaseTest I have a variable set :

protected WebDriver driver;

I don't want to use the answer @Suhail Ahmed becouse,I wouldn't like to have a parameter (ITestContext context) in every test class.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Suhail
  • Starts with a question (0.5): When I use
  • Low reputation (1):
Posted by: Panek Adamek

79110263

Date: 2024-10-21 13:32:14
Score: 1
Natty:
Report link

I also encountered this problem, the solution is very simple: do not use the same thread to SendInput.

I used it in C#, and after wrapping SendInput with Task.Run there was no problem.

Reasons:
  • Whitelisted phrase (-1): solution is
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: J.K. Xu

79110262

Date: 2024-10-21 13:32:14
Score: 0.5
Natty:
Report link

If your parent element uses display: flex, you should set your floating div to align-self: flex-start or something suits your case.

<div id="parent" style="display: flex">
  <div id="child" style="position: sticky; top: 0; align-self: flex-start">
    Content
  </div>
</div>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kayahan Kahrıman

79110257

Date: 2024-10-21 13:32:12
Score: 6.5 đźš©
Natty: 4.5
Report link

do you have any update ? im dealing with the same issue

Reasons:
  • RegEx Blacklisted phrase (2.5): do you have any
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: AuraTic908

79110242

Date: 2024-10-21 13:28:11
Score: 1.5
Natty:
Report link

To start with the original question does not in any way say that SCHEMA_DB is in a different Database, However if it is so, The db_link has to be defined in Schema MYUSER for it to work and avoid the message the user is receiving.

if however the Schema_B is in the same database then GRANT Select on the SCHEMA_B to user MYUSER should suffice.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Darin Rodrigues

79110240

Date: 2024-10-21 13:28:11
Score: 3
Natty:
Report link

It is for some language agents. Unfortunately for the Java agent it is not possible.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: André Onuki

79110232

Date: 2024-10-21 13:26:11
Score: 1.5
Natty:
Report link

above solutions also worked, but if sometimes it didn't. it's because due to you may included, mysql-driver, spring-data-jpa but not specified the datasource, username and password in application.properties.

you can either remove these dependencies or configure all above. in my case that's one region i found. i think it may help :).

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Satyaranjan Nayak

79110229

Date: 2024-10-21 13:25:10
Score: 2
Natty:
Report link

You sent a message to UI but didn't receive it because you don't have an event handler. You need to add this to ui.html:

onmessage = (event) => {
  console.log('Message from code.js', event.data.pluginMessage)
};

Please learn how to send and receive messages from/to code.js and ui.html from this article: https://www.figma.com/plugin-docs/creating-ui/#sending-a-message-from-the-plugin-code-to-the-ui

Reasons:
  • Blacklisted phrase (1): this article
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: tank666

79110223

Date: 2024-10-21 13:22:10
Score: 1
Natty:
Report link
Found the issue, thank you. Here are 2 things I did that resolved the issue for me.
1. Added an SM-AAD Technical Profile in the TrustFrameworkExtensions file to persist readOnlyEmail as below

    <TechnicalProfile Id="SM-AAD">
      <PersistedClaims>
       <PersistedClaim ClaimTypeReferenceId="readOnlyEmail" />
      </PersistedClaims>
    </TehcnicalProfile>
  1. In the EmailVerifyOnSignIn technical profile, replaced the Session Management profile SM-MFA with SM-AAD.
Reasons:
  • Blacklisted phrase (0.5): thank you
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Bandz

79110211

Date: 2024-10-21 13:19:09
Score: 2.5
Natty:
Report link

Since i use Linux i discovered that the problem was related to the firewall configuration for me. So trying to change the firewall settings or disabling it can help solving the problem too at least for Linux Distributions.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Gabriel Gomes

79110210

Date: 2024-10-21 13:19:08
Score: 4.5
Natty:
Report link

My code works, my boss was wrong.

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: aaaapython

79110207

Date: 2024-10-21 13:17:08
Score: 3
Natty:
Report link

Hi did you check your docker uses node version 18 only because it need to be node version 18

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Khushal Ghathalia

79110204

Date: 2024-10-21 13:16:07
Score: 3
Natty:
Report link

For anyone else that may run into the issue and find this page (as I did), the body has to include a final blank line after the --batch_guid-- line.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Chris Franklin

79110201

Date: 2024-10-21 13:16:07
Score: 4.5
Natty: 4.5
Report link

This sample does not work for me if I use with updated msal-react and msal-browser. I return false from onRedirectNavigation callback(this is now defined in msal config) and get a Info that there is no interaction in progress, therefore returning null. Is there some solution for it?

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: kireet joshi

79110199

Date: 2024-10-21 13:16:07
Score: 1
Natty:
Report link

Try These

Disable SoftWraps

  1. Open Settings (or Preferences on macOS).
  2. In the search bar, type console.
  3. Navigate to Editor > General > Console.
  4. Uncheck Use soft wraps in console.

Increasing console out width :

  1. Go to File > Settings (or PyCharm > Preferences on macOS).
  2. Navigate to Editor > General > Console.
  3. Find the setting called Override console output width and set it to a larger value or uncheck the box to disable the limit altogether.
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Naren D

79110195

Date: 2024-10-21 13:15:06
Score: 2.5
Natty:
Report link

After lots of searching and checking finally we were able to create the common controller and repository. We did not needed to load the via services, followed the generic structure and was able to achieve it.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: RDB

79110191

Date: 2024-10-21 13:15:06
Score: 0.5
Natty:
Report link

After updating flutter to 3.24, this problem arose again. It is related to the fact that now flutter checks the versions of compileSdkVersion and buildToolsVersion. Some packages either specify outdated versions or do not specify them at all.

As a solution, you need to update your packages to new versions. Also, if you have packages where these parameters are still not specified, you can add a script to your build.gradle between the subprojects instructions. It will look something like this:

subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    afterEvaluate { project ->
    if (project.plugins.hasPlugin("com.android.application") ||
            project.plugins.hasPlugin("com.android.library")) {
        project.android {
            compileSdkVersion 34
            buildToolsVersion "34.0.0"
            }
        }
    }
}
subprojects {
    project.evaluationDependsOn(':app')
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Baqar Naqvi

79110187

Date: 2024-10-21 13:14:06
Score: 3.5
Natty:
Report link

padding-inline-start: 0px; makes wonder for list indent

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sowmiya Siddharthan

79110186

Date: 2024-10-21 13:14:06
Score: 1
Natty:
Report link

It's like script-setup syntax:

import { ref, defineComponent } from 'vue'

const Test = defineComponent({
    setup() {
        const msg = ref('I am Brave')

        const changeMsg = () => {
            console.log('aa')
            msg.value = 'I will get everything I want'
        } 

        return () => (
            <div>
                <span>{msg.value}</span>
                <button onClick={changeMsg}>btn</button>
            </div>
        );
    },
});

export default Test
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Vasile Radeanu

79110183

Date: 2024-10-21 13:13:06
Score: 1
Natty:
Report link

Is there a Google Firebase setting? … - @Merenzo

I'm not sure Firebase Authentication can handle this natively. Like other StackOverflow users we also can't comment on the internals of how Firebase handles these requests as we aren't members of the Firebase Engineering team.

Per the OIDC spec, the discovery document should specify the issuer with the https (as they are doing) and use that same value in the tokens they issue (which they are not).

issuer

REQUIRED. URL using the https scheme with no query or fragment components that the OP asserts as its Issuer Identifier. If Issuer discovery is supported (see Section 2), this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this Issuer.


… Or some kind of proxy we can implement? Or some way … to display a different Discovery Document to us (and us alone)? - @Merenzo

In my loose testing, I was able to proxy the request coming from the Firebase Authentication client server using a HTTPS Cloud Function (2nd gen). This function would relay the request to the OpenID provider's server (the one hosting the OIDC discovery document), download the response, mutate it and return it back to the Firebase Authentication client.

In theory, with an appropriate API key pair and mutations, this should allow you to override the issuer field and any other necessary fields to make Firebase Authentication think this is the proper discovery document.

The text that follows assumes you are familiar with Cloud Functions for Firebase and have followed the Getting Started guide on how to deploy functions before continuing.

The next three code blocks are all in the same file (e.g. index.js), but I've split them up here to help explain what each part is doing. They are split into three groups: dependencies & helper functions, configuration, and the request handler.

Part 1: Dependencies & Helper Functions

This bit of code just allows for future expandability. During setup, you would call registerMutation to bind a pattern or string value to a callback that changes the response sent back to the client. When handling requests, you would instead call findMutator to check if the incoming request is supported and handle it when it is. Lastly, pick allows for a handful of properties to be selected from an object, but only if they exist on that object with a defined, non-null value.

// Dependencies
const {onRequest} = require("firebase-functions/v2/https");
const logger = require("firebase-functions/logger");

// Define some JSDoc type stubs (to help IDEs and IntelliSense)
/**
 * @typedef { object } DiscoveryConfig
 * @property { string } issuer
 */

/**
 * @typedef {(config: DiscoveryConfig) => DiscoveryConfig |
 * Promise<DiscoveryConfig>} MutationCallback
 */

// Define somewhere to hold as many mutations as we need ("future-proofing")
const {registerMutation, findMutator} = (() => {
  /**
   * @type {[stringOrPattern: string | RegExp, mutator: MutationCallback][]}
   */
  const mutators = [];
  return {

    /**
     * Registers a new discovery config mutator.
     * @param { string | RegExp } stringOrPattern A value matching the exact domain supported, the
     * exact URL, or a regular expression that matches supported targets.
     * @param { ((config: DiscoveryConfig) => DiscoveryConfig | Promise<DiscoveryConfig>) } mutator
     * A callback that mutates the provided configuration object.
     */
    registerMutation: (stringOrPattern, mutator) => {
      mutators.push([stringOrPattern, mutator]);
    },

    /**
     * Returns the registered mutator for the given domain.
     * @param { URL | string } target The target URL/domain to check. String comparisons
     * are case sensitive.
     * @return { MutationCallback | null } The callback associated with the pattern, or `null` if
     * one is not available.
     */
    findMutator: (target) => {
      if (!target) return null;
      const targetAsString = target.toString();
      const hostAsString = target instanceof URL ? target.host : target;
      const mutatorEntry = mutators.find(([stringOrPattern]) =>
        stringOrPattern instanceof RegExp ?
          stringOrPattern.test(targetAsString) || stringOrPattern.test(hostAsString) :
          stringOrPattern === targetAsString || stringOrPattern === hostAsString);
      return mutatorEntry && mutatorEntry[1] || null;
    },
  };
})();

/**
 * Helper function to pick the named properties from the provided object when they exist.
 * @param { object } obj The object to source properties from.
 * @param { string[] } props An array of properties to be extracted when they are present. 
 * @returns { object } A new object containing the selected properties.
 */
function pick(obj, props) {
  return props.reduce((acc, prop) => {
    if (prop in obj && obj[prop] != null) {
      acc[prop] = obj[prop];
    }
    return acc;
  }, Object.create(null));
}

Part 2: Mutators & Configuration

In this section, we register each mutation that we want to support.

In the below block, we are defining a mutator for requests targeting abc-vis-cert-cloud3.ourclient.com that overrides the issuer with a new value ("urn:VISCertC3:abc"), leaving the rest of the properties unchanged. Other overrides can be made here as needed.

registerMutation(
  "abc-vis-cert-cloud3.ourclient.com", // can be the host, the full URL, or a RegExp matching either of those
  (config) => {
    config.issuer = "urn:VISCertC3:abc"; // override the issuer
    return config; // return the rest unchanged
  }
);

// headers to pass from the client through to the OpenID provider's server
const PASSED_REQUEST_HEADERS = [
  "forwarded",
  "x-forwarded-for",
  "x-forwarded-host",
  "x-forwarded-proto",
  "user-agent", // proxy should probably have its own user-agent
];

// headers to pass from the OpenID provider's server back to the client
const PASSED_RESPONSE_HEADERS = [
  "cache-control",
  "expires",
  "pragma",
  "x-cache",
];

Part 3: Handling Requests

In this block, we define the HTTPS Cloud Function (2nd gen) at the heart of this mutating proxy. This function expects to be called with a URL of the format https://<DEPLOYED_CLOUD_RUN_DOMAIN>/<PROVIDER_SERVER_DOMAIN>/<PATH_TO_OIDC>. For the given example, this would be https://oidcproxy-<ID>-<REGION>.a.run.app/abc-vis-cert-cloud3.ourclient.com/.well-known/openid-configuration.

This function can currently handle up to 10 concurrent requests from any origin at a time per instance, thanks to the { cors: true, concurrency: 10 } configuration. This can be adjusted as needed.

Upon receiving an in-scope request (must match one of the configured patterns), it extracts the domain and path from the requested URL, assembles a HTTPS request to the OpenID provider's server and executes it. Upon receiving a response, the response body is fed through the mutator before being sent back to the client.

The error handling below is not very robust, but it should handle most processing errors gracefully.

// concurrency set to 10 as this function mainly waits on the remote OpenID provider's server
exports.oidcProxy = onRequest({ cors: true, concurrency: 10 }, async (req, res) => {
  try {
    const [, domain, ...pathParts] = req.path.split("/") || [];

    if (!domain) {
      logger.info("Rejected request without target.");
      res.status(404).json({error: "Unsupported domain"});
      return;
    }

    const target = new URL("https://" + domain + "/" + pathParts.join("/"));
    const mutator = findMutator(target);

    if (!mutator) {
      logger.info("Rejected request for: " + target);
      res.status(404).json({error: "Unsupported domain"});
      return;
    }

    const targetResponse = await fetch(target, {
      headers: {
        "Accept": "application/json",
        ...pick(req.headers, PASSED_REQUEST_HEADERS),
      },
      method: "GET",
    });

    if (!targetResponse.ok) {
      logger.error("OIDC provider returned unexpected status code.", {
        status: targetResponse.status,
        statusText: targetResponse.statusText,
        body: await targetResponse.text()
      });
      res.status(502).json({error: "Bad Gateway"});
      return;
    }

    const config = await targetResponse.json()
        .then((config) => mutator(config));

    logger.info("Mutation for " + domain + " was successful.");
    res.setHeader('cache-control', 'no-cache, no-store');
    Object.entries(pick(targetResponse.headers, PASSED_RESPONSE_HEADERS))
      .forEach(kvp => res.setHeader(...kvp));

    res.status(200).json(config);
  } catch (err) {
    if (!res.headersSent) {
      logger.error("Failed to mutate discovery document.", err);
      res.status(500).json({error: "Internal server error"});
    } else {
      logger.error(
          "Failed to mutate discovery document, but headers were already sent.",
          err,
      );
      res.end();
    }
  }
});

If you get errors related to formatting/linting when you try to deploy the above code, you can disable the linting check by removing the contents of the "predeploy" array nested under the "functions" object in your firebase.json file.

Usage

Once your Cloud Function is deployed, you will be provided with the URL that your function is hosted at, such as https://oidcproxy-3x4mpl3-uc.a.run.app. Next, you will need the domain of the target OpenID provider's server, in the provided example, this would be abc-vis-cert-cloud3.ourclient.com. Lastly, you will need the path to the provider's /.well-known/openid-configuration document. Spec-compliant discovery documents should have it hosted at <issuer>/.well-known/openid-configuration. For the given example, their document is located at https://abc-vis-cert-cloud3.ourclient.com/.well-known/openid-configuration.

Using these components and the following format:

https://<DEPLOYED_CLOUD_RUN_DOMAIN>/<PROVIDER_SERVER_DOMAIN>/<PATH_TO_OIDC>

We can now construct the URL:

https://oidcproxy-3x4mpl3-uc.a.run.app/abc-vis-cert-cloud3.ourclient.com/.well-known/openid-configuration

You should now be able to visit this URL to view the mutated OIDC discovery document.

Once you've checked its working, we need to trim off the .well-known/openid-configuration component before we can use it in the Firebase OIDC Provider setup instructions included below.

https://oidcproxy-3x4mpl3-uc.a.run.app/abc-vis-cert-cloud3.ourclient.com/
  1. Add Firebase to your JavaScript project.

  2. If you haven't upgraded to Firebase Authentication with Identity Platform, do so. OpenID Connect authentication is only available in upgraded projects.

  3. On the Sign-in providers page of the Firebase console, click Add new provider, and then click OpenID Connect.

  4. Select whether you will be using the authorization code flow or the implicit grant flow.

    You should use always the code flow if your provider supports it. The implicit flow is less secure and using it is strongly discouraged.

  5. Give a name to this provider. Note the provider ID that's generated: something like oidc.example-provider. You'll need this ID when you add sign-in code to your app.

  6. Specify your client ID and client secret, and our proxied issuer string (in the format above). The client ID and client secret values must exactly match the values your provider assigned to you.

Now you can test it by initialising an OAuthProvider for that service provider as described in the rest of the instructions.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): StackOverflow
  • RegEx Blacklisted phrase (1): can't comment
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there a
  • Looks like a comment (1):
  • High reputation (-2):
Posted by: samthecodingman

79110180

Date: 2024-10-21 13:13:05
Score: 4
Natty: 6
Report link

thanks for excellent script it worked till I changed to HPOS.

Can anyone update this script, it doesn't work anymore with HPOS enabled?

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Marjan Vrban

79110178

Date: 2024-10-21 13:13:05
Score: 3
Natty:
Report link

Update in 2024, there is a library that can help fix the TransactionTooLargeException by efficiently managing the size of data. This library ensures that the data being saved in the Bundle does not exceed the transaction buffer limit.

You can find the BundleSaver library on GitHub: https://github.com/kernel0x/bundlesaver

Reasons:
  • Contains signature (1):
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kernel

79110169

Date: 2024-10-21 13:10:03
Score: 6.5 đźš©
Natty:
Report link

how much do you pay? I will help

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): how
  • Low reputation (1):
Posted by: Daler

79110161

Date: 2024-10-21 13:07:02
Score: 1.5
Natty:
Report link

I had the same problem, but with gradle.

I fixed it by enabling "Debug all Gradle tasks on the execution graph" in the Run Options config.

Debug Options

There might be a similar option when running Maven tasks?

Reasons:
  • Whitelisted phrase (-2): I fixed
  • Whitelisted phrase (-1): I had the same
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Jamie G

79110159

Date: 2024-10-21 13:07:02
Score: 1
Natty:
Report link

It sounds like you're working on finding highs and lows in financial OHLC data to help determine when prices cross important support or resistance lines. If you're looking for a solution that could automatically detect significant oscillations and trend lines, I'd like to suggest Oscillation Spotter, a Python library designed to spot sharp movements in asset prices over short time frames.

Oscillation Spotter can help identify key oscillations, which can be useful for detecting significant highs and lows, and make it easier to set alert criteria for crossovers. The library is open-source, easy to use, and could simplify your current approach to detecting trends without needing to manually define highs and lows or draw virtual trend lines.

Feel free to check out Oscillation Spotter on PyPI and see if it aligns with what you're trying to accomplish. I'd be happy to hear if this helps or if you have more questions about applying it to your data!

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Alex

79110151

Date: 2024-10-21 13:06:02
Score: 3.5
Natty:
Report link

I know it's been a while since you asked, but I think you need to tell the script where it should start running by clicking on your first variable. So, if your first variable is at A1 you need to mark/click that particular cell.

Reasons:
  • Blacklisted phrase (1): I know it's been
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Tim E.

79110149

Date: 2024-10-21 13:05:59
Score: 12.5 đźš©
Natty: 5.5
Report link

I'm facing the same issue now, did you resolve it ?

Reasons:
  • RegEx Blacklisted phrase (3): did you resolve it
  • RegEx Blacklisted phrase (1.5): resolve it ?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm facing the same issue
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: TheMoroccan

79110147

Date: 2024-10-21 13:04:57
Score: 8 đźš©
Natty:
Report link

i cannot find programming solution , but i can do it manually by open Firefox profile, then go to about:preferences#privacy and change enhance tracking protection to custom and in cookies option select cross site tracking cookies like this: cross site cookies now the popup message not appears again ,if anyone found how to do that in options.SetPreference(...) please share it

Reasons:
  • Blacklisted phrase (1.5): i cannot find
  • Blacklisted phrase (2): anyone found
  • Blacklisted phrase (0.5): i cannot
  • RegEx Blacklisted phrase (2.5): please share
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Fath Bakri

79110146

Date: 2024-10-21 13:04:57
Score: 1.5
Natty:
Report link

As of iOS 17.0, you have to use:

UNUserNotificationCenter.current().setBadgeCount(0)
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: EfeHelvaci

79110143

Date: 2024-10-21 13:03:57
Score: 2.5
Natty:
Report link

Right answer has link, which is not working. May be, such outside link, can be used for hacking, at a later point of time, by manipulating contents in that link.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Saraswathi R

79110125

Date: 2024-10-21 12:59:56
Score: 3
Natty:
Report link

As a slightly alternative solution, there is an option to use not an ArrayList, but a Dictionary. VBS dictionary also has the Exist and Remove functions (personally, I was missing them in a regular Array), but this is still a slightly different way to solve the problem

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ivan Serdukov

79110120

Date: 2024-10-21 12:57:55
Score: 3
Natty:
Report link

Simply check out the build number on the xcode, make sure it has no white space and only number. Good luck.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Yesunerdene

79110118

Date: 2024-10-21 12:54:55
Score: 1
Natty:
Report link

To apply component properties to a node, use the componentPropertyReferences property. Also note that the addComponentProperty() method returns a unique property ID, which you need to use in componentPropertyReferences and setProperties().

// Add component's text properties
const prop1 = componentNode.addComponentProperty('PropertyName 1', 'TEXT', '');
const prop2 = componentNode.addComponentProperty('PropertyName 2', 'TEXT', '');

// Apply these properties to text nodes inside component
textNode1.componentPropertyReferences = {characters: prop1};
textNode2.componentPropertyReferences = {characters: prop2};

// Set new values for component properties
instanceNode.setProperties({[prop1]: value1, [prop2]: value2})

Please read the documentation:

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: tank666

79110114

Date: 2024-10-21 12:53:55
Score: 1.5
Natty:
Report link

Try document.querySelector(".loader").remove() document is referencing the whole page. querySelector gets the first element with the given attribute. remove() removes it.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: OzelotGamer

79110113

Date: 2024-10-21 12:52:54
Score: 5.5
Natty:
Report link

You can add a postprocessor to the tokenizer, similar to my answer in How to add EOS when training T5?

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: arr10

79110109

Date: 2024-10-21 12:50:53
Score: 3
Natty:
Report link

Para resolver ese problema deben buscar en los disitnos module, deben tener doble implementacion, me paso eso y lo resolvi asi es un error de codigo

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Emanuel Montenegro

79110103

Date: 2024-10-21 12:49:53
Score: 1.5
Natty:
Report link

Saving command's stdout to a variable:

var=$(command)
var=`command`

Double-quote right-side expression to properly handle multilines & globs.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: arcadius

79110092

Date: 2024-10-21 12:46:52
Score: 0.5
Natty:
Report link

I believe your api firewall should be declared before your main firewall.

The first firewall that matches is used by Symfony, and since you have no pattern on main, it is used to handle everything, even for the ^/api paths.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: tcoch

79110087

Date: 2024-10-21 12:43:51
Score: 12
Natty: 7.5
Report link

I have the same problem , did you find the solution ?

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • RegEx Blacklisted phrase (3): did you find the solution
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Islandar

79110079

Date: 2024-10-21 12:41:50
Score: 1.5
Natty:
Report link

It seems the issue you're encountering is due to the dynamic behavior of the webpage, where the file input element may be reset or hidden after the first upload. You can try to use driver.refresh() after the first upload to reset the page and make the file input available for next uploads.

ALso,before uploading the next file, try doing "file_input.clear()" to remove the previous file path and allow a new one.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Arpit Verma

79110066

Date: 2024-10-21 12:38:49
Score: 2.5
Natty:
Report link

You need to create the Azure OpenAI client by using AsyncAzureOpenAI as given below.

client = openai.AsyncAzureOpenAI(
    api_key = os.getenv("GPT_AZURE_OPENAI_API_KEY"),  
    api_version = "2024-08-01-preview",
    azure_endpoint = os.getenv("GPT_AZURE_OPENAI_ENDPOINT")
    )

Your complete code should look like below.

import azure.functions as func
import logging
from langchain_openai import AzureOpenAIEmbeddings
import os
import openai
from langchain_community.vectorstores.azuresearch import AzureSearch
import json
from azurefunctions.extensions.http.fastapi import Request, StreamingResponse
import asyncio

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)

async def stream_processor(response):
    async for chunk in response:
        if len(chunk.choices) > 0:
            delta = chunk.choices[0].delta
            if delta.content: 
                await asyncio.sleep(0.1)
                yield delta.content


@app.route(route="http_trigger", methods=[func.HttpMethod.POST])
async def http_trigger(req: Request) -> StreamingResponse:
    logging.info('Python HTTP trigger function processed a request.')
    
    req_body = await req.body()  
    logging.info(f'Request body: {req_body}') 
    data = json.loads(req_body.decode('utf-8'))
    variable1 = data.get("query")
    
    embeddings: AzureOpenAIEmbeddings = AzureOpenAIEmbeddings(
        azure_deployment=os.environ.get("EMB_AZURE_DEPLOYMENT"),
        openai_api_version=os.environ.get("EMB_AZURE_OPENAI_API_VERSION"),
        azure_endpoint=os.environ.get("EMB_AZURE_ENDPOINT"),
        api_key=os.environ.get('EMB_AZURE_OPENAI_API_KEY'),
    )

    index_name= "de-iceing-test"
    vector_store: AzureSearch = AzureSearch(
        azure_search_endpoint=os.environ.get("VECTOR_STORE_ADDRESS"),
        azure_search_key=os.environ.get("VECTOR_STORE_PASSWORD"),
        index_name=index_name,
        embedding_function=embeddings.embed_query,
    )

    client = openai.AsyncAzureOpenAI(
    api_key = os.getenv("GPT_AZURE_OPENAI_API_KEY"),  
    api_version = "2024-08-01-preview",
    azure_endpoint = os.getenv("GPT_AZURE_OPENAI_ENDPOINT")
    )

    def userchat(query):
        docs = vector_store.similarity_search(
            query=fr"{query}",
            k=2,
            search_type="similarity",
        )
        chunk = [item.page_content for item in docs]
        return chunk
    
    context = userchat(variable1)
    prompt = fr"Content: {context} \
                please provide a clear and concise answer to the user's query/question mentioned below.\
                Query: {variable1}.\
                If the query is about the procedue or the method then generate the text in bullet points."
    prompt1 = fr"Here is the query from the user, Query: {variable1} \
                Can you please provide a clear and concise solution to the user's query based on the content below and summary below.\
                Content: {context}"
    
    logging.info(prompt)

    response = await client.chat.completions.create(
        model="gpt-4",
        messages=[
            {"role": "user", "content": f"{prompt}"}
        ],
        stream=True
    )
    logging.info(f"OpenAI API Response Object: {response}")

    if response is not None:
        logging.info("Streaming started...")
        return StreamingResponse(stream_processor(response), media_type="text/event-stream")
    else:
        return func.HttpResponse(
            "Error: Response is not iterable or streaming not supported.",
            status_code=500
    )

enter image description here

Reasons:
  • RegEx Blacklisted phrase (2.5): please provide
  • RegEx Blacklisted phrase (2.5): Can you please provide
  • Long answer (-1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Ikhtesam Afrin