instruction stringlengths 0 30k ⌀ |
|---|
|python|xml|xsd|python-xmlschema| |
null |
In my production Next.js application using Clerk for authentication, I am unable to access my authenticated session, even though the user is successfully created in Clerk and even successfully synced to my database using a webhook.
It works in localhost but in my server-side logs, I see this error
> ⨯ node_modul... |
In my application, I have a bunch of DTOs, generally implemented as records. Various methods take these DTOs as parameters. The DTOs have quite a lot of properties, and when I'm unit testing the classes that use them, I don't always care about most of them. Quite often I want to be able to mock a DTO with only the prop... |
Mocking a record |
|c#|unit-testing|mocking|nunit|moq| |
I'm building the lambda on Ubuntu with the basic example.
It builds without any errors but if I upload and test it on aws in crashes with:
```json
{
"errorMessage": "RequestId: 7f4d0aca-125c-4032-98dd-9ff387e5252b Error: Runtime exited with error: exit status 1",
"errorType": "Runtime.ExitError"
}
```
The l... |
{"OriginalQuestionIds":[42339876],"Voters":[{"Id":874188,"DisplayName":"tripleee","BindingReason":{"GoldTagBadge":"python"}}]} |
You have installed node separately and your node path has a higher precedence. First uninstall node and reinstall it using nvm.
### Linux Solution
Start by finding where node is installed using `which -a node`
Delete the path using `rm -rf <path>` and then install node again using `nvm install node`. This i... |
null |
I think the problem is that the funds are in your platform's balance. They need to be in your connected account's balance for you to make a payout.
To clarify:
- A Payout is a transfer of funds between the Stripe account's balance and a bank account connected to that account.
- A Transfer is a transfer of fund... |
I'm using ```Make``` (```Automake```) to compile and execute unit tests. However these tests need to read and write test data. If I just specify a path, the tests only work from a specific directory. This is a problem, as first the test executables may be executed from a directory different than at compiletime by ```ma... |
{"Voters":[{"Id":5014688,"DisplayName":"Ingo"},{"Id":6752050,"DisplayName":"273K","BindingReason":{"GoldTagBadge":"c++"}}]} |
@Robin Zigmond (Please once verify this)
**I think flow would be like this:**
1: p1 setTimeout() will start and after 10 seconds its callback will go to callback queue
2: p2 setTimeout() will start and after 2 seconds its callback will go to callback queue
3: Earlier I though that when execution reaches *v... |
Specific webhook event types, or `*` for all event types, need to be subscribed for each REST App for which they are desired. Up to 10 URLs can be subscribed per app.
Webhook sbscriptions can be managed either in the developer dashboard interface for the App, or using the [webhooks management API][1]. Your question ... |
I am using NextJS and I have a route called `about`(It's contents is displayed via `page.js`). Inside `/about/page.js`, I am showing a component called `<Hero />` and I want to pass a prop to `<Hero heroHeight={'height: 400px'} />` to my `CSS module` for styling purposes.
**Hero.js**
'use client';
... |
How do I pass props to CSS module in React? |
|javascript|html|css|reactjs|next.js| |
First off, apologies that this is win32 code. But please note that OP
has asked for code in the MS windows platform. That said, this code CAN be ported to other platforms. Confidence is high that you only need to replace a handful of basic APIs used in this code:
```none
_findfirst64() -- start the file-finding... |
{"OriginalQuestionIds":[66448947],"Voters":[{"Id":6851825,"DisplayName":"Jon Spring","BindingReason":{"GoldTagBadge":"ggplot2"}}]} |
In such situation I use the following checklist:
```
1. git init
2. git remote add origin <REMOTE-REPO-URL>
3. Write a good '.gitignore` file.
4. git add --all
5. git commit -m "Initial commit"
6. git push
```
|
You can use context instead of request and create your own context like this:
```
import jakarta.servlet.http.HttpServletRequest
import org.apache.commons.fileupload.FileUploadBase
import org.apache.commons.fileupload.UploadContext
import java.io.InputStream
class JakartaServletRequestContext(val request: Htt... |
SSO to Grafana embeded in iframe |
|authentication|iframe|single-sign-on|grafana| |
null |
I'm currently overseeing the management of a medium-scale application, which operates with a Flutter frontend and a Node.js backend. However, we've encountered an issue wherein response times from our APIs are occasionally unacceptably lengthy. Upon investigation, I discovered that when Node.js is occupied with time-in... |
How to handle multiple request at same time in Node.js? |
|node.js|flutter|api| |
When attempting to merge audio with video, I notice a loss of video transparency in the resulting merged video.
**How can I maintain the video's transparency?**
**Video details:**
- AVVideoCodecKey: AVVideoCodecType.hevcWithAlpha
- fileType: .mov
**Audio details:**
- fileType: .m4a
**Merging code:... |
Merging sound with video causes the loss of video transparency |
|swift|avfoundation| |
JSONObject objectJson = new JSONObject(gson().toJson(verbaDetalhe));
objectJson.put("Verba", verbaEditada);
My solution was edited via put the value of the key field. |
null |
null |
null |
`ngx.escape_uri` has an option to escape a full URI:
> syntax: newstr = ngx.escape_uri(str, type?)
> Since v0.10.16, this function accepts an optional type argument. It accepts the following values (defaults to 2):
>
> **0: escapes str as a full URI.** [...]
>
> 2: escape str as a URI component. [...]
None... |
i migrate my Java SpringBoot Application from Vaadin23 to Vaadin24 (and also SpringBoot from 2.75 to 3.2).
After starting the Application i got the following error. Can someone help me to fix ?
```
...
2024-03-26T13:48:48.980+01:00 INFO 17112 --- [ restartedMain] c.d.VaadinApplication : Started VaadinApplic... |
I have a problem that's driving me crazy. After installing many YouTube ad free alternatives my media player (vlc, the one in the phone and another one) stop playing and give me error or ads. I've uninstalled everything but the problem persists. What can I do?
I uninstalled every YouTube app |
Media player stops about every 5 minutes |
|video|vlc| |
null |
You can also try to use the icons ids rather than the human readable names, for some icons their names overlap with other icons and if you use multiple icons you might end up with downloading more icons that the ones you need
e.g. something like this:
> link rel="stylesheet"
> href="https://fonts.googleapis.com... |
I am trying to scrape multi page pdf using textract.
Need to scrape pdf and format to json based on its sections, sub sections, tables.
while trying to UI demo with LAYOUT and Table it is exactly able to show layout title, layout section, layout text, layout footer, page number
same info can be observed in csv ... |
Thank you, Taranjeet Singh, it now works fine in my local environment.
But to my surprise it works differently after uploading to my online server:
The temporary dev is not show there.
I tried an
ini_set ('output_buffering', '4096');
in combination with:
echo str_pad ($wait, 4096, ' ');
after the temporary dev... |
{"Voters":[{"Id":1235698,"DisplayName":"Marcin Orlowski"}]} |
I guess you're looking fot the `plt.xticks()` function (alternatively: `ax.set_xticks()`).
In your code you could add the following line:
```
ax.set_xticks(ticks=np.linspace(0,20,5), labels=np.linspace(0,1,5) )
```
Where `ticks` correspond to the values in your data, and `labels` correspond to the values you dis... |
I am trying to create a new dataframe from an existing dataframe with a groupby(), a count(), and a to_frame(). I am getting AttributeError: 'DataFrame' object has no attribute 'to_frame' after adding 'as_index=False' to the groupby.
This is the code:
'''
newdat = indat.query('-1017 <= WDIR16 <= -1000')
... |
Using groupby as_index=False, count, to_frame gives 'Dataframe' object has no attribute to_frame |
|python|pandas|dataframe|group-by| |
I am writing code in qt 6, I use the mvc pattern in the rectangle delegate, I specified the x:100 (line 103) property, which was supposed to move the rectangle 100 pixels to the right, this works in qt 5, but in qt6 the position of the rectangle remains unchanged, which is why I am forced to use anchors, and they are n... |
WCF to WCFCore - Help Menu |
|c#|wcf|menu| |
null |
How do I skip dates that are not in the data file so pyplot does not have these wide gaps between them?
I would like the gaps to be equal, for example, between 01-06 and 01-09.
Example graph:

My plotting function looks like this atm:
```
def plot_d... |
Facing difficulty while integrating my python script to work with the react website,
i have been looking for some resources but couldn't find anything helpful, since most of them revolve around saving a model
```
import cv2
import mediapipe as mp
import numpy as np
import uuid
import os
imposed_image = cv2... |
I know this is old, but I have a similar setup, and struggled with the same problems. After reading the docs and a lot of trial and error, here's how I handled these issues. Happy to get input on a better way to do it if anyone out there has a better understanding.
For your first question, I have a `Restart` excepti... |
When I publish my application, there is no problem on some phones and compatibility problems occur on some phones. I shared the manifest and gradle part below, I didn't understand what I did wrong. There is no problem in the Play develoepr device catalogue.
[Error Image](https://i.stack.imgur.com/FRPK8.png)
M... |
null |
I am using owl-carousel, and i would like to make the last item that is visible, a little blurry. I maked a photo in photoshop, that what i want.
[](https://i.stack.imgur.com/AJrqf.jpg)
```
<div class="owl-carousel owl-theme owl_carousel_1">
... |
Make the last visible item blurry in owl-carousel |
|html|css|owl-carousel| |
null |
I'm currently working on a project that involves processing large volumes of textual data for natural language processing tasks. One critical aspect of my pipeline involves tokenization and string matching, where I need to efficiently match substrings within sentences against a predefined set of patterns.
Here's a m... |
How to make tokenization and pattern matching efficient for large text datasets in python |
|python| |
This behaviour certainly seems to be irregular. It reminds me of the issue described in [iOS 17 SwiftUI: Color Views in ScrollView Using containerRelativeFrame Overlap When Scrolling](https://stackoverflow.com/q/77636423/20386264), so I tried some similar workarounds.
It works a lot better with the following changes... |
I'm currently implementing a flutter web app. I'm calling a 3rd party system and it's redirecting to the URL I provide to it. However it appends to the end of it #code=CODE&idtoken=IDTOKEN. So i'm getting a redirect to REDIRECTURL/#code=CODE&idtoken=IDTOKEN. The problem is that Go Router sees this as a path and not as ... |
Is there a way for Go Router in flutter to handle Fragment Parameters? |
|flutter|url|redirect|url-fragment| |
null |
How to turn on antialiasing in SDL2, when using SDL_RenderCopyEx?
I find some articles that suggest to use:
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2);
and
glEnable(GL_MULTISAMPLE);
But this makes no effect. Any ideas?
int B... |
integration of python opencv script with react |
|python|react-native|opencv| |
null |
I have the following but in order to use `AddAzureKeyVault` I need to know the key vault name which is set in configuration. Is it possible to read in this value in one go or do I need to build it twice?
```
private static IConfigurationRoot GetIConfigurationRoot()
{
var root = new ConfigurationBu... |
Using ConfigurationBuilder to read setting and use AddAzureKeyVault |
|c#|asp.net-core|asp-net-config-builders| |
I'm currently trying to improve my python skills by using it to recreate some old matlab projects I did in undergrad. I once used matlab to simulate a proton attracting an electron, using multidimensional arrays to store the positions and velocities for each time step. Now I'm trying to do the same thing in Python, but... |
How to use arrays in Python similar to how they're used in matlab |
|python|arrays|numpy|matlab| |
null |
I might be wrong but from what I remember and what this [diagram][1] indicates the transition back to unconfirmed is not possible.
You will have to extend the existing behaviour and state diagram.
[1]: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html |
I'd recommend changing the approach slightly, instead of having `transform` modify its argument, it should return a value that will replace in input.
So you can have a set of overloads like this:
std::string transform(std::string str) {
return str.append("abc");
}
template<std::size_t N> st... |
I'm trying to plot a map that includes many shapefiles and I'm having trouble with the legend. This is the map as is but I'd like the polygons to also be in the legend.
[enter image description here](https://i.stack.imgur.com/dJvp7.png)
This is the code I'm using (as I'm using multiple shapefiles I have no idea... |
Errror after migrating from Vaadin23 to Vaadin24: Invalid option in transform() call: "jsxDev" |
|vaadin|vaadin24| |
null |
null |
null |
null |
null |
I have a spring boot application that used Amazon Kinesis to consume data and save it to PostgreSQL. Since I'm already using one database(PostgreSQL) in my application, i want to avoid using another database(Dynamo db) just only for checkpointing and locking purpose. So that the resource cost can be reduced.
Using b... |
How to get content of BLOCK types LAYOUT_TITLE, LAYOUT_SECTION_HEADER and LAYOUT_xx in Textract |
|amazon-web-services|pdf|amazon-textract| |
null |
I'm getting this error
Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.deno-ts(1320)
In my Subapase Edge Function whose code is as follows:
import { createClient } from "https://cdn.skypack.dev/@supabase/supabase-js";
const supabase = creat... |
Error Inserting into Supabase: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member |
|typescript|supabase|deno|supabase-js| |
I have a class called Task in which I have properties like Date, Id, priority and Name. I have a list where I store objects of this class. The problem is that when I do the sorting and then display it in my Listview (I am working in WPF framework coz it is a part of the assigment) all the tasks get renamed tothe same t... |
I am building what I thought was a very simple server-client. I have built a simple Node.js server. Below is the implementation:
const http = require('http');
const { Server } = require('socket.io');
// Create an HTTP server
const server = http.createServer();
// Create a new instance of ... |