Tutorial by Examples

<input type="hidden" name="inputName" value="inputValue"> A hidden input won't be visible to the user, but its value will be sent to the server when the form is submitted nonetheless.
Direction-Specific Properties CSS allows you to specify a given side to apply margin to. The four properties provided for this purpose are: margin-left margin-right margin-top margin-bottom The following code would apply a margin of 30 pixels to the left side of the selected div. View Resu...
You can include another Git repository as a folder within your project, tracked by Git: $ git submodule add https://github.com/jquery/jquery.git You should add and commit the new .gitmodules file; this tells Git what submodules should be cloned when git submodule update is run.
When you clone a repository that uses submodules, you'll need to initialize and update them. $ git clone --recursive https://github.com/username/repo.git This will clone the referenced submodules and place them in the appropriate folders (including submodules within submodules). This is equivale...
Anchors can be used to jump to specific tags on an HTML page. The <a> tag can point to any element that has an id attribute. To learn more about IDs, visit the documentation about Classes and IDs. Anchors are mostly used to jump to a subsection of a page and are used in conjunction with header...
Python provides string interpolation and formatting functionality through the str.format function, introduced in version 2.6 and f-strings introduced in version 3.6. Given the following variables: i = 10 f = 1.5 s = "foo" l = ['a', 1, 2] d = {'a': 1, 2: 'foo'} The following statem...
A delegate is a common design pattern used in Cocoa and CocoaTouch frameworks, where one class delegates responsibility for implementing some functionality to another. This follows a principle of separation of concerns, where the framework class implements generic functionality while a separate dele...
One method is available for counting the number of occurrences of a sub-string in another string, str.count. str.count(sub[, start[, end]]) str.count returns an int indicating the number of non-overlapping occurrences of the sub-string sub in another string. The optional arguments start and end ...
Routes are defined in config/routes.rb. They are often defined as a group of related routes, using the resources or resource methods. resources :users creates the following seven routes, all mapping to actions of UsersController: get '/users', to: 'users#index' post '/users', ...
Signed integers can be of these types (the int after short, or long is optional): signed char c = 127; /* required to be 1 byte, see remarks for further information. */ signed short int si = 32767; /* required to be at least 16 bits. */ signed int i = 32767; /* required to be at least 16 bits */ ...
A string literal in C is a sequence of chars, terminated by a literal zero. char* str = "hello, world"; /* string literal */ /* string literals can be used to initialize arrays */ char a1[] = "abc"; /* a1 is char[4] holding {'a','b','c','\0'} */ char a2[4] = "abc"...
C99 The header <stdint.h> provides several fixed-width integer type definitions. These types are optional and only provided if the platform has an integer type of the corresponding width, and if the corresponding signed type has a two's complement representation of negative values. See the r...
The C language has three mandatory real floating point types, float, double, and long double. float f = 0.314f; /* suffix f or F denotes type float */ double d = 0.314; /* no suffix denotes double */ long double ld = 0.314l; /* suffix l or L denotes long double */ /* the differen...
Dictionaries are an unordered collection of keys and values. Values relate to unique keys and must be of the same type. When initializing a Dictionary the full syntax is as follows: var books : Dictionary<Int, String> = Dictionary<Int, String>() Although a more concise way of initia...
Add a key and value to a Dictionary var books = [Int: String]() //books = [:] books[5] = "Book 5" //books = [5: "Book 5"] books.updateValue("Book 6", forKey: 5) //[5: "Book 6"] updateValue returns the original value if one exists or nil. let previous...
A value in a Dictionary can be accessed using its key: var books: [Int: String] = [1: "Book 1", 2: "Book 2"] let bookName = books[1] //bookName = "Book 1" The values of a dictionary can be iterated through using the values property: for book in books.values { ...
The <article> element contains self-contained content like articles, blog posts, user comments or an interactive widget that could be distributed outside the context of the page, for example by RSS. When article elements are nested, the contents of the inner article node should be related t...
The <main> element contains the main content for your web page. This content is unique to the individual page, and should not appear elsewhere on the site. Repeating content like headers, footers, navigation, logos, etc., is placed outside the element. The <main> element should only e...
Syntax : history.replaceState(data, title [, url ]) This method modifies the current history entry instead of creating a new one. Mainly used when we want to update URL of the current history entry. window.history.replaceState("http://example.ca", "Sample Title", "/exam...
Syntax : history.pushState(state object, title, url) This method allows to ADD histories entries. For more reference, Please have a look on this document : pushState() method Example : window.history.pushState("http://example.ca", "Sample Title", "/example/path.html&qu...

Page 40 of 1336