Tutorial by Examples: f

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...
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...
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 > ...
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...
We can provide a meaningful name for our constructors. We can provide several constructors with the same number and type of parameters, something that as we saw earlier we can’t do with class constructors. public class RandomIntGenerator { private final int min; private final int max; ...
We can limit no of rows from result using rownum clause select * from ( select val from mytable ) where rownum<=5 If we want first or last record then we want order by clause in inner query that will give result based on order. Last Five Record : select * from ( select val f...
Get localized product information from a set of product identifier strings using SKProductsRequest: import StoreKit let productIdentifierSet = Set(["yellowSubmarine", "pennyLane"]) let productsRequest = SKProductsRequest(productIdentifiers: productIdentifierSet) In order ...
OpenSSH config files are used for configuration that should be applied every time the ssh client is run. Most command line options are possible to put in the config files. OpenSSH uses configuration from the following sources in order: Command line options User's configuration file ~/.ssh/confi...
HTTPS HTTPS (also called HTTP over TLS,[1][2] HTTP over SSL,[3] and HTTP Secure[4][5]) is a protocol for secure communication over a computer network which is widely used on the Internet. HTTPS consists of communication over Hypertext Transfer Protocol (HTTP) within a connection encrypted by Transp...
DayPilot Scheduler widget displays a time line for multiple resources. Supports AJAX and HTML5. Automatic and manual localization. Full CSS styling support
To get the actual type for a variable declared using var, call GetSymbolInfo() on the SemanticModel. You can open an existing solution using MSBuildWorkspace, then enumerate its projects and their documents. Use a document to obtain its SyntaxRoot and SemanticModel, then look for VariableDeclaration...
ProGuard allows the developer to obfuscate, shrink and optimize his code. #1 The first step of the procedure is to enable proguard on the build. This can be done by setting the 'minifyEnabled' command to true on your desired build #2 The second step is to specify which proguard files are we using...
Everybody loves twitter bootstrap, but some of us don't like it's default design. So here's a simple guide on how to start customizing boostrap's design. Twitter boostrap when cloned provides a set of default css files which we can override. The mail css file that we need to override is the boostra...
If you want to use the MySQL command IN() in the QueryBuilder, you can do it with the in() function of the ExpressionBuilder class. // get an ExpressionBuilder instance, so that you $expressionBulder = $this->_em->getExpressionBuilder(); $qb = $this->_em->createQueryBuilder() ->se...

Page 280 of 457