Tutorial by Examples: o

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...
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(...
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...
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) { ...
Recursive use of make means using make as a command within a makefile. This technique is useful when a large project contains sub-directories, each having their respective makefiles. The following example will help understand advantage of using .PHONY with recursive make. /main |_ Makefile ...
This sample demonstrates how to import the worksheet Azure Excel file blob to DB on the Azure SQL Server and how to export it from DB to Azure Excel blob. Prerequisites: Microsoft Visual Studio 2015 version Open XML SDK 2.5 for Microsoft Office An Azure storage account Azure SQL Server Add...
First and foremost you should be able to find the bottleneck of your script and note that no optimization can compensate for a poor choice in data structure or a flaw in your algorithm design. Secondly do not try to optimize too early in your coding process at the expense of readability/design/quali...
The substrings captured by capture groups are accessible from RegexMatch objects using indexing notation. For instance, the following regex parses North American phone numbers written in (555)-555-5555 format: julia> phone = r"\((\d{3})\)-(\d{3})-(\d{4})" and suppose we wish to ext...
In this example I define two custom function. 1 - countryFilter function get's the country short code as input and return the country full name. 2 - _countPrinterTasks is used to calculate the no of tasks assigned to a particular user. <?php namespace DashboardBundle\Twig\Extension; use ...
Assume having a method returning IEnumerable<T>, f.e. private IEnumerable<T> GetData() { try { // return results from database } catch(Exception exception) { throw; } } Creates an Observable and starts a method asynchronously. Sel...
Visual Studio (IDE) WPA (performance analyzer) WinDbg (debugger) IDA Pro (disassembler) dotPeek (decompiler for .NET) WinMerge (diff tool) HxD or 010 editor (hex editor) Speedcrunch (calculator) Firefox (browser) Rohitab API monitor (API call monitoring) SOS (a WinDbg extension for .NET)...

Page 625 of 1038