Tutorial by Examples

with Ada.Containers.Synchronized_Queue_Interfaces; with Ada.Containers.Unbounded_Synchronized_Queues; with Ada.Text_IO; procedure Producer_Consumer_V1 is type Work_Item is range 1 .. 100; package Work_Item_Queue_Interfaces is new Ada.Containers.Synchronized_Queue_Interfaces ...
Detailed instructions on getting cloudfoundry set up or installed.
One major aspect of process substitution is that it lets us avoid usage of a sub-shell when piping commands from the shell. This can be demonstrated with a simple example below. I have the following files in my current folder: $ find . -maxdepth 1 -type f -print foo bar zoo foobar foozoo barzoo ...
Once you have your UWP application ready for tests you should add test application to your solution. To do it "right" click on the solution and choose "Unit Test App (Universal Windows)": Once you add it to the solution there are few more steps required to configure it. You w...
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...
@Mojo(name = "hi", defaultPhase = LifecyclePhase.COMPILE)
@Parameter(defaultValue = "${project.build.directory}") private File buildDirectory;
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...
When you want for example enforce the use of the parameter Password if the parameter User is provided. (and vise versa) Function Do-Something { Param ( [Parameter(Mandatory=$true)] [String]$SomeThingToDo, [Parameter(ParameterSetName="Credentials", man...
Function Do-Something { Param ( [Parameter(Mandatory=$true)] [String]$SomeThingToDo, [Parameter(ParameterSetName="Silently", mandatory=$false)] [Switch]$Silently, [Parameter(ParameterSetName="Loudly", mandatory=$false)] ...
Contains a read-only hash table (Constant, AllScope) that displays details about the version of PowerShell that is running in the current session. $PSVersionTable #this call results in this: Name Value ---- ----- PSVersion ...
A synchronous producer-consumer solution ensures that the consumer reads every data item written by the producer exactly one time. Asynchronous solutions allow the consumer to sample the output of the producer. Either the consumer consumes the data faster than it is produced, or the consumer consume...
This example uses the main procedure as the producer task. In Ada the main procedure always runs in a task separate from all other tasks in the program, see minimal example. ------------------------------------------------------------------ -- Sampling Consumer -- --------------------------------...
Go to the test method you want to ignore Before the @Test annotation, enter @Ignore optional: You can add description why are you ignoring this test method, something like: @Ignore ("ignoring this test case for now") a sample method would be: @Ignore ("not going to test this m...
4.1 This code loads, compiles, and links a single file that creates a separate shader program for a single stage. If there are errors, it will get the info-log for those errors. The code uses some commonly-available C++11 functionality. #include <string> #include <fstream> //In C+...

Page 1085 of 1336