instruction stringlengths 0 30k ⌀ |
|---|
I'm trying to obtain information about land use for vineyards using R by selecting the vineyard category from the TIFF downloaded from CORINE Land Cover.
```
corine <- rast(paste(dir$land, "U2018_CLC2018_V2020_20u1.tif", sep = "/"))
unique_values <- unique(corine)
print(unique_values) #15 vineyards
vineyard <- ... |
I want to delay the Animation of the Elements, as they "flicker" when they intersect into Viewport but are only a bit visible. So i want to delay the Animation/Visibility of that Element untol its fully intersected. i tried already the treshold option but for some reason its not changing anything.
I tried follo... |
Sorting an ArrayList by elements from a Constructor Class -Java |
|java|arraylist|constructor| |
null |
I want to Sign In with Google for Web, and I use HTML api with data-login_uri, here the code:
```html
<div id="g_id_onload"
data-client_id="xxx.apps.googleusercontent.com"
data-context="signin"
data-ux_mode="redirect"
data-login_uri="http://localhost:8080/google/callback"
data-itp_supp... |
I am running a Valhalla map matching program using its meili functionality. I learned that it needs at least set of 2 coordinates to work. It does not work with a single coordinate (lat, long).
I am planning to read the coordinates from kafka and it streams one record at a time. and map-matching does not seem to be wo... |
|apache-kafka|coordinates|map-matching| |
null |
I would like to perform some unit testing in `Node.js (Express)` using `Vitest`. I'm wondering if there might be a conflict between the two, as I have installed both `tsconfig-path` and `vite-tsconfig-path`.
All my files with import paths like `@/controller/auth.controller.ts` work fine, and the server runs smoothly... |
See in your code when u take an input, you automatically have to press enter and that way, you will be shifted to the next line on a console.
So to prevent that I would recommend you take input first and then print the line after all the processing.
for ex: System.out.print("Factorial of " + "" + input + ": " + to... |
Currently, I am trying to install Elasticsearch and Kibana in OpenShift. So far, I have been successful without any security, but with the latest version, it is now required to set up security. I have begun this process, but I am encountering an error.
I have Elasticsearch based on a Red Hat image with 3 nodes in a St... |
Ok, after hours of investigation it turned that the solution is quite simple: I added only "Incoming Connections (Server)" capability for the App Sandbox, needed to also checkmark for Outgoing Connections:
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/xAZid.png |
I have an application where users will login using AddMsalAuthentication for Entra(Azure AD) this works fine. Within the application on certain pages users are to authenticate against our helpdesk using oidc, getting an auth token so API calls can be made.
I got this working by implementing my own AuthorizeView, Aut... |
Should you implement a custom RemoteAuthenticatorView Blazor WASM |
|asp.net-core|blazor|blazor-webassembly|azure-ad-msal| |
null |
Try using derived column as json(Inputcolumn) will help.
Json() function will convert the string into json output.
Also you can use replace('\\\\\\','') it will works and generate output like this
["{"A":12345,"B":"2023-12-31 00:00:00","C":5510,"D":20231231,"E":20240103,"F":20231231,"G":1577158,"H":632... |
Display metadata array from WordPress DB query into a table with 4 columns |
I have this info in an excel spreadsheet ..
representing the amount of time spent logged in to a computer.
logins time of day amount of time logged in (h:mm)
------ ----------- -------------------------------
login 03:21
logout 05:03 1:42
login 05:47
logout ... |
there is WVDConnections table in Log Analytics with such data:
| DateTime | User | Session status |
| -------- | ----- | -------------- |
| 09:20:39 | user3 | Completed |
| 09:05:41 | user3 | Connected |
| 09:05:07 | user3 | Started |
| 06:51:58 | user1 | Completed |
| 06:46:22 | user2... |
|r| |
I have a custom collection `IList<user>`as users. When I tried to check whether `users` is null or empty, I did not get any intelligence help(like `IsNullOrEmpty`) so I wrote the below extension method
public static bool IsNullOrEmpty<T>(this IEnumerable<T> source)
{
if (source.IsNullOrEmpty())... |
|c#|list|extension-methods|ienumerable|isnullorempty| |
What about this?
``` r
# specifically needed libraries from tidyverse
library(dplyr)
library(purrr)
fit %>%
mutate(map_dfr(arima, c("fit", "spec")))
#> # A mable: 8 x 10
#> # Key: State [8]
#> State arima p d q P D Q constant period
#> <c... |
$ awk -F'^.|-| ' -v date=$(date +%Y%m%d) '$2$3$4 >= date-14' logfile
[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
[2024-03-21 05:36:42]: ERROR No such file or directory
[2... |
Adding `labelText` or `label` to the `InputDecoration` should achieve what you're asking, but you will need to use `DropdownButtonFormField2`
```
DropdownButtonFormField2(
decoration: InputDecoration(
labelText: 'Floating label'
),
...
``` |
[2024-03-29 10:43:48,081] INFO - DependencyTracker API : testie:v1.2 was added to the Synapse configuration successfully
2024-03-29T10:43:48.081862823Z [2024-03-29 10:43:48,081] INFO - API {api:testie:v1.2} Initializing API: testie:v1.2
2024-03-29T10:45:59.721494908Z [2024-03-29 10:45:59,720] INFO - LogMediator {i... |
Following PATTERN 3 Deployment ,Not able to consume apis in Gateway |
|wso2|wso2-api-manager| |
Try using the loop index as key:
```svelte
{#each numbers as number, index (index)}
<h1 class="score-text">{number}</h1>
{/each}
``` |
I am using Laravel 10.47 and PostgreSql 14.2.
I an using the following piece of code in the migrations that creates the timestamps fields:
$table->timestamp('email_verified_at')->nullable()->useCurrentOnUpdate();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullabl... |
Looking back, the older answer is unpractical and not recommended. `async: false` pauses the entire Javascript to simply upload a file, *you are likely firing other functions during the upload*.
If you are using JQuery solely for the use of `ajax`, then I recommend using `axios`:
const axios = require('axios'... |
{"Voters":[{"Id":7758804,"DisplayName":"Trenton McKinney"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[16]} |
ImageIO.getImageReadersByFormatName("jpg"); throws UnsatisfiedLinkError |
In a desktop application (written in Electron), I'm trying to implement a feature that will allow the user to open the application in full screen or return it to the reverse state (initially the application does not open in full screen).
I already have working functionality.
What I've done:
main.ts
ipcM... |
vitest tsconfig path failed to load url in node js (express) |
|node.js|express|vitest|tsconfig-paths|vite-tsconfig-paths| |
`
index.php
$application->bootstrap();
$application->run();
`
`
Test.php
<?php
class TestController extends Yaf_Controller_Abstract
{
public function indexAction($name = "Stranger") {
$test = time();
}
}
`
In $test = time(); There is no effect at the direct breakpoint, yo... |
xdebug3 has no effect on yaf framework breakpoints |
|xdebug|yaf| |
null |
The trick is to put the code into an immediately-invoked lambda. Then it doesn't matter if you use `std::generate` or a plain loop:
```
constexpr std::array<int,100> a = []{
std::array<int,100> ret{};
std::generate(ret.begin(), ret.end(), [n=0]() mutable {return n += 3;});
return ret;
}();
```
``... |
Why does the file open twice, one not editable? |
It seems the task ID can be found on the URI path of some of the environment variables available inside the container like the `ECS_CONTAINER_METADATA_URI_V4` itself.
Using ECS Exec I've run the `env` command (lists environment variables) on my task container. I'm using Fargate:
```shell
aws ecs execute-command ... |
Your understanding of the `ShutdownOnSuccess` is nearly correct, but over `ShutdownOnFailure` is not completely true.
> what I understand is in ShutdownOnSuccess case if one task get
> completed rest will be interrupted and in ShutdownOnFailure all task
> needs to be completed , then shutdown call is made.
Java... |
|android|mobile-development|android-package-managers|waze| |
Twilio Support Engineer here. In order for your WebSocket server to recieve both the inbound audio track as well as the outbound audio track (the child call), you need to specify the track attribute of the <Stream> noun. For example:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Start>
... |
|python|django|django-rest-framework|django-views|http-method| |
{"Voters":[{"Id":157247,"DisplayName":"T.J. Crowder"},{"Id":197758,"DisplayName":"toolic"},{"Id":1394729,"DisplayName":"tink"}],"SiteSpecificCloseReasonIds":[11]} |
You need to break down your code a little to make the "Translate" a function which just translates the text passed to it.
Example:
```lang-vb
Option Explicit
Const FROM_LANG As String = "es"
Const TO_LANG As String = "en"
Sub Tester()
TranslateTextShape ActiveSheet.Shapes(1)
TranslateR... |
Change the maximum screen size icon (and variable) by dragging the TitleBar |
|reactjs|electron|resize| |
I've come across a C++ issue where instantiating some objects in programs compiled by Clang segfaults. Thanks in advance to anyone who can help shed light on the issue.
Debugging suggests that Clang is generating SSE `movaps` instructions to initialize some char arrays and it's these instructions that appear to caus... |
{"Voters":[{"Id":7758804,"DisplayName":"Trenton McKinney"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]} |
{"Voters":[{"Id":7758804,"DisplayName":"Trenton McKinney"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]} |
{"Voters":[{"Id":17580381,"DisplayName":"SIGHUP"},{"Id":207421,"DisplayName":"user207421"},{"Id":550094,"DisplayName":"Thierry Lathuille"}],"SiteSpecificCloseReasonIds":[16]} |
{"Voters":[{"Id":4390160,"DisplayName":"Grismar"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[11]} |
Create a sublist from a list by comparing its elements in paire wise and choosing the minimum of the two in the new list (sublist).
Example : we have a list [1, 2, 3, 4, 5, 6] the output should be a sublist such as [1, 3, 5] since min(1,2) = 1 and min(3,4)=3 and min(5,6)=5.
```
void pairWiseMinimumInNewList_... |
{"Voters":[{"Id":3929826,"DisplayName":"Klaus D."},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[13]} |
I have a problem with script when trying to run flow in power automate. It was working in last week but now for some reason is not working and returning this error :
{
"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-westus2-01.azure-apim.net",
"clientRequestId": "80fc1... |
I am facing an issue with implementing firebase messaging together with overriden function 'didRecieveRemoteNotification' in AppDelegate.
In my Flutter project, i have set up firebase and firebaseMessaging. I also set up FirebaseMessaging.onBackgroundMessage() to handle some actions when push notification is recieve... |
Firebase Messaging .onBeckgroundMessage with overriden didRecieveRemoteNotification in AppDelegate in Flutter app |
|ios|swift|flutter|firebase|firebase-cloud-messaging| |
I have this info in an excel spreadsheet ..
representing the amount of time spent logged in to a computer.
logins time of day amount of time logged in (h:mm)
------ ----------- -------------------------------
login 03:21
logout 05:03 1:42
login 05:47
logout ... |
I'm trying to count rows by 3 columns (county,year and month),
data is very simple
|year |month |date |county |
|------:|-------:| --------:|--------:|
|2024 |2 |20240204 |Taoyuan |
|2024 |2 |20240224 |Chiayi |
|2024 |1 |20240118 |Kaoshung |
|2024 |2 |20240213 |Xinchu |
|202... |
In my case I had "nodeUris": "http://localhost:9200" in appsettings.Development.json. This worked fine when running the app from Visual Studio but it didn't connect to Elasticsearch when both containers were running on Docker.
The solution was to override the environment variable like this:
myapi:
envi... |
I am trying to use Tesseract4Android for my android application.
From: https://github.com/adaptech-cz/Tesseract4Android
I have met a problem, when I tseted it with kotlin.
Failed to resolve: cz.adaptech.tesseract4android:tesseract4android:4.7.0
Here is my settings.
settings.gradle.kts
`
...
... |
To use Tesseract4Android, how to update build.gradle.kts instead of build.gradle? |
|android|kotlin|gradle-kotlin-dsl| |
null |
I am building a memory game and want to loop through all images one by one in javascript.
The idea is to put it in the ImageUrl variable i have made connected to the newCard variable.
I've tried to research it but can't find any answers.
This is what i have for code:
<!-- begin snippet: js hide: false console... |
null |
Is it possible to avoid the overlap of the ticks automatically using ticker? When I run the following code, you can see that there are too many ticks and they are illegible because they overlap.
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter, EngFormatter
import numpy as np... |
|python|matplotlib| |
A safe `eval` can be a good solution:
#!/bin/bash
if [[ $# -gt 0 ]]; then
temp=(egrep -e "\"\$1\"" '*')
for (( i = 2; i <= $#; ++i )); do
temp+=('|' egrep -e "\"\$$i\"")
done
eval "${temp[@]}"
fi
To run it:
bash script.sh A B C
|
I have 2 touchscreens with same name and same vendor:product id we using lsusb command and xinput id changes after reboot. I needs to invert the touch for one of the touchscreen, and this is my output of xinput list-props, how to identify the touchscreen and apply transformation to it on startup?
```none
Device 'ILIT... |
Two touchscreen same product and vendor ids, needs to invert one |
I'm using a sharded set where my table is described like this
This is my \_all_all table:
```sql
ENGINE = Distributed('level2_cluster', 'ncompass_datas', 'data_animals_0_60_all', rand())
```
This is my \_all table:
```sql
ENGINE = Distributed('level3_cluster', 'ncompass_datas', 'data_animals_0_60', rand())... |
The problem is that our Jest runs in jsdom and is quite old, but ultimately anytime I write a function like the below, Jest can't handle it when I try to use it in a component. The loading state stays as true. When I wrap it in `console.logs` I see the table state is never updated, loading stays true.
It's like I ha... |
How to use React-Testing-Library (RTL) to unit test a component with internal hook that uses ajax and state? |
|javascript|reactjs|react-hooks|jestjs|react-testing-library| |
I have a wpf combo box that is bound to an `IEnumerable` collection in my view model. When the combobox is first bound, null is selected. When selecting any other value in the combobox, the null disappears. Is there a way to have the null value remain without altering the collection?
<ComboBox ItemsSource="{Bin... |
WPF combobox binding null value |
I created this test in `loginTest`, it's almost the same as `code_is_required` in another test (`createdUserTest`).
They use the same assertion that I created for myself (`assertJsonApiValidationErrors`):
/**
@test
*/
public function email_is_required()
{
$this->withoutExcepti... |
null |
I would like the saving to Postgres and Redis to be executed within a transaction, meaning if either of the saves encounters an error, the other save should be rolled back. How can this be achieved? I would like the saveLocationToDbAndRedis() method to occur within a single transaction.
private final ReactiveR... |
|php|mysql|mysqli| |
null |
**The Problem -** My `npx` scaffolding script works fine on linux but doesn't work on windows. However I see a lot packages which runs fine on windows but I couldn't find out what they are doing differently. I asked AI tools (Chatgpt/Gemini) they couldn't provide a solution.
**What happens on linux?** - Script is no... |
i want all images selected one by one with a click on image from html, how do i loop over them in javascript? |
|javascript|html| |
Try to wrap with your `GridView.builder` in a `Expanded` Widget.
if you have a Column with multiple children and you want one of them to expand to fill the remaining vertical space, you would wrap that child widget with an Expanded widget. This allows the child widget to expand vertically to fill the available space ... |
Does anyone know about this bug or how to solve it?
I found this issue on Xiaomi 12 lite 5g with Android 13.
I'm using the following code which works on other devices:
mAudioManager.adjustStreamVolume(
AudioManager.STREAM_MUSIC,
AudioManager.ADJUST_LOWE... |
Increment or Decrement volume programmatically on Xiaomi device adjusts it by 10 steps instead of one step |
|android|debugging|xiaomi| |
I'm trying to convert and R tibble in a Shiny app to a JSON. I can use `jsonlite::toJSON()` to do this, but unfortunately the recipient requires the output in a different order. I've tried converting the input from long to wide, but this comes out all wrong.
The Python code to create the JSON uses
```python
df.t... |
R equivalent of Python df.to_dict(orient="list") |
I'm trying to set up a basic continuous callback on a Julia ODE solver. I'm trying to model a ball bouncing and I've been following the example given in the documentation about events and callback functions for the Julia package DifferentialEquations.jl [here](https://docs.sciml.ai/DiffEqDocs/stable/features/callback_f... |
Place mysqldump.exe file where your 'backup.bat' file exists.
In the 'backup.bat' file write dump command and then run 'backup.bat' file. |