What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-15 06:15:19
typescript convert an unknown to string
// To convert an unknown type into any other type we can use assertions let demo: unknown = 'Rice Krispies'; // The above line would throw an error as an unknown variable can // only take values of unknown and any type let demo: unknown = 'The EXTRA c... Add solution -
Other 2021-11-14 21:44:12
how to insert duplicate key in hashmap
Map<String, List<String>> map = new HashMap<>();map.computeIfAbsent("key1", k -> new ArrayList<>()).add("value1");map.computeIfAbsent("key1", k -> new ArrayList<>()).add("value2")... Add solution -
Other 2021-11-14 10:51:09
Give at least three examples that show different features of string slices. Describe the feature illustrated by each example. Invent your own examples. Do not copy them for the textbook or any other source.
print('Example 1: Substrings and every i-th character') string = 'Describe the feature illustrated by each example.' strA = string[0:9] strB = string[9::2] strC = string[10::2] listD = [x + y for x, y in zip(strB, strC)] string2 = strA + ''.join(lis... Add solution -
PHP 2021-11-14 10:17:23
array_merge(): Expected parameter 1 to be an array, null given at vendor/phpunit/phpunit/phpunit:61
// PHPUnit uses the constructor for initialization of the base TestCase. // You shouldn't use the constructor, because it's used by phpunit and any // change to the signature etc can break things. You can use the special // setUp and setUpBeforeClass meth... Add solution -
Java 2021-11-12 03:33:20
how to implement ddt in api
If you use JUnit-5 in your framework, it allows to use @ParameterizedTest annotation beside @Test annotation. There are three different way to achieve DDT with @ParameterizedTest annotation. 1. @ParameterizedTest @ValueSource(ints = {1,2,3,4}) ... Add solution -
Other 2021-11-11 05:14:15
is postman manual testing tool
You can do full automation of your api test directly within the postman. Create collection and folders to organize your requests. Add environment variables to run the collection against different env Add assertions in the test tab (lots of sinippets are a... Add solution -
Other 2021-11-11 02:45:12
what is soft assertion in selenium
soft assert: - Soft assert: won't stop the execution if assertion fails. - Soft assert methods are not static, so we must create the object of the class. - It displayS the recorded result at the end. I use soft assertion when functional... Add solution -
Python 2021-11-10 01:04:13
exception types python
AssertionError #Raised when assert statement fails. AttributeError #Raised when attribute assignment or reference fails. EOFError #Raised when the input() functions hits end-of-file condition. FloatingPointError #Raised when a floating point opera... Add solution