Tutorial by Examples: f

Example Feature file: Feature: Calculator In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers @mytag Scenario: Add two numbers Given I have entered 50 into the calculator And I have also entered 70 into the calculator When I press ad...
You can use the same Example above Send Simple Mail with a little modification. Use msg.setContent() instead of msg.setText() and use content type html as text/html. check this msg.setContent(message, "text/html; charset=utf-8"); instead of msg.setText(message);
The DeriveFunctor language extension allows GHC to generate instances of Functor automatically. {-# LANGUAGE DeriveFunctor #-} data List a = Nil | Cons a (List a) deriving Functor -- instance Functor List where -- automatically defined -- fmap f Nil = Nil -- fmap f (Cons x xs...
Since Ruby 2.0, Ruby allows to have safer Monkey Patching with refinements. Basically it allows to limit the Monkey Patched code to only apply when it is requested. First we create a refinement in a module: module RefiningString refine String do def reverse "Hell riders" ...
The MIME type must be defined using the type attribute. <embed type="video/mp4" src="video.mp4" width="640" height="480">
Read a 16-bit unsigned integer from input. This function uses the interrupt service Int 21/AH=0Ah for reading a buffered string. The use of a buffered string let the user review what they had typed before passing it to the program for processing. Up to six digits are read (as 65535 = 216 - 1 has ...
Another example of "Hello World" style programs is FizzBuzz. DEFINE VARIABLE i AS INTEGER NO-UNDO. DEFINE VARIABLE cOut AS CHARACTER NO-UNDO. DO i = 1 TO 100: /* Dividable by 3: fizz */ IF i MODULO 3 = 0 THEN cOut = "Fizz". /* Dividable by 5: ...
Print a number in binary, quaternary, octal, hexadecimal and a general power of two All the bases that are a power of two, like the binary (21), quaternary (22), octal (23), hexadecimal (24) bases, have an integral number of bits per digit1. Thus to retrieve each digit2 of a numeral we simply brea...
Suppose the following matrix is the transition probability matrix associated with a Markov chain. 0.5 0.2 0.3 P= 0.0 0.1 0.9 0.0 0.0 1.0 In order to study the nature of the states of a Markov chain, a state transition diagram of the Markov chain is drawn. \documentclass[12pt...
Salesforce DataLoader Dataloader.io Jitterbit SFXOrgData DreamFactory Monarch Pentaho Kettle Talend
var pipeline = {}; // (...) adding things in pipeline for(var key in pipeline) { fs.stat(pipeline[key].path, function(err, stats) { if (err) { // clear that one delete pipeline[key]; return; } // (...) pipeline[key].count++; }); } The problem i...
import android.util.Log; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; public class Compress { private static f...
Ajax : New request : Client sends request : Server , Do you have new notification ? Server sends response : Client , NO connection ends New request : Client sends request : Server , Do you have new notification ? Server sends response : Client , NO connection ends New request ...
In the official reference document, it says: The main function of an inbound Channel Adapter is to execute a SQL SELECT query and turn the result set as a message. The message payload is the whole result set, expressed as a List, and the types of the items in the list depend on the row-mapping st...
In the Spring Integration Reference Docuement, it says: The outbound Channel Adapter is the inverse of the inbound: its role is to handle a message and use it to execute a SQL query. The message payload and headers are available by default as input parameters to the query... Java code p...
Print a 16-bit unsigned number in decimal The interrupt service Int 21/AH=02h is used to print the digits. The standard conversion from number to numeral is performed with the div instruction, the dividend is initially the highest power of ten fitting 16 bits (104) and it is reduced to lower power...
You have already created a plist. This plist will remain same in app. If you want to edit the data in this plist, add new data in plist or remove data from plist, you can't make changes in this file. For this purpose you will have to store your plist in Document Directory. You can edit your plist s...
For starting tvOS I assume must have knowledge of swift and iOS app. One can start reading article from apple reference document. There are 2 type of Tv app we can create one is traditional app, i.e created in xcode code would be similar as we do in iOS app. Here we take example of other type of t...
As you can see the layout of this gem is very catching and user friendly.
Plain Vanilla Filtering To filter any view, override its get_queryset method to return a filtered query set class HREmployees(generics.ListAPIView): def get_queryset(self): return Employee.objects.filter(department="Human Resources") All the API functions will then use t...

Page 355 of 457