Tutorial by Examples: f

Assume that we have a system that sends out daily reports over email in the form of attached CSV files and that we want to access these. function getCsvFromGmail() { // Get the newest Gmail thread based on sender and subject var gmailThread = GmailApp.search("from:[email protected] sub...
The main reason that Nightwatch is so powerful, is because of it's excellent configuration file. Unlike most other testing frameworks, Nightwatch is fully configurable and customizable to different environments and technology stacks. .meteor/nightwatch.json The following configuration file is for...
A basic Nightwatch installation for Meteor will have the following directories and files installed. /myapp /myapp/.meteor/nightwatch.json /client/main.html /client/main.js /client/main.css /tests /tests/nightwatch /tests/nightwatch/assertions /tests/nightwatch/commands /tests/nightwatch/da...
The first part of this example explains how to implement it. In the second, I will explain how it works. This tries to be a general example. The template for the map (see step 3) and the example functions are fully customizable. ################################# IMPLEMENTATION #####################...
Use the annotation -- @FixMethodOrder(MethodSorters.DEFAULT). This runs all tests within the class in a deterministic and somewhat predictable order. The implementation hashes the method names and compares them. In the scenario of a tie, it sorts by lexicographical order. Code Segment Below Taken f...
Typically, when one of the RadioButtons in a ToggleGroup is selected the application performs an action. Below is an example which prints the user data of the selected RadioButton which has been set with setUserData(Object). radioButton1.setUserData("awesome") radioButton2.setUserData(&q...
Let's say the second RadioButton out of three is pre-selected with setSelected(Boolean), the focus is still at the first RadioButton by default. To change this use the requestFocus() method. radioButton2.setSelected(true); radioButton2.requestFocus();
[root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d87bf9607836 8251da35e7a7 "/bin/bash" About a minute ago Up 31 seconds vol3 [r...
[root@localhost ~]# docker inspect d87bf9607836 "Mounts": [ { "Name": "cdf78fbf79a7c9363948e133abe4c572734cd788c95d36edea0448094ec9121c", "Source": "/var/lib/docker/volumes/cdf78fbf79a7c9363948e133abe4c572734cd788c95d36edea0448094ec9121c/_data&quot...
var http = require('http'); var fs = require('fs'); var path = require('path'); http.createServer(function (request, response) { console.log('request ', request.url); var filePath = '.' + request.url; if (filePath == './') filePath = './index.html'; var extname = String(path.extnam...
While each mobile platforms do offer their own settings management api, there are no built in ways to read settings from a good old .net style app.config xml file; This is due to a bunch of good reasons, notably the .net framework configuration management api being on the heavyweight side, and each...
These classes increase the left margin of a column by * columns. For example, .col-md-offset-4 moves .col-md-4 over four columns. <div class="row"> <div class="col-lg-4"></div> <div class="col-lg-4 col-lg-offset-4"></div> </div&g...
func bufferedUnbufferedExample(buffered bool) { // We'll declare the channel, and we'll make it buffered or // unbuffered depending on the parameter `buffered` passed // to this function. var ch chan int if buffered { ch = make(chan int, 3) } else { ch...
If you want to detect when your user enters a specific location, you can create a fence for the specific location with a radius you want and be notified when your user enters or leaves the location. // Your own action filter, like the ones used in the Manifest private static final String FENCE_REC...
Turn any fixed-width grid layout into a full-width layout by changing your outermost .container to .container-fluid. <div class="container-fluid"> <div class="row"> ... </div> </div>
Move columns to the right using .col-md-offset-* classes. These classes increase the left margin of a column by * columns. For example, .col-md-offset-4 moves .col-md-4 over four columns. <div class="row"> <div class="col-md-4">.col-md-4</div> <div cla...
Possessive quantifiers are another class of quantifiers in many regex flavours that allow backtracking to, effectively, be disabled for a given token. This can help improve performance, as well as preventing matches in certain cases. The class of possessive quantifiers can be distinguished from laz...
Set single element: $dt->set( year => 2016 ); Set many elements: $dt->set( year => 2016, 'month' => 8); Add duration to datetime $dt->add( hour => 1, month => 2) Datetime subtraction: my $dt1 = DateTime->new( year => 2016, month => 8, ...
Time::Piece is available in perl 5 after version 10 use Time::Piece; my $date = localtime->strftime('%m/%d/%Y'); print $date; Output 07/26/2016
perl -Mojo -E 'p("http://localhost:3000" => form => {Input_Type => "XML", Input_File => {file => "d:/xml/test.xml"}})' File d:/xml/test.xml will be uploaded to server which listen connections on localhost:3000 (Source) In this example: -Mmodule execu...

Page 276 of 457