on-internet

吉村知事は「大阪だけじゃない。日本の吉村」トミーズ雅が絶賛「欠けてる部分何もない」/デイリースポーツ online

吉村知事は「大阪だけじゃない。日本の吉村」トミーズ雅が絶賛「欠けてる部分何もない」 拡大 お笑いコンビ・トミーズの雅が16日、MCを務めるMBSの情報番組「せやねん!」に出演し、吉村洋文大阪府知事について「もう大阪だけの吉村さんじゃないよ。日本の吉村さんや」と絶賛した。 称賛はしばらく止まらず「吉村...

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 →

Calculator with C programming

I am writing a calculator in C, but it will take input like 1+2*9/5. I am not an expert in C, so I thought I can ask the user how many numbers he has (for example let's say 4), then asking 3 times "enter the number, enter operator" and 1-time "enter number". Then putting all inputs to an empty array respectively then doing the operations by looping through the array. But of course, I've got problems. #include <stdio.h> void main() { printf("You will enter your operations in number - operator order.\n"); printf("How many numbers do you have to calculate?"); int how_many; //how many numbers the

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 →

the script don't inherit a native class that can manage a script unity

I'm a beginner programmer on c# and Unity. So I was making a grid system for my game and when I'm trying to add as a component every script in my unity project it prints this one error : "The script don't inherit a native class that can manage a script" I don't know what i need to do.Help me please if u can //////////first script/////////////// using System.Collections; using System.Collections.Generic; using UnityEngine; public class Gird1 : MonoBehaviour { private int width; private int height; private int[,] gridArray; public Gird(int width, int height) { this.width = width; this.height = h

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 →

[読切] 悪い書道部員 - もりぐちあきら | となりのヤングジャンプ

悪い書道部員 もりぐちあきら SD漫画賞佳作!! 背徳に染む優等生!! 箱入り娘兼圧倒的優等生、屋久島しずく。17歳。異性や俗物とは関わらず、勉学にのみ励んできた彼女は着々と教養を身に着ける一方で、どこか抑圧を感じていた。そんな時出会った、“身体に文字を描くフェチ“のオタク書道部員・牧原。鬱屈していた彼女の心...

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 →

BackstopJS: Not able to scroll the page to end using scrollToSelector

I am using two files one to keep all the URLs and other variables and other to keep the scenario config const projectId = "test"; // let baseUrl = "someurl"; // let scrollToSelector = ""; let removeSelector = ""; // Replace the values of the below array with the relative URLs of your website. E.g., "/about", "/contact", "/pricing", etc. // Use just "/" to test the homepage of your website. // Add as many relative URLs as you need. const relativeUrls =[ "/about", "/documentation", "/case-studies/", "/solutions/", "/blog/" ]; relativeUrls.map(relativeUrl => { if (relativeUrl === "/about") { scro

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 →

How to resize my cards / divs using bootstrap?

I am working on UI using bootstrap, I have some cards/divs which I am showing using using Bootstrap-4 grid system and it is working fine. What I am trying to is to allow user to resize those cards/widgets. So I am using resize: both; overflow: auto; and that is working fine until I got the issue. The issue is I have given some grid like col-lg-3 so I am not able to resize it beyond that because its total width is col-lg-3. So here I am stuck don't know what to use to achieve what I am trying to. P.S. I know why it is happening, because I am fixing the width using grid-system, but I need to mak

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 →

Could not write and save live video using OpenCV

I am trying to write and save the video of my object detection. I have referred and tried based on the posts posted here in Stackoverflow. However, none of them is working. My specifications: Python 3.7.9 OpenCV 4.5.1 The code is as below import cv2 from main import * import imutils import math darknetmain = darknet_main() darknetmain.setGPU(is_GPU=True) saveVid ="./data/test_sampah_tasik.mp4" video = cv2.VideoCapture(0) width = 270 height = 480 size = (width,height) result = cv2.VideoWriter('21_output.mpeg',cv2.VideoWriter_fourcc(*'MPJG'),20,size) # initialize the known distance from the came

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 →

Strange behavior for PowerShell Length after ForEach method

In official document it's mentioned that Length is one alias for Count, however I found one case that they behave differently. Besides, if I replace ForEach method with ForEach-Object, the Length will emit 3. Can anyone explain this? > (1..3).ForEach({$_}).Length 1 1 1 > (1..3).ForEach({$_}).Count 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 →
Older stories