instruction stringlengths 0 30k ⌀ |
|---|
FlutterCarousel(
options: CarouselOptions(
physics: const NeverScrollableScrollPhysics(),
controller: _carouselController,
onPageChanged: (index, reason) {
currentView = index + 1;
//setState is called to... |
Using `track $index` is not always a good practice (cf: https://github.com/angular/angular/issues/53800).
It's usually better to track by a "stable" value. Basically the index changes will prevent the DOM to know exactly which element has been changed (it depends how you bind your value to the DOM but it's the idea)... |
This code:
```python
index_suffix = "data"
index_name = f"vector_{index_suffix}"
keyword_index_name = f"keyword_{index_suffix}"
print(f"Setup with indices: {index_name} and {keyword_index_name} ")
hybrid_db = Neo4jVector.from_documents(
docs,
embeddings,
url=url,
... |
LangChain's Neo4jVector.from_documents doesn't set index_name if mentioned |
{"OriginalQuestionIds":[14220321],"Voters":[{"Id":182668,"DisplayName":"Pointy","BindingReason":{"GoldTagBadge":"javascript"}}]} |
I am trying to solve this layout puzzle but am stuck in how to get it as elegant, clean and timeless.
Given:
- a horizontal line of 1 pixel height stretching inside the container its in
- a vertically as well as horizontally centered box over this line
- a left aligned textbox
- and a right aligned text... |
if you want To share tokens between applications, ensure they access the same data protection keys
by configuring a shared storage (example -> a common file system path) for keys using '.PersistKeysToFileSystem()'.
Both applications must also use '.SetApplicationName("Whatever")' to align the data protection context... |
Ubuntu 20.04
Python 3.8
I'm using a python file (not written by me) with a U-Net and custom Loss functions. The code was written for tensorflow==2.13.0, but my GPU cluster only has tensorflow==2.2.0 (or lower). The available code isn't compatible with this version.
Specifically the 'if' statement in update_state... |
I am looking an approach to store current Scroll Position using Paging_3 when users end the application and restore the same when users re-launch the app.
I tried implementing `lazyListState.firstVisibleItemIndex` but it only work best for offline if no data changes.
But when using RemoteMediator the data loads f... |
I'm writing a java code in which I run `Spark batches` using `Dataproc Serverless`. I have initially used `Dataproc Client Library` for java and so far, it works just fine. However, by looking at `Dataproc Serverless` documentation (https://cloud.google.com/dataproc-serverless/docs), there is not a single mention of in... |
Interacting with Dataproc Serverless using Dataproc Client Library |
|java|google-cloud-platform|google-cloud-dataproc|google-cloud-dataproc-serverless| |
null |
I am trying to read in an ocel from an Eventlog sqlite file, which I build from multiple csv-files in python. Here's the code for the creation of the sqlite file:
```
# Define the path to the folder in Google Drive
drive_path = '/content/drive/MyDrive/Test2/'
# Update the file search patterns
eventTypeTableFil... |
|graph|neo4j|langchain|graphdb| |
null |
When I run the command `yarn start`, the project to launch the development server build. I get no error, but in the logcat in Android Studio, I get the following error and I can't find the source of the problem.
```json
"react-native": "0.67.5",
"react-native-device-info": "^10.10.0",
```
[enter image descri... |
java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by DeviceInfo |
|react-native| |
According to the [bash manual](https://www.gnu.org/software/bash/manual/bash.html#index-complete_002dfilename-_0028M_002d_002f_0029), you should already have ...
- `complete-filename` bound to `C-x /` (first <kbd>ctrl</kbd><kbd>x</kbd> together then <kbd>/</kbd>).
- `possible-filename-completions` bound to `M-/` (e... |
I was actually asking myself this exact same question. So I compared both methods (public assets folder vs. cloud-based service (Cloudinary)).
I expected the loading time and resource values to be way smaller for the cloud-based solution (network tab console), however, it's exactly the same as when my assets are ren... |
How to Save & Restore the Scroll Position of a LazyColumn using Paging 3 RemoteMediator? Compose |
|android-jetpack-compose|android-room|kotlin-coroutines|android-paging-3| |
null |
**My goal**
Ping an esp32 device which is in a local network without internet and without https.
**Reason**
I have a node js server with a PWA hosted on render.com. This server is communicating with my esp32 which is in a local network. ESP32 connected to the server via websockets and sends data to it.
Use... |
Resolve mDNS in local network with javascript from https origin |
|javascript|redirect|mixed-content|mdns|local-network| |
|java|project-loom|virtual-threads| |
I have this recursion code to pick dates in a rangepicker:
```
recurse(
() => cy.get('.mantine-DatePicker-yearsListCell').invoke('text'),
(n) => {
if (!n.includes(year)) {
cy.get('.mantine-DatePicker-calendarHeaderControlIcon').first().click();
}
els... |
Date issue with rangepicker |
|typescript|cypress| |
I am using WSO2 IS V6.1 and I can create a client application using the DCR endpoint if I run the following cURL command.
```
curl -k -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d '{"client_name": "application1","grant_types": ["password"],"ext_param_client_id":"provided_cl... |
Updating Client Application using DCR endpoint not working in WSO2 IS V6? |
|curl|wso2|wso2-identity-server| |
When using the `semantic-release` plugin `@semantic-release/git` on protected branch (master is protected with maintainers allowed to merge and no one allowed to push and merge)
I have
remote: GitLab: You are not allowed to push code to protected branches on this project
I also tried with allowed to force... |
@semantic-release/git and protected branches |
createtoken(""); is not working in my laravel project... where i have deleted vendor file and done
composer install
: i am getting :
Problem 1
- lcobucci/jwt is locked to version 4.3.0 and an update of this package was not requested.
- lcobucci/jwt 4.3.0 requires ext-sodium * -> it is missing f... |
You are trying to retrieve subscribed sku by `skuId` (id of the service SKU)
Check the properties in the [doc][1]
|Property|Description|
|-|-|
|id|The unique identifier for the subscribed sku object|
|skuId|The unique identifier (GUID) for the service SKU|
The call `await graphServiceClient.SubscribedSkus[... |
This is probably very basic (sorry), but I'm a beginner in coding and haven't been able to find instructions online. I use R and have a dataframe like this:
````
id<-c(1:4)
happy<-c(1,0,1,0)
sad<-c(0,0,0,1)
angry<-c(0,1,0,0)
excited<-c(1,0,1,1)
emot<-data.frame(id, happy, sad, angry, excited)
emot
id happy s... |
Converting a dataframe into a long format contingency table for network analysis purposes |
|r|dataframe|count|data-conversion| |
This code works but it can probably be improved:
import subprocess
ollama_server = subprocess.Popen(["ollama", "serve"])
from langchain_community.chat_models import ChatOllama
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate... |
In a function, I sometimes need to select a variable only if it exists.
For this, the function `dplyr::any_of()` is perfect, but it only works with standard evaluation, taking a character vector as input.
I'm looking for an alternative that would work as a replacement in the following example that feels very hack... |
I am trying to implement the login with google functionality in asp.net core web api using identity external provider. All things are going well but when my url is redirecting to this external-auth-callback function I am getting info null. This is the external-auth-callback function.
public async Task<MessageViewMod... |
```
fig, ax = plt.subplots()
gdf.plot(column="vsu", scheme="EqualInterval", legend=True, ax=ax)
leg1 = ax.get_legend()
gdf_2.plot(column = "gk", ax=ax, legend=True)
ax.add_artist(leg1)
plt.show()
``` |
Yes! You can set up an action that writes whatever value the user input to a property of an object. This could either be an existing one or one that is created when the user is taking the action - whatever makes sense for your workflow. As a general rule, think of workshop as a place for users to interact with the onto... |
Hello I was facing the same issue I created a template mustache named model.mustache to overwrite the old one.
The main problem is that the `#isEnum` condition always return false but `^isEnum` is working correctly; so I found a way to check for `enum` differently with `#allowableValues`. The solution consist to creat... |
I have a simple spring boot application for API I wanted to put swagger on it for documentation but I get null pointer in main class
package com.local.parking.test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import... |
Spring boot application with swagger 2 gets null on run() |
|java|spring-boot|config|swagger-2.0| |
I'm trying to test the Antlr4 (Oracle) PLSQL grammar, but really struggling. I might have confused having followed 2 or 3 different guides.
I performed the following steps, starting with installation, on Ubuntu 22.04.
Install packages, but not sure I ended up using these:
```
sudo apt-get update
sudo apt-g... |
Timing constraints, are used by the Timing Analyzer tool, not simulation. A back-annotated simulation works like hardware using setup and hold times to create the waves/simulator output. RTL simulation uses the Verilog event scheduler simulation model. You will not see any affect of timing constraints in simulation.... |
i just found the response, i don't know exactly why, but if you replace
'\n' by "\n" it will work
str_replace('\n', "\n", $n->mensagem);
doing this the message was printed like
> Lembre-me, contrato 156051
>
>
> mensagem: aaaaaa |
The question and answers have custom defined div wrappers around them.
The closing div </div> is on the next line producing a blank line.
I want to remove that line.
Post Link: <http://fgstudy.com/uncategorized/a/>
I have already tried the white-space CSS code as followed:
div#q1, div#a1, div#a2 { wh... |
How do I remove white space using CSS? |
null |
i took a quick look at the provided code:
you have declared many local variables on the itemBuilder method of the listview:
itemBuilder: (BuildContext context, int index) {
// Today date
DateTime currentDate = DateTime.now();
DateTime startOfWeek =
... |
The documentation of freezed is telling that we should just use the sealed classes made available in dart 3. However: it does not explain how to use it, especially in combination with fromJson. So I'm a little stumped on how to do it with sealed classes instead of union types.
Given the following union;
```dart
im... |
Using dart Freezed with sealed classes and fromJson |
|flutter|dart|freezed|flutter-freezed|json-serializable| |
null |
{"Voters":[{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":1940850,"DisplayName":"karel"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[18]} |
**GENERIC RESPONSE:**
I wish the docs would point out that auth_request fires a GET request, I spent my six hours trying a boatload of GPT's in vain.
If in any case anyone is using a POST in the auth_request route, make sure that you change it to GET, the token in the header such as `Authorization: Bearer xyz-etc... |
You have `Hour` pinned. Unpin it and it should restore back to showing the full `DateTimeOffset` value.
Expand `dt`, and you should see `Hour` is pinned at the top of the list it displays. Click the pin icon and it will unpin it:
[![pin icon][1]][1]
[1]: https://i.stack.imgur.com/DK8gX.png |
I've had this issue today, and thanks to [Ahmed][1] comment I've been able to solve this issue.
In my case, I followed this guide: https://medium.com/frontendweb/how-to-deploy-a-nextjs-app-to-github-pages-1de4f6ed762e
There is a step where you configure the required yml file for the build, and all I did was comm... |
About problem in installing ext-sodium * for installing lcobucci/jwt 4.3.0 and kreait/firebase-tokens 4.3.0 for laravel project |
|php|laravel|xampp|libsodium| |
I got the following error when I upgraded my project to Micronaut 4.3.1:
```
ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [io.micronaut.configuration.hibernate.jpa.conf.sessionfactory.con... |
Error starting Micronaut server: Bean definition [hibernate.SessionFactory] could not be loaded: Error instantiating bean [ValidatorFactoryConfigurer] |
|hibernate|micronaut|sessionfactory|micronaut-data| |
null |
if you want To share tokens between applications, ensure they access the same data protection keys
by configuring a shared storage (example -> a common file system path) for keys using `'.PersistKeysToFileSystem()'`.
Both applications must also use '`.SetApplicationName("Whatever")'` to align the data protection con... |
I am developing a Web Application with a node/JS frontend and a Python backend. Development is done in two DevContainer environments with one DevContainer definition for each sub-project. So far, I open two instances of `vscode`, one for each sub-project. Each of the DevContainer setups mounts the overall project folde... |
Per [glTexSubImage2D reference](https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexSubImage2D.xhtml):
> `GL_INVALID_OPERATION` is generated if the combination of internalFormat of the previously specified texture array, format and type is not valid.
In your code, `glTexImage2D` call specifies `internalF... |
In this declaration
int *p1 = arr;
the array designator is implicitly converted to a pointer to its first element. It is equivalent to the following declatayion
int *p1 = &arr[0];
An expression like that `arr[i]` where `i` is some integer is evaluated like `*( arr + i )`. That is the expession `a[... |
I was able to get the Python file generated eventually.
I found another pair of grammar files set from
https://github.com/antlr/grammars-v4/tree/master/sql/plsql.
From here I downloaded as follows:
```
wget https://github.com/antlr/grammars-v4/blob/master/sql/plsql/Python3/PlSqlLexerBase.py
wget https://... |
I'm trying to create a structure in AWS with ECS so that an internet-facing ALB manages traffic to front-end containers and front-end requests go through an internal ALB that forwards to containers with API, but requests to the API are dying in 504.
the ALB facing the internet is configured with listeners that take ... |
The previous solutions recently failed to utilize cache for my pipeline - it would acknowledge the cache existed but then not consider it during build.
It's mentioned in comments but to resolve I had to add "DOCKER_BUILDKIT: 1" as a variable and "--build-arg BUILDKIT_INLINE_CACHE=1" to each "arguments" using "--cach... |
I am referring to your question in the comment.
*TL;TR:*
There is no difference when you replace a single property of a post or the complete post.
SwiftUI provides DEBUG method which can show you which data causes your view to update. `Self._printChanges()`
So lets write a quick demo:
import Swif... |
AWS: Error 504 in communication between ALB internet-facing and ALB internal |
|amazon-web-services|amazon-ecs|amazon-elb|amazon-vpc|aws-application-load-balancer| |
null |
import {
ScrollView,
FlatList
} from 'react-native-gesture-handler';
import ScrollView and FlatList from 'react-native-gesture-handler'
it will work |
I'm trying to test the Antlr4 (Oracle) PLSQL grammar, but really struggling. I might have confused things by having followed 2 or 3 different guides.
I performed the following steps, starting with installation, on Ubuntu 22.04.
Install packages, but not sure I ended up using these:
```
sudo apt-get update
... |
# Problem
Seems a version incompatibility problem between typing_extensions and other packages.
# Solution
I tested it with Python 3.10 and some pinned versions of the following packages, and it should work for you also.
```
conda create -n my_env python=3.10
conda activate my_env
pip install openai==1.... |
You don't have to read the entire file in at once as there is an argument with the `read_csv()` function. You would just need to modify your code to
```
df1 <- read_csv(
"sample-data.csv",
col_names=c("D","B"),
col_select=c("D","B")
)
```
If the file does not in fact contain a header than you would call... |
the output of
```#check Nat.add```
seems to be garbled - the result looks like
```Nat.add (a✝a✝¹ : Nat) : Nat```
Version: 4.0.0-nightly-2023-07-06, commit c268d7e97bb0, Release
How can I make sense of this output?
Note: as of version 4.8 this change has been reverted, and the output looks like, as ... |
```
// test_input.cpp
#include <complex>
#include <iostream>
int main( void ) {
std::complex<double> a, b;
std::cout << "Enter two complex numbers: ";
std::cin >> a >> b;
std::cout << "a * b = " << a * b << std::endl;
std::cout << "a + b = " << a + b << std::endl;
return 0;
... |
I have a C# game emulator which uses TcpListener and originally had a TCP based client.
A new client was introduced which is HTML5 (web socket) based. I wanted to support this without modifying too much of the existing server code, still allowing `TcpListener` and `TcpClient` to work with web socket clients connect... |
{"Voters":[{"Id":773113,"DisplayName":"Mike Nakis"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":1852723,"DisplayName":"Drunix"}]} |
To add quotation marks to the start and end of every line with regular expressions in Xcode, choose the “Regular expression” search option and replace `^.*$` (i.e., `^` is the start of the line, `.*` is zero or more of any character, and `$` is the end of the line) with `"$0"` (i.e., a quotation mark, followed by captu... |
```
// test_input.cpp
#include <complex>
#include <iostream>
int main( void ) {
std::complex<double> a, b;
std::cout << "Enter two complex numbers: ";
std::cin >> a >> b;
std::cout << "a * b = " << a * b << std::endl;
std::cout << "a + b = " << a + b << std::endl;
return 0;
... |
i've got this problem when calling firestore function from angular fire.
When i'm succesfully authenticated, i'm fetching to firestore the current user document id for additional data associated with the user.
```typescript
// In App.Component
ngOnInit(): void {
this.afAuth.onAuthStateChanged((user) => {
... |
How to configure a vscode workspace with multiple DevContainers? |
|visual-studio-code|vscode-devcontainer| |
null |
I'm using the following XML shape to add a coloured border to any EditText of my app to indicate it is focused:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="10dp" />
... |
Which values are valid for the `path text[]` parameter of the `jsonb_set` function and how are they interpreted? Numbers vs. strings vs. something else?
``` sql
jsonb_set(target jsonb,
path text[], /* <-- ??? */
new_value jsonb,
create_missing boolean default ... |
Explain parameter 'path' (text[]) of postgres function jsonb_set |
|postgresql|jsonb| |