instruction stringlengths 0 30k ⌀ |
|---|
Implemented basic setup of node-oidc-provider from this [github example][1] with mongo adapter.
When deployed under a https it got worked earlier, however when tried to deploy the same code in a different server, getting the error for token endpoint request.
added listener to provider and attached logs too.
... |
I want to add a SRT to a MP4 with matching names from same folder. I want to script it to keep doing this to all files in folder.
This works if I do **1 at a time**, but i have over 1,000 to do. How can I create a batch to do this
ffmpeg -i *source*.mp4 -i *source*.srt -c copy -c:s mov_text -metadata:s:s:0 langua... |
Adding SRT subtitle to multiple MP4 |
|ffmpeg|mp4|subtitle|srt| |
null |
Use adjusted local fallback font with Bootstrap 5 for different font weights |
I'm sorry, it was my mistake in that I didn't clarify the problem and the relationship between my tables well.
I solved the problem as follows:
public function edit(User $user, Termin $termin)
{
return $user->id === $termin->created_by_id || $user->team->id === $termin->call_center_id || $user->id ==... |
I want to show a new QWidget, which is set in a QScrollArea that has a grid layout, and then a QVBoxLayout is added to the grid one.
The program allows adding labels dynamically in this QVBoxLayout. I want the scroll area to have a fixed size, and when the labels' size exceeds the scroll area's size (height), the sc... |
Strange issue when recursively concatenating to string |
|javascript|csv|recursion|spotify| |
null |
I have a 18 GB `.parquet` file with a ~300M rows of accounting data (which I cannot share) and split in to 53 row groups. My task is to 'clean' the data by retaining in each cell, only specific words from a dictionary. The reading of the file is trouble free. The processing of the file ends in a segmentation fault o... |
I'm attempting to pull Nuget packages from Telerik's Nuget repository into an Azure build pipeline, however, none of the pipeline configuration attempts I've made seem to work. I either receive an error stating my nuget.config is not formatted correctly or a 401 error when connecting to the repository.
The below ... |
Just a simple confuse how do I update my *@model* data structure after I make a container like
```
@Model
final class Item {
var timestamp: Date
init(timestamp: Date) {
self.timestamp = timestamp
}
}
```
everything work fine but after add new attribute
```
@Model
final class... |
How to modify or update data structure using swiftData? |
|swift-data| |
null |
After investing numerous hours, I have identified both the cause of this issue and its solution. Avoid utilizing `nextTik()` before invoking `useFetch`, as it triggers fetching client-side rendering (CSR), causing you to forfeit SEO benefits (resulting in no fetched data in server-side rendering (SSR) mode on the sourc... |
So I'm trying to run a CMD check for a package I want to upload to CRAN but when running it on my Windows 11 cmd I get the following error:
```
* using log directory 'C:/Users/Zick/Documents/YEAB/YEAB-master/YEAB.Rcheck'
* using R version 4.3.3 (2024-02-29 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* R ... |
```c++
template <>
inline bool _Sp_counted_base<_S_atomic>::_M_add_ref_lock_nothrow() noexcept {
// Perform lock-free add-if-not-zero operation.
_Atomic_word __count = _M_get_use_count();
do {
if (__count == 0) return false;
// Replace the current counter value with the old value + ... |
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
import time
options = Options()
options.add_argument("user-data-dir=C:\\User... |
I've got a postgres DB with a sequence table that has columns like so
| id | name | sequence |
| -------- | -------------- | -------------- |
| 191212 | seq1 | gtagagctttttttgatgttctatcatcttgggggggaaa |
| 414124 | seq2 | cccggtttaatatttggttttttgggagggagagagagggggggagag |
I'm wondering... |
I've got a horizontal range of numbers in cells, and a vertical range of numbers in some other cells. I want a product of those ranges. For example cells A1:D1 contain 1,2,3,4 and cells A2:A5 contain values 5, 6,7,8. I except to get an answer of 70.
I run =SUMPRODUCT(A1:D1, A2:A5) and it gives me #VALUE. Same proble... |
Why does my simple Excel formula =SUMPRODUCT(A1:D1, A2:A5) return #VALUE error? |
|excel|excel-formula|sumproduct| |
null |
How could python async function become effective before its parameter being evaluated? |
I have a piece of MATLAB code that I want to translate to python, here is the relevant part of code:
assuming x is a list,
% The size of x
N=size(x);
N=N(2);
The issue is at the second line. I understand the index syntax if it was say `x(2)`, but `N(2)` I don't understand. I've tried looking at w... |
Variable syntax in Matlab |
|matlab| |
*(please give me an explanation if you are downvoting)*
# Rational
An array is a data structure passed by reference. This means that the array holds a point of reference in the **RAM** memory to a set of variables and when it is passed to a method and the values inside are modified, the modification is done at th... |
I think scss syntax allows you to put the ```::before``` pseudo element inside ```mat-expansion-panel-header```
```scss
mat-expansion-panel-header {
position: relative;
::before {
content: '';
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
z-index: 1000;
... |
I'm trying to run and deploy the Dalle Playground on my local machine using an AMD GPU, I'm on Windows 11 with a WSL instance running. </br>
[Link to Dalle Playground repo][1]
System OS: Windows 11 Pro - Version 21H1 - OS Build 22000.675
WSL Version: WSL 2
WSL Kernel: 5.10.16.3-microsoft-stan... |
mojo:
(e.g., App A)
get '/css/:file' => sub {
my $c = shift;
my $file = $c->param('file');
# Remove the "A" prefix from URL
$file =~ s{^A/}{};
$c->reply->static("public/css/$file");
};
ngix:
location /A {
rewrite ^/A(.*) /$1 break;
... |
null |
I need to read Parquet files written by Pandas using Pyarrow ( I can't change it for now) using PySpark.
I used `spark.read.parquet` to read Parquet files but I got the `Illegal Parquet type: INT64 (TIMESTAMP(NANOS,false))` error:
```
---------------------------------------------------------------------------
P... |
Pyspark: Read Parquet written with Pandas rise 'Illegal Parquet type: INT64 (TIMESTAMP(NANOS,false))' |
|python|apache-spark|pyspark|parquet| |
Error: EPERM: operation not permitted, unlink 'C:\Users\Bright-Ewuru\Desktop\full stack real estate\server\node_modules\.prisma\client\query_engine-windows.dll.node'.
This the error i get when running npx prisma generate with working with react, mongodb and express
I was expecting no error after i run npx prisma... |
[Inject]
IJSRuntime JS { get; set; }
if (!await JS.InvokeAsync<bool>("confirm", $"Are you sure you want to delete ?"))
{
return;
} |
## The background:
I'm writing a cross-platform word game helper app in SwiftUI. It's useful for games like Wordle. (a game where you try to guess a 5 letter word by guessing other 5 letter words and using info about the matching letters to zero in on the solution.)
The app is also useful for other "multi-Wordle" ... |
I am using the same tools on GIMP a lot, but they are not part of the toolbox, mostly tools from the filter or color menu (e.g. enhance, exposure,...). They are not in the list that I can select in the preferences/toolbox, so is there another way to attach these tools to the toolbox?
thanks,
Sina
tried to find t... |
how to add Filter menu and Color menu tools to Toolbox in GIMP |
|filter|colors|toolbox| |
null |
What you are looking for in this case is CSS.
Blazor is mainly a programing framework running on web assambly that mostly replaces javascript (javascript interop is still needed for some functions).
You can center a html object in the horizontal axis by creating a CSS class and then use it on the object:
<!--... |
|c++|c++11| |
```
<template>
<div v-if="loading"><loading></loading></div>
<div v-else-if="error"><error v-bind="error"/></div>
<div v-else>
<div class="title" v-if="!error"> <h1>Recently Added:</h1></div>
<section class="adverts" >
<adverts @update:isFavorited="updateIsFavorited" v-for="advert in ... |
If someone needs a separate `Dockerfile` for each project, you can put each `Dockerfile` in the project folder and use `docker-compose` to build and run them separately. The trick here is to config your `docker-compose.yaml` like this:
```yml
# [Solution Folder]/docker-compose.yaml
services:
app1:
build:... |
I have a Symfony application using Doctrine ORM. When creating a new Temp entity with relationships and trying to persist it, I get a 500 Internal Server Error.
`create:1 POST http://127.0.0.1:8000/users/create 500 (Internal Server Error)`
My`TaskController.php`:
```php
/**
* @Route("/tasks", name="ta... |
Now you can use `Trans` without converting every tag to number tag:
```json
"en": {
"product": {
"header": "Welcome, <strong>User!</strong>"
}
}
```
"strong" tags in translation file will be replaced with components' the value of "strong" key
```html
<Trans i18nKey="en.product.header" components=... |
|git|visual-studio-code|gitignore| |
I'm currently developing my first project, a simple paint application using Java Swing and AWT. While implementing the painting functionality, I encountered an issue with accurately capturing mouse movements, especially when moving the mouse quickly.
I've designed the application to update the drawing coordinates in... |
How would I tile windows in a SwiftUI Mac app? |
|swift|macos|window| |
I have a table called `Nodes` consisting of base doc, current doc, and target doc:
```
BaseDocType . BaseDocID
DocType . DocID
TargetDocType . TargetDocID ..
```
I want to fetch all the related nodes for any specific node. This is what I have so far:
```
With CTE1 (ID, BaseDocType, BaseDocID, DocType, Doc... |
I drew out a tree using your example to better understand the problem. A few things (assuming I did it properly) revealed by the tree are:-
A) In events 04 and 05 you don't need to store event 01, because in the case of 04: 02 is a parent of 04, and 01 is a parent of 02, so implicitly this info is captured. Same t... |
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from google.oauth2.service_account import Credentials
d... |
I'm using `pygame.mixer.music.play` to load and play a wav file as follows:
````
from pygame import mixer
mixer.init()
wavfile = "/my/wav/file.wav"
mixer.music.load(wavfile)
start = 0.5
mixer.music.play(start=start)
````
However, `start` seems to have a 1 second resolution. In other words, any float acts a... |
href="pictures/proxy-image.png"
and
src="pictures/proxy-image.png"
Are linking to the same file
They should link to 2 seperate files
The href=" is the full size image
and
src=" is a thumbnail image
JonofLeeds
|
{"Voters":[{"Id":9517769,"DisplayName":"Amira Bedhiafi"},{"Id":13061224,"DisplayName":"siggemannen"},{"Id":839601,"DisplayName":"gnat"}]} |
I am working or matching name project, and I am using metaphone3 in java to check if two names are matched phonetically or not, metaphone3 is working great in English names but the names that I am using are Arabic names, so some times i give it two alternative spelling names that should matched but it gives me a low pe... |
What is the minemum percentage in Metaphone3 that I can use it to tell these names are matched |
|java|large-language-model|metaphone| |
null |
I'm working on an Express API project and have come across an issue. I want to import my Mongoose models into the main project as a Git submodule. The idea is to keep my models in a separate repository for modularity across a few APIs. However, I'm running into issues ensuring that the mongoose connection established i... |
Importing Mongoose Models into main app as Git Submodule |
|node.js|typescript|mongodb|mongoose| |
null |
If you want to group and reduce the rows then don't use sum with window function.
Instead use sum and groupby.
Try:
select SUM(FLOW_AMT) as FLOW_AMT_SUM, ACID, ASSOC_ID, HARMED_BILL_DUE_DATE, TRAN_ID
from table
group by ACID, ASSOC_ID, HARMED_BILL_DUE_DATE, TRAN_ID
|
Difficulty capturing fast mouse movements in Java Swing paint app |
|java|swing|awt|mouselistener| |
null |
Somewhen I wanted to create a case insensitive autoloader, so I used the Example here:
https://www.php-fig.org/psr/psr-4/examples/
... and modified it a bit.
I added a method to create pattern for `glob()`. It creates a pattern where every single char exists in uppercase and lowercase, as long it differs in case... |
I am solving a problem that requires me to write a function that returns a pointer to a 2 dimensional array of integers, so I want to understand how memory for a 2D array or a multi-dimensional array is allocated using malloc? How is memory free'd in this situation? How do pointers work in this situation? I know a bit ... |
Pygame music play start position seems to have a 1 second resolution |
|python|pygame|pygame-mixer| |
I am having issues loading HTML into a modal window or sidebar in Google Sheets. I have tried starting a fresh project and I can instantly recreate the issue. Here is the *entire* code
function myFunction() {
var html = HtmlService.createHtmlOutput('<p>Hello, sidebar!</p>');
SpreadsheetApp.getUi().sh... |
503 error in google apps script sidebar and modal |
|google-sheets|google-apps-script| |
I created a script to generate a maze and it works as expected but during coding, I discovered I should create object instances differently, so I refactored this:
```lua
local Cell = {
index = nil,
coordinates = Vector2.zero,
wasVisited = false,
markAsVisited = function (self)
self.wasVisited = true
... |
You can also explore the functions `[REGEXP\_EXTRACT][1]` to pull out the list content enclosed in a square bracket [], combined with `SPLIT` to separate the extracted string into an array of individual values using space ' ' as the delimiter.
```
WITH sample_data AS (
SELECT 1 AS col1, '[1.2 4.2 6.3 3.1]' AS col2
... |
I am learning about design patterns in Python and wanted to combine the abstract factory with the delegation pattern (to gain deeper insights into how the pattern works). However, I am getting a weird recursion error when combining the two patterns, which I do not understand.
The error is:
[Previous line r... |
Adding GPS location EXIF tag to video recordings with AVAssetWriter |
|ios|swift|avfoundation|avassetwriter| |
|gradle|java-module|jlink|ehcache-3| |
```
import easyocr
import pyautogui
import cv2
import numpy as np
import time
from PIL import Image
def detect_numbers(region):
reader = easyocr.Reader(['en']) # OCR modelini İngilizce olarak başlat
while True:
screenshot = pyautogui.screenshot(region=region)
# PIL görü... |
Memory allocation for a 2D array in C, using malloc. Free'ing and pointers |
|arrays|c|pointers|malloc| |
null |
I am trying to make a collision system with multiple collider types (ie AABB and circle). A unique method for checking collision needs to be run for each type of collider. In order to determine the type I have given each collider an enum stating its type. Then when the program checks collisions it could compare their t... |
Generating a unique value using 2 different enums to act as cases in a switch statement |
|c#|enums|switch-statement| |
I have added two dependencies which can get WIFI name and can run the application in background. The application is running perfectly in the background but it get null in background. And when the application is open then it can get WIFI name.
```
import 'package:awesome_notifications/awesome_notifications.dart';
i... |
This is a simple Java program.
I will recommend to use Notepad and Command Prompt for same. To do so, you are required to configure Java Bin Path of System variables (for Windows, Environment Variables of Advanced system settings). Then open command prompt and enter below commands:
1. `cd FileFolderPath`
2. `javac ... |
|sql|sql-server|recursion| |
I have a json response where I need to extract the list of values for **files** and **folders**, however both the number of elements in each list and properties in the json response is not fixed as shown below:
JSON Response:
```
"config.yml" : "project: \n files: \n - file1\n - file2\n folders: \n - f... |
null |
<!-- language-all: js -->
*Try this single `array-style` formula(dont drag it down) in **Cell_C2**:*
=map(A2:A,B2:B,lambda(a,b,if(or(a="",b=""),,max(filter(F:F,E:E=a,F:F<b)))))
|
You could use `grep` within `vapply` with `ifelse`:
```
srch <- paste(df$PartyA, df$PartyB, sep = "|")
vapply(srch, \(x) ifelse(is.null(dim(df[, grep(x, names(df))])),
df[which(srch == x), grep(x, names(df))],
sum(df[which(srch == x), grep(x, names(df))])),
... |