instruction stringlengths 0 30k ⌀ |
|---|
|azure|load-testing|openai-api|azure-openai|azure-load-testing| |
{"Voters":[{"Id":5698672,"DisplayName":"Sardar Usama"},{"Id":1377097,"DisplayName":"beaker"},{"Id":2586922,"DisplayName":"Luis Mendo"}]} |
React useEffect dependency |
|javascript|reactjs| |
null |
I'm new to HPX and trying to build it on Ubuntu 22.04. However after compiling all the examples terminate with:
```
terminate called after throwing an instance of 'hpx::detail::exception_with_info<hpx::exception>'
what(): failed to insert update_agas_cache_action into typename to id registry.: HPX(invalid_statu... |
HPX Examples throwing "failed to insert update_agas_cache_action into typename to id registry" exception |
|hpx| |
null |
I want to send some data from my content.js to background script in my chrome extension. I tried ```chrome.runtime.sendMessage``` but it is undefined. It happens because of my manifest file where ```world:MAIN``` is set for content script. Here is the code for content.js
```
listenerFn = (event) => {
const url = e... |
How to send data from content.js to background.js |
|google-chrome-extension| |
Unix text and keyboard event handling has been handled nicely in curses and ncurses for decades and works in python in Termux. This example works so long as you zoom out the Termux window (pinch zoom out) so it doesn't run into bounding errors while moving the cursor around.
https://medium.com/explorations-in-python... |
For RFC 9110, the current HTTP/1.1 spec as of 2024-03-31, the following statuses MUST NOT generate content:
- [Informational 1xx](https://datatracker.ietf.org/doc/html/rfc9110#name-informational-1xx)
- [204 No Content](https://datatracker.ietf.org/doc/html/rfc9110#name-204-no-content)
- [205 Reset Content](https:/... |
It should work like this
```
library(terra)
# do not make a list
red <- list.files(pattern = "red")
nir <- list.files(pattern = "nir")
calc_ndvi <- function(nir, red){
(nir-red)/(nir+red)
}
ndvi <- list()
for (i in 1:9){
ndvi[[i]] <- calc_ndvi(rast(nir[i]), rast(red[i]))
}
ndvi <- rast(ndvi)
... |
I'm the maintainer of [xnec2c][1] and we found that this code was causing xnec2c to beep through the PC speaker (excessively and annoyingly) while resizing a window or rotating an object:
```c
snprintf( txt, sizeof(txt), "%7.2f", Viewer_Gain(proj_params, calc_data.freq_step) );
gtk_entry_set_text( GTK_... |
Why does GTK beep when resizing a window? |
|c|gtk|gtk3| |
It's possible to write and run JavaScript code in Safari browser.
Follow the following steps:
1. **Enable Safari dev tools:** To open Safari dev tools, press `Ctrl + Alt + C` on Windows or
`command + option + C` Mac. Or enable Safari dev commands in the menubar in Safari Settings -> Advanced -> Show features f... |
I had the same problem with copying database files from my old PC to my new PC. The solution was use Back-up (to a USB drive) from the application on the old PC then open the application on the new PC and select restore from the USB drive. |
After much troubleshooting, the `"%7.2f"` was creating text that was too long for the text field defined by `widget` (NB, `widget` is a `gchar[]` string naming the widget, not a widget object).
The text field's `max-length` was defined by the Glade XML and so `gtk_entry_set_text` would trigger a beep event every t... |
I use hibernate for a desktop application and the database server is in another country.
Unfortunately, connection problems are very common at the moment.
These are:
**1. 2024-03-19 14:08:42 2378 [Warning] Aborted connection 2378 to db: 'CMS_DB' user: 'JOHN' host: 'bba-83-130-102-145.alshamil.net.ae' ( Got an er... |
I was given this block of code where `call by Reference` had to be used for every method call, and I had to give an output of a in the format:
```none
y:[result]; y: [result]; y:[result]; x:[result]; a:[result]
```
```java
public class Main {
static int x = 2;
public static void main(String[] args)... |
[Anchor positioning](https://developer.chrome.com/blog/introducing-popover-api#anchor_positioning) is coming, but the only major browser with support for it is Chrome, and as it is considered an experimental feature, you have to use a [flag](https://caniuse.com/?search=anchor%20positioning) to switch it on.
Until an... |
You could change your function to accept a computer name like below and use that to invoke the command on the specified machine like:
function verificaSophos {
param (
[string]$ComputerName = $env:COMPUTERNAME
)
$resultado = Invoke-Command -ComputerName $ComputerName -Scri... |
I have this function that updates a user's feed after following another user by getting the post IDs of that user's posts and then adding them to a 'user-feed' in the users document. It worked fine until I added the timestamp field in. What I'm trying to do is to add the timestamp from each post to the document that is... |
TypeScript allowing extra properties in object assigned to interface extended from another interface [NEXT-AUTH] |
|next-auth| |
here is your answer:
import 'package:flutter/material.dart';
import 'package:flutter_application_1/domain/entities/entities.dart';
import 'package:flutter_application_1/presentation/riverpod/league_provider.dart';
import 'package:flutter_application_1/presentation/riverpod/search/search_form_provi... |
I want to install solr 9.x on a fresh linux server in order to run a pretty old application, migrating from solr 8.x. As of 9.x the data-import handler is no longer part of solr, therefore I installed https://github.com/SearchScale/dataimporthandler to overcome the issue.
Solr is running but the core will not load ... |
I've found that the best way to compare your Axios request to Postman request is via **Postman console**.
In the console you can see (hidden) proxy settings, hidden headers, and other network info.
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/bG4ka.png |
it seems to me you could achieve your goal by means of formulas
if you insert one column and one row you could use this formula
=IF(SUM(G$5:G5)<G$2;IF(SUM(F6:$F6)<8;1;"");"")
[![enter image description here][1]][1]
or you can keep your original rows and columns layout and adopt this other formula:
... |
I understand that controller in Argonaut are singletone(*), therefore I do not want to havea bean instance injected with a bean to be used in the controller methods. I want instead to get a new instance of a bean. For example:
@Controller("/store")
@Secured(SecurityRule.IS_AUTHENTICATED)
public class S... |
How to get an new instance of a bean in a Argonaut controller method |
|argonaut| |
I was following [How to build PyTorch from Source][1] in order to install Pytorch as I have older Graphic card which only supports Cuda 11.4. I am working in Conda environment. At the last stage I am getting following error.
Building wheel torch-2.4.0a0+git2b1ba0c
-- Building version 2.4.0a0+git2b1ba0c
... |
Conda CMAKE CXX Compiler error while compiling Pytorch |
|c++|cmake|pytorch|conda| |
I am trying to accept case insensitive fields to my API running on JBoss Server.
Currently I have a Spring Boot Project. But i have a sprintApplicationContext.xml that i have contextConfigured inside web.xml.
When i try below code for MapperFeature's Case Insensitive property, it is not working.
```
@... |
{"Voters":[{"Id":18470692,"DisplayName":"ouroboros1"},{"Id":16343464,"DisplayName":"mozway"},{"Id":20430449,"DisplayName":"Panda Kim"}]} |
I have access to 2 nodes, each has 2 GPUs. I want to have 4 processes, each has a GPU. I use `nccl` (if this is relevant).
Here is the Slurm script I tried. I tried different combinations of setup.
It works occasionally as wanted. Most of time, it creates 4 processes in 1 node, and allocate 2 processes to 1 GPU. It... |
I am using following generic interface to select matching key-value pair types of an interface:
```ts
interface DefaultParams<T> {
screen: keyof T;
params?: T[keyof T];
}
```
and I want to use it with this navigation types so that I can pass respectively matching values in my navigate function:
```ts
... |
The top rated answer does not work with the new Reflection implementation of (JEP416)[https://openjdk.org/jeps/416] in e.g. Java 21 that uses MethodHandles and ignores the flags value on the Field abstraction object.
One solution is to use Unsafe, however with [this JEP](https://openjdk.org/jeps/8323072) Unsafe and ... |
The top rated answer does not work with the new Reflection implementation of [JEP416](https://openjdk.org/jeps/416) in e.g. Java 21 that uses MethodHandles and ignores the flags value on the Field abstraction object.
One solution is to use Unsafe, however with [this JEP](https://openjdk.org/jeps/8323072) Unsafe and ... |
For commercially free open-source task you need to avoid those that depend on licensed GhostScript PDF handling in the background such as ImageMagick GraphicsMagick etc.
If it's for personal use then consider Ghostscript's sister MuTool. It's generally the fastest method, see: https://stackoverflow.com/questions/7... |
In *vobject*, the value of an EXDATE property is a *list* of datetime values.
So, instead of:
ev.instance.vevent.add("exdate").value = vevent.dtstart.value
your code should do something like:
ev.instance.vevent.add("exdate").value.append(vevent.dtstart.value)
This avoids the exception reporte... |
In Prometheus operator ServiceMonitors, you can use `spec.endpoints[*].relabelings` to alter labels and metrics:
```
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
spec:
endpoints:
- interval: 30s
port: metrics
scheme: http
metricRelabelings: <-- here you shine!
- action: la... |
null |
If you're using the `options` prop of `v-data-table`, you can just set the page back to 1.
```
methods: {
goToFirstPage() {
this.$set(this.options, 'page', 1);
}
}
```
If not, add a `page` data and bind it to the data table so you can easily change the page.
```
<v-data-table :page="page" />
``... |
You can try check internet connection/proxy or you can specify timeout like this
COMPOSER_PROCESS_TIMEOUT=2000 composer create-project --prefer-dist laravel/laravel yourProjectName
|
Consider turning the problem around from "find out where the browser inserted line breaks" to "tell the browser to make specific line breaks".
This can be easily achieved by inserting [soft hyphens][1] (`­`) at desired locations.
[1]: https://en.wikipedia.org/wiki/Soft_hyphen |
You just need to indent the `.` and `var x` lines one more level so that they're within the second conditional:
```
- var a = 5;
- var b = 3;
script
if (a === 5)
if (b === 2)
.
var x = true;
include script.js
```
If you want `x` to always be declared and be either true or false base... |
{"Voters":[{"Id":550094,"DisplayName":"Thierry Lathuille"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":5320906,"DisplayName":"snakecharmerb"}]} |
I can declare a C# positional record like this:
```
public record Box(double Capacity);
```
which results in the definition of a record class named `Box` with a property named `Capacity`, as well as a primary constructor for `Box` that takes a parameter named `Capacity`. Now I want to be able to create independent ... |
While writing python (3.12.2) code to interact with Adobe Illustrator via WIN32COM (Windows 10), I sometimes crash Illustrator with "pure virtual function call" errors.
Here is an example line of code that causes such a crash:
```
font_size = text_frame.TextRange.CharacterAttributes.Size
```
The mere act o... |
I'm switching my app from firebase web (V8) to react-native-firebase. (I figured it would be less work to refactor than going to web V9) But I have run into a problem.
I use Priority values to store a value that indicates ordering of objects in a realtime database container, and when I read the snapshot the priorit... |
For this section of code, I am trying to randomly choose either theta or mu to be zero. When one variable is zero, then I need the other one uniformly randomized (and vice versa).
```
N = 10000
random = np.arccos(np.random.uniform(-1, 1, N))
zero = 0
choices = [random, zero]
theta = np.random.choice(choices)
... |
How do I fix a NumPy ValueError for an inhomogeneous array shape? |
|python|numpy| |
null |
So I'm trying to run this command to turn files into a .chd file:
```
for i in *.cue; do chdman createcd -i "$i" -o "${i%.*}.chd"; done
```
But I get this error:
```
fish: ${ is not a valid variable in fish.
for i in *.cue; do chdman createcd -i "$i" -o "${i%.*}.chd"; done
```
Which is boggling to me c... |
The man page and [this 2002 email from Linus Torvalds](https://web.archive.org/web/20151201111541/http://article.gmane.org/gmane.linux.kernel/43445) (and [longer thread](https://lists.archive.carbon60.com/linux/kernel/287485)) strongly suggests that all [`write(2)`](https://www.man7.org/linux/man-pages/man2/write.2.htm... |
When you want to add R packages to a new OS running R, you need to be aware of any underlying OS packages that are required. In this case, reading `sf`'s [`DESCRIPTION`](https://cran.r-project.org/web/packages/sf/index.html), we see
```
SystemRequirements: GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>= 4.8.0), sqlite3
... |
null |
You can achieve this with NTILE(). Assuming your data is actually like this, rather than grouped, you can use the following, but you can modify with GROUP BY and HAVING if these are summations. But that will return the records in the reverse Quartile. To accommodate your order you can subtract the quartile from 5.
... |
Setting document field value using Firestore Functions |
|firebase|function|google-cloud-firestore| |
null |
{"OriginalQuestionIds":[3654830],"Voters":[{"Id":476,"DisplayName":"deceze","BindingReason":{"GoldTagBadge":"python"}}]} |
The "SLF4J: No SLF4J providers were found" message indicates slf4j-api version 2.0 or later is in use. You need to place a compatible provider on your class path, for example, logback version 1.3 or later. |
My requirement is to have a core app to manage authentication, which should include google authentication (all-auth in django) and django_cas_ng (CAS authentication).
Now I want to be able to use this authentication app for multiple projects (CAS system).
I should register only for one app , and should be able to l... |
null |
So I'm only able to really speak to the Go server side of this question as the biggest problem you're going to run into on the JavaScript side is having to access gRPC. There's an [issue](https://github.com/apache/arrow/issues/17325) tracking examples for Flight in ArrowJS which hasn't yet been filled.
That all said... |
Documentation comments for record types with primary constructors in C# |
|c#|constructor|record|xml-comments| |
null |
I am building a programming language using C++, LLVM, Clang, LLDB, user can write `import "@stdio.h"` which is similar to `#include <stdio.h>` so now I need to support C like imports of headers, however I can't get the path to system headers, let alone parse them !
Other answers have gotten old, since llvm and clang... |
Get search paths for headers in the standard library in Clang? |
|c++|clang|llvm|clang++|libc| |
{"Voters":[{"Id":80901,"DisplayName":"mjn"},{"Id":1940850,"DisplayName":"karel"},{"Id":354577,"DisplayName":"Chris"}],"SiteSpecificCloseReasonIds":[16]} |
I'm trying to write a simple parser for some yml config files (with serde) which involves some additional parsing for custom formats inside many params. My additional parsers are based on simple Regex'es, and I created a registry so that they are "compiled" only once. The registry is essentially a ```HashMap<String, _>... |
I'm the maintainer of [xnec2c][1] and we found that this code was causing xnec2c to beep through the PC speaker (excessively and annoyingly) while resizing a window or rotating an object:
```c
snprintf( txt, sizeof(txt), "%7.2f", Viewer_Gain(proj_params, calc_data.freq_step) );
gtk_entry_set_text( GTK_... |
Why does GTK beep when calling `gtk_entry_set_text` (while resizing a window)? |
I'm doing a migration from a monolith to microservices on a springboot web application, there is a service about websocket but I can't connect when I'm doing the migration. This code still work in monolith.
Here is the log from the client:
```
Access to XMLHttpRequest at 'http://127.0.0.1:8080/api/ws/info?t=171185... |
|c++|linker|clang|llvm|lld| |
I am trying to create server and client interaction on Microcontroller ESP32. It'll consist of simple HTTP server and a client. So the client will send a `POST` request to the server, and the server will do some logic with the data it received.
And for more context, here is the server-side code:
```c
if (... |
I was trying to run my website, but when I try to build ng, I get this error:
>Prerendered 0 static routes.
Application bundle generation failed. [5.115 seconds]
>
>✘ [ERROR] NG8003: No directive found with exportAs 'ngForm'. [plugin angular-compiler]
>
> src/app/home.component.html:2:56:
2 │ <form... |
When I enter the values for all entry fields in the "Rating data labels", all values getting printed except input line voltage and output line voltage. Also, I get the error message that "All rating data input fields must be filled" as the code does not capture the values in input line voltage and output line voltage. ... |
The matrix you've posted is symmetric, and real-valued. (In other words, `A = A.T`, and it has no complex numbers.) This matters because all matrices which are symmetric and real-valued are [normal matrices](https://en.wikipedia.org/wiki/Normal_matrix). [Source](https://en.wikipedia.org/wiki/Symmetric_matrix#Symmetry_i... |
I use hibernate for a desktop application and the database server is in another country.
Unfortunately, connection problems are very common at the moment.
These are excerpts from the log file on the database server:
**1. 2024-03-19 14:08:42 2378 [Warning] Aborted connection 2378 to db: 'CMS_DB' user: 'JOHN' host... |
|firefox|automated-tests|playwright| |
null |
Execute some code only once for bank wire confirmed payment in WooCommerce |
There appears to be undocumented, native support for CloudFront signing of requests to Lambda Function URL origins. Neither Terraform nor the AWS Console support creating an Origin Access Control with origin type `lambda`, but the AWS CLI will happily create one. I verified with this OAC CloudFront does sign the requ... |
I have a relatively large PostgreSQL (v12) table storing JSONB data that has unintentional duplicate data (based on a composite unique index on two columns, `aCol` and `bCol`). In order to create that index, I have to first delete all of the accidental duplicates from the DB. This works fine in 2/3 of our DB servers (s... |
I'm building a server-side rendering blazor app
where in Program.cs I have
builder
.Services
.AddRazorComponents()
.AddInteractiveServerComponents();
and
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
I built a language component like the cod... |
How to set language in a server-side rendering blazor app |
|c#|.net|blazor|blazor-server-side| |
null |
null |