Tutorial by Examples

Instead of annotations, you can also specify your routes as YAML: app_index: path: /index defaults: { _controller: AppBundle:Acme:index } The same options apply to both annotations and YAML configurations. To import a YAML routing configuration in your root routing configuration, you d...
JSON is a very strict format (see http://json.org). That makes it easy to parse and write for machines but surprises humans when an inconspicuous mistakes breaks the document. Common Problems Trailing Comma Unlike most programming languages your are not allowed to add a trailing comma: { a: 1...
Log on to the Azure classic portal. In the left navigation pane of the portal, click Service Bus. In the lower pane of the portal, click Create. In the Add a new namespace dialog, enter a namespace name. The system immediately checks to see if the name is available. After...
Log on to the Azure classic portal. In the left navigation pane of the portal, click Service Bus. Select the namespace that you would like to create the queue in. In this case, it is “mytestns1.” Select Queues. Select New in the bottom left corner, then select Quick Creat...
In order to send messages to the queue, we will write a C# console application using Visual Studio. Create a console application Launch Visual Studio and create a new Console application. Add the Service Bus NuGet package Right click on the newly created project and select Manage NuGet P...
Create a new console application and add a reference to the Service Bus NuGet package, similar to the sending application above. Add the following using statement to the top of the Program.cs file. using Microsoft.ServiceBus.Messaging; Add the following code to the Main method, set ...
@IBAction func axisChange(sender: UISwitch) { UIView.animateWithDuration(1.0) { self.updateConstraintsForAxis() } } The updateConstraintForAxis function just sets the axis of the stack view containing the two image views: private func updateConstraintsForAxis() { if (axi...
Server-side engine with block inheritance, autoescaping, macros, asynchronous control, and more. Heavily inspired by jinja2, very similar to Twig (php). Docs - http://mozilla.github.io/nunjucks/ Install - npm i nunjucks Basic usage with Express below. app.js var express = require ('express'); ...
The simple use-case is to refer to a single icon in its normal size: <i class="fa fa-camera-retro"></i> (View result in this fiddle.) Create an empty tag (it is recommended to use <i> used for that) and assign class "fa" and the class corresponding to the desi...
To restore a file to the latest updated svn version, i.e. undo the local changes, you can use revert: svn revert file To restore a file to an older version (revision XXX) use update: svn update -r XXX file Warning: in both cases you will lose any local changes in the file because it will be ...
If you have predefined ranges and want to use specific colors for those ranges you can declare custom colormap. For example: import matplotlib.pyplot as plt import numpy as np import matplotlib.colors x = np.linspace(-2,2,500) y = np.linspace(-2,2,500) XX, YY = np.meshgrid(x, y) Z = np.sin(...
Font icons are usually placed inside a <i> tag. Ionic has default css styles for the icons for easy use. The most basic example of use: <i class="icon ion-home"></i>
Ionic has some CSS components where you can use Ionicons as a default which have preset styling. The range class in the item <div> will apply correct styling to both the input and the icons inside it. Here's an example of a range slider. <div class="item range"> <i class...
A shader program, in the OpenGL sense, contains a number of different shaders. Any shader program must have at least a vertex shader, that calculates the position of the points on the screen, and a fragment shader, that calculates the colour of each pixel. (Actually the story is longer and more co...
To create a new project use the following command (HelloWorld is the name of the project and play-java is the template) $ ~/activator-1.3.10-minimal/bin/activator new HelloWorld play-java You should get an output similar to this one Fetching the latest list of templates... OK, application &...
The first step in you journey in the Play Framework world is to download Activator. Activator is a tool used to create, build and distribute Play Framework applications. Activator can be downloaded from Play downloads section (here I will be using version 1.3.10) After you downloaded the file, ext...
When we created our project, Activator told us how we can run our application To run "HelloWorld" from the command line, "cd HelloWorld" then: /home/YourUserName/HelloWorld/activator run There is a small pitfall here: activator executable is not in our project root, but ...
An "Hello World" doesn't deserve this name if it does not provide a Hello World message. So let's make one. In the file app/controllers/HomeController.java add the following method: public Result hello() { return ok("Hello world!"); } And in your conf/routes file add t...
add_filter( 'widget_text', 'shortcode_unautop' ); add_filter( 'widget_text', 'do_shortcode' );enter code here Add this to a plugin or the functions.php file to enable shortcodes in widgets. The code first stops WordPress turning line breaks into paragraph tags and then lets shortcodes to parse f...
Calling the function string InvoiceHtml = myFunction.RenderPartialViewToString("PartialInvoiceCustomer", ToInvoice); // ToInvoice is a model, you can pass parameters if needed Function to generate HTML public static string RenderPartialViewToString(string viewName, object model) { ...

Page 817 of 1336