instruction
stringlengths
0
30k
Run `rake -T` on production mode throws errors
|ruby-on-rails|ruby-on-rails-7|
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; vertical-align: top; } th { tex...
I want to run a container which: 1) Has a non-root user running it by default (USER Dockerfile instruction) 2) Runs a system service (CMD Dockerfile instruction) as crontab The simplest thing one can think to is to execute the following Dockerfile: FROM openjdk:8 RUN apt-get update && apt-get -y instal...
How to start a service in CMD Dockerfile instruction after a USER instruction
|docker|cron|dockerfile|containers|
it turns out my problem was that somewhere in my code, there was code like this: document.body.onpaste = (e) => { e.preventDefault(); } `preventDefault()` prevents normal paste operations. i rewrote this line to only prevent default on a specific element that needed it (instead of the entire...
I will supplement the answer of Cypher_CS. I managed to fix sqlalchemy_mptt. Now I have sqlalchemy version = 2.0.23 In addition, I had to fix the following table.update().values() (In all places): Previously: connection.execute(table.update().values() Change to: from sqlalchemy import update ...
I just finished writing an app using the Uno Platform framework. It works perfectly well in Debug mode but when I run the release version (For Windows), my third-party libraries don't work well. I have added ```<PublishTrimmed>false</PublishTrimmed>``` to the Windows Head .csproj file but I'm still having this issu...
Uno Platform app runs perfectly well in Debug but not so well in Release
|uno-platform|
An `awk` solution (removes the last `n` characters *from every line* in the input): # Drop last 3 chars. from the (every) line. $ echo '1461624333' | awk -v n=3 '{ print substr($0, 1, length($0)-n) }' 1461624 **Caveat:** Not all `awk` implementations are locale-aware and therefore not all support *...
After adding the following dependency compile "com.google.auth:google-auth-library-oauth2-http:'1.23.0'" to build.gradle all integration tests related to rabbitMQ failed with a connection error: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused) ...
|python|list|dictionary|yaml|
The problem is that you are setting `head.next.next = head` and then calling `__repr__` with `print("3 HEAD", head)` or `print("4 NEW_HEAD", new_head)`. In `__repr__`the loop iteratively finds the `.next` attribute, but this causes an infinite loop as after two iterations the node being processed is `head.next.next`, w...
To Integrate the Monnify Payment into your php app, follow the following steps: Assumptions: - API Key: MK_TEST_ABCDEFGHIJ - Contract Code: 1234567890 - Secret Key: ABCDEFGHIJ1234567890ABCDEF12345 Visit your [Monnify Dashboard][1] to get your actual keys. In your front end, initiate the request by placin...
Have you encountered a frustrating issue with your Jetpack Compose ModalBottomSheet? It works perfectly the first time you open it, but after hiding it, it becomes unresponsive and blocks all other UI interactions. You can see Screen Shot how we call and make ModalBottomSheet. ``` Button( ...
Stuck Bottom Sheet in Jetpack Compose?
|android|android-jetpack-compose|android-developer-api|android-jetpack-compose-material3|material3|
null
this worked for me I enabled the pointer event and listened that according my needs Rive( artboard: _levelArtboard!, useArtboardSize: true, fit: BoxFit.fitHeight, enablePointerEvents: true, )
|php|wordpress|woocommerce|discount|shipping-method|
null
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'm trying to display a ChatView if it is selected from the following code. But I only get to see the ProgressView, although I know for sure that this should not happen. Here is my code: ``` struct ChatListView: View { @State private var shouldShowChatCreationScreen = false @State private ...
The issue is that `npm` isn't just `npm`, there's actually multiple (scripts): - `npm` - `npm.cmd` - `npm.ps1` When you execute `npm` in your terminal, then your terminal is smart and automatically picks the one it recognizes. In the same way that if you (on Windows) execute `foo` it will automatically run `...
`read` by default trims leading and trailing whitespace and consumes backslashes. You can disable those by setting `IFS` to empty string and invoking `read` with the `-r` flag respectively. ``` $ echo ' \" ' | { read i; echo ${#i}; } 1 $ echo ' \" ' | { IFS= read -r i; echo ${#i}; } 4 ```
It seems like the easiest solution was already mentioned in the exception message. `No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()` My issue got resolved after I added the Firebase.initializeApp() inside the background handler. Here is my final code. ```dart static Future<void> bac...
We are currently trying to catch an error, when a user with a company Azure AD Account tries to access the application, but does not have access to the tenant where the application resides (Multi-tenant authorization has been setup on the app). The user enters their credentials, and gets the below error when trying ...
RabbitMQ Connection Failure after adding google auth dependency
|amqp|google-auth-library|
null
That will not work. `With` is just an abbreviation so that you don't have to repeat an object name over and over again - it cannot be used for more than one object. As you just want to set the color, it makes not much sense to use a `With`-statement, you can simply use BldOvImgDiv1.Line.ForeColor.RGB = RGB(0...
I have some custom post types and I've made some custom WordPress user roles and want them to be able to create and update WordPress block patterns. What capabilities do I need to add to make creating patterns available to the user? As an administrator the option is available, as a user with only permissions to t...
If you prefer not to partition your topic and assign each partition to a different consumer, you can still process Kafka records in parallel. However, it is essential to ensure that you handle the consumer offset correctly. ### Handling the offset ### Kafka maintains a numerical offset for each record in a partit...
I am trying to create a reactjs module, develope and maintain separately from the main reactjs app I am working on. ```javascript import React, { useState } from 'react'; function MyComponent(props) { const [count, setCount] = useState(0); return ( <div> <h1>Hello, React!</h1> <p>Th...
Empty property that should not be empty
I am creating a hamburger menu in wix studios where in menu container I have placed images and text which opens a lightbox as a menu and I want a back button on the lightbox which closes the lightbox and opens the hamburger menu again. I have tried adding a hamburger menu element which opens the menu container but i...
clicking element closes lightbox and opens a hamburger menu in wix studios
|wix|velo|
null
I want to test a simple Verilog module that outputs `1` if the minterms `2`, `3`, `5` or `7` are found in a 3-variable input. The module looks like this: ``` module modified_prime_detector( input [2:0] in, input clk, output reg out ); always @ (posedge clk) begin out <= (~in[2] && in[1] ...
Output comes 1 clock cycle later than expected
The Dependency Inversion Principle says high-level modules should not import anything from low-level modules. So, the domain as a system's center should not depend on any library. So, you can create your own interface for these value objects and use them via dependency injection. This is in theory. But if we ...
Handling errors in MSAL Redirect - reactjs login with microsoft sso
|javascript|error-handling|azure-active-directory|single-sign-on|msal-react|
I am attempting to perform Device Authorization Flow on a CLI in Go. I have followed the steps in https://auth0.com/blog/securing-a-python-cli-application-with-auth0/ to set up my application in Auth0. After successfully requesting a device code, I attempt to get a request token. ``` // Gets a request token. func (l...
For those who could not understand the notification icon requirements let me break them down. Let's consider notification icon **facebook** which is white 'f' with blue circle on the background. Now for the notification icon make the 'f' transparent from the icon and generate the notification icon using ```asset man...
Where could be a mistake? // Plot der dynamisch angepassten Fibonacci-Niveaus for i = 0 to NumAdditionalLevels - 1 plot(additional_levels[i], color=color.new(#ffffff, 0), linewidth=1, trackprice=true, show_last=1, title=f"F_level_{i+1}") Hoppe someone could support. Thank you in advance! Hope someone will...
how can I plot calculated dynamic levels?
|pine-script-v5|tradingview-api|
null
I have this line of code which is outside of `script` tag `<i18n locale="en" src="../../local/en/index/first.json"></i18n>` This one uses static source, is there a way for me to import a file by setting the `src` dynamically, or better set this as a prop when possible?
How to make source dynamic for vue-i18n
|vue.js|vuejs3|vue-i18n|
struct MyStruct { static var x = myX() lazy var y = myY() } func myX() -> String { print("myX is running") return "" } func myY() -> String { print("myY is running") return "" } MyStruct.x = "X" var myStruct =...
Inconsistency in lazy variable initialization between static and instance properties in Swift
|swift|properties|lazy-initialization|
Playwright is a framework for web testing and automation. It allows testing Chromium, Firefox and WebKit, Chrome, and Microsoft Edge with a single API. Playwright's API is similar to Puppeteer, but with cross-browser support and Python, Java, and .NET bindings, in addition to Node.js.
Using useState reacthook in a reactjs module is throwing error: Invalid hook call
|reactjs|rollup|
I am getting the following error in my ASP.NET Core 6 application frequently: > Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected end of request content The stack trace is unfortunately not helpful, it does not point to any useful place in my own code. ``` Microsoft.AspNetCore.Ser...
"Unexpected end of request content" exception in ASP.NET Core
|c#|asp.net-core|.net-core|
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. It does not discard the rest of this buffer. Other characters entered will be available for the n...
Your question is probably opinion-based, as no one will be able to give you a definitive answer or a guarantee that the code you are using is going to be stable, even when requiring `@ExperimentalApi`. <br> I can only share my thoughts and experience. ----------------- At the current point, basically everything i...
|python|machine-learning|scikit-learn|
I think the log is clear. It says __There is not enough space on the disk__. So delete some stuff to get more space and retry; and if you get errors delete __caches__ directory from _C:\Users\sahir.gradle\caches_ (and try again).
Recently I also faced same problm in MacOS while opening R studio , it produces a pop-up error saying > File Listing Error, Error navigating to ~/Desktop: Operation not permitted. so waht u have to do - open R studio - you may find RStudio next to apple icon Click over there - Then click...
I was trying to search for a url: `https://rewards.bing.com/pointsbreakdown` with the help of Selenium in Python so I wrote the following block of code ``` search_in_first = driver.find_element(By.ID, 'sb_form_q') search_in_first.send_keys(search_random_word()) search_in_first.submit() ``` but it redirects to a n...
|python|json|themoviedb-api|
you'll need to add the `multiple` parameter to the upload widget. You can read about it via documentation: https://cloudinary.com/documentation/upload_widget_reference#:~:text=opened.%0ADefault%3A%20local-,multiple,-Boolean
I'm currently working on a school project where I need to apply multiple border images to an element using border-image-source. However, I'm encountering issues where only one of the border images is displayed, while the other is not being applied. It would show up as a grey border instead if both of the borders are ap...
null
I have a nestjs application where the endpoint has this code `response.cookie("refreshToken", refreshToken, {httpOnly: true, signed: true, maxAge: 1000 * 60 * 60 * 24})` and on the nextjs client in the middleware I send a request to this endpoint ``` import { cookies } from 'next/headers' import { NextRequest, NextR...
null
class GCNModel(nn.Module): def __init__(self, in_channels, hidden_dim, out_channels, edge_dim): # 5, 64, 6, 3 super(GCNModel, self).__init__() self.conv1 = Edge_GCNConv(in_channels=in_channels, out_channels=hidden_dim, edge_dim=edge_dim) self.conv2 = Edge_GCNConv(in_...
Suppose you are writing a python web client to access an API of an online supermarket. Given below are the API details. Base URL= http://host1.open.uom.lk:8080 The following product has been entered into the API server by you in the previous question. However, it has been noted that the entered product's brand s...
api one jason python
|python|json|api|
null
I am a Django and Python beginner, and I encountered a problem while using Django. I hope to use a filter in the template to get the string I need, but the result below is not what I expected. ```python # filter definition @register.filter def to_class_name(obj): return obj.__class__.__name__ ``` ...
django add filters in template is not working expectedly
null
I'm developing a Fortran parser using ANTLR4, adhering to the ISO Fortran Standard 2018 specifications. While implementing lexer rules, I encountered a conflict between the `NAME` and `LETTERSPEC` rules. Specifically, when the input consists of just a letter, it is always tokenized as `NAME` and never as `LETTERSPEC`. ...
Same problem with you. I tried checking again and replacing it using the getInfo function. Link [pypi/youtube-search-python][1] [1]: https://pypi.org/project/youtube-search-python/
I run `chmod -R 755 node_modules` and it works.
I'm working on a React project utilizing Material-UI for styling components. I've heard about Normalize.css for consistent browser rendering, and I'm wondering if it's possible to integrate Normalize.css with React MUI. Specifically, I'm interested in: Whether using Normalize.css alongside Material-UI is recommen...
Can we use normalise.css package with react MUI CSS?
|reactjs|
null
I can't see any obvious problem with your code, but I suspect there is something you are not showing us. Maybe just set up the task logger using `celery.utils.log.get_task_logger`, so you can see if it actually starts the function. Find a link with info below. https://www.programcreek.com/python/example/88906/celery...
I have added a test case to an existing (mixed Objective-C / Swift) project. Building and running the project on simulator or devices is no problem. However, when trying to run the test, I get the error message `Expected a type` on the line `+ (UIUserInterfaceStyle)currentUIStyle;` [![enter image description here][1...
Xcode compile error "Expected a type" shows only when running tests
|ios|objective-c|xcode|xctest|
My main activity is this: class MainActivity extends AppCompatActivity { ActivityMainBinding uiBinding; @Override protected void onCreate(Bundle savedInstance){ super.onCreate(savedInstance); uiBinding = ActivityMainBinding.inflate(getLayoutInflater()); ...
I am trying to use a widget that I have created in reactjs using script tags like below- **React Implementation** <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> import React from "react"; import { Helmet } from "react-helmet"; const Dust = () => ...
Script tag not loading content in nextjs but working fine in react
|javascript|css|reactjs|next.js|react-widgets|