Latest Questions

Bash - Remove leading zero for numbers with double digits

I have a variable in bash number which contains values 01, 02, 03, 04, 05, 06, 07, 08, 09, 010, 011, 012. I would like to remove the leading zeros before 010,

Use diffie hellman key exchange algorithm to encrypt and decrypt files in python

I want to implement an algorithm which will encrypt and decrypt files using diffie hellman algorithm but I am unable to find any solution for the same. Here is

Status bar issue in device dark mode

I am adding an option to add an option for users to choose system/light/dark modes. I am storing user choice in user defaults. Below is my code in AppDelegate a

Can AWS Glue connect to Elasticsearch using IAM authentication?

Followed this tutorial: https://docs.aws.amazon.com/glue/latest/ug/tutorial-elastisearch-connector.html I know using this connector can connect to Aws Elasticse

O(log n) algorithm in theory runs much slower in practice

The algorithm is for calculating 2^n recursively. I have used the Master theorem to determine that the time complexity is indeed O(log n) which seems to correct

Sorting ArrayList<> based on Lattitude and Longitude in Android

I Have a requirement that has ArrayList that contains Latitude and Longitude (randomly).Is there any way so that I can get this list in a optimized way. Google

PHP if result equals this, then replace

I'm calling the 'Referring site URL' in a post array... data34' => $lead->getReferringSiteUrl(), But need to replace it with a friendly name. i.e. If www.

How to split a line with \n in a list robotframework

How to split a line with \n in a list robotframework Example: ["abc\n def\n xyz\n]

protoc --go_opt=paths=source_relative vs --go-grpc_opt=paths=source_relative

I am having a hard time figuring out protoc command and go plugin. What is the different between: protoc \ # Directory where you want the compiler to write y

Are open protocols compatible with old MAP versions

I am interested in using the new open protocols in acoustic telemetry and wanted to know if they are comparable with older MAP versions.

How to get record before and after in forall loop powerapps

I am trying to run a function that returns a table with a corresponding date index and date text. This is so that I can display the information in a tutorial sc

Problem creating dll and loading then in Python ctypes

I want to learn to create DLLs in c++ and use them in python to increase the speed of calculations. To begin with, I tried to create a simple C++ dll and load

Can not pull any image in minikube

Im on macOS and im using minikube with hyperkit driver: minikube start --driver=hyperkit and everything seems ok... with minikube status: minikube type: Control

Newtonsoft.Json.JsonSerializationException Message=Cannot deserialize the current JSON object

here the ex Newtonsoft.Json.JsonSerializationException Message=Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collection

FluentUI TextField onchange does not fire errormessage

So I've been working with FluentUI and I've setup a TextField with a onError Property which fires but it only fires when starting the app up. When changing the

Trying to use math function: sgn... error : sgn is not declared

hmm... I imported:System.math... test as integer=sgn(100) I get the error: sgn is not declared. Other math functions work. So Why? Might Visual Studio not be

Clap raw bytes arguments

I would like to use raw byte argument with clap For example --raw $(echo -n -e 'B\x10CC\x01\xff') will give me the following bytes array [66, 16, 67, 67, 1, 239

CSS not loading properly when html element appended using jquery in django template

I'm working on an ecommerce app where trying to get products using ajax and append the product list using .append method and data is being appended the problem

Multiple optional command parameters with discord.py

I was looking at asking for multiple optional parameters with discord.py, although I'm not sure how to do it. This is my example, although I'm pretty sure it's

Difference between !(n & 1) and n & 1 == 0 in C++

For some reason in C++, the expressions if(!(n & 1)) and if(n & 1 == 0) seem to not be equivalent. Can someone please explain why this happens?

How can I query for keyboard input in a GUI app without using a pre-built input form?

In a console app, I could put Console.ReadKey() in an infinite loop, and I have what I wanted. But how can I do that in a GUI app? Let's say I'm using the new M

C# forms check when a specific execute has been launched and then run my program

How would I make my program check if a certain application like "notepad" has focus and ultimately open my second form when it does have focus, closing that sec

How to make React search component

I am doing my first Ecommerce MERN stack project but i donot know how to make search component that will take the search input and return array of matching prod

Laravel Carbon difference in time

So I have this table with a start time and an end time and I am calculating hours. This works just fine unless the end time is midnight. I have TIME fields in m

How to transfer external pages in Web View (Android Studio) to Chrome

I wrote a simple program and used webview. My problem is that links to pages that do not follow the https://irunisenter.com rule also open in the program. It's

Cant create an alarm in Xamerin Android C#

Copied my teacher's simplified code in order to see if the code i wrote was wrong or somthing yet even her's isnt working. Here is it: private void BtnAlarm_Cli

How to create an API Gateway for AWS Eks services in private subnets?

I have an AWS EKS cluster running in a custom VPC with 2 public and 2 private subnets. The node groups (for my backend) run in the 2 private subnets so they can

Discord Music Bot Wont Boot

So Im making a discord music bot (not for public) and its based off some github code and I put it in and gives me this, I had the node:events problem and fixed

Usage Limit for Inviting a Large Google Group on Google Calendar

I’ve got a friend who runs a pretty big networking event (1000+ attendees). And he wants to send everyone a Google Cal invite. I’m aware of the 200

vim select function in python

I am new to vim and recently I learned that it is possible to select a function in c with vip, and I was wondering if there is a way to do it with functions in