on-internet

I have project created by laravel 8 ,and i use JWT for my API ,now i can't install pusher because of JWT version

Someone can help me to fix this conflict Your requirements could not be resolved to an installable set of packages. Problem 1 - tymon/jwt-auth is locked to version 1.0.2 and an update of this package was not requested. - tymon/jwt-auth 1.0.2 requires php ^5.5.9|^7.0 -> your php version (8.0.1) does not satisfy that requirement. Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Join the discussion →

Checking HTML for formatting tags (bold, italics etc.)

I am using edgarWebR to parse 10K (SEC EDGAR) filings. I am trying to write an algorithm to deduce whether each HTML element is normal text, a subheading or a heading by checking how the document is formatted (e.g. some 10Ks might have all headings in bold italics, and subheadings in just italics) edgarWebR returns a dataframe with each element corresponding to a row, containing the text and HTML. An example of some HTML: <p style="margin-top:18px;margin-bottom:0px"><font style="font-family:ARIAL" size="2"><b><i>Our quarterly operating results have fluctuated in the past and might continue to

Join the discussion →

Route keep asking for parameter even if not set to receive any

I'm new to laravel and I'm having trouble with one of my web routes... I grouped some routes with the auth middleware Route::middleware(['auth:web'])->group(function ($router) { Route::get('/news', [NewsController::class, 'news'])->name('news'); Route::get('/profile/{user_id}', [ProfileController::class, 'profile'])->name('profile'); Route::get('/marketplace', [MarketplaceController::class, 'marketplace'])->name('marketplace'); }); Before this issue, I have set a user_id parameter for the news route and then removed it the next day, now the news route keeps returning error saying it needs user

Join the discussion →

Stream run-time generated gzip file with proc_open

I'm trying to stream a tar.gz without buffering anything in memory or saving data do disk. I need to gzip a bunch of PDF files (~100kb per file). Everything seems to work fine if small 10-20 bytes text files are sent through the script and the user downloads a readable tar.gz file, but when sending real data (run-time generated PDF files) the script blocks and stops Below is a snippet of the code. Why is the script blocking when writing to stdin after a couple of iterations of the loop? It stops at this point waiting for something Every step is logged to a file to see the message before writin

Join the discussion →

tensorflow: Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found

When i run my program i see this error: I have CUDA 11 and there is not such dll file in bin folder: I use: Python 3.8.7 CUDA 11.0 tensorflow 2.4.1 On this page there is information https://www.tensorflow.org/install/source#gpu tensorflow-2.4.0 Python 3.6-3.8 CUDA 11.0 that that versions are correct. Does anyone know how I can fix this problem? What should I download or reinstall?

Join the discussion →

How to override LoginDisplay in Blazor Identity Server 4 in ASP.NET Core WebAssembly .NET 5

I have a question related to overriding existing authentication/authorization in ASP.NET Core 3. I am using ASP.NET Core Blazor WebAssembly on .NET 5 (version 5.0.102), Microsoft Visual Studio Community 2019 Version 16.8.4 (latest technology stack at the current time). I create project from template of Blazor WebAssembly template .NET 5 with individual account from Identity Server 4. This is file MainLayout.razor @inherits LayoutComponentBase @inject NavigationManager NavigationManager <div class="page"> @* <div class="sidebar"> <NavMenu /> </div>*@ <div class="main"> <div class="px-4 auth"> <

Join the discussion →

Can any .md file be set to autodisplay in a github repo the way that a README file does?

If I render my .Rmd output as a github_document it saves as an .md file. I would like this .md file to automatically display in the way that a README.md file does in github. This would highlight the actual output of my analysis, but I am unsure of how to make .md files autodisplay when they are not special files(README.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md). For only such files, github creates dedicated tabs at top. Is there a way to treat other .md files in the root folder as such special files?

Join the discussion →

Penetration Testing Finding - JWT is encoded using Base64

We are using OpenIDConnect in our application for authentication and authorization. The generated ID token is in JWT format and is stored in a cookie in httpOnly mode. We have a Penetration Testing finding where they extracted the SESSIONID field. Its value was the JWT. As with all JWT implementation, it is encoded in base64 and can easily be decoded. Hence, the values in the payload section were seen. They told us this is a security issue. My questions are: The Pentest finding got me confused since Base64 encoding is a standard of JWT and we are already using HTTPS in our connections. So, I d

