on-internet

How to avoid extent report to not to overwrite the html file name

I am using extent reports in appium with testng and its working fine for me.whenver my tests run is completed then extent report generates html file in my project folder and that is what expected. Issue is that when I again run my tests then extent report generate new html report file by overwrting the name of previously created html file. I want extent report to generate html file with unique names or name with date in in, each time when I run my tests

Join the discussion →

Webpack dev server cache clearing

I can't get webpack dev server to work properly. I think the issue is the compiled code it makes in memory is not clearing. I can't work out where I'm going wrong. My config file is: var path = require('path'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: ['babel-polyfill', './src/js/index.js'], output: { path: path.join(__dirname, 'dist'), publicPath: "/", filename: 'js/index.js' }, devServer: { contentBase: '/dist' }, module: { rules: [ { test: /\.js$/, use: ['babel-loader'] }, { test: /\.

Join the discussion →

How to filter not equal to data based on list in cells Excel VBA

I'm trying to filter my data based on a list of criteria. The list of criteria will be maintained on the actual spreadsheet since it needs to be updated by other users in column Z. I tried using an advanced filter, and eventually I was going to implement it in VBA but it didn't return any values. The size and length columns are intentionally left blank. I want it to return all the data in the table on the left so that none of the words in the table on the right show up.

Join the discussion →

How to remove pointer-events from all children of the element with a dragover event?

I created a global dragover event listener so that when something it dragged over the page it would show a dragover area on the page and hide it when you move the cursor off the page: document.addEventListener('dragover', event => { event.preventDefault() this.dragOverArea = true // ... }) document.addEventListener('dragleave', event => { event.preventDefault() this.dragOverArea = false // ... }) Problem JSfiddle: http://jsfiddle.net/ct3haqf0 Try dragging any file over the elements on the page (from the top left) you will see the dragover event switching to dragleave rapidly back and forth whi

Join the discussion →

Cannot open anaconda suddenly

Today I found I cannot open anaconda navigator, which operated just fine before. At the same time, spyder could not be open either, but jupyter notebook and anaconda prompt are available. I tried different methods following instructions online. 1) conda update anaconda-navigator and reboot the system 2) anaconda-navigator --reset , but it shows the error as follows: Traceback (most recent call last): File "C:\Users\User\Anaconda3\lib\site-packages\qtpy\__init__.py", line 169, in <module> from PySide import __version__ as PYSIDE_VERSION # analysis:ignore ImportError: No module named 'PySide' Du

Join the discussion →

Downloading a file in Microsoft Edge through Selenium

I have to automate a case in which I have to download a file using Selenium WebDriver and cross-browsers. I already did that for Chrome (through ChromeOptions), FF (through FirefoxProfile) and IE11. For example, with Firefox, I use Firefox Profile to suppress the Download Prompt, like this: profile.setPreference("browser.download.dir", "C:\\DownloadCleanup"); profile.setPreference("browser.download.folderList", 2); profile.setPreference("browser.download.manager.showWhenStarting", false); profile.setPreference("browser.helperApps.alwaysAsk.force", false); profile.setPreference("browser.helperA

Join the discussion →

Could not locate PropertySource because of java.net.ConnectException: Connection refused

I created a docker image and pushed it to docker hub. Now, I am trying to run it on a remote machine by using docker-compose and I get the following error. java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing my-test_1 | at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:132) my-test_1 | at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) my-test_1 | at org.springframework.boot.Sp

Join the discussion →

Remote Location Access App

So last week my phone got stolen and the wifi and mobile data were turned off so I had no access to it. GPS was turned off as well but that's of no use if the phone doesn't have an internet connection. Even though the phone was protected by a fingerprint and my data would be safe, I still would've loved that phone back. Thinking about this I came up with an idea. What if I create an Android app that would run silently in the background on my (new)phone and would do absolutely nothing. All it would do is listen for a certain string of characters in all the SMS the phone receives. Now say my new

Join the discussion →

Magento 2 custom address attribute not loading in address book in checkout page

