Tutorial by Examples: and

Search role in Ansible Galaxy ansible-galaxy search role_name Install role from Ansible Galaxy ansible-galaxy install role_name More help ansible-galaxy --help
Okay it took me about a day to figure it out so here I am posting the steps I followed to get my Database First working in a Class Project (.NET Core), with a .NET Core Web App. Step 1 - Install .NET Core Make Sure you are using .NET Core not DNX (Hint: You should be able to see the .NET Core opti...
You can make a URI parameter optional by adding a question mark to the route parameter. You can also specify a default value by using the form parameter=value. public class BooksController : Controller { // eg: /books // eg: /books/1430210079 [Route(“books/{isbn?}”)] public Act...
Logs are very important. Recreate an error context can be sometimes very painful due to the lack of information about how and when the error occurred. This example shows: How to add user's data in the error logs How to add post parameters sent when an error occurred How to use WebPr...
In order to use a plain-text editor to create a Console application that is written in C#, you'll need the C# Compiler. The C# Compiler (csc.exe), can be found at the following location: %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\csc.exe N.B. Depending upon which version of the .NET Framework t...
using System.Diagnostics.Contracts; public int IncrementByRandomAmount(int input) { Contract.Requires<ArgumentNullException>(input != null); // Don't allow null parameter. Contract.Requires<ArgumentOutOfRangeException>(input < int.MaxValue); // We can't do anything if...
Create an instance of Mobile Analytics for Bluemix. Add the Bluemix Mobile Services SDK to your iOS project. After installing the SDK, add these import statements at top of your AppDelegate.swift file: import BMSCore import BMSAnalytics Next you'll need to initialize and send mobile ana...
Setup Install AWS CLI AWS CLI is an common CLI tool for managing the AWS resources. With this single tool we can manage all the aws resources sudo apt-get install -y python-dev python-pip sudo pip install awscli aws --version aws configure Bash one-liners cat <file> # output a file ...
This example shows how to take image and display it correctly on the Android device. Firstly we have to create sample application with one button and one imageview. Once user clicks on the button camera is launched and after user selects picture it will be displayed with the proper orientation on ...
To randomly shuffle the examples, you can use tf.train.shuffle_batch function instead of tf.train.batch, as follows: parsed_batch = tf.train.shuffle_batch([serialized_example], batch_size=100, capacity=1000, min_after_dequeue=200) tf.train.shuffle_batch (as well as tf.train.batch) crea...
List of commonly used S3 AWS CLI Commands Create Bucket aws s3 mb s3://bucket-name Remove Bucket aws s3 rb s3://bucket-name List Buckets aws s3 ls List contents inside the bucket aws s3 ls s3://bucket-name List Bucket with a path aws s3 ls s3://bucket-name/path Copy file aws s3...
The purpose of this documentation is to use a scanner without any user interface. A common use is to upload a PDF scanned file directly to Google Drive or Dropbox just by pressing scanner-buttons. scanbd permits to trigger actions from the scanner buttons, it uses sane. What make things a little b...
QObjects come with their own alternative lifetime concept compared to native C++'s raw,unique or shared pointers. QObjects have the possibility to build an objecttree by declaring parent/child relationships. The simplest way to declare this relationship is by passing the parent object in the const...
Add the necessary dependencies to the project POM (mybatis, and mybatis-spring): <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>x.x.x</version> </dependency> <dependency> <group...
One of the features that we can use with Threadpools is the submit() method which allow us to know when the thread as finish his work. We can do this thanks to the Future object, which return us an object from the Callable that we can use to our own objetives. Here is an example about how to use th...
The following is the default code snippet for the BundleConfig.cs file. using System.Web.Optimization; public class BundleConfig { // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725 public static void RegisterBundles(BundleCollection bundles...
First why we should use depedency injection in our code ? We want to decouple other components from other classes in our program. For example we have class AnimalController which have code like this : public class AnimalController() { private SantaAndHisReindeer _SantaAndHisReindeer = new San...
autodie allows you to work with files without having to explicitly check for open/close failures. Since Perl 5.10.1, the autodie pragma has been available in core Perl. When used, Perl will automatically check for errors when opening and closing files. Here is an example in which all of the lines ...
In this very first example, a basic serial write operation is started from an Arduino device. void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: Serial.println("Hello World!"); dela...
app.use(async (ctx, next) => { try { await next() // attempt to invoke the next middleware downstream } catch (err) { handleError(err, ctx) // define your own error handling function } })

Page 102 of 153