instruction stringlengths 0 30k ⌀ |
|---|
|javascript|html|reactjs| |
[In this demo](https://stackblitz.com/edit/kxgmi3?file=src%2Fstyles.scss) I'm trying to style the `mat-expansion-panel-header`'s `::before` pseudo element like this (Style rules added to styles.scss):
```
mat-expansion-panel-header {
position: relative;
}
mat-expansion-panel-header::before {
content: '';
... |
Styling the ::before element on a mat-expansion-panel-header? |
|javascript|html|css|angular|angular-material| |
If you used [JSON_VALUE][1] (since 8.0.21), that would work as you expect
```
CREATE TABLE participants (
id INT AUTO_INCREMENT PRIMARY KEY,
puuid CHAR(36) NOT NULL,
data JSON,
project INT AS (JSON_VALUE(data, '$.project')),
schoolCode VARCHAR(255) AS (JSON_VALUE(data, '$.schoolCode')),
... |
Regardless of what px value do I choose, nothing happens. The only times when something is altered is when I adjust either the paddingLeft or the paddingRight parameter, but here, another peculiar thing happens since if I try to set both paddings nothing happens, therefore the trick works only when setting just one sor... |
Material UI button's padding can't be adjusted |
|reactjs|material-ui|jsx|styled-jsx| |
# Context
I have a server which has a bunch of routes which may take a json body as an input and may answer with a json response as an output, and I want to quickly test these routes and various combinations of them.
The commands I am using manually look like :
```bash
curl -H "Content-Type:application/json" -d @... |
EDIT: I just double checked, and I'm actually wrong. Since the argument is neither a floating point number nor an integer, the left alignment should be the default.
This had to be a compiler bug since simply changing the compiler version gave the [right output](https://godbolt.org/z/x1zaehbEq).
`{0:30}` means th... |
I'm encountering an issue while trying to build a Docker image for my Python application. Whenever I run the `docker build` command, I'm getting the following error:
*ERROR: failed to solve: the Dockerfile cannot be empty*
**Here's my Dockerfile:**
```Dockerfile
# Use an official Python runtime as the base ... |
null |
I am scraping messages about power plant unavailability and converting them into timeseries and storing them in a sql server database. My current structure is the following.
> **messages**: (publicationDate datetime, messageSeriesID nvarchar, version int, messageId identity)
>
> The primary key is on (messageSer... |
null |
I understand what the function does, but I don't really know what does e.preventDefault() do. I know that prevents the default behaviour from the keydown event, but I don't really know which behaviour is that, I haven't been able to find it.
Reference article: https://hidde.blog/using-javascript-to-trap-focus-in-an-... |
if(tid\<n)
{
gain = in_degree[neigh]*out_degree[tid] + out_degree[neighbour]*in_degree[tid]/total_weight
//here let say node 0 moves to 2
atomicExch(&node_community[0, node_community[2] // because node 0 is in node 2 now
atomic... |
Sql Server Data Model and Insert Performance |
|sql-server|partitioning| |
The question seems incomplete, as the code is not present. As per my understanding adding the relevant details.
Ideally, gauge metric works on the latest value evaluated by the method/field given to it. (It can go up or down or can remain the same)
> w.r.t. the question, If the field's value is still 'x' for pod ... |
I have folder called preprocessed_data_png where the npy file of the images and annotations are. When I try to train the model I get the below error.
RuntimeError: Given groups=1, weight of size [32, 3, 3, 3], expected input[32, 416, 416, 3] to have 3 channels, but got 416 channels instead
Convert DICOM to PNG
... |
RuntimeError: Given groups=1, weight of size [64, 1, 3, 3], expected input[1, 3, 416, 416] to have 1 channels, but got 3 channels instead |
|channel|yolo|dicom| |
null |
The following c code,
which is trying to synchronize each thread with a mutual exclusion lock, adds one to the variable g_Count, and eventually g_Count=THREAD_NUM.
but for some reason, the variable g_Count is always less than the total number of threads?
```C
#include <windows.h>
#include <stdio.h>
const unsi... |
windows multithreading CreateMutex |
|c|windows|multithreading| |
null |
In recent Emacs versions (24), Semantic is able to this.
0. Possibly activate semantic mode <kbd>M-x semantic-mode RET</kbd>.
1. Bring up the Symref buffer with <kbd>C-c , g</kbd>.
2. Press <kbd>C-c C-e</kbd> to open all references.
3. Rename with <kbd>R</kbd>.
4. Save all the edited buffers with <kbd>C-x s... |
For completeness, here is another technique equivalent to `[0..]` for generating an infinite stream of natural numbers:
naturals = 0 : allthefollowingnat naturals where
allthefollowingnat (current : successors) = immediateSuccessor : allthefollowingnat successors where
immediateSuccessor=cu... |
I'm encountering an issue in my SwiftUI application where the UsernameView is presented again even when users have completed the onboarding process, specifically after they force close the app and reopen it. Otherwise not presented
```
@MainActor
final class RootViewModel: ObservableObject {
@Published priva... |
SwiftUI: UsernameView unexpectedly reappearing after force closing and reopening app |
|swiftui| |
{"OriginalQuestionIds":[63999871],"Voters":[{"Id":209103,"DisplayName":"Frank van Puffelen","BindingReason":{"GoldTagBadge":"google-cloud-firestore"}}]} |
For the old JDBC jars artifacts:
To, [**install**] 3rd party JARs to [**local**] repo:
```
# `mvn install:install-file` to install a custom file `install-file` [artifact] into the local repo
# For more info about (maven-deploy-plugin) parameters:
# https://maven.apache.org/plugins/maven-deploy-plugin/deplo... |
In 2024, this is pretty simple If you're working with `PreviewView` with CameraX.
You can directly [get][1] Bitmap from the `PreviewView` instance.
```
val previewView = findViewById(R.id.previewView)
val imageBitmap = previewView?.bitmap
```
[1]: https://developer.android.com/reference/androidx/camera... |
I fixed the issue myself by:
- removing the temporary var seq and using a variable thats created with the Object itself "attack_animation = noone;"
- Have the attack_animation be declared a value when the conditions are met
"attack_animation = layer_sequence_create("Instances", x, y, sAttackLeft);"
- have the... |
if(tid\<n)
{
gain = in_degree[neigh]*out_degree[tid] + out_degree[neighbour]*in_degree[tid]/total_weight
//here let say node 0 moves to 2
atomicExch(&node_community[0, node_community[2] // because node 0 is in node 2 now
atomic... |
I would use [tag:geopandas] to read the [KML][1] file, then make a [`Map`][2] with an initial view that is based on the [`centroid`][3] of the unified polygon(s) :
```
import fiona
import geopandas as gpd
from ipyleaflet import GeoData, Map, basemaps
fiona.drvsupport.supported_drivers["LIBKML"] = "rw"
gdf = g... |
For IP, It's seem like a public IP address.
Now you can connect via localhost.
So you need to check firewall inbound opens tcp 15432.
Then config port forwarding in your NAT.
To check this IP:port open in the Internet, you can use ping.eu |
Getting the below error while creating any sample dataframe:
>24/03/10 11:30:40 WARN TaskSetManager: Lost task 0.0 in stage 0.0 (TID 0) (Siva executor driver): org.apache.spark.SparkException: Python worker exited unexpectedly (crashed)
Attached Environment Variables:
 => {
if (isNewPayStub) {
return get(user, 'stub', '')... |
How to handle the states when disabling my component in react? |
|javascript|reactjs|react-hooks| |
|java|spring-boot|kubernetes|fabric8| |
In my Shiny application, depending on the size of the screen, some of the legend information for my ggplotly interactive plots is cropped. Is there a way to fix this?
Here's a small example:
```
library(shiny)
library(ggplot2)
library(plotly)
library(tidyverse)
df <- tibble(
year = rep(c(2015:2023), 8),... |
null |
```
x = c(1, 2, 2, 3, 3, 3, 4, 4, 5)
x.tab = table(x)
plot(x.tab, xlim = c(0, 10), xaxp=c(0, 10, 10))
```
(Unfortunately, I do not have enough reputation to post image, but received graph has only tick marks 1 to 5, instead of intended 0 to 10)
Why does R just ignoring xaxp? I understand that I could factor x... |
I have an application using the classic [clean architecture](https://jasontaylor.dev/clean-architecture-getting-started/) with all the dependencies set up as described (i.e. flowing inward). I have an external service I wish to use in my project, so defined the functionality (objects that interact with the service, som... |
In clean architecture is the Presentation layer directly allowed to communicate directly with the Infrastructure layer |
|asp.net-core|asp.net-web-api|asp.net-core-webapi|clean-architecture| |
{"Voters":[{"Id":328193,"DisplayName":"David"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[13]} |
C is a general-purpose programming language used for system programming (OS and embedded), libraries, games, and cross-platform. This tag should be used with general questions concerning the C language, as defined in the ISO 9899 standard (the latest version, 9899:2018, unless otherwise specified — also tag version-spe... |
null |
I think it can be approach like this way:
import 'package:flutter/material.dart';
DateTime setDateForDayOfWeek(DateTime date, int desiredDayOfWeek) {
int difference = desiredDayOfWeek - date.weekday;
/// Adjust the difference if it's negative
if (difference < 0) {
... |
null |
If there are things like constants or changes that can be improved, I recommend you apply for the same Flutter recommendations. Run this in your terminal and that's it.
*[Flutter fix][1]*
dart fix --apply
[1]: https://docs.flutter.dev/tools/flutter-fix
|
I wanna to get voice call function in my app(using flutter).
Here is my code and log.
```
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'MainScreen.dart';
import 'package:firebase_database/fir... |
agora.io's voice call doesn't work in flutter |
|flutter|agora.io| |
null |
if(tid\<n)
{
gain = in_degree[neigh]*out_degree[tid] + out_degree[neighbour]*in_degree[tid]/total_weight
//here let say node 0 moves to 2
atomicExch(&node_community[0, node_community[2] // because node 0 is in node 2 now
atomic... |
Try this .
instead of
Else
'Found
MsgBox "Found at: " & fVal.Address
.Range("A:A" & (fVal.Row)).Copy
Sheets("Sheet2").Activate
Sheets("Sheet2").Range("B1").PasteSpecial xlPasteValues
End If
use this lines
Else
'Found
MsgBox "Found at: " & fV... |
I have a smart contract deployed to Sepolia network. One of the method emits 3 events. Please take a look at https://sepolia.etherscan.io/tx/0x31f77360db4cd51f5db7954d143d0fb514b96d71fa409c17b3412f78c11ee6a3#eventlog as an example.
There are 3 logs and 2 of them are `Transfer` but the last one doesn't have any name ... |
Issue with ggplotly legend being cropped in R Shiny application |
|r|ggplot2|shiny|plotly|ggplotly| |
Codebase was like this in a non-async¹ method:
```csharp
Thread.Sleep(500);
```
A colleague refactored it to be like this:
```csharp
Task.Delay(500).Wait();
```
Given the relative small delay, is really an advantage to use the async version (``Task.Delay()``) ?
Does it change if the delay is a bunch ... |
My answer is not the exactly solution you want, but it solved mine.
I wanted to do the same thing you want because when I retrieved the url of a video in minio, the url with docekr service name did not work on the local browser.
I could not find a way to make it localhost, but I realized the service name was only... |
My answer is not the exactly the solution you are looking for, but it solved mine.
I wanted to do the same thing you want because when I retrieved the url of a video in minio, the url with docekr service name did not work on the local browser.
I could not find a way to make it localhost, but I realized the servic... |
My goal is to add button to the right hand side of a section header in a UITableView.
However, when I made my new target iOS15, I found that I had to adopt UIButton configuration to set the padding to the add icon in the button. The problem is that, configuration doesn't seem to have a "frame" property and passing ... |
In this project I want to create a Pixel Coloring book.
```
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding ColorMatrix}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<ItemsControl It... |
How can I solve this problem with DataBInding? |
I created a new add-in as suggested and compared with mine. I have done the following things and the problem was solved:
* copied the new generated commands html and ts file to my project.
* updated office-addin-debugging to the new major version.
I have done some other alterations but rollbacking any but thos... |
I am programming an app with .NET Maui and use Mopup Nuget package. A pop up window should be opened and from there a navigation page should be opened by a button. Unfortunately when clicking the button no navigation page appears. Only when I close the mopup window the navigation page is displayed. But if I close the... |
Open navigation page within Mopup window in .NET Maui |
|.net|xamarin|xamarin.forms|maui| |
react spring - Is there a Fade in and out simpler, less complicated solution? |
I am currently trying to reduce cumulative layout shift by using an adjusted local font as fallback. For the regular font this works quite well. But, in the above-the-fold content of the website, we also have a couple of bold formatted sentences.
Is there any clean way to also give the other font weights a fallback ... |
Delete trigger run for each deleted row when delete multi row on edit tab |
I have the following problem:
I have the URL to a picture "HTTP://WWW.ROLANDSCHWAIGER.AT/DURCHBLICK.JPG" saved in my database. I think you see the problem here: The URL is in uppercase. Now I want to display the picture in the sap gui but for that I have to convert it to lowercase.
I have the following ode from a... |
ABAP convert Database char to lowercase |
|database|character|converters|abap|sap| |
null |
I was getting the same error. I tried a lot of fixes from the internet but nothing worked but thanks to our teacher, with his help i was able to fix it. so the error i was getting said that
> my worker node has python3.10 while the driver has python3.11
that's not the exact wording of the error but you get the po... |
Why doesn't event name shown in sepolia.etherscan? |
|ethereum|blockchain|solidity|smartcontracts| |
Yes it is allowed, *modulo bugs in GCC*.
The compiler
---
GCC follows the [Itanium ABI](https://github.com/itanium-cxx-abi/cxx-abi), which is actually platform-independent, despite the name. Here is the Itanium ABI mission statement:
> we want users to be able to build relocatable objects with different compi... |
If your use case fits the description of a 'variant' or a 'mod' of the original app then you can avoid the hassle of renaming your packages, and can leave alone the `namespace` _and_ the `applicationId`, and instead define the **`applicationIdSuffix`** in your `build.gradle`, e.g.:
```bash
defaultConfig {
name... |
Set Size for UIButton with new iOS15 Configuration Approach |
|swift|uikit|uibutton|ios15| |
I encountered an error while using the TextField component.
I've checked whether the issue lies in my source code or in the MUI TextField component, but I was told that they couldn't provide assistance, so I'm posting here.
The problem occurs when the parent tag wrapping the TextField becomes hidden and then togg... |
Material UI(MUI) Textfield Prop: multiline, (rows | maxRows | minRows) |
|material-ui|textfield| |
null |
To work with an `SDDL` (Security Descriptor Definition Language) you first need to know the structure.
From [MS Learn - Security Descriptor String Format](https://learn.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format)
> The format is a null-terminated string with tokens to indicate ea... |
I am not sure you could overwrite the modules when they are loaded in. What you can do though is wrap the `nn.Module` with a function that will go through the module tree and replace `nn.Conv2d` with another layer implementation (for example here `nn.Identity`). The only trick is the fact child layers can be identified... |
{"Voters":[{"Id":157247,"DisplayName":"T.J. Crowder"},{"Id":3776927,"DisplayName":"derpirscher"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[18]} |
I started to learn WireMock. My first experience is not very positive. Here's a failing MRE:
```java
import com.github.tomakehurst.wiremock.WireMockServer;
import org.junit.jupiter.api.Test;
public class GenericTest {
@Test
void test() {
new WireMockServer(8090);
}
}
```
```xml
<dependency>
... |
Why is org.eclipse not included in the WireMock artifact? |
|java|wiremock| |
Tom wants to find the maximum value after doubling each element in an array. He defines f(i) as: the maximum value of the array after doubling the i-th element. Tom expects to find the values of f(1) to f(n), where n is the length of this array. For example, if the array sequence is 1, 3, 2, 5, 4, then the output resul... |