instruction
stringlengths
0
30k
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
My Firebase save each user with 4 features:name,email,password and confirm password. The class of users: public class Users { String Username,Email,Password,ConfirmPassword; public Users() { } public Users(String username, String email, String password, String ...
Based on a comment on one of the answers, this is asking how to use Share to send a clickable link to another app, where the link is a custom URI. * It won't work to send a custom URI. There is no (general) way to tell other apps that is what you are sending. They will only receive a string. * Instead, Follow ap...
Why google map does not work after gradle, kotlin, libraries updates
|android|kotlin|google-maps|
From the output given, it seems like your task is to extract the `'timeseries'` value corresponding to the index of the `'YALE'`. This code should do the trick: ``` def filter_dictionary_by_value(dataset, value): index_value = np.where(dataset['site'] == value)[0] filtered_timeseries = dataset['timeserie...
I have just learned something about GADT in OCaml through [Real World OCaml](https://dev.realworldocaml.org/gadts.html), and want to try to transfer the first little language there into a interpreter, thus using menhir. The ast definition is totally the same as the example.Here is it: ``` type _ value = | Int :...
How to use menhir to pasrse into a GADT expression?
|ocaml|interpreter|gadt|menhir|
How to implement a higher order component using TypeScript?
|error-handling|react-router|higher-order-components|
null
I am making a multiplayer game with Mirror and trying to make player names that float above players. But when the host enters his name, the client's name will be the host's name. I do not want this and I have no idea what's causing it. Here's the Name Manager code which is on a prefab. I am using unity 2022 ``` p...
Player names not synchronizing in unity Mirror Networking
|unity-game-engine|networking|mirror|
null
I am building a RAG-based ChatPDF application. The user can enter the PDF to generate the embeddings for, the embeddings are stored in a vector database (I am using Chromadb). Now all the basic chat functionality is working all fine along with the basic chat. The user asks questions and the model can remember the conte...
The problem was pulling in the datetime and trying to use it as the variable for dt. When I create a random string with: ``` (''.join(random.choices(string.ascii_lowercase, k=12))) ``` it works. So for anyone trying to do this, create a random string instead of trying to use datetime for the variable.
I am looking for solution that when I get API response then I want to update searches property in the initial state but I am unable to update. I tried following methods but not working state.searches = data // not working state.searches.push(data) //not working return {...state, searches:[...state.searches, sta...
``` var mongo = require("mongoose") session10 = await mongo.startSession try { await session10.withTransaction(async () => { console.log("transaction started"); await readonlymodel.findOneAndUpdate({}, { $set: { readonlyMode: true, ...
i followed this article [sqlshack link](https://www.sqlshack.com/change-default-database-file-and-backup-paths-in-sql-server-on-linux/) to change the database file default location. i completed all the steps, but after when i'm trying to create DB i encounder below error. i also tried this [stackoverlow post](https://...
in Ubuntu CREATE FILE encountered operating system error 5(Access is denied.) MSSQL
|sql-server|ubuntu|access-denied|
null
I am using nano pi neo board. and the Linux kernel 4.14 but when i login the board, i only see /dev/tty* and /dev/ttyS* files, /dev/ttyUSB file is not shown in /dev/ director. how can i fix this problem ? How to config the kernel and how to config the dtb file? but when i login the board, i only see /de...
/dev/ttyUSB does not show
|nanopi|
null
Need to implemented any type of event like local notification or log on App terminate. It should call every time when app is terminated and if app is put into the background for 1 day then also it should called. I have tried following ways **applicationWillTerminate** :- It will only called when user directly kil...
iOS: Need Event when App terminated by the user in Swift
|ios|swift|uikit|
null
Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarray, return 0 instead. Example 1: Input: target = 7, nums = [2,3,1,2,4,3] Output: 2 Explanation: The subarray [4,3]...
{"Voters":[{"Id":5468463,"DisplayName":"Vega"},{"Id":6461462,"DisplayName":"M--"},{"Id":22180364,"DisplayName":"Jan"}],"SiteSpecificCloseReasonIds":[16]}
How can I add automatically generated IDs to guests? For example, as shown in the picture below, I have two guests: the first one with ID=0 and the second one with ID=1. I want to remove the numbered IDs and add generated IDs instead. My function: fun saveToFirebase( guest: MutableMap<String, Any>, ...
How to Automatically Generate IDs in Kotlin with Firebase?
|firebase|kotlin|android-jetpack-compose|
My App at expo is developed with React Native and Apollo Client and connects to a graphql server using useQuery to bring data from a mongodb database, in development it works correctly, but when I generate the apk and install it on any cell phone that has Android 11 or higher does not work, however it works correctly o...
null
|clang|read-eval-print-loop|
I am trying to filter dictionary by value (dictionary with different data types), but got the error: > ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() I want to get all records corresponding to ...
As the new maintainer of this library, our team hold a different opinion from Ilya. Like we explained in [this GitHub issue](https://github.com/lextudio/pysnmp/issues/58), the users of `SnmpEngine` type should explicitly free up resources (including tasks) by calling `SnmpEngine.transportDispatcher.closeDispatcher()...
Assuming, you're using resteasy-reactive: If adding the locale manually works, then why don't you do something like this: ```java @Path("/test") public class HomeController { @Location("home") Template homeTemplate; @GET @Produces(MediaType.TEXT_HTML) public TemplateInstance showHome...
Suppose I have the following code: ``` class Guardian { constructor(public name: string) {} /* ... */ } class Father extends Guardian { constructor(name: string) { super(name); } /* ... */ } class Mother extends Guardian { constructor(name: string) { super(name); } /* ... */ }...
Try this method, let commandItem = '<CommandItem><a href="@/src/app/page.tsx">Моя статистика</a></CommandItem>'; let newHref = 'https://example.com'; // Replace this with your link commandItem = commandItem.replace(/href="[^"]*"/, `href="${newHref}"`); console.log(commandItem); ...
I am completely new, bear with me. I have Python 3.11.4 installed on my Mac. According to the OpenAI Quickstart guide, I must install the OpenAI Python library by running **pip install --upgrade openai** in my terminal. (Side note, I'm using the Terminal from the spotlight search on Mac. When launching Jupyter No...
Setting up an API Key in the MacOS terminal, for beginner
|api|jupyter-notebook|terminal|openai-api|chatgpt-api|
{"Voters":[{"Id":2029983,"DisplayName":"Thom A"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":1974224,"DisplayName":"Cristik"}]}
In spring boot, The same method is used, in the controller, an internal event is issued and the consummation succeeds, but in the kafka event handler that comes from outside, the internal event execution fails. The event uses @transactionalEventListener to operate only when the transaction ends normally. The serv...
Perhaps this is due to a gap in my understanding, but I've been trying to find a solution to the Deadlock issue in MySQL for the past few days. Despite my efforts, I'm still encountering a deadlock. I attempted to manage it using a try-catch block (\Exception $e), but the deadlock error isn't being caught. Does anyone ...
The remote config allows key-value data to be sent to the frontend, but it needs to be actually used by the networking library. The way the networking library picks up the language is similar to web browsers, by using `Accept-Language Http Headers`. Firebase Hosting also [says it uses this method][1]. Note that the ...
I have a use case where I want to create a function which i can use on every database available on my PostgreSQL instance so I can give execute grant to a non-super user. Task of this function would be to get the user password hash from pg_shadow. I will add this user to Pg bouncer user list to access user match...
How to create a global function for a PostgreSQL instance
|postgresql|pgbouncer|
One problem I see is when you are extracting the `Content-Length` value from your `header`, you are expecting `Content-Length` to be the last HTTP header stored in the `header`, but it is not the case in your example. The reason you are making that assumption is because when you are calling `substring()` to grab the...
How to navigate to previous chats using Langchain much like ChatGPT does?
|python|mongodb|langchain|large-language-model|chromadb|
The content of the header element has a "jumping effect" when scrolling. This only happens on iOS mobile devices. The header has `sticky` position. If I change it to `fixed` position, it fixes the issue, but then the scroll bouncing effect doesn't work well. How is it possible to fix this issue without using fixed p...
"jumping effect" with sticky position on newer iOS devices
|css|webkit|sticky|
null
{"OriginalQuestionIds":[42980662],"Voters":[{"Id":4621513,"DisplayName":"mkrieger1","BindingReason":{"GoldTagBadge":"python"}}]}
I am making a multiplayer game with Mirror and trying to make player names that float above players. But when the host enters his name, the client's name will be the host's name. I do not want this and I have no idea what's causing it. Here's the Name Manager code which is on a prefab. ``` public class PlayerNam...
> Does Saltstack have parameters or methods to define the output format of state? Yes, Salt provides multiple [output modules](https://docs.saltproject.io/en/latest/ref/output/all/), and you can define any yourself. With the CLI tools, the outputter is selected via the `--out` parameter. If you are using an AP...
|excel|vba|excel-tables|listobject|
pinvoke using EnumWindows in user32.dll. something like this would do what you want. <!-- language: c# --> public delegate bool WindowEnumCallback(int hwnd, int lparam); [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool EnumWindows(WindowEnumCallback lpE...
I have two HTML pages. *Index.html* ```html <div id="source"> Contenido de Usuario </div> ``` *Users.html* ```html <div id="target"> </div> ``` How to display the content of the source `<div>` element in *Index.html* inside the target `<div>` element in *Users.html* with JavaScript?
How to display the content of a <div> inside another <div> in another page?
{"Voters":[{"Id":23895086,"DisplayName":"Bread"}]}
|excel|vba|loops|excel-tables|listobject|
I dont really know how to code lua, i made a script, when "Numlock" is on the script clicks "a" for a random time duration, then releases "a" and it presses "s" for random time. repeats the script until numlock is turned off. it doesnt work tho.. ``` function OnEvent(event, arg) OutputLogMessage("wawa") ...
Looks like Microsoft new more technology which is not completed solution. And if you want to have some solid solution - you have to use third party providers like Azure Entra B2C. All that mess with they made in authentication is on purpose. To make simple things - hard. If you want to have something solid - you have t...
Error was due to @JoinTable annotation on the tacoOrder list in USER entity. By using mappedBy, we remove this extra table as its pretty uncommon to use joinTable on OneToMany relation and hibernate does not add the already persisted entity again.
|excel|vba|excel-tables|listobject|
Handling MySQL deadlock in CodeIgniter 4
I am looking for solution that when I get API response then I want to update searches property in the initial state but I am unable to update. I tried following methods but not working state.searches = data // not working state.searches.push(data) //not working return {...state, searches:[...state.searches,...
I write an azure function in python using vs-code for excel sheet transformation and want to store result in azure blob storage ,It succesfull on localhost I deploy Azure function on azure portal but it shows No http trigger found I used below code ``` import logging import azure.functions as func from a...
No HTTP Trigger Found In Azure function
|python|git|azure|azure-functions|azure-http-trigger|
null
Looks like `modelsummary()` outputs an object of class `"kableExtra" "knitr_kable"`. These types of functions are kind of like wrappers that do the tedious things for you, like getting information from `summary(fit)`, etc. The documentation for `modelsummary()` is pretty big... if I just wanted a tiny change like t...
I'm trying to add a tabset so that only tables have multiple tabs. I'm not entirely sure how to do this without the barplot changing positions. I want the bar plot to be in the middle but the tables to be on the left the bar chart. Anybody know how to do this? Here is my code: library(shiny) library(ggp...
How to add tabset to table position in this application using Shiny R?
|r|shiny|
How do I get a country as a region?
null
I have experience with this field. I have ever done Shoes virtual try-on project and that was the mobile application project. Of course the back-end was computer vision technique. For this project I used 3D object key points detection technique. All of shoes models should have 3D key points information and after ...
UITableView hierarchy is not in a single line
I have a Card component: ``` <div className="max-w-64"> <Card className=""> <CardHeader className="justify-between gap-1"> <div className="flex"> <Avatar isBordered radius="full" size="md" src="/avatars/avatar-1.png" className="mt-1" /> ...
Limit the width of an element(Tailwind)
|css|tailwind-css|jsx|nextui|
null
With tailwindcss 3 I need to set max width / height for image and I do it with definition : .img_preview_wrapper { @apply border-2 m-2 border-gray-400 rounded-lg md:w-11/12 xl:w-8/12; height: auto; } It works ok for big images, bot small images are shown in size in defintion above and...
Git merge strategies vs. merge drivers vs. mergetools
|git|merge|git-merge|git-merge-conflict|
I am trying to add Okta authentication to Backstage . The application in Okta is set up and I have the okta provider and component added to my Backstage configuration. When I try to log in via the Backstage Okta sign-in link, I get the error `"Unknown auth provider 'okta' at \<anonymous>"`. [![Unknown auth provi...
Backstage Okta authentication: "Unknown auth provider 'okta'"
|reactjs|okta|backstage|
You need to [open `fd` in binary mode](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/sopen-s-wsopen-s?view=msvc-170). _sopen_s(&fd, FileToEncrypt, _O_RDONLY, _SH_DENYRW, _S_IREAD); should be _sopen_s(&fd, FileToEncrypt, _O_RDONLY | _O_BINARY, _SH_DENYRW, _S_IREAD);