Latest Questions

How can I make swift package management make offline? Every time I open a project, it begins downloading, which takes longer when the project is huge

Every time I open a project, it begins downloading, which takes longer when the project is huge.

how do I find the average of this array but only for the values that are not equal to zero in python [duplicate]

array([1500, 1520, 1540, 1590, 1590, 1600, 1600, 1560, 1560, 1560, 1580, 1520, 1460, 1510, 1520, 1320, 1320, 1300, 1300, 1320, 1320, 1320, 132

Is there a way to keep the order of cases as defined, while running bundle exec rspec {file_path} --format documentation?

I am having a problem while running bundle exec rspec spec/services/abc_service_spec.rb --format documentation The output of it, is not in the same order as th

Aggregates with Knex and Javascript

I have an application built using javascript, react, express, and postgreSQL. I have used knex to create and seed my database. The majority of the functions suc

Discord bot won't go online

I've just started learn python and my discord bot won't go online. it just said " Process exit with exit code 0". And there's no error with the code. here's my

How to fix "shutdown: NOT super-user" when using a shutdown script in Python? [duplicate]

I got this script import os shutdown = input("Do you wish to shutdown your computer ? (yes / no): ") if shutdown == 'no': exit() else: os

Updating RDS snapshot export into S3

We have some data in our Mysql RDS, which slows down our application, but it's no longer needed. So we want to remove old records but keep them somewhere so our

Migrate mailbox to O365 with onprem database not mounted

We have problems with a mailbox databases on prem exchange 2013 server, it shows as Dismounted. We have try everything to repair and mount the database again bu

What are the implications of using a variable declared outside of an async context as a placeholder for its return values?

I understand that if the variable was declared outside of the function, it should be marked as global. But what about this case? Is it safe to do something like

Flutter: Using a (Future) http post request in ChangeNotifier

in one of my ChangeNotifier, if have an authentificate method. This is a method, that gets an auth - token with a Future gettoken function and then sets the som

How to multiply three inputted numbers in assembly using emu8086?

I'm sorry for asking this without any code to show you, but my teacher assigned us to make something like this as a surprise quiz, and me and my classmates don'

How to add tailwind to a .less file

I have a gatsby project that uses .less as the CSS preprocessor, adding tailwind to it as shown in the docs does nothing @tailwind base @tailwind utilities @tai

With arrays, why is it the case that a[5] == 5[a]?

As Joel points out in Stack Overflow podcast #34, in C Programming Language (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Jo

Next.js is not recognizing '@types/react'

When I try to run my Next.js app with npm run dev I get an error message saying that I don't have the required packages to run Next with Typescript: Please inst

Is it possible to calculate the value after overflow?

I understand that if 1 is added to INT_MAX it will overflow and we will get the negative maximum. It is connected in a cycle. In the code below can I calculate

Providing an S3 upload task with AWS creds?

I'm currently using a service connection for this: - task: S3Upload@1 inputs: regionName: 'us-east-1' bucketName: 'bucket' sourceFolder: '

Mongoose query always returns empty array

Im trying to make a greater than query but it always returns an empty array. const productSchema = require("./productsSchema"); const getProductsGreaterThan

Angular Migration Error for Version 13.0.3

I got the following issue while upgrading from Angular 12 to 13.0.3. Using package manager: 'npm' Collecting installed dependencies... Found 79 dependencies. F

flutter TextField use cause KeyboardListener alway show keyboard on event

using KeyboardListener to gain barcode from scanner, i can't resolve a incredibly stupid problem. scanning first with keyboardListener work perfectly. events ar

How to use python to create and modify windows shortcuts

Based on most of the postings I have read, I need to import winshell in order to create a Windows shortcut using python. But I am running Anaconda python and wh

Api server rest with crow

I am implementing a server rest using Crow. In my code i want to do some action before sending the response. These action are complimented in another class. it

Error Running the Application on Android Mobile

I was working on a small flutter project suddenly I couldn't run the app to any android mobile. (on Web it's running Perfectly). It Shows this Error: Could

TypeScript type for all derived interfaces

I have an interface inheritence hierarchy like this: interface IBase { type: stirng; } interface IDerived1 extends IBase { type: "Derived1"; } interface IDerive

Dynamically add textfields with a for each loop and a button in swiftUI

I am trying to use a ForEach loop to dynamically add textfields inside a form section with a button. Form { ForEach(0..<numberOfItems, id: \.

How to convert movies in mkv to mp4 in colab

I tried converting a mkv movie in my Google drive to mp4 so I can stream play it with Google drive player, so I used a popular ffmpeg colab note book and I got

How to get python backtraces for python in valgrind

I'm trying to find a file descriptor leak in python code with valgrind but the backtraces look like this: ==2169309== Open file descriptor 11: ==2169309== at

Execution failed for task ':vision-camera-code-scanner:checkDebugAndroidTestAarMetadata'

So I have been at this for a while now, I recently tried to add Detox tests to android in my react native projects. I followed the official Detox tutorial and t

Building kernel with `-save-temps`

I'm building the Linux Kernel with the gcc options -save-temps in order to see exactly how all the C files get preprocessed. I followed the instructions here, b

How to use multiprocess when input is a torch.tensor with gradient?

import torch.multiprocessing as mp import torch import time class test(): def __init__(self,X,Y): self.X=X #.share_memory_() self.Y=Y

how to repeat a block of code in bigquery for multiple columns?

I would like to repeat a block of code with a complex operation (defined in a subquery) for many columns in bigquery. I cannot find a better way than copy and p