Tutorial by Examples: amp

To fetch multiple grids in a single query, the QueryMultiple method is used. This then allows you to retrieve each grid sequentially through successive calls against the GridReader returned. var sql = @"select * from Customers where CustomerId = @id select * from Orders where Cust...
This code contains an overloaded method named Hello: class Example { public static void Hello(int arg) { Console.WriteLine("int"); } public static void Hello(double arg) { Console.WriteLine("double"); } public static vo...
public class SampleAdapter extends RecyclerView.Adapter<SampleAdapter.ViewHolder> { private String[] mDataSet; private OnRVItemClickListener mListener; /** * Provide a reference to the type of views that you are using (custom ViewHolder) */ public static cla...
First example reimplemented in Kotlin and using RxJava for cleaner interaction. import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.support.v7.widget.RecyclerView import rx.subjects.PublishSubject public class SampleAdapter(private val ite...
import random shuffle() You can use random.shuffle() to mix up/randomize the items in a mutable and indexable sequence. For example a list: laughs = ["Hi", "Ho", "He"] random.shuffle(laughs) # Shuffles in-place! Don't do: laughs = random.shuffle(laughs) p...
This a Basic example for using the MVVM model in a windows desktop application, using WPF and C#. The example code implements a simple "user info" dialog. The View The XAML <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> ...
You can upvote (or downvote, if you want...) examples you created. Although you won't get any reputation for doing so, upvoting your the example will influence the examples' ordering on the page. Any previous contributors to the examples will get reputation. On the other hand, you might consider ...
@media screen and (min-width: 720px) { body { background-color: skyblue; } } The above media query specifies two conditions: The page must be viewed on a normal screen (not a printed page, projector, etc). The width of the user's view port must be at least 720 pixels. I...
// List folder Dropbox.authorizedClient!.files.listFolder(path: "/nonexistantpath").response { response, error in print("*** List folder ***") if let result = response { print("Folder contents:") for entry in result.entries { pr...
Start by installing the PayPal Node module from NPM npm install paypal-rest-sdk In your application file, add in the configuration information for the SDK var paypal = require('paypal-rest-sdk'); var client_id = 'YOUR CLIENT ID'; var secret = 'YOUR SECRET'; paypal.configure({ 'mode'...
In this example, we're going to set up an Express server integration to display how to process a payment with PayPal, using the PayPal Node SDK. We will use a static JSON structure for the payment details for the sake of brevity. There are three general steps that we will follow when building out t...
The second step to creating a subscription for a user is to create and execute a billing agreement, based on an existing activated billing plan. This example assumes that you have already gone through and activated a billing plan in the previous example, and have an ID for that billing plan to refer...
When creating a subscription for a user, you first need to create and activate a billing plan that a user is then subscribed to using a billing agreement. The full process for creating a subscription is detailed in the remarks of this topic. Within this example, we're going to be using the PayPal N...
The Autocomplete widgets provides suggestions while you type into the field. <script> $(document).ready(function() { var tags = ["ask","always", "all", "alright", "one", "foo", "blackberry", "tweet","...
Dialog is a window which is overlay positioned within the viewport. <script> $(function() { $( "#dialog" ).dialog(); }); </script> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displayin...
Enable draggable functionality on any DOM element. <script> $(function() { $( "#draggable" ).draggable(); }); </script> <div id="draggable" class="ui-widget-content"> <p>Drag me around</p> </div>
Bosun alerts are defined in the config file using a custom DSL. They use functions to evaluate time series data and will generate alerts when the warn or crit expressions are non-zero. Alerts use templates to include additional information in the notifications, which are usually an email message and...
This sample will show you how to update an existing webhook forwarding URL (where the notifications should be POSTed to). To run this, you should have the ID provided back by PayPal when you first created your webhooks. First, add the PayPal SDK and configure the environment (sandbox below). var p...
Here is an example of a Bosun config file used in a development environment: tsdbHost = localhost:4242 httpListen = :8070 smtpHost = localhost:25 emailFrom = [email protected] timeAndDate = 202,75,179,136 ledisDir = ../ledis_data checkFrequency = 5m notification example.notification { ...
performance.now() returns a precise timestamp: The number of milliseconds, including microseconds, since the current web page started to load. More generally, it returns the time elapsed since the performanceTiming.navigationStart event. t = performance.now(); For example, in a web browser's ma...

Page 1 of 46