Random data in Unit Tests?

I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values,...

Java: Invalid keystore format, when generated through code

This has been asked a couple of times, but none provide coded test cases. Here I give an example of the problem: programmatic generation of a Keystore (works) creation of certificate within that...

Incorrect hotspot for I-Beam cursor in Windows 7?

The Problem On windows, the coordinates returned for a "mouse button down" event seem to be slightly wrong for an I-Beam cursor. Basically, the x-coordinate is always two pixels left of where it...

JMeter latency vs load time(sample time)

I was running a test on my HTTP server and the transfer speed went really slow when I switched the server from localhost(used a laptop) to a AWS EC2 t.micro server. I want to know the difference...

Link on a webpage to open instagram app

Is there a way to setup a link on a webpage, so that it tries to open the instagram app. (if it's installed)? I'm trying to do this for a responsive website so I'm not in another "app". This does...

Foolproof way to detect if this page is INSIDE a cross-domain iframe

An answer to "Foolproof way to detect if iframe is cross domain" describes a method to test if an iframe on a page points to a same-domain or cross-domain page, working around different browsers'...

How to run JSR223 PreProcessor only once

I have a test plan in jMeter that requires some parameters that needs to be calculated before running the test. In order to calculate these parameters, I created a JSR223 PreProcessor directly...

Loading dll using Assembly.Load(byte[], byte[]) different behaviour between Visual Studio 2013 and 2015

I though I left VS2013 behind when I started using VS2015 RTM. However I noticed a very odd thing that could be a setting problem or a just a bug. I have implemented my own NUnit testrunner to be...

How to add a namespace to an msxml DOMDocument?

How do i add a schema to an IXMLDOMDocument? For example, i want to generate the XML: <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <Relationship...

Jstree: Cannot read property children of undefined. Timing issue?

I have an array of objects where each of them look like this structure: var data = [{ "code" : "i1", "name" : "Industry 1", "parentCode" : "i0" }, { //and more items just like that one }]; so I...

Gradle stack trace on terminal

I'm required to use Gradle for my Java project. I'm running some unit tests with ./gradlew test, but the exception stack trace is witten on a web page which I need to load in a browser. Why such...

Configure ngrok's CORS headers

I am running a local webserver, which runs an XHR request to an ngrok server, also run from my PC. I'm getting XMLHttpRequest cannot load http://foo.ngrok.io/. No 'Access-Control-Allow-Origin'...

Most efficient way to get genre of song android

I am trying to grab the genre of each song while I'm loading the songs. Currently I am using this solution: MediaMetadataRetriever mr = new MediaMetadataRetriever(); Uri trackUri =...

Custom sign-in page for Azure AD B2C doesn't load on Chrome & Firefox

We customised our Azure AD B2C tenant's Combined Sign-Up/Sign-In Policy to serve up our own login page. This worked across all the major browsers when we tested last week, but it stopped working...

Package develop mode avoid jupyter kernel restart

I am working on a python package as a developper. The package is stored in a git repo and I use a local branch to debug/fix functionnalities of this package. To test the corrections I make to the...

Every test in project says "Excluded from Live Unit Testing"?

I have the test adapter & framework packages added per the docs https://docs.microsoft.com/en-us/visualstudio/test/live-unit-testing-faq?view=vs-2017. I see the "beaker" symbol\icon beside each...

Flutter - auto size alertDialog to fit list content

I need to load list cities dynamically from rest webservice and let user choice one city from alert dialog. My code: createDialog() { fetchCities().then((response) { showDialog( ...

How to ensure that page has finished loading on a React site

Is there a way to make sure that a web page, coded in React, has finished loading? The usual javascript tricks, don't seem to work for React, meaning that you cannot use safely...

AWS-Batch vs EC2 vs AWS Workspaces for running batch scripts to load data to Redshift

I have multiple CSV files containing data for different tables, with different file sizes varying from 1 MB to 1.5 GB. I want to process the data (replace/remove values of columns) row by row and...

Kivy's 3D rendering (monkey rotation) apk crashes on start

Versions: Python: python3 OS: Android Kivy: v1.11.1 Kivy installation method: buildozer I took Kivy's example 3D Rendering (rotation monkey head) app, on Linux(Ubuntu) and Windows 7 application...

Testing useSubscription apollo hooks with react

Testing the useSubscription hook I'm finding a bit difficult, since the method is omitted/not documented on the Apollo docs (at time of writing). Presumably, it should be mocked using the...

lateinit property mock object has not been initialized

I'm trying to initialize (by mocking) two objects with the annotation @MockBean It seems only to work if i call the method mock(className), but since i want to use the mocked class on multiple...

Can't create new columns, constraints, indexes using DBeaver 7 in MySQL 8

I'm attempting to create new tables and add new columns to an existing MySQL 8 database. I'd like to use DBeaver GUI for this task. Creating the new connection with the MySQL 8+ driver, I'm able...

How to efficiently run multiple Pytorch Processes / Models at once ? Traceback: The paging file is too small for this operation to complete

Background I have a very small network which I want to test with different random seeds. The network barely uses 1% of my GPUs compute power so i could in theory run 50 processes at once to try...

pod install failed on macOS Big sur

I am pretty new to macOS and recently shift to macOS from windows, I started to working on react-native app and when I try react-native run-ios it gives me below error error Could not find...

If I Trace a PyTorch Network on Cuda, can I use it on CPU?

I traced my Neural Network using torch.jit.trace on a CUDA-compatible GPU server. When I reloaded that Trace on the same server, I could reload it and use it fine. Now, when I downloaded it onto...

Lumen 8 not using .env.testing

I'm using Lumen 8. and I want to use the configuration inside .env.testing but it always read the configuration inside .env *tests/TestCase.php* <?php use Dotenv\Dotenv; abstract class TestCase...

Using cypress, measure page load time

Im using cypress to test a website, I need a way to measure the amount of time that it takes to load or execute certain cypress commands. For example: //var startTime =...

Issue with cocoapods and Xcode 13 whe publishing an App

I've got a project made by modules and each module is a cocoapods library that loads each section of the App. This application was made 1 and a half years ago and it has been maintained and it's...

What problems cause Visual Studio to say "Source information is missing from the debug information for this module"?

I'm working on a compiler for the CLR, and I mostly have it working. I'm trying to generate debug information, and I can get it to create an embedded PDB in the generated assembly where all the...