Tutorial by Examples: c

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>
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...
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...
There are four primary useful functions for regular expressions, all of which take arguments in needle, haystack order. The terminology "needle" and "haystack" come from the English idiom "finding a needle in a haystack". In the context of regexes, the regex is the need...
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 ...
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)...
Auxilliary function that takes a seed and evaluates: uint wang_hash(uint seed) { seed = (seed ^ 61) ^ (seed >> 16); seed *= 9; seed = seed ^ (seed >> 4); seed *= 0x27d4eb2d; seed = seed ^ (seed >> 15); return seed; } anot...
/* The result can be use for fast way to use columns on Insertion/Updates. Works with tables and views. Example: eTableColumns 'Customers' ColumnNames ------------------------------------------------------ Id, FName, LName, Email, PhoneNumber, PreferredContact INSERT INTO Customers (Id, ...
R-markdown code chunks R-markdown is a markdown file with embedded blocks of R code called chunks. There are two types of R code chunks: inline and block. Inline chunks are added using the following syntax: `r 2*2` They are evaluated and inserted their output answer in place. Block chunks hav...

Page 505 of 826