instruction stringlengths 0 30k ⌀ |
|---|
{"Voters":[{"Id":1509264,"DisplayName":"MT0"},{"Id":4216641,"DisplayName":"Turing85"},{"Id":266304,"DisplayName":"Alex Poole"}],"SiteSpecificCloseReasonIds":[18]} |
C++ error: no matching member function for call to 'enqueue' futures.emplace_back(TP.enqueue(sum_plus_one, x, &M)); |
|c++|multithreading|std|threadpool| |
It is probably too late for answer, but the solution for me was pretty much simple.
My problem was that I first created a project in Jupiter, and then add e helpers.py with my finctions. So basically your Jupiter notebook won't see it untill you restart the Kernel in your Jupiter Notebook. Make sure you did that, and ... |
I have checked almost all previous question related to my query but did not find my solution.
I'm facing issue with Full keyboard access accessibility when integrate it with scrollview. Inside scrollview textfield and secure textfield are accessible with "tab" key but other component like buttons are not accessible us... |
Getting IllegalAnnotationExceptions exception after upgrading to jakarta and java 17 |
|spring-boot|jaxb|java-17|spring-boot-3| |
check if this code execute correctly made some changes: data formatting, field initialization and fixed the column name mismatch
import sqlite3
import psycopg2
from contextlib import contextmanager
from dataclasses import dataclass, field
from datetime import datetime
from psycopg2 ... |
null |
null |
null |
null |
Copying spesific file amount |
|python|google-colaboratory| |
null |
I'm working on a CLI tool. I'm using macOS. I was using `node index.js <command>` when running it locally. I decided to publish it as an npm package, but the command I've defined in the `bin` section of my `package.json` won't work.
In my `package.json`, i've defined `bin` as follows:
```JSON
"bin": {
"scaf... |
I don't really understand why you are messing around with central directories and building the Zip manually. None of this is necessary as you can use `ZipArchive` to do this in one go.
Furthermore, you can't compress chunks of bytes like that and then just concatenate them. The Deflate algorithm doesn't work that wa... |
Getting an error:
````
FAILED: com.testingvasitum.testcases.LoginpageTests.login
org.testng.internal.reflect.MethodMatcherException:
[public void com.testingvasitum.testcases.LoginpageTests.login(java.lang.String,java.lang.String) throws java.lang.InterruptedException] has no parameters defined but was found to b... |
I am currently working on a project titled "Build-a-Website-using-an-API-with-HTML-JavaScript-and-JSON" available on GitHub at [GitHub Repository Link](https://github.com/zwanski2019/Build-a-Website-using-an-API-with-HTML-JavaScript-and-JSON.git). This project involves creating a simple weather forecast web app using H... |
Skip level in nested JSON and convert to Pandas dataframe |
|python|python-3.x|pandas|dataframe| |
How can I sort a csv file using pandas so that the names are sorted the same way finder does it?
In finder I have millions of files named as such: "-2odhDKSZ22302_000.jpg". These file names are also in a csv. I'd like to be able to go through the images via finder and the csv file in the same order.
If there are ... |
I'm currently in the process of transitioning from using Terraform for managing my GitLab CI/CD pipelines to using OpenTofu. In this migration, I also need to integrate OIDC (OpenID Connect) authentication into my GitLab pipelines.
Previously, my .gitlab-ci.yml file looked something like this with Terraform:
'''You... |
I have code in python which is finding and replacing a image in pdfs, but I'm having hard time adjusting the size of the new image so what the code is doing is finding the old image and it's using the the size and position of it to apply the new image. I want to be able to modify the size of the new image to whatever h... |
i have a grid of images in my app which will open a scroll view of the images if one is clicked, but no matter what image i click, the scroll view will always open on image 1 with 2,3,4,5,6,7,8,9 below it. i want to make it so if a user clicks on image 6 it will open the scroll view on image 6 with images 1,2,3,4,5 abo... |
how to make a scroll view of 9 images in a forEach loop open on image 6 if image 6 is clicked on from a grid? |
|swift|swiftui|swift3| |
null |
**_Originally asked on Swift Forums: https://forums.swift.org/t/using-bindable-with-a-observable-type/70993_**
I'm using SwiftUI environments in my app to hold a preferences object which is an @Observable object
But I want to be able to inject different instances of the preferences object for previews vs the prod... |
Using @Bindable with a Observable type |
|swift|observation| |
I'm no linux expert but I'm trying to learn.
I wrote a simple bash script to run my vpn connection automatically upon start up.
#!/bin/bash
cyberghostvpn --country-code PL --connect
I works fine when I run it through my CLI
sudo ./cyberghostvpn-launcher.sh
I tried to wrap it in a service ... |
Seeking Assistance to Enhance Weather Forecast Web App Project |
|javascript|html|css| |
null |
I've been trying to overcome the issue of my website's HTML document size being too large at 68 Kb, well above the average of 33 Kb. I've attempted various strategies such as code optimization and resource management to bring it down to the recommended size, but unfortunately, I haven't seen any improvement in site spe... |
How to convert the size of the HTML document from 68 Kb to the average of 33 Kb? |
|java|html|optimization|seo| |
null |
ggeffects has a "margin" argument in predict_response, which controls how non-focal terms are addressed when estimating predicted values, which is mostly of consequence when non-focal terms are categorical. in test_predictions, however, there is no such argument.
1. how does test_predictions deal with categorical non... |
I would like to produce a file consisting of the three-way diff of three files, with every difference represented as a conflict in the git style. That is, common lines are shown verbatim, and differing sections of a file are shown with conflict markers "<<<<<<", "||||||", "======", and ">>>>>>" (also called "conflict ... |
Well In my wordpress site I want to change my currency USD to AUD with value . By value I mean it will trun 1 dollar = 1.53 AUD dollar . and it will change automatic. Cus I have 600+ product but it not possible to change one by one . And i have just decide to sell on Australia.
Can you please help me to write sql qu... |
How to change woocomerce or full wordpress currency with value from USD to AUD |
|php|sql|mysql|wordpress|woocommerce| |
null |
I was following a tutorial on Web API and I saw the creator creating his service method as nullable `( Task<Comment?> Update(CommentUpdateDto comment) )` and he later used it like following which made sense:
```
[HttpPut("{id:int}")]
public async Task<IActionResult> Update([FromRoute] int id, [FromBody] CommentUpd... |
The `kruskalmc()` function from the pgirmess package does not output p values for each comparison, and I’m wondering whether there is a different function that performs a similar post hoc test after `kruskal.test()` that does output the p-values for each comparison.
If not, is there anyway to calculate the p-value... |
null |
How can I load a Bootstrap modal only after form validation passes? |
Need help/guidance on creating a Query that will re-organize a table. It has been over 5 years since I was heavily using Query and Arrayformula's in Google sheets and am not getting the results needed.
.
Google Sheet example Data: https://docs.google.com/spreadsheets/d/1YI1mPJqL8x0GfxMSE9K2xCNzwiUvo0RLhd5DQ0O1mC... |
`findall` return an array, thus your `child` is also an array. If you want to remove all the children, you have to make another loop for `child` as
```
for parent in root.findall('parent'):
for child in parent.findall('child'):
parent.remove(child)
```
According to the [19.7.1.3. of the xml package... |
null |
I am trying to pop up a modal window with the terms & conditions, only when the user accepts the terms and conditions then the data is submitted to the database. I want to validate user input before the modal pops up. Below is my code.
**individual_account.html**
```
<form method="post" class="bg-white sha... |
I'm trying to validate an input array of file types, and Laravel simply ignores it. See the html and validate in the controller. What am I doing wrong, and I don't see it? The other field's validation works perfectly.
```
<input type="file" accept="image/png, image/jpg, image/jpeg, application/pdf" name="comprovan... |
Find, Replace and adjust image in PDF's using python |
|python|image|pdf|replace|find| |
|file-upload|struts2|struts-action| |
i'm trying to make weather app and i'm using geolocator package but after adding package project is not building.
[![][1]][1]
```
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnabl... |
null |
I am running kafka-topics.sh <brokers>:9098 --describe --topic __consumer_offsets --command-config /etc/client.properties
its throwing below error
```
Failed to create new KafkaAdminClient
org.apache.kafka.common.KafkaException: Failed to create new KafkaAdminClient
at org.apache.kafka.clients.admin... |
Kafka-topics.sh error with Failed to load SSL keystore /keystore.bcfks of type BCFKS / BCFKS not found / BCFKS KeyStore not available |
|apache-kafka|aws-msk| |
null |
I was trying to setup the EmailOperator of Airflow to finish my pipeline with a notification. Following the various steps I found this problem:
Aiflow is not actually showing the variables I passed through the `environment` key in docker. It seems to update it but there is no way to print (for check/verify) them if no... |
There are multiple problems in your code:
- `strcmp(req, "GET")` returns `0` is the strings have the same characters, so you should write:
```
if (strcmp(req, "GET") == 0) {
return GET;
}
```
or
```
if (!strcmp(req, "GET")) {
return GET;
... |
I am trying to write a personal project in JavaScript.
So I started with an empty folder with two files:
card.js
constants.js
and in `card.js`, I used on the first line:
import { SUIT } from "./constants.js";
and run it using `node card.js`. It doesn't work, giving the error:
> (node:9157... |
I'm using selenium to scrape off a table from the tracking page of a logistics company. Here is my code:
```python
driver.find_element(By.CSS_SELECTOR, "#trackingNo").send_keys(tracking_id)
WebDriverWait(driver, 5).until(EC.text_to_be_present_in_element_value((By.CSS_SELECTOR, "#trackingNo"), str(tracking_id)))
e... |
Before executing commands the shell first expands them. There are 7 consecutive expansions: brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, word splitting, and pathname expansion (see [this section of the bash manual](https://www.gnu.org/software/bash/man... |
I need to print the bounding box coordinates of a walking person in a video. Using YOLOv5 I detect the persons in the video. Each person is tracked. I need to print each person's bounding box coordinate with the frame number. Using Python how to do this.
The following is the code to detect, track persons and displa... |
Error:
> {"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"7bf4f312d5676","details":[{"field":"/amount/value","value":"60.00","location":"BODY","issue":"calculation_error","description":"Amount is invalid."}],"links":[{"href":"https://developer.p... |
PayPal v2 invoicing API "INVALID_REQUEST" from incorrect amount fields |
{"Voters":[{"Id":14853083,"DisplayName":"Tangentially Perpendicular"},{"Id":476,"DisplayName":"deceze"}],"SiteSpecificCloseReasonIds":[13]} |
This is the original data that I want to edit -
```
"Languages" : [
"English",
"French",
"Tamil"
],
```
And this is what I want to achieve by inserting the data such that it will leave 2 null values if there is empty spaces when entering the data at position 5 and if there is only 1 empty space then ... |
How to enter data in mongodb array at specific position such that if there is only 2 data in array and I want to insert at 5, then rest data is null |
|arrays|database|mongodb|mongoose| |
null |
I will also post an answer here, as the original ones do not fit if you are working with transparency or EmptyView. With this, you can click anywhere outside of a TextField to remove focus.
This does:
- Add a transparent view as responder on top
- As transparent views have no contentShape by default, we assign one... |
|c#|asp.net-core|asp.net-core-mvc|.net-8.0| |
I want to subdivde the number of scrolling wheels it takes to reach max zoom.. but zoomDelta not working. No matter what zoomDelta value is, it zooms by 1 always.
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
... |
With non-graphical maps in Leaflet, zoomDelta doesn't work |
|javascript|html|leaflet| |
null |
Listview - Getting error while linking the items correctly in Android Java |
null |
null |
null |
null |
null |
from bs4 import BeautifulSoup
# Assuming you have your HTML content in 'html_content'
soup = BeautifulSoup(html_content, 'html.parser')
# Find the parent span and extract the text, excluding the nested span's text
rain_forecast = soup.find("span", {"class": "Column--precip--3JCDO"}).... |
I have been working on a project that uses a **`database`**. It makes the user choose from the commands in the program. The program makes you add your **password, E-mail, user id, and birthday**, and every user has his own **user id**. He can make a **new user**, **delete password**, **delete user**, **change password... |
File array validation in Laravel 10 |
|arrays|laravel|laravel-10| |
> How can I find a case in which the program fails to output the right answer?
Try
int n = 2;
int*arr=(int*)malloc(n*sizeof(int));
arr[0] = 56;
arr[1] = 561;
Your code will give
56156
but you could have formed
56561
|
|python|numpy|tensor|tensordot|einsum| |
I think the first question you should is answer is:
> *Am I going to do this myself or am I going to hire somebody to help me?*
This choice will, to some extend, determine the other choices you have.
If you do hire a professional I would suggest to discuss these things with that person. It can be hard to find someon... |
select avg( columnname) from table;
This will average all rows. To average a subset, use a `where` clause. To average for each group (of something) use a `group by` clause. |
I'd say your best bet is to do a simple assert that heading is not None:
```python
try:
with open("inpu.csv", newline="") as f:
reader = csv.DictReader(f, skipinitialspace=True)
headings = reader.fieldnames
assert headings is not None
assert len(headings) == 3
men... |
I'm reading in serial data from a serial USB device with python.
I want to compare the received data with a predefined string if it matches.
Reading the data works fine the problem is this if-statement:
```
if serialInst.in_waiting:
startPacket = serialInst.readline()
z = "iohioowwcncuewqrte"
... |
**You are trying to add a class to an element based on the value of a range slider. there are a couple of issues in your code.**
1. The mousemove event is not suitable for detecting changes in the value of a range slider. you should use the input event.
2. The condition if (this.value == "1", "2", "3", "4", "5") ... |
Within the function `sumAtBis`
int sumAtBis(tree a, int n, int i){
if(i==n){
if(isEmpty(a))
return 0;
else
return root(a);
}
return sumAtBis(left(a),n,i+1)+sumAtBis(right(a),n,i+1);
}
there is no check whethe... |