instruction
stringlengths
0
30k
I am using React Js and express together for my web application where in express will serve static files of react build. MY Requirement is to pass the environment specific react urls at the time of deployment. So for this I have created a .env.template file where I have maintaine template like below REACT_APP_PR...
Try this with modified param for `ConversationalRetrievalChain` ```py qa = ConversationalRetrievalChain.from_llm( ChatOpenAI(temperature=0.1, max_tokens=2048), retriever, prompt) ```
<!-- language-all: sh --> Let me provide some **background information**, to complement your own answer: * _Exit codes_ are a *system-level* concept relating to _processes_: a process can signal the success status of its invocation to the calling process by way of an integer value, with - by widely observed conve...
This is a BUG in the system, upgrading from android 13 to Android 14 requires the user to restart the phone, otherwise the activity transition animation will be abnormal. https://issuetracker.google.com/issues/300310597
Import GLTF with TresJS in Nuxt
|nuxt.js|
it would appear the browser does not auto generate events for you and this is probably a good thing allowing the programmer to have fine grained control and generate exactly what they want if you want to handle generating mouse events you'll have to go the whole 9 yards with it there is a very definate order to w...
I'm using two classes in one div. The problem I'm having is I have two different `title` divs and each title will have its own image. I cannot figure out why each title will not display its own image. Both images will stack up on the first div, what am I doing wrong? **Demo** http://jsfiddle.net/mRRA4/ **CSS**...
I think the problem stems from how you're reducing the polygon's points. (You're forming a triangle with the first three points and then removing the second point from the list for the next recursion.) While this should *theoretically* work for convex polygons, ensuring that all triangles are valid, it doesn't handle t...
I've added [NextUI][1] to my NextJS 14 app The issue has been isolated to the ThemeProvider in my main providers.tsx file: ``` 'use client'; import { NextUIProvider } from '@nextui-org/react'; import { ThemeProvider as NextThemesProvider } from 'next-themes'; export default function Providers({ children }...
You can combine multiple AND-conditions with a * like this ```vba =SUMPRODUCT( (MONTH(Table2[Field1])=MONTH($AE$17))* (YEAR(Table2[Field1])=YEAR($AE$17))* (Table2[Field2]="emp") ) ``` Note: I am expecting a true date in $AE$17 (e.g. 01/02/2024) - then it is possibl...
A colleague of mine is creating a bibliography on a particular topic and is interesting in figuring out the relative contributions of each researcher to the field (in terms of paper number). Currently I think they are doing this by manually counting each entry, and they are unable to easily sort between conference abst...
In my codesnippit I want to make the red circle appear over the black box but under the text. The problem is when I add `transform: translateZ(0px);` to the black box, my `z-index: 2;` CSS on my text doesn't work anymore. I was wondering if there was a way for one thing to appear on top of another even if they are bein...
cat messages.properties | awk -v RS='\\\\u[0-9a-fA-F]{4}' '{ORS=""; print $0; printf "%c",strtonum("0x"substr(RT,3)) } END {print ""}' `RS='\\\u[0-9a-fA-F]{4}'` sets the record separator to a regex which matches unicode escapes The `{...} END {print ""}` block is then run for every record (string without unic...
In html, what can we write in the code to bring the content of my web page in the center ?? I have tried to write the code within {center} tag and {/center} but it's not working. so any other alternatives ?? I tried to bring centre alignment but it didn't happen.
Im currently working on modifying a server, which was written by another person. I now need to convert a non-static method into a static method. Everything works perfectly but this line of code inside the method: ``` var buOwner = SocketServer.GetClientByPlayerId(buUserId); if (buChatProjectId == SocketServer.Chat...
What is the purpose of a completely standalone 'this'?
|c#|asp.net|this|
null
Firstly, I do not think creating a pdf is similar to creating a .txt file. You cannot create a file called a.pdf and then get a pdf file like how you do with a .txt or .csv or anything else. You might be getting the files created, but they wont be pdf format file, rather a txt file with .pdf extension most probably. ...
scroll down in google maps with python selenium java script to scroll to the end of the result search list in the google maps you have to change the br`enter code here`owser luanguage first to the enlish second thing desactivate side bare. and past this code: # scroll down in google maps with python sel...
I want to get the top youtube search terms for a specific video from traffic source but unable to get it through youtube analytics api? Here is my code: ``` import csv from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from tabulate import tabulate SCOPES = [...
How can i get the top youtube search data from youtube analytics api?
|python|youtube-api|youtube-data-api|youtube-analytics-api|
null
> Not responding Git init comment in Visual studio code terminal . I write a c++ program in visual studio that code I will send remote repositories but can't send because Git init comments not work I'm see the only this error "......\\project\> git init [enter image description here](https://i.stack.imgur.com/oo4...
I'm new to Rust and I'm trying to write some tests to my module, but cargo keeps complaining on my `use super::*;` import, which doesn't make sense for me. Look at this MCVE: `src/ga/world2.rs`: ```lang-rust use crate::ga::individual::*; #[derive(Debug, Clone)] pub struct World { pub mutation_rate: f64, ...
Cargo complaining on unused super::* import on tests module
|rust|rust-cargo|
Using `http://host.docker.internal:5000` for me resolved the issue.
Currently, Azure DevOps doesn't support source branch filter when enabling "Report deployment status to Boards" in classic release pipeline. If you want such feature, you can submit a feature request [here](https://developercommunity.visualstudio.com/report?space=21&entry=suggestion). As a workaround, it's suggeste...
Is there a way to obtain author counts by importing a text bibliography into R?
|import|bibliography|citations|
I have a main table, Table 1, that includes columns for student ID and some other info. There is also Table 2 which includes columns for student ID, survey question, and response. Essentially, I want to append Table 2 to Table 1, but I only want to bring in the responses for the "Did you receive a GPA of 3.0 or higher?...
With ANSI SQL, how can I join data to my table that isn't available for everyone without losing results?
|join|amazon-athena|ansi-sql|
Debugging proxies like [Charles Proxy](https://www.charlesproxy.com/), [HTTP Toolkit](https://httptoolkit.com) and [Fiddler](https://www.telerik.com/fiddler) all have a few features that browser developer tools don't: * They can capture traffic from non-browser sources, like mobile devices and desktop applications. ...
How to properly handle byte buffers from C to Ada?
|c|stream|buffer|ada|libcrypto|
I've recently created a package called [django-sonar][1]. Which also contains an helper function called sonar() that dumps anything to the debug dashboard. Coming from Laravel I couldn't live without telescope and dd(). [1]: https://github.com/metalogico/django-sonar
Whilst `*self.tail` is a **place expression** (it represents the *memory location* to which `self.tail` points), in `let mut last = *self.tail;` it is being *bound by value*. As The Rust Reference documents under [Moved and copied types](https://doc.rust-lang.org/reference/expressions.html#moved-and-copied-types): ...
|postgresql|
null
**Goal:** I am trying to run checks against files users want to submit to validate them and block submission of bad files **Docs:** I am referencing https://www.perforce.com/manuals/p4sag/Content/P4SAG/scripting.triggers.submits.content.html which says > The following change-content trigger is a Bourne she...
How to check file content in a python script being run in a perforce trigger?
|python|perforce|
I'm working on a JavaScript function that compares two arrays of strings to see if their concatenated contents are equal. I've written two versions of the function, one using explicit variables and another more concise version. Surprisingly, I noticed a slight performance difference between the two implementations. ...
Performance difference between two JavaScript code snippets for comparing arrays of strings
|javascript|performance|optimization|
null
Your syntax is correct. The problem is that your quotation marks are not correct. You are using right and left quotation marks when you should be using straight quotation marks, `"` ``` U+201C: “ Left Double Quotation Mark - 226 128 156 U+201D: ” Right Double Quotation Mark - 226 128 157 U+0022: " Straigh...
I have a hosted zone for my apex domain `yzpaul.com`. I requested a certificate through AWS Certificate Manager for `yzpaul.com` and `www.yzpaul.com`. The `yzpaul.com` was approved almost instantly. I confirmed both CNAME records showed in the hosted zone. 24 hours later `www.yzpaul.com` still says pending. What am I m...
Downgrade to python 3.11.8, it will resolve all the py4j exceptions and errors.
I am new to writing functions and loops in R, and am wanting to iterate a chunk of code across columns in a dataframe, to create a new matrix of results. I am getting stuck with how to iteratively create new objects and matrices using/named after values in a certain column (Site) in my dataframe, to then pass through t...
dbt loop docs: 1. [Here][1] if you need it from the predefined list 2. [Here][2] if you need it from the table results Your case falls into the (2). You can create the following dbt model: ```sql {{ config(materialized='table' }} {% set payment_methods_query %} SELECT col_name FROM dev.abc {% endset %} ...
Not responding Git init comment in Visual Studio code terminal?
|c++|git|github|terminal|
null
You can use the `QUERY` function with the `limit` clause: ```cpp =QUERY(Sheet1!A:A,"limit 2500",0) ``` If you want to select the next 2500 rows, you can use the `offset` clause. The following formula for example returns 2500 rows starting from row 2501: ```cpp =QUERY(Sheet1!A:A,"limit 2500 offset 2500",0) ...
I updated the doc with a new tab titled "[WEEK 1] Copy of Leaderboard Report 1" after adjusting the original formula in the Leaderboard Report to reflect just Week 1's totals. I just adjusted the original data range, reworked the sum formula, and then added a filter to the first column (Week) - "where Col1=1." Hope thi...
`$('.plus-btn') $('.qty')` these selectors are targeting multiple DOM elements this is probably not what you want. You want to scope it and target the local plus and minus buttons. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> $(document).ready(function() { ...
null
I'm working on extending the input element to use the nice datalist autocomplete functionality, but restrict only to the elements in the datalist, much like a select. Problem is I need the data attributes from the options in the datalist. The search brings up a lot of failed attempts, [including this one with an acc...
Getting data attributes from HTML input element with a datalist
|javascript|html|input|attributes|datalist|
When I'm creating new project file, it generates new .csproj file where single tab replaced with two spaces. [![default behaviour][1]][1] I can manually replace them through `Edit->Advanced->Format Document (Ctrl+E, D)`, but I want to make it automatically when I'm creating new one. [![wished behaviour][2]][2]...
I have a cluster with two ingress controllers running. Haproxy and traefik. I am migrating away from haproxy. So I need them to run side by side differentiated by ingress class name. Haproxy is running as expected and respecting the class name. Traefik is not. I am using the ingress manifest not ingress route or gat...
I am using multiple Authentications in my .net 8 webapi (Cookie, OIDC, JWT). When I am adding only the reference to Microsoft.IdentityModel.JsonWebTokens im getting the error below. **Error** > Cannot redirect to the authorization endpoint, the configuration may > be missing or invalid. WebApi.csproj <...
As far as I see, you want to do scraping from an html page, so it won't work like file manager. You need to use either the `Beautifulsoap` or `Lxml` library from Python. The following code uses th `lxml` library, which should do what you want. It will save pdfs to the folder where the code is executed: import r...
iterating through raster bands to perform calculation
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...
This project only has one single module-level [`build.gradle`](https://github.com/brunodev85/winlator/blob/main/app/build.gradle), while the root-project `build.gradle`, which loads the plugins onto the class-path, is absent. Just take such one from another project and drop it into the directory above - or configure th...
I have an ASCII encoded Java properties file with unicode escapes (\u0123) in them that I need to convert to the new Java 9 UTF-8 format. So control character escapes (\r, \n, ...) need to stay but e.g. \u00E4 should become ä (UTF-8 encoded). The motivation to convert them to UTF-8 is that it simplifies the workflow...
I am new to writing functions and loops in R, and am wanting to iterate a chunk of code across columns in a dataframe, to create a new matrix of results. I am getting stuck with how to iteratively create new objects and matrices using/named after values in a certain column (Site) in my dataframe, to then pass through t...
Hi im currently trying to deploy my MERN application's backend on Vercel.. Before this try i learned deoploy mern site on vercel by small todo project. i work fine now and i do exactly same to the following project. but it show 404 error this is my file strucure [![enter image description here](https://i.stack.i...
why Backend deployment show 404 error message when deploy project on vercel?
|reactjs|node.js|mongodb|express|vercel|
I'm new to Python, and trying to learn how to combine tkinter and matplotlib. I have a code that plots triangle function when button is pressed and plots trapz function when second button is pressed. How can I make that when both buttons are pressed, both functions are shown in the same plot? Does anyone have any exper...
I'm trying to integrate a map into my project via openlayer. I followed different tutorials but I can't do it: - I have a div displayed but not the map - I have no errors in the console - I installed npm install --save ol please help me find a solution Mon ficher : App.component.ts ``` import { Component...
null
As of 2024, I think there is the `BinarySearchFunc` function in the `slices` package is also a great candidate: https://pkg.go.dev/slices#BinarySearchFunc.
We are getting URL on doUpdateVisitedHistory method of webview. Code : webView.setWebViewClient(new WebViewClient() { @Override public void doUpdateVisitedHistory(WebView view, String url, boolean isReload) { super.doUpdateVisitedHistory(view, url, isReload); ...
I’m thinking of creating an Auth server that sits on top of Cognito that manages the user session for my various applications spread across distinct domains. The goal being a Single Sign-On experience so that if you sign in via domain A, domains B and C will share that same session. This would be accomplished by red...
Secure to share Access Token over public API using CORs?
|security|oauth-2.0|amazon-cognito|
Cypress **aliases** are provided to bridge the gap between synchronous code like for-loops and asynchronous commands like `cy.request()`. You would need to - bring the code checking `break` condition inside the loop, - invert the logic so that you only continue if `continue_loop` is `true` This reproducible e...
OIDC Error after adding Microsoft.IdentityModel.JsonWebTokens
|c#|openid-connect|.net-8.0|
A PNG has 4 color channels not 3. [`pyglet.image.ImageData.set_data)`](https://pyglet.readthedocs.io/en/latest/modules/image/index.html#pyglet.image.ImageData.set_data) supports the "ARGB" format therefore you need to convert the image from RGBA to ARGB: ```py np_image[:, :, [0, 1, 2, 3]] = np_image[:, :, [3, 0, 1,...
i use psutil to calclate the cpu but i got weired results here is my code ``` import os import numpy as np import tensorflow as tf from PIL import Image import matplotlib matplotlib.use('TkAgg') # Use Tkinter backend for interaction import matplotlib.pyplot as plt from object_detection.utils import label_m...
I am trying to calculate the cpu percentage a certain process take but the values are very differnt than that of the task manger
|python|cpu|psutil|
null
I am trying to upload a file to a server and it only accepts the file in multipart/form-data format so when i try to send it by encoding like: ``` m = MultipartEncoder( fields={'document': json.dumps(metadata), 'files': (file_name, open(file_path,'rb'),'multipart/form-data'...
[I do **not** desire the review of any of the code in this question. Code present is purely for illustration purposes to demonstrate what I have come up with on my own. I am looking for a **performance optimization** pertaining to one **specific aspect** of an **algorithm**. Since potential improvements will be small, ...
when i make a slash command in discord js that dm me youtuber request it did not work and gives me error There was an error while executing this command! can anyone help im using node.js to code discord.js its using the discord js faq for the client.users.send('user id', 'youtuber request'); and the guide is every thin...
How do i make a slash command that dms a user in discord.js
|discord|discord.js|
null
I am trying to install openGauss by compile source code and my complie is all good but when I try to `sudo make install` it happens that error.How can I fix this problem? Here is my `.bashrc` file: ``` export CODE_BASE=/home/dblab/opengauss-compile/openGauss-server-v3.0.0 # Path of export BINARYLIBS=$CODE_BASE/...