instruction stringlengths 0 30k ⌀ |
|---|
Firstly, Change `CMD ["java", "-jar", "./build/libs/app.jar"]` to
```
SHELL ["/bin/bash", "-c"]
CMD "java -jar ./build/libs/twitch-bot-*.jar"
```
As you noticed the output file is not called `app.jar` but instead as named as gradle does, roughly `{NAME}-{VERSION}.jar`. Changing to [shell format][1], while setti... |
The easiest way to solve this is to have your useEffect clean up after itself. Right now, when the functions are calling themselves, it will be very hard to clean that up (i.e., stop them from calling each other).
An alternative is to use setInterval. Because with setInterval, it's easy to abort them. Here's an exam... |
error: password authentication failed for user "postgres" drizzle migration |
|postgresql|drizzle|drizzle-orm| |
{"Voters":[{"Id":1255289,"DisplayName":"miken32"},{"Id":213269,"DisplayName":"Jonas"},{"Id":3689450,"DisplayName":"VLAZ"}],"SiteSpecificCloseReasonIds":[13]} |
I don’t quite understand what you wan't, but if you want get keys or key-values pairs, and assuming that your `JSON` is correct
like this.
[{"key1":"value1"},
{"key2":"value2"},
{"key3":"value3"},
{"key4":"value4"},
{"key5":"value5"},
{"key6":"value6"},
{"key7":"value7"},
{"ke... |
I have a Search feature with Ransack which works well. but I am trying to implement it in a way that the search feature filters a particular user model after about a second or two while typing the search query. I have tried using javascript through Rails Stimulus but it doesn't work cos I can't alter the index action v... |
How to configure django 5.0.3 to be able to use private/public media files on AWS - s3 |
|django|amazon-s3|django-models| |
null |
Can anyone check whether this is a complete BS of a code or not. Obviously it doesn't work because I'm getting false as answer but I just wanna know if this is on the right track or just totally NOT it. Btw I've never programmed on prolog before, I am just learning the basics.
```pl
nested([], []).
nested([H1], [[... |
**SOLUTION**
So I figured this finally, check your SSL cert, really :D
I was using .crt insted of .pem, also no-ip provides PEM and PEM chain, be sure to use PEM chain
this article helped: https://github.com/expo/expo/issues/16451#issuecomment-1937490176 |
It's an Angular 17 SPA Application. And it's using the currently most recent version of keycloak-angular (at time of writing 15.2.1) It's something that I simply do not understand. In the default setup, I can authenticate just fine and logout. But if I dare reload the page, the entire page bricks and on inspection I no... |
Keycloak: Receiving a "Invalid parameter: redirect_uri" when reloading the page manually |
|angular|keycloak| |
{"Voters":[{"Id":476,"DisplayName":"deceze"}]} |
You can use `GROUP_CONCAT` statement:
SELECT GROUP_CONCAT(DISTINCT country ORDER BY country SEPARATOR ';') AS countries FROM diary;
|
null |
I am writing a request handler in a telegram bot. I am having difficulty processing the waiting for pressing the inline button, can you tell me if this can be implemented? I have a ticket monitoring start handler, get them in json, then process each ticket in the list.
```
class MonitoringStatus(StatesGroup):
... |
Search with Rails Ransack Gem: implement a 2 sec search delay while searching with Ransack |
|ruby-on-rails|ransack| |
I'm trying to capture the username for the following input string in GoLang regex, I expected `An anonymous user` and `User prettygurl91` to be in a single group, but it wasn't the case for the following pattern.
Input:
[Twitter] An anonymous user has posted a photo on 03-24-2024!
[Twitter] User pretty... |
Regex OR results in two separate groups, how do I make capture it as a single group? |
|regex|go|regex-lookarounds|regex-group|regex-negation| |
I am facing issue with integration of the WebMoney payment gateway into my WordPress website.
The WebMoney payment gateway does not appear during the checkout process on my website. Despite enabling the gateway and configuring the necessary settings correctly, customers are unable to see the WebMoney option as a pay... |
I'm trying to build navbar component in react with tailwindCss.
I've added space-y-2 to get spacing on y axis, for all li elements.
But the first li element (Home) is not getting spacing as expected.
It looks like
[![enter image description here][1]][1]
Why Home is behaving differently ?
Can anybody pls help
... |
tailwindcss not aligning element <li> as expected with utility space-y-3 |
|reactjs|tailwind-css|tailwind-elements| |
I am kinda lost here and not sure how to proceed.
Basically I have two dataframes that I read from csv files.
```
data = {'A': [0,11,21,31,41,51,61],
'B': [10,20,30,40,50,60,70]}
data2 = {'Point': [11.5, 18.3, 31.3, 41.2, 51.5, 66.6, 34.7, 12.1, 14.4, 56.8, 54.3]}
df = pd.DataFrame(data)
df2 = pd.Dat... |
I am having trouble performing a successful API Rest call via apex. The service I'm trying to send a request to has no security layer whatsoever.
I can successfuly do the call on postman but if I try it via curl I get an error 401.
I tried it via Apex in two different ways and getting 500 and 405.
Again, the s... |
I managed to get it working using this website
https://stackoverflow.com/questions/68507437/downloading-a-pdf-file-in-reactjs-works-locally-but-doesnt-work-on-amazon-ampli
I had to specify that a .pdf file was a valid redirectable file type, since it isn't there by default. |
As s3dev alread mentioned in the comment, you must add the parent directory (.../poker/) to sys.path via
import sys
sys.path.append('FULL OR RELATIVE PATH')
Directories that you want to import from that are not the same directory as the script you are running also require an `__init__.py` file. This can... |
I have a Next.js app (v14) using the app directory. I'm using a node script to fetch all mdx files from another repository with the command `pnpm fetch-docs`.
This command is putting all content into `/content/docs` at the root of my project so I end up having:
- /app
- /components
- /content
-- /docs
- lib
... |
Imported files from prebuild script is not showing in Vercel deployment |
|next.js|vercel| |
You could just make use of the "guildMemberAdd" event.
```javascript
// I'll assume you've already imported the Client class and defined it
client.on("guildMemberAdd", async (member) => {
let channelId; // Add your desired channel Id here
let channel = member.guild.channels.cache.get(channelId);
let ... |
{"Voters":[{"Id":2287576,"DisplayName":"Andrew Truckle"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":5193536,"DisplayName":"nbk"}],"SiteSpecificCloseReasonIds":[11]} |
I wrote a small python package that does this. **~2.3x speedup** compared to np.amax and np.amin.
Usage:
`pip install numpy-minmax`
```
import numpy_minmax
min_val, max_val = numpy_minmax.minmax(arr)
```
The algorithm is written in C and is optimized with SIMD instructions. The code repository is here: h... |
I have the following directory structure:
```
src
|__app
|__layout.tsx
|__page.tsx
|__archive
|__page.tsx
|__[eventId]
|__page.tsx
```
and the following serverless function
```
import { revalidatePath } from "next/cache";
export async function GET() {
... |
## Watir Firefox Issue with iframe Handling
I'm experiencing an issue with Watir's iframe handling in Firefox. The issue does not occur in Chrome.
**Environment:**
- Watir Version: 7.3
- Selenium Version: 4.2
- Browser Version: Firefox 122.0.1 64-bit
- Browser Driver Version: geckodriver 0.34.0
- OS Version:... |
{"Voters":[{"Id":1974224,"DisplayName":"Cristik"},{"Id":6463558,"DisplayName":"Lin Du"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]} |
{"Voters":[{"Id":13447,"DisplayName":"Olaf Kock"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":6463558,"DisplayName":"Lin Du"}],"SiteSpecificCloseReasonIds":[18]} |
{"Voters":[{"Id":9599344,"DisplayName":"uber.s1"}],"DeleteType":1} |
{"Voters":[{"Id":12957340,"DisplayName":"jared_mamrot"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":6463558,"DisplayName":"Lin Du"}],"SiteSpecificCloseReasonIds":[13]} |
{"Voters":[{"Id":2395282,"DisplayName":"vimuth"},{"Id":16217248,"DisplayName":"CPlus"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]} |
{"Voters":[{"Id":9393102,"DisplayName":"xdurch0"},{"Id":9267296,"DisplayName":"Edo Akse"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]} |
This error occurs because NextAuth is Edge compatible, but some of the database adapters, such as Prisma, are not. If any of your files are configured to have a runtime on Edge, you'll likely encounter this error.
The solution is to locate the route.ts file in your app/api/[...nextauth] folder and set the runtime to... |
Trying to create a function where (from a typing perspective) based on the first two arguments it determines whether a 3rd argument should be provided or not. Whether the 3rd argument is required is based on if a specific nested key exists in the object based on the path of the first two arguments. I created a contrive... |
Firefox Iframe issue on Watir: Watir's iframe Handling issue with few methods. eg: wait_until and .html Methods |
|ruby|firefox|iframe|watir| |
null |
i want to use custom schema in interface jpa repository with native query like this :
application.yaml :
```
schema:
name:
first: schema1
second: schema2
```
Jpa Repository :
```
public interface UserRepository extends JpaRepository<User,String> {
@Query(value = "SELECT ID FROM ${schema.name.... |
custom schema in native query with jpa repository |
|sql|spring-boot|hibernate|jpa|spring-data-jpa| |
null |
I am calculating `pct_change` in pandas groupby but from the first element of each group. Hence i am using `cumprod()`. I already have a working code but it is little ugly. How can i use `pct_change()` and `cumprod()` in one liner.
**My code:**
import pandas as pd
import numpy as np
data = [[1... |
how to execute multiple functions in pandas groupby processing |
|python|pandas| |
How to setup indexer tier in Apache Druid version 28.0.0?
Need to change this _Default_tier to new_tier
[druid-console](https://i.stack.imgur.com/tG3tk.png)
I tried adding below parameter and then restarted druid, but no change was found.
druid.worker.category=test
druid.worker.capacity=5 |
You cannot immediately use [`System.Half`](https://learn.microsoft.com/en-us/dotnet/api/system.half?view=net-8.0) as type value `T`, as `Half` does not implement the `IConvertible` interface that you request in the constraint.
Since you state that you check the number type in the constructor anyway, you could as a w... |
Dataframe, get sum of range if value within range |
|python|pandas|dataframe|numpy| |
{"OriginalQuestionIds":[16026942],"Voters":[{"Id":1255289,"DisplayName":"miken32"},{"Id":213269,"DisplayName":"Jonas"},{"Id":3689450,"DisplayName":"VLAZ"}]} |
Flutter (Channel beta, 3.21.0-1.0.pre.2, on Microsoft Windows [Version 10.0.19045.4170], locale en-US)
• Flutter version 3.21.0-1.0.pre.2 on channel beta at C:\Users\wzalz\flutter_windows_3.19.3-stable\flutter
! Warning: `dart` on your path resolves to C:\Program Files\Dart\dart-sdk\bin\dart.exe, which is no... |
A problem with the FLUTTER appeared when I installed it in Windows |
|flutter| |
null |
The part of the implementation should go like this which will guarantee your conditions I think.
```swift
import SwiftUI
struct ContentView: View {
@State var title = "Title text"
@State var subTitle = "Subtitle text"
var isSubtitleLarger: Bool {
subTitle.count > title.count
}
... |
{"Voters":[{"Id":16217248,"DisplayName":"CPlus"},{"Id":781965,"DisplayName":"Jeff"},{"Id":5349916,"DisplayName":"MisterMiyagi"}]} |
You can make your code more modular and flexible by using dependency injection. With this method, you provide the components a object needs from outside the object. Thus, you can loosen the close relationships between modules and make your code easier to manage, making it more open to future changes.
In your current... |
Try doing the following:
1. Define the Id as following in the abstract class:
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
private String id;
2. I believe ArticleEntity should extend the base BaseEntity class.
3. Try calling repository.findById(... |
Before you read this answer, let me remind you that your code is prone to SQL injection and it's highly insecure, users might pass malicious scripts as the values they post which are then executed in your database updates, causing your system harm.
-------------------------------------------------------
The
``... |
Just meet similar problem no long before. I suggest reading [this question][1], which I found helpful.
[1]: https://stackoverflow.com/questions/49816206/cmake-find-package-specify-path |
Hi I am looking for a method to be able to get my MT4 alerts onto the trading view system so that I can be able to close my Mt4 terminal.
Are there any ready solutions?
If not I am looking to code my solution but I need a way to create the trading view alert.
Does trading view have an API function or is there ... |
MT4 to trading view alerts? Create trading view alert API |
|tradingview-api|metatrader4|mt4| |
The analytify plugin has already enqueued the script, so your code is enqueueing it a second time. Before your call to wp_enqueue_script, try adding:
wp_dequeue_script( 'analytify-events-tracking' );
which should work if the plugin has already enqueued the script when front_scripts runs. |
I have many **Dynamic** dictionary like this:
`{1: 'VDD', 2: 'VDD', 7: 'VDD', 0: 0, 3: 0, 4: 0, 6: 9, 13: 9, 'GND': 'GND', 15: 'GND', 12: 12}
`
I want to set ID as values for keys that they are not 'VDD' and 'GND' .
In this case the keys that have the same value must have the same ID .
IDs must start from 1 .
a... |
change and give id to values in dictionary |
|python|dictionary| |
null |
I have been working with Flutter and I have a doubt.
I am trying to show overlay on top of my screen. That's why I am using [flutter_overlay_window][1]
In its [example][2] code I found this
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
@pragm... |
In my project I have a simple Navigation Graph, **addOnDestinationChangedListener ** working fine but after the code click **addOnDestinationChangedListener ** is not trigger but navigation action did execute
```
CoroutineScope(Dispatchers.IO).launch {
kotlin.runCatching { Constants.getBitmapFromView(... |
NavController.OnDestinationChangedListener is not triggered during Navigation |
|android|android-architecture-navigation|kotlin-android| |
null |
I have to give the user input in the Jmeter console.
For example
Using scanner or other libraries i need to enter input values in the Jmeter console.
Jmeter log
Enter input : (Here i need to give input) testinputuser2
I have tried some code in jsr223 using groovy i got **java i/o execption: The han... |
I am using Microsoft student plan for azure for a project at my college. I have already deleted the resource group as well as some Network Reacher resource group. I am having a presentation after a few days and have only got 28 credits left. Why am I still getting charged?
I deleted all the resource groups. I was ex... |
Azure losing CREDITSSS |
|azure|azure-billing-api| |
null |
I dont think so javascript works like that sir, a **javascript script doesn't work when you place it in some kind of object (div in this case**) instead it is always **supposed to be put at the end of the HTML page** (before the body ending tag usually) and it works accordingly what you have written inside it.
**He... |
{"Voters":[{"Id":-1,"DisplayName":"Community"}]} |
## What we're trying to achieve?
Spring Data JPA lets us define repository methods like this:
```java
Optional<User> findByEmail(String email);
```
With that, the query to be run will be figured out with the method name. In this case, something like `select * from user where email = ?`.
We want to apply a... |
There is no real way to avoid such a factory while using an enum. But you could replace the enum with an factory object, something like:
```
public interface IFruit { }
public class Apple: IFruit { }
public class Orange : IFruit { }
public interface IFruitFactory
{
IFruit Create();
}
public class App... |
|azure|terraform-provider-azure| |
null |
I'm encountering an issue with the output formatting in my Python code related to displaying the hierarchy of employees in a company. Despite implementing the logic correctly, the output is displaying individual characters instead of complete strings representing employees.
**Here's a brief overview of the problem:*... |
Try choosing `Each sample` box under "Setup" in the [JMS Subscriber][1]:
[![enter image description here][2]][2]
The values of JMeter variables can be observed in [jmeter.log file][3] if you [increase JMeter logging verbosity to debug level][4].
You can also download or checkout [JMeter source code][5], open ... |
This is my code:
```
system_prefix = """You are an agent designed to interact with a SQL database.
Given an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.
Unless the user specifies a specific number of examples they wish to obtai... |