instruction
stringlengths
0
30k
I modify the [config.yaml][1] form the tutorials in the [hydra][2] repository as follows: defaults: - db: mysql - ui: full - schema: school test_key: ${db.user} However, the `test_key` is still `${db.user}` in the output without being replaced by the actual value `omry`. I t...
Why does the value interpolation not work when using python hydra library?
|python|yaml|fb-hydra|hydra-core|
You can achieve what you want in one statement by grouping on whether the `car` value is `Skoda` or not: ```python m = df["car"] == "Skoda" list_others, list_skoda = df['model'].groupby(m).agg(list).to_list() print(list_skoda, list_others, sep='\n') ``` Output: ``` ['Citigo', 'Fabia', 'Rapid'] ['Fiesta', 'Focu...
I am try to testing out version check and other things with Rust `std::process::command`. Other command are working fine but when I try to call `npm -v`, I got program not found error. **My Error:** ![My Error](https://i.stack.imgur.com/i3hpi.png) **My Code:** ![My Code](https://i.stack.imgur.com/JvCvH.png...
the simplest and fastest algorithm is by XORing with the (1 << 23) and then subtracting (1 << 23) from the result: ``` const int Val = 1 << 23; int transform(int value) { return (value ^ Val) - Val; } ```
You need to [create scope][1] before calling the Scoped service. ``` public static void DoSomething(WebApplication app) { using IServiceScope? scope = app.Services.CreateScope(); IConfigurateServices configService = scope.ServiceProvider.GetRequiredService<IConfigurateServices>(); } ``` [1]: https...
This issue just appeared from nowhere. It was working just fine the day before. When I try to refer to any, literally ANY, data or var of whatever, the same problem appears, even when referring to a pre-declared var that was working fine. Whether it's a new or old used var the same issue persists. I've used both VS Cod...
Unity - Visual Studio Community IDE1007 : The name '...' does not exist in the current context
|c#|visual-studio|unity-game-engine|game-development|
I am using itext5 to create pdf files with painted non-removable watermarks as follows: public class TestWatermark { public static String resourcesPath = "C:\\Users\\java\\Desktop\\TestWaterMark\\"; public static String FILE_NAME = resourcesPath + "test.pdf"; public static ...
I am building Docker images of a web app locally on my Mac and then running them via Docker Compose on a remote server that's running Ubuntu AMD64. I get an error that the platform isn't compatible, and I'm curious what's the best practice in real production environments to tackle this issue. Do I support 2 image ty...
Best practice to deal with Docker images ARM/AMD compatibility issues
|docker|docker-compose|
null
{"Voters":[{"Id":205233,"DisplayName":"Filburt"},{"Id":354577,"DisplayName":"Chris"},{"Id":12632699,"DisplayName":"SwissCodeMen"}],"SiteSpecificCloseReasonIds":[18]}
{"Voters":[{"Id":20513099,"DisplayName":"I_O "}],"DeleteType":1}
I am trying to open up a blob storage stored document on browser , bue grtting below error [enter image description here](https://i.stack.imgur.com/fMkgf.png) The blob storage code that i use is below: import DocViewer, { DocViewerRenderers } from '@cyntler/react-doc-viewer'; const byte = base64T...
React document not viewing using ReactDocViewer using blob storage link
|javascript|reactjs|frontend|web-development-server|react-doc-viewer|
`read` by default trims leading and trailing whitespace and consumes backslashes. You can disable those by setting `IFS` to empty string and invoking `read` with the `-r` flag respectively. ``` $ echo ' \" ' | { read i; echo ${#i}; } 1 $ echo ' \" ' | { IFS= read -r i; echo ${#i}; } 4 ``` Note that `wc -c` would...
This issue seems to be a common issue with Django and how it handles multi-threaded operations and their timings. Specifically in this instance the issue is arising when a new thread is started for the CERTIFICATE_ISSUED event, before the SUCCESS event has fully updated the database. There are some solutions that Djang...
null
null
null
null
null
The first constructor of a `Chroma` object is `collection_name`. You should pass the `persist_directory` variable to the `persist_directory` constructor argument. So It will look like this: ``` docsearch = Chroma(persist_directory=persist_directory, embedding_function=embeddings) ```
The command sometimes succesfully launches the batch file however, sometimes it doesn't work and it immediately closes. When I launch the batch file directly from either cmd or by double clicking the file, it always works flawlessly. I was wondering what I could do to fix this issue. #a couple of the commands ...
I'm currently trying to learn how to make Minecraft mods in Intellij and I'm fresh off a set of tutorials on youtube but when I try to run Minecraft with the content I've added there just isn't anything there. The only evidence my mod has even loaded is the name of it in the Mods section. It is as if I just ran regular...
You need to add to `package.json`: ```json "nx": {}, ``` Then, change ```json "prettier": { "inputs": ["**/*.{ts,js,cjs,json,yaml}"], "outputs": [] } ``` to ```json "prettier": { "inputs": ["{workspaceRoot}/**/*.{ts,js,cjs,json,yaml}"], "outputs": []...
I'm trying to install tink library to use it on my python scripts on my Windows system. Python version I'm using: 3.12.10 I have encountered some errors before but I have been solving them: - I needed protoc; I installed it and added it to PATH - I needed bazel; I installed it and added it to PATH - ...
Install tink library for Python on Windows
|python|bazel|tink|
null
I am trying to save a URL to a file then retrieving it: This is working: ```# Get version information #$content = Invoke-RestMethod -Uri "https://docs.microsoft.com/en-us/officeupdates/update-history-office365-proplus-by-date" -Method Get $content = Invoke-RestMethod -Uri "https://learn.microsoft.com/en-us/...
Save URL to file and interrogate it then end result is different between querying the URL or the file
|powershell|
I have a MariaDB database with a few roles. For simplicity let's assume I have a `admins` role. It was created by the `root` user with the commands below: ``` CREATE ROLE admins; GRANT ALL PRIVILEGES ON *.* TO admins WITH GRANT OPTION; ``` I also have another role `default` which does not have any privileges. I...
null
I'm iterating on a `json.loads` object that have all the info i need (original_title) When i iterate on it i got incomplete result. Where is my mistake ? How can I improve this code to have complete result? My code: ``` TMDB_TOKEN = "PUT YOURS HERE IF YOU WANNA TEST" headers = { "accept": "application/json...
Why doesn't iterating on this api output give me different data than the one in the json.dumps(json.loads)?
My ModalBottomSheet works perfectly the first time I open it, but after hiding it, it becomes unresponsive and blocks all other UI interactions. ``` Button( onClick = { showBottomSheet = true } ) { Text(text = "Done") } if (showBottomSheet) StyleBottomSheet() ``` ``` @OptIn(Experi...
|android|android-jetpack-compose|android-jetpack-compose-material3|
I am aiming to estimate the breakpoint of a linear model of how animals are performing (proportion of trials correct, $propcorrect) on a causal reasoning test as they age ($agedays). The goal is to find when does the learning stop increasing and start to plateu? However, it seems not to be registering when I try to set...
null
If anyone came here looking for how to add multiple environment variables dynamically by using a variable here's a solution I found running `az containerapp` command in bash: ```bash #!/bin/bash # I usually run some commands to parse a json into a key=value space separated string env_vars='"key1=val1" "key2=val...
Minecraft Mod not adding content
|intellij-idea|minecraft|
null
u need to add -I"C:\Program Files\mosquitto\devel" parameters to your compile command.
You can replace your current condition with ``` if (input$p_values & table_2 |> filter(new_est == max(new_est)) |> ungroup() |> select(Sig) |> (\(.) all(!is.na(.)))() ) ``` It additionally checks that for the relevant variable (your table is already filtered at this point), `Sig` is not `NA` ...
As others pointed out make sure where to store your files. After that You should add `download` attribute to your anchor tag. [link](https://www.w3schools.com/TAGS/att_a_download.asp) > The download attribute specifies that the target (the file specified in the href attribute) will be downloaded when a user click...
|c++|c|linux|system-calls|seccomp|
Being new to the IT field, I want to create an entertainment and moderation bot but I encounter several problems: >Process exited with code 1 Uncaught ReferenceError ReferenceError: client is not defined Here are my lines of code: const { Client } = require("discord.js"); const bot = new Client({ ...
1. `char c[2]` is needed hold a string with one character with the terminating `'\0'`. 1. Always use a maximum field width when reading a string with `scanf()` to avoid buffer overflow. 1. The format string `%s` requires a matching `char *` which you write as just `c`. 1. On success `scanf()` return the number...
I'm currently trying to learn how to make Minecraft mods in Intellij and I'm fresh off a set of tutorials on youtube but when I try to run Minecraft with the content I've added there just isn't anything there. The only evidence my mod has even loaded is the name of it in the Mods section. It is as if I just ran regular...
``` import { View, Text } from 'react-native' import React, { useEffect, useState } from 'react' import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import LogInviaPhone from '../Screens/LogInviaPhone'; import LogInviaEmail f...
I want to get device country name so I am using react-native localize package but it is giving united states but I am in india
|react-native|react-native-localize|
null
**server.go** package main import ( "context" mathservices "service/mathservices" "github.com/smallnest/rpcx/server" ) func main() { s := server....
Can't grant roles with GRANT OPTION privilege
|mariadb|
null
I'm trying to read numerous csv files and search for the word 'error'. Using csv.reader is causing an issue as I believe it is looking for a string. I'm not sure if changing to text would help? import glob import os # Imported os import csv import pathlib def find_cell(csv_file, check): with open(cs...
TypeError: expected str, bytes or os.PathLike object, not reader
|python|
null
The input is line-buffered. When you enter characters and hit <kbd>ENTER</kbd> the buffer contains all the characters you have entered + `'\n'`(new line). The `getchar` function takes one character from this buffer and returns it. It does not discard the rest of this buffer. Other characters entered will be availabl...
this is the dialog component that im using ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http...
My dialog component on PrimeFaces can't render a list on first click
|javascript|java|spring|primefaces|xhtml|
null
My input is this dataframe (but it could be a simple list) : ``` import pandas as pd df = pd.DataFrame({'description': ['ij edf m-nop ij abc', 'abc ij mnop yz', 'yz yz mnop aa abc', 'i j y y abc xxx mnop y z', 'yz mnop ij kl abc uvwxyz', 'aaabc ijij uuu yz mnop']}) ``` I also have a list of keywords (between 3...
e.g connecting go microservice made with rpcx with nestJs(popular node framework)
|go|nestjs|microservices|rpc|
In C#, you can't put statments (that are not variable decelerations) in the class scope, so you can only access class members inside methods.
{"Voters":[{"Id":272109,"DisplayName":"David Makogon"},{"Id":16217248,"DisplayName":"CPlus"},{"Id":12632699,"DisplayName":"SwissCodeMen"}],"SiteSpecificCloseReasonIds":[11]}
I am building Docker images of a web app locally on my Mac and then running them via Docker Compose on a remote server that's running Ubuntu AMD64. I get an error that the platform isn't compatible, and I'm curious what's the best practice in real production environments to tackle this issue. Do I support 2 image ty...
The **problem** is that currently the overloaded `operator+=(const float&)` that you've provided takes the right hand operand which is a `float` instead of `Vector2`. Now, the expression `scaledDir * mass` is of type `Vector2` which means that you're trying to use `operator+=` with right hand operand of type `Vecto...
I wanted to create a Grafana dashboard and an alarm on top of that for calculating Average Active concurrent connections per GPU/Node with a specific threshold value for the alarm. There is a Load Balancer in place which distributes the traffic on the nodes(which are dynamic) because of autoscaling. I was looking for t...
null
Instead of a for loop you could achieve your desired result using `dplyr::across` like so: ``` r library(dplyr, warn = FALSE) df <- data.frame( year = c(1977:1981), set852 = c(1, 1, 0, 0, 0), set857 = c(0, 0, 1, 1, 0), set874 = c(0, 0, 0, 1, 1) ) myfun <- function(.x, year) { case_when( ....
ModuleNotFoundError Traceback (most recent call last) Cell In[2], line 16 14 import pandas as pd 15 from datetime import datetime ---> 16 from coastsat import SDS_download, SDS_preprocess, SDS_shoreline, SDS_tools, SDS_transects ModuleNotFoundError: No ...
The issue is that `npm` isn't just `npm`, there's actually multiple (scripts): - `npm` - `npm.cmd` - `npm.ps1` When you execute `npm` in your terminal, then your terminal is smart and automatically picks the one it recognizes. In the same way that if you (on Windows) execute `foo` it will automatically run `...
I'm exporting multiple sheets to PDF with the following code: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> ThisWorkbook.Sheets(Array("3rd party", "Dashboard", "BS_3rd")).Select ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, fileName:=PDF_F...
Excel VBA error 1004 on PDF export - not a path issue
|excel|vba|google-sheets|pdf|runtime-error|
- Mitmproxy: 10.2.4 - Python: 3.10.12 ```python from mitmproxy import http, flow def request(flow: flow): headers = [ (b'set-cookie', b'name1=value1'), (b'set-cookie', b'name2=value2'), (b'content-type', b'text/html'), ] flow.re...
By uninstalling and then reinstalling media pipe worked in my case. I have created a virtual environment for installing media pipe and by activating, it worked.
How to make a regex orderless when validating a list of texts?
|python|pandas|
For my custom compiled native x64 JIT-code, I have certain instrinsic functions. A lot of them are just called from my code, thus I will generate with my own compiler. Some of them however are directly called from c++-code, and thus I want to have them be compiled inside a static-lib, so that they can at least be linke...
null
|php|magento|filter|collections|
null
Like any kind of `Stream` (e.g. `Promise`s), when you see nesting in `Observable`s you might want to take a step back to see if it's really warranted. Let's examine your solution bit by bit. Our starting point is: this.router.paramMap.pipe(takeUntil(this.ngUnsubscribe)) Then you subscribe, but within th...
[enter image description here][1] [1]: https://i.stack.imgur.com/P7Fm3.png How I can produce the labels show in the attached image, X are the labels desire to remove. I want to show "Elevation, NDVI and Rivers " on the x axis but only "Elevation is appearing, while I want to show single label for "Ibex, Snow ...
Facet wrap labels