Reset mock verification in Moq?

Setup as so: public interface IFoo { void Fizz(); } [Test] public void A() { var foo = new Mock<IFoo>(MockBehavior.Loose); foo.Object.Fizz(); foo.Verify(x => x.Fizz()); //...

WSDL/SOAP Test With soapui

I have tested my web services (wsdl/soap) with soapui. and i have the errors : http/log : error 400 BAD REQUEST. What can be the error please with my wsdl ? error/log : un Jun 05 14:10:37 CEST...

SerialPort UnauthorizedAccessException

Occasionally some of my integration tests are failing with the above message. I'm using the code below to ready the port. for(int i = 0; i < 5; i++) { try ...

Publishing my web application can take long time to accomplish because of the .suo file

I have a web application project that I publish via Visual Studio 2010 to my server. My problem is that it can take very long time before it can actually publish it. Maybe 10 minutes! It doesnt...

How do I enable geolocation support in chromedriver?

I need to test a JS geolocation functionality with Selenium and I am using chromedriver to run the test on the latest Chrome. The problem is now that Chrome prompts me to enable Geolocation during...

Minimal C/C++ program that segfaults?

I'm trying to set up the way my server handles core dumps. In order to test it, I'd need a program that always segfaults. Is there a simple example program that always segfaults?

calculating the point of intersection of two lines

I have dynamically generated lines that animate and I want to detect when a lines hits another. I'm trying to implement some basic linear algebra to obtain the equation of the lines and then...

ESC POS print PNG image

I am very new to ESC POS programming on Objective C. I have tested the printer with normal ESC pos line command and it works perfectly. But I was unable to understand the raster mode command. (GS...

ExecuteScalar call throwing exception "Object reference not set to an instance of an object"

When debugging the the following method in a unit test I get the following error Object reference not set to an instance of an object when hitting the following line result =...

How to keep a folder up-to-date with a git repo?

This is for a shell script that will periodically check github for the latest code, and download, compile, and run it if there is any difference between what I already have locally and what was...

How do I access a boolean from another class in the constructor of an object?

So I have a main class, and in this class I have a boolean called test. I want to be able to flip it either on or off after a certain amount of time, so I have a class called BooleanFlipCounter....

mvn dependency:tree fails on trivial project

I've got a pretty complex project (about 100 modules) on which I'd like to run mvn dependency:tree. It fails, complaining about dependencies it cannot resolve. The project otherwise compiles fine....

Android google maps not working when it builds into an apk file

I am currently developing an android application with google maps as a fragment when i test it and run it on the android studio using an actual device connected via usb on my laptop the google...

Webdriver.io - how to use beforeEach hooks in the config

I am building an app using the MEAN stack and Webdriver for testing. At the moment I am cleaning the database between tests by using Mocha's beforeEach and afterEach hooks, e.g.: describe('Links',...

How to calculate sum of prime numbers from list of integers in Python?

I am struck and need help with this.. I want to find the sum of prime numbers from a given list of integers. Here are a few test cases for the...

Change local time zone in Chrome

This should be easy but for the life of me I can't work it out. I want to try testing some javascript timezone stuff and I need to put my browser into a different timezone, I'm in the UK so it's...

AndroidTV Missing DPad functionality

My app is fully usable and navigatable on AndroidTV using the DPad. Well, it certainly is on MY AndroidTV, as well as AVD. However, Google keeps on rejecting my appeal to have it marked as...

How to Test CORS header

Our application supports CORS configurations headers. I have configured testApp separately on two different hosts. Both the setups work independent of each other. Application on host1 is...

testing Spring Retry throws an error: wanted * times, but was 1 time

I use spring retry and want to unit test it. but could not get unit test working. See My code & test below. When I run the test, it says expected 3 times but was 1 time. I must miss something....

How do I setup routing for react in GAE? Directly routing to react-router-dom routes via URL fails in GAE on basic create-react-app?

ANSWER for now This was tough for me to get exactly right. Very little in the way of guidance via Google. I hope this helps others. As Dan Cornilescu pointed out, the handlers accept the first...

Cypress, Vue, and the ability to do a file upload

So I'm trying to do a file upload test with Cypress within a Vue application. For some reason the FE developer used label/input instead of a button component. So the HTML code ends up looking...

make sliverAppBar hide title in expended mode

I'm testing code with SliverAppBar and make this widget , but there is an issue I want hide top bar that has "2 icons and title "categories Page " when SliverAppbar is expended but when I...

Multiple Random regressor model in python

Build multiple Random forest regressor on X_train set and Y_train labels with max_depth parameter value changing from 3 to 5 and also setting n_estimators to one of 50, 100, 200 values. Evaluate...

face-api.js Use face expression model on hidden video feed

Just found out about the awesome face-api.js repo, and I'm having a great time using the face expressions API. Maybe because I was smiling too much (for the testing). Anyway, In my app, I want to...

Wordpress site speed issue

I have a WordPress website using Elementor. Hosting it using Managed WordPress by GoDaddy. I need to improve the site speed but facing a few issues: Elementor plugin makes the site slow. But...

ModuleNotFoundError: No module named 'grass' | GRASS GIS | PYTHON3 | CENTOS 7

I want to run grass78 on an amazon-linux machine, with centOS, no GUI. By great difficulty, I was able to install GRASS78 (the latest stable release from https://grass.osgeo.org/download/). When I...

expo app how to make android:usesCleartextTraffic to false

We are using expo app, managed workflow with expo sdk 39 We need android:usesCleartextTraffic=false for security testing, As per research expo sdk 39 has api level 29. In android document it says...

Compute R^2 Score for Lasso Regression Against Specific Model in scikit-learn

I have regularized Lasso models based on PolynomialRegression features of four degrees (1, 3, 7, 11) on pre-trained data in sci-kit learn. I generated predictions for 100 evenly spaced points on...

WebdriverIO throw error after NPM version update

I just update all the package and NPM versions in a webdriverIO project but now its not working throwing following error ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't...

Efficient type punning without undefined behavior

Say I'm working on a library called libModern. This library uses a legacy C library, called libLegacy, as an implementation strategy. libLegacy's interface looks like this: typedef uint32_t...