Tutorial by Examples: ti

Once your test application is ready you can connect it with code for which you want to write unit tests. Either you have you code in PCL, or in UWP app project (I assume that you applied MVVM pattern) just add reference to it in Test Application project: Now you have access to all your code from...
Once you have everything prepared to write your Unit Tests it is worth to mention about mocking. There is new framework called "SimpleStubs" which enables you to create mocks based on the interfaces. Simple case from GitHub documentation: //Sample interface: public interface IPhoneBook ...
An artifact built by Maven can be declared as a Maven plugin by specifying the packaging as maven-plugin in the pom.xml. <packaging>maven-plugin</packaging> You need to declare a dependency on the plugin API and annotations. <dependency> <groupId>org.apache.maven&lt...
Goals are implemented by creating a MOJO. This is a class file annotated with annotations from maven-plugin-annotations. @Mojo(name = "hello") public final class HelloWorldMojo extends AbstractMojo { public void execute() throws MojoExecutionException, MojoFailureException { ...
Plugins can be configured by annotating fields with @Parameter. The MOJO is then injected with the configuration. @Mojo(name = "greet") public final class GreetMojo extends AbstractMojo { @Parameter(required = true) public String name; public void execute() throws Mojo...
The plugin can, among others, access information about the current Maven project being built. @Mojo(name = "project") public final class ProjectNameMojo extends AbstractMojo { @Parameter(defaultValue = "${project}", readonly = true, required = true) private MavenPro...
Within the CodeIgniter, there are two main directories to worry about: system and application. The system folder contains the core guts of CodeIgniter. The application folder will contain all of the code specific to your application, including models, controllers, views and other relevant libraries...
Function Do-Something { Param ( [Parameter(Mandatory=$true)] [String]$SomeThingToDo, [Parameter(ParameterSetName="Silently", mandatory=$false)] [Switch]$Silently, [Parameter(ParameterSetName="Loudly", mandatory=$false)] ...
import matplotlib.pyplot as plt import numpy as np # generate 101 x and y values between -10 and 10 x = np.linspace(-10, 10, 101) y = np.linspace(-10, 10, 101) # make X and Y matrices representing x and y values of 2d plane X, Y = np.meshgrid(x, y) # compute z value of a point as a fun...
import matplotlib.pyplot as plt import numpy as np # generate 101 x and y values between -10 and 10 x = np.linspace(-10, 10, 101) y = np.linspace(-10, 10, 101) # make X and Y matrices representing x and y values of 2d plane X, Y = np.meshgrid(x, y) # compute z value of a point as a fun...
Here are the steps to generate test skeleton for existing code: Open Eclipse, and choose the project you want to create test cases for In the Package Explorer, select the java class you want to generate the Junit test for Go to File -> New -> Junit Test Cases Change the Source folder to ...
The Iris flower data set is a widely used data set for demonstration purposes. We will load it, inspect it and slightly modify it for later use. import java.io.File; import java.net.URL; import weka.core.Instances; import weka.core.converters.ArffSaver; import weka.core.converters.CSVLoader; i...
ZeroR is a simple classifier. It doesn't operate per instance instead it operates on general distribution of the classes. It selects the class with the largest a priori probability. It is not a good classifier in the sense that it doesn't use any information in the candidate, but it is often used as...
In order to build a good classifier we will often need to get an idea of how the data is structered in feature space. Weka offers a visualisation module that can help. Some dimensions already seperate the classes quite well. Petal-width orders the concept quite neatly, when compared to petal-widt...
Trees can build models that work on independent features and on second order effects. So they might be good candidates for this domain. Trees are rules that are chaind together, a rule splits instances that arrive at a rule in subgroups, that pass to the rules under the rule. Tree Learners generate...
Requirements: Supported Browsers: IE9+ Chrome Firefox Safari 5+ Opera Android 4 AngularJS 1.4.0+ Getting Started Download the source files from ui-grid github and include them in your project including the dependencies: <link rel="styleSheet" href="release/ui-gr...
#!/usr/bin/python input_list = [10,1,2,11] for i in range(len(input_list)): for j in range(i): if int(input_list[j]) > int(input_list[j+1]): input_list[j],input_list[j+1] = input_list[j+1],input_list[j] print input_list
Step 1 - Include the uiGrid in your project <link rel="styleSheet" href="release/ui-grid.min.css"/> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script> <script src="/release/ui-grid.min.js">&l...
Detailed instructions on getting stored-procedures set up or installed.
It is possible to create own Linux distribution using Yocto Project. For Raspberry Pi- there is a specific layer meta-raspberrypi that needs to be used to create an image.

Page 407 of 505