instruction stringlengths 0 30k ⌀ |
|---|
I am building my first React site and having trouble understanding how to best layout pages and running into issues like this: **I have a cursor animation -- throughout the entire webpage, the cursor is a small circle, but when I hover over certain divs within components that make up each section of the page (hero, abo... |
Why is my pivot table not generating an id column? |
|mysql|node.js|sequelize.js| |
|c|pointers|segmentation-fault|gdb| |
Hovering doesn't want to work by any way.
Code Below: -
```
self.setStyleSheet("""
QMenuBar {
background-color: white;
color: black;
border: 3px solid silver;
font-weight: bold;
font-size: 23px;
}
QMenuBar::item {
... |
QMainWindow(self).setStyleSheet(""" QWidgetAction:hover {...} """) in QMenuBar isn't working and doesn't want to hover |
|python|pyqt5|hover|qlabel|qwidgetaction| |
null |
I have a set of buttons in a class, and I'm trying to run a function so a piece of HTML will change based on what button was pressed. How would I use if/else statement to change the outcome based on the id of the button?
```
document.querySelector(".pizza").addEventListener('click', function(){
if (docu... |
I'm encountering difficulties with my Terraform configuration, utilizing Artifactory's terraform-backend repository as the backend for storing tfstates.
Configuration Overview:
Terraform Backend: **remote: Artifactory | repository type: terraform-backend**
Terraform Version: **1.0.2**
I would greatly apprecia... |
How to handle an animation across multiple components on a page in React JS website |
|reactjs|animation|tailwind-css|mouse-cursor| |
null |
|python|sql|dataframe|join|pyspark| |
{"OriginalQuestionIds":[69326413],"Voters":[{"Id":6395627,"DisplayName":"Slaw"},{"Id":-1,"DisplayName":"Community","BindingReason":{"DuplicateApprovedByAsker":""}}]} |
I am attempting to update a Square order from my app, but it's not working. I create the order, and initially, everything seems fine—it gives me a success response and shows up when I make an API call. However, when I try to update the order, for instance, changing the name from 'John' to 'Jan,' and press the update bu... |
|swift|square| |
To create a "backup" of a given table, you can simply run a query and then use ***SAVE RESULTS >> BigQuery Table*** to save to a new table. Now you have a "backup" and if something goes wrong you can restore from this new table.
I think the following SQL statement might delete "old" rows for you:
```sql
DELETE FR... |
I created an array of structures
data(1).field = 5;
data(2).field = 3;
data(3).field = -4;
...
I would like to plot one of the fields by accessing something like:
data(:).field
I get the following error:
> Expected one output from a curly brace or dot indexing expression, but ther... |
Matlab arrayuy of structure |
|matlab|matrix|structure| |
I'm encountering slow performance when executing a simple `SELECT` query (`SELECT * FROM SampleData`) on a SQL Server database hosted on my local machine.
The table contains around 1 million records. Despite the relatively straightforward query, it takes approximately 20 seconds to retrieve the results. However, th... |
That is almost the same use-case given as example in the [documentation](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Map.html#computeIfAbsent(K,java.util.function.Function)) of `Map.computeIfAbsent()`, which is implemented by `ConcurrentHashMap`:
> If the specified key is not already ass... |
|javascript|reactjs|spotify| |
null |
I have a C# game emulator which uses TcpListener and originally had a TCP based client.
A new client was introduced which is HTML5 (web socket) based. I wanted to support this without modifying too much of the existing server code, still allowing `TcpListener` and `TcpClient` to work with web socket clients connect... |
I'm facing one problem with Hibernate logging. If I enable **org.hibernate.SQL** to debug I can see the native SQL statements in the defined logger.
This works in every scenario but the one when the HQL has collections fetches.
Digging the code I could find where the execution behaves differently and it might cause... |
Problems with Hibernate SQL statements logging |
|spring-boot|hibernate-5.x| |
I try to create a cron expression like this: every 15 minutes except on sunday from 16h to 18h.
I have tried a few generators, but can't find the way to write the "except on sunday between 16h and 18h.
Could someone help me or give me a ressource maybe ? |
Cron expression with exception on a range time in a specific day |
|cron| |
You can use `readr::read_csv` with `col_names` and `col_select` arguments.
```r
header <- c("A", "B", "C", "D")
subset <- c("D", "B")
readr::read_csv("sample_data.csv",
col_names = header,
col_select = any_of(subset))
# # A tibble: 3 × 2
# D B
# <dbl> <dbl>
# ... |
I am working on a virtualised data grid for my application.
I use transform: translateY for the table offset on scroll to make table virtualised.
I developed all the functionality in React 17 project, but when migrated to React 18 I found that the data grid behaviour changed for the worse - the data grid started to b... |
I am trying to use the **Microsoft.Build** nuget package to:
- open a solution
- enumerate projects in it
- discover the DLLs that are created.
<sup>\<rant>Failure modes seem to be super-abundant, error messages are uninformative, documentation seems to be scarce and misdirected, and examples are outdated. After... |
In Rust, I have created a struct Foo. I now want to initialise that from a string using a macro, for example:
create_struct!("Foo");
I am struggling to do this - any help would be hugely appreciated! Thanks.
src/main.rs:
pub struct Foo {
}
// Macro to initialize an instance of ... |
This may have to do with updates in the `scales`, `ggplot2` and/or `cowplot` packages. I would recommend updating all R packages you got to the newest version and trying this again.
If this doesn't help, you may want to check out the `adjustedCurves` package, which offers similar functionality. |
Your output:
```lang-none
this is thread 1
this is thread 2
main exists
thread 2 exists
thread 1 exists
thread 1 exists
```
Before I see that *"it prints "thread 1 exists" twice."*, I see that it prints after "main exists": This behavior can lead to unpredictable results.
--
First, you should array y... |
I have some trouble re-building a PHP array. I need to change it for printing a table to a PDF doc with tfPDF Library.
I tried it with foreach loops, array_walk, array_walk_recursive, array_chunk and array_slice - so far without success.
This is my array $data:
```
Array
(
[file_id] => 1394
[user_i... |
Rebuild an array in PHP: merge array elements and save them to comma separated values |
|php|arrays|multidimensional-array| |
null |
**How do I change the appID based on a parameter passed on the command line when running Maestro tests?**
I'm aware that it's possible to set the app ID for a maestro test suite based on an env variable (https://stackoverflow.com/questions/76103428/is-it-possible-to-run-a-single-maestro-flow-against-two-different-ap... |
How to programatically set appID for Maestro tests based on platform |
|android|ios|gui-testing|maestro| |
This question is (very) similar to [this post][1], but not a duplicate IMHO, because:
- my setting is completely reproducible ( docker )
- I use `gem` to install everything explictly
- I have a "non-rails-related" script to "prove" gem is "operational"
- the mentioned question is "ancient" in internet time (nearl... |
```
static ArrayList<Integer> LinearSearch(int[] arr,int index,int target) {
ArrayList<Integer> iList = new ArrayList<>();
if(index == arr.length){
return iList;
}
if(arr[index] == target){
iList.add(index);
}
ArrayList<Integer> temp =... |
|java|recursion| |
Try [this package][1]:
final pngBytes = image.pngUint8List;
or
final bmpBytes = image.bmpUint8List;
[1]: https://pub.dev/packages/flutter_image_converter |
It seems you forgot to add permission to access network on release app.
```
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```
Please add the permission and it will solve your current issue |
{"Voters":[{"Id":2399035,"DisplayName":"Lelio Faieta"},{"Id":10952503,"DisplayName":"Elikill58"},{"Id":3315779,"DisplayName":"CerebralFart"}]} |
Assuming collection type name is **state** and we want to get state by **name** field.
> src/api/state/controllers/state.js
'use strict';
/**
* state controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreCont... |
I have tried to isolate my problem in a very simple (and working) project. Let's say I have a simple model with 2 fields, and I have configured its properties and a PropertyChanged event. This is a simplified implementation of my model, **please notice the last method just gets a new client object from a list and retur... |
Asigning an object to another doesn't raise PropertyChanged event in WPF |
Create a struct from a string using a macro in Rust |
|rust|macros| |
null |
Indeed, KeyboardAvoidingView is not always easy to handle. Here are a few ideas:
1. Try to use KeyboardAvoidingView without absolute positioning. If needed, wrap such view in another that uses `position: absolute`, but leave this one with relative positioning.
2. Try replacing `position` with `padding` or `height... |
It runs tests at mvn clean package and tries to connect to the database, use `mvn clean package -DskipTests` command or click on icon with a crossed out circle in your IntelliJ IDEA maven plugin, it package you jar with skip test mode too |
I'm trying to secure my ASP.NET Core 8 Web API with Keycloak.
I've created a realm and an user with confidential access-type, so it needs a secret. Everything is well implemented I think, but when I try to make a request from Swagger UI, it gives me the following CORS error:
> Cross-Origin Request Blocked: The S... |
Consider this simple code below
When I parse the content and get the "txt" with `JSON.parse(e.data).choices[0].delta.content;` then it works fine if it is plain text. However, there are some simple HTML tags in the response like `<strong>` etc. which don't render as HTML in the browser.
I don't know how to render... |
We are using Spring Cache abstration and Infinispan server as a remote cache in front of a slow service.
I have two requirements:
- I would like to create the caches implicitly if they don't exist yet on the remote Infinispan server during access time based on a cache configuration template known by the Infinisp... |
|c#|wpf|data-binding|inotifypropertychanged|datacontext| |
```
static ArrayList<Integer> LinearSearch(int[] arr,int index,int target) {
ArrayList<Integer> iList = new ArrayList<>();
if(index == arr.length){
return iList;
}
if(arr[index] == target){
iList.add(index);
}
ArrayList<Integer> temp =... |
Follow the steps as mentioned in this page on [official playwright site][1]
Step 1 to 4 will help you running the first program even without opening any IDE and building your code.
Once that works open the solution file/folder from the IDE rather than opening the file by clicking on it.
[1]: https://play... |
Make sure the YAML indentation and format in the `parameters` section of your `SecretProviderClass` are correct. YAML is very sensitive to indentation, and even a small mistake can lead to parsing errors.
You would find a similar error in [`Azure/secrets-store-csi-driver-provider-azure` issue 290](https://github.com... |
Requirements(reverse engineered from the question):
- the body of the loop knows which iteration it is for self and all parents
- the number of loops is between 0 and at least hundreds
- memory allocation is no problem i.e. no attempt at limiting it via compartmentalization is required
- manual termination of... |
rails import / require mechanism fails |
|ruby-on-rails|rubygems| |
I assume your question is "why **doesn't** this crash when the run is short?" This code should definitely crash in the general case since it tries to write an array of CGPoints into space allocated for a single CGPoint. This corrupts other memory and crashes. Classic buffer overflow.
But as to why in some cases it d... |
null |
Found a number of issues here: First, range in line 25 is calling a sheet, not a range of cells. I have changed it to `e.range` to call on the event object.
Also, I believe you have to use an installable onEdit trigger to utilize the mail service. I changed the name of your function from `onEdit` to `onMyEdit` an... |
I have a web route in my laravel project, and in that web route currently I'm calling an Artisan command I have defined in `app/Console/Commands`. I'm doing `Artisan::call(command)`.
So, it's my understanding first of all that when I call it like that, my web request will wait for that to complete before it continue... |
Slightly confused about what Artisan::callSilent does |
|laravel|laravel-artisan| |
After few months of exploring options. I found solutions.
1) There is no way to choose other than "AzDevOps" user for Azure DevOps agents running in interactive mode on Azure VMSS instances. But I could configure new user called "AzDevOps" in the base gallery image and add required licenses to that user account.
... |
Thanks! I added something to it so that all sublabels are displayed
function getAllLabels(){
var results = [];
var labels = GmailApp.getUserLabels();
for (var i = 0; i < labels.length; i++) {
Logger.log(" Label: " + labels[i].getName());
results.push(labels[i].ge... |
![Unwanted text on icon][1]
I created a return icon while designing, but this text appeared on it. What is this text and how do I solve this?
There does not seem to be an error in my code, I searched the internet but could not find any results.I don't know how to investigate.
```
Container(
... |
null |
This is my predictive modeling code for fraud detection on the AML dataset
```
import torch
import torch.nn as nn
import torch.utils.data as Data
import pandas as pd
import numpy as np
from sklearn.metrics import accuracy_score, recall_score, precision_score, f1_score, confusion_matrix
from sklearn.utils.clas... |
Why does my confusion matrix look like this? |
|python|confusion-matrix| |
null |
I have a Firefox extension that for certain pages listens to the [`webRequest.onHeadersReceived`][1] for specific URLs that it opens in order to remove the "content-disposition" header when it contains "attachment". That way some content is shown in the browser rather than downloaded as a file.
When the extension op... |
|java|visual-studio-code| |
Is there a way to play a notification sound as fast as a button click? I feel like there is a delay of a few hundred milliseconds!
I'm using this:
```
public void btn_Click(object sender, eventargs e)
{
playExclamation();
}
public void playExclamation()
{
SystemSounds.Exclamation.Play(); ... |
My goal is to have *select* (dropdowns) handled by [custom-select][1] js library for blocks in **Wagtail Stream Field**. As it is quite easy to add for normal fields when event `DOMContentLoaded` is triggered. But is there any ***event*** or ***hook*** for adding a *block* to **StreamField**?
I tried even calling my... |
How to add custom js for select in Wagtail choice block |
|javascript|django|wagtail|wagtail-streamfield|wagtail-admin| |
When I hover over this `DateTimeOffset` variable, only the `Hour` value is displayed:
[![enter image description here][1]][1]
I want to have the full `DateTimeOffset` back. Where is this actually coming from and how can I set/reset it?
[1]: https://i.stack.imgur.com/ctsdO.png |
In the previous code, I had a problem because I was passing availableOn as an argument. That's why it didn't work. Here is the correct code:
@script
<script>
$wire.on('appointment-modal', async (event) => {
let data = await event.availableOn;
console.log(data);
c... |
Firefox extension background script terminated preemptively |
|javascript|firefox-addon|firefox-addon-webextensions| |
Here the pg_available_extensions word is selected:

The selection is not visible
I tried to find a configuration parameter that would address this issue and could not find one. I lost hours trying to fix this as there are behavior associated t... |
{"Voters":[{"Id":3745413,"DisplayName":"Ron Maupin"},{"Id":635608,"DisplayName":"Mat"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[18]} |
{"Voters":[{"Id":3074564,"DisplayName":"Mofi"},{"Id":6738015,"DisplayName":"Compo"},{"Id":9214357,"DisplayName":"Zephyr"}],"SiteSpecificCloseReasonIds":[18]} |
async await resolve promise only if I return single value |
I'm writing a Tkinter program that so far creates a window with a menu bar, a File menu, and a single item. The menu is successfully created, but with two items, the first being one that I did not specify, whose name is "-----".
If I don't add an item, the spontaneous one is still added. This still happens if I spec... |
Tkinter menu spontaneously adding extra item |
|python|tkinter| |