instruction stringlengths 0 30k ⌀ |
|---|
null |
I have installed firebase version 8.6.5 using `npm install firebase` . But I wish to downgrade firebase to version 7.16.1 due to some code compatibility.
|
How can I downgrade firebase version? |
I had been made a custom auth server wiht `org.springframework.security:spring-security-oauth2-authorization-server:1.2.2` and `spring boot 3.x`.
And I tried to make a server like documents.
but there was a problem.
```
@Configuration
@EnableWebSecurity
public class SecurityCon {
@Bean
@Order(1)
pub... |
how to accept custom oauth2 and oidc authentication server? |
|spring|spring-boot|spring-security|oauth-2.0|openid-connect| |
```
T = TypeVar("T", bound=str)
def foo(a: T, b: T) -> T:
return a + b
print(foo("1", "2"))
```
mypy:
`error: Incompatible return value type (got "str", expected "T") [return-value]`
I dont understand how to fix this problem(using bound). |
mypy Incompatible return value type with TypeVar(bound=str) |
|mypy|typing| |
null |
I am trying to perform a network meta-analysis. The network contains 3 subnetworks. Therefore I decided to use netmeta::discomb to perform an additive analysis. This worked without error in another project, but not with the new studies.
My current dataset contains 9 studies over a total of 10 treatments (all two-arm... |
I'm fairly new to .NET Core and I'm working on a mini project, an apartment booking website.
I've already made my data models and data tables for the site. When I scaffold a new controller with Razor views, the create form just doesn't work when there is a foreign key in the table.
The basic create for simple ta... |
Visual Studio scaffolded Create form does not work in ASP.NET Core 8 MVC |
|asp.net-core-mvc|foreign-keys|visual-studio-2022|modelstate|asp.net-mvc-scaffolding| |
As already noted - use `localStorage`. Gave you a working example, but it won't work on stackoverflow.com because of `allow-same-origin`:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
const langEls = document.querySelectorAll('.lang');
const textEl = docu... |
[pathlib][1] is perfect for this.
[1]: https://docs.python.org/3/library/pathlib.html
Code:
from pathlib import Path
files = [x.name for x in Path.cwd().glob("*.xls*")]
Edit:
In the off chance a file is named abc.xls.txt you can add a check.
files = [x.name for x in Path.cwd().glob(... |
Cannot resolve method 'requestLocationUpdates(String, int, int, LocationListener)'
try {
locationManager = (LocationManager) requireActivity().getSystemService(LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,3000,3,locationListener);
... |
|java|android|locationmanager| |
const requestNotificationPermission = async () => {
try {
if (Platform.OS === 'android') {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS,
);
console.log({granted});
if (grante... |
I am using below code for POST_NOTIFICATIONS in a React Native app but every time it return never_ask_again |
|react-native|notifications| |
I'm working in DataBricks with Python/PySpark. I have several output columns that copy a single input column. One of the output columns is the lower-case version of the upper-case or mixed-case input column, which I need to rename this way before I drop it. Because I am also casting its type, I use the `withColumn()... |
DataBricks PySpark withColumn() Fails After First Success |
Why can I not increase my Java heap space? |
null |
The code below uses a **background callback** (dash) to retrieve a value.
Every 3 seconds, `update_event(event, shared_value)` sets an `event` and define a `value`. In parallel, `listening_process(set_progress)` waits for the `event`.
This seems to work nicely and the waiting time is low (say a few seconds). Wh... |
I wanted to calculate the average of company score and property score by ignoring the 0's for the below picture (pic1) in pivot table
![Pic1][1]
[1]: https://i.stack.imgur.com/xkRtt.png
When I average the column in pivot table it includes the 0's as gives the average as shown in below picture (pic2) :
!... |
null |
I am new in react native expo. I am trying to create water reminder app, with react native expo and SQLite. I am constantly getting this error message when adding inserting data into table. ChatGPT and Google Gemini both not being able to solve.
LOG
> Table created successfully ERROR Error checking date in dat... |
null |
When I click add to cart on my django ecommerce website, the items are not added to cart and in the console an error message appears:
> VM40:1 Uncaught (in promise) Syntax Error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON) and (POST http://127.0.0.1:8000/update_item/ 404 (Not Found)
I tried adding a CS... |
I am experiencing a 404 error in the console on my django project |
null |
I dont have xp with java, but i guess the question is more about oop than clean arch. But if java classes accept inheritance and abstract classes, or just inheritance, you can make a class with the specific behavior (canDoX()) an then extends in both classes. But, have a chance to use the MyData class instead MyDataWit... |
tokens in local storage isn't the more secure approach. httpOnly cookie is better to ensure javascript can't access the token. httpOnly cookies are sent with every request to backend, so even if building a single page application, you can still use this more secure approach. lots of content online can go into more dept... |
```csharp
public virtual void CompositeImage(byte[] buffer, int bufferWidth, int bufferHeight, byte[] image, int imageWidth, int imageHeight, int x, int y)
{
for (int i = 0; i < imageHeight; i++)
{
for (int j = 0; j < imageWidth; j++)
{
if (j > bufferWidth)
{
... |
Install the below in virtual environment
``` pip install llama-index qdrant_client torch transformers ```
``` pip install llama-index-llms-ollama ```
Sample code :
```
# Just runs .complete to make sure the LLM is listening
from llama_index.llms.ollama import Ollama
from llama_index.core import Settings
l... |
For install **cudatoolkit and cudnn** by Anaconda you can use these following command `conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0` on command prompt
You must aware the **tensorflow version** must be less than **2.11**
For check if the everything installed properly
1) In command prompt check `n... |
I'm having an issue with Excel Code editor. From time to time it crashes and only shows white window.
Do you know what might be an issue? I was able to fix it once, by relogging to Microsoft account everywhere, but it's pretty annoying.
[![screenshot][1]][1]
[1]: https://i.stack.imgur.com/8tbv9.png |
Excel Code Editor doesn't work (blank window) |
|excel|typescript| |
I have interfaces
**Angular Typescript Class**
interface A_DTO {
type: string,
commonProperty: string,
uniquePropertyA: string,
etc..
}
interface B_DTO {
type: string,
commonProperty: string,
uniquePropertyB: string,
etc...
}
type AnyDTO... |
|python|pyspark|databricks| |
DataBricks/PySpark is, indeed, a case-sensitive language, but using the `withColumn()` command this way - to re-cast and re-name an existing column from upper/mixed-case to lower-case (or any combination of case-change that does not also change the actual column name) - causes the `withColumn()` command to revert to a ... |
I am trying to configure spring gateway using spring boot 3 version, java 17 version, and kotlin language.
However, it seems that the spring security settings are not applied.
as postman
POST
If I call it with http://127.0.0.1:11001 I get a 403 Forbidden error and An expected CSRF token cannot be found
The res... |
It's about a course selection. First we select the course, depending on that we select the level and then a batch as given in the code. but finally I want to select either 1 or more subjects inluding all subjects which selects all the given subjects I also want to pass these data as a form to the backend. so I need val... |
How to create a dynamic select list with multiselect as the last select box, only using html and js |
|javascript|html|forms|tailwind-css| |
null |
> Message: Response status code does not indicate success: 403 (This request is not authorized to perform this operation.).
The above error occurs when you don't have enough permission or you're passing the wrong SAS token to access the storage account.
> The network restriction on the Storage Account is: **En... |
null |
{"OriginalQuestionIds":[45095523],"Voters":[{"Id":442760,"DisplayName":"cafce25","BindingReason":{"GoldTagBadge":"rust"}}]} |
I hosted a next js website on firebase using firebase cli successfully. Now I'm trying to configure github actions to deploy it automatically.
I am struck on this step:
*? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository)*
My repo is inside an organization and I... |
null |
`path="/:profile"` has the same specificity as `path="/:postpage"`, so the first route encountered when matching routes to the current URL path is the one that is rendered.
Based on the URL in the screenshot it looks like you are navigating to the string literal `"/:profile"`, so I suspect you meant to render a rout... |
The issue is that python's `print()` doesn't have a return value, meaning it will always return `None`. `eval` simply evaluates some expression, and returns back the return value from that expression. Since `print()` returns `None`, an `eval` of some print statement will also return `None`.
```
>>> from_print = pri... |
null |
I have a table, one column with emails, the one next to it with serial numbers.
I want to find the maximum serial number value for every email using this formula.
=TEXT(MAX(IF($A$1:$A$100=A4, MID($B$1:$B$100, 5, 5)+0)), "\VUAM00000")
to achieve something like this
.
Here is the Slurm script I tried. I tried different combinations of setup.
It works occasionally as wanted. Most of time, it creates 4 processes in 1 node, and allocate 2 processes to 1 GPU. It... |
I'm trying to pass an array of objects like this but I'm getting an Error:
'"type: object" is forbidden here'.
```
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
... |
How to pass an array of objects to multipart/form-data? |
|yaml|multipartform-data| |
null |
I suggest checking out this article about outlook's css quirks: **[A Guide to Rendering Differences in Microsoft Outlook Clients][1]**. It talks about using VML as a workaround.
Issue:
<!--[if mso]>
<table align="center" border="0" cellspacing="0" cellpadding="0" style="width:100%; border-collapse: colla... |
This is Powershell/WPF (The loaded assemblies are pasted from my project and mostly not needed for this)
I am making an animated flyout button, it works as intended, I click the button, it slides into position, at the end of the animation it hides and a different button appears in its place with the opposite animati... |
Trigger WPF doubleanimation from Powershell codebehind |
|c#|wpf|powershell| |
The two below alternate possibilities apply to both Python versions 2 and 3. Choose the way you prefer. All use cases are covered.
Example 1
---------
Module is being imported from a subdirectory (`./bar/baz`) of a directory of currently running module (`/some/path/foo`).
main script: /some/path/foo/fo... |
To use `require` and `import` together, you need to use dynamic `import()` expressions to load an ES module into a CommonJS context.
A common Node.js error message that provides a solution looks like this:
```
Error [ERR_REQUIRE_ESM]: require() of ES Module <path> from <path> not supported.
Instead change the r... |
You can scroll to a particular view in a `ScrollView` by using its id. This can either be done using a `ScrollViewReader` (as suggested in a comment) or by using a `.scrollPosition` modifier on the `ScrollView` (requires iOS 17).
Here is an example of how it can be done using `.scrollPosition`.
- The images used ... |
null |
null |
null |
null |
null |
We're upgrading our PHP Laravel system, and one of the key concerns is the compatibility of passwords between the old and new systems. The passwords in the old system contain hashing function, and we need to ensure a smooth transition to the new hashing method without disrupting users' access. What would be the best wa... |
My question is a bit complex, but I'll try to make it clear. I want to create a Bash function. Now, here's the interesting part - I want to do this by referencing what the user will type.
Since I don't know what that is, I'll optionally refer to it as $2, $3. How can I make it so that I can extract the commands tha... |
Custom Bash functions & custom statements - Need some advice |
|c|linux|bash|function|shell| |
null |
We have web application which supports desktop and mobile chrome browsers .
we are planning to create common driver for all platforms, like below
RemoteWebdriver driver=initializeMobileWebdriver() and
RemoteWebdrver driver=initializeDesktopWebdriver()
in test class , if I use if else then I can able to ... |
Run web tests in parallel on mobile and desktop with unique driver |
|selenium-webdriver|appium|remotewebdriver| |
Full working sample code:
```lang-hcl
# variables.tf
variable "envs" {
description = "List of environments"
type = list(string)
default = [
"dev",
"stg"
]
}
variable "tables" {
description = "Dyanamodb tables"
type = map(object({
hash_key = string
attributes = l... |
Have Html Code like this :
```
<div style="padding-right: 12px;">
<ul class="menu-items">
<li class="menu-item active" onclick="onMenuClick(this)">
<i class="fa-duotone fa-house-chimney"></i>
پیشخوان
</li>
<li accessibility="edit_or_add_product" class="menu... |
Bootstrap Collapse this ul items onclick |
|javascript|html| |
null |
A quick aside, we can cast to-and-fro from one table type to another, with restrictions:
/** create a TYPE **/
CREATE TYPE tyNewNames AS ( a int, b int , c int ) ;
SELECT
/** note: order, type & # of columns must match exactly**/
ROW((rec).*)::tyNewNames ... |
|javascript|reactjs|react-router|react-router-dom| |
I have encountered an issue when rendering a visualization of a 2d matrix using Pygame (I am aware this not the best library for the job ... but anyway). The issue arises when I attempt to render each node in the matrix as a rectangle. Each node is an instance of the Node class and has x1, y1, x2, and y2 values derived... |
I'm calling a REST API endpoint via Azure Data Factory using copy activity. The API returns 404 - not found for valid queries where no data is found. Whether this is the appropriate response or not (I have no control over the API), is there a way to access the API status code (i.e. not Azure error code?) in ADF?
I... |
you can use render function in your story to close the modal. like this:
export const DefaultModal: Story = {
args: {
avatarUrl: 'https://placehold.co/100',
isOpen: true,
hasFullImage: true,
},
render: (args) => {
const [{ value }, updateArgs] = useArgs(... |
|php|laravel-8|bcrypt|laravel-10| |