instruction
stringlengths
0
30k
null
I'm currently working on setting up an API Gateway using Ocelot, and I'm integrating it with IdentityServer4 for authentication. I have multiple backend services that rely on Identity Server to do the authorization. In my setup, the API Gateway acts as a reverse proxy and needs to forward requests to the appropriate...
i have following html code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Sell Weapons</title> </head> <body> <form action="{{ url_for('predict')}}"method="post"> <label for="comment1">evaluate first product</label><br> <input ...
~ $ pip install pandas Collecting pandas Using cached pandas-2.2.1.tar.gz (4.4 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run ...
Python pip Pandas installation metadata-generation-failed error in termux
|python|android|pandas|termux|
null
I have the data below. I want to create a column called **Desired** where, for each row, the desired value is the sum of Measurements (excluding the current row Measurement) where Lower <= (Current Lower) and Upper >= (Current Upper) and ID2 = (Current ID2). Right now, I only have data for ID2 = 1, but in the future, w...
{"Voters":[{"Id":893254,"DisplayName":"FreelanceConsultant"},{"Id":16217248,"DisplayName":"CPlus"},{"Id":13376511,"DisplayName":"Michael M."}]}
``` list_url = [] for i in key_products: #sortir url pour bon id if keyValue == products_id[i]['files'][0]['type']: list_url_2 = i, products_id[i]['files'][0]['url'] #créer une liste de tupples avec list url list_url.append(list_url_2) list_url print(list_url) #I c...
|python|list|for-loop|
I have a list `List<IVehicle> vehicles = new List<IVehicle>();` and in that list I want to store objects (Car, Boat, Mc). How can I print out how many objects of ex car I have in the list? I tried using LINQ `int count = vehicles.Count(x => x == car);` but it does now count correct.
Showing objects count in list
|c#|list|
null
Good day, Could someone please assist with how to achieve the below. So I need to take the first "Addition" which is the "Total_COB_Growth" + "Sum_of_Previous_Interest" where the "Sum_of_Previous_Interest" is dependent on the LAG of "Additions" if that makes sense. I can't get it right in SQL to have the previous va...
``` import cv2 import numpy as np import pyautogui import pyaudio import wave import os from moviepy.editor import VideoClip, AudioFileClip from collections import deque from keyboard import is_pressed from datetime import datetime # Constants CLIP_DURATION = 120 # Total duration of the clip in seconds ...
How can I sync my audio and video together when making a clipping software with Python?
|python|numpy|opencv|moviepy|
null
|r|ggplot2|officer|
[update] please see @Sylver11 and @Shohei's answers for the explanation of the full implication of this solution. It took me a while to find a simple resolution. You only need to add the following to the code import socket timeout_in_sec = 60*3 # 3 minutes timeout limit socket.setdefaulttimeout(tim...
Ensure that the `index.css` file is imported. In my situation, I accidentally removed the `import "./index.css"` line in `main.jsx` while deleting some boilerplate code. ```jsx import React from "react"; import ReactDOM from "react-dom/client"; import App from "./App"; import "./index.css"; // Make sure this lin...
I'm new to Laravel 10, and I recently installed Jetstream. When I run `php artisan route:list` in the console, I get the following error: `Class "verified" does not exist`. I do have `verified` in my Kernel: ```php protected $middlewareAliases = [ ... ... 'verified' => \Illuminate\Auth\Middleware\...
The schedule I want to recreate [![enter image description here][1]][1] I need help creating a schedule using CSS, HTML, and Javascript. I'm having trouble aligning three blank table cells for the 7:00-8:00 time period with the cells on Tuesday, Wednesday, Thursday, and Friday. This is my code: th { ...
Conditional Sum Excluding Current Row
|sql|
null
**In Bootstrap 5;** // to enable tooltips, with default configuration $('[data-bs-toggle="tooltip"]').tooltip() // to initialize tooltips with given configuration $('[data-bs-toggle="tooltip"]').tooltip({ boundary: 'clippingParents', customClass: 'myClass' })
I'm using jupyter hub inside kubernetes, my hub, and workspace are separate docker images. There is also a separate container running the configurable-http-proxy. Currently when I launch the workspace from the hub page, it receives the ping activity from the workspace pod, but it never finds the pod. Below the logs ...
{"Voters":[{"Id":20259506,"DisplayName":"Chamalka Jayashan"}],"DeleteType":1}
Android 14: D/UsbAlsaDevice( 1571): Unable to set device connection state as INPUT device type is none its from logcat, when i connect DAC or digital earphone. it appears in Matrixx and MikuUI. i found nothing useful about this log before. im sure DAC is not borke, system can connect it but no sound output. Music so...
I'd probably turn both of the dates into the first of the month and then compare. %dw 2.0 output application/json var a = |2024-03-23T02:47:40.014782Z| var b = |2024-03-30T02:48:34.216274Z| fun firstOfMonth(d) = d as String {format: "yyyy-MM-01"} as Date --- { ...
brother ,you need to attach a click event listener to the "Place Order" button, Then Inside the event listener, first perform some actions and validations using the `validateOrder()` function. If the validation somehow fails, prevent the default action of the click event, effectively preventing the order from being pla...
> Because if the definition and declaration weren't consistent in return type or argument type/number, the compiler would just think I was declaring a separate function ... This is true. Both in the sense that the compiler would just think this, and in the sense that it could very well be that you are declaring (and...
Flash get only one value from html forms
|python|html|flask|
In Intellij IDEA 11.1.2, when using the refactor shortcut to Introduce a Constant, it always makes **public static final** constant, whereas I generally prefer to default to **private**. In older versions of Intellij, I'm pretty sure that I had the option of setting **private** as the default. Does anyone know if t...
Parent-Child vs `Range.IndentLevel` - [![enter image description here][1]][1] **The Calling Procedure (Example)** <!-- language: lang-vb --> Sub RunParentChild() Dim ws As Worksheet: Set ws = ThisWorkbook.Sheets("Target") Dim rg As Range: Set rg = ws.Range("A1", ws.Cell...
I'm working on process holllowing and each time I build someone program in visual studio. I pass through the same error: ``` System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex' ``` ``` using System; using sta...
|c#|wpf|image|user-interface|graphics|
Would the following provide a performance improvement? Or is it unworkable and/or slower? My use case is I manage events (think Meetup.com) where the user object/record has collection properties of: organizations they follow, tags they're interested in, and 2 other items like that. The total list of all Organiza...
The `std::less` compare functor does not work here. The reason is that it uses the **content** of the reference of type `MyType` instead of the **reference to the variable** of type `MyType` as index into the set. Try this: ````c++ template<typename T> void printReferenceContainer(T &container) { std::cout <<...
Can anyone please help me how to solve this problem TypeError: Cannot read property 'card' of undefined This error is located at: in DrawerViewBase (created by DrawerView) in RNGestureHandlerRootView (created by GestureHandlerRootView) in GestureHandlerRootView (created by Drawe...
In Laravel Echo, you can listen to a user joining or leaving a channel using the `joining` and `leaving` methods respectively. Here's how you can do it: ```javascript Echo.join(`chat.${roomId}`) .here((users) => { // This is triggered when the current user joins the channel }) .joining((user...
Issue [1004](https://github.com/jupyter/jupyter_client/issues/1004) shows two possibilities, one of which is: ```python import ipykernel import re kernel_id = re.search('kernel-(.*).json', ipykernel.connect.get_connection_file()).group(1) ```
{"Voters":[{"Id":6461462,"DisplayName":"M--"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":5468463,"DisplayName":"Vega"}],"SiteSpecificCloseReasonIds":[11]}
There is definitely something misconfigured here, at least based on those lot of spaces in the filename. As you are not experienced in resolving issues and there is not enough information in the post to figure out what's the problem, I suggest to try [opp_env][1] and install veins trough that. Once you set op opp_e...
Just as an update, I updated our app to target Android 13, and it appears that the latency issue is gone. I tested it with a Teclast T40HD tablet which has a Unisoc Tiger T606 processor, and it seems to work flawlessly. I did a comparison with a previous version of the software which targeted Android 12, and the lag wa...
**Problem overview** ------ I need to combine several .xlsx files into sheets, where each sheet name must be the file name. ---- **Current issue** The code below, becomes slow and spends a lot of memory after a few files. ----- **Attempted solution** Closing excel file and deleting dataframe an...
null
Apple's message: ``` ITMS-91053: Missing API declaration - Your app’s code in the “{app name}” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a n...
Why my battery is completely drained of in just 2 hours in suspend mode i tried by running many terminal commands but it doesn't fix,when i left my system in suspend mode for sometime it becomes really hot and the battery is drained of completely,the pc gets discharged
ubuntu OS : Why my battery is completely drained of in just 2 hours in suspend mode
|ubuntu|operating-system|
null
How can I break the for loop within the then block?
## Do not use jQuery to test your jQuery (*Isn't that obvious*) #### Using jQuery ✘ ```js if ('undefined' == typeof window.jQuery) { $('#selector').appendTo('jQuery is NOT working'); } else { $('#selector').appendTo('jQuery is working'); } ``` #### Using javaScript ✔ ```js if ('undefined' ==...
Paste this code at the end of your ~/.bashrc (/home/**{user}**/.bashrc) export ANDROID_HOME=/home/{user}/Android/Sdk export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platforms-tools Remember to replace **{user}** with your actual username. Also, Be careful with the correct locations, sometimes it m...
null
I tried to build a project using LLVM that is originally built using GCC, but I met some errors related to LLD when linking. It uses --dll and --add-stdcall-alias to the linker, but LLD can't recognize them. I'm not very familiar to LLVM, would someone tell me how to solve that problem? Any suggestions would be appreci...
LLD: How to Use –dll and –add-stdcall-alias Swiches
|linker|clang|llvm|lld|
null
I have an app that looks like this when p-values is not selected: [![enter image description here][1]][1] and when p-values is selected, the y-axis is expanded so that the asterisks don't get cut off: [![enter image description here][2]][2] The line of code for this is: {if(input$p_values) expand_...
I have some requests to an API using OAuth2 so I config like the picture below. Here I configured the authentication to be OAuth 2.0 in the collection and all the requests will be able to access the API properly. This works well [![enter image description here][1]][1] Now I need to decode the access token to ...
Basically, [PageSpeed Insights][1] is a lab environment with a predefined device and network settings that's running on google cloud, so if you would like to test your http://localhost:3000 for example, then it's not possible, because the localhost is not publicly accessible over the internet, it's only on your machine...
I also find a solution. private void UpdateMenu() { MenuItemsStack.Children.Clear(); foreach (var menuItem in MenuItems) { var imageButton = new ImageButton { Source = menuItem.ImageSource, WidthRequest = 60, HeightRequest = 60, ...
I think that to effectively stop your timer you should set you ```Ref.current = id;``` to ```null```. Try setting your ```Ref.current``` to be your ```setInterval``` when you start the timer ``` Ref.current = setInterval(() => { startTimer(e); }, 1000) ``` Then to stop and clear the Interval ``` con...
order by doesn't work inside group_concat in Impala since the data is spread across nodes. So, use a sub_query with an order by and limit XXX (ensuring it's not lower than the number of rows you have) so that all of the data goes to one data node and then group_concat will work on that sub_query
The terraform state file is not available to your destroy job. It seems like you use a local backend, and the terraform state file is not shared between the apply and the destroy job. The quickest solution would be if you expose it as an artifact, as you did with the plan file between the plan and the apply job. ...
null
|entity-framework-core|
The description is long and complicated, but I wanted to make sure to define the problem completely. I have a class FRED which takes as input to its constructor the reference to two instances of class BARNEY: `class FRED{ private: BARNEY &barney_inst1; BARNEY &barney_inst2; ...
Initializing member Class with referenced inputs within parent class constructor
|class|constructor|pass-by-reference|
null
I'm not sure if the top answer is applicable anymore, however this approach works. 1. Go to `Settings -> Workbench -> Appearance` 2. Pay attention to the tabs at the top which has `User`, and `Workspace` - You may have more option like `Remote [<server_name>]` if you are connected to your code via `ssh` 3. Mod...
This started happening for us in Azure between 2 Azure VMs with an Azure Load Balancer between them. Finally, someone from Azure let us know that in some situations the Load Balancer gets into a "half open" state and kills connections after 5 seconds instead of the default 4 minutes if no keep-alive message is sent wi...
I am looking for code to accomplish following in Python (Snowflake solution would also work.) ``` column A (before transformation) 8->8->8->8->5->7 8->5->5->5->7->8->7->7 25->15->15->13->18 25->15->15->13->18->15 ``` Need to dedupe numbers keeping the sequence intact. They are de-duped only if they are toge...
I want to accurately align the boundaries of a map in QGIS
|gis|qgis|geotiff|
null
At first, you need to add this app "rest_framework_simplejwt.token_blacklist", then run `python manage.py migrate`.It will migrate two new tables and manage blacklisted refresh tokens. INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", ...
currently I'm trying to receive data every time someone swipes a card at my magnetic card reader. [acb-004 image](https://i.stack.imgur.com/A8EUW.png) My system includes a magnetic card reader (idteck ip10), I connect the magnetic card reader to the acb-004 access control controller. Then I connected the controller t...
how to connect acb-004 controller using python
|python|controller|cardreader|
null
The page you reference (nowadays?) shows the configuration to create one. It also mentions the following in the end of the paragraph [Config Restrictions][1]: > All namespaces must be called out in the FireFly config file in order > to be valid. Namespaces found in the database but not represented in > the config ...
novice here, trying to experiment with showing my blog and have managed to get an RSS feed in VS code terminal on a page.server.js however can't figure out how to use it. Here's the code: In data.js ``` import fetch from 'node-fetch'; import { parseStringPromise } from 'xml2js'; export async function fetch...
Data import issue for RSS in Svelte
|svelte|sveltekit|svelte-component|
null
I am trying to figure out how to add a border only inside the table. When I do: table { border: 0; } table td, table th { border: 1px solid black; } The border is around the whole table and also between table cells. I want to have a border only inside the table around table ce...
Here is an example, that yoy looking for: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/ingress/annotations/ apiVersion: extensions/v1beta1 kind: Ingress metadata: namespace: default name: ingress annotations: kubernetes.io/ingress.class: a...
update ParentRace:first Race, isTimed:`No`Yes @ `Timed=first Style by SourceID from input
In your Laravel Blade file, you can define a function within a `<x-splade-script>` tag and call it when the checkbox changes. Here's how you can do it: ```html <x-splade-form :default="[ 'allocated' => 0, 'amount' => 100, 'allocateme' => 0, ]"> <x-splade-input label="Amount" name="amount" v-m...
I resolved the issue while preserving history, which is a fear I had going in. In a separate branch, I renamed the local src folder to xsrc and pushed. I then renamed the folder to src and again pushed. I initiated a pull request into the parent branch, and it simply reflected the net renaming of files and *not*...
I have struggled a lot to get my setup working, below is an example of working solution using modern mitmproxy module, that addresses following issues: - Allows running of multiple mitmproxy instances on different ports, **which is not possible with threads**, multiprocessing only! ([Reference][1]) - Allows speci...
You can inspect the GADT using `reify` or a package like `th-abstraction` that provides more predictable wrappers around `reify`. Best practice is probably to use `th-abstraction`, but for your specific example, the way `th-abstraction` handles GADTs might make it more difficult, so maybe you want to stick with `rei...