Latest Questions

Using Auth0 with NestJS on gRPC Methods

I am trying to implement NestJS Guards for Authentication and Authorization to my gRPC Services, which are implemented in NestJS. @GrpcMethod(USER_SERVICE_NAME,

Porting python PKCS1_v1_5 encryption code to java but java code not work

I have a backend,which receives codes and returns true or false. I send it codes using my python encryption,it returns true(the result varible): from Cryptodome

Pick schema of key in Joi schema

If I have a JOI schema const OBJ1 = Joi.object({ foo: Joi.number(), bar: Joi.string().pattern(/abc/) }); And then I want to have a second schema OBJ2 whic

How to open "vscode" and "zsh in vscode" using terminal?(already install shell code command in path in VsCode)

I just want to open vscode in terminal and I already install shell code command in path in vscode, I restart terminal by quitting and open and I have my vscode

Why i'm getting the following error? ValueError: invalid literal for int() with base 10: ''

Here is the code from time import sleep import keyboard # Condição de partida da máquina while True: if keyboard.is_pressed('ENTER'):

Should I use useImperativeHandle hook when needing multiple refs

I am building component(ThePieChart) where I need to perform quite a bit of DOM manipulation on its elements. Those manipulations I need to perform in parent co

how to plot 2d condition function

I want to plot a 2d condition function, and the code as below: from numpy import exp,arange from pylab import meshgrid,cm,imshow,show def z_func(x,y): zPar

java.lang.IllegalStateException: Error reading delta file, stateful spark structured streaming with kafka

We are running a stateful structured streaming job which reads from Kafka and writes to HDFS. And we are hitting this exception: 17/12/08 05:20:12 ERROR FileFor

Code works (mostly). But failure to remove duplicates

Summary: Hey I've got a filter for some data. It's filtering fine but it's not removing duplicate objects. Arguments taken in order: 1. datasource 2. filters (r

Create extra boolean property with name suffix `_ro`

Can I create an extra property with a property decorator? The way I'm trying to do this obviously does not work. const RoProp = () => { return <T>(ta

Capitalize specific indices of string using awk or python

I have an input file where each line contains 99 lowercase letters, bccdddcdccddddddabcdabcabdbacbdcaaccbbcabacbccabcacbcdcccbdbacdcbbcbcbcccacadaaccababadbcbaa

Handle many models using graphene in django

In my django project i have many different models which i want to query using GraphQL. For instance: class Country(): name = CharField(max_length=255) clas

Hide some payment options when paying for an order from the WooCommerce account page

If the order has the Pending payment status, then the user can pay for it on the account page. This displays all available payment options. How to hide all paym

Rust throws an error when running code with OpenCL

I do not know rust at all, but I know a little C / C ++, tell me why this code causes an error? I just copy/paste it use std::fs; use std::ffi::{CString}; use o

Detecting WebView2 vs standalone Edge browser?

I have a page that needs to render differently depending on whether it's being viewed from a WebView2 component (inside another application) or from a standalon

Error: The selector "app-redirect" did not match any elements, I am trying to upgrade to MSAL v2 and obtain refresh token

[Console error import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { SharedModule } from './shared/s

log4j2 logs are not writing into log file after initialization of application

I have migrated legacy application log4j version from 1.2.X to 2.17.X version. Below steps I followed in local windows WebLogic server and it works fine loading

Perform an action after clicking on the link

I'm new to JavaScript, I need to perform an action after clicking on the link. For example, we have two pages A and B On page A, I perform a JavaScript action (

Range Error(index): invalid value: valid value range is empty

im trying to set initial value for 'title' but it keeps showing me the error: range error (index): invalid value: valid value range is empty class _ProductCreat

Where to define reusable subschemas in OpenAPI 3?

I'm working on OpenAPI 3 document. I have schema called CustomerInfo: that has property Address. One of the properties of Address is enum called State. How do I

Latest version of iOS Chrome not downloading blobs correctly (pdf)

The below code samples works with: Chrome Android Chrom Windows Safari iPhone Safari Mac Chrome Mac Doesn't work with: Chrome iPhone Sample 1 var oReq = new XML

Batch list folder contents, then echo results as options to be set as variables

I usually like to try to work these out myself, but at the moment I have to admit I don't know where to start with this one. Hoping someone could kindly steer m

Chosen label is not changing after cancel button in ng2-daterangepicker

Using n2-daterangepicker. Facing two problems. When select custom range its not changing the chosen label change If applied cancel button and then click custom

Unable to invoke no-args constructor for class ConversionRates

I have a Currency Converter Android app. I 'm using retrofit for getting rates from API but as far as I'm concerned my app can't get data from api and it return

How to automatically assign PBI tasks to the same assignment as of the PBI?

I must be doing something wrong. Say I have a Feature. Assign it to John. Create PBIs (Product Backlog Items) for it. Break the PBIs down into tasks. Is not the

How to Add file .a to project by xcodegen swift

I want to add 5 file have extension .a to project. I click "+" button then choose 5 file .a add to project is success. But my project use xcodegen so I want to

How to call a function on a RecyclerView Item click [android]

I did an OnClickListenner on RecyclerView Item in the ViewHolder class Item = small card + big card like that init { itemView.setOnClickListener {

Browser Push Notifications - How To Disable On Client Browser from a Shopify Liquid?

is it possible to execute code on the client's browser to disable push notifications on the clients browser? I am looking for example code to do just that- See

Querying from BigQuery to Python

I'm trying to query data to bigquery with this code as mentioned in google docs: from google.cloud import bigquery client = bigquery.Client() tab = client.query

How to annotate functions to aid code analysis

Consider the following functions: constexpr bool IsNull(const int* arg) { return arg == nullptr; } void Test() { int x{ 42 }; int* p = &x; /