What you can try to redirect stdin for gradle using /dev/null.
#!/bin/bash
echo Hello
gradle clean < /dev/null
echo Bye
<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 :)
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");
});
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:
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.
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?)
For Gemini AI I have seen also issues until I changed the Base URL as following:
https://generativelanguage.googleapis.com/v1beta/models
Now, it is working well
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"
If you wanna change the feature font size,this code works for me:
shap.summary_plot(shap_values, show=False)
fig, ax = plt.gcf(), plt.gca()
for text in ax.texts: text.set_fontsize( your_font_size_number)
plt.show()
I'm having the same issue. Was there a resolution?
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
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..
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
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:
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:
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
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.
Yes you can delete them. In newer versions they are not saved anymore in that table
Maybe you can find the corresponding stack in Google Play Console. Although it cannot be matched, the symbols of the system library are there.
Within the callback, you can add remove_action( current_action(), 'custom_title', 10 ), limiting each action to running only once.
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.
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.
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.
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
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?
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
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();
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
The right selector should be #gvDates, not .gvDates.
It doesn't appear in the latest version, should be fixed now. Test here, where you can check with different versions.
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
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.
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:
Try putting your .properties file in /www1/config/ folder
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";
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
Set async_mode explicitly:
socketio = SocketIO(app, async_mode='gevent')
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:
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
Had to change IDocumentWriter to IGraphQLSerializer see https://github.com/graphql-dotnet/examples/blob/master/src/AspNetWebApi/WebApi/Controllers/GraphQLController.cs
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.
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.
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:
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.
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 ;)
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.
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)
add this line to your TextFormField:
autovalidateMode: AutovalidateMode.onUserInteraction,
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:
If the model object is actually only a string, then it's a Value Object. Maybe just an Enum?
If the same model object is referenced by more than one entity, then it's an entity. You might want to introduce the concept of "immutable entity with a Uniqueness Constraint" like my example of the AgeGroup that has a uniqueness constraint over gender + maxAge
If your model object has an Id just to simplify ORM but is only attached to one entity and you can delete that instance and recreate it without any side effects, then it's a Value Obect with an Id.
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.
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.
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.
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
Filtering Application Explorer: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/application-explorer#filtering-application-explorer
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
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
Update on Iphone/Ipad Settings > Profile > Sign In & Security > Sign In with Apple
For me upgrading to 3.4.2 worked well (3.4.3) did not work.
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
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).
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.
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?
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
/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.
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.
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.
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>
do you have any update ? im dealing with the same issue
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.
It is for some language agents. Unfortunately for the Java agent it is not possible.
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 :).
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
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>
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.
My code works, my boss was wrong.
Hi did you check your docker uses node version 18 only because it need to be node version 18
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.
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?
Try These
Disable SoftWraps
Increasing console out width :
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.
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')
}
padding-inline-start: 0px; makes wonder for list indent
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
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
httpsscheme 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 theissClaim 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.
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));
}
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",
];
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.
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/
Add Firebase to your JavaScript project.
If you haven't upgraded to Firebase Authentication with Identity Platform, do so. OpenID Connect authentication is only available in upgraded projects.
On the Sign-in providers page of the Firebase console, click Add new provider, and then click OpenID Connect.
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.
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.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.
thanks for excellent script it worked till I changed to HPOS.
Can anyone update this script, it doesn't work anymore with HPOS enabled?
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
how much do you pay? I will help
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.
There might be a similar option when running Maven tasks?
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!
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.
I'm facing the same issue now, did you resolve it ?
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:
now the popup message not appears again
,if anyone found how to do that in options.SetPreference(...) please share it
As of iOS 17.0, you have to use:
UNUserNotificationCenter.current().setBadgeCount(0)
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.
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
Simply check out the build number on the xcode, make sure it has no white space and only number. Good luck.
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:
Try document.querySelector(".loader").remove()
document is referencing the whole page.
querySelector gets the first element with the given attribute.
remove() removes it.
You can add a postprocessor to the tokenizer, similar to my answer in How to add EOS when training T5?
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
Saving command's stdout to a variable:
var=$(command)
var=`command`
Double-quote right-side expression to properly handle multilines & globs.
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.
I have the same problem , did you find the solution ?
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.
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
)
