Tutorial by Examples: ee

This example has more tests available in unit testing. Employee.vb (Class Library) ''' <summary> ''' Employee Class ''' </summary> Public Class Employee ''' <summary> ''' First name of employee ''' </summary> Public Property FirstName As String = &q...
from flask import Flask, render_template, redirect, url_for app = Flask(__name__) @app.route('/') def main_page(): return render_template('main.html') @app.route('/main') def go_to_main(): return redirect(url_for('main_page'))
If you want to add a UIImageView to the center of the screen with width and height of 100 pixel, you need to set center x constraint and center y constraint to the superview from the UIImageView and width, height constraint to the UIIMageView. Here is the code. There is way to do this in storyboard ...
A NullReferenceException is thrown when you try to access a non-static member (property, method, field or event) of a reference object but it is null. Car myFirstCar = new Car(); Car mySecondCar = null; Color myFirstColor = myFirstCar.Color; // No problem as myFirstCar exists / is not null Color...
public static Screenshot TakeScreenshot(this IWebDriver _driver) { return ((ITakesScreenshot)_driver).GetScreenshot(); } Usage example: driver.TakeScreenshot().SaveAsFile(@"/Test/Test.png",ImageFormat.Png);
SQL Server 2008 The ROW_NUMBER function can assign an incrementing number to each row in a result set. Combined with a Common Table Expression that uses a BETWEEN operator, it is possible to create 'pages' of result sets. For example: page one containing results 1-10, page two containing results 11...
There are two equivalent ways to calculate the amount of time unit between two LocalTime: (1) through until(Temporal, TemporalUnit) method and through (2) TemporalUnit.between(Temporal, Temporal). import java.time.LocalTime; import java.time.temporal.ChronoUnit; public class AmountOfTime { ...
Sometimes, it's better to have only three options style="@android:style/TextAppearance.Small" style="@android:style/TextAppearance.Medium" style="@android:style/TextAppearance.Large" Use small and large to differentiate from normal screen size. <TextView ...
Parallelism in Haskell can be expressed using the Eval Monad from Control.Parallel.Strategies, using the rpar and rseq functions (among others). f1 :: [Int] f1 = [1..100000000] f2 :: [Int] f2 = [1..200000000] main = runEval $ do a <- rpar (f1) -- this'll take a while... b <- rpa...
AutomationMetadataProvider automationMetadataProvider = Assert.ResultNotNull(Factory.CreateObject("automation/metadataProvider", true) as AutomationMetadataProvider); var context = AutomationManager.Provider.GetAutomationContext(ID.Parse(contact.ContactId)); co...
Pass an upper limit as an argument to the rand() function. Input: my $upper_limit = 100; my $random = rand($upper_limit); print $random . "\n"; Output: A random floating-point number, like... 45.8733038119139
Cast your random floating-point number as an int. Input: my $range = 10; # create random integer as low as 0 and as high as 9 my $random = int(rand($range)); # max value is up to but not equal to $range print $random . "\n"; Output: A random integer, like... 0 See also t...
A modern Fortran example which includes error checking and a function to get a new unit number for the file. module functions contains function get_new_fileunit() result (f) implicit none logical :: op integer :: f f = 1 do ...
Let's understand something. JavaEE consists of a number of specifications. When you install an Application Server (Payara for example), you install all of the specifications at once. For example there's a specification for an ORM called JPA (Java Persistence API), a specification to build Component ...
We will present some examples to show how to apply happens-before reasoning to check that writes are visible to subsequent reads. Single-threaded code As you would expect, writes are always visible to subsequent reads in a single-threaded program. public class SingleThreadExample { public in...
All communications between Fragments must go via an Activity. Fragments CANNOT communicate with each other without an Activity. Additional Resources How to implement OnFragmentInteractionListener Android | Communicating With Other Fragments In this sample, we have a MainActivity that hosts t...
CALL is also a way to extend COBOL functionality, and also to allow the reusability of code. It can also give access to "system" functionality. This example illustrates ways to provide "sleep" functionality to IBM Mainframe COBOLs. Bear in mind that the requirement to do so is r...
Google Apps Script is a JavaScript based platform-as-a-service primarily used to automate and extend Google Apps. Apps Script runs exclusively on Google's infrastructure requiring no server provisioning or configuration. An online IDE serves as the interface to the entire platform connecting all the...
You can grant in-privileged users right to see unmasked values using the following statement: GRANT UNMASK TO MyUser If some user already has unmask permission, you can revoke this permission: REVOKE UNMASK TO MyUser
A decision tree is a classifier which uses a sequence of verbose rules (like a>7) which can be easily understood. The example below trains a decision tree classifier using three feature vectors of length 3, and then predicts the result for a so far unknown fourth feature vector, the so called te...

Page 35 of 54