I have a spring project with Gradle. I created a task in the build.gradle: task dockerFile(type: Dockerfile) { destFile.set(project.file('Dockerfile')) from "alpine:$alpineVersion" runCommand 'apk add --no-cache openjdk11' copyFile "build/libs/${jar.archiveFileName.get()}", '/app/' workingDir '/app/' entryPoint 'java' defaultCommand '-jar', "/app/${jar.archiveFileName.get()}" } Everything works fine. Dockerfile is generated. But when I try to run the image it gives me the error: no main manifest attribute, in /app/demo-0.0.1-SNAPSHOT-plain.jar Also here is my entire build.gradle: import com.bm
.onContinueUserActivity is never called in the state restoration example app provided by Apple. Inside of DetailView, this method is called: // The described activity for this view. .userActivity(DetailView.productUserActivityType, isActive: product.id.uuidString == selectedProductID) { userActivity in describeUserActivity(userActivity) } Inside of ContentView (parent of DetailView), this method is NOT called: .onContinueUserActivity(DetailView.productUserActivityType) { userActivity in if let product = try? userActivity.typedPayload(Product.self) { selectedProduct = product.id.uuidString } }
I have a product for which I store software builds in Artifactory. I name the software artifacts like this, so it is possible to se what a downloaded file contains: system-pcm33-base-v0.0.0.0_65_ga03970a.raucb Thus it is also possible to download directly via an URL, not using jfrog https://artifactory.deif.com/ui/native/amc-sw/pcm33/master/system-pcm33-base-v0.0.0.0_65_ga03970a.raucb Now I would like to make a quick way to download the latest master build. To do this I have in my build made a symlink system-pcm33-base.raucb -> system-pcm33-base-v0.0.0.0_65_ga03970a.raucb I can also push this
I am having a bit of a challenge implementing CASL in my app. I have created the following composable useAppAbility ("hook") that defines all the rules: import { AbilityBuilder, createMongoAbility, subject } from "@casl/ability"; import { useAbility } from "@casl/vue"; const service = {}; const user = {}; const subscription = {}; const invoice = {}; const account = {}; const ability = createMongoAbility(); const ROLES = ["admin", "account_owner", "beneficiary", "super_admin"]; const defineAbilityFor = (role: Object) => { const { can, rules } = new AbilityBuilder(createMongoAbility); const is =
I'm trying to merge groups of adjacent polygons, but I'm getting big multipolygons with non-adjacent areas. In the code block below plot(Matsuyama.sf) shows a large contiguous region and a few islands, but I can't extract those geometries. How do I get those areas and geometries. library(sf) library(tidyverse) Matsuyama.sf <- st_read("https://geoshape.ex.nii.ac.jp/city/geojson/20210101/38/38201A1968.geojson") Matsuyama.sf <- st_transform(Matsuyama.sf, crs=4326) plot(Matsuyama.sf) st_area(Matsuyama.sf) I can split into hundreds of polygons, but the code options below just lump them back togethe
I have a class, for example User, with a dependency of type IValidate in the constructor paramaters. Could someone please help me create fake object with a mocked instance for this parameter? Right now it is throwing an exception. Is there any way to configure the parameter?
While using import torch_geometric I get a module not found error from torch_geometric.data. import torch runs without an error. --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) Cell In[2], line 1 ----> 1 import torch_geometric File ~\anaconda3\envs\python3_8_10\lib\site-packages\torch_geometric\__init__.py:4 1 from types import ModuleType 2 from importlib import import_module ----> 4 import torch_geometric.data 5 import torch_geometric.loader 6 import torch_geometric.transforms File ~\anaconda3\envs\python3_8_10\li
I have this structure in FastAPI. project_folder/ project_folder/app/ project_folder/app/main.py (with app object of FastAPI) project_folder/app/rest/panel.py (here I try import app object from main) In panel.py I import by: from ..main import app or from app.main import app Its works with other files... like "from app.models import XYZModel". I run by command: bash -c "uvicorn main:app --host 0.0.0.0 --port 8000 --reload" and I try this: bash -c "uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload" It works. All paths and imports to multiple files inside different directories work fine.
I'm trying to update from Angular@13 to Angular@15. After doing so, I'm getting compile error that I completely don't understand. 'SharedModule' does not appear to be an NgModule class. src/app/shared/shared.module.ts:127:14 127 export class SharedModule { ~~~~~~~~~~~~ Is it missing an @NgModule annotation? It is module that I use in a whole project that has other modules imported. Here is code with that module. @NgModule annotation is there. import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {RouterModule} from '@angular/router'; import {FontAwesomeMo
context Our current context is the following: researchers are running HPC calculations on our Kubernetes cluster. Unfortunately, some pods cannot get scheduled because the container engine (here Docker) is not able to pull the images because the node is running out of disk space. hypotheses images too big The first hypothesis is that the images are too big. This probably the case because we know that some images are bigger than 7 GB. datasets being decompressed locally Our second hypothesis is that some people are downloading their datasets locally (e.g. curl ...) and inflate them locally. Thi
I have a list of numbers as str li = ['1', '4', '8.6'] I want to convert them to [1, 4, 8.6]. If I use int to convert, the result is [1, 4, 8]. If I use float to convert, the result is [1.0, 4.0, 8.6]. I've tried this: li = [1, 4, 8.6] intli = list(map(int, li)) floatli = list(map(float, li)) print(intli) # -> [1, 4, 8] print(floatli) # -> [1.0, 4.0, 8.6]
Hello I'm a total beginner to Unity and just installed. Every time I try to create new 3D project, Error window pop up "Failed to resolve project template: [com.unity.template.3d] is not a valid project template." any suggestions on what to do? Unity 3.3.0 I tried googling the answer but it seems that the Error for everyone else is different than mine.
I have to convert the binary to string, I tried something, but it didn't work. This is my code (I am not allowed to change the main function!), but I can't understand what's wrong: #include <stdio.h> #include <stdbool.h> #include <math.h> #include <string.h> void decode_bytes(const int rows, bool bytes[rows][8], char string[rows]) { int iteration = 8; for (int j = 0; j < rows; j++) { for (int i = 0; i < iteration; i++) { if (bytes[j][i] == 1) { string[j] += pow(2, iteration - (i + 1)); } } } } int main() { bool bytes2[7][8] = { { 0,1,0,0,1,0,0,0 }, { 0,1,1,0,0,1,0,1 }, { 0,1,1,0,1,1,0,0 }, { 0
I would like to create a table in an odt (OpenDocumentText) file using odfpy? The docu of the package is outdated and the project nearly orphaned (but maybe on its way back I think). Be aware I don't mean Spreadsheet documents but text documents.
I am trying to publish a web app to IIS and I am getting this error in my publishing profile. Underneath that it gives me the path to my dotnet-tools.json file and says, "...dotnet-tools.json came from another cmputer and might be blocked to help protect this computer. For more information, including how to unblock, see https://aka.ms/motw. I went to the site listed, but frankly everything there was way over my head. I have Googled and read multiple posts, but cannot seem to find a solution. One post said to right click on the file, the properties and on the General tab, check the "unblock" bo
I am building a text editor but I can't save the file because I can't get the text within the textbox. Even thought in the entry widget I can use .get() to get the text. I tried .get() but it displays an error that it isn't an option.
I am having an issue with my Laravel Voyager admin panel. After upgrading my PHP version and updating Composer packages, all pages on Laravel Voyager work except /admin/products. I have tried running the following cache and config commands: php artisan optimize php artisan config:cache php artisan route:clear php artisan view:clear php artisan key:generate Even after clearing all caches, the page still returns a 404 Not Found error. Running php artisan route:list shows that the route exists in the registered route list. What could be causing this specific route to return 404 despite being regi
im trying to compile a basic code with GTK3+ on Debian11 and i got the following error: fatal error: gtk/gtk.h: No such file or directory im using vs code and the autocomplete find the path to the file gtk.h but showme a include errors. I compile with this command: gcc main.c -o main 'pkg-config --cflags --libs gtk+-3.0' The output of pgk-config --cflags --libs gtk+-3.0: :~/Code/GTK/gtkTutorial$ pkg-config --cflags --libs gtk+-3.0 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2
On Ubuntu 20.04 with Gnome3 and X11 and Qt5.12.8 (PyQt 5.14.1) from PyQt5.QtWidgets import QSystemTrayIcon, QApplication qapp = QApplication(['']) print(str(QSystemTrayIcon.isSystemTrayAvailable())) shows True as user and False as root (via sudo as well as via pkexec). How can I find out the reason for "False as root" (is there a way to enable logging for this) and how can I enable system tray icons also for code running as root? I have also tried to inject the user's X11 env vars but this does not help: pkexec env DISPLAY=$DISPLAY XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR XAUTHORITY=$XAUTHORITY python
Is it possible to move firebase database from one account to another account. My client want to move the database to firebase under their account. Is there any way to move from account ([email protected]) to account ([email protected]). Many thanks
If you don't add any more fields to your subclass is there a need to add the @dataclass decorator to it and would it do anything? If there is no difference, which is the usual convention? from dataclasses import dataclass @dataclass class AAA: x: str y: str ... # decorate? class BBB(AAA): ...
I use Expo 46. I would like to change some config in my AndroidManifest so I run an npx expo prebuild that generates an android folder without error. But then my eas build is not working anymore (it is if I don't run prebuild). I get this error: Failed to find 'build.gradle' file for project: /home/expo/workingdir/build/android/app. Am I missing something?
The job is to extract the table from the scanned PDF. I tried using Camelot/tabula, but nothing worked. Any suggestions on how can I extract the tables? Example Camelot/tabula none of them detects the table. Attached the pdf link : https://drive.google.com/file/d/1atUmkNBkOGYFn43ZQreNqSg74XRhFP61/view?usp=sharing
Upgrading the spring version from 3.x to 5.x in the project. Already the project has objectmapper from org.codehaus.jackson.map.ObjectMapper(1.9.11) and com.fasterxml.jackson.data-bind.ObjectMapper(2.11.0) both were used and in working condition with spring version(3.x). Eclipselink is the jpa implementation currently using. After upgrading the spring version to 5.x, it is showing the following error: Internal Exception: java.lang.NoClassDefFoundError: com.fasterxml.jackson.databind.ObjectMapper Is there any dependency conflict? if so how come it has worked in the spring old version? The onlin
I am working on an issue where the password and username are being shown in the log files of an application. Whenever the application does a POST call, the log of the same gets stored in the httpd logs file. But it shows the password in the plain text(see below). Is there any way I can mask the password? Below is the log which I was talking about. 10.181.214.53 - - [22/Nov/2022:16:26:13 +0530] "POST /uaa/oauth/token?grant_type=password&username=223053925&password=Gei321itc HTTP/2.0" 401 62 I tried editing the custom logs file, but was not successful. Can anyone please help me?
I have been running Jenkins for 10 years, but after I upgraded Jenkins.war ( 2.361.4 LTS by 2022-11-17) to the latest version, and also openjdk-17-jre on Ubuntu Focal 20.04 LTS. Jenkins keeps restarting and throws the following stack trace to to the log (long version omited): java.lang.AssertionError: class hudson.security.csrf.DefaultCrumbIssuer is missing its descriptor How to fix the problem? I'm starting jenkins by command: jenkins -jar jenkins.war I'd expect Jenkins to start. Jenkins gives "Please wait while Jenkins is getting ready to work ..." on the web page, but then restarts and neve
I need to hide the whole column in the rtf template when the value is equal to '0'. Then it needs to be shown when the value is greater than 0. I have tried the ff. But none of them worked. Sol#1 Column Header <if@column:COLUMNAME="0"?> Cell <if@column:../../COLUMNAME="0"?> Sol#2 Column Header <if@column:contains(COLUMNAME, '0')?>COLUMNHEADERNAME> Cell <if@cell:contains(COLUMNAME, '0')?> Sol#3 Column Header <if@column:/COLUMNAME/@type="PRIVATE"?> Cell <if@column:/COLUMNAME/@type="PRIVATE"?> Here's the sample template output. The cells highlighted in yellow should be hidden. template output