instruction stringlengths 0 30k ⌀ |
|---|
We have a 4+ year android application that relies on the Realm DB. We are exploring the possibility to adopt the Room Database going forward. There are a few challenges and queries that need to be addressed, need help regarding the same. Mentioning the same below.
1. Is there any library/plugin that can create a Ro... |
I'm trying to work with database SQL Lite on react native using SQL lite data base and expo library expo-sqlite.
- The package is well installed with **npx expo install expo-sqlite**
- I have already removed node_modules, package-lock.json, pods, Bulds (from IOS folder)
- Reinstalled with **npm i**
- Reinstalled ... |
EXPO React-Native: expo-sqlite compile error on IOS TV 17.0 Emulator |
|ios|react-native|expo|expo-sqlite| |
null |
|django| |
I want to answer my question by an implementation of a custom `KeyboardService` that provides an Overlay `PopupWindow` to show the currently entered Text in the activated Android `Keyboard`. This is achieved via `GlobalLayoutListener` that checks if the `Keyboard` is activated and determines the `EditText` that current... |
{"Voters":[{"Id":2518285,"DisplayName":"Brett Donald"},{"Id":1620194,"DisplayName":"Salketer"},{"Id":8036670,"DisplayName":"assembler"}]} |
Making a column nullable **is** making it optional.
In PostgreSQL, a NULL value uses no extra storage space.
If you don't want to insert a value in `col2`, just omit it from the column list:
INSERT INTO tab (col1, col3) VALUES (1, 42); |
|azure-devops|notifications| |
The issue is simple: you're confusing the `datasets` library with PyTorch's `Dataset` class. Your import statement should target PyTorch's dataset-handling facilities, not another library. Ensure you're using `from torch.utils.data import Dataset` to get the correct base class for your custom dataset.
The AttributeE... |
I generate rst files containing formulas in latex, then try to upload them to confluence
Example: File main.rst consist the formulas
```rst
:math:`\sqrt{3x-1}+(1+x)^2`
```
The conf file.py is located in the docs folder
Its contents
```python
extensions = [
'sphinxcontrib.confluencebuilder',
... |
Hi I want to group elastic search query result bases on a specific field. I have gone through collapse and aggregation doc but cant find how to achieve this.
Here is an example
Lets say I have three documents:-
{
"id":"1"
"sub":"1_1a"
"name" : "TV",
"make" : "samsung",
"model... |
Elastic Search grouping search results based on a field |
|elasticsearch|kibana|elastic-stack|opensearch| |
There are a few problems with your code. This is one to consider:
```
.Range("A:A" & (fVal.Row)).Copy
```
If fVal.Row is row 27 ... this makes A:A27. That's not what you want.
I think you want:
```
.Range("A" & (fVal.Row) & ":A" & (someVariableForEndOfRange)).Copy
```
If you don't want to explicitly in... |
|php|laravel|laravel-5|cors| |
{"Voters":[{"Id":5373689,"DisplayName":"Denton Thomas"}]} |
cucumber.api.cli.Main run
WARNING: You are using deprecated Main
class. Please use
io.cucumber.core.cli.Main
0 Scenarios
0 Steps
0m0.014s
I'm not getting snippets for my steps.
and my login feature file
Feature: Login
Scenario: Successful Login with valid credentials
Gi... |
Replace Realm DB in the an existing Android app with Room DB |
|android|realm|android-room|realm-mobile-platform| |
In VScode, I was using INT_MIN/INT_MAX, But today I got an error, saying "Unidentified Classifier". Instead it suggested me to use INT8_MIN.
After using this it worked perfectly.
But, what is the core difference between them..?? |
I encountered an error while trying to run my Flutter application on the iPhone Simulator. Here's the error message:
```bash
Unable to install /Users/enkh-amgalan/Desktop/lesson/mobile/week-1/add_sub_app/build/ios/iphonesimulator/Runner.app on 524B6B86-9413-48BF-9408-288F75BDC9F4.
This is sometimes caused by a mal... |
Flutter: Unable to install Runner.app on iPhone Simulator - Error 149 |
|flutter|flutter-build|flutter-ios-build| |
null |
I am try to testing out version check and other things with Rust `std::process::command`.
Other command are working fine but when I try to call `npm -v`, I got program not found error.
1. [My Error](https://i.stack.imgur.com/i3hpi.png)
1. [My Code](https://i.stack.imgur.com/JvCvH.png)
1. [NPM Test](https://i.stac... |
Why I get program not found error on running "npm -v" command with Rust Command::new("npm")? |
|npm|rust|command| |
null |
I downloaded Qt Creator and I want to set the [Dracula theme][1] for it.
It is instructed that third party themes are to be put in `$HOME\.config\QtProject\qtcreator\styles` (Windows). Fine, but after I've copied the file into that folder, the theme is not showing up in the theme list, when I'm trying to set a new t... |
Applying third-party themes to Qt Creator |
The problem with publish LaTex formulas in confluence |
|python|latex|sphinx|confluence| |
While preprocessing a dataset I'm facing
```
DF
ID Age Gender Height Weight BMI Label
0 1 25 Male 175.0 80 25.3 Normal Weight
1 2 30 Female 160.0 60 22.5 Normal Weight
2 3 35 Male 180.0 90 27.3 Overweight
3 4 40 Female 150.0 50 20.0 Underweight
4 5 45 Male 190.0 100 31.2 Obese
... ... ... ... ... ... ... ...... |
The issue was the result from the recursive did not pass back becuase of the $t register. I expanded the stack, and saved the result into the stack, and load it back and get the final value.
```
catalan_recur:
addi $sp, $sp, -20 # Allocate space on stack for 5 items: $ra, $s0, $s1, $a0, and loop counter
... |
In Java Memory is divided into 3 parts:
1. Method Area
2. Heap
3. Stack
----------------
1. Method Area is memory where class is loaded and along with that static variables and constants are defined.
2. Stack is memory area where a method is loaded and its execution take place. All Local variables are stored in ... |
`ReferenceError: a is not defined` means that the identifier `a` isn't declared *at all* in the current scope. That's clearly not the case in the code you've shown, suggesting either that the error isn't from the code shown (prehaps a previous run?) or that the code is being executed in an unusual way, such as in a REP... |
|themes|qt-creator| |
I am trying to code a doubly linked list by rust lang. The main two types defined as:
```rust
struct IntList {
head: *mut Node,
tail: *mut Node,
size: usize,
}
#[derive(Copy)]
#[derive(Clone)]
struct Node {
data: i32,
prev: *mut Node,
next: *mut Node,
}
```
I used 2 util functio... |
what's the difference between whether using an intermediate variable in Rust lang? |
|c++|rust|memory-management|rust-tokio| |
This unfortunately wasn't intuitive from the quarto docs, but looking at their website source code helped me figure it out. Below is a minimal example to help you get what you wanted.
`index.qmd`
```r
---
title: Home
---
Welcome to my website.
```
`blog.qmd`
```r
---
title: Blog Home
---
Welcome to... |
You need to [create scope][1] before calling Scoped service.
```
public static void DoSomething(WebApplication app)
{
using IServiceScope? scope = app.Services.CreateScope();
IConfigurateServices configService = scope.ServiceProvider.GetRequiredService<IConfigurateServices>();
}
```
[1]: https://l... |
Logging error coming after failed insert to db using `ent` shows:
`ent: constraint failed: FOREIGN KEY constraint failed`.
Is there a way to get more verbose formatting of the error, e.g. `FOREIGN KEY` that wasn't set?
I'm using below code for logging the error:
```
import (
"github.com/labstack/gommon... |
"ent: constraint failed: FOREIGN KEY constraint failed" get more verbose error output |
|go|logging|error-handling|ent| |
Let's say we have an HTTP request made by the client. The endpoint exists and is accessible by the client (this rules out 401, 403, 404 and 405). The request payload is valid (this rules out 400). The server is alive and well, and is able to handle the request and return a response (this rules out 5xx).
The error ar... |
|express|rest|http|http-response-codes| |
How to find the transaction ID from PayPal V2 API? I would like to give the transaction ID for buyer to track their transaction.
I can get the order ID and Capture ID but fail to find where to find the transaction ID. Only the deprecated V1 API can get the transaction ID. Is it not available anymore for V2?
FYI, ... |
|paypal| |
```
library(tidyverse)
library(magrittr)
df <- data.frame(year = c(1977:1981), set852 = c(1,1,0,0,0), set857=c(0,0,1,1,0), set874=c(0,0,0,1,1))
```
For each variable set852, set857 and so forth (in the real datasets it's a long list) I want to create a variable that indicates whether there is a change in the t... |
You can use the [`REDUCE`](https://support.google.com/docs/answer/12568597?hl=en) function:
```cpp
=ARRAYFORMULA(UNIQUE(REDUCE(A2:A,D2:D,LAMBDA(a,c,REGEXREPLACE(a,c,OFFSET(c,,1))))))
```
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/k0x36.png |
I'm trying to run a Spark job on Dataproc with a custom conda environment. Here's my environment yaml file:
```
name: parallel-jobs-on-dataproc
channels:
- default
dependencies:
- python=3.11
- pyspark=3.5.0
- prophet~=1.1.2
```
I follow the [official documentation](https://cloud.google.com/datapr... |
How to run a Spark job on Dataproc with custom conda env file |
|apache-spark|google-cloud-platform|pyspark|conda|dataproc| |
How can I make the green (`large` class) paragraph as large as `body` (grey part), or at least larger than `#contents`?
I tried the
```
position: relative;
width: 150%;
left: -25%;
```
trick, but you'll see that when you reduce the width of the whole page, the paragraph keeps that large width and adds a ho... |
Insertion part is working properly but when I update custom enum set column, this exception is thrown
> java.lang.AssertionError: expectation "expectNext(1)" failed (expected: onNext(1); actual: onError(java.lang.IllegalArgumentException: Cannot encode parameter of type java.util.ArrayList ([TYPE1])))
**DB Conf... |
The command sometimes succesfully launches the batch file however, sometimes it doesn't work and it immediately closes.
I was wondering what I could do to fix this issue.
'''
#a couple of the commands I have tried
start-process -wait -filepath "C:\Windows\System32\cmd.exe" -argumentlist "/c 'C:\path\stream3.... |
Trying to launch batch file from powershell, and immediately closes |
|windows|powershell|batch-file|cmd|server| |
# tl;dr
- Technical limitation: Multiple inheritance prevents mixing `Enum` with `Record` superclasses.
- Workaround: Keep a `record` as member field of your enum
```java
NamedIdentity.JILL.detail.nickname() // ➣ "Jill the Archeress"
```
# Multiple inheritance
You asked:
> is there a reason that enum... |
I need to send configuration data to a device from Thingsboard (CE) via MQTT. The device expects a specific JSON structure and changing the firmware of the device is not an option.
I looked into the [client side RPC API](https://thingsboard.io/docs/reference/mqtt-api/#client-side-rpc) but the required pub/sub schem... |
thingsboard: reformat shared attribute JSON before publishing via MQTT |
|iot|thingsboard| |
null |
Incase someone is still facing the issue.
I still haven't figured out the root cause for this. But here is a workaround that worked for me.
I downloaded the plugin source code from the repo unzipped and added to the plugins folder with proper name (remove master and the end of the folder)
Now run your cordova ... |
You can remove `email` by re-importing the user.
However, it might remove other properties like `metadata`.
```js
(async () => {
const uid = "<user uid>";
const user = await auth.getUser(uid);
await auth.importUsers([
{
uid,
providerData: user.providerData,
customClaims: user.cus... |
The themes were moved to `PathToQt\Qt\Tools\QtCreator\share\qtcreator\styles`, where the `.xml` file is to be placed. |
I know very little about windows api, but now I need to implement some functionality using them.
Before deleting a file, I need to check the write permission of the current folder. If administrative permission is required to write, use administrator permission to delete. If administrator permission is not required, ... |
Creating multiple variables with for-loop and "paste" |
|r|for-loop|tidyverse|paste| |
null |
Normally, errors in Tcl include line numbers and filenames when applicable.
However, I'm finding that when errors occur in scripts executed with ```interp eval```, I do not get this information.
The two examples below are exactly the same, except that Example 1 evaluates the code in the main/parent interpreter, w... |
Hi please help me I'm having trouble getting a Python script to work with Firefox and Selenium
I ran the command with pytest and this comes out please help me
I use VPS Linux ubuntu to start this script
pytest /usr/local/bin/ciaobot/ciao.py --indirizzo "https://www.test.it" --profilo "ciao1"
===================... |
null |
Hi please help me I'm having trouble getting a Python script to work with Firefox and Selenium
I ran the command with pytest and this comes out please help me
I use VPS Linux Ubuntu to start this script
```none
pytest /usr/local/bin/ciaobot/ciao.py --indirizzo "https://www.test.it" --profilo "ciao1"
==========... |
How to link an agency management application to Amadeus |
Create test data:
CREATE UNLOGGED TABLE foo( id INT NOT NULL, created_at INT NOT NULL, data INT NOT NULL );
INSERT INTO foo SELECT n, random()*10000000, n FROM generate_series(1,40000000) n;
CREATE INDEX ON foo(id);
CREATE INDEX ON foo(created_at);
VACUUM ANALYZE foo;
Due to the large numb... |
I have encountered interesting case during practicing writing Python algorithms on Leetcode.
*The task: "You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively." The result should be stored insi... |
|azure|azure-devops|odata| |
null |
I'm trying to create simply connect with ActiveMQ using JNDI.
I have:
1. Queue named `example.A`.
2. According [ActiveMQ documentation touching JNDI][1], if I want to use ConectionFactories and Queues (Topics) via JNDI, I have to place `jndi.properties` file on my classpath. As I have understood, ActiveMQ clas... |
**GNU `head`** is another option (remove the last N characters from the input string _as a whole_ - even if it spans multiple lines):
# GNU `head` only (doesn't work with the `head` that comes with macOS)
# CAVEAT: -c operates on *bytes*, not characters.
$ printf '1461624333' | head -c -3 # drop last... |
|c++|windows| |
null |
Not sure exactly what the problem is.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
table {
border-collapse: collapse;
}
th, td {
border: 1px solid white;
padding: 8px;
}
th {
text-align: center;
}
... |
As others pointed out make sure where to store your files.
After that You should add `download` attribute to your anchor tag. [link](https://www.w3schools.com/TAGS/att_a_download.asp)
> The download attribute specifies that the target (the file specified in the href attribute) will be downloaded when a user click... |
ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.9/site-package... |
`scanf` **returns** EOF
```
int main(){
char c;
int result;
while(1){
result = scanf("%c", &c);
if(result == EOF) break;
else{
c = toupper(c);
printf("%c", c);
}
}
return 0;
}
```
You will not EOF until you type special keyb... |
I'm getting an inexplicable error in my Eclipse IDE:
The type java.util.Collection cannot be resolved. It is indirectly referenced from required type picocli.CommandLine
It is not allowing me to iterate a List object like the following:
```
import java.io.IOException;
import java.nio.file.Files;
import ja... |
How to change variables (or recreate) dataframe, with another boolean mask Polars DataFrame?
So not just single column vectors (Series), but both a DataFrame.
So set the following to 1000, where amount > 270, value at the bottom would become 1000
apples[0].amount apples[1].amount... apples[... |
|python|docker|zap| |
Here's a thought:
```r
df1 |>
mutate(
day = as.Date(trunc(DT)),
rnk = rank(odczyt.1, ties="first")
) |>
filter(.by = day, any(rnk <= 3))
# DT odczyt.1 odczyt.2 day rnk
# 1 2023-08-15 05:00:00 224 1.6 2023-08-15 3
# 2 2023-08-15 23:00:00 445 5.... |
null |
The input is line-buffered. When you enter characters and hit Enter the buffer contains all the characters you have entered + `'\n'`(new line).
The `getchar` function takes one character from this buffer and returns it
- Your first program reads one charter from this buffer, prints it and then terminates.
- yo... |
|php|wordpress|woocommerce|roles| |
null |
{"OriginalQuestionIds":[2124527],"Voters":[{"Id":2943403,"DisplayName":"mickmackusa"},{"Id":16217248,"DisplayName":"CPlus"},{"Id":794749,"DisplayName":"gre_gor"}]} |
I was working on my spreadsheet to keep track of my goals.
I stuck on some strange problem I can't find any fix for that, not so advanced in google sheets yet :(
I made test sheet just to show problem in isolation. https://docs.google.com/spreadsheets/d/19xUOeLoXTPH3heVFMssya5sh8ZeOaIlIBpHnypaDx-A/edit?usp=sharing
... |