instruction stringlengths 0 30k ⌀ |
|---|
Supabase auth sessions are stored client-side, so in theory clearing local storage without calling your logout API endpoint should suffice. However the downside is that if the user is logged in on multiple devices, this will only log them out on the current one. |
I coded this to output a title to the a window in tkinter and when I run my code a window pops up but there is no text inside.
import tkinter as tk
from tkinter import ttk
#window
window = tk.Tk()
window.title ('Test')
window.geometry('300x150')
#title
title_label = ttk.Lab... |
I generate a temporary csv from a sheet of an xlsm file.
Below saves it locally. I only need it to be emailed.
```vba
Sub ExportSheetAsCSVAndEmail3()
Dim ws As Worksheet
Dim wbExport As Workbook
Dim csvFile As String
Dim OutApp As Object, OutMail As Object
Set ws = ThisWorkbook.Wor... |
Generate temporary csv from sheet then attach to email without saving |
|excel|vba|outlook| |
null |
Here is a slightly edited version that will work in the expected way:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
$("#test-form").on("input",function(ev){
const checked=$(".form-check-input:checked").get().map(el=>el.value)
$("#selected-cases")... |
I am new to gcc and I'm trying to modify the source code of either *gcc* or *arm-none-eabi-gcc* in order to rename the compiler in the codebase to something like *myCompiler*. This adjustment would enable commands such as `myCompiler --version` to be recognized.
I understand that using symbolic links offers a workar... |
UPDATE
The parameter has been updated to **with_vectors**.
Simply set with_vectors = True in your search method. |
|javascript|html|reactjs|button| |
When running my code I realized that after around 30 requests it gets very slow to fetch the rest, taking a long time to complete the code.
My goal with this code is to fetch users from a Telegram's group and dump their information in a JSON file, with ther name, username and bio.
This is the code I am running:
... |
I've been having lots of problems with ```NavigationSplitView``` in **SwiftUI** under **macOS** (14.3 if it matters). The latest one is this: ```NavigationSplitViewVisibility.detailOnly``` doesn't seem to do anything, it just reverts to showing the 3 original columns. If anyone knows how to actually trigger ```Navigati... |
NavigationSplitViewVisibility.detailOnly not working in macOS |
|swift|macos|swiftui|navigationsplitview|navigationsplitviewvisibility| |
I'm following the Next.js 14 Learning Tutorial ([https://nextjs.org/learn/dashboard-app/fetching-data][1]) and I'm able to do everything they show.
To show data in the frontend they first create a file with the definitions of our data:
**definitions.tsx**
// This file contains type definitions for your... |
Display user data in Next.js 14 standards without extra libs |
|react-typescript|next.js14| |
|python|linear-regression| |
|sql|presto|trino| |
[
'a' => [
'a' => ['a' => null, 'b' => null],
'b' => ['a' => null, 'b' => null]
],
'b' => [
'a' => ['a' => null, 'b' => null],
'b' => ['a' => null, 'b' => null]
]
]
How can I get the below string from the above array?
... |
Just find another way to do it. `window.getSelection()` is just frustratingly poorly designed. It should have been a text based function, not a node based function from day 1.
Let's take something really basic - you want to highlight a text an make that section bold. Great, window.getSelection() is fantastic for tha... |
What is happening here:
- You see a gradient cause of vertex attributes interpolation.
- [![enter image description here][1]][1]
- There is an optimization inside [`THREE.BufferGeometry`](https://threejs.org/docs/#api/en/core/BufferGeometry), to minimise the number of attributes passes called `indexing` by reus... |
I am trying to use a form with two images, and then download both images to local when submitted the form. But both images are downloaded as the same image.
In HTML I have this fields:
<img src="data:image/jpeg;base64,UklGRoog..." id="foto_muestra__url_val">
<img src="data:image/jpeg;base64,/9j/4AAQ..." ... |
How do we set the `fontSet` attribute on `MatIcon` in order to get the Material Symbols to render.
I'm trying to render the [`expand_content` symbol](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aexpand_content%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4024) however it is not rendering as s... |
I'm working on a PHP project where I need to frequently merge multiple nested arrays. The key point is that I want to preserve unique key-value pairs across the arrays, giving priority to values from later arrays in the merge sequence.
**Here's a simplified example:**
```php
$array1 = [
'fruits' => [
... |
Efficiently Merging Nested Arrays in PHP While Preserving Unique Key-Value Pairs |
|php|arrays|algorithm|performance|merge| |
You are calling `round` on a complete `data.frame`, which is generally fine assuming that all columns are numeric. For instance,
```r
sapply(mtcars, is.numeric)
# mpg cyl disp hp drat wt qsec vs am gear carb
# TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
round(head(mtcars, 3))
# ... |
null |
First upgrade the pip version
pip install --upgrade pip
Then install system dependencies (Ubuntu)
sudo apt-get install -y libssl-dev libffi-dev libxml2-dev libxslt1-dev libopenblas-dev
Then try to install again
pip install rpy2 |
i would like to implement a formula to have rows hidden or unhidden dependent on the product type, From the research i have done so far i have gathered the solution to this will be VBA. I have next to no experience with this topic how ever.
' code edited into the question from the comments
Private Sub Works... |
When you publish packages, it's important to know where you're putting them. If you publish your packages to the default npm registry, registry.npmjs.org, they won't automatically appear in the GitHub Packages section of your GitHub repository.
For them to show up there, you need to publish them directly to GitHub P... |
{"Voters":[{"Id":6574038,"DisplayName":"jay.sf"},{"Id":22180364,"DisplayName":"Jan"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[13]} |
I'm developing PowerShell Cmdlets in C#. I would like to define mandatory parameters, but that are mutually exclusive.
Example:
Parameter A
Parameter B
When invoking the command, I must set only parameter A or only parameter B, but I cannot set both and I cannot set none.
|
How to my own cmdlet (using C#) with two input parameters mandatory but mutually exclusive? |
UPDATE- i ran the project in a different Ide and somehow it works fine now |
I have been learning how to use the Pi4J library and tried to implement the minimal example application that can be found in the [Pi4J website](https://pi4j.com/getting-started/minimal-example-application/)
The code that I used is here:
```java
package org.PruebaRaspberry11;
import com.pi4j.Pi4J;
import com.... |
|flutter|firebase|google-cloud-firestore|stream-builder| |
null |
I'm modifying a part of a fairly large tool that uses PyTorch to optimize some parameters. I noticed that if I add this line to the code, the results are getting worse:
self.gammas = self.gammas.unsqueeze(2).squeeze(2)
`self.gammas` is a tensor that at this point only contains zeros, and will later be optimiz... |
Why could a no-op change the optimization result? |
|pytorch|tensor| |
|c#|visual-studio|weak-references| |
Dear **@Vinayak Bhat**
Kindly first check you have same ios version in **xcode** and **podfile**
then run application after these commands:
Deintegrate the pods:
cd ios
pod deintegrate
Remove the Podfile and Podfile.lock:
rm Podfile
rm Podfile.lock
Remove the build folder:
... |
I'm extremely new to RPGLE and I'm getting some errors like:
`The length parameter must be a numeric constant between 1 and the maximum for the type. (20).`
on all of my zoned variables. And I'm getting
`The Factor 2 operand is not valid for the specified operation. (30).`
On my `Write ClassAverage;` What i... |
Why do I need numeric constant? |
|rpgle| |
Okay I figured out what was going on. In fact, my click event was firing first when the menu is open and I click the `toggle_button`. And my call in my toggle function `blur()` was firing the `focusout` event. I just needed to pass a check from the click event so that my toggle function knows not to blur. Now my code l... |
Adafruit BNO08x Lib Not working with PicoRP2040 - PlatformIO |
|arduino|i2c|adafruit|platformio|rp2040| |
```
List {
//I Want This Button To Appear When User Over Scroll To Top
Button(action:{}, label: {
Text("Archive")
})
ForEach(0..<5) { item in
ChatButton()
}
.listRowInsets(Ed... |
How can i create an animation like whatsapp archive button spawn animation with SwiftUI on WatchOS? |
|swift|swiftui|mobile|watchkit|watchos| |
Generate the following two result sets:
1.Query an alphabetically ordered list of all names in OCCUPATIONS, immediately followed by the first letter of each profession as a parenthetical (i.e.: enclosed in parentheses). For example: AnActorName(A), ADoctorName(D), AProfessorName(P), and ASingerName(S).
2.Query the ... |
I am trying to download a file from my ftp server. As soon as the file is larger than 300KB, the download fails. Below that limit, it works. The ftp server is running in a Docker container (image: delfer/alpine-ftp-server). Here is my method:
```java
public InputStream getInputStreamFromURI(String uri) throws IOExc... |
Yeap, you can do that, however requires kind of a workaround:
So you have your package structure (shortened of course):
- Package
-- Sources
--- Executables
---- Executable_One
----- main.swift
---- Executable_Two
----- main.swift
If you arrange it this way and try to launch ... |
I have a python code which uses Hugging Face Transformers to run an NLP task on a PDF document. When I run this code in Jupyter Notebook, it takes more than 1.5 hours to complete. I then setup the same code to run via a locally hosted Streamlit web app. To my surprise, it ran in under 5 mins!
I believe I am comparin... |
null |
`useCallback` and `useMemo` are drastically overused and then you run into problems like this where you're not sure if you should leave things out of the dependency list and then you get stuck and confused about the whole thing.
The simplest solution is to just not use `useCallback/useMemo` (unless and until you are... |
I had change bucket name too then It did works alright.
So very name and try again |
I want to implement inside my web-app a file-upload with Uppy package together with Supabase.
I followed this tutorial: https://www.youtube.com/watch?v=JLaq0x9GbbY
When I'm using this exact same code I'm getting this error on upload:
`
"error": "Invalid Input",
"message": "The object name contains invali... |
Query an alphabetically ordered list of all names in OCCUPATIONS Table |
|mysql| |
null |
It seems surprising you wouldn't use or consider **Parse.com** for something like this.
(If not Parse, some other bAAs with a similar feature set.)
Note: Parse is now at back4app.com.
1) Parse is the easiest possible way to do push with an iOS app
2) the whole idea of Parse is that you have cloud code, and ... |
My requirement is to have a core app to manage authentication, which should include google authentication (all-auth in django) and django_cas_ng (CAS authentication).
Now I want to be able to use this authentication app for multiple projects (CAS system).
I should register only for one app , and should be able to l... |
I am trying to implement authentication in django using django_cas_ng, and also provide a option for all-auth for google login |
|python|django|google-oauth|django-allauth| |
null |
This didn't work for me since /snap/bin was already in the path (Ubuntu 22).
Despite the path ok I got "/system.slice/cron.service is not a snap cgroup"
running anythin snap from cron.
I had to start a dummy process with just loading the selenium model and loop it infinitly, then it worked...
A better solution is... |
AG Grid is a client-side grid that is designed to be framework **ag**nostic. It is not dependent on any framework, allowing it to be easily integrated with any of them.
When posting, describe the problem, add some screenshots/code samples.
Don't forget to specify if you integrate it with frameworks like Angular v... |
This didn't work for me since /snap/bin was already in the path (Ubuntu 22).
Despite the path ok I got "/system.slice/cron.service is not a snap cgroup"
running anything snap from cron.
I had to start a dummy process with just loading the selenium model and loop it infinitly, then it worked...
A better solution i... |
I've got a page which needs to kick a user back to the previous one if they don't have permissions to view. I made this very simple component as a test but I'm finding that it navigates back two pages not one. Any ideas why?
import React, { useEffect, useState } from 'react';
import { useNavigate } from 're... |
Try using `datetime.datetime.utcnow()`.
Also you can use `datetime.datetime.now(datetime.timezone.utc)` which is more correct in Python 3.x |
|azure-devops| |
We have installed .NET 8.0 Hosting Bundle but when we go to change an application pool to enable it, it is missing from the list. How do we get this to appear?
It is also not under ISAPI and CGI Restrictions so may this be why? The path to .NET 8 seems to be different to 2 and 4 and where it is located there is no ... |
ASP.NET Coer 8 is missing from application pool selection after install |
|asp.net-core|.net-8.0| |
Not sure this is what you want, but it works if you just enclose the outer loop into a future.
I also changed two things:
- the assignment `command_set[[j]] <-` is done into the future
- the future returns the time difference
```r
library(shiny)
library(ipc)
library(future)
plan(multisession)
library(pro... |
I'm encountering an issue with React Router where I'm trying to implement authentication for my application using React Router's Route components. I have an Auth component that checks the user's authentication status by making an asynchronous request to my server's /users/check-auth endpoint. If the user is authenticat... |
For using refs in an array, [this earlier answer](https://stackoverflow.com/a/72835670/6243352) logs an empty refs array in Vue versions between 3.2.25 and 3.2.31 inclusive:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
const {ref, onMounted} = Vue;
Vue... |
|reactjs|node.js|firebase|google-cloud-storage| |
null |
In the case we use Mongo-rs instead of the standard MongoDB. This is mainly when we need the to transactions working with Mongo. However this requires a change it the connection string which becomes something like this:
`mongodb://localhost:30001/?directConnection=true`
In my case this was all I need to get thing... |
If you look at the `VideoFrame` `timestamp` property [docs on mdn][1]. It says it is an
> integer indicating the timestamp of the video in microseconds.
What does that actually mean -- as in when does this timestamp get generated?
- Is it the timestamp from when the frame got generated on the server?
- Is it... |
Collect all unique key paths of a multidimensional array |
|php|arrays|loops|multidimensional-array|key| |
null |
You shoudl try this it will helpful
```
const fetchCategories = async (father: number) => {
showLoading();
try {
const { data: categoriesData, error } = await supabase.from('categoria').select('*').eq('pai', father);
if (error) throw error;
setCategories(categoriesData);
hideLoad... |
You need to trust the workspace; otherwise, it will not show icons of extensions in the activity bar. |
Try using the following formula:
[![enter image description here][1]][1]
----------
=LET(
_LastRow, COUNTA(L:L),
_FRng, B3:INDEX(B:M,_LastRow,),
_CriteriaRange1, L3:INDEX(L:L,_LastRow),
_CriteriaRange2, M3:INDEX(M:M,_LastRow),
_Output, FILTER(_FRng,(_Crit... |
|optimization|scipy|scipy-optimize| |
Type compatibility checking in typescript is based on [structural equivalence](https://www.typescriptlang.org/docs/handbook/type-compatibility.html). That means, for a type `A` to be compatible to `B`, on the instance (ie non-static) level there must not exist a required property or method in one of them, that does not... |
A python script is being executed by a QProcess. Inside this script, a specific file should be open and written to it. The file path should always be `\\127.0.0.1\folder\myfile.json`.
def write_to_json(IP, slice_id, json_lines):
#IP = "127.0.0.1" (or any other network id as str)
#slice_id = 1
... |
Opening specific path to file stored inside a network connection whencalled by QProcess(Pyside6) |
|python|pyside6|qt6|qprocess| |
{"Voters":[{"Id":1509264,"DisplayName":"MT0"},{"Id":22180364,"DisplayName":"Jan"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[11]} |
Yes, you can run both Angular and NestJS on the same server.
One approach, although not required is to run each in a docker container.
I have integrated Angular and NestJS in a boilerplate project.
You can refer to the "prod" folder there and check the docker compose file.
Feel free to fork the project and use it... |
Im making a calorie counting just for learing, as a beginner.
I wont to create def where i can choose the name(self) that will be enscrpted to the class, insert to this one name values in order to use them later but the value enscripted to class is not what i write as variable but just the name of the variable i gived... |
What does the VideoFrame timestamp actually correlate to? |