Tutorial by Examples: ti

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.
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...
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...
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 create a pure JSON table you need to provide a single field with the type JSONB: CREATE TABLE mytable (data JSONB NOT NULL); You should also create a basic index: CREATE INDEX mytable_idx ON mytable USING gin (data jsonb_path_ops); At this point you can insert data in to the table and que...
The current stable version of scikit-learn requires: Python (>= 2.6 or >= 3.3), NumPy (>= 1.6.1), SciPy (>= 0.9). For most installation pip python package manager can install python and all of its dependencies: pip install scikit-learn However for linux systems it is recomm...
The D programming language's standard compiler DMD can run on all major platforms. To install DMD see here. To install by command line you may run the command (found on the D website): curl -fsS https://dlang.org/install.sh | bash -s dmd Package Managers Arch Linux pacman -S dlang Chocolate...
Problem: Create a String containing n repetitions of a String s. The trivial approach would be repeatedly concatenating the String final int n = ... final String s = ... String result = ""; for (int i = 0; i < n; i++) { result += s; } This creates n new string instances ...
SWI-Prolog Windows and Mac: Download SWI-Prolog at the official website Simply install by following the installer instructions. Linux (PPA): Add the PPA ppa:swi-prolog/stable to your system’s software sources (developers may choose for ppa:swi-prolog/devel) : Open a terminal (Ctrl+...
Returns unique values from an IEnumerable. Uniqueness is determined using the default equality comparer. int[] array = { 1, 2, 3, 4, 2, 5, 3, 1, 2 }; var distinct = array.Distinct(); // distinct = { 1, 2, 3, 4, 5 } To compare a custom data type, we need to implement the IEquatable<T> i...
If you don't have any RubyGems installed, there is still the pre-gem approach to getting software, doing it manually: Download from RubyGems Unpack into a directory and cd there Install with: ruby setup.rb (you may need admin/root privilege) sudo ruby setup.rb For more details...
Strings in JavaScript can be enclosed in Single quotes 'hello', Double quotes "Hello" and (from ES2015, ES6) in Template Literals (backticks) `hello`. var hello = "Hello"; var world = 'world'; var helloW = `Hello World`; // ES2015 / ES6 Strings can be created...
You can require a generic type to extend multiple upper bounds. Example: we want to sort a list of numbers but Number doesn't implement Comparable. public <T extends Number & Comparable<T>> void sortNumbers( List<T> n ) { Collections.sort( n ); } In this example T must...
Auto-implemented properties were introduced in C# 3. An auto-implemented property is declared with an empty getter and setter (accessors): public bool IsValid { get; set; } When an auto-implemented property is written in your code, the compiler creates a private anonymous field that can only be...
fn to_test(output: bool) -> bool { output } #[cfg(test)] // The module is only compiled when testing. mod test { use super::to_test; // This function is a test function. It will be executed and // the test will succeed if the function exits cleanly. #[test] fn...
Lets assume we have some Film model: public class Film { public string Title { get; set; } public string Category { get; set; } public int Year { get; set; } } Group by Category property: foreach (var grp in films.GroupBy(f => f.Category)) { var groupCategory = grp.Key; ...
You have started an interactive rebase. In the editor where you pick your commits, you decide that something is going wrong (for example a commit is missing, or you chose the wrong rebase destination), and you want to abort the rebase. To do this, simply delete all commits and actions (i.e. all lin...
The following code snippet shows how to open the Google Play Store Listing of your app in a safe way. Usually you want to use it when asking the user to leave a review for your app. private void openPlayStore() { String packageName = getPackageName(); Intent playStoreIntent = new Intent(I...
Change Index Initialize or update a particular element in the array array[10]="elevenths element" # because it's starting with 0 3.1 Append Modify array, adding elements to the end if no subscript is specified. array+=('fourth element' 'fifth element') Replace the entire ar...

Page 50 of 505