Join the discussion →

Ways to determine if something is a plain object in JavaScript

I've recently stumbled on this function which determines if something is a plain object is JavaScript: function isPlainObject (value){ if (typeof value !== 'object' || value === null) return false; let proto = value; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(value) === proto; }; Source: https://github.com/redux-utilities/redux-actions/blob/3fa4c50dfeab54fa1f2110764757ee4c10c8e3ac/src/utils/isPlainObject.js I would like to know: If the following approach will do exactly the same stuff? If so, can it be considered more ef

Join the discussion →

Spring boot application slow performance

I have a very basic Spring boot application, which exposes CRUD Rest APIs for a very simple entity. Running performance test using JMeter shows the very bad response time Product (id, name, description) Constraints: id PK AUTOINCREMENT Settings: Number of Threads: 100 Ramp-up period: 10 (seconds) Infinite loop Duration: 60 (seconds) 4 APIs exposed to perform the following functions @Override public Product findById(Integer id) { return repository.findById(id) .map(mapper::map) .orElseThrow(() -> new RecordNotFoundException(1, "Product not found")); } @Transactional @Override public Product cre

Join the discussion →

How to get DeviceInfo and DeviceId in React js web application Not React-Native Application

I have Installed React-native-device-info API in my React js project. But when running npm start command in command prompt it was throwing error like " Module not found: Can't resolve 'react-native' in '\node_modules\react-native-device-info\lib\module' . I have tried all the solutions on google. But the implementations are related to react-native applications only. I need some help how to get deviceinfo and deviceid for REACTJS web application.

Join the discussion →

Plotting multiple pie charts in a single figure

these are my columns: SeniorCitizen Partner Dependent Yes Yes No No Yes No No No Yes Yes No No I wanted to plot separate pie charts of all these columns in a single figure or sheet. This is my code: ax1 = df2['SeniorCitizen'].value_counts().plot(kind='pie', figsize=(5,5), fontsize=10, labels = ['No', 'Yes'], autopct='%1.0f%%') ax1.set_title('% of Senior Citizens', fontsize = 12) plt.show() ax2 = df2['Partner'].value_counts().plot(kind='pie', figsize=(5,5), fontsize=10, autopct='%1.0f%%') ax2.set_title('% of People with and without partner', fontsize = 12) plt.show() ax2 = df2['Dependents'].val

Join the discussion →

Get types of Postgres query result without executing query

Given a running Postgres cluster, how do I get an array of type names for the columns of an arbitrary query result? I'd prefer to avoid executing the query since the queries might be prepared meaning I can't run the queries without specifying concrete values for the prepared expressions. Example schema CREATE TYPE book_type AS ENUM ('FICTION', 'NONFICTION'); CREATE TABLE books ( book_id SERIAL PRIMARY KEY, book_type book_type NOT NULL DEFAULT 'FICTION' ); How do I get the type names of the columns for the returned rows for the following query? SELECT book_id, book_type, 'arbitrary_column', '20

Join the discussion →

How to convert RTF to Docx in Python

I'm using doxygen to generate rtf output, but I need the rtf converted to docx in an automated way using python to run on a build system. Input: example.rtf Output: example.docx I don't want to change any of the styling, formatting, or content. Just do a direct conversion. The same way it would be done manually by opening the .rtf in word and then doing SaveAs .docx

Join the discussion →

i cant get this TypeError fixed [closed]

