instruction stringlengths 0 30k ⌀ |
|---|
How to update an item inside if a TabView with .tabViewStyle(.page) in ios lower than 17? |
I'm trying to implement some basic auth for a NextJS app. I have a FastAPI backend which sends a JWT as a cookie on a successful login, which I can see setting the cookie in chrome dev tools, but I can't access this in NextJS.
The FastAPI code for the token request is:
```
@router.post('/users/token')
async ... |
Just encounter the same issue. But this time, for me, the problem was because of an incompatibility between the **Target framework** of the application (old .NetFramework 4.5) and a more recent version of Selenium NuGet package (4.18.1).
A cheap **solution that worked for me**: upgrading the Target framework of the ... |
I would use the more general type `Txn` and then check whether it is an `AssetTransferTxn` or a `PayTxn` within the method.
```
addLiquidity(
aXfer: Txn,
bXfer: Txn,
poolAsset: AssetID,
aAsset: AssetID,
bAsset: AssetID
): void {
``` |
Well, I have been trying to get into web scraping with selenium and works well on one of my devices with Chrome. But if possible i would like to use it on a different device of mine with Brave browser. I have tried some suggestions mentioned here but sadly none of them work anyomre either due to selenium undergoing upd... |
I have a a problem to rasterize and mainly plot the result.
We have a DEM with these features:
```
class : SpatRaster
dimensions : 1600, 1600, 1 (nrow, ncol, nlyr)
resolution : 100, 100 (x, y)
extent : 605998.7, 765998.7, 5059499, 5219499 (xmin, xmax, ymin, ymax)
coord. ref... |
I found a solution that is not based on importing tensorflow (which I dont use) but allows muting [through environment variables][1]:
Simply add this line to the beginning of your script.
```python
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # FATAL
```
This should work for any `tensorflow > 1.14`
[1]: ht... |
```
var j = schedule.scheduleJob(unique_name, timeNow, async function () {
session10.startTransaction();
try{
await readmodel.findOneAndUpdate({}, {
$set: {
readonlyMode: true,
yearEndClosure: true
}
... |
the transactions are not rolling back in mongodb |
|node.js|mongodb|express|mongoose|mongodb-query| |
null |
I have already solved the problem, it was that the permissions of a Powerbi workspace user had to be changed for the changes to be applied and the API in Powerbi to have access. |
Wagtail-CRX installs with a pre-defined StreamField ImageGalleryBlock that allow a user to select a Collection of images that are then output to the page along with a modal pop-up structure.
In *models.py* of my app I have created the image_gallery variable like this
```
image_gallery = StreamField([
('i... |
Worth it to access data by blocks on modern OS/hardware? |
|database|file|operating-system|storage|data-access-layer| |
If someone still looks for an asnwer, this configuration in `luukvbaal/statuscol.nvim` solves the issue. I tested it myself.
{
'luukvbaal/statuscol.nvim',
opts = function()
local builtin = require('statuscol.builtin')
return {
setopt = true,
-- ... |
>How to make Postgres GIN index work with jsonb_* functions?
You can't*. PostgreSQL [indexes][1] are tied to operators in specific operator classes:
>In general, PostgreSQL indexes can be used to optimize queries that contain one or more WHERE or JOIN clauses of the form
>
>>*`indexed-column`* ***`indexable-opera... |
{"OriginalQuestionIds":[41265266],"Voters":[{"Id":1746118,"DisplayName":"Naman","BindingReason":{"GoldTagBadge":"java"}}]} |
null |
null |
null |
null |
Update -
@Frank van Puffelen
Here are the screenshots on the data I am expecting from firestore from my webpage -
**Screenshot 1**
This is the data I am expecting from
```.where('questionState', 'array-contains-any', [1,2])```
[![enter image description here][1]][1]
**ScreenShot 2**
This is the data I... |
I am trying to create a network Load Balancer in OCI but i am getting the error below:
```
404-NotAuthorizedOrNotFound, Authorization failed or requested resource not found.
│ Suggestion: Either the resource has been deleted or service Network Load Balancer need policy to access this resource. Policy reference: ht... |
Rather than generating new points and finding a closest neighbor in `df.x`, define the probability that each point should be sampled according to your target distribution. You can use `np.random.choice`. A million points are sampled from `df.x` in a second or so for a gaussian target distribution like this:
x ... |
My WPF app won't start for two new users. It's ClickOnce deployed and runs from the company network (not installed). The error is "**WPF.Themes.dll has a different computed hash than specified in manifest.**" Another dll name appears in the error if I remove WPF.Themes.dll. The error seems accurate when I compare the d... |
Only two users get error "...dll has different computed hash than manifest" |
|c#|wpf|clickonce| |
I am not sure why this happens. It might be related to [this bug](https://github.com/apple/swift/issues/66450), which is fixed in Swift 5.10 (though I don't have 5.10 yet to check).
In any case, it seems like `Lazify` would add a declaration with the name of whatever string is passed to its `name` parameter. This is... |
Issues with selenium (Python) and Brave broser |
|python|selenium-webdriver|brave| |
null |
I chose NamedPipes over TCP because I needed two applications on the same machine to talk to each other. I wanted exceedingly simple, quick, and easy, unfortunately it has proven to be the opposite.
Server sends two messages to client, client sends one message to the server. However, the client stalls on the secon... |
How can i remove already registered images/ cameras from colmap 3D Pointcloud. When i run Colmap to reconstruct a 3D Scene i get the following folder output: `database.db, sparse >> 0 >> cameras.bin, images.bin and points3D.bin`. I tied to remove a incorrectly registered camera by deleting it inside colmap and then exp... |
How to remove specific images / cameras from colmap 3D Poincloud | Clean Colmap |
|binary|bin|colmap| |
I'm currently working implementing AES encryption in the backend using Python, but I'm encountering some issues in ensuring compatibility between frontend and backedn. I need help in integrating the frontend JavaScript code to work with it.
My backend Python code:
<!-- language: lang-py -->
class Crypt():
... |
Is there a way of calculating the of abstract sums in Cadabra? E.g., is it possible to show that
```[a_i, sum_{j} a_j^\dagger a_j] = a_i```, where ```[a_i, a_j^dagger] = delta_{ij}```?
I found a similar post here: <https://stackoverflow.com/questions/62254012/sympy-how-to-get-simplified-commutators-using-the-second... |
Calculate commutator with abstract sum using Cadabra |
|symbolic-math|symbolic-references| |
ThisWorkbook.FollowHyperlink ("folder path goes here")
|
I have a device running a modified modbus protocol. The device sends messages to the RPi3 serial port. The message is 14 bytes long that starts with a sync byte followed by 11 data bytes then two modbusCRC-16 bytes.
In order to check the validity of the message (by way of a CRC check), I can only send the 11 data byte... |
I'm performing data analysis on a dataset with categorical labels are interrelated.
My labels track experimental conditions.
In my case, labels track concentrations of combinations of two chemicals that produce an output measured by n features.
Is it best practice to use the categorical labels in place of the conc... |
Using sklearn where the label a combination of multiple inputs |
|python|machine-learning|scikit-learn|data-preprocessing| |
null |
{"OriginalQuestionIds":[9251117],"Voters":[{"Id":4342498,"DisplayName":"NathanOliver","BindingReason":{"GoldTagBadge":"c++"}}]} |
If I understand correctly, you are looking for [geopandas.total_bounds](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoSeries.total_bounds.html). This property returns the minimum bounding box for the entire GeoDataFrame.
To get the center of it, you can use e.g. [shapely.centroid](https://shapely.r... |
{"OriginalQuestionIds":[2081640],"Voters":[{"Id":523612,"DisplayName":"Karl Knechtel","BindingReason":{"GoldTagBadge":"python"}}]} |
I have downloaded a .csv file from the World Bank's databank containing USA's gdp per capita growth (annual %) from 1964 to 2022. After reading the file and saving the values in a variable, R seems to believe that the data is non-numeric, as per the following errors:
> mean(gdp)
[1] NA
Warning message:... |
The presence of `DialogContent` in your posted code suggests the use of Material-UI's Dialog component.
The Dialog component has an accessibility feature that moves the browser's focus to the modal and adds an event listener to keep it there:
[![enter image description here][1]][1]
This is preventing focus on ... |
I am trying to generate a signature programmatically for the body of my SOAP Messages
Looking at the [spec](https://www.w3.org/TR/xmldsig-core2/#sec-KeyInfo) it should be possible to have
```
<KeyInfo>
<X509Data>
<X509Certificate/>
<X509IssuerSerial>
<X5... |
Terraform OCI error when creating Network Load Balancer |
|terraform|oracle-cloud-infrastructure|terraform-provider-oci|network-load-balancer| |
I am trying to scrape the MLB daily lineup information from here: https://www.rotowire.com/baseball/daily-lineups.php
I am trying to use python with requests, BeautifulSoup and pandas.
My ultimate goal is to end up with two pandas data frames.
First is a starting pitching data frame:
|date |game_time ... |
Scraping MLB daily lineups from rotowire using python |
|python|web-scraping|beautifulsoup| |
{"OriginalQuestionIds":[41265266],"Voters":[{"Id":1746118,"DisplayName":"Naman","BindingReason":{"GoldTagBadge":"java"}}]} |
The relative path to the included file was not correct. Hence, one should write something like use("C:\\path\\to\\included\\file.chai"). |
I am attempting to install Python3.10 on a Ubuntu v20.04 Docker Image. I am using the line:
```
RUN export DEBIAN_FRONTEND=noninteractive TZ=US && \
apt-get update && \
apt-get -y install python3.10 python3-pip
```
which seems to run properly, and I get a successful Image.
However when I run the C... |
Installing Python 3.10 in Docker Image? |
|python|python-3.x|docker|docker-compose| |
Your output:
```lang-none
this is thread 1
this is thread 2
main exists
thread 2 exists
thread 1 exists
thread 1 exists
```
Before I see that *"it prints "thread 1 exists" twice."*, I see that it prints after "main exists":This behavior can lead to unpredictable results.
--
First, you should array yo... |
I have a thread that sends GPS coordinates to a database every six seconds and I have a check that verifies that the user is within a defined area. If the user is not within the location, I want an alert dialog that notifies them that they are out of range, and if they are within the area I want a dialog that tells the... |
I recently started a new Angular 17 project and I'm encountering a bit of an issue with server side rendering and/or hydration, not 100% sure which. Up until now I've primarily worked with lower versions (up to 14) and without server side rendering, so I have yet to encounter such an issue.
Within my home page compo... |
Issue With Angular Hydration |
|angular|server-side-rendering|hydration| |
Here is my code: https://github.com/d0uble-happiness/DiscogsCsvVue
App.vue
<template>
<div>
<FileUpload @file="setFile" />
<ParseCsvToArray v-if="file" :file="file" />
<ProcessReleaseData />
<FetchRelease />
</div>
</template>
<script... |
please add the "apiKey" parameter at the end of your API endpoint. Be sure to prefix it with "?". |
[sql.js](https://github.com/sql-js/sql.js/) is a sqlite client for javascript, based on the original sqlite compiled to WASM.
bundle size is 640KB [wasm](https://sql.js.org/dist/sql-wasm.wasm) + 50KB [js](https://sql.js.org/dist/sql-wasm.js) = 700KB, or 1300KB [asm-js](https://sql.js.org/dist/sql-asm.js)
to compa... |
I have a web app that will draw a polyline for each user (tracks movement), and I'd like to incorporate some functionality that allows the web app user to 'focus' on a certain user by changing the color of the polyline. It will have to first change all the polylines to red, and then change the selected polyline to blue... |
Why does the ImageGalleryBlock in wagtail-crx/coderedcms return no images? |
|django|wagtail|wagtail-streamfield| |
null |
I'm trying to test the notifications component. When the user clicks on one of the cards it should call method `markNotificationAsRead` but when I write the test like this:
it('should mark notification as read and navigate to correct page when clicked', async () => {
vi.mock('../services/notifications.http', ... |
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:
```
package org.PruebaRaspberry11;
import com.pi4j.Pi4J;
import com.pi4j... |
# IDEA
## IMPORTANT NOTIFICATION
THE EXPLAINATION IS NOT VERY CLEAR, AND I EXPECT YOU TO GUESS. GUESS IS GOOD FOR YOUR BRAIN.
BELIEVE YOURSELF. Your GUESS, if you think is LOGICAL, is RIGHT.
In fact they are just simple ideas, with little guide then you will also understand.
So you are expected to direct... |
Idea of "extensional function for function" to solve some problem |
Since Hibernate 6.3 this luckily became way easier to do:
```java
import org.hibernate.annotations.Generated;
import org.hibernate.dialect.PostgreSQLEnumJdbcType;
//....
@Column(name = "status")
@Enumerated
@JdbcType(PostgreSQLEnumJdbcType.class)
public TransmissionStatusType getTransmissionStatus() {
... |
Is it possible to implement the functionality shown in the bash script below from a C++ application, possibly using an OpenSSL provider obtained using:
```cpp
OSSL_PROVIDER * tpm2_provider = OSSL_PROVIDER_load(NULL, "tpm2");
```
or by another method?
```sh
# Create CSR using TPM-resident private key
openss... |
|c++|openssl|tpm-2.0| |
Based on Leeroy's answer there is a C# code that can make the request:
```cs
var keyAttributes = new KeysAndAttributes
{
Keys =
{
new Dictionary<string, AttributeValue>
{
{ "Partition key", new AttributeValue { S = "aa" } },
{ "Sort key", new AttributeValue { S = "str1" } },
},
new Dictiona... |
|c#|apache-kafka|masstransit| |
In the documentation for Remix it seems like there are layout files we can use for specific routes.
But I am trying to make a global layout, where I want to put my providers, so I don't have to pass the supabase instance that I create in `root.tsx` to every single provider manually, and use use the Outlet context in... |
Since you don't provide arguments for the constructor they are become `undefined` and assigned to the props. You could use a default parameter value `null` to declare that these parameters are optional and handle them accordingly in the constructur:
<!-- begin snippet: js hide: false console: true babel: false -->
... |
Hope you doing well !!
So, I have a project idea in mind and I don't know how to achieve it. Let me explain.
My idea is to create a web app that suggests travel destination ideas depending on dates and a budget.
But as far as I know all flight or hotel APIs available need a destination as a query parameter, so... |
Need advice for a project |
|api|web|project| |
null |
black ".\research\evaluation_detection.ipynb"
outputs
error: cannot format research\evaluation_detection.ipynb: unindent does not match any outer indentation level (<tokenize>, line 11)
Oh no!
1 file failed to reformat.
The problem is that my file has lots of cells with line 11; ther... |
Automatically find the precise line in ipynb to fix indentation error for black |
|python-3.x|jupyter-lab|pycodestyle| |
I'm trying to implement a thread so that I can send GPS coordinates in the background. I think I have a good start but I'm having a little trouble. Where it says `locManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);`.
I'm getting an error on context (before getSystemService) which says ... |
We want to setup Apache Superset as an enterprise BI solution. Earlier solution used is MicroStrategy. It provides Report Builder feature which helps users to build a report based on the prompts. They choose columns and metrics that they want on the reports. How can the Apache Superset be used to provide ad-hoc reporti... |
Can apache superset be used for ad hoc reporting? 9Something similar to Report Builder feature of MicroStrategy) |
|apache-superset| |
null |
Even though I have no idea *why* this works, after trying everything else on the internet, simply *deleting* the libqxcb.so file from the pyqt plugins solved the issue for me. If anyone knows why this fixed the issue for me (while reinstalling things did not), please let me know.
The way to do this is to go to the f... |
null |
I have a device running a modified modbus protocol. The device sends messages to the RPi3 serial port. The message is 14 bytes long that starts with a sync byte followed by 11 data bytes then two modbusCRC-16 bytes.
In order to check the validity of the message (by way of a CRC check), I can only send the 11 data by... |