Tutorial by Examples

5 <input type="datetime-local" /> Dependent on browser support, a date and time picker will pop up on screen for you to choose a date and time.
<input type="image" src="img.png" alt="image_name" height="50px" width="50px"/> An Image. You must use the src attribute to define the source of the image and the alt attribute to define alternative text. You can use the height and width att...
5 <input type="range" min="" max="" step="" /> A control for entering a number whose exact value is not important. AttributeDescriptionDefault valueminMinimum value for range0maxMaximum value for range100stepAmount to increase by on each increment.1...
5 <input type="month" /> Dependent on browser support, a control will show to pick the month.
5 <input type="time" /> The time input marks this element as accepting a string representing a time. The format is defined in RFC 3339 and should be a partial-time such as 19:04:39 08:20:39.04 Currently, all versions of Edge, Chrome, Opera, and Chrome for Android support typ...
5 <input type="week" /> Dependent on browser support, a control will show for entering a week-year number and a week number with no time zone.
The most basic input type and the default input if no type is specified. This input type defines a single-line text field with line-breaks automatically removed from the input value. All other characters can be entered into this. <input> elements are used within a <form> element to decla...
PrimeFaces can be used in all web applications based on Java Server Faces (version 2.x) which are run on Servlet Containers (e.g. Wildlfy or Tomcat or GlassFish). There are several ways you can add PrimeFaces to your application. Manually Download the primefaces-{version}.jar and add it to you cl...
A class can be defined using classdef in an .m file with the same name as the class. The file can contain the classdef...end block and local functions for use within class methods. The most general MATLAB class definition has the following structure: classdef (ClassAttribute = expression, ...) Cla...
Classes in MATLAB are divided into two major categories: value classes and handle classes. The major difference is that when copying an instance of a value class, the underlying data is copied to the new instance, while for handle classes the new instance points to the original data and changing val...
Setup for Yii 1.1 Step 1 - downloading Yii Download the Yii framework bundle from the Yii website Inside the downloaded bundle there are 3 folders, namely: demos framework requirements demos, as the name suggests contains a number of demo Yii applications. framework contains the Yii framew...
Use a subquery to filter the result set. For example this will return all employees with a salary equal to the highest paid employee. SELECT * FROM Employees WHERE Salary = (SELECT MAX(Salary) FROM Employees)
A subquery in a FROM clause acts similarly to a temporary table that is generated during the execution of a query and lost afterwards. SELECT Managers.Id, Employees.Salary FROM ( SELECT Id FROM Employees WHERE ManagerId IS NULL ) AS Managers JOIN Employees ON Managers.Id = Employees.Id ...
SELECT Id, FName, LName, (SELECT COUNT(*) FROM Cars WHERE Cars.CustomerId = Customers.Id) AS NumberOfCars FROM Customers
Macros allow us to abstract syntactical patterns that are repeated many times. For instance: /// Computes `a + b * c`. If any of the operation overflows, returns `None`. fn checked_fma(a: u64, b: u64, c: u64) -> Option<u64> { let product = match b.checked_mul(c) { Some(p) =&...
PHP implements a DOM Level 2 compliant parser, allowing you to work with HTML using familiar methods like getElementById() or appendChild(). $html = '<html><body><span id="text">Hello, World!</span></body></html>'; $doc = new DOMDocument(); libxml_u...
$html = '<html><body><span class="text">Hello, World!</span></body></html>'; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $span = $xpath->query("//span[@class='text']")->item(0); echo $span-&...
A simple program that writes "Hello, world!" to test.txt, reads back the data, and prints it out. Demonstrates simple file I/O operations. package main import ( "fmt" "io/ioutil" ) func main() { hello := []byte("Hello, world!") //...
package main import ( "fmt" "io/ioutil" ) func main() { files, err := ioutil.ReadDir(".") if err != nil { panic(err) } fmt.Println("Files and folders in the current directory:") for _, fileInfo := range fi...
To access member variables and member functions of an object of a class, the . operator is used: struct SomeStruct { int a; int b; void foo() {} }; SomeStruct var; // Accessing member variable a in var. std::cout << var.a << std::endl; // Assigning member variable b in v...

Page 125 of 1336