instruction
stringlengths
0
30k
It’s not so much the event listeners, but how you declare each and every identifier throughout. So if you’re seriously concerned about the *Garbage Collector* doing its job (and you should be), you might want to refrain from declaring everything as constants, unnecessarily! Examples of **GOOD** constant declara...
I noticed that http services that receive and return JSON are called 'Web Api/Web Service' in many articles/book/documentation etc. But isn't the Web (World Wide Web) about websites, html and web browsers? For example, a mobile application is not related to the web. So why are http services that receive and re...
I need to be able to perform basic math operations across my census tract data in R. So for example, for CT13121009501 I need to multiply grade*PPT that correspond to that census tract, then I need to divide that result by the PPT(total sum for that census tract): [1(0.379) + 1(0.296)...+ 5(0.00946) ] / 0.379 +0.296 + ...
How to calculate a contrast of continuous variable in emmeans
I have a query I’m attempting to optimise. table1 has 300,000 rows and table2 has 100,000 rows Each table has key columns (key1..key15) I am attempting to select all rows in table1 and LEFT JOINing table2 on these matching keys. I also have wildcard keys in table2 (designated ‘all’) Here is a partial e...
# The external loop if input is invalid i = 0 while i < 5: # If it is 5th attempt, error message if i == 4: print('Sorry, The maximum number of attempts exceeded') #Upto 5 times of invalid input, takes another input num = int(inp...
icrosoft Windows [Version 10.0.19045.4123] (c) Microsoft Corporation. All rights reserved. C:\Users\Aliyan_Jabbar\Desktop\Aliyan Jabbar\Aliyan Jabbar IT class\New folder>npm i inquirer npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/inquirer npm ERR! 404 npm ERR! 404 'inquirer@*' is ...
npm ERR! code E404 Not Found - GET https://registry.npmjs.org/inquirer 'inquirer@*' is not in this registry.A complete log of this run canbefoundin:
|typescript|http-status-code-404|
null
No, it's not always necessary to use `waitForSelector`. If the element is already on the page, then just select it with `page.$`, `page.$eval`, etc, otherwise wait for it. If you're not sure whether it'll be there or not, best to wait for it. `waitForSelector` is basically a common-case convenience wrapper on the mo...
|android|kotlin|seekbar|android-seekbar|
def function1(ss:pd.Series): date4curr=df1.loc[ss.max(),'date'] dd1=df1.loc[ss].loc[df1.date!=date4curr].query("fraud==1") df1.loc[ss.max(),'fraud_count']=dd1.fraud.sum() df1.loc[ss.max(),'fraud_sum']=dd1.amount.sum() return 1 df1.assign(col1=df1.index).groupb...
I am scraping messages about power plant unavailability and converting them into timeseries and storing them in a SQL Server database. My current structure is the following: * `Messages`: publicationDate datetime, messageSeriesID nvarchar, version int, messageId identity The primary key is on `(messageSe...
|android|kotlin|android-jetpack-compose|delegates|
In C++, we can use 1ll to convert a number to `long long` type. Is there a similar way to convert to `long double` type in C++? If so, what should I multiply the number by? Thank you! I've tried `1.0f`, but that's not what I'm looking for because it lacks precision.
How to convert a double to long double in C++ style?
|c++|
null
I am trying to do a transparent background for my MatDialog component. Here is the code: *parent.component.html* openDialog(){ const dialogConfig = new MatDialogConfig(); dialogConfig.width = '340px'; dialogConfig.height = '476px'; dialogConfig.panelClass = "dialogClass";...
I am having trouble getting around the graphql in apollo client\server for a Next.js (app router) project. terminal says No HTTP methods exported in '..\app\api\graphql\route.ts'. Export a named export for each HTTP method. I am new to these tech stacks . Also would like to know if the directories are correct. I hav...
**Careful:** `git reset --hard` **WILL DELETE YOUR WORKING DIRECTORY CHANGES**. Be sure to **stash any local changes you want to keep** before running this command. Assuming you are sitting on that commit, then this command will wack it... ```bash git reset --hard HEAD~1 ``` The `HEAD~1` means the commit b...
null
{"Voters":[{"Id":4621513,"DisplayName":"mkrieger1"},{"Id":197758,"DisplayName":"toolic"},{"Id":8565438,"DisplayName":"zabop"}],"SiteSpecificCloseReasonIds":[13]}
I'm currently trying to find the colour red within a bitmap range for a program that isn't VB. The program will click once if the colour has been found, and if it hasn't been found will check for the colour again in a set period of time, say 200 milliseconds. I'm utterly clueless on how to work with bitmaps and h...
Finding a specific colour within a bitmap range - VB.net 2022
|vb.net|colors|bitmap|visual-studio-2022|
null
ok if i have this right, you have some div's in your main page body and would like to know when they scroll into view so that you can perform some action i believe this does the trick <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> window.onload=function(){...
Loop through multiple levels of a variable in R
|r|loops|for-loop|
null
|android|google-cloud-platform|google-cloud-shell|
I use axios interceptor response so I can get the refreshToken every time the accessToken expires but the problem here is that it doesn't seem to work ``` httpRequest.interceptors.response.use( (res) => res, async (error) => { const status = error.response ? error.response.status : ...
get refresh token in axios interceptor
|axios|oauth-2.0|oauth|interceptor|
null
I want to generate html table from a complex nested json,in PHP code here are details.. here is my json ``` [ { "node":{ "key":"header", "value":[ { "node":{ "key":"msg_id", "value":"236001" ...
generate html table with complex nested json
|php|json|
null
The syntax error is because TypeORM is trying to define the column as `created_at DATETIME(6)` with microsecond precision. This causes an error on MySQL 5.5, because the fractional datetime data type wasn't implemented until MySQL 5.6. Read https://github.com/typeorm/typeorm/issues/609 for a discussion of the bac...
I would recommend using `FormsModule` and `ReactiveFormsModule`. import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { ApiService, Listing } from 'your-models-and-services'; import { ActivatedRoute, Router } from '@angula...
I'm going to help you out, because it seems like you're new to this. First, in the future, please post sample data formatted in a way that it's easy for people to generate a query. I've taken the liberty of creating this for you in table variables like so: DECLARE @Table1 TABLE (ID INT, FirstName VARCHAR(50), L...
{"Voters":[{"Id":881441,"DisplayName":"Stephen Quan"}],"DeleteType":1}
I am currently making a project for my school for fun, and I came across a problem. The project is a paddle and ball game, and every time the ball hits the paddle the score SHOULD go up by one, but instead it increments by 3, and sometimes 2. I have thought of manually incrementing with another variable and a constant ...
Variable in Python going up by more than 1 at a time
|python|variables|game-development|increment|
null
I've asked this question from Posit Community but did not get any answer so far: https://forum.posit.co/t/snowflake-odbc-connection-xdg-open-missing-x-server-or-display/184074 I'm following up [this page][1] and [this page][2] to ODBC connect to Snowflake with R/Rstudio. I explained my environment and the code I ...
Snowflake ODBC xdg-open Missing X server or $DISPLAY
|r|snowflake-cloud-data-platform|odbc|rodbc|
you can use dotnet cli, this will set **ASPNETCORE_ENVIRONMENT** in published web.config. dotnet publish /p:EnvironmentName=PRD Also check the official document for other options. https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
I'm working with an R function that occasionally prompts the user with a message in the console, asking for input. Specifically, I'm using the tabla.frecuencias function from the "estadistica" package, which asks whether the user wants to group values into intervals. Here's the code I'm using: ``` library(estad...
Whenever I make an executable on visual studio I run into the same problems: 1. There are multiple files that the user needs to run the program (not just 1). Even if I go into the publish settings and select to produce a single executable, usually it will still include more than one file sometimes and I don't know w...
As far as I see, you want to do scraping from an html page, so it wont work like file manager. You need to use Beautifulsoap or Lxml libraries of Python (if you want to use python). Following code written by using lxml library which should do what you want... It will save pdfs to the folder where the code is executed. ...
Whenever I make an executable on visual studio I run into the same problems: 1. There are multiple files that the user needs to run the program (not just 1). Even if I go into the publish settings and select to produce a single executable, usually it will still include more than one file sometimes and I don't know w...
Error: Response not successful: Received status code 405
|typescript|graphql|apollo-client|apollo-server|next.js14|
{"Voters":[{"Id":9718056,"DisplayName":"Arkellys"},{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":13302,"DisplayName":"marc_s"}],"SiteSpecificCloseReasonIds":[19]}
How do I delete a white layer over dialog background in Angular?
# Yarn Users: Make sure `node_modules` exists (Yarn PnP) The new Yarn PnP paradigm will install modules in a different folder and thus `@types/react` and `@types/react-dom` will not be found by `tsserver`. To fix this without reverting to `node_modules`, you have to install [Yarn Editor SDKs][1] which are meant t...
|apache-flink|parquet|
null
null
null
null
|android|kotlin|android-fragments|
1ST CODE VARIANT: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> let getLastDayOfMonth = function(year, month) { let date = new Date(); date.setFullYear(year, month, 28); while (date.getMonth() === month){ date.setDate(date.getDate()...
I was trying send get request to my backend but getToken returns null its working on client side component. - Cookie Sharing: universal-cookie library was used. Client-server cookie sharing configuration was checked for a custom server. - NextAuth.js Session Management: It was verified that sessions are stored i...
i’m having some trouble trying to make a criteria filter for mi API, let me explain. I have the class A, with some common properties, like: Id, Created_at, Deleted_at, etc… And i also have the subclasses Subclass_B, Subclass_C, Subclass_D, and so on… The thing is, each of those subclasses have their own proper...
How to filter properties of derived classes in a DbContext with dynamic LINQ
|.net|linq|
null
`orientation` does not seem to work stable.\ Working with `aspect-ratio` may be the better way. ``` @media only screen and (max-aspect-ratio: 1/1){ //portrait } @media only screen and (min-aspect-ratio: 1/1){ //horizontal } ```
{"OriginalQuestionIds":[301134],"Voters":[{"Id":4621513,"DisplayName":"mkrieger1","BindingReason":{"GoldTagBadge":"python"}}]}
I am writing my data in a pdf table. It looks like this: `[[1,2,3,4], [1,2], [1,2,3,4], [1,2,3]]` -- the rows have different lengths, ranging from 2 to 4, as you can see. I'm using this code to style the rows: ```python table.setStyle(TableStyle([ ('INNERGRID', (0,0), (-1,-1), 0.25, colors.black), ('BO...
Laravel determines the policy based on the model you send to it. According to the official Laravel documentation, some policy methods like `create` do not require a model instance. You should pass a class name using the `authorize` method in these situations. This class name will be used to determine which policy to us...
Try refactoring your function to avoid using global variables to store intermediate results (`resstr` and `resarr`). Using global variables like this can cause issues in the context of running multiple tests in sequence since they would retain their values from previous calls across tests, leading to incorrect results:...
null
null
null
null
As far as I see, you want to do scraping from an html page, so it wont work like file manager. You need to use Beautifulsoap or Lxml libraries of Python. Following code written by using lxml library which should do what you want... It will save pdfs to the folder where the code is executed. import requests ...
Consider this R data frame: ``` # A tibble: 795 × 8 Epoch `Ultra-slow` alpha beta delta gamma theta Stage <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> 1 8 384. 74.1 13.6 1926. 0.316 204. A 2 9 21.9 10.7 1.79 155. 0.0518 23.4 A 3 ...
Creating a column whose value at index `i` depends on the values of another column around index `i`
|r|database|dataframe|statistics|
It's because you've set 1000px width to the parent (.row) .row {width: 1000px;} Try to change this value to 100%. It allows the div to take up the full width of its container. .row {width: 100%;} Don't hesitate to inspect your project with the dev tools within your browser to see how DOM's element...
|javascript|reactjs|riot-games-api|
Here's the code, courtesy of Firebase: ``` GoogleAuthProvider googleProvider = GoogleAuthProvider(); googleProvider .addScope('https://www.googleapis.com/auth/contacts.readonly'); googleProvider.setCustomParameters({'login_hint': 'user@example.com'}); final loggedUser = await Fireba...
Start Dart VM on a specific local port to avoid SMS confirmation
|python|python-requests|
|express|request|riot-games-api|
<div class="mob-search-box hidden-desk without-sticky"> <form class="form minisearch" id="wizzySearchForm-Mobile" action="/pages/search" method="get" data-gtm-form-interact-id="0"> <div class="wizzy-custom-search-form-wrapper mf-initial wizzy-custom-search-bar"> <div cla...
How to access input id or placeholder ,anything that can get me to the search box -under multiple div , selenium java
|java|selenium-webdriver|
How can this be in 3NF when through both keys the relation contains a partial functional dependency?
I am trying to generate SQL query from the agent by providing it the prompt, but when I am trying to execute the agent to generate SQL query it is giving me error, "This output parser only works with ChatGeneration output". I am using Ajax using turbo it is generating SQL, giving no error. Can anyone please help me?...
sql_agent returning parser error in Ajax llm
|ajax|prompt|large-language-model|few-shot-learning|