instruction
stringlengths
0
30k
I want to test my react project array ```ts // this method is in the utils.ts export const platform = ( navigator.userAgentData?.platform || navigator.platform ).toLowerCase() export const keyboardPlayerShortcutsData = [ { name: 'play/pause', shortcut: platform.startsWith('mac') ? `⌘ + p` : '...
I'm trying to send a delete http request but it does not work. Delete request should be send when clicking a button. Please help. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> const ondeletehandle = async() => { const response = await fetch('/api/notebo...
How to send http delete request in ReactJS when clicking a button?
null
I am trying to understand an issue that arose following the news regarding the new format of the Champions League. As some of you may know, the new format consists of `n=36` teams, divided into `p=4` pots. Each team will face `o=2` teams from each pot, resulting in a total of `p*o=8` matches, with one match played a...
I have an error during build up of WAR file. Can anyone help to fix this error ? FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'mpm'. > Could not resolve all files for configuration ':classpath'. > Could not resolve io.jmix.gradle:jmix-gradle-p...
The error: > org.springframework.mail.MailSendException: Mail server connection failed. Failed messages: jakarta.mail.MessagingException: Could not convert socket to TLS;\n nested exception is:\n\tjava.net.SocketTimeoutException: Read timed out; message exception details (1) are:\r\nFailed message 1:\r\njakarta.ma...
|c#|client|
Creating a Google Login-In Extension for a personal project so I've set up funtionality that allows me to log in to the extension with my Google account and it works. I'm using an initial HTML file called "popup.html" to hold the logic of Google's Authentication by calling "popup.js" as the backend script, displaying ...
Mass Resource deletion in REST
|api|rest|
[enter image description here][1]Suppose A is a symmetric matrix whose SVD is A= USV^T, and let B = U\sqrt{S}V^T, then B^2 should be equal to A. But when I implemented it using tensorflow, B^2 and A does not match. Highly appreciated if you could give some advice! [1]: https://i.stack.imgur.com/ODigC.png
As the title says, I use next-sanity for my Next.js blog. I recently wanted to update all npm packages. Now I can´t run `npm run build` as the one of the dependncies itself throws a type error as follows: ```console ./node_modules/@sanity/types/lib/dts/src/index.d.ts:756:3 Type error: Type parameter declaration ...
I am getting an error in `R` in Windows 10 about finding a directory while trying to install a package from GitHub*. Trying to troubleshoot this error led me to a few observations. For example, both Windows Explorer and my browser can find `C:/PROGRA~1`, but only my browser can find `C:/PROGRA~1/R`, where `R` is ins...
What is causing the store latency in this program?
|c|cpu-architecture|micro-optimization|micro-architecture|
{"Voters":[{"Id":22180364,"DisplayName":"Jan"},{"Id":1940850,"DisplayName":"karel"},{"Id":6461462,"DisplayName":"M--"}],"SiteSpecificCloseReasonIds":[13]}
You can just use the native web import: 1. Go to Data > From web 2. paste "https://www.screener.in/api/company/13611040/peers/" 3. Click on "Table0" 4. Click on "load"
scanf in x64 NASM results in segfault
In your original post at first picture i can see a lot of stencils which are opened in separated windows as Read-Only [RO]… It is not ShapeSheet windows!!! I have not documents with same issue and I create one with code Option Base 1 Sub Prepare() Dim pth(3) As String, curpath As String, i A...
So I am basically very new to Assembly in general. I was trying to write this simple code where I need to sort numbers in an ascending order from source data and rewrite it into destination data. and whenever I run it, it shows: executables selected for download on to the following processors doesn't exist... here...
How vitest mock different variable value?
|reactjs|typescript|vitest|
null
#Step 02 CREATE TABLE company_customer ( cust_ID INT, address_num VARCHAR (6), street VARCHAR(20), city VARCHAR(20), cust_contact_num VARCHAR(12) UNIQUE NOT NULL, cust_alt_contact VARCHAR(12), cust_email VARCHAR(20) UNIQUE NOT NULL, c...
We have couple of applications which are desktop(PC) , Mobile applications, so planned to create unique test automation framework in java we have created a framework to support both desktop and mobile platforms using below tech stack Selenium webdriver, appium, java client, testNG, allure , java 17 but i am fa...
[Per my top comment], building with `-Wall -O0 -g -fsanitize=address`, a few issues ... 1. With `-Wall`, arguments `col` and `row` are `char` and compiler complains about that (converted to `int`) 1. `row` and `col` are unitialized (in `main`) but the _values_ are never used by `computerMove` or `UserMove` (set to ...
I'm programming a simple 'game' that is just a block that can jump around. I placed a wall, but now the character phases through when moving to the right, but the collision works when going to the right. The collision in question: ``` function willImpactMovingRight(a, b){ var docA = document.g...
Character phases through wall one way, but not the other
|javascript|html|css|
null
I am rendering different sections in my dashboard using a nested Route. The problem is when I navigate between sections (using react-router-dom `Link`) it unmounts the section so when I go back it has to re-load and re-render the section. Here is how i'm setting the routes ``` <Routes> {(!user.loa...
react-router-dom unmounting outlet on page switch
|reactjs|react-router-dom|
Optimizing Memory-Bound Loop with Indirect Prefetching
|optimization|vectorization|intel|compiler-optimization|prefetch|
null
|java|spring-boot|spring-data-jpa|
{"OriginalQuestionIds":[218384],"Voters":[{"Id":286934,"DisplayName":"Progman"},{"Id":10632369,"DisplayName":"tomerpacific"},{"Id":9214357,"DisplayName":"Zephyr"}]}
I believe in this case you should not use the entry API anyway - even without considering this issue. This is because the entry API, in order to be able to insert the key if missing, needs an owned key. For you that means that you cannot lookup with `&str`, you must call `to_string()` on it - and that means an alloc...
`getTimezoneOffset()` returns wrong timezone. I'm in Kyiv and my local time is 10:07. **Kyiv time confirmed**: ``` > new Date().toLocaleString('en-GB', {timeZone: 'Europe/Kyiv' }); // '31/03/2024, 10:07:28' ``` Yesterday Kyiv was on winter time GMT+3, but today winter time is off and Kyiv is on GMT+2. ...
Why new Date.getTimezoneOffset() returns wrong result?
|javascript|
{"Voters":[{"Id":238704,"DisplayName":"President James K. Polk"},{"Id":1840146,"DisplayName":"Toerktumlare"},{"Id":5277820,"DisplayName":"dur"}],"SiteSpecificCloseReasonIds":[13]}
bash: parse command line arguments *and* write useful *usage* message without additional code
I´m new to stackoverflow and i´ve just been into software testing and this whole world for about a year but I am currently developing myself as a QA in a startup and i´ve been automating my test plan using Selenium with Python and Pytest. Currently I have 359 tests that run perfectly on my computer when using the GU...
I have a spec flow automation framework. I am using Visual Studio Editor. in that, any definition in the definition file shows references zero. I want to display the reference number with the definition. suggest to me the solution to display the references with definitions. [as in the image the reference shows ...
Specflow defination not showing references
|.net|automation|integration-testing|bdd|specflow|
null
I run GRPC and REST on different ports and different goroutines: func main() { cfg := config.MustLoad() log := setupLogger(cfg.Env) grpcApplication := app.NewGrpc(log, cfg.GRPC.Port, cfg.StoragePath, cfg.TokenTTL) restApplication := app.NewRest(log, cfg.GRPC.Port, cfg.StorageP...
Is there any way to tell Notepad please remove the following [DOCUMENT](https://i.stack.imgur.com/Ukr0X.jpg) Remove all the empty characters after the last , sign. I know I can tell please replace , with empty but the problem is I have many , that hast to stay in the file. I just need notepad to remove EVERYTH...
Notepad++ Remove Empty Spaces or characters after the specific LAST character
|character|notepad++|line|
null
|javascript|angular|firebase|firebase-realtime-database|
null
{"Voters":[{"Id":1431750,"DisplayName":"aneroid"},{"Id":21972629,"DisplayName":"jQueeny"},{"Id":14732669,"DisplayName":"ray"}]}
The code below uses a **background callback** (dash) to retrieve a value. Every 3 seconds, `update_event(event, shared_value)` sets an `event` and define a `value`. In parallel, `listening_process(set_progress)` waits for the `event`. This seems to work nicely and the waiting time is low (say a few seconds). Wh...
I have created a custom SAML application in the Google Admin panel for my workspace account to allow users to login via SSO to an application using their Google Workspace credentials. Currently only users of my organisation can login to this application. I want to make it so that users of an external organisation can a...
{"OriginalQuestionIds":[77941885],"Voters":[{"Id":11182,"DisplayName":"Lex Li","BindingReason":{"GoldTagBadge":"iis"}}]}
{"OriginalQuestionIds":[64341589],"Voters":[{"Id":5577765,"DisplayName":"Rabbid76","BindingReason":{"GoldTagBadge":"pygame"}}]}
{"OriginalQuestionIds":[10825926],"Voters":[{"Id":476,"DisplayName":"deceze","BindingReason":{"GoldTagBadge":"python"}}]}
No module named 'keras.layers.core
``` mpg['grade'] = np.where(mpg['total'] >= 30, 'A', np.where(mpg['total'] >= 20, 'B', 'C')) ``` code 1) ``` count_grade = mpg['grade'].value_counts() count_grade.plot.bar(rot=0) plt.show() ``` code 2) ``` count_grade = mpg['grade'].value_counts().sort_index() # method chaining count_grade.plot.bar(rot=...
I need to print the bounding box coordinates of a walking person in a video. Using YOLOv5 I detect the persons in the video. Each person is tracked. I need to print each person's bounding box coordinate with the frame number. Using Python how to do this. The following is the code to detect and track persons in a vi...
I need a part to be incerted to the character's body everytime they respawn Here's the script I made: ``` local Backpack = game:GetService("ReplicatedStorage"):Waitforchild("Backpack") local Player = game:GetService("Players").localplayer Player.Character.Respawned:Connect(function(Character) local clon...
null
### Summary There is a difference between `any` in type parameter and `any` in regular function parameter. Your case is the former one for generics. So you need to instantiate `T`(decide `T`'s concrete type) first when assigning it to the concrete variables Ref. https://stackoverflow.com/questions/71628061/differen...
You may try- =HSTACK( TOROW(FILTER($A$2:$A$7;BYROW($B$2:$M$7;LAMBDA(rw;INDEX(OR(rw=H13)))));3); TOROW(FILTER($B$1:$M$1;BYCOL($B$2:$M$7;LAMBDA(col;INDEX(OR(col=H13)))));3) ) [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/FfW29.png
The following code will add 3000 to 4000 documents of various sizes to a Firebird Blob field before running out of memory. I believe I have freed the streams I create, but I may not be doing it correctly. Streams are a new tool in my toolbox. Can anyone spot what I'm doing wrong? ``` procedure TfrmMigration.Button1...
Out of memory while adding documents to a Firebird BLOB field with Delphi
|delphi|blob|streaming|firebird|
> while(true); Your code probably can't detect the GPS for some reason, so it go into this infinite `while(true)` loop. For ESP8266, the watchdog timer running in the background need to be "feed" regularly, this infinite loop choke the "dog" to death, change the line to the follow would allow the watchdog to...
I'm deploying a zip package as an Azure function with the use of Terraform. The relevant code fragments below: resource "azurerm_storage_account" "mtr_storage" { name = "mtrstorage${random_string.random_storage_account_suffix.result}" resource_group_name = azurerm_resource_...
important: I don't have a deep understanding of malloc so try to put things as simple as possible Greetings, I want to create a dynamic array of strings (using malloc) and then print those strings out (for starters). That's what I have ``` int main(){ char **namesofcolumns = malloc(4 * sizeof(char*)); ...
I need to create a malloc array of strings and print those strings out
|c|malloc|c-strings|
null
Trying to create a dialog class which will contain a QTableView widget, all is good, information gets inserted, but i cannot understand why pycharm show the error: "Unresolved attribute reference 'setModel' for class 'Dialog'" all class code here: ``` from PyQt5.QtGui import QStandardItemModel, QStandardItem ...
Unresolved attribute reference 'setModel' for class 'Dialog'
|python|pycharm|pyqt5|
null
i found a way, using: - integer pixel coordinates which is much more intuitive and convenient at least for what i'm doing here - and considering the "pixel size" i wanted to paste my code but the crazy blocking rules pretending my code is not "formatted" correctly prohibits it! ctrl-k does not work ... so i w...
|php|twitter-bootstrap|tailwind-css|moodle|moodle-theme|
I'm trying to process multiple forms with fieldset inside This is a test for 40 questions, each question with 4 answers. I need to get each answer from radio button that the users picks and use it to count correct answers. I have some comments along the code to help out, if anything is needed let me know. Thanks ...
Processing multiple forms in nodejs and postgresql
|node.js|postgresql|express|body-parser|
null
Git's `vimdiff` mergetool shows you all four versions (ours, base, theirs, results-so-far), you can step through the changes, including all the automerged ones, with `]c` and `[c` and see everything, `1do` to take the local version, `2do` to take the base version, `3do` to take the remote version.
I have a [MERN][1] stack application which I deployed to Render (server side as web service and front end as static). \ In my application, I have a profile where users can upload avatar image. I store an image as a URL string in my MongoDB [Atlas_][2] in User model. Images are saved on the server in uploads folder....
spring-cloud-stream-binder-kafka-streams consumer shuts down when RuntimeException occurs
I am migrating my deprecated spring security code and I am facing a problem : after the user's authentication (and he is authenticated), the spring contextHolder seems to be lost and the authentication vanishes. Therefore my connection does not work and the first api call redirects again to the login page I followed...
# Goal I want to have two search bars, and each of them can: - Display suggestions as typing - Use arrow keys to select item - Each item can be customized Because of the last bullet I don't want to use [`<datalist>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist "&lt;datalist&gt;: The HTML D...
just for me, I'm experimenting with GLFW (compiling with **g++ -o nxtBluePixel nxtBluePixel.cpp -lglfw -lGLEW -lGL** ) to simply draw a blue box and moving it up/down/left/right. I want to output a message "out of bounds" when the box touches the edges of the visible area, which should logically be -1 or 1 (in those so...
Experimenting with GLFW library: window boundary problem and normalized coordinates
|c++|opengl|
null
Aren't you meant to be passing a **blob-URL** for the image instead of just blob-data? Because it doesn't look like you're converting the blob to a URL with this... canvas.toBlob(function (blob){ jQuery.ajax({ url:"//domain.com/wp-admin/admin-ajax.php", type: "POST", ...
My device is Xiaomi 11 Lite 5G NE (lisa) and I am using the defconfig from ./arch/arm64/configs/vendor/lahaina-qgki_defconfig. I am using clang as CC and CLANG_TRIPLE as aarch64-linux-gnu- (both from proton-clang) while using aarch64-linux-android- as CROSS_COMPILE (from here https://github.com/ibnudz/aarch64-linux...