instruction
stringlengths
0
30k
Why is userData an empty array even after fetching and awaiting the data?
I'm brand new to JavaScript, so bear with me! I have a webpage that has a scrollable div element. I've been trying to find a solution that adds the following functionality: A user scrolls down the page. Once the scrollable div element reaches the center of the viewport, scrolling input is switched from the pag...
It sounds like you're letting KNIME have more RAM than your machine can offer, which may be what's causing your computer to freeze. You mentioned adjusting Xmx setting, have you tried dialing it down, not just up? Have you been able to run your workflow on a different machine, or has someone else been able to run th...
|nlp|large-language-model|
I have a json like [ { "url": "https://drive.google.com/file/d/1tO-qVknlH0PLK9CblQsyd568ZiptdKff/view?usp=share_link", "title": "– Flexibility" }, { "url": "https://drive.google.com/open?id=11_sR8X13lmPcvlT3POfMW3044f3wZdra", "title": "– Prono...
I figured out I don't really need my viewmodels to be lifecycle aware and I want to replace them with just plane kotlin classes to handle the ui logic, my problem is hilt; since it will only allow me to inject fields into android components like activities or services. Now, I don't want to inject my plane class viewmod...
I am using Firestore to fetch data based on a filter that utilizes the 'array-contains-any' operator. Here is the code I am using to fetch the data - ``` const fV = this.getFV(this.selectedButton); return qnaCollectionRef .where('qS', 'array-contains-any' , fV) .onSnapshot((querySnapshot) => { ``` here is t...
null
You can also use `ri` from within `irb`. I'd recommend the [wirble gem][1] as an easy way to set this up. [1]: https://github.com/pablotron/wirble
I don't know if you're using it but You could use `custom_exception_handler` to transform any exceptions raised to the format you provide. Here is an example: def custom_exception_handler(exc, context): response = exception_handler(exc, context) if response is not None: response.data["...
I found these in the MacOS symbols: `▾` and `▴` Not sure if they will look proper on all devices though.
If you using REACT+typeScript on Front, by convention, you need use REACT_APP in your name variable, like this. ``` REACT_APP_NAMEOFVARIABLE = "Name of Variable" ``` And to use, u will use normaly. You can creates a variable or do a direct acces, like this: ``` const variableName = process.env.REACT_APP_NAM...
For the versions of the plugin that supports SMSS 2014 ,and SSMS 16-18, PoorMan's T-SQL Formatter requires the Visual Studio 2015 Isolated Shell installed in order to work. It can be downloaded from [here][1]. After installing it, the option will be made available. [![The formatter is now enabled.][2]][2] [1...
check dictionary is user exists
|python-3.x|
I should say first that I have found and read most (if not all) of the questions with the same error message. So far, none of lead to a solution. Most seemed to be aimed at IIS hosted apps. And the ones that are Azure hosted are old and just don't have solutions, or have dead links to old articles that no longer exist....
Azur Hosted Web App: A generic error occurred in GDI+
|c#|.net|azure|system.graphics|
Inject a class into a composable function using hilt
|android|android-jetpack-compose|android-viewmodel|dagger-hilt|clean-architecture|
null
There is no such command in vanilla `cargo` (well, there's `cargo install` but that's for dependencies), but since `cargo` supports [third-party subcommands](https://github.com/rust-lang/cargo/wiki/Third-party-cargo-subcommands) there is an answer: the [`cargo-update` crate](https://crates.io/crates/cargo-update). I...
In C# I have a class like this public class BClass { public int Ndx { get; set; } public string Title { get; set; } } This is then used within this class public class AClass { public int Ndx { get; set; } public string Author { get; set; } pub...
How do I initialiase a class within a class
|c#|class|initialization|
I am using NestJS and the solution for me was to add ` "typeRoots": [],` in `tsconfig.json`. I solved it accidentally and don't know why this works.
I am trying to get the total students who have enrolled in a particular course, with a course id, in this month only. The table structure is same as what remains in most of the Moodle databases. I dont want the total of students of all time, I just want to get them in this month. The code can be something r...
I am creating an endpoint in charge of verifying that the "pages" table verifies that all the records work by checking with axios to verify that the link field works correctly or at least a status of 200. The problem with my code is that the application freezes with the first record and does not advance, also if a rec...
{"Voters":[{"Id":446594,"DisplayName":"DarkBee"},{"Id":2802040,"DisplayName":"Paulie_D"},{"Id":272109,"DisplayName":"David Makogon"}]}
|typescript|nestjs|typeorm|
Has anyone experienced issues when running a command like this in SSMS?: ``` SELECT STRING_AGG(JSON_ARRAY(COL1, COL2, COL3 NULL ON NULL), ', ') FROM {schema}.{table} ``` In my case this closes the connection to SQL Server with error: > Msg 109, Level 20, State 0, Line 42 A transport-level error has > occu...
|r|dplyr|sparklyr|
|excel|vba|outlook|
I am having issues with a query which includes BEGINSWITH (or CONTAINS for that matter). I am trying to follow the example as found in the Mongo Db documentation: This query to find instances of the \<Pantry\> model is not filtering the way it should. (all of this is in the viewModel) This is the query: ```...
I have a question regarding web scraping on multiple layers of a website. For instance, I have a website about US elections having 2 layers. Layer 1: state information: include 50 states. Once I click each state on the table, I will jump into the Layer 2. Layer 2: city information in each state Once I clic...
Web Scrapping on Multiple Layers of a Website
|python|web|screen-scraping|
null
When I render a gfm report from Quarto and push to github, the gfm report displays a massive amount of html above the great_tables table. How can I prevent this? [![enter image description here][1]][1] ~~~ --- title: 'HTML junk' author: 'Joseph Powers' date: 2024-03-14 format: gfm --- ```{python} impor...
How to prevent html code appearing above python great_tables in quarto gfm reports?
|python|quarto|
The training process has stopped
My answer is on the basis of "a user should be able to have a view_page permission for one project instance, and don't have it for another instance." So basically you will have to catch "first user visit == first model instance", you can create "FirstVisit" model which will catch and save each first instance using `...
Check list of pages with axios
|next.js|axios|
When you want to return from an activity to it's caller/invoker then you should not start the activity to be returned to, you should **`finish`** the activity. So instead of:- back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ...
You're using Modules, so your main.ts should be like import { platformBrowser } from '@angular/platform-browser'; import { AppModule } from './app.module'; import 'zone.js'; //see that you "bootstrap a module" using platformBrowser platformBrowser().bootstrapModule(AppModule) ....
**Here is another way you can understand how debouncing works, here the state will be set 5 mili seconds late after the user stop typing.** import React, { useState, useEffect } from 'react'; const DebouncedInput = () => { const [inputValue, setInputValue] = useState(''); const [debounce...
I was able to make the view appears in a single animation by inserting hidden `UITextField` behind SwiftUI's `TextField` or `SecureField` and calling `becomeFirstRespoder` when the UITextField is initialized, like this: ```swift class FirstResponderField: UITextField { init() { super.init(frame: .zero...
|entity-framework-core|linq2db|
How can I write the logic to this function which should be able to do 2 things. ``` get_data <- function(database, table=NULL, query=NULL){ rlang::check_required( x = database ) if(is.null(query) & !is.null(table)){ # check whether code is piped %>% | |> query <- dbplyr::sql_re...
Write custom lazy evaluation function like dbplyr to get SQL
|r|dplyr|tidyverse|dbplyr|
Python Code: <pre> <code> ` from Crypto.Random import get_random_bytes from Crypto.Cipher import AES from Crypto.Util.Padding import pad import base64 def encrypt_string(input_string, key_base64, str_iv): try: key = key_base64.encode('utf-8') ...
how i can move element of dynamic vector in argument of function push_back for dynamic vector. Probably, i’ve said something and it isn’t right. Sorry, but i don't know English so good… `vector<int> *ans = new vector<int>(); vector<int> *x = new vector<int>(); ans->push_back(x[i]);`
How i can move element of dynamic vector in argument of function push_back for dynamic vector
|c#|c++|arrays|windows|vector|
null
I think i made a mistake either while defining or initializing the xml serializer... But i can't figure it out. Another try was use "Microsoft.AspNetCore.Mvc.Formatters.Xml.Extensions" to explicitly define the XmlSerializer but it does not work .. ``` [ApiExplorerSettings(IgnoreApi = false)] [Produces(...
c# Xml ModelBinding - Webapi .Net8 - Required Field not found
|c#|asp.net-web-api|
null
{"Voters":[{"Id":21305238,"DisplayName":"InSync"},{"Id":3832970,"DisplayName":"Wiktor Stribiżew"},{"Id":546871,"DisplayName":"AdrianHHH"}],"SiteSpecificCloseReasonIds":[11]}
I am not sure what is wrong. I have a basic understanding of git, but I am not an expert. In my remote branch, I have a file that has a bunch of changes, etc in it. In my local branch, this file is completely empty. When I open up github, and the file, I notice it has something like this, so I believe something ...
Git Not In Sync with Local Branch
|git|github|
Okay so basically the date format is dd-mm-yyyy (it's the format here in Portugal) , and the hour is hh:mm, and my code is this: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> struct DateTime { int day, month, year, hour, minute; }; // Function to convert date an...
|reactjs|asynchronous|async-await|
null
It can _almost_ be done easily in bash, with [the `declare` builtin](https://www.gnu.org/software/bash/manual/bash.html#index-declare): ```sh IFS=, declare -a "filenames=({${param_1[*]}}_{${param_2[*]}}_{${param_3[*]}})" declare -p filenames ``` ```sh declare -a filenames=([0]="coke_nugget_{cheesecake}" [1]="cok...
null
I have a wsdl file which has reference to multiple xsd files in nested folder system . I want to parse it and show on the ui with react js library I tried few libraries with node but it hits actual backend and doesn't give parsed evelope
How do I render wsdl with xsd extensions in react js with the information like operation method sample request and sample response
|javascript|reactjs|node.js|soap|wsdl|
null
Turns out, that `flex-direction:column` also affects `::before`s (and `::after`s). Remove that, and... Well, now there isn't a space between the `::before` and the element now. This can be fixed by adding a no-break space `\00a0` at the end of the `::before`'s `content`. Here's the correct code: ```css /* ... */...
I am following a guide to fetch payment details before creating an intent. https://docs.stripe.com/payments/accept-a-payment-deferred?platform=react-native&type=payment&integration=paymentsheet#react-native-setup I can't seem to find a way to save payment methods. I have two types of users. Users that make subscr...
AES-256-CBC encryption returning different result in Python and PHP , HELPPP
|python|php|encryption|aes|
null
i have 2 dynamic lists & 2 maps **2 List** List<dynamic> superDeepList1 = [ [ { 'name': 'Alice', 'age': 30, 'height': 5.8, 'isStudent': false, 'friends': ['Bob', 'Carol', 'David'], 'address':...
|javascript|php|wordpress|download|
I am building a Python stored procedure that will execute a lengthy process and return a result. To improve performance, the handler code will be decorated with `functools.cache` to cache results. The following code is a minimal example that demonstrates the problem: ``` create or replace function get_key(which var...
Problem decorating Python stored procedure handler with @functools.cache
|snowflake-cloud-data-platform|
null
{"Voters":[{"Id":3636601,"DisplayName":"Jens"},{"Id":214525,"DisplayName":"f1sh"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"}]}
If you want to execute a command remotely, you'd typically use [ssh](https://linux.die.net/man/1/ssh). You don't need to do any socket programming to use ssh. If you can use ssh, then you should. You shouldn't reinvent the wheel. And using ssh is far more secure! It sounds like this is a class assignment. You n...
I would suggest transforming `slice_pairs` into a sequence of mutable slices first, then use all these slices in parallel. Subdividing a whole slice into multiple independent sub-slices (from the borrow-checker's point of view) can be done with [`slice::split_at_mut()`](https://doc.rust-lang.org/std/primitive.slice....
I'm developing a .NET 6 application that allows the user to configure the integration with an external LDAP, possibly using SSL. I'm trying to setup a container image to distribute the application but I'm having trouble with allowing the user to inject custom certificates inside the running container without using vol...
Allow for injection of custom certificates inside rootless docker container with .NET application
|asp.net|linux|docker|ssl|
I don't think you need to do this in Pandas. You can create a class that tracks the current section and bumps it by 1, or appends a subsection, or truncates and increments, based on the paragraph type. Here is an example: ```python class SectionCreator: def __init__(self): self.section = [0] ...
MongoDB is a NoSQL DB and by design you should only be querying a single row by ID, and all aggregations are meant to be separately. E.g. during write time. [$concat](https://www.mongodb.com/docs/manual/reference/operator/aggregation/concat/) will not really work for you since it aggregates values within a single ro...
It's a strange array structure, but based on your description this should work: const arr = [ Object.entries(jsonobject) .map(entry => entry.join(':')) .join(', ') ];
I am trying to convert a Jsonobj that i fetched using async/await into an array, i have been doing it like this: ``` const apiurl = 'https://api.wheretheiss.at/v1/satellites/25544'; async function getArray(){ var arr= []; const response = await fetch(apiurl); const jsonobject = await response.json(); ...
I recently had to change my SSD drive. I got my Flutter android apps from backup and now I've created new update for one of my apps, but when I tried to install this update, I got 'App not installed as package conflicts with an existing package' error. The fix is simple, just uninstall existing app and install new on...
Flutter apk installation package conflict
|android|flutter|installation|apk|
null