Tutorial by Examples: c

One of Angular's strength's is client-side form validation. Dealing with traditional form inputs and having to use interrogative jQuery-style processing can be time-consuming and finicky. Angular allows you to produce professional interactive forms relatively easily. The ng-model directive provide...
2009 uses Character; var C1, C2: Char; begin C1 := 'F'; C2 := ToLower(C1); // Convert the char to lower-case C1 := ToUpper(C2); // Convert the char to upper-case The uses clause should be System.Character if version is XE2 or above.
The echo setting determines whether command echoing is on or off. This is what a sample program looks like with command echoing on (default): C:\Windows\System32>echo Hello, World! Hello, World! C:\Windows\System32>where explorer C:\Windows\System32\explorer.exe C:\Windows\System32&gt...
Sometimes you may need additional features from a directive. Instead of rewriting (copy) the directive, you can modify how the directive behaves. The decorator will be executed during $inject phase. To do so, provde a .config to your module. The directive is called myDirective, so you have to con...
Angular js directives can be nested or be made interoperable. In this example, directive Adir exposes to directive Bdir it's controller $scope, since Bdir requires Adir. angular.module('myApp',[]).directive('Adir', function () { return { restrict: 'AE', controlle...
enum Util { /* No instances */; public static int clamp(int min, int max, int i) { return Math.min(Math.max(i, min), max); } // other utility methods... } Just as enum can be used for singletons (1 instance classes), it can be used for utility classes (0 instance...
Imagine that we have a class Math.php with logic of calculating of fiobanacci and factorial numbers. Something like this: <?php class Math { public function fibonacci($n) { if (is_int($n) && $n > 0) { $elements = array(); $elements[1] = 1; ...
install the required Microsoft.SqlServer.Types assembly; they are not installed by default, and are available from Microsoft here as "Microsoft® System CLR Types for Microsoft® SQL Server® 2012" - note that there are separate installers for x86 and x64. install Dapper.EntityFramew...
When using Access you can retrieve data using queries. These queries are built using Structured Query Language (SQL). Understanding SQL is important because it can help build better, more useful queries. When creating queries in Access, you can switch to "SQL View". An example of a "...
The BOM (Browser Object Model) contains objects that represent the current browser window and components; objects that model things like history, device's screen, etc The topmost object in BOM is the window object, which represents the current browser window or tab. Document: represents current...
The most important object in the Browser Object Model is the window object. It helps in accessing information about the browser and its components. To access these features, it has various methods and properties. MethodDescriptionwindow.alert()Creates dialog box with message and an OK buttonwindow....
An awk consists of patterns and actions, enclosed in curly brackets, to be taken if a pattern matches. The most basic pattern is the empty pattern, which matches any record. The most basic action is the empty action, which is equivalent to { print }, which is, in turn, equivalent to { print $0 }. If...
The http_build_query() will create a query string from an array or object. These strings can be appended to a URL to create a GET request, or used in a POST request with, for example, cURL. $parameters = array( 'parameter1' => 'foo', 'parameter2' => 'bar', ); $queryString = http_b...
Basic usage If the value of the href-attribute begins with mailto: it will try to open an email client on click: <a href="mailto:[email protected]">Send email</a> This will put the email address [email protected] as the recipient for the newly created email. Cc and ...
<PropertyGroup> <!-- Definition of a Property named "TestCondition". A PropertyGroup may also be placed inside a Target. --> <TestCondition>True</TestCondition> </PropertyGroup> <!-- This Target will run after the "Clean" Target, su...
# example data DT1 = data.table(x = letters[1:2], y = 1:2, z = (1:2) > 3) Due to the way data.tables are manipulated, DT2 <- DT1 will not make a copy. That is, later modifications to the columns or other attributes of DT2 will affect DT1 as well. When you want a real copy, use DT2 = copy(...
# example data DT = data.table(Titanic) Suppose we only want to see second class: DT[ Class == "2nd" ] # Class Sex Age Survived N # 1: 2nd Male Child No 0 # 2: 2nd Female Child No 0 # 3: 2nd Male Adult No 154 # 4: 2nd Female Adult ...
# example data DT = data.table(Titanic) Suppose we want to see each class only if a majority survived: DT[, if (sum(N[Survived=="Yes"]) > sum(N[Survived=="No"]) ) .SD, by=Class] # Class Sex Age Survived N # 1: 1st Male Child No 0 # 2: 1st Fema...
Match (node_name:node_type {}), (node_name_two:node_type_two {}) CREATE (node_name)-[::edge_name{}]->(node_name_two)
The DISTINCT clause after SELECT eliminates duplicate rows from the result set. CREATE TABLE `car` ( `car_id` INT UNSIGNED NOT NULL PRIMARY KEY, `name` VARCHAR(20), `price` DECIMAL(8,2) ); INSERT INTO CAR (`car_id`, `name`, `price`) VALUES (1, 'Audi A1', '20000'); INSERT INTO CA...

Page 332 of 826