Tutorial by Examples

Firstly, you have to import jquery library . We also need to import findDOmNode as we’re going to manipulate the dom. And obviously we are importing React as well. import React from 'react'; import { findDOMNode } from ‘react-dom’; import $ from ‘jquery’; We are setting an arrow function ‘hand...
Builders can be defined as a set of extension functions taking lambda expressions with receivers as arguments. In this example, a menu of a JFrame is being built: import javax.swing.* fun JFrame.menuBar(init: JMenuBar.() -> Unit) { val menuBar = JMenuBar() menuBar.init() setJMe...
Triggers are an easy way to add some UX responsiveness to your application. One easy way to do this is to add a Trigger which changes a Label's TextColor based on whether its related Entry has text entered into it or not. Using a Trigger for this allows the Label.TextColor to change from gray (when...
-v, --version Added in: v0.1.3 Print node's version. -h, --help Added in: v0.1.3 Print node command line options. The output of this option is less detailed than this document. -e, --eval "script" Added in: v0.5.2 Evaluate the following argument as JavaScript. The modules whi...
AutoIt is intended for use on the Microsoft Windows operating system. It is compatible with versions from Windows XP onwards. Download the installation utility from https://www.autoitscript.com/site/autoit/downloads/ If installing on a 64-bit version of Windows, the user is prompted to choose a 6...
angular.module("app") .service("counterService", ["fooService", "barService", function(anotherService, barService){ var service = { number: 0, foo: function () { return fooService.bazMethod(); // Use of 'fooService' ...
Data races occur when a piece of memory is updated by one party while another tries to read or update it simultaneously (without synchronization between the two). Let's look at the classic example of a data race using a shared counter. use std::cell::UnsafeCell; use std::sync::Arc; use std::threa...
NativeScript's global timer variable lets you set timeouts and intervals for asynchronous delayed function calls. Importing var timer = require("timer") Timeouts var callback = function(){ console.log("I will be executed once after 500ms"); } var timeoutId = timer.se...
From the Tools menu, select NuGet Package Manager > Package Manager Console. In the Package Manager Console window, type: Install-Package Microsoft.AspNet.Odata This command installs the latest OData NuGet packages.
For this tutorial, we'll use Entity Framework (EF) Code First to create the back-end database. Web API OData does not require EF. Use any data-access layer that can translate database entities into models. First, install the NuGet package for EF. From the Tools menu, select NuGet Package Mana...
Open the file App_Start/WebApiConfig.cs. Add the following using statements: using ProductService.Models; using System.Web.OData.Builder; using System.Web.OData.Extensions; Then add the following code to the Register method: public static class WebApiConfig { public static void Register...
A controller is a class that handles HTTP requests. You create a separate controller for each entity set in your OData service. In this tutorial, you will create one controller, for the Product entity. In Solution Explorer, right-click the Controllers folder and select Add > Class. Name the clas...
Querying the Entity Set Add the following methods to ProductsController. [EnableQuery] public IQueryable<Product> Get() { return db.Products; } [EnableQuery] public SingleResult<Product> Get([FromODataUri] int key) { IQueryable<Product> result = db.Products.Wher...
Symfony REST Edition is a fully-functional Symfony2 application that you can use as the skeleton for your new applications. Available on Github It comes pre-configured with the following bundles: BundleDescriptionFrameworkBundleThe core Symfony framework bundle.SensioFrameworkExtraBundleAdds seve...
Security is a critical piece of any programming technology or framework for implementing service - oriented applications WCF has been built from the ground up for providing the necessary security infrastructure at the message and service level. In the following sections, you see how to use many...
<bindings > <wsHttpBinding > <binding name="mybinding" > <security mode="Transport" > <transport clientCredentialType="Basic"/ > </security > </binding > </wsHttpBinding > </bindings > ...
To create a new collection "class": var Books = Backbone.Collection.extend({ // books will be sorted by title comparator: "title", initialize: function(models, options) { options = options || {}; // (Optional) you can play with the models her...
We need to define a collection with a url property. This is the url to an API endpoint which should return a json formatted array. var Books = Backbone.Collection.extend({ url: "/api/book", comparator: "title", }); Then, within a view, we'll fetch and render asynch...
In features/documentation.feature: Feature: Documentation Scenario: User views documentation When I go to the "Cucumber" documentation Then I should see the "Cucumber" documentation A minimal feature has a Feature line and a Scenario with one or more steps begi...
Here’re some basic JUnit annotations you should understand: @BeforeClass – Run once before any of the test methods in the class, public static void @AfterClass – Run once after all the tests in the class has been run, public static void @Before – Run before @Test, public void @After – Run after...

Page 833 of 1336