instruction stringlengths 0 30k ⌀ |
|---|
1. Update to latest Next.js via: npm i next@latest react@latest react-dom@latest eslint-config-next@latest
2.Update package.json script for "dev" to: next dev --experimental-https
|
I'm struggling to solve the following problem. My window top left corner has negative coordinates when maximized (both x and y are -9), and it's size is actually bigger than the available area.
I'm using WinAPI to get some platform specific features like Aero snap, so it becomes complicated to understand why exactly t... |
|excel|vba|excel-tables|listobject| |
I subscribe to several nodes at the same time, so that I only receive a notification when the values change. I need to store the data in a csv file and I write rows with the timestamp + all values of the nodes. I implemented asyncio.Queue to handle the simultaneous writing, but still if I get more than one notification... |
|excel|vba|combobox|excel-tables|listobject| |
Firebase Functions use the body-parser middleware to automatically parse incoming requests. For multipart/form-data requests, this can cause issues because the stream that Multer tries to parse has already been consumed. This is why you're seeing the "Unexpected end of form" error, it's a result of the request's body s... |
|excel|vba|timestamp|excel-tables|listobject| |
```
if num < 0:
input('Only nonnegative intergervalues allowed, try again: ')
elif num == 0:
print('The factorial of 0 = 1')
while num > 1:
factor = factor * num
num = num -1
else:
num = int(input('Only nonnegative intergervalues allowed, try again: '))
```
This is what I have. I'm ... |
The following is my docker-compose.yml setup for Traefik with the only goal being access to the traefik dashboard over HTTPS. The error I continue to get is "redirected you too many times". I'm sure there is just something that I need to remove and I can't figure it out. I am able to create the Lets Encrypt Cert and I ... |
AWS LambdaPSCore creating package doesnt work |
|aws-lambda|aws-powershell| |
null |
$_POST is not being filled after the use of XMLHttpRequest in JS.
HTML + JS:
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>T</title>
</head>
<body>
<button id="press">Sample button</button>
</body>
<script>
document.querySele... |
JS-to-PHP ajax request not working properly |
|javascript|php|ajax| |
null |
I am new to web development and I have started working on Nodejs.
I am trying to connect to the MySQL Server on **port 3308**, *WampServer* but instead I always get connected to the localhost server.
To ensure that I am using the right ports and hostnames, I have tried to set up the connection using MYSQL Workbench a... |
Frameless Qt + WinAPI maximized window size is bigger than the availableGeometry() |
|c++|qt|winapi| |
I got a same nodejs server on two computers, one windows, one macos.
Through local network, I can visit the server on windows but not macos from my mobile phone(some WiFi),
but, but the windows computer can visit the server on macos. That's wizard.
Please help me if you have some advises. Thanks.
I expect acc... |
My phone can not visit the server on macos in the same local network |
|networking| |
null |
You use `packer.init` and looking at the quickstart part of the packer [README.md][1], it seems like plugins are installed using `packer.startup`. In there, you have to pass a function that takes a parameter `use`.
```lua
...
local packer = require('packer')
packer.startup(function(use)
use{
"kylenc... |
If you don't declare the class, PHP >=8 creates a fatal error.
Is there a short form for nested classes?
`$obj -> key1 -> var1 = "quick and easy"; `
Or is this the only possible way:
```
$obj = new stdClass();
$obj -> key1 = new stdClass();
$obj -> key1 -> var1 ="nasty";
```
respectively
```
$obj ... |
I've been trying to get the placeholder text inside of an OutlinedTextField to change color and it is just staying black, no matter what I do. I am using M3 theme and components. I can get everything else to change (text color, border color, etc), just not the placeholder. I'm hoping it's just something simple I am mis... |
|ansible|root|mount|fstab| |
null |
{"Voters":[{"Id":11613622,"DisplayName":"brc-dd"},{"Id":874188,"DisplayName":"tripleee"},{"Id":13376511,"DisplayName":"Michael M."}],"SiteSpecificCloseReasonIds":[18]} |
I'm looking for an angular 15 compatible example of using multiple mat-chip-grid. I've seen it done with mat-chip-lists in Angular 8[https://stackblitz.com/edit/angular-9gjwo4-rfudwx?file=app%2Fchips-input-example.ts](https://stackblitz.com/edit/angular-9gjwo4-rfudwx?file=app%2Fchips-input-example.ts). I'm looking ... |
**Problem description**
For this example I use Kivy 2.3.0 and Python 3.9.13. There are two main screen buttons. Each button opens a popup. Each popup's button is bind to a method. The problem is the time of execution of the method bind to the Action-2 button.
- **correct behaviour**: the button-1 opens the popup... |
Problem passing a function to a popup in Kivy? |
|python-3.x|kivy|popup|parameter-passing|kivy-language| |
Assuming all your Car,Boat,Mc objects implement `IVehicle`:
You can achieve this by using `OfType<T>` method which is LINQ extension method.
```
int count = vehicles.OfType<Car>().Count();
```
`OfType<T>` method as stated by Microsoft document:
> Filters the elements of an IEnumerable based on a specified... |
After performing a _migrations scaffold_ with the .NET CLI for _EF migrations_, there is a continual error in the terminal output where the SQLite extension already sees an existing table with the same name that was passed to the `dotnet ef database update` command.
Whenever the database attempts to be created, th... |
A scenario where data migration is needed from an Oracle Database, where application data is stored in a CLOB (Character Large Object) format, which could include files in formats such as PDF, XML, Base64, PNG, etc. The goal is to migrate these CLOB data into a Google Cloud Platform (GCP) Bucket.
Any ideal for above... |
Data migration from Oracle Database Clob to GCP Bucket |
|oracle|google-cloud-platform|blob|clob|bucket| |
null |
See example. Recursive assembling expression formula from expression_tree table.
```
with -- recursive -- for PostgreSql
cte as(
select expression_id,oid
,concat(
case when lv in('*','+','-') then concat('[',lid,']')
else cast(lv as varchar) end
,ov
,case when rv in('*','+','-') ... |
null |
I am new to web development and I have started working on NodeJs.
I am trying to connect to the MySQL Server on **port 3308**, *WampServer*, but instead I always get connected to the localhost server.
To ensure that I am using the right ports and hostnames, I have tried to set up the connection using MYSQL Workbenc... |
I came here only to get the auth trick, and then run the commands manually in the terminal. This solution is ONLY ABOUT the authentication part:
I had to install sshpass.
sshpass -p thepassword sftp theuser@ftp.thesite.com
Then you will be logged on sftp to run commands manually, without having to type ... |
In the [`python-keycloak`](https://pypi.org/project/python-keycloak/) has no profile API but you can do it by raw_put() (PUT REST API)
And profile PUT's payload has previous attributes too.
So I call GET API first, add unmanaged attribute then call PUT API.
#### Demo
```python
from keycloak import KeycloakOp... |
Issues with redirect when setting up Traefik Reverse Proxy in Docker |
|docker|docker-compose|traefik| |
Browsers restrict loading files from the local file system.
You have several options:
1. You can serve the image using a web server like express, nginx...
2. Use a cloud storage bucket and access it via URI
3. You can convert the image to base64 or something and display it directly by doing ```new THREE.Te... |
|excel|vba|excel-tables|listobject| |
I am need of updating my Ubuntu(using 18.04.4 LTS) machine so I can update NodeJS to the latest version.
Whenever I run 'sudo apt update' I get this error:
```
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY {A KEY IS HERE}
```
I get it for three different keys ... |
What is this error when trying to update Ubuntu? |
|node.js|ubuntu| |
The following is my docker-compose.yml setup for Traefik with the only goal being access to the traefik dashboard over HTTPS. The error I continue to get is "redirected you too many times". I'm sure there is just something that I need to remove and I can't figure it out. I am able to create the Lets Encrypt Cert and I ... |
# Whenever I try merging the datasets (TIGER/Line California data and CalEnviroscreen 4.0 dataset) the variables for CalEnviroscreen 4.0 show null values instead of the original values. Here is what I have done so far.
import esda
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
impor... |
{"Voters":[{"Id":642706,"DisplayName":"Basil Bourque"},{"Id":4712734,"DisplayName":"DuncG"},{"Id":139985,"DisplayName":"Stephen C"}]} |
I am new to three js and I’ve been working on a project where I want to cast a shadow of the import 3D model which is download from this [link](https://sketchfab.com/3d-models/mclaren-f1-1993-nfs2-edition-by-alexka-05207f338bd448b69c7b6eb65ad15025) also download the HDR file from the [link](https://app.gumroad.com/) fr... |
|python|artificial-intelligence|text-to-speech| |
|performance|testing|jmeter|load| |
Here is my code:
```
# Read the CSV file into a pandas dataframe
df = pd.read_csv(csv_file, sep='|', header=0)
for col in df.columns:
#Check if the word "date" is in the column name
if "date" in col.lower():
# Convert the... |
How to handle multiple "if" statements? |
|python|pandas| |
null |
|post|next.js|supabase|http-status-code-500| |
|environment|live| |
When using a Python Celery Task callback to process tasks on a Redis Queue, how do you dynamically change state/status to show interim updates within Flower?
```
@shared_task(queue='my_queue', bind=True)
def process_event( self, payload ):
self.update_state( state="PROGRESS", meta={ 'current': 1, 'max': 10 } ... |
How do you update Celery Task State/Status to see it in Flower? |
|python|asynchronous|celery|task|apply-async| |
null |
|amazon-web-services|aws-cloudformation| |
null |
{"Voters":[{"Id":4541695,"DisplayName":"DVT"},{"Id":12957340,"DisplayName":"jared_mamrot"},{"Id":22180364,"DisplayName":"Jan"}]} |
Lets take a hypothetical:
You have 3 different API's you need to call to process information on your side.
1. Only needs a response from the corresponding API, but the other process requires both answers before the process can finish.
You make 1 async call to the main API, but you would like your system ... |
Shadows not casted/received with HDR environment texture in Three js |
|node.js|three.js|webgl|3d-model|threejs-editor| |
null |
I've been trying to remove the product SKU located after the product title in WooCommerce email notifications.
I have tried the following:
```
function sv_remove_product_page_skus( $enabled ) {
if ( ! is_admin() && is_product() ) {
return false;
}
return $enabled;
}
add_filter( 'wc_prod... |
Remove Product SKU from order item details in WooCommerce email notifications |
In my fastapi app I have created a pydantic BaseModel with two fields (among others):
'relation_type' and 'document_list' (both are optional). I want to validate that, if 'relation_type' has a value, then, 'document_list' must have al least one element. Otherwise it will show a Validation error. How can I do it?
... |
Validation for multiple fields on pydantic BaseModel |
|python|fastapi|pydantic| |
This is my cluster config, where i have added some connector metadata
>cluster_config = {
"project_id": project_id,
"cluster_name": cluster_name,
"region": region,
"cluster_config": {
"master_config": {
"num_instances": 1,
"machine_type_uri": "n1-standard-4... |
I created a tileset resource with a new atlas. I then tried to select all the tiles, but wasn't able to select tiles in the very right column of the tileset and in the last row of the tileset. Below is a picture of the issue I am facing.
[![Whenever I click on a tile I want to add nothing happens.][1]][1]
[1]: ... |
Godot 4 can't select some tiles in tileset |
|godot|godot4| |
|sap-fiori|sap-cap| |
await warmDataCollection.deleteOne( { "content" : "/start" } );
|
## Startup validation (.NET 6 and above)
This has been discussed in this [dotnet/runtime issue](https://github.com/dotnet/runtime/issues/36391).
In **.NET 6**, a `ValidateOnStart` extension method has been added to [`Microsoft.Extensions.Hosting`](https://www.nuget.org/packages/Microsoft.Extensions.Hosting).
Y... |
{"Voters":[{"Id":807126,"DisplayName":"Doug Stevenson"},{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":13376511,"DisplayName":"Michael M."}],"SiteSpecificCloseReasonIds":[13]} |
You need not to put sleep in main thread, the thing is in golang main thread is the last thread which exit the program,
By default there will be a main thread so condition is that all the other thread which is being initiated by main thread must complete themselves.
For doing the other complete we can use multip... |
I was also caught a bit off guard with this behaviour in **nestjs event emitter 1.4.1**, but at the same time it makes sense it happens unless you handle those exceptions yourself.
But they ended up adding that type of handling in https://github.com/nestjs/event-emitter/pull/908, so you just need to update to event... |
You should have font-weight set to 900 for **Font Awesome 5 Free** font-family to work.
This is the working one:
<!-- language: lang-css -->
.css-selector::before {
font-family: 'Font Awesome 5 Free';
content: "\f101";
font-weight: 900;
}
|
I hava a SQL like this
```sql
select * from sys_region as sr
left join
(select count(*) as c,parent_code from sys_region * group by parent_code )
as c on c.parent_code = sr.parent_code
```
Also, there is entity
```java
@Getter
@Setter
@CTE
public class SysRegion extends BaseIdEntity {
@Column... |
Having trouble merging these two datasets for a Spatial Analysis |
|merge|geospatial|spatial| |
null |
{"Voters":[{"Id":23895086,"DisplayName":"Bread"}],"DeleteType":1} |
|excel|vba|forms|excel-tables|listobject| |
|excel|vba|excel-tables|listobject| |
If you can get the API to add a flag in staging for "deleted_flag" and get those records inserted into the staging table, you can simplify your MERGE statement to only do UPSERTs. Completely gut the portion doing DELETE and handle it outside the MERGE.
MERGE final_table AS trg
USING staging_table AS src ON ... |
I am working with a K8s environment running application (WEB API/interface) that interacts with a Cassandra database cluster. I need to simulate network latency or introduce delays specifically for responses from the Cassandra cluster to one of my Kubernetes pods.
I cannot touch Cassandra DB cluster or specific apache... |
Simulate Cassandra DB timeout |