Tutorial by Examples

To switch focus to either main document or first frame of the page. You have to use below syntax. webDriver.SwitchTo().DefaultContent();
The module "struct" provides facility to pack python objects as contiguous chunk of bytes or dissemble a chunk of bytes to python structures. The pack function takes a format string and one or more arguments, and returns a binary string. This looks very much like you are formatting a stri...
ASSERT is used in sensitive areas where you want to be absolutely sure, that a variable has a specific value. If the logical condition after ASSERT turns out to be false, an unhandleable exception (ASSERTION_FAILED) is thrown. ASSERT 1 = 1. "No Problem - Program continues ASSERT 1 = 2. &quo...
for ([declaration-or-expression]; [expression2]; [expression3]) { /* body of the loop */ } In a for loop, the loop condition has three expressions, all optional. The first expression, declaration-or-expression, initializes the loop. It is executed exactly once at the beginning of the lo...
Preconditions These instructions suppose you have any type of Linux, Unix, Mac with bash or Git-bash Windows. Windows: Download and install Git-bash for Windows, then execute 'bash' from command line. Other shells than bash are fine too, just replace the activate command below with activate.csh...
A loop is said to be an infinite loop if the control enters but never leaves the body of the loop. This happens when the test condition of the loop never evaluates to false. Example: C99 for (int i = 0; i >= 0; ) { /* body of the loop where i is not changed*/ } In the above example...
Player playerToHide; Player playerToNotSee; playerToNotSee.hide(playerToHide); //playerToHide will no longer be seen by playerToNotSee. If player is already hidden, nothing happens
Player toUnhide; Player toSeeAgain toSeeAgain.show(toUnhide); //Player toSeeAgain will now see Player toUnhide again. If player is already visible, nothing happens.
Player playerToCheck; Player playerSeeing; boolean isVisible = playerSeeing.canSee(playerToCheck); //isVisible returns true if playerSeeing can see playerToCheck and false otherwhise
This can be done by using the event EntityTargetEvent Entities won't target the player if you cancel the event: @EventHandler public void onEntityTarget(EntityTargetEvent e) { Entity target = e.getEntity(); if(target instanceof Player) { Player playerTargetted = (Player) target...
Log in to the AWS Management Console and navigate to AWS Lambda. Click create new function then you will see this window. Select Runtime environment but blueprint (sample code) only for node.js and python There are two example conation for alexa skills kit. You can filter those thing. By s...
Use the d8 shell to run the v8 engine. Use the following pattern to run on a file: /path/to/d8 [flags] [file].js For example: ./d8 --log-gc script.js will run d8 on script.js with garbage collection logging enabled
JSON arrays represent a collection of objects. In JS, theres a bunch of collection functions off of them such as slice, pop, push. Objects have just more raw data. A JSONArray is an ordered sequence of values. Its external text form is a string wrapped in square brackets with commas separating the ...
Type declaration: CREATE OR REPLACE TYPE base_type AS OBJECT ( base_id INTEGER, base_attr VARCHAR2(400), null_attr INTEGER, -- Present only to demonstrate non-default constructors CONSTRUCTOR FUNCTION base_type ( i_base_id INTEGER, i_base_attr VARCHAR2 ...
Type declaration: CREATE OR REPLACE TYPE mid_type UNDER base_type ( mid_attr DATE, CONSTRUCTOR FUNCTION mid_type ( i_base_id INTEGER, i_base_attr VARCHAR2, i_mid_attr DATE ) RETURN SELF AS RESULT, MEMBER FUNCTION get_mid_attr RETURN DATE, MEMBER PROC...
Type declaration: CREATE OR REPLACE TYPE leaf_type UNDER mid_type ( leaf_attr VARCHAR2(1000), CONSTRUCTOR FUNCTION leaf_type ( i_base_id INTEGER, i_base_attr VARCHAR2, i_mid_attr DATE, i_leaf_attr VARCHAR2 ) RETURN SELF AS RESULT, MEMBER FUNCTION ...
CREATE SEQUENCE test_seq START WITH 1001; CREATE TABLE test_tab ( test_id INTEGER, test_obj base_type, PRIMARY KEY (test_id) ); INSERT INTO test_tab (test_id, test_obj) VALUES (test_seq.nextval, base_type(1,'BASE_TYPE')); INSERT INTO test_tab (test_id, test_obj) VALUES (test_...
This example shows how to populate report with data returned by a data view delegate. During the exercise, we will develop an inquiry screen showing list of Sales Orders between two dates. Data view delegate will be used to populate Sales Order information. Prerequisites: We start with declara...
The let expressions in scheme are in fact macros. They can be expressed with lambdas. A simple let might look like this: (let ((x 1) (y 2)) (+ x y)) It will return 3 as the value of the last expression of the let body is returned. As you can see, a let-expression is actually executing somethi...
There are times with multiple static objects where you need to be able to guarantee that the singleton will not be destroyed until all the static objects that use the singleton no longer need it. In this case std::shared_ptr can be used to keep the singleton alive for all users even when the static...

Page 1014 of 1336