instruction
stringlengths
0
30k
|c#|asp.net-core|routes|asp.net-core-mvc|
I am using PrivateGPT to chat with a PDF document. I ask a question and get an answer. If I am okay with the answer, and the same question is asked again, I want the previous answer instead of creating a new one. How can I handle this? Are there any options available? settings-local.yaml llm: mode:...
|amazon-web-services|terraform|terraform-provider-aws|aws-route53|
Previous correct answer instead of creating a new one
{"Voters":[{"Id":3874623,"DisplayName":"Mark","BindingReason":{"GoldTagBadge":"python"}}]}
## Issue Description Everytime i run my Streamlit Web APP terminal sends a Warning message always that i interact with the APP: "`label` got an empty value. This is discouraged for accessibility reasons and may be disallowed in the future by raising an exception. Please provide a non-empty label and hide it with lab...
I want to get a pressed mouse or keyboard button from global object window or document when it's listening in setInterval. ``` setInterval(function () { window.mouse.button. ...; window.keyboard.button. ...; // or maybe document.mouse.button. ...; document.keyboard.button. ...; }, 1); ``` I...
How to detect a pressed button using setInterval and without any event in javascript?
|button|events|setinterval|detect|pressed|
null
You can try in the following way. > gte:2022-02-07T00:00:00.000Z lte:2022-02-07T23:59:59:999Z The reason for this is that: > To expand a bit on the answer, the dates are stored as full date-time value. Think of it as ISODate("2022-02-07T00:00:00.000Z") is storing February 7th 2022 at midnight. Comparing ISO...
The solution was to change from this code authorizeRequests.requestMatchers("/Ponyo").permitAll() to this code authorizeRequests.requestMatchers(new AntPathRequestMatcher("/Ponyo")).permitAll() Works fine now
I'm new to FFMPEG. To make it simple, I've created a program that applies a negative filter to small images in png format. For some of the images, everything is fine and the transparency is maintained... But for others, FFMPEG converted the transparency to either black or white pixels. I'm just using the command: ...
how to not remove transparency using negate option on png files ffmpeg
|ffmpeg|
null
My drawables are on the folder drawable-xxhdpi and the background size is 1080 x 1920. How the screens with this resolution, all is OK. But when I test on a samsung A34 for example with the resolution 1080 X 2340, I have a black strip under my screen game and I don't know how to scale my background and the position...
Android: How to scale a bitmap to fit the screen size using canvas?
I'm trying to create a thumbnail sheet (a grid of thumbnails) using ImageMagick with filenames beneath each image. The filenames are long UUID style strings, and using the -title option they overflow into each other to create an unreadable mess. So I thought I'd truncate the names to only show the first n characters. M...
ImageMagick / Bash : pipe ignored(?) when filename format variable used
|bash|imagemagick|
null
Can someone please help me to get rid of this error? > Error : [PrivateRoute] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment> PrivateRoute.js : import React from "react" import { Route, Navigate } from "react-router-dom" import { useAuth } fr...
how to apply gaussian filter correctly
|c++|canny-operator|stb-image|
null
resolve:you need to wrap the root component of the paths in which you have an <Outlet /> in <Provider /> (for me it was an <App/> component, then when you send Routes via module federation, you already have a redux context.
I've created a minimal CMake project on Windows, which includes only a single C++ file. Despite setting `"C_Cpp.codeAnalysis.clangTidy.enabled": false` in my VSCode settings, I continue to encounter clang-tidy errors when building the project. This issue seems to arise specifically when using the Ninja generator, wh...
Compiling c++ code by VS Code is always blocked by clang-tidy error 'Error running 'clang-tidy'
|visual-studio-code|cmake|clangd|
I'm trying to create a script that will trigger key numbers from 1 to 3 I was trying: KeyNum := 1 1:: { global KeyNum Send KeyNum KeyNum := KeyNum + 1 if (KeyNum > 3) { KeyNum := 1 } } but the output was `232323`, so I changed it to: K...
Dynamic default key action
|autohotkey|
Stood in front of the same problem, I solved it now for Tauri beta. This may help you: my new imports: ```` import { save } from '@tauri-apps/plugin-dialog'; import { writeTextFile, writeFile } from '@tauri-apps/plugin-fs'; ```` my func uses a blob from my api: ```` generateMonthlyConcerts(): void { th...
Upload Geotiff or Shapefile to Snowflake through streamlit
|database|snowflake-cloud-data-platform|streamlit|
null
sudo apt-get install libcudnn8
MACHINE ?= "beaglebone" core-image-sato
> I know this is very old question but this might help some new developers There are multiple ways to get this form working but here is a simple tweak Here is the code <form action="/" class="form" id="theForm"> <div id="placeOrder" style="text-align: right; width: 100%; ba...
Can someone assist how to solve this issue (if possible to be solved)? I am using **DevTools** for getting necessary token (in all automation tests). Tests are written in **Java (Selenium 4.16.1)** In order to have them run on pipeline, must be in headless mode and in incognito mode, too. But throws error: **jav...
null
Two things: 1. C# moved away from QuickSort to IntrospectiveSort, as also your link shows. You can see the comments and compatibility support at the [`Sort`](https://referencesource.microsoft.com/#mscorlib/system/array.cs,2300) source code. 2. The code you refer to is recrusive. Near the end of the loop is a recu...
the only other code used in this from anywhere else is Player::getPosition(), which is just returning playerSprite.getPosition() and Game::update which passes Player::getPosition() to this function `sf::Vector2f enemyLocation{0.f, 0.f};` starting value of enemyLocation for debugging ``` ///<summary> /// gets ...
|java|spring|
Depending on the error in my back-end, I would like to display the corresponding error in my front-end, for example if an email address or a pseudo is already use in my DB (I work with nuxt-auth local provider) At the moment, my custom message is displayed in my editor console like this: \[nuxt\] \[request error\] \[u...
Sends a personalised error message from the back-end to the front-end with Nuxt-auth
|authentication|error-handling|nuxt.js|nuxt-auth|
null
Running Streamlit APP 1.32.2 Version - Can not delete warning message `label` got an empty value
|python|streamlit|
I used this code snippet inside one of my useEffect hooks. But it mutates the object and shows me the message to be appeared twice. setConversations((prev) => { const oldConversation = room in prev ? prev[room] : []; const newConversation = [ ...oldConversation, { sende...
I'm working on some code for a javascript implemenation of Conway's Game of Life Cellular Automata for a personal project, and I've reached the point of encoding the rules. I am applying the rules to each cell, then storing the new version in a copy of the grid. Then, when I'm finished calculating each cell's next stat...
Had a similar issue while fetching available languages from a web API. Adding UTF-8 encoding as header solved it for me: .addHeader("Accept-Encoding", "UTF-8") Maybe this helps someone.
import random def create_matrix(n, m, d): # if d is greater than multiple of n and m, return error if d > n*m : return f'd should be less than {n*m}' else: i = 0 # Create a n x m matrix with all value being zero ...
|android|canvas|resolution|image-resizing|multiscreen|
null
Updated it using async. it starts from the last div, but I think that's fine... <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> // Define an async function to handle scroll position reset async function handleScrollPositionReset() { const scrollables...
I have a collection of documents with a **timestamp** field named 'date'. I want to query a single document with the specific 'date': 2024/02/29 00:00:00 GMT05.30. So in Flutter, I'm trying to get that doc by using the following query StreamBuilder<QuerySnapshot>( stream: FirebaseFirestore.instance.collec...
|flutter|firebase|dart|google-cloud-platform|google-cloud-firestore|
null
|angular|typescript|
null
{"OriginalQuestionIds":[23771117],"Voters":[{"Id":1116230,"DisplayName":"Nico Haase"},{"Id":1426539,"DisplayName":"yivi","BindingReason":{"GoldTagBadge":"php"}}]}
I have a dataframe with the following schema : col1 as col1, col 2, col 3, . . col n I have another dataframe with the following schema col1 as diffName, col n+1, col n+2 . . . how can i append values in col 1 of dataframe and the rest of the columns as null values? **i have tried using unio...
Insert selective columns into pyspark dataframe
|pyspark|apache-spark-sql|
I have some histograms in a `.root` file which are called `"Name/NameEvent1Ch0"`, `"Name/NameEvent1Ch1"`... `"Name/NameEvent1Ch31"` ... `"Name/NameEvent2Ch0"`... `"Name/NameEvent{x}Ch32"`... I want to create two lists, which match the characters after `Ch`, the last characters in the string. All the histograms of ch...
Regular expression matching variable at end of string
The result of dereferencing a deleted pointer is undefined. That means anything can happen, including having a program appear to work. There is no promise that an exception will be thrown, or that an error message will be displayed. The specific language in the C++ Standard appears in Section 6.7.5.1 [basic.stc....
i know you're able to do constant variables in lua now with <const>, but they seem to only work with local variables: local myNumber <const> = 10 -- This works perfectly fine myGlobalNumber <const> = 10 -- This causes an error Is it possible to have constant global variables as well? myGlobalNumber <const> = ...
global const variables in lua 5.4
|lua|fivem|
null
want to import HuggingFaceInferenceAPI. from llama_index.llms import HugggingFaceInferenceAPI llama_index.llms documentation doesnot have HugggingFaceInferenceAPI module. Anyone has update on this?
ImportError: cannot import name 'HuggingFaceInferenceAPI' from 'llama_index.llms' (unknown location)
|python|machine-learning|langchain|huggingface|llama-index|
|c++|sfml|trigonometry|
Issue while deploying JDK 17 and Spring 6 application in Tomcat 10.1.20
i know you're able to do constant variables in lua now with `<const>`, but they seem to only work with local variables: `local myNumber <const> = 10 -- This works perfectly fine` `myGlobalNumber <const> = 10 -- This causes an error` Is it possible to have constant global variables as well? `myGlobalNumber <co...
I have a timer in my app that updates the current time on the UI and checks against a set time to trigger an event. However, my app crashes when the timer fires. The crash logs point to ViewController.TimeUp() and closure #1 in ViewController.updateTimer(). Here's a simplified version of the stack trace and related cod...
null
i know you're able to do constant variables in lua now with `<const>`, but they seem to only work with local variables: `local myNumber <const> = 10 -- This works perfectly fine` `myGlobalNumber <const> = 10 -- This causes an error` Is it possible to have constant global variables as well? `myGlobalNumber <...
This example is not a good example, because `java.lang.NullPointerException` could be just anything - and therefore one can't even tell by such example, what the culprit or remedy to it would by. Usually one has to check for files not being checked in into version-control, if they're indeed present, which already catch...
This happens because you are using ***Input.GetAxisRaw("Horizontal")***, In the Unity editor, Horizontal Axis is Defined as Both A,D And Left,Right Keys, There are a few solutions, Two of the easiest are as such: 1) Change GetAxisRaw, Use the specific Keys you want for each direction (This is kind of a lazy solution...
You need to center your [`rolling`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rolling.html) windows with `center=True`: ``` window = 12 hourly = df.resample(rule="h").median() hourly["ma"] = hourly["TEC"].rolling(window=window, center=True).mean() hourly["hour"] = hourly.index.hou...
i have string ```"This auction will run from Friday 28 July - Monday 7 August. It will close from 7pm (GMT) on Monday 7 August 2023. Read here for information on how our auctions end."``` and im trying to get dates from this string this is regex that i wrote and in regex checker site((\d{1,2} \w+(?: \d{4})?))...
How Can I make the height of the sidebar 100% in MUI
I have a question. What is the unit of the number which is shown when I type **swapon** with **-s** option. (in Ubuntu 16.04 LTS on oracle VM vertualbox, type : 64-bit) Namely when I type $ sudo swapon -s | Filename | Type | Size | Used | Priority | - | /dev/sd...
i have string ```"This auction will run from Friday 28 July - Monday 7 August. It will close from 7pm (GMT) on Monday 7 August 2023. Read here for information on how our auctions end."``` and im trying to get dates from this string this is regex that i wrote and in regex checker site((\d{1,2} \w+(?: \d{4})?))...
Alert! I am feeling so embarassed asking such an entry level question here!!!! Hey guys, I have been working on a project that involves timeseries total electron content data. My goal is to apply statistical analysis and find anomalies in TEC due to earthquake. I am following this research paper for sliding IQR ...
In the vue project, I have a `LoginView.vue` subpage in the `views` folder, in which I would like to link to an ASP.NET Core MVC project in which I use the ASP.NET Core Identity for the login/user registration form. When sending a request from vue to ASP.NET Core MVC, I get an error http 400, I am 100% sure that my ...
Problem sending HTTP post request from VUE to ASP.NET Core MVC project
|axios|asp.net-core-mvc|vuejs3|asp.net-core-identity|
resolve:you need to wrap the root component of the paths in which you have an `<Outlet />` in `<Provider />` (for me it was an `<App/>` component, then when you send Routes via module federation, you already have a redux context.
https://github.com/SnailSword/npm-shovel ``` npx npm-shovel react ``` output: ``` react's dependencies: ||--react | |--loose-envify@^1.1.0 | |--js-tokens@^3.0.0 || ^4.0.0 | |--object-assign@^4.1.1 | |--prop-types@^15.6.2 | |--loose-envify@^1.4.0 | |--js-tokens@^3.0.0 || ^4.0.0 * | ...
{"Voters":[{"Id":1431750,"DisplayName":"aneroid"},{"Id":14732669,"DisplayName":"ray"},{"Id":13376511,"DisplayName":"Michael M."}],"SiteSpecificCloseReasonIds":[18]}
I started gVim lately in offline window pc. Specification is below... gVim - 9.1.0211 -64bit python - windows embedded 3.11.8 (pandas 2.2.1) - 64bit vimrc - filetype plugin indent on &_ set omnifunc=syntaxcomplete#Complete After typing "import pandas as pd pd.", I pressed `<C-x><C-o>` then ...
Disclaimer: this is only a proof of concept - not a suggestion that this would be good or bad - I leave that to you to decide. ## Component Activation Blazor has the ability to control component activation through an instance of the `IComponentActivator` interface. The default one is called [`DefaultComponentA...
I have to write a c code where for input 4 the output will be 444 4 444 433 3 334 432 2 234 433 3 334 444 4 444 if the input is 2 the 222 212 222 plz help me in that case , I have found the pattern but cant able to execute plz give me a direction