on-internet

Postgres "Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string"

I am trying to connect to a test database to run my unit tests on it and for some reason it is failing but when i connect to my development database everything works just fine that's my database.ts import dotenv from 'dotenv' import { Pool } from 'pg' dotenv.config() const POSTGRES_HOST = process.env.POSTGRES_HOST const POSTGRES_USER = process.env.POSTGRES_USER const POSTGRES_PASSWORD: string = process.env.POSTGRES_PASSWORD! const POSTGRES_DB = process.env.POSTGRES_DB const POSTGRES_TEST_DB = process.env.POSTGRES_TEST_DB const ENV = process.env.ENV let database if (ENV === 'dev') { database =

Join the discussion →

What is the minimum storage duration of S3 Standard?

I'm trying to estimate some costs in a service where we store objects in S3 for seconds to minutes before automatically deleting them after processing has completed. I see that the documentation states: S3 Standard-IA and S3 One Zone-IA storage have a minimum billable object size of 128 KB. Smaller objects may be stored but will be charged for 128 KB of storage at the appropriate storage class rate. S3 Standard-IA, and S3 One Zone-IA storage are charged for a minimum storage duration of 30 days, and objects deleted before 30 days incur a pro-rated charge equal to the storage charge for the rem

Join the discussion →

Android Emulator is not playing sound

My Pixel 2 Android Emulator won't play sound, not from my app, not even from YouTube. I've restarted my computer, cold-booted the app, yet nothing works. I can use a physical device, but I'd like to have my emulator on the side while coding. Any Ideas? Most of the other similar questions seem to be from 5-10 years ago, probably out of date? I've been working on this all day, so any advice is hugely appreciated.

Join the discussion →

How can configurate headers in azure web app?

I need to add some security headers on the server side, specifically they are X-Content-Type-Options and CSP headers, the headers were added to the project using meta tags, but this does not return the headers information in the headers section of "Response Headers" in dev tools, and it needs to be displayed here for security validation. Is there a way to do it through the azure portal for a web app or any configuration file in angular? The project is made with Angular(11) P.S. I'm new to angular and so I'm not familiar with some aspects of the project and the framework.

Join the discussion →

Why Bionic C runtime library in Android does not support "%n" format in printf function?

According to ISO C standard (ISO/IEC 9899), printf function contains "%n" format to count the number of output characters. n: The argument shall be a pointer to signed integer into which is written the number of characters written to the output stream so far by this call to fprintf. No argument is converted, but one is consumed. If the conversion specification includes any flags, a field width, or a precision, the behavior is undefined. Example code: #include <stdio.h> int main (void) { int c1, c2; printf ("hello%n, world%n\n", &c1, &c2); printf ("% d\t% d\n", c1, c2); return 0; } The C runtim

Join the discussion →

Apache CloudStack guest VMs not able to reach to physical gateway (local network) [closed]

Issues: Guest VMs in Apache CloudStack can ping each other, Host can ping all VMs, but guest VMs could not ping the physical gateway. Also, VMs are not accessible from outside the Cloud Stack. Environment: Apache CloudStack setup as private could. Host OS: Ubuntu 20.04 Hypervisor: KVM CloudStack Version: 4.15.2.0 Networking: Basic Networking - Flat model defaultGuestNetwork range - 10.1.24.230 - 254 iptable and firewall disabled. Physical Network: Router/Gateway: 10.1.24.1 (1-220 reserved for DHCP)(Net Mask 255.255.255.0) Host is connected to the router through 4 ports. The host has 4 interfac

Join the discussion →

Apache CloudStack: Guest VMs not able to reach to physical gateway (local network)

Issues: Guest VMs in Apache CloudStack can ping each other, Host can ping all VMs, but guest VMs could not ping the physical gateway. Also, VMs are not accessible from outside the Cloud Stack. Environment: Apache CloudStack setup as private could. Host OS: Ubuntu 20.04 Hypervisor: KVM CloudStack Version: 4.15.2.0 Networking: Basic Networking - Flat model defaultGuestNetwork range - 10.1.24.230 - 254 iptable and firewall disabled. Physical Network: Router/Gateway: 10.1.24.1 (1-220 reserved for DHCP)(Net Mask 255.255.255.0) Host is connected to the router through 4 ports. The host has 4 interfac

Join the discussion →

How to open .MD file in gitbash?

VS Code has a good preview mode for .md files. To open a file with this mode, I have to right-click the file in VS Code document tree, and click "Open Preview". I have made a read me file using touch command, but now how to edit or open it there?

Join the discussion →

How to find the pdb or dll location for symbols you have already loaded?

If I am debugging something in Visual Studio, and I am looking through the call stack, and some code in the stack is external code, and I click to Load Symbols for that code, and the symbols load, and I can now browse through the source code... where on my file system is the pdb that those symbols were loaded from? Regardless of which symbol server those symbols are loaded from, as far as I am aware, there has to be a file somewhere on my file system that is storing a pdb or dll or similar that allowed Visual Studio to decompile the source code. Where can I find this?

