As per the documentation https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteer-vs-puppeteer-core, I am trying to use puppeteer-core library instead of puppeteer so that I can install headless-shell instead of default chromium lib that comes with puppeteer. I download the content-shell.zip for mac from this location https://chromium.cypress.io/mac/canary/89.0.4342.2 and used the below code, const browser = await puppeteer.launch({executablePath: 'content-shell' }); it fails with the below error, Error: Failed to launch the browser process! spawn content-shell ENOENT TROUBLESHOO
Current I have something like the following: Short text with badge: It's done simple with HStack atm: HStack { Text("Lorem ipsum dolor sit amet.") .font(.title2) Text("foo") .font(.system(size: 14, weight: .bold)) .foregroundColor(.white) .padding(.horizontal, 4) .padding(.vertical, 2) .background(Color.red) .cornerRadius(5) } My Problem is that the main text is multiline and if it wraps, it looks like this: Larger multiline text with badge: Goal But my goal is that the foo badge is always displayed after the last word of the main text, which should look like this: Goal: Solution like Text + T
I'm currently setting up a new server on which to run SSIS jobs in the future, the data source is an Oracle database. This is my set up: SQL Server 2019 Integration Services 2019 Oracle Client 12c 64bit Version For development I use Visual Studio 2019 and I develop and debug on the same machine where the jobs are to run. In the project settings in Visual Studio the usage of a 64bit environment is set to True. We have installed the Oracle client components in 64bit to use Oracle sources in a 64bit runtime environment. This works fine for an ODBC connection, but not at all for an OLE DB connecti
I am building up composite layups and assigning them to element sets. When I do so as soon as I try to submit the job, Abaqus always gives me the error "The following parts have some elements without any section assigned". There is not a single element without a material property, I do this by a script. As soon as I use a set which does not contain elements but a geometry Abaqus highlights the region green, but using geometry instead of element sets is not very suitable for me, because I am changing the properties of different elements. Also the region selection window opened by abaqus says "S
I am trying to compare two dataframes' columns and types to check for equality; the rows are expected to be different. I am using pandas version 1.1.2 pd.__version__ '1.1.2' if (df1.columns.difference(df2.columns).empty) and (df1.dtypes == df2.dtypes).all() But this line errors: (df1.dtypes == df2.dtypes).all() Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/vfrank/dev-working/venv/lib/python3.7/site-packages/pandas/core/ops/common.py", line 65, in new_method return method(self, other) File "/Users/vfrank/dev-working/venv/lib/python3.7/site-packages/pandas/
Confluence supports displaying PlantUML diagrams using for example PlantUML for Confluence macro. Basically, one copy-pastes a source code of the UML diagram and it's correctly rendered in a page. Macro usage and render: Question: My goal is to keep the diagrams up to date with the current version of code. Is there a way to import the source code of the diagram from a repository into Confluence and display the diagram (let's say from the master branch)? Since BitBucket and Confluence are products of Atlassian and probably work well together, I am looking for such integration. If there is a way
Here is a simplified version of my code: foo = 0 bar = 0 baz = 0 while True: answer = input('Type an input here: ') print('And do something with it here.') if answer == 'okay': foo += 1 else: bar += 1 baz += 1 print(foo, bar, baz) When I save this, VS Code is giving me a warning saying: Constant name "foo" doesn't conform to UPPER_CASE naming style Constant name "bar" doesn't conform to UPPER_CASE naming style Constant name "baz" doesn't conform to UPPER_CASE naming style My question is does the += 1 affect whether or not the variable should be a constant? I thought the += 1 would cause it to
Here is an extremely simplified version of my code below: foo = 0 bar = 0 baz = 0 while True: answer = input('Type an input here: ') print('And do something with it here.') if answer == 'okay': foo += 1 else: bar += 1 baz += 1 print(foo, bar, baz) When I save this, VSCode is giving me a warning saying: Constant name "foo" doesn't conform to UPPER_CASE naming style Constant name "bar" doesn't conform to UPPER_CASE naming style Constant name "baz" doesn't conform to UPPER_CASE naming style My question is does the "+= 1" affect whether or not the variable should be a constant? I thought the "+= 1
so i am using opencv for motion detection, when i use webcam for motion detection the program runs flawlessly but when i use some other video by giving path in Videocapture() function the output lags too much. I know that waitkey() is somewhat responsible for framerate but it doesn't seem to be the case this time .what should i do to solve this issue? this is my code: import cv2 import time import os import time video = cv2.VideoCapture("videofile.mp4") _,frame0 = video.read() frame0 = cv2.cvtColor(frame0,cv2.COLOR_BGR2GRAY) frame0 = cv2.GaussianBlur(frame0,(3,3),1) while video.isOpened(): che
I'm trying to set up iterm2 to use bash (as well as zsh). When I open iterm2 it defaults to zsh. I am happy with zsh but I would like to add a "bash" iterm2 profile to allow me to open a new tab in bash if so desired. Is this possible?
I'm making an API with Express.js and Sequelize for an appointment scheduling app. So far I have two models, User and Salon, with an N:M relationship. (So an user might manage many salons, for a franchise for example, or a salon may be managed by many employees) I have stumbled upon a problem in the PUT /salons route. My intention is that the user can fill out a form to input the details of the salon, and then the logged in user will be associated with this salon. The code for the route looks like this: router.put('/', checkLoggedIn, (req, res, next) => { const user = User.findOne({ where: { i
I installed OpenCV and I am not able to find the version of it. I can import cv and it's showing now errors. I am using an ubuntu os. import cv2 cv2.__version__ AttributeError: module 'cv2' has no attribute '__version__'.
I have an image for which I have the green border as the segmentation mask's outline. I'm looking to refine this outline based on contours found on the original image, to get a mask like the in 2nd image - where the edges of the hair are more refined. I've tried combinations of dilation & erosion of the segmentation mask, but it didn't feel like a generic solution - since it involves manually tuning the kernel size. Are there better approaches?
I run the following command in Package Manager in Visual Studio 2019 and a ASP.NET Core 5 project: Scaffold-DbContext "Server=(local);Database=MyDB;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Entities -Context ApplicationDbContext After a little time, this error appears: The specified deps.json [C:\WorkingFolder\Projects\MyProject\MyProject.deps.json] does not exist Notice that the deps.json file is being searched in project root, not under bin folder such as other posts I have found here, so by deleting bin and obj folder does not help. How to solve it?
I have an issue with OpenCV in windows 10. Whenever I try to import OpenCV I get following error. import cv2 ** On entry to DGEBAL parameter number 3 had an illegal value ** On entry to DGEHRD parameter number 2 had an illegal value ** On entry to DORGHR DORGQR parameter number 2 had an illegal value ** On entry to DHSEQR parameter number 4 had an illegal value Traceback (most recent call last): File "C:\Users\Krishhnandu\AppData\Roaming\Python\Python39\site-packages\numpy\__init__.py", line 305, in <module> _win_os_check() File "C:\Users\Krishhnandu\AppData\Roaming\Python\Python39\site-packag
My Docker container will not start. The error message in the log is: {"message":"OCI runtime create failed: container_linux.go:349: starting container process caused \ "process_linux.go:319: getting the final child's pid from pipe caused \\\"EOF\\\"\": unknown"} What is next step?
After a user successfully logins in and saving the state, I want to hide the login screen and just load the home screen, but I end up with the error The following assertion was thrown building Navigator-[GlobalObjectKey _WidgetsAppState#6686e](dirty, dependencies: [UnmanagedRestorationScope, HeroControllerScope], state: NavigatorState#c7e9f(tickers: tracking 1 ticker)): 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 5070 pos 12: '': is not true. What is the right way of hiding the login screen when the token is still valid, and just load the home screen? my code Main.dart
I am new to Angular and Node. I am trying to execute an project created using Angular, Neo4j. At first, I tried to run it as it is. However, i am givem the following error after opening the browser: NullInjectorError: StaticInjectorError(AppModule)[RouterScroller -> >ViewportScroller]: StaticInjectorError(Platform: core)[RouterScroller -> ViewportScroller]: NullInjectorError: No provider for ViewportScroller! ERROR Error: Uncaught (in promise): Neo4jError: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Dr
Question. Where are the files from the Samples tab in the LINQPad Tutorial & Reference folder (see the picture)? Description. I need files from the LINQPad Tutorial & Reference folder. I searched in the folder C:\Users\admin\AppData\Roaming\LINQPad\Samples. I can't find the folder - LINQPad Tutorial & Reference. I only see the C# 8.0 in a Nutshell - All Chapters folder. I imported this folder later.
I am trying to install pyside with Python 3.8. It is stating that I need Python [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]. Is there a way I can force install and override this requirement?
I have problem part code. I am developing an extension. I am trying to open link using my app. var tab; const context = chrome || browser; if (tab.url.includes("youtube.com/watch?")) { context.tabs.update(tab.id, { url: "nameOfMyProgram:" + tab.url }); // Not allowed to launch //'<URL>' because a user gesture is required. } The problem occurs in the opera browser The first time it hits the web page, it works correctly. On subsequent clicks, an error "Not allowed to launch '' because a user gesture is required." This works correctly in the chrome browser. How can I solve this problem? I have pe
Unsure if this is in the right section of Stack Exchange but, I have a family member coming to the UK (from outside of the EU) in the near immediate future. They will be bringing a painting with them that contains at least 100g of Amber, if not more. It's a gift. Will they have to declare this upon arrival? And will they have to pay tax on this? I am not sure how much the painting costs exactly, but it's less than £100 for sure. It's coming from Ukraine. Are there any official bodies I can contact in the UK to find out for sure? Again, apologies if this is in the incorrect section.
I am working on an Appium project to automate an app using Python in both iOS and Android. I usually stick with using XPath to search for elements but in iOS, there is a wonderful searching mechanism called Class Chain, which allows you to search by element's class, such as XCUIElementTypeStaticText for XCUITest. So I was comparing the performance of searching by XPath and Class Chain, to which I found out that Class Chain performance is much faster than XPath, up to 7 times faster. A search that takes XPath 7 seconds can be done in just 1 second using Class Chain. Example: A simple search for
I have the function: natListLast : List ℕ → ℕ natListLast [] = 0 natListLast nats@(x ∷ xs) = v.last (v.fromList nats) When I do _ : natListLast (2 l.∷ l.[] l.++ 1 l.∷ l.[]) ≡ 1 _ = refl I don't get any error. But when I try to generalize this to an arbitrary List nat like so: natListConcatLast : (nats : List ℕ) → natListLast (nats l.++ 1 l.∷ l.[]) ≡ 1 natListConcatLast [] = refl natListConcatLast nats@(x ∷ xs) = ? I'm not sure what to replace ? with. I tried starting with begin: natListConcatLast : (nats : List ℕ) → natListLast (nats l.++ 1 l.∷ l.[]) ≡ 1 natListConcatLast [] = refl natListConc
I am trying to get the (10-K) filing of Amazon in the year of 2013. My Python program for this is not working, perhaps due to the Python version difference between Python 2's urllib2 and Python 3's urllib, I suppose. My problem is that I encountered the initial error: TypeError: a bytes-like object is required, not 'str' Please help me to get the result of "element4" other than "None" for the code and error below; import time import csv import sys CIK = '1018724' Year= '2013' FILE= '10-K' # Get the Master Index File for the given Year url='https://www.sec.gov/Archives/edgar/full-index/%s/QTR1/
I would like to know whether it is safe or not to use @SuppressLint("RestrictedApi") annotation. I am pretty sure that the answer is NO, so I want to ask why as well. I guess that the development team wanted to hide such "restricted code" from the API users. Probably due to changes in the future or because the code is intended to work as internal functionality Example code with androidx.preference:preference:1.1.1: public abstract class CustomAdapterPreferenceFragment extends PreferenceFragmentCompat { @Override protected PreferenceGroupAdapter onCreateAdapter(PreferenceScreen preferenceScreen
We are in process of migrating our projects from Java 8 to Java 11. One of the APIs is dependent on a library that utilizes JAXB. As we know JAXB was removed from JAVA 11 we started to include the JAXB dependencies in the POM of the library. <!-- https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api --> <!-- API --> <dependency> <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> <version>2.3.3</version> </dependency> <!-- Runtime --> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <version>2.3.2</version
In python when you run a solver, it displays some details along with the solutions. For example, I used a solver called IPOPT using following code solver = SolverFactory('ipopt') solver.solve(model, tee=True) and, I got the following output from a solver: This is Ipopt version 3.11.1, running with linear solver mumps. Number of nonzeros in equality constraint Jacobian...: 6 Number of nonzeros in inequality constraint Jacobian.: 0 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 4 variables with only lower bounds: 2 variables with l
I am trying to read a JPG image and want to save it in binary raw image file. Output should be in planar form, like first Red channel and so on. This code I have made till now, but it is not working. Can you suggest me what should I do? import cv2 H = 512; W = 512; size = H*W; img = cv2.imread('f.jpg') img = cv2.resize(img, (H, W)) name = 'f'+str(H)+'x'+str(W)+'.bin' f = open(name, 'w+b') binary_format = bytearray(img) f.write(binary_format) f.close()