instruction stringlengths 0 30k ⌀ |
|---|
I've often needed this, and I tried several solutions, including [hhighlighter](https://github.com/paoloantinori/hhighlighter), which is mentioned in another answer here. But none of the solutions I tried worked reliably when using multiple patterns, overlapping matches, or in other corner cases like [single](https://g... |
Why do I see `Dependency is not of a valid type` when I try to use this flake.nix |
Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "#authentication.principal.username + '님'" (template: "test/fragments/nav" - line 10, col 57)
<!-- <a th:if="${#authentication.principal == null}" th:text="'게스트'"></a>-->
<!-- <a th:if="${#authentication.isAut... |
I had the same issue today -- every file was affected, even on new test projects with Vite and CreateReactApp. Have no idea what happened. Anyway, if you search for stylelint in VS code settings and deselect 'enable', it worked for me.[enter image description here][1]
[1]: https://i.stack.imgur.com/wQJXk.png |
C expects an optional identifier (variable name). You have two options:
1. Specify an identifier:
```
struct student
{
int num;
char name[20];
float mark;
} s;
```
2. Leave out the identifier and define the variable separately:
```
struct student
{
... |
It was a misconfiguration of the specs for Google Ads / Google Tag Manager. That U/X is a mess. |
I ran the ff
`$: cat 7-dump.sql | mysql -uroot -p`
To check if all tables are created, I ran
```echo "quit" | HBNB_MYSQL_USER=hbnb_dev HBNB_MYSQL_PWD=hbnb_dev_pwd HBNB_MYSQL_HOST=localhost HBNB_MYSQL_DB=hbnb_dev_db HBNB_TYPE_STORAGE=db ./console.py```
Summary of Error
```
...
sqlalchemy.exc.OperationalErro... |
{"Voters":[{"Id":269970,"DisplayName":"esqew"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":6243352,"DisplayName":"ggorlen"}]} |
i was trying to install cloudstack and while installing cloudstack management mysql server this error was showed up`
```
apt-get install cloudstack-management mysql-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
mysql-server is already the newest version (8... |
|google-app-engine|java-21|jetty-12| |
null |
All I want to do is get a simple `.exe` that does nothing without any external libraries. I have the simplest nasm program in the world:
global main
section .text
main:
nop
I compile it like this:
nasm -f coff -o program.o program.asm
Then, when I try to link it with `LINK.EXE`, it ... |
SO I am trying to do a swap **exacttokenforToken** for Uniswap router2 but it is getting revert without any specific reason
here is the code , forget about naming convention as this was one of code for Pancakeswap and the abis etc are correct for uniswap in there
```
const { ethers, utils,BigNumber } = re... |
Function call Reverts from Smart Contract without a reason unniswap V3 |
|bots|ethers.js|uniswap| |
null |
Consider I have the following asynchronous task runner. It puts tasks in a queue and executes them one by one, calling lambdas on completion. If func yields result of some type, then onComplete callback should receive argument of the same type.
```cpp
class TaskRunner
{
public:
TaskRunner() :
mPool(ne... |
class A {
public:
A(someType someData, A* derived) {
derived->init(someData);
}
virtual void init(someType) = 0;
};
class B : public A {
public:
B(someType someData)
: A(someData, this) {}
};
My understanding is that `B`... |
null |
|sql|mysql| |
I am using Azure services in my application (AppService, AppInsight)
Also, I've implemented my project int **.net Core6**
I am using `Microsoft.ApplicationInsights.AspNetCore` library (version `2.22.0`)
My Application Insight configuration in appsetting.json is like this
"ApplicationInsights": {
... |
I'm trying to implement a slider with a tooltip showing current value. The idea is to make something like a HTML + JS **<input class=range>** with a value bubble (https://css-tricks.com/value-bubbles-for-range-inputs/). Both ideas I've come with so far are not ideal.
XAML
```
<Slider
x:Name="slider1"
... |
I'm trying to implement a slider with a tooltip showing current value. The idea is to make something like a HTML + JS **<input class=range>** with a value bubble (https://css-tricks.com/value-bubbles-for-range-inputs/). Both ideas I've come with so far are not ideal.
XAML
```
<Slider
x:Name="slider1"
... |
It’s not so much the event listeners, but how you declare each and every identifier throughout.
So if you’re seriously concerned about the *Garbage Collector* doing its job (and you should be), you might want to refrain from declaring everything as constants, unnecessarily!
Examples of **GOOD** constant declara... |
```
package abc;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class pqr {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.get("https://demoapp.skillrary.com/");
}
}
```
This is error
```
Exception i... |
Error: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure |
null |
I notice when i add this part to the font-awesome/5.15.4/ library doesn't load.
```
integrity="sha512-Vw3RTv7vrqtzj7Umk17DszsotZa6PXj5dnTEszUbnvmVq7Jpj27GPvmXzQkMV6mPvhj1g+YY4fb7DrlLBwTVlw==" crossorigin="anonymous" referrerpolicy="no-referrer"
```
But when i do something like this instead all the icons seem to loa... |
I am trying to plot a scatterplot for the data frame(posted below). I want to represent the scatterplot with the different stages being shown as different markers(circle,square etc) and different products being shown as different colors(red,blue etc). so far i have done that but i have a hard time showing a legend that... |
I have collected and stored a huge dataset on the sales of motorcycle parts' shops in different cities. Since GridDB is known for its high-speed query results, it is a strong candidate for data storage.
I wanted to create a partitioned collection of data based on its cities to pinpoint those locations in order to m... |
GridDB Unable to Perform Search on Partitioned Collection |
|griddb| |
null |
I'm seaching a way to customize the Origin Name (TargetOriginId) of CloudFront Distributions in AWS CDK. This is my existing code:
```typescript
const backendCloudfront = new cloudfront.CloudFrontWebDistribution(this, 'BackendCF', {
originConfigs: [
{
s3OriginSource: {
s3BucketSource: s3Buck... |
null |
I integrated pytest into my pipeline, and when the pipeline runs and a test fails, a notification is sent to my Element room via Matrix Notify.
I receive the message in the app (Desktop, Web, App), but my iOS (iPhone) does not push a notification.
I would like to mention that I have received notifications from ro... |
I do not receive iOS push notifications from Element Matrix Notify |
|matrix|notifications|element|send| |
Not a solution but I found the reason for this not working. Its supposed to come into effect only in ios. For androids, its always 'overFullScreen' irrespective of what values we provide. Not sure why such hard coding.
This is in the source code:
<!-- begin snippet: js hide: false console: true babel: false -->
... |
My question is similar to https://stackoverflow.com/questions/75783581/define-typescript-interface-with-using-constant-names-as-keys but is a little bit different.
I start off with the same type of object whose keys are constants
```js
const KEYS = {
KEY1: 'hello',
KEY2: 'world'
} as const;
```
But inst... |
The spider cluster module is a custom module that is not a built in part of Azure Maps. You can find this module here: https://github.com/Azure-Samples/azure-maps-spider-clusters
You will need to host and load the `azure-maps-spider-clusters.min.js` file that's in the `dist` folder. If you are using TypeScript, ther... |
I'm working on a React application and have run into an unusual issue with handling keyboard events. Specifically, when typing into an <input> element that is a child component, the onKeyUp event handler logs the e.key value as lowercase for the first character when the input is blank. After the first character, it log... |
React onKeyUp Event Logs Lowercase e.key for First Character in Component's Input |
|reactjs| |
{"Voters":[{"Id":6461462,"DisplayName":"M--"},{"Id":5468463,"DisplayName":"Vega"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"}]} |
This is my comprehensive solution that will run in node without anything from npm. It uses promises and has an option for disabling the echo back when typing. This works in node 20.11.1 and doesn't use the deprecated/removed things other answers have and has no race condition. When it is silent no replacement symbols a... |
this is deceptively tricky but i used `dplyr` to solve this. first filter for patients who had `disease` 1 and 2 and then filter for those who had `disease` 1 first then `disease` 2
```r
library(dplyr)
ID <- c(1,1,2,2,2,3,3,3,4,4,4,4,5,5)
Visit <- c(1,2,1,2,3,1,2,3,1,2,3,4,1,2)
Disease <- c(2,2,1,2,1,1,1,1,1,1... |
A `dplyr` solution:
```
library(dplyr)
df |>
filter(Disease == 1 & lead(Disease) == 2, .by = ID) |>
pull(ID)
```
Result:
```
[1] 2 4
``` |
{"Voters":[{"Id":13302,"DisplayName":"marc_s"},{"Id":71141,"DisplayName":"Etienne de Martel"},{"Id":238704,"DisplayName":"President James K. Polk"}],"SiteSpecificCloseReasonIds":[19]} |
I had the same issue and traced it to a bug in amplify related to a aws-sdk v2 => v3 breaking change. The open issue is here:
https://github.com/aws-amplify/amplify-js/issues/13192
The basic problem is that in
core/src/clients/middleware/retry/defaultRetryDecider.ts#L19
const errorCode = parsedError?.code... |
Usually using a variable is an additional overhead, but in your case Chrome was able to provide the same performance. But if a variable is reused, that could actually boost performance. So the rule could be - don't create unnecessary variables.
If you create a variable it could be considered a write operation, but w... |
The solution is to use css for the component:
```
button div {
display: block;
width:100%
}
button div a {
display: block;
width:100%
}
``` |
In typescript I have the following `type`:
type Base = {
mandatoryProperty: number
}
Then I would like to create a `Full type` starting from `Base` that EITHER has a `property1: number` or `property2: number`, such as:
type Full = {
mandatoryProperty: number
property1: number
... |
intelliJ Error when build the Project - Cause: java.lang.StackOverflowError |
|java|spring|stack-overflow| |
`from sqlalchemy import create_engine, text
db_connection_str = "mysql+pymysql://user:pass@some_mariadb/dbname?charset=utf8mb4"
#Don't worry while running the code , I had replaced all the values in the db_connection_str with my values
engine = create_engine(
db_connection_str,
connect_args={
... |
I am trying to connect my Aiven database to python using the SQLalchemy module |
|python|mysql|database|sqlalchemy|aiven| |
null |
I'm new to Linux command. I'm currently writing a logic in **test.sh** to only keep the **Example.log** for the last 14 days.
**Example.log**
```
[2024-03-25 05:36:42]: ERROR No such file or directory
[2024-03-24 05:36:42]: ERROR No such file or directory
[2024-03-23 05:36:42]: ERROR No such file or directory
[... |
Keep the log for the last 14 days |
|linux|shell| |
I had the same problem on React JS and I found the simplest way to implement the @IvanSanchez solution.
You just need to make React execute the `<div id="leafletmap">` first, before executing javascript.
To do this, you just need to add the javascript code inside the useEffect hook, because useEffect is asynchron... |
I don’t have sudo access and contacting sys-admin takes a non trivial amount of time.
I’ve access to two remote clusters.
Cluster 1 :
nvcc -V returns
```
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools... |
CUDA driver initialization failed, you might not have a CUDA gpu |
|python|pytorch|cuda| |
null |
|typescript| |
You can try the using `tqdm.write()` instead of `print()`, but I suggest instead of adapting your code to fit the library, use a library specifically designed for your use case. The library for this is [Enlighten][1]
You'd replace the above code with (contents of the for loop are unchanged):
```python
import en... |
The only way I figured out was the solution to paste the model to the constructor of the action class:
public function actions(NovaRequest $request)
{
return [
(new Actions\MyAction($this))->onlyOnTableRow()
];
}
If this is really the best solution? Is there really no ... |
Sorry for the late answer but at least in Android, location with `FusedLocationProviderClient `, works a lot better than `geolocator` in real use cases, sometimes `geolocator` takes too much time to get the position, and we have tried with medium, high accuracy, with multiple attempts every 5 seconds. `FusedLocationPro... |
1. Initially Formate `dict` into `str` by adding triple quotes before and after.
2. Formate further by removing curly braces, double quotes etc. This you can do programmatically
txt = '''{"A": "Red",
"A": "Blue",
"A": "Green",
"B": "Yellow",
"C": "Black"
... |
In JavaScript, the value of this inside a function depends on how the function is called. The behavior you're observing with your hello function in strict mode illustrates some fundamental concepts of JavaScript's execution context and the this binding.
When you call hello() directly, you're invoking the function in... |
null |
I want to implement TsParticles in my webisite but it doesn't work.It only show me a black background
This is my package.json :
```json
{
"name": "portfolio",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build... |
Implement TsParticles in an Astro 4.5.10 website |
|astrojs|tsparticles| |
null |
select t1.id, t1.base_id, t2.cv
from t1, t2
where t1.id = t2.id
and t1.ins_dt >= t2.ins_dt
order by t1.ins_dt, t2.cv; |
The task is «creating a password input field with the option to show or hide the password». There are no security requirements, so working with the password can be done in a string type.
At the moment, this can be solved quite simply by using a font with a single mask character in the TextBox. When triggered by a re... |
Masking input in TextBox |
|wpf| |
I'm trying to write a simple Go program that will listen for global windows hotkeys while in the background and send API calls when specific ones have been pressed. This is my first time learning how to work with Windows messages so this is probably just me not understanding how they work.
My calls to PeekMessageW o... |
I keep getting the following errors in my program:
> 'System.Windows.Forms.TextBox.Text' is a 'property' but used like a 'method'
and
> Non-invocable member 'System.Windows.Forms.Control.Text' cannot be used like a method.
Here is the code:
if (OffenceBox.Text != "")
{
AddBook(int.Parse... |
{"OriginalQuestionIds":[19213633],"Voters":[{"Id":5389997,"DisplayName":"Shadow","BindingReason":{"GoldTagBadge":"mysql"}}]} |
{"OriginalQuestionIds":[5738901],"Voters":[{"Id":235698,"DisplayName":"Mark Tolonen"},{"Id":5014455,"DisplayName":"juanpa.arrivillaga","BindingReason":{"GoldTagBadge":"python"}}]} |
|javascript|php|dropzone.js| |
If you followed the documentation you linked [here][1] then first make sure you've activated your virtual environment as described in that doc.
aiplatform hast to be pip-installed.
You should be able to install ai platform with the following ([source][2]):
```pip install "google-cloud-aiplatform>=1.38"``` or if y... |
I solved the problem with changing the velocity of ball to {0,0}.
I created a function that resets the ball and called it when isGameOver is equal to true:
void Ball::resetBall()
{
ball_position = { 300, 750 }; // Reset ball position
ball_velocity = { 0, 0 }; // Reset ball velocity
... |
``` r
library(sf); library(sp)
library(dplyr)
library(ggplot2); library(ggrepel)
download.file("https://biogeo.ucdavis.edu/data/diva/adm/LSO_adm.zip",
"LSO_adm.zip")
unzip("LSO_adm.zip", exdir= "LSO_adm")
mapdata_x <- st_read(dsn="LSO_adm\\LSO_adm1.shp", quiet = TRUE)
all_districts <- data.fra... |
I guess your best bet is to add the svg icon as a background image.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
p {
width: 140px;
resize: both;
overflow: auto;
outline: 1px solid;
}
a {
background: url("data:im... |
I am trying to practice web scraping and have made a script that will go on to my personal Coursera site (I didn't see anything against this in their "robots.txt" file so figured it was ok since it is my own information). The main downside is that I still have to solve the CAPTCHAs when they pop up, but otherwise, it w... |
Scraping with Selenium and Python where pagination is involved |
|python|python-3.x|selenium-webdriver|web-scraping| |
null |
Commits cannot be rewritten. You can only make new commits and replace the old. See [my answer to What is a Git commit ID?](https://stackoverflow.com/questions/29106996/what-is-a-git-commit-id) to understand why.
If you have this...
```
A - B - C [HEAD][tag]
```
After you commit amend, you have this.
```
... |
You are updating the "selected category" in your SegmentedButton as I read from the code you copied.
Replace your SegmentedButton code with as:
SegmentedButton(
showSelectedIcon: true,
onSelectionChanged: (Set<String> newSelection) {
setState(() {
selectedCategory = newSelection.isNotE... |
```
sample_data = {
'Class': ['TEST', 'NOT TEST', 'TEST 123', 'SOMETHING ELSE', 'TEST'],
'Values': ['1.3 / 4.5', '1.5', '0.7 / 5.2', '123', '1.5 / 4.0']
}
df = pd.DataFrame(sample_data)
mask = df['Class'].str.startswith('TEST')
# I WANT TO DO SOMETHING LIKE THIS -->
df.loc[mask, ['COL1', 'COL2']] = df... |
i was installing cloudstack and ended up in this error can anyone help me? |
|cloud| |