error message: `Traceback (most recent call last): File "main.py" line 23, in <module> if gold>="4": TypeError: '>=" not supported between instances of 'int' and 'str'` my code: Code: import random hp=34 maxhp=34 strenth=5 weapon='fist' gold=0 monsters=["goblin","Orc","hobgoblin","dragon","Troll","tarasque"] while hp>=1: print('\ngold:',gold) print('\nhp:',hp) print('\nmaxhp:',maxhp) print('\nstrenth:',strenth) print('\nweapon:',weapon) print("\n\n[1]BATTLE!!!\n[2]shop") answer=input() if answer=='1': random.choice(monsters) elif answer=="2": print('what would nyou like to purchase?\n\n[1]smal

Join the discussion →

How do I find the text that matches a pattern?

NOTE: This is not a duplicate of any existing question, it's intended to show why such an extremely common and seemingly simple question is unanswerable and provide guidance on how people posting such questions can modify them to make them answerable so we don't have to keep providing the same guidance in comments almost every day and can just refer to this instead. Given the following input file: foo o.b bar I need to output all lines that match the pattern o.b so my expected output is: o.b and I have tried awk '"o.b"' file but that output all lines (this part just added to avoid complaints t

Join the discussion →

PyCharm Asking for GitHub Login

I am cloning my Git repository using PyCharm but it is asking for Login again. When I click "Login via GitHub...", it does not login. Then I cloned my repository using git clone, it worked fine. I, then, opened the directory with PyCharm and tried to Update (Pull), it is again asking for login. How to configure this problem? Here is the Dialogue box which shows:

Join the discussion →

How to solve for: net::ERR_CONNECTION_REFUSED when GET data to React?

I'm trying to get this API call to work using axios: const getData = () => { Axios.get("http://localhost:3000/security?select=symbol,company", {headers: {Authorization: 'Bearer 73Ntx3b6SwNXC7ANV3tw4wFfDdKntB26', "Access-Control-Allow-Origin": "*", mode: "cors", }} ).then((response) => { console.log(response) }) } My local API server is up and running, I can make requests using curl and see JSON data. However, the calls do not work when I implement a GET request in my React App. I'm a little curious to know why I'm getting these errors: Failed to load resource: net::ERR_CONNECTION_REFUSED creat

Join the discussion →

jest ReferenceError: Cannot access '' before initialization

I'm getting the error: ReferenceError: Cannot access 'myMock' before initialization Even though i respected jest documentation about the hoisting: A limitation with the factory parameter is that, since calls to jest.mock() are hoisted to the top of the file, it's not possible to first define a variable and then use it in the factory. An exception is made for variables that start with the word 'mock'. I'm doing this: import MyClass from './my_class'; import * as anotherClass from './another_class'; const mockMethod1 = jest.fn(); const mockMethod2 = jest.fn(); jest.mock('./my_class', () => { ret

Join the discussion →

Identity Scaffolding on Ubuntu 20.04 using incorrect file paths dotnet 5

Output of dotnet --info: .NET SDK (reflecting any global.json): Version: 5.0.101 Commit: d05174dc5a Runtime Environment: OS Name: ubuntu OS Version: 20.04 OS Platform: Linux RID: ubuntu.20.04-x64 Base Path: /usr/share/dotnet/sdk/5.0.101/ Host (useful for support): Version: 5.0.1 Commit: b02e13abab .NET SDKs installed: 3.1.404 [/usr/share/dotnet/sdk] 5.0.101 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.

Join the discussion →

How to properly create a popup component in Vue 3

As part of becoming a better Vue programmer, I am trying to implement a popup similar to Popper with a clean and Vueish architecture. Here is a simple schematic that I came up with: So basically there is a target component, which is the reference for the popup's position. The popup can be positioned above, below, right and left of the target, therefore I will need to have access to the target element in my popup. Also, the target can be an arbitrary component. It can be a simple button or span, but also something much more complex. Then there is the popup itself, which will be put into a modal

Join the discussion →

How can I remove the exceeding parts in the buildings in this image?

original unfiltered imageI have a problem with the detected areas of the rooftops in this image. I already made dilation and open morphological operations and this is the best result I got. Any ideas on how can I optimize the areas and remove the exceeding parts?? Thanks in advance. The approach I used was as follows: 1-shadow masking and vegetation masking were done first 2- Gaussian blur and mean-shift segmentation followed by K-means clustering 3- connected components algorithm to produce regions for pixels with similar spectral properties. but the sidewalk and footpaths were segmented toge

Join the discussion →

How to set VS Code extension Intelephense for PHP 8?

I would like to set my bought Visual Studio Code extension to use PHP 8 version for it's "intelisense" functionality. Checking defaultSettings.json for 'intelephense' search query gives lots of hits, but only one stands out to me for upgrading to PHP 8: // A semver compatible string that represents the target PHP version. Used for providing version appropriate suggestions and diagnostics. PHP 5.3.0 and greater supported. "intelephense.environment.phpVersion": "7.4.0", This should probably be changed in Workspace Settings .vscode\settings.json to "intelephense.environment.phpVersion": "8.1.0-de

Join the discussion →

WP5 Module Federation: Singleton instantiated multiple times

Unfortunately, my repro for this is in a complex proprietary project, so I will do my best to explain what is going on. The closest example project to my use-case is this one: https://github.com/module-federation/module-federation-examples/tree/master/dynamic-system-host Essentially, I have an omnidirectional setup where a single Shell App consumes a set of Remote Apps. Remote Apps are discovered during runtime, and are hence not specified in the Webpack config. The Shell, as well as all Remotes, have a dependency on a shared library, my-shared-lib: "dependencies": { "my-shared-lib": "^1.0.0"

Join the discussion →

Jenkins failed to install plugins in startup

I'm trying to install Jenkins on win 10. all the plugins failed to install on the startup process and even after that for jenkins GUI. i'm running with jenkins 2.264,jdk-8u271-windows-x64 and windows 10 pro. please advise what am I doing worng. this is one of my error messages -> most of the errors look the same. (Java issue) java.io.IOException: Failed to load: Build Timeout (1.20) - Plugin is missing: token-macro (1.5.1) at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:951) at hudson.PluginManager$2$1$1.run(PluginManager.java:551) at org.jvnet.hudson.reactor.TaskGraphBuil

Join the discussion →

migration of clients, addresses and prestashop 1.7 orders

I copied the complete folder of my prestashop 1.7.3.0 on a new folder on my server with new database, install a new theme and maj prestashop in 1.7.7.0 The concern is that now that I have finished in the meantime I have had orders and customers. I imported the products in excel redone the variations by hand. How can I subsequently export customers and orders? In excel import of my last clients it tells me that the password is required for the import? What would be the best method even going on phpmyadmin to import the customers, addresses and orders that I miss on the new store? Thanks for you

Join the discussion →

SqlException: Invalid object name Person.Person

I'm following this tutorial to create a sample API in ASP.NET Core 3.1 using Visual Studio 2019 project templates, but since I'm using the AdventureWorks (2019) database, I've had to make some changes. Database Context has been scaffolded like this. public partial class AdventureWorks2019Context : DbContext { public AdventureWorks2019Context(){} public AdventureWorks2019Context(DbContextOptions<AdventureWorks2019Context> options) : base(options){} . . . public virtual DbSet<Person> Person { get; set; } . . . } And then I have registered this context in startup.cs like this: public void Configu

Join the discussion →

Plex behind nginx reverse proxy

I need to use Plex Server behind nginx reverse proxy and I'm using this configuration: server { listen 443 ssl http2; ssl_certificate /etc/nginx/ssl/cert.pem; ssl_certificate_key /etc/nginx/ssl/key.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256; ssl_prefer_server_ciphers on; ssl_ecdh_curve prime256v1:secp384r1; locati

Join the discussion →

org.springframework.web.client.ResourceAccessException: I/O error on GET request for 'https://[myendpoint]'

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; I am working on a REST call from my windows development machine. I have tried following the guidelines for adding a certificate in my Java keystore in: "C:\Program Files (x86)\Java\jre1.8.0_271\lib\security\cacerts" Infact I have another JAVA directory in: C:\Program Files\Java\jre1.8.0_271\lib\security\cacerts I have tried storing my certificate in both keystores. At the site, that is exposing a rest service, I save the certificate from my Google

Join the discussion →

Insert data to multiple tables in spring jpa

I have two tables, user and transaction. Where one user can have many transactions. So, every time I execute create new user, they automatically make a new transaction and the transaction type is SEND MONEY. But I don't understand how to write it in Spring JPA. Please take a look at my code and help me. User.java @Entity @Table(name = "user") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private long id; @Column(name = "name") private String name; @Column(name = "email") private String email; @Column(name = "password") private String password; @Co

Join the discussion →
Older stories