I created a Magento Module to 2.2.4 and 2.2.3 version that add a custom attribute in Shipping Address and Customer Address. The attribute works fine when new address is created in checkout page show my custom attribute and save in order address and quote address. The problem is when load the address from the address book so my custom attribute not loading and it is required in shipping address and I can´t go to payments When edit the custom attribute in Customers > Address from Magento Admin is not saved. I set values into database manually to my custom attribute in customer address but not is

Join the discussion →

ContentCatcher: Failed to notify a WebView

I am trying to open a webview inside my fragment. But I am getting the error ContentCatcher: Failed to notify a WebView. Below is the code for my onCreateView of my fragment @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_payment_gateway, container, false); webView=(WebView)rootView.findViewById(R.id.paymentwebview); WebSettings webSettings= webView.getSettings(); webSettings.setJavaScriptEnabled(true); webView.setWebViewClient(new WebViewClient() { @Override public

Join the discussion →

Docker: Insert certificate into keystore

I'm trying to add a certificate into $JAVA_HOME/jre/lib/security/cacerts truststore on my Dockerfile: FROM frolvlad/alpine-oraclejdk8:slim VOLUME /tmp RUN keytool -import -alias vault -storepass changeit -keystore $JAVA_HOME/jre/lib/security/cacerts -noprompt -trustcacerts -file /var/run/secrets/kubernetes.io/certs/tls.crt ADD wseccloudconfig-0.0.1-SNAPSHOT.jar app.jar RUN sh -c 'touch /app.jar' ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ] As you can see I'm performing a command keytool... in order to insert the certificate to cacerts. I'm

Join the discussion →

MySQL 8.0.11 is throwing CLIENT_PLUGIN_AUTH is required

I am new to Java. I created Java Maven project and am getting the below error while connecting to MySQL. I am posting my code below. In pom.xml, <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> In class, private void connection() { try { Class.forName("com.mysql.cj.jdbc.Driver").newInstance(); connect = DriverManager.getConnection("jdbc:mysql://10.100.00.00:3305/dbname" , "username","password"); } catch(SQLException ex) { System.out.println(ex.getMessage()); } catch(Exception ex) { System.out.println(ex.getMessage()); }

Join the discussion →

Computing 8 horizontal sums of eight AVX single-precision floating-point vectors

I have 8 AVX vectors containing 8 floats each (64 floats in total) and I want to sum elements in each vector together (basically perform eight horizontal sums). For now, I'm using the following code: __m256 HorizontalSums(__m256 v0, __m256 v1, __m256 v2, __m256 v3, __m256 v4, __m256 v5, __m256 v6, __m256 v7) { // transpose const __m256 t0 = _mm256_unpacklo_ps(v0, v1); const __m256 t1 = _mm256_unpackhi_ps(v0, v1); const __m256 t2 = _mm256_unpacklo_ps(v2, v3); const __m256 t3 = _mm256_unpackhi_ps(v2, v3); const __m256 t4 = _mm256_unpacklo_ps(v4, v5); const __m256 t5 = _mm256_unpackhi_ps(v4, v5);

Join the discussion →

Dismiss mat-sidenav on click outside

I'm trying to close my sidebar whenever user clicks somewhere not in it. I've tried two-way data-binding and now I'm trying with rxjs' Subject AppTemplate <app-sidenav [openedSubject]="openedSubject"></app-sidenav> AppComponent openedSubject = new Subject<boolean>(); @HostListener('click', ['$event']) clickedInside($event) { this.openedSubject.next(false); } SidenavComponent @Input() openedSubject: Subject<boolean>; @ViewChild('sidenav') sidenav: MatSidenav; ngAfterContentInit() { this.openedSubject.subscribe(opened => { if(this.sidenav.opened) opened || this.sidenav.toggle(); }); } toggle() {

Join the discussion →

miss asm/types.h in linux compile

lenge@lenge-pc:/lenge/linux/kernel_online$ git branch master * tag_v4.15 CONFIG is defconfig. when I compile kernel(v4.15), error occurred, as follows: In file included from /lenge/linux/kernel_online/include/linux/types.h:6, from /lenge/linux/kernel_online/include/linux/page-flags.h:9, from /lenge/linux/kernel_online/kernel/bounds.c:10: /lenge/linux/kernel_online/include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory #include <asm/types.h> ^~~~~~~~~~~~~ compilation terminated. That is my compile method: make ARCH=arm64 -C /lenge/linux/kernel_online O=/lenge/linux

Join the discussion →

Executing Windows PowerShell commands in a Jupyter Notebook

Would someone please suggest a way to execute Windows PowerShell commands (i.e., commands more similar to Unix commands than Command-Prompt commands) in a Jupyter notebook? Please note that I am a layperson. So far, I have added "C:\ProgramData\Anaconda3\Scripts" to my path system variable, which allows me to run "jupyter-notebook" from either Command Prompt or Windows PowerShell. I guess a shell looks in all folders in my path system variable for an application to run named "juypter-notebook". I guessed that running Jupyter Notebook from Windows PowerShell would allow my Jupyter-Notebook Chro

Join the discussion →

Unable to create a tensor using torch.Tensor

i was trying to create a tensor as below. import torch t = torch.tensor(2,3) i got the following error. TypeError Traceback (most recent call last) in () ----> 1 a=torch.tensor(2,3) TypeError: tensor() takes 1 positional argument but 2 were given so, i tried the following import torch t = torch.Tensor(2,3) # No error while creating the tensor # When i print i get an error print(t) i get the following error RuntimeError Traceback (most recent call last) in () ----> 1 print(a) D:\softwares\anaconda\lib\site-packages\torch\tensor.py in repr(self) 55 # characters to replace unicode characters with

Join the discussion →

Enable TLS 1.2 for specific Ciphers

We have a .NET application which calls an API that allows only TLS version 1.2. Server 2008 SP2. We ran following script on our server: # Copyright 2016, Alexander Hass # http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12 # # Version 1.7 # - Windows Version compare failed. Get-CimInstance requires Windows 2012 or later. # Version 1.6 # - OS version detection for cipher suites order. # Version 1.5 # - Enabled ECDH and more secure hash functions and reorderd cipher list. # - Added Client setting for all ciphers. # Version 1.4 # - RC4 has been disabled. # Version 1.3

Join the discussion →

Manifest merger failed with multiple errors, see logs (unity3d, Android Studio 3.2)

I am trying to add unity3d module as an on demand dynamic delivery module in a native android app. I am getting 'Manifest merger failed with multiple errors' problem while I am trying to build the project.Below I have given code for two manifest files one is for the app module that is module with native android code that I am writing and the other manifest is the manifest generated by unity3d after exporting it as an android studio project. I have added the unity3d android studio project as module in my current project. The objective is to make the unity3d project as an on demand dynamic deliv

Join the discussion →

wp multisite: add new super admin

How to create new super admin with wp multisite? I have phpmyadmin access, admin wp-admin access, ftp access. I'm unable to find wp_users info from the database nor I'm not able to find user id from wp-admin to grant_super_admin(x); with functions.php Any idea how to crack this?

Join the discussion →

Getting error "Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8" while publishing code metrics on SonarQube from VSTS Build machine

Getting error "Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8" while publishing code metrics on SonarQube from VSTS Build machine through build definition. find below sonar-project.properties file, sonar.projectBaseDir=$(Build.SourcesDirectory)/app sonar.verbose=true sonar.analysis.mode=publish sonar.sourceEncoding=UTF-8 sonar.sources=$(Build.SourcesDirectory)/app sonar.language=ts sonar.ts.tslint.projectPath=tsconfig.json sonar.ts.tslint.path=node_modules/tslint/bin/tslint sonar.ts.tslint.typeCheck=true sonar.exclusions=node_modules/** sonar.ts.coverage.lcovReportPath=$(Build.SourcesDirect

Join the discussion →

How does this work? "YNEOS"[(w%2)|(w<=2)::2]

I was just trying to solve this problem on Codeforces: Check whether it's possible to split a number w (1 ≤ w ≤ 100) into a sum of 2 even numbers. I solved the problem like this: w = int(input()) if (w-2)%2 == 0 and w > 2: print("YES") else: print("NO") Next, I looked at other solutions for the problem. Then I found this solution: w = int(input()) print("YNEOS"[(w%2)|(w<=2)::2]) It took half of the time than mine. Unfortunately I am not understanding: how it is working, and why it is faster than mine. I am a beginner in Python. So it would help me to get a proper explanation.

Join the discussion →

What does print("YNEOS"[(w%2)|(w<=2)::2])?

I was just trying to solve this problem on Codeforces: Check whether it's possible to split a number w (1 ≤ w ≤ 100) into a sum of 2 even numbers. I solved the problem like this: n = int(input()) if (n-2)%2 == 0 and n > 2: print("YES") else: print("NO") Next, I looked at other solutions for the problem. Then I found this solution: w = int(input()) print("YNEOS"[(w%2)|(w<=2)::2]) It took half of the time than mine. Unfortunately I am not understanding: how it is working, and why it is faster than mine. I am a beginner in Python. So it would help me to get a proper explanation.

Join the discussion →

Gutenberg - Multiple InnerBlocks in one block-type

I am trying to make custom columns block since the wordpress default used by gutenberg is not what I need. So i have looked up how it works, its uses InnerBlocks block with a layout definition, but there is no way to specify the html tag and the class for the columns so it's useless for me. Then I have decided to loop out columns using map, which works fine, then i added inside each column the InnerBlocks component to allow inserting other blocks to the column, but the problem is that in each column the content of InnerBlocks is shared, so I have tried to set key property for each InnerBlock a

Join the discussion →

Is there any possible using tag inside tag

have tried to add two texts in an option tag where the two text should be in different color. However, the below code is not working fine.. Kindly assist me what should I added in this css or js.. Also suggest me if there is any plugin to use. <select name="dropdown" title="Corporate Select" class="custom-select" id="target" aria-label="Corporate Select"> <option selected>Select</option> <option value="">Offers<span class="calc">New </span></option> <option value="">Discounts<span class="calc">New </span></option> </select> <style> option span.calc { color: red; } </style>

Join the discussion →

NodeJS, getting username of logged in user within route

I am getting in to NodeJS and have followed some video tutorials for making stuff, to understand NodeJS and Express. It turned more in to copying as little were explained, so tried to make my own thing using what I learned and so on. Making a simple login function with PassportJS, ExpressJs and Mongoose. The login and stuff works, and I can get the username of the currently logged in user and display it if I define it within the main app.js using this: app.get("/stuff", (req,res) => { res.render("stuff.html", {username:req.user.username}); }); Now if I want to make nice and structured by using

Join the discussion →

stream.ReadTimeout' threw an exception of type 'System.InvalidOperationException'

I am trying to download a zip file from SFTP and unzip in the memory to process the file I am using SSH.Net to download the file. private static void processfilesfromftp(List<TSOracleMicrosDownLoadSetUp> list) { SftpClient sftp = HelperFunctions.GetClientConnection(); if(sftp.IsConnected) { var files = sftp.ListDirectory("/"); ZipFile zips = new ZipFile(); string path = string.Empty; foreach(var file in files) { Stream unzippedEntryStream = new MemoryStream(); path = string.Format("/{0}", file.Name); //byte[] arr = sftp.ReadAllBytes(file.FullName); var stream = new BufferedStream(sftp.OpenRead

Join the discussion →

No qualifying bean of type [org.springframework.test.web.servlet.MockMvc] found for dependency:

I am trying to run test cases on my spring controllers. I get the following error. No qualifying bean of type [org.springframework.test.web.servlet.MockMvc] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations After reading several QA's on SO, I got my build.gradle right. But now Im stuck at this point. The other questions on SO related to this did not help identify an issue with the code below. package test.controllers; import static org.hamcrest.Matchers.equalTo; import static org.springframework.test.web.servlet.res

Join the discussion →
Older stories