Tutorial by Examples: er

Because Regular Expressions can do a lot, it is tempting to use them for the simplest operations. But using a regex engine has a cost in memory and processor usage: you need to compile the expression, store the automaton in memory, initialize it and then feed it with the string to run it. And there...
By using the .IsRequired() method, properties can be specified as mandatory, which means that the column will have a NOT NULL constraint. using System.Data.Entity; // .. public class PersonContext : DbContext { // .. protected override void OnModelCreating(DbModelBuilder modelB...
Media queries are not supported at all in IE8 and below. A Javascript based workaround To add support for IE8, you could use one of several JS solutions. For example, Respond can be added to add media query support for IE8 only with the following code : <!--[if lt IE 9]> <script ...
To view all the implicits in-scope during a REPL session: scala> :implicits To also include implicit conversions defined in Predef.scala: scala> :implicits -v If one has an expression and wishes to view the effect of all rewrite rules that apply to it (including implicits): scala> ...
Given a noisy signal: import numpy as np import matplotlib.pyplot as plt np.random.seed(1) x = np.linspace(0,2*np.pi,100) y = np.sin(x) + np.random.random(100) * 0.2 plt.plot(x,y) plt.show() one can smooth it using a Savitzky–Golay filter using the scipy.signal.savgol_filter() method...
The ranges of the integer types are implementation-defined. The header <limits> provides the std::numeric_limits<T> template which provides the minimum and maximum values of all fundamental types. The values satisfy guarantees provided by the C standard through the <climits> and (&...
Since workers run in a separate thread from the one that created them, communication needs to happen via postMessage. Note: Because of the different export prefixes, some browsers have webkitPostMessage instead of postMessage. You should override postMessage to make sure workers "work" (n...
Use the link attribute in the document's head: <head> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> You can also use stylesheets provided from websites via a content delivery network, or CDN for short. (for example, Bo...
You can also include CSS elements internally by using the <style> tag: <head> <style type="text/css"> body { background-color: gray; } </style> </head> Multiple internal stylesheets can be included in a program as...
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. The first stage of creating the Android portion of our application is to set up a basic layout and handle responses that come back from the server that we'll set up in Node....
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. At this point the PayPal future payments button has been clicked, we have an auth code and metadata ID from the PayPal SDK, and we need to pass those on to our server to com...
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. From step 2, an async request has been made to our server at the /fpstore endpoint, passing along the auth code and metadata ID. We now need to exchange those for a token in...
XSD schema (schema.xsd) The following xml schema (xsd) defines a list of users with attributes name and reputation. <?xml version="1.0"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www...
Review Partial Application before proceeding. In Haskell, a function that can take other functions as arguments or return functions is called a higher-order function. The following are all higher-order functions: map :: (a -> b) -> [a] -> [b] filter :: (a -> Bool) -> [a] ...
Lets say we have a class Classy that has property Propertua public class Classy { public string Propertua {get; set;} } to set Propertua using reflection: var typeOfClassy = typeof (Classy); var classy = new Classy(); var prop = typeOfClassy.GetProperty("Propertua"); prop.Se...
Every tag has an overview topic. This topic has a special section named "Versions". In that section, different versions can be defined in a table that has that should have at least 2 columns: the first one should be the name of the version the last one should be the release ...
For some tags it makes sense to have multiple version tables. There might be different subsets of a programming language or framework available, say for different device types as in this example. The different tables should be prefaced with a heading. This markup: ## desktop development kit ## ...
A topic might only apply to certain versions. When creating a new topic, the appropriate versions can be chosen in the title section of the topic. In the following example .NET 2.0, 4.0, 4.5.1; Compact Framework 3.7 and Micro Framework 4.2 are selected. This selection will show up next to the to...
An example cannot be associated with a version number directly. Parts of it can however be declared to apply only for certain versions. <!-- if version [eq Java SE 1.3] --> This content is for Java SE 1.3 <!-- end version if -->
If there are many version tables, the title of the desired one has to be included in angle brackets. <!-- if version <Micro Framework> [eq 4.4] --> This content is for Micro Framework 4.4 <!-- end version if -->

Page 195 of 417