Join the discussion →

Is there a way to read the file name from a URL in Google Drive?

I'm writing a Python Program in Google Colab, and I want to automatically name a new created excel file based on the input file name. I read the input data through the following code: file_id = '1_abcdefg' downloaded = drive.CreateFile({'id': file_id}) downloaded.GetContentFile('exported.xlsx') Is there a way to determine the actual xslx file name in Google Drive from the url '1_abcdefg'?

Join the discussion →

Finding prime number in javascript

There are several ways of checking if a given number is prime or not. I want to find it in by own way and if the given number is not prime, I am trying to find next higher prime number. so far I tried the following and can't understand why it's creating infinite loop. Could you please correct my code. Or tell me what wrong I am doing here. function myFunction(a){ for(i=2; i<=a; i++){ if(a % i != 0){ console.log(" Prime ") } else{ a++ // creates infinite loop if(a % i == 0){ console.log("not prime") } else{ console.log("prime") } } } console.log(a) } myFunction(38) // Expected 41

Join the discussion →

Detect if Powershell or CMD with Rust

I'm writing a CLI app in Rust and need to run commands differently depending on if it is being run in CMD or Powershell. There's this SO question that gives a command "(dir 2>&1 *`|echo CMD);&<# rem #>echo POWERSHELL" to run to output "CMD" or "POWERSHELL", but I can't run that as a Command in Rust. This code returns the following error: Error { kind: NotFound, message: "program not found" } let output = Command::new("(dir 2>&1 *`|echo CMD);&<# rem #>echo POWERSHELL") .output(); The problem is that some CMD/PowerShell commands don't work from Rust's std::process::Command and need to be called

Join the discussion →

How can I show the information of a specific element vue js

Hello good morning, I am having this problem, I have 2 tables, a main table that has a button that opens a popup with the second table. What is the idea? That if I click on the button of the first table and first option it would have to show me only the information of that element, in the popup I make a console.log(item.id) and it shows me the data of that element well , but when I open the popup it shows me all the data.. it must be something that I am overlooking, thank you very much <template> <v-card> <v-card-title> Control Modificaciones </v-card-title> <v-card-text> <v-row> <v-col cols="

Join the discussion →

Dynamically adjust text size in buttons inside Row

I am using localization to support multiple languages in my app. This results in having text in buttons with different length. So I need to have it being responsive. I have two buttons in a Row(). I want to adjust the textsize inside these buttons so they never produce any overflow. Currently it looks like this in some languages: I tried using auto_size_text with no success. This is my code for the dialog: return Dialog( backgroundColor: Colors.transparent, elevation: 0, child: InkWell( onTap: () { Navigator.of(context).pop(); }, child: Center( child: Column( mainAxisAlignment: MainAxisAlignme

Join the discussion →

ImmutableMap.of vs Java Map.of

I have seen that ImmutableMap.of is used to create immutable map object. At the same time Java offers Map.of which creates immutable map as well. Is there any advantage of using ImmutableMap.of instead of Map.of from Java ? Edit: I am not asking differences between map and immutable map. I am asking why some people prefer ImmutableMap.of instead of Map.of which also creates immutableMap.

Join the discussion →

How do I use QT6 Dark Theme with PySide6?

Simple demo application I am trying to set the theme to dark. I would prefer a code version (non QtQuick preferred), but only way I see for Python is with a QtQuick config file, and even that does not work. from PySide6 import QtWidgets from PySide6 import QtQuick if __name__ == '__main__': app = QtWidgets.QApplication() app.setApplicationDisplayName("Should be Dark Theme") app.setStyle("Universal") view = QtQuick.QQuickView() view.show() app.exec() And I have a qtquickcontrols2.conf configuration file in the same directory. (Also tried setting QT_QUICK_CONTROLS_CONF to absolute path.) [Contro

Join the discussion →

How can I merge two data frames in R by the same values in different columns using base or?

Let's say that I have two data frames In R: The fIrst one: cat = rep("xx",5);cat fIrst = c("a","a","a","h","h") second = c("b","c","d","b","c") val1 = c(1,2,3,10,20) A = tIbble(cat,fIrst,second,val1);A that looks lIke thIs: # A tIbble: 5 x 4 cat fIrst second val1 <chr> <chr> <chr> <dbl> 1 xx a b 1 2 xx a c 2 3 xx a d 3 4 xx h b 10 5 xx h c 20 and a second one: cat = rep("xx",5);cat fIrst = c("a","a","a","b","c") second = c("b","c","d","h","h") val2 = c(100,200,300,400,500) B = tIbble(cat,fIrst,second,val2);B That Is: # A tIbble: 5 x 4 cat fIrst second val2 <chr> <chr> <chr> <dbl> 1 xx a b 100

Join the discussion →

Swagger is not showing any controllers or endpoints

Swagger Api Docs Image I am working on adding / integrating swagger in my springboot project. I have tried different things but its not got fixed. All that is showing now is white page without any endpoints or controllers and just an empty page with swagger logo. Swagger URL : http://localhost:8080/swagger-ui.html My swagger configurations are given below: package com.app; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframe

Join the discussion →

SocketException: No connection could be made because the target machine actively refused it. Getting These errors in .NET Core 5 With angular app

An unhandled exception occurred while processing the request. I am getting These error every time i run my application in visual studio An unhandled exception occurred while processing the request. SocketException: No connection could be made because the target machine actively refused it. System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:53797) System.Net.Http.ConnectHelper.ConnectAsync(Func<SocketsHttpConnect

Join the discussion →

CSS grid cards are linked/stacked horizontally

I am using Material UI Grid as an container to Cards. I have two columns of cards and I have a function when someone clicks one of those cards it expands vertically. Everything works fine but problem is when I click to expand the card the parallel card also expands which is next to it. How can I prevent this behaviour? Thanks in advance. import { FC } from "react" import Grid from "@mui/material/Grid" export const ExamoCardsGrid: FC = ({ children }) => { return ( <Grid spacing={8} container justifyContent="center"> {children} </Grid> ) } Here is the snippet import { memo } from "react" import

Join the discussion →

CSS Grid Cards Are linked Horizontally

I am using Material UI Grid as an container to Cards. I have two columns of cards and I have a function when someone clicks one of those cards it expands vertically. Everything works fine but problem is when I click to expand the card the parallel card also expands which is next to it. How can I prevent this behaviour ? Thanks in advance. import { FC } from "react" import Grid from "@mui/material/Grid" export const ExamoCardsGrid: FC = ({ children }) => { return ( <Grid spacing={8} container justifyContent="center"> {children} </Grid> ) } Here is the snippet import { memo } from "react" import

Join the discussion →

run to all scripts with just one file ROS

Hey I made a autonomous car ROS project. I have some scripts such as object detection and lane detection. How can I run these scripts with just one file. Are these should be .sh file or .launch file?

Join the discussion →

Terraform Error: Provider produced inconsistent final plan - value "known after apply" causes empty list on plan

The following contrived example causes "Error: Provider produced inconsistent final plan" because of the locals.project_id used in the list of rrdatas on the google_dns_record_set.cdn_dns_txt_record_firebase resource. The project_id value is known only after apply and I do not know how to manage this for the rrdatas list. When I come to apply the plan, the value changes and causes the error mentioned. Your help would be really appreciated. terraform { required_providers { google = { source = "hashicorp/google" version = ">= 4.24.0" } random = { version = ">= 3.3.2" } } } locals { project_id =

Join the discussion →

Custom Column matching dates between range

I'm wondering if it's possible to create a custom column to match dates that fit between specific date ranges. I've tried using the below custom formula but doesn't seem to return anything =if [#"Start Date (Calculated 2)"] <= #date(2019,09,01) and [#"Start Date (Calculated 2)"] < #date(2022,04,01) then "Yes" else [#"Start Date (Calculated 2)"] However it doesn't match anything

Join the discussion →

How to get pip for Spyder?

I'm trying to install an extern package within Spyder (version 5) so I installed it using pip in the command prompt (Windows 11) but it's not installed for Spyder, it is in "C:\Users\me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages" by default. Furthermore, the Spyder terminal is not working for my OS, so I'm looking for an other way to install my package on Spyder and pip seemed appropriate to me. I don't know how to get pip for Spyder though. Can someone help please?

Join the discussion →

Accessing GraphDB with RDF4J with an specific user

I'm using RDF4J to add RDF triples to a completely open (Security off) GraphDB instance. I use the RemoteRepositoryManager and it works fine: RepositoryManager repositoryManager = new RemoteRepositoryManager(GraphDBInstanceURL); Repository repository = repositoryManager.getRepository(graphDBrepoName); RepositoryConnection repositoryConnection = repository.getConnection(); Now we need to add security to GraphDB, but it is not clear to me how to add the specific GraphDB user credentials in the above code. Any pointers are wellcome, thanks

Join the discussion →

403 error in Google Indexing API (after trying all solutions from other SO questions)

I'm trying to use the Google Indexing API using the PHP client library. This is my code: $client = new Google_Client(); //use the private key that we created for our service account. $client->setAuthConfig(storage_path('google_auth_config.json')); //this works $client->addScope('https://www.googleapis.com/auth/indexing'); // Get a Guzzle HTTP Client $httpClient = $client->authorize(); $endpoint = 'https://indexing.googleapis.com/v3/urlNotifications:publish'; $content = '{ "url": "https://myverifieddomain.com/url", "type": "URL_UPDATED" }'; $response = $httpClient->post($endpoint, [ 'body' => $

Join the discussion →
Older stories