Tutorial by Examples: ti

from selenium import webdriver # Create a new chromedriver driver = webdriver.Chrome() # Go to www.google.com driver.get("https://www.google.com") # Get the webelement of the text input box search_box = driver.find_element_by_name("q") # Send the string "Selen...
The easiest way is to use pip and VirtualEnv. Selenium also requires python 3.*. Install virtualenv using: $: pip install virtualenv Create/enter a directory for your Selenium files: $: cd my_selenium_project Create a new VirtualEnv in the directory for your Selenium files: $: virtualenv -...
This examples shows how to build a JavaFX application, where the language can be switched dynamically while the application is running. These are the message bundle files used in the example: messages_en.properties: window.title=Dynamic language change button.english=English button.german=Germa...
The following example code computes the sum of 1+4(3+3^2+3^3+3^4+...+3^N) series using pow() family of standard math library. #include <stdio.h> #include <math.h> #include <errno.h> #include <fenv.h> int main() { double pwr, sum=0; int i, n; ...
Sometimes a build combines multiple source directories, each of which is their own 'project'. For instance, you might have a build structure like this: projectName/ build.sbt project/ src/ main/ ... test/ ... core/ src/ main/ ... test/ ... webapp/ src/ main/ ... test/ ... In t...
Because infixes are so common in Haskell, you will regularly need to look up their signature etc.. Fortunately, this is just as easy as for any other function: The Haskell search engines Hayoo and Hoogle can be used for infix operators, like for anything else that's defined in some library. ...
MATLAB R2016b featured a generalization of its scalar expansion1,2 mechanism, to also support certain element-wise operations between arrays of different sizes, as long as their dimension are compatible. The operators that support implicit expansion are1: Element-wise arithmetic operators: +, -,...
You can set a character set both per table, as well as per individual field using the CHARACTER SET and CHARSET statements: CREATE TABLE Address ( `AddressID` INTEGER NOT NULL PRIMARY KEY, `Street` VARCHAR(80) CHARACTER SET ASCII, `City` VARCHAR(80), `Country` ...
In projects that feature several singleton classes (as is often the case), it can be clean and convenient to abstract the singleton behaviour to a base class: using UnityEngine; using System.Collections.Generic; using System; public abstract class MonoBehaviourSingleton<T> : MonoBehaviou...
Detailed instructions on getting anaconda set up or installed.
audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audioManager.requestAudioFocus(audioListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT); changedListener = new AudioManager.OnAudioFocusChangeListener() { @Override public void onAudioFocu...
audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audioManager.requestAudioFocus(audioListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); changedListener = new AudioManager.OnAudioFocusChangeListener() { @Override public void onAudioFocusChange(in...
This example shows how to use fast enumeration in order to traverse through an NSArray. With this way you can also track current object's index while traversing. Suppose you have an array, NSArray *weekDays = @[@"Monday", @"Tuesday", @"Wednesday", @"Thursday&quot...
Define parameters private static IMongoClient _client; private static IMongoDatabase _database; private static IMongoCollection< -collection class name- > _collection; Assign values to parameters _client = new MongoClient("mongodb://localhost:27017"); _database = _client.GetD...
Creating summation is quite easy in 3 steps On front panel, Add 2 numeric controls (number 1 and Number 2) and 1 numeric indicator (sum). Switch to block diagram(using CTRL+E) and connect Add block from numeric palette. Wire it to both numeric controls and sum indicator created in step 1. ...
;WITH cte_query_1 AS ( SELECT * FROM database.table1 ), cte_query_2 AS ( SELECT * FROM database.table2 ) SELECT * FROM cte_query_1 WHERE cte_query_one.fk IN ( SELECT PK FROM cte_query_2 ) With common table expressions, it is possible to create multiple ...
Let's say that we're given const string input as a phone number to be validated. We could start by requiring a numeric input with a zero or more quantifier: regex_match(input, regex("\\d*")) or a one or more quantifier: regex_match(input, regex("\\d+")) But both of those really f...
When Java annotations were first introduced there was no provision for annotating the target of an instance method or the hidden constructor parameter for an inner classes constructor. This was remedied in Java 8 with addition of receiver parameter declarations; see JLS 8.4.1. The receiver param...
Multi-line comments start with = and with the =cut statement. These are special comments called POD (Plain Old Documentation). Any text between the markers will be commented out: =begin comment This is another comment. And it spans multiple lines! =end comment =cut
The Combined Call method allows you to use multiple AlchemyLanguage functions in one request. This example uses a Combined Call to get entities and keywords from the IBM website and returns sentiment information for each result. This example requires AlchemyLanguage service credentials and Node.j...

Page 344 of 505