All Questions
332
questions with bounties
6votes
1answer
567views
+500
Puppeteer on Docker M1 Mac fails to open new page (`Target.createTarget`)
I'm unable to launch a new page using Puppeteer within Docker, on an M1 Mac.
Versions
Docker: version 20.10.11, build dea9396
Node: 16.13.1
MacOS: 12.0.1 (21A559)
Puppeteer: 13.5.1
M1 Chip
Error ...
0votes
0answers
47views
+50
How do I test this very old legacy Javascript module without rewriting it?
How do I load and instantiate this legacy javascript module for testing, without modifying it?
The legacy module (foo.js):
var Smurf = {};
Smurf.Foo = function() {};
Smurf.Foo.prototype = {
bar: ...
1vote
1answer
32views
+100
Elements are duplicated instead of moved in D3 with React
Im trying to move elements in D3 when you click a button. This code duplicates the elements rather than moving them.
import React, { useRef, useEffect, useState } from "react";
import { ...
0votes
1answer
57views
+50
BottomNavigationView problem with scrollFlags
Need the BottomNavigationView to always show by default (without any user interaction).
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget....
0votes
0answers
27views
+50
Front end dependency manager for appending <script> tags in order
I want a dependency manager that will append script tags in order, and avoid duplicating tags with the same src. This has been an issue with the CMS we use.
I put together something like this:
const ...
0votes
0answers
67views
+100
How to Define Class Attributes after Inheriting Pydantic's BaseModel?
In normal python classes I can define class attributes like
class Example:
x = 3
def __init__(self):
pass
And if I then do Example.x or Example().x, I get 3.
When I inherit pydantic's ...
0votes
1answer
53views
+50
how to send audio stream between child processes in nodejs
How do i properly send stream to a child process. I am trying to stream audio from client to server using this method
I am getting the audio stream from client
const ss = require('socket.io-stream');
...
6votes
1answer
144views
+100
How to achieve the best UX with Flutter form AutovalidateMode
I am trying to achieve the best UX on Flutter using AutovalidateMode.onUserInteraction.
Option 1
When I set the validation on the form key, when a user tries to type one one texField the whole form ...
17votes
2answers
19kviews
+100
How can I make a Selenium script undetectable using GeckoDriver and Firefox through Python?
Is there a way to make your Selenium script undetectable in Python using geckodriver?
I'm using Selenium for scraping. Are there any protections we need to use so websites can't detect Selenium?
8votes
1answer
153views
+250
Why is HashSet<int> much slower than HashSet<String> in dart?
I noticed a HashSet<int> performing very slowly when working on a Flutter project. I had about 20,000 integers in a Set, and checking set.contains() took a very long time. But when I use ...
13votes
8answers
15kviews
+50
Extension host terminated unexpectedly
VSCode Version: 1.11.2
OS Version: Win 8.1
Below error is appearing every 10 mins.Can you please tell me how to get rid of this? I have installed only 4 extensions as shown below.
Update:
I ...
7votes
1answer
51views
+50
BlueImp jQuery FileUpload GitHub marked as readonly/archived?
The BlueImp jQuery File Upload GitHub project has been marked "This repository has been archived by the owner. It is now read-only.".
See: https://github.com/blueimp/jQuery-File-Upload
But ...
0votes
1answer
40views
+100
How can I unconfuse my server between cjshayward.com and cshayward.com?
I have separate Wordpress installations cjshayward.com and a present stub, cshayward.com. They are on the same host, with separate databases.
I would like to log in to cshayward.com, but when I load ...
0votes
1answer
58views
+50
How to set PopUpWindow to be on the same monitor as the application? (xaf)
The user often moves my XAF Winforms app between monitors.
However dialogs invoked by the PopUpWindowShowAction remain on the old monitor
This issue can be repeated with Dev Express's Main Demo ( ...
4votes
1answer
578views
+50
Train multi-output regression model in pytorch
I'd like to have a model with 3 regression outputs, such as the dummy example below:
import torch
class MultiOutputRegression(torch.nn.Module):
def __init__(self):
super(...
-1votes
0answers
34views
+50
Why is DllExport not exporting functions in 3F/DllExport example using VS 2017 CE?
I'm trying to export functions from a C# .dll using the DllExport NuGet package. After I was not able to get this to work on my own code, I downloaded the 3F/DllExport example and tried to build the ...
0votes
0answers
16views
+50
Intermittent connection failure to remote machine when remote (gdb) debugging with VS2019
I'm compiling and debugging native C++ code on a Linux VM hosted (with Hyper-V) on the same machine on which I'm running Visual Studio 2019 (Enterprise Version 16.11.1). The remote connection only ...
2votes
3answers
78views
+250
How to copy contents of folder to /app via dockerfile?
We have a solution-wide folder that contains shared settings that each project needs.
I'm trying to copy the contents of that folder to the /app folder but it's not working
This is part of my ...
2votes
1answer
57views
+100
ESLint throw errors on included tsconfig file
I have the following repository structure:
cypress folder
.eslintrc.js
tsconfig.json
basic.spec.ts
src folder
.eslintrc.js
tsconfig.base.json
tsconfig.json
My intention is to set the root tsconfig....
1vote
1answer
92views
+50
Does python have an analogue to R's splines::ns()
I would like to replicate making this Q matrix in python, but I can't seem to make it happen.
min = 0
max = 10
tau = seq(min, max)
pDegree = 5
Q <- splines::ns(tau, pDegree)
print(Q)
Here are some ...
2votes
0answers
60views
+50
Warning message in the officer package after adding exactly 100 slides
I get warning messages in the officer package after adding more than exactly 100 slides.
library(officer)
pres = read_pptx(path = NULL)
for (i in 1:100)
{
print(i)
pres <- add_slide( x = ...
1vote
0answers
57views
+50
How can I forbid the rotation of status bar during the dismiss animation of a landscape viewcontroller?
I presented a landscape viewcontroller A on a portrait viewcontroller B, and hid the system status bar in A by overriding the prefersStatusBarHidden property to false.
After I called the dismiss ...
0votes
1answer
52views
+50
Pod Install Fails Due to Glog
I am getting the following error when trying to run
pod install
[!] Error installing glog
[!] /usr/bin/git clone https://github.com/google/glog.git /var/folders/b4/0h5z4ll13k30c3dq47jlxqph0000gn/T/...
1vote
2answers
57views
+50
exclude the configuration file (.xml and package) from dependency jar in gradle spring project
In my spring project we are using web dependency contains a configuration applicationContext.xml and security-config.xml. I have to change on both of them in my application how can I achieve this.
I'm ...
0votes
0answers
16views
+50
Invoke-WebRequest "host unknown" in powershell version 7.2, 5.1 did work
I use a script in our intranet with ps 5.1:
Invoke-WebRequest -UseDefaultCredentials -Uri http://intra.mycompany.com/mysite
updating to powershell 7.2 it stopped working
Invoke-WebRequest -...
1vote
1answer
53views
+50
Terraform GKE node-pools spin up with reduced auth access scopes
Using Terraform I spin up the following resources for my primary using a unique service account for this cluster:
resource "google_container_cluster" "primary" {
name = var....
3votes
1answer
84views
+100
Even distribution of directed acyclic graph with respect to edge length
Problem
I have a set of events, some of them connected and these connections define order. Events must be held in defined order. A connection may contain a min and/or a max requirement for distance ...
0votes
1answer
50views
+150
Angular testing Expected spy navigateByUrl to have been called 0 times. It was called 1 times
I have a strange behavior on testing Angular RxJS based funtions with Karma/Jasmine.
I have this test:
describe('LoginComponent', () => {
let fixture: ComponentFixture<LoginComponent>;
...
2votes
0answers
112views
+50
Why does fread() on php://input writes temp files and how to avoid?
The PHP 7.4 (on Windows) code is:
<?php
// index.php
$postBodyResource = fopen("php://input", 'rb');
while (!feof($postBodyResource)) {
$data = fread($postBodyResource, 5 * 1024);
}
...
1vote
2answers
40views
+50
How to generate PDF from Excel MemoryStream created using EPPlus.core?
I have to create a API in dot net core which will return the excel as PDF.
Excel works fine but when I try to send it in PDF content as you can see in the following code:
[HttpPost]
[...
1vote
1answer
33views
+50
WooCommerce - Filtering related products by product attribute and category
I'm looking to adapt the related products so that it returns products that match the colour and category of the current product.
I can get one or the other working, but not both.
Please see code below:...
1vote
4answers
118views
+100
Aggregate multiple tables considering indexing with values derived from one table
Consider I have three tables (bet,win,cancel) that will contain the data for rounds of bets. Each round can have 1 or more bets and 1 or more wins. A round may be cancelled before any wins are ...
0votes
1answer
40views
+50
retrive file from one drive from a next.js application
I am using react-onedrive-filepicker to retrieve file content from a selected file located on OneDrive.
My code is like:
<ReactOneDriveFilePicker
clientID={process.env....
3votes
2answers
115views
+50
Pattern matching in compound if statements and switches with fall-through
If I have an if statement like if (currentShape is ITable table || currentShape is AutoShape autoShape) I cannot use table or autoShape in the body because I get a CS0165 compiler error.
The same is ...
1vote
1answer
57views
+50
Store a known AES key with CngKey by name for later use
I want to store a known AES key (retrieved offline) by entering it into the application once, saving it to Cng for storage, then reference it only by name on subsequent use.
I want to save the key in ...
6votes
1answer
215views
+200
How to use @State and @Environment properties in a struct that can produce a view but isn't a view?
I’m trying to create a view style for customizing a custom SwiftUI view that I’m developing. I declared a protocol with a makeBody function, I’m storing the style as a @State property so it can be ...
0votes
1answer
77views
+50
How can i improve the performance of my python task?
I have a problem. So I have a task that runs every time when a user writes a chat message on my discord server - it's called on_message. So my bot has many things to do in this event, and I often get ...
8votes
2answers
2kviews
+100
View events and their parameters in Google Analytics
Is it possible to view / query the raw events from my Google Analytics (gtag.js) database?
I make sure to send additional parameters with my events and have no idea where I can access those parameters....
0votes
2answers
66views
+250
How to get more details on a requests.exceptions.SSLError?
When I request a URL with an expired HTTPS certificate I do not get a meaningful error from requests. Instead it gives me a cascade of "ssl.SSLError: A failure in the SSL library occurred".
...
4votes
0answers
236views
+100
Meaning of a negative "started at" time in Chrome DevTools
When inspecting a request in Chrome DevTools, I am seeing that the Queued time of the request happened at "0" but that the request was "started" at -154ms. I assumed that all requests must first be ...
0votes
0answers
67views
+200
Calculating a Rolling IRR in Excel
I have two columns that I'd like to use to calculate a rolling monthly IRR with. The data looks like this:
Date Net Cash Flow Principal IRR
2023-01-31 0 0 idk
...
2votes
1answer
62views
+50
"Import as" isn't recognized, normal import is
I'm playing around with matplotlib to understand its structure better and I'm confused by the following piece of code:
import matplotlib as mpl
from mpl import pyplot as plt # ModuleNotFoundError : No ...
5votes
1answer
88views
+50
Python tabulate: to have multiple header with merged cell
Is there a way to specify multiple headers with merged cells in python?
example dataset:
from tabulate import tabulate
cols = ["ID", "Config\nA", "Config\nB", "...
0votes
0answers
59views
+100
Record Video and Screen together and overlay with Javascript
I want to record a user's screen alongside their webcam and display the result as an overlay, like this:
I assume that while recording I can display the multiple streams in two separate video ...
1vote
1answer
51views
+50
XBRL: How do you merge rows from different filings?
We use a XBRL processor to ingest filings from SEC. Often times, a company declares a metric in different filings with different concepts - with or without exactly matching values - but to be regarded ...
0votes
1answer
47views
+250
Terraform AzureRM Continually Modifying API Management with Proxy Configuration for Default Endpoint
We are terraforming our Azure API Management instance.
...
resource "azurerm_api_management" "apim" {
name = "the-apim"
location = ...
3votes
0answers
83views
+50
How to use Docker with git worktree
I recently started using git worktree and it is awesome. However, I am not sure how to make it work with Docker. Here is my flow:
repo-a has a dockerFile to build a local container.
I create a new ...
1vote
1answer
92views
+50
shiny: Saving rpivotTableOutput as Excel
I could not figured out how to save the output of rpivottable in shiny. My minimum working example is below for reference.
library(tidyverse)
library(shiny)
library(shinydashboard)
ui <-
...
0votes
0answers
27views
+150
Asana API: How do I set the Section of a Task on My Tasks
Asana has Sections on the My Tasks View. I want to use the Asana Ruby API to update the My Tasks Section of a given pre-existing task.
I have been spending hours trying to get this to work on the ...
1vote
1answer
47views
+100
In Shiny, how to display miniature/thumbnail of html Rmd report with download button in pdf?
I need to display the RMarkdown Reports in thumbnails. The first report has a red cover, so the thumbnail should be red. The same for the black report. How can I do this?
In addition, each one will be ...