Tutorial by Examples: er

We have here a file Size filter to describe how to add costum filter to an existing module : let fileSize=function (size,unit,fixedDigit) { return size.toFixed(fixedDigit) + ' '+unit; }; let fileSizeFilter=function () { return function (size) { if (isNaN(size)) ...
To extend and expand upon the binding experience we have converters to convert one a value of one type into another value of another type. To leverage Converters in a Databinding you first need to create a DataConverter class tht extens either IValueConverter(WPF & UWP) or IMultiVal...
Working Example: https://jsfiddle.net/Twisty/4f5yh3pa/7/ Cancelling and Reverting a sortable is not strongly documented. The helps show how moving an item from one list to another connected list can be conditionally cancelled. by default, this is not animated by sortable, this example includes an a...
Partial Update: Used when a partial document update is needed to be done, i.e. in the following example the field name of the document with id doc_id is going to be updated to 'John'. Note that if the field is missing, it will just be added to the document. doc = { "doc": { ...
Example of usage scalacheck with scalatest. Below we have four tests: "show pass example" - it passes "show simple example without custom error message " - just failed message without details, && boolean operator is used "show example with error messages on arg...
Use case: remember the current URL to return to after adding a new record in a different (related) controller, for instance create a new contact to add to an invoice being edited. InvoiceController / actionUpdate: Url::remember(Url::current(), 'returnInvoice'); ContactController / actionCreate:...
In this example we will make a simple client and server with REQ-REP (request-reply) sockets. The client sends "Hello" to the server, which replies with "World". Server opens a ZeroMQ REP-socket on port 5555, reads requests on it, and replies with "World" to each reque...
These function will help you to take the screenshot and also match the image with the part of the screen. .screenshot('c:\\path') #get the screenshot. .locateOnScreen('c:\\path') #search that image on screen and get the coordinates for you. locateCenterOnScreen('c:\\path') #get th...
This example attempts a single Ping request. The ping command inside the runtime.exec method call can be modified to any valid ping command you might perform yourself in the command line. try { Process ipProcess = runtime.exec("/system/bin/ping -c 1 8.8.8.8"); int exitValue = ip...
Note: For brevity, the commands use here-strings (<<<) and ANSI C-quoted strings ($'...'). Both these shell features work in bash, ksh, and zsh. # GNU Sed $ sed '1 a appended text' <<<'line 1' line 1 appended text # BSD Sed (multi-line form) sed '1 a\ appended text'...
Simply add an attribute to the controller action [Route("product/{productId}/customer")] public IQueryable<Product> GetProductsByCustomer(int productId) { //action code goes here } this will be queried as /product/1/customer and productId=1 will be sent to the controll...
Steps for Getting Started: Download Eclipse Create a Java Maven Project with following example package organization src/test/java com.example.pageobjects com.example.steps com.example.runner src/test/resources Add Cucumber Eclipse Plugin : https://github.com/cucumber/cucumber-eclipse/wik...
SELECT ... WHERE dt >= '2017-02-01' AND dt < '2017-02-01' + INTERVAL 1 MONTH Sure, this could be done with BETWEEN and inclusion of 23:59:59. But, the pattern has this benefits: You don't have pre-calculate the end date (which is often an exact length from the start) You...
Just add these lines to the initialization RecyclerView mRecyclerView = (RecyclerView) view.findViewById(recyclerView); mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL))...
The Symfony Installer is a command line tool that helps you to create new Symfony applications. It requires PHP 5.4 or higher. Downloading and installing the Symfony Installer on Linux / MacOS Open a terminal and execute the following commands: sudo mkdir -p /usr/local/bin sudo curl -LsS https:/...
Example for a functional view to create an object. Excluding comments and blank lines, we need 15 lines of code: # imports from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from .models import SampleObject from .forms import SampleObjectForm # vie...
The above example only works if your tasks are entirely standard tasks. You do not add extra context here, for example. Let's make a more realistic example. Assume we want to add a page title to the template. In the functional view, this would work like this - with just one additional line: def cr...
The true power of generic views unfolds when you combine them with Mixins. A mixin is a just another class defined by you whose methods can be inherited by your view class. Assume you want every view to show the additional variable 'page_title' in the template. Instead of overriding the get_context...
How to center an element, column, or content inside a column works differently in Bootstrap 4. Horizontal Center text-center is still used for display:inline elements mx-auto replaces center-block to center display:block elements offset-* or mx-auto can be used to center grid columns mx-aut...
typealias Parents = Pair<Person, Person> typealias Accounts = List<Account>

Page 371 of 417