Tutorial by Examples: bing

Subscription returns an IDisposable: IDisposable subscription = emails.Subscribe(email => Console.WriteLine("Email from {0} to {1}", email.From, email.To)); When you are ready to unsubscribe, simply dispose the subscription: subscription.Dispose();
emails.Subscribe(email => Console.WriteLine("Email from {0} to {1}", email.From, email.To), cancellationToken);
This example shows how to use the IBM Watson Speech to Text service to recognize the type of an audio file and produce a transcription of the spoken text in that file. This example requires Speech to Text service credentials and Node.js Install the npm module for the Watson Developer Cloud N...
The @var keyword can be used to describe the type and usage of: a class property a local or global variable a class or global constant class Example { /** @var string This is something that stays the same */ const UNCHANGING = "Untouchable"; /** @var string $some_s...
/** * Parameters * * @param int $int * @param string $string * @param array $array * @param bool $bool */ function demo_param($int, $string, $array, $bool) { } /** * Parameters - Optional / Defaults * * @param int $int * @param string $string * @param ...
A template autorun may be used to (re)subscribe to a publication. It establishes a reactive context which is re-executed whenever any reactive data it depends on changes. In addition, an autorun always runs once (the first time it is executed). Template autoruns are normally put in an onCreated met...
<div tabindex="0">Some button</div> Note: Try to use a native HTML button or an a tag where appropriate.
<button tabindex="-1">This button will not be reachable by tab</button> The element will be removed from the tabbing order but will still be focusable.
<div tabindex="2">Second</div> <div tabindex="1">First</div> Positive values will insert the element at the tabbing order position of its respective value. Elements without preference (i.e. tabindex="0" or native elements such as button and a...
By default, one should subscribe to event using inspector, but sometimes it's better to do it in code. In this example we subscribe to click event of a button in order to handle it. using UnityEngine; using UnityEngine.UI; [RequireComponent(typeof(Button))] public class AutomaticClickHandler :...
2.02 Preparation $ mkdir globbing $ cd globbing $ mkdir -p folder/{sub,another}folder/content/deepfolder/ touch macy stacy tracy "file with space" folder/{sub,another}folder/content/deepfolder/file .hiddenfile $ shopt -u nullglob $ shopt -u failglob $ shopt -u dotglob $ shopt -u n...
void methods can be stubbed using the doThrow(), doAnswer(), doNothing(), doCallRealMethod() family of methods. Runnable mock = mock(Runnable.class); doThrow(new UnsupportedOperationException()).when(mock).run(); mock.run(); // throws the UnsupportedOperationException Note thatvoid methods...
The following example uses allow and receive to stub a Cart's call to a CreditCardService so that the example doesn't have to wait for a network call or use a credit card number that the processor knows about. class Cart def check_out begin transaction_id = CreditCardService.instance...
var baseLayer = new ol.layer.Tile({ visible: true, preload: Infinity, source: new ol.source.BingMaps({ // We need a key to get the layer from the provider. // Sign in with Bing Maps and you will get your key (for free) key: 'Ap9VqFbJYRNkatdxt3KyzfJxXN_9GlfA...
Assuming you know the productID: First import StoreKit Then in your code let productID: Set = ["premium"] let request = SKProductsRequest(productIdentifiers: productID) request.delegate = self request.start() and in the SKProductsRequestDelegate: func productsRequest(request: ...
This example attempts to mimic the behavior of the built-in path construction operators like arc. If there is a current point, poly first draws a line to (x,y)+(r,0), otherwise it starts by moving to that point. Instead of gsave ... grestore (which has the undesirable effect of discarding the very...
Sometimes you want to mock a class or an interface and have its properties behave as if they were simple getters and setters. As this is a common requirement, Moq provides a short cut method to setup all properties of a mock to store and retrieve values: // SetupAllProperties tells mock to impleme...
Sometimes there are sections of code that are difficult to test, such as accessing a database, or interacting with the user. You can stub out those sections of code, allowing the rest of the code to be tested. Let's start with a class that prompts the user. For simplicity, it has only two methods...
Use the GitHub repository to get the entire code: https://github.com/firebase/functions-samples/blob/master/quickstarts/email-users Copy or clone the repository in your computer. Now go to your Firebase Console Create a Firebase Project using the Firebase Console. Enable the Google Provid...
When you no longer need to receive messages, you can simply unsubscribe. You can do it like this: MessagingCenter.Unsubscribe<MainPage> (this, "Hi"); When you are supplying arguments, you have to unsubscribe from the complete signature, like this: MessagingCenter.Unsubscribe<Ma...

Page 1